ffmpeg在iOS上使用 [英] ffmpeg use on iOS

查看:178
本文介绍了ffmpeg在iOS上使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我明白,要在iOS应用程序中使用FFmpeg,您可以使用./configure和make来生成.a文件,您将添加到项目中。

I understand that to use FFmpeg in an iOS app, you use the ./configure and make to generate the .a files, that you will add to the project.

我的问题是,一旦.a文件显示在项目导航器和链接二进制与库部分中,您如何在您的类中实际使用它们?我看到没有框架可用于#导入语句,所以我不知道如何访问类的方法和属性。

My question is, once the .a files show up in the project navigator and in the Link Binary With Libraries section, how do you actually use them in your classes?, I see there is no "framework" to use in an #import statement, so I don't know how to access the classes methods and properties.

推荐答案

你只需要导入头文件(.h)到你的实现(.m)文件并继续。作为示例;

You just have to import header files (.h) in to your implementation (.m) files and continue. As an example ;

#import "avformat.h"

// Some code goes here

    /*
     *   avformat_open_input(AVFormatContext **ps, const char *filename, AVInputFormat *fmt, AVDictionary **options)
     */
    int openInputValue = avformat_open_input(&pFormatCtx, utf8FilePath, inputFormat, nil);
    NSLog(@"%s - %d # openInputValue = %d", __PRETTY_FUNCTION__, __LINE__, openInputValue);

这篇关于ffmpeg在iOS上使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆