I am following this code to work with FFmpeg library in C. FFmpeg library has very little documentation and it is difficult to understand what each function exactly does.
I understand the code (what is being done). But I am lacking clarity. Can anyone help me out please?
Q1) A **struct AVFrameContext **** and filename (the minimum non-NULL parameters required) are passed to the function avformat_open_input(). As the name suggests, the input file is 'opened'. How ?
The main things that gets done in file_open are
You can look it up in FFmpeg's libavformat\utils.c
what is really taking place there:
int avformat_open_input(AVFormatContext **ps, const char *filename, AVInputFormat *fmt, AVDictionary **options)
{
AVFormatContext *s = *ps;
int ret = 0;
AVDictionary *tmp = NULL;
ID3v2ExtraMeta *id3v2_extra_meta = NULL;
if (!s && !(s = avformat_alloc_context()))
return AVERROR(ENOMEM);
// on and on
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With