[mythtv] [PATCH] DVB fixes

Kenneth Aafløy ke-aa at frisurf.no
Sat Dec 20 22:44:40 EST 2003


Hi!

> On 12/21/2003 at 3:32 AM Kenneth Aafløy wrote:
>>
>>But none of those had a cam attached, right?
>>
>>The problem is that the cam is sent a program map table,
>>which I have to wait for in dvbcam. This will then skip
>>some content in the stream, because the cam won't let
>>data through untill it knows what to decode, and has
>>verified the card ws stream content.
>>
>>I'm also pretty sure that all info in the PS is contained
>>in the TS packets, and not generated by libdvbdev. Because
>>TS is merely a wrapper for the PS, which just needs unpacking.
> 
> You're right, I'm not running with a CAM. What you do is to 
> fix the dvbrecorder.cpp and enable the wait_for_seqstart. 
> Without CAM, the you don't need the wait_for_seqstart.
>
> Please change the default for wait_for_seqstart to true and 
> please commit these changes because some of them do fix a 
> couple of crashes.

Yea, this makes sense, and for a later todo item:

Maybe something more close to what is in ctools.c:seek_mpg_start
should be implemented in dvbrecorder.cpp, instead of the simple
stuff that is in there right now.

>>Nothing audio/video related is stored in 1ba (pack_start), 
>>it's stored in a program map with startcode 1bc (look at 
>>libavformat/mpeg.c). It's merely an indicator of the
>>start of a group of packets, iirc.
> 
> The muxrate is necessary and it's calculated from the video 
> and audio data. This has to do more with avsync and the 
> timing model of MPEG. Please note that some players and some 
> implementation don't use this.
> 
> The 00 00 01 BA and 00 00 01 BB aren't present in the TS 
> stream. They are currently generated in the libdvbdev. Please 
> look at the code if you don't believe me. This is in ctools.c 
> "cwrite_ps". There is a whole sequence of events that starts 
> in transform.c and will eventually get to "cwrite_ps".

I'm still pretty sure that for each service id there is 1ba contained
in the stream, but the information in this is for the complete
stream, but the library is designed to extract some/all pids
of a serviceid, which requires the headers to be regenerated.
I belive it should be contained in the packet with 'pktbuf[1] & 0x40',
or have gotten filtered away by packet filtering.

I also might be totally wrong about the whole thing, as I'm not
any kind of mpeg expert :)

Also are the static fixes really necessary, wouldn't it be enough
to serialize the send_ipack calls with locks?

And put comments of what you have done at the top, and not in the
middle of the code, please.

Thanks alot for the fixes!

Kenneth




More information about the mythtv-dev mailing list