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

Mailing List Archive: MythTV: Commits

Ticket #7935: [PATCH] Improve MPEG-TS seeking performance by 60X

 

 

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


mythtv at cvs

Jan 19, 2010, 10:05 AM

Post #1 of 3 (425 views)
Permalink
Ticket #7935: [PATCH] Improve MPEG-TS seeking performance by 60X

#7935: [PATCH] Improve MPEG-TS seeking performance by 60X
-------------------------------------+--------------------------------------
Reporter: taylor.ralph@… | Owner: janne
Type: patch | Status: new
Priority: minor | Milestone: 0.23
Component: MythTV - Video Playback | Version: head
Severity: medium | Mlocked: 0
-------------------------------------+--------------------------------------
I've recently discovered that slow seeking for MPEG-TS using av_seek_frame
is caused by inefficient handling of EOF in libs/libmythtv/RingBuffer.cpp.
The attached patch addresses the following issues:

* Inside safe_read() we need to break after a read() if it's an "oldfile"
(>30 minutes). There is no reason to delay (60000 usec) and retry for this
case. The calling code will retry anyways if ret > 0 and if ret == 0 then
it really is the EOF.

* When an lseek is performed we need to adjust the totfree buffer amount
before entering a 50000 usec delay. Every time an lseek is performed the
buffer gets reset so we should update totfree before checking to see if
the buffer it full and we need to wiat.

One other issue I believe is that 30 minutes is too long to determine if a
file is an "oldfile". I'd like to see that reduced to a more reasonable
value and if possible add a better check to determine it the file is open
for writing.

Without this patch applied an av_seek_frame takes ~0.9 secs and with the
patch it takes ~0.015. This will also improve performance for other
containers as well.

--
Ticket URL: <http://svn.mythtv.org/trac/ticket/7935>
MythTV <http://www.mythtv.org/>
MythTV
_______________________________________________
mythtv-commits mailing list
mythtv-commits [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-commits


mythtv at cvs

Jan 19, 2010, 11:12 PM

Post #2 of 3 (356 views)
Permalink
Re: Ticket #7935: [PATCH] Improve MPEG-TS seeking performance by 60X [In reply to]

#7935: [PATCH] Improve MPEG-TS seeking performance by 60X
-------------------------------------+--------------------------------------
Reporter: taylor.ralph@… | Owner: markk
Type: patch | Status: accepted
Priority: minor | Milestone: 0.23
Component: MythTV - Video Playback | Version: head
Severity: medium | Mlocked: 0
-------------------------------------+--------------------------------------
Changes (by markk):

* owner: janne => markk
* status: new => accepted


--
Ticket URL: <http://svn.mythtv.org/trac/ticket/7935#comment:1>
MythTV <http://www.mythtv.org/>
MythTV
_______________________________________________
mythtv-commits mailing list
mythtv-commits [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-commits


mythtv at cvs

Jan 25, 2010, 1:31 AM

Post #3 of 3 (287 views)
Permalink
Re: Ticket #7935: [PATCH] Improve MPEG-TS seeking performance by 60X [In reply to]

#7935: [PATCH] Improve MPEG-TS seeking performance by 60X
-------------------------------------+--------------------------------------
Reporter: taylor.ralph@… | Owner: markk
Type: patch | Status: closed
Priority: minor | Milestone: 0.23
Component: MythTV - Video Playback | Version: head
Severity: medium | Resolution: fixed
Mlocked: 0 |
-------------------------------------+--------------------------------------
Changes (by markk):

* status: accepted => closed
* resolution: => fixed


Comment:

(In [23288]) Improved AVFormatDecoder seeking with patches from Taylor
Ralph.

I've been testing for a few days and the improvement in navigating files
without a markup (i.e. MythVideo) is substantial.

I'd delayed due to an issue seen with certain test matroska files but
I've now realised that this is a separate, existing seek problem with
these files that manifests itself slightly differently following these
changes.

Closes #7521, Closes #7935.

--
Ticket URL: <http://svn.mythtv.org/trac/ticket/7935#comment:2>
MythTV <http://www.mythtv.org/>
MythTV
_______________________________________________
mythtv-commits mailing list
mythtv-commits [at] mythtv
http://mythtv.org/cgi-bin/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.