[FFmpeg-devel] No header for avformat/hlsenc

wm4 nfxjfg at googlemail.com
Fri Jan 13 13:21:30 EET 2017


On Fri, 13 Jan 2017 16:04:57 +0530
Kamaldeep Tumkur <kamaldeep.tumkur at gmail.com> wrote:

> 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.

Via the AVOption API (see libavutil/opt.h).

> HTTPContext, HLSContext and others are just defined inside their
> respective private implementations. AVFormatContext's priv->data also
> carries this context in it.

Variables referenced by AVOptions are indirectly accessible via the
AVOption API.

> 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.

You call the AVOption API on the AVCodecContext pointer. The dictionary
stuff can also be used to set AVOptions, but obviously only in one
direction.

Also, please don't top-post.


More information about the ffmpeg-devel mailing list