[FFmpeg-devel] [PATCH]pes packetizer
Måns Rullgård
mans
Fri Aug 31 22:56:28 CEST 2007
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.
>> >> +/**
>> >> + * 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.
>> > 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
I'm afraid I might not have time to do a good job of it. Feel free to
ask me questions though.
--
M?ns Rullg?rd
mans at mansr.com
More information about the ffmpeg-devel
mailing list