Illustration: The function avformat_open_input of FFMPEG to open the media

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.