[mythtv-users] XvMC playback problem

Steve Smith st3v3.sm1th at gmail.com
Mon Oct 15 15:58:07 UTC 2007


On 03/10/2007, Steve Smith <st3v3.sm1th at gmail.com> wrote:
>
>
>
> On 02/10/2007, Justin Hornsby <justin.hornsby at gmail.com> wrote:
> >
> > I've noticed this on my minimyth-based frontend on every release since
> > 0.20-19.  It makes playback of BBC recordings (frankly the only stuff
> > I want to watch is on BBC channels) hard going with gappy playback
> > every 10 to 20 seconds.  If I disabled deinterlacing (eew) it'd play
> > just fine.  Problem with xvmc on my box is that it _really_ needs it
> > to play back SDTV so I can't say if turning it off helps!
> >
> > I investigated the problem & found that stripping the Audio
> > Description track with ffmpeg (ffmpeg -i $inputfile -acodec copy
> > -vcodec copy $outputfile), then redoing the seektable on the file
> > cures the problem.  It's a workaround but too much of a headache to do
> > for every recording.
> > Running the file through ffmpeg also strips out junk which is part of
> > the stream, so maybe the AD track isn't the whole story in my case.
> >
> > Anyway - Steve you said you've got a hackish solution to the problem
> > where you don't bother recording the AD track.  Could you ever see
> > yourself tidying that up so that it can become a setting?  Or letting
> > us see the code change?  worth a go.  If nothing else it'd end up
> > saving a lot of HDD space for those of us who don't need AD &
> > subtitles.
> >
> > Regards,
> > Justin
> > _______________________________________________
> > mythtv-users mailing list
> > mythtv-users at mythtv.org
> > http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
> >
>
> Justin,
>
> I'll see if I get time... at the moment it's linked to the recording
> profiles...so that if you select
> "TV only" it only records Video+1st Audio.
>
> I'll look on Fri evening to see if I can dig out the code changes I made.
> They're not huge.
>
> I've been using it now for several months without a hitch. (Even though
> theoretically, selecting
> only the 1st audio track it finds, could result in a duff recording)
>
> Someone else could change it to a genuine setting perhaps....
>
> Cheers
>
> Steve
>
>
>

Finally got chance to have a look at what I've done:

Unfortunately I didn't take a reference copy before I did the edits so no
fancy diffs here...
The changes are to libs/libmythtv/dvbrecorder.cpp
The updated function CreatePMT is below:
(YES the coding is rubbish, YES I should submit a patch..etc...etc... it's a
proof of concept I have got around to doing it properly!)


======================================

void DVBRecorder::CreatePMT(void)

{

QMutexLocker read_lock(&_pid_lock);

VERBOSE(VB_RECORD, LOC + "CreatePMT(void) INPUT\n\n" +

_input_pmt->toString());

// Figure out what goes into the PMT

uint programNumber = 1; // MPEG Program Number

desc_list_t gdesc = MPEGDescriptor::ParseAndExclude(

_input_pmt->ProgramInfo(), _input_pmt->ProgramInfoLength(),

DescriptorID::conditional_access);

vector<uint> pids;

vector<uint> types;

vector<desc_list_t> pdesc;

bool addVideoPid = true;

bool found_audio_already = false;

for (uint i = 0; i < _input_pmt->StreamCount(); i++)

{

desc_list_t desc = MPEGDescriptor::ParseAndExclude(

_input_pmt->StreamInfo(i), _input_pmt->StreamInfoLength(i),

DescriptorID::conditional_access);

uint type = StreamID::Normalize(_input_pmt->StreamType(i), desc);

// Filter out streams not used for basic television

if (_recording_type == "tv" &&

!StreamID::IsAudio(type) &&

!StreamID::IsVideo(type) &&

!MPEGDescriptor::Find(desc, DescriptorID::teletext) &&

!MPEGDescriptor::Find(desc, DescriptorID::subtitling))

{

continue;

}

uint pid = _input_pmt->StreamPID(i);

if (_recording_type == "tv" &&

StreamID::IsAudio(type) &&

found_audio_already )

{

printf("Steves strict audio Discarding audio stream with pid
%d\n",_input_pmt->StreamPID(i));

continue;

}

if ( StreamID::IsAudio(type) )

{

printf("Steves strict audio. Using audio stream with pid
%d\n",_input_pmt->StreamPID(i));

found_audio_already = true;

}

pdesc.push_back(desc);

pids.push_back(pid);

types.push_back(type);

if (pid == _dummy_output_video_pid)

addVideoPid = false;

}

if (addVideoPid)

{

desc_list_t dummy;

pdesc.push_back(dummy);

pids.push_back(_dummy_output_video_pid);

types.push_back(StreamID::MPEG2Video);

}

// Create the PMT

ProgramMapTable *pmt = ProgramMapTable::Create(

programNumber, _pmt_pid, _input_pmt->PCRPID(),

_next_pmt_version, gdesc,

pids, types, pdesc);

// Set the continuity counter...

if (_pmt)

{

uint cc = (_pmt->tsheader()->ContinuityCounter()+1) & 0xf;

pmt->tsheader()->SetContinuityCounter(cc);

}

VERBOSE(VB_RECORD, LOC + "CreatePMT(void) OUTPUT\n\n" +

pmt->toString());

SetOutputPMT(pmt);

}

====================================

I'll leave you guys to figure out what the diff should look like....

Cheers



Steve
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mythtv.org/pipermail/mythtv-users/attachments/20071015/538c7658/attachment.htm 


More information about the mythtv-users mailing list