[FFmpeg-devel] No header for avformat/hlsenc
Kamaldeep Tumkur
kamaldeep.tumkur at gmail.com
Fri Jan 13 12:34:57 EET 2017
Thanks a lot for explaining this. I do see now that the needed
metadata is being set on the HTTPContext struct in the http protocol
file. For the ffmpeg.c app, AVFormatContext along with a few others
are the only accessible structs through the public headers.
HTTPContext, HLSContext and others are just defined inside their
respective private implementations. AVFormatContext's priv->data also
carries this context in it.
If there are something set in the HTTPContext through av_dict_set and
I wanted to access it inside ffmpeg.c using av_dict_get, what instance
should this be called on? AVFormatContext->priv_data cast as an
HTTPContext? What if I wanted to use AVClass to verify that the class
name and only then proceed with reading the option? Thanks again.
Kamal
On Fri, Jan 13, 2017 at 3:21 PM, wm4 <nfxjfg at googlemail.com> wrote:
> On Fri, 13 Jan 2017 14:35:09 +0530
> Kamaldeep Tumkur <kamaldeep.tumkur at gmail.com> wrote:
>
>> Hi All,
>>
>> I am trying to use the HLSContext struct inside ffmpeg.c, in order to
>> have access to the context's send_buffer_size value. However, the
>> context struct is only defined inside hlsenc.c.
>>
>> Is there a specific reason for hlsenc not to have a header file? Are
>> there any other options I may be missing? Please suggest.
>
> It's not public API, so it doesn't have a public header. ffmpeg.c is
> supposed to use public APIs only.
>
> I don't think there's a precedent of a muxer providing "extra" API via
> additional public structs/functions outside of avcodec.h. But there are
> cases where AVOptions are used to communicate data back and forth an
> implementation. E.g. the HTTP protocol uses an AVOption named
> "metadata" to return certain HTTP headers back to the API user.
>
> Not sure what's the best thing here to do. Either way, it's probably
> going to be slightly unclean. But I'm fairly sure exposing the entire
> HLSContext struct is not a reasonable option.
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
More information about the ffmpeg-devel
mailing list