[mythtv-commits] Ticket #10658: Allow partial AVFRingBuffer reads (was: Rework AVFRingBuffer to return -EAGAIN when there is no data)

MythTV noreply at mythtv.org
Tue Jul 24 18:41:56 UTC 2012


#10658: Allow partial AVFRingBuffer reads
------------------------------+-----------------------------
 Reporter:  danielk           |          Owner:  danielk
     Type:  Developer Task    |         Status:  accepted
 Priority:  minor             |      Milestone:  0.27
Component:  MythTV - General  |        Version:  Master Head
 Severity:  medium            |     Resolution:
 Keywords:                    |  Ticket locked:  0
------------------------------+-----------------------------
Description changed by danielk:

Old description:

> Traditionally we've always had RingBuffer::Read() return the number of
> bytes requested unless we are at the end of the file. But this blocks
> libav which expects this the read to complete fairly quickly even if it
> is a blocking read. Instead we should block for only a short time waiting
> for more data and then return what data we do have. To avoid premature
> exit from the decoder loop we also need to add EAGAIN returns so that if
> we don't have more data right now, but expect to have some in the near
> future we can signal this to libav.

New description:

 Traditionally we've always had RingBuffer::Read() return the number of
 bytes requested unless we are at the end of the file. But this blocks
 libav which expects this the read to complete fairly quickly even if it is
 a blocking read. Instead we should block for only a short time waiting for
 more data and then return what data we do have as long as we have at least
 1 byte of data.

--

-- 
Ticket URL: <http://code.mythtv.org/trac/ticket/10658#comment:4>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center


More information about the mythtv-commits mailing list