[mythtv] mythplayer.cpp query

Russell Gower mythtv at thegowers.me.uk
Tue Mar 13 15:25:02 UTC 2012


On 13 Mar 2012, at 14:52, Daniel Kristjansson wrote:

> On Tue, 2012-03-13 at 14:20 +0000, Russell Gower wrote:
>> On 13 Mar 2012, at 13:40, Daniel Kristjansson wrote:
>> Hi Daniel,
>>  Isn't tv_rec.cpp part of the backend process that creates the recordings? 
> Yes
> 
>> I've concatenated the recording files from two back to back recording together and verified that the transition between programs is practically seem less so i'm pretty sure creating the recording isn't the issue. 
> I don't think that is a good test, you really want to diff
> the time where the last keyframe is found on the old channel
> and the first keyframe is found on the new channel.

Just to be clear, I'm not talking about channel changes, I'm talking about the delay when one program ends and the next one starts  - i.e the transition from 8441_20120312180956.mpg to 8441_20120312183001.mpg

>> I then took a closer look at the frontend logs and could see a large (and variable) duration between the "SwitchToProgram - start" and "SwitchToProgram - end" entries, this method pauses playback, clears the decoded frames buffer (i think), opens the new recording file and then resumes play back - I'm looking to see if all that is really necessary.
> We need a good deal of buffering because of the DecoderBase
> architecture. We do the demux in GetFrame() and so we need that
> to be able to return a frame very quickly. If it freezes up
> waiting for data it blocks the UI thread. To fix that we need
> to run a loop that feeds video and audio queues outside the UI
> thread and have GetFrame() simply pop frames off that queue.
> This something I plan to do but it is not a task someone just
> digging into the code for the first time is going to be able
> to do.

Agreed that is above my current abilities.

It seems to me that as the recording code didn't really need to create a new file (its only doing so because thats what the guide data told it to do) then the playback code should be able to simply switch to that new file, if it can do this before the buffers run dry it should be seem less.

Regards
  Russell



More information about the mythtv-dev mailing list