[FFmpeg-devel] [PATCH]pes packetizer

Måns Rullgård mans
Wed Jun 27 15:51:22 CEST 2007

Baptiste Coudurier wrote:
> M?ns Rullg?rd wrote:
>> Baptiste Coudurier wrote:
>>> Hi
>>> M?ns Rullg?rd wrote:
>>>> Baptiste Coudurier wrote:
>>>>>> +typedef struct {
>>>>>> +    int is_ps;  /*< whether it is a Program Stream */
>>>>>> +    int packet_number;
>>>>>> +} PESContext;
>>>>> We might have 3 possibilites (PS, TS, PES).
>>>>> An enum is better IMHO.
>>>> Why does it matter what the destination is?  The PES syntax is the
>>>> same in all cases.  The only exception is the unspecified size
>>>> video packets that are allowed in TS.
>>> P-STD buffer flag, P-STD buffer size, which are only needed for Program
>>> Stream, current code writes it atm.
>> They are still allowed for transport streams.  A better approach would be
>> to pass a set of flags selecting which optional features to use.
> I would say not forbidden, yes, values are then not applicable in TS.

Correct.  The fields are allowed but has no defined meaning in TS.  It
could still be useful to set them if you intend to extract the PES
packets and make a program stream without a full remux.

> Im not against a set of flags if it simplifies things of course.

There are other flags as well that one might want to set.  Making
the PES packetiser flexible makes sense to me, even if it initially
is used with fixed settings from the PS and TS muxers.

M?ns Rullg?rd
mans at mansr.com

More information about the ffmpeg-devel mailing list