The process of enabling FFMPEG to open a media set starts with avformat_open_input. Therefore, the importance of this function cannot be ignored.
In this function, FFMPEG is completed:
Initialization of the input/output structure AVIOContext;
The input data protocol, such as RTMP or file, is identified by a scoring mechanism.) 1. Determine the suffix of the file name. 2. Read the data from the file header for comparison;
Use the URLProtocol corresponding to the file protocol with the highest score, and use the function pointer to connect with FFMPEG for non-professional terms );
The rest is to call the URLProtocol function for open and read operations.
The following figure shows the function call relationship diagram obtained by debugging FFMPEG source code through eclipse + MinGW.
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/1952396139-0.jpg "title =" 1363015769_8262.jpg "alt =" 004736527.jpg"/>
It can be seen that all function pointers in the URLProtocol struct are finally called.
This article is from the "leixiao00001020 audio and video technology" blog, please be sure to keep this source http://leixiaohua1020.blog.51cto.com/3974648/1298896