[FFmpeg-devel] [PATCH] Add support for private PES streams in mpegts and support for application decoding the stream

Sebastian Cabot scabot
Sat May 30 22:48:13 CEST 2009


Well. It is up to you of course. This is just my contribution to the
development of this great library.

I will try and explain.

First of all it makes another step in fully implementing the mpegts
standard (How important this is I don't know),
Second it allow users to handle the private streams without the need
of manipulating the code of the library itself for every type of
private stream they want to handle.

I can also see further advantages to this mechanism - With little
development it can even be used by users who want replace a default
codec with their own implementation be it for debugging purposes or
whatever without having to change the library too much (but It's not
what I'm suggesting here).

But the bottom line is this: There are many container formats out
there that can multiplex several types of stream of which audio, video
and subtitles are only three. And there are probably more users like
myself who need to properly get the data in these streams synchronized
and available to them in an easy way. I implemented this to support
private data streams we send in mpegts but this mechanism can easily
be ported to avi or mp4 or any other container format.

That's it. Hope this convinces you and others who eventually decide.

Sebastian

On Sat, May 30, 2009 at 11:11 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
> On Sat, May 30, 2009 at 10:42:06PM +0300, Sebastian Cabot wrote:
> [...]
>> @@ -2507,6 +2509,34 @@
>> ? ? ? * - decoding: Set by libavcodec
>> ? ? ? */
>> ? ? ? enum AVChromaLocation chroma_sample_location;
>> +
>> + ? ? /**
>> + ? ? ?* This defines init function to be called by the codec proxy.
>> + ? ? ?* - encoding: Set by user
>> + ? ? ?* - decoding: Set by user
>> + ? ? ?*/
>> + ? ? int (*user_codec_init)(struct AVCodecContext *);
>> +
>> + ? ? /**
>> + ? ? ?* This defines encodeing function to be called by the codec proxy.
>> + ? ? ?* - encoding: Set by user
>> + ? ? ?* - decoding: unused
>> + ? ? ?*/
>> + ? ? int (*user_codec_encode)(struct AVCodecContext *, uint8_t *buf, int buf_size, void *data);
>> +
>> + ? ? /**
>> + ? ? ?* This defines close function to be called by the codec proxy.
>> + ? ? ?* - encoding: Set by user
>> + ? ? ?* - decoding: Set by user
>> + ? ? ?*/
>> + ? ? int (*user_codec_close)(struct AVCodecContext *);
>> +
>> + ? ? /**
>> + ? ? ?* This defines decoding function to be called by the codec proxy.
>> + ? ? ?* - encoding: unused
>> + ? ? ?* - decoding: Set by user
>> + ? ? ?*/
>> + ? ? int (*user_codec_decode)(struct AVCodecContext *, void *outdata, int *outdata_size, AVPacket *avpkt);
>> ?} AVCodecContext;
>>
>> ?/**
>
> iam not sure what this is good for but i very much doubt it is appropriate
>
> [...]
> --
> Michael ? ? GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> The worst form of inequality is to try to make unequal things equal.
> -- Aristotle
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
>
> iD8DBQFKIZLdYR7HhwQLD6sRAiNrAJ9GqW/gya2D/ydr9mWhZB4PSV3I+gCeMrgs
> qPsBdNsAwSXrihZ6ElYEdYI=
> =g0Jt
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at mplayerhq.hu
> https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel
>



More information about the ffmpeg-devel mailing list