Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: MythTV: Commits

Ticket #10658: Rework AVFRingBuffer to return -EAGAIN when there is no data

 

 

MythTV commits RSS feed   Index | Next | Previous | View Threaded


noreply at mythtv

Apr 26, 2012, 9:38 AM

Post #1 of 5 (118 views)
Permalink
Ticket #10658: Rework AVFRingBuffer to return -EAGAIN when there is no data

#10658: Rework AVFRingBuffer to return -EAGAIN when there is no data
--------------------------------------+-------------------------
Reporter: danielk | Owner:
Type: Bug Report - General | Status: new
Priority: minor | Milestone: 0.26
Component: MythTV - General | Version: Unspecified
Severity: medium | Keywords:
Ticket locked: 0 |
--------------------------------------+-------------------------
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.

--
Ticket URL: <http://code.mythtv.org/trac/ticket/10658>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center
_______________________________________________
mythtv-commits mailing list
mythtv-commits [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-commits


noreply at mythtv

Apr 26, 2012, 9:39 AM

Post #2 of 5 (114 views)
Permalink
Re: Ticket #10658: Rework AVFRingBuffer to return -EAGAIN when there is no data [In reply to]

#10658: Rework AVFRingBuffer to return -EAGAIN when there is no data
------------------------------+-----------------------------
Reporter: danielk | Owner: danielk
Type: Developer Task | Status: accepted
Priority: minor | Milestone: 0.26
Component: MythTV - General | Version: Master Head
Severity: medium | Resolution:
Keywords: | Ticket locked: 0
------------------------------+-----------------------------
Changes (by danielk):

* owner: => danielk
* status: new => accepted
* version: Unspecified => Master Head
* type: Bug Report - General => Developer Task


--
Ticket URL: <http://code.mythtv.org/trac/ticket/10658#comment:1>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center
_______________________________________________
mythtv-commits mailing list
mythtv-commits [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-commits


noreply at mythtv

Jul 7, 2012, 11:33 AM

Post #3 of 5 (86 views)
Permalink
Re: Ticket #10658: Rework AVFRingBuffer to return -EAGAIN when there is no data [In reply to]

#10658: Rework AVFRingBuffer to return -EAGAIN when there is no data
------------------------------+-----------------------------
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
------------------------------+-----------------------------
Changes (by danielk):

* milestone: 0.26 => 0.27


--
Ticket URL: <http://code.mythtv.org/trac/ticket/10658#comment:2>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center
_______________________________________________
mythtv-commits mailing list
mythtv-commits [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-commits


noreply at mythtv

Jul 23, 2012, 11:20 AM

Post #4 of 5 (71 views)
Permalink
Re: Ticket #10658: Rework AVFRingBuffer to return -EAGAIN when there is no data [In reply to]

#10658: Rework AVFRingBuffer to return -EAGAIN when there is no data
------------------------------+-----------------------------
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
------------------------------+-----------------------------

Comment (by danielk):

With some debugging I've discovered that if you return -EAGAIN a number of
times to libav it will mark the stream as having hit EOF. Even if you
later reset the EOF flag any partially decoded data will be chucked by
libav.

This means this solution is unworkable as is. However, we can still return
partial reads as long as we avoid returning zero byte reads or -EAGAIN
reads.

--
Ticket URL: <http://code.mythtv.org/trac/ticket/10658#comment:3>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center
_______________________________________________
mythtv-commits mailing list
mythtv-commits [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-commits


noreply at mythtv

Jul 24, 2012, 11:41 AM

Post #5 of 5 (69 views)
Permalink
Re: Ticket #10658: Allow partial AVFRingBuffer reads (was: Rework AVFRingBuffer to return -EAGAIN when there is no data) [In reply to]

#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
_______________________________________________
mythtv-commits mailing list
mythtv-commits [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-commits

MythTV commits RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.