[FFmpeg-devel] FFmpeg internal API: access to encoder private options
Dmitry Samonenko
shreddingwork at gmail.com
Sat Oct 6 10:29:33 CEST 2012
Hello.
Some of the FFmpeg encoders specify options which can adjust it's
operation slightly - most of the time turning optional or legacy
features on.
For example, libspeex encoder supports several options turning
on some of it's rich features set. As far as I understand code, all
options defined for the encoder are parsed and stored in encoder
context struct - LibSpeexEncContext (for libspeexenc case), which,
on the other hand, is the priv_data field of AVCodecContext struct.
So, is there a way using AVOption API (may I call it like that?) to access
these options?
I'm asking this because I'm working on a patch for SDP with speex payload
and RFC states that some of the params must be present only when encoder
is configured with particular feature(-s). Function that does SDP
populating is issued with AVFormatContext and AVCodecContext. Please,
correct me if I am wrong, but encoder options are not present in AVCodecContext.
I tried to find a similar case when AVFormat "layer" needs to check some
of the encoder options, but had no luck.
Personally, I think casting AVCodecContext->priv_data to LibSpeexEncContext
during this func would be a huge mistake.
So, an advise on how to proceed would be much appreciated.
More information about the ffmpeg-devel
mailing list