[FFmpeg-devel] [PATCH]pes packetizer

Baptiste Coudurier baptiste.coudurier
Sat Sep 1 00:02:40 CEST 2007


Hi guys,

M?ns Rullg?rd wrote:
> Michael Niedermayer <michaelni at gmx.at> writes:
> 
> 
>>>>> typedef struct {
>>>>>-    AVFifoBuffer fifo;
>>>>>+    PESStream pes_stream;
>>>>>     uint8_t id;
>>>>>-    int max_buffer_size; /* in bytes */
>>>>>-    int buffer_index;
>>>>>-    PacketDesc *predecode_packet;
>>>>>-    PacketDesc *premux_packet;
>>>>>-    PacketDesc **next_packet;
>>>>>     int packet_number;
>>>>>     uint8_t lpcm_header[3];
>>>>>     int lpcm_align;
>>>>
>>>>is the lpcm stuff mpeg-PS specific? if not then it does belong in
>>>>the PES stuff
>>>
>>>The PCM stuff is DVD-specific.  IMHO extensions to the MPEG formats
>>>like DVD and DVB should be explicitly marked as extensions and only
>>>enabled when specifically requested.  We'd probably need a new way of
>>>signalling this information though.
>>
>>yes agree, though for the moment i think we can leave it as it was
>>in the patch
> 
> 
> Yes of course.  I was merely thinking ahead a little.

Considering lpcm muxing in PS is currently somewhat broken, it does not
make a big difference ;)

>>>>>+/**
>>>>>+ * muxer type for PES
>>>>>+ */
>>>>>+typedef enum {
>>>>>+    PESMUXER_PS,
>>>>>+    PESMUXER_TS,
>>>>>+    PESMUXER_PES
>>>>>+} PESMuxerType;
>>>>>+
>>>>
>>>>the PES muxer should not need to know in what container the PES stream
>>>>will be embeded
>>>
>>>There are a few subtle differences.  For instance, video PES packets
>>>with unspecified (coded zero) length are allowed in TS.
>>
>>do these make sense for us? or can we just make a PES stream which works
>>in PS as well as TS?
> 
> 
> Of course we could, but that might restrict some functionality in the
> PS or TS muxers.  I can't think of a good example off the top of my
> head though.

Current PS muxer use P-STD buffer flag in PES, that must not be done for
TS, that's why it is used.

>>>>also i think it would be cleaner to split the PES muxer into a proper
>>>>AVOutputFormat
>>>
>>>Isn't the PES packetiser just an intermediate stage common to MPEG PS
>>>and TS?  How will the PS and TS muxers make use of it if it is a full
>>>AVOutputFormat?
>>
>>call AVOutputFormat.write_packet() instead of ff_pes_blah()
>>anyway this was just an idea, if its feasable, maybe its not
> 
> 
> That won't work.  The TS muxer needs to chop up the PES packets into
> TS packets.
> 
> 
>>btw, do you want to take over the mpegts muxer reviews? :)
>>i would be very happy if you did, you know more about mpeg-ps/ts than
>>i do

Im extensively testing the current soc ts muxer, and Im making sure it
is specs compliant. First patches should be PES muxing code extraction only.

> I'm afraid I might not have time to do a good job of it.  Feel free to
> ask me questions though.

Nice. I have a few questions to ask you ;)

-- 
Baptiste COUDURIER                              GnuPG Key Id: 0x5C1ABAAA
SMARTJOG S.A.                                    http://www.smartjog.com
Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
Phone: +33 1 49966312




More information about the ffmpeg-devel mailing list