On 27 September 2012 16:19, Luca Barbato <[email protected]> wrote:
> On 09/28/2012 12:10 AM, Justin Ruggles wrote:
>> On 09/27/2012 05:41 PM, Luca Barbato wrote:
>>> ---
>>>  libavformat/avformat.h | 25 +++++++++++++++++++++++++
>>>  libavformat/output.c   | 43 +++++++++++++++++++++++++++++++++++++++++++
>>>  2 files changed, 68 insertions(+)
>> [...]
>>> @@ -416,7 +431,13 @@ typedef struct AVOutputFormat {
>>>       * data.
>>>       */
>>>      int (*write_packet)(struct AVFormatContext *, AVPacket *pkt);
>>> +
>>>      int (*write_trailer)(struct AVFormatContext *);
>>> +
>>> +    int (*write_trailer2)(struct AVFormatContext *);
>>> +
>>> +    int (*deinit)(struct AVFormatContext *);
>>> +
>>
>> Where are these used?
>
> In the upcoming patches, I'll split mpegts as first.
>
> Usages:
>
> - Quite low latency streaming (you spare some time if you have the muxer
> already configured and ready for your purposes)
> - Segment muxer with h264 and mpegts (and hls once I write the playlist
> code for it)
> - Any other application recycling a muxer more than once.
>

Mentioning this in the commit message would be helpful.

I'm not sure if deprecating write_header entirely is desirable, since
it reduces boilerplate for API users in the common case.

An alternative behavior would be: if init is provided, don't try to
re-initialize inside write_header. (The same goes for deinit/trailer).
Segment muxers or users with specific needs can set init/deinit
themselves.


> lu
> _______________________________________________
> libav-devel mailing list
> [email protected]
> https://lists.libav.org/mailman/listinfo/libav-devel
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to