Debugging FFmpeg with Eclipse

Source: Internet
Author: User

1. Install Eclipse

FFmpeg is written in C, so our eclipse needs to install the CDT. On the internet to find a lot of information on how to install the compilation environment, but there are some problems, after the installation is still unable to establish a C + + project. Pit Daddy is, finally found that this step is simply incomparable, a statement can be done:

sudo apt-get install eclipse ECLIPSE-CDT g++

If the g++ has been installed, it can be omitted from the above command.

2. New project in Eclipse

After we have completed installing Eclipse CDT, select File->new->makefile Project with Existing Codes.

In the dialog box that pops up, browse to the directory of the FFmpeg that we compiled earlier, and project name will automatically fill it out for us. Then select Linux GCC in the toolchain for indexer settings. Click OK, and the project is now ready to be built.
Note 1: If FFmpeg was previously compiled in a different directory, you must first build a separate directory in Eclipse's workspace and copy all the contents of the previous directory. If you browse directly to workspace, you will not be able to build the project.
Note 2: The source code directory does not contain Chinese, otherwise eclipse is not recognized, there will be no source could not debug the situation. The safest way to do this is to copy the FFmpeg source code into Eclipse's workspace to compile and debug it to ensure that it is foolproof.

3. Setting Debug parameters

We found the Ffplay_g file in the source directory--binary directory, right-click, select Debug Configuration:

In the pop-up dialog box, double-click the application, select Debug parameters, such as the file to play:

Then apply at debug, you can start debugging.

By default, the breakpoint stops at the first line of the main function, but now the interface shown is Jiangzi:

What about the source code we want? In fact, do a simple operation can: click on the upper right corner of the debug front button and select C + +, you can see the C code.

Four control keys used during commissioning:
? F5: One-step debugging, the function is encountered inside the function, equivalent to the F11 of VS;
? F6: Single-step debugging, the function is skipped, equivalent to the F10 of VS;
? F7: Single-step debugging, jumping out of the current method, equivalent to the shift+f11 in VS;
? F8: Debug the Run program until the first breakpoint, equivalent to the F5 in vs.

This article is from the Linux commune website (www.linuxidc.com) Source Link: http://www.linuxidc.com/Linux/2014-11/109841.htm

Debugging FFmpeg with Eclipse

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.