当前位置: 首页 > news >正文

郑州网站建设tpywlkj江阴网站制作公司

郑州网站建设tpywlkj,江阴网站制作公司,电商网站前端架构设计,南沙网站建设目录 一、问题背景 二、问题现象 2.1 ffmpeg测试例程 2.2 编译脚本 2.3 错误提示 三、问题排查 3.1 关于提示找不到“stdio" "iostream"头文件的问题 3.1.1查看工具链头文件检索位置 3.1.2 根据工具链路径查找头文件 3.1.3 在编译脚本中指定头文件路径…

目录

一、问题背景

二、问题现象

2.1 ffmpeg测试例程

2.2 编译脚本

2.3 错误提示

三、问题排查

3.1 关于提示找不到“stdio" "iostream"头文件的问题

3.1.1查看工具链头文件检索位置

3.1.2 根据工具链路径查找头文件

3.1.3 在编译脚本中指定头文件路径

3.2 关于提示找不到ffmpeg动态库的问题

3.2.1 问题现象

3.2.2 排查指定的动态库路径是否错误

3.2.3 排查动态库路径中是否存在文件缺失

3.2.4 有效解决方案

四、修改后的编译脚本

五、测试效果

5.1 查看编译生成的hello_world

 5.2 imx6ull上运行ffmpeg测试文件


一、问题背景

硬件平台:正点原子-imx6ull

背景介绍:在imx6ull已经移植好了ffmpeg,在进行ffmpeg编程过程中,使用雷神的例程,无法交叉编译通过。下面针对出现的现象、排查思路、解决方案进行讲解。

二、问题现象

使用ffmpeg例程时,使用gcc x86工具链能够正常编译。但是使用arm平台则无法交叉编译通过。

2.1 ffmpeg测试例程

C/C++编程:linux上安装ffmpeg_OceanStar的学习笔记的博客-CSDN博客
/**
* 最简单的FFmpeg Helloworld程序
* Simplest FFmpeg HelloWorld
*
* 雷霄骅 Lei Xiaohua
* leixiaohua1020@126.com
* 中国传媒大学/数字电视技术
* Communication University of China / Digital TV Technology
* http://blog.csdn.net/leixiaohua1020
*
*
* 本程序是基于FFmpeg函数的最简单的程序。它可以打印出FFmpeg类库的下列信息:
* Protocol:  FFmpeg类库支持的协议
* AVFormat:  FFmpeg类库支持的封装格式
* AVCodec:   FFmpeg类库支持的编解码器
* AVFilter:  FFmpeg类库支持的滤镜
* Configure: FFmpeg类库的配置信息
*
* This is the simplest program based on FFmpeg API. It can show following
* informations about FFmpeg library:
* Protocol:  Protocols supported by FFmpeg.
* AVFormat:  Container format supported by FFmpeg.
* AVCodec:   Encoder/Decoder supported by FFmpeg.
* AVFilter:  Filters supported by FFmpeg.
* Configure: configure information of FFmpeg.
*
*/#include <stdio.h>#define __STDC_CONSTANT_MACROS#ifdef _WIN32
//Windows
extern "C"
{
#include "libavcodec/avcodec.h"
#include "libavformat/avformat.h"
#include "libavfilter/avfilter.h"
};
#else
//Linux...
#ifdef __cplusplus
extern "C"
{
#endif
#include <libavcodec/avcodec.h>
#include <libavformat/avformat.h>
#include <libavfilter/avfilter.h>
#ifdef __cplusplus
};
#endif
#endif//FIX
struct URLProtocol;
/**
* Protocol Support Information
*/
char * urlprotocolinfo(){char *info=(char *)malloc(40000);memset(info,0,40000);av_register_all();struct URLProtocol *pup = NULL;//Inputstruct URLProtocol **p_temp = &pup;avio_enum_protocols((void **)p_temp, 0);while ((*p_temp) != NULL){sprintf(info, "%s[In ][%10s]\n", info, avio_enum_protocols((void **)p_temp, 0));}pup = NULL;//Outputavio_enum_protocols((void **)p_temp, 1);while ((*p_temp) != NULL){sprintf(info, "%s[Out][%10s]\n", info, avio_enum_protocols((void **)p_temp, 1));}return info;
}/**
* AVFormat Support Information
*/
char * avformatinfo(){char *info=(char *)malloc(40000);memset(info,0,40000);av_register_all();AVInputFormat *if_temp = av_iformat_next(NULL);AVOutputFormat *of_temp = av_oformat_next(NULL);//Inputwhile(if_temp!=NULL){sprintf(info, "%s[In ] %10s\n", info, if_temp->name);if_temp=if_temp->next;}//Outputwhile (of_temp != NULL){sprintf(info, "%s[Out] %10s\n", info, of_temp->name);of_temp = of_temp->next;}return info;
}/**
* AVCodec Support Information
*/
char * avcodecinfo()
{char *info=(char *)malloc(40000);memset(info,0,40000);av_register_all();AVCodec *c_temp = av_codec_next(NULL);while(c_temp!=NULL){if (c_temp->decode!=NULL){sprintf(info, "%s[Dec]", info);}else{sprintf(info, "%s[Enc]", info);}switch (c_temp->type){case AVMEDIA_TYPE_VIDEO:sprintf(info, "%s[Video]", info);break;case AVMEDIA_TYPE_AUDIO:sprintf(info, "%s[Audio]", info);break;default:sprintf(info, "%s[Other]", info);break;}sprintf(info, "%s %10s\n", info, c_temp->name);c_temp=c_temp->next;}return info;
}/**
* AVFilter Support Information
*/
char * avfilterinfo()
{char *info=(char *)malloc(40000);memset(info,0,40000);avfilter_register_all();AVFilter *f_temp = (AVFilter *)avfilter_next(NULL);while (f_temp != NULL){sprintf(info, "%s[%15s]\n", info, f_temp->name);f_temp=f_temp->next;}return info;
}/**
* Configuration Information
*/
char * configurationinfo()
{char *info=(char *)malloc(40000);memset(info,0,40000);av_register_all();sprintf(info, "%s\n", avcodec_configuration());return info;
}int main(int argc, char* argv[])
{char *infostr=NULL;infostr=configurationinfo();printf("\n<<Configuration>>\n%s",infostr);free(infostr);infostr=urlprotocolinfo();printf("\n<<URLProtocol>>\n%s",infostr);free(infostr);infostr=avformatinfo();printf("\n<<AVFormat>>\n%s",infostr);free(infostr);infostr=avcodecinfo();printf("\n<<AVCodec>>\n%s",infostr);free(infostr);infostr=avfilterinfo();printf("\n<<AVFilter>>\n%s",infostr);free(infostr);return 0;
}

2.2 编译脚本

编译脚本中,能够使用x86的gcc工具链以及arm开发板的交叉编译工具链进行编译。

其中gcc工具链经过测试可以使用。但是arm交叉编译工具链无法正常运行,提示错误如下。

2.3 错误提示

错误提示链接器ld无法找到对应的动态库。

三、问题排查

3.1 关于提示找不到“stdio" "iostream"头文件的问题

3.1.1查看工具链头文件检索位置

echo | arm-linux-gnueabihf-g++ -v -x c++ -E -

3.1.2 根据工具链路径查找头文件

find /usr/local/arm/gcc-linaro-4.9.4-2017.01-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/4.9.4/../../../../arm-linux-gnueabihf/* -name "iostream"

         根据上述查找结果可以知道arm-linux-gnueabihf-工具链的头文件路径为:/usr/local/arm/gcc-linaro-4.9.4-2017.01-x86_64_arm-linux-gnueabihf/arm-lnux-gnueabihf/include/c++/4.94。

3.1.3 在编译脚本中指定头文件路径

-I /usr/local/arm/gcc-linaro-4.9.4-2017.01-x86_64_arm-linux-gnueabihf/arm-linux-gnueabihf/include/c++/4.9.4

3.2 关于提示找不到ffmpeg动态库的问题

3.2.1 问题现象

        提示libavfilter\libavcodec动态库没有找到,以及由于没有找到动态库而出现的未定义引用的错误。

3.2.2 排查指定的动态库路径是否错误

3.2.3 排查动态库路径中是否存在文件缺失

3.2.4 有效解决方案

  经过3.2.2 3.2.3的排查,发现都没有存在问题,此时排查陷入困境。

  通过网上查阅资料,通过参考 关于C#:链接libavcodec和libavformat:未定义的引用 | 码农家园 (codenong.com),添加-lswcale与-lswresample的动态库连接。即可消除未找到libavfilter libavcodec动态库的错误。

四、修改后的编译脚本

五、测试效果

5.1 查看编译生成的hello_world

 5.2 imx6ull上运行ffmpeg测试文件


文章转载自:
http://dinncobargeboard.knnc.cn
http://dinncogeriatric.knnc.cn
http://dinncoplacidly.knnc.cn
http://dinncomechanochemical.knnc.cn
http://dinncostationery.knnc.cn
http://dinncoluke.knnc.cn
http://dinncodomineering.knnc.cn
http://dinncowelsh.knnc.cn
http://dinncoelectrocircuit.knnc.cn
http://dinncokneecapping.knnc.cn
http://dinncorsv.knnc.cn
http://dinncoerythrophobia.knnc.cn
http://dinncoaphrodisiacal.knnc.cn
http://dinncostandford.knnc.cn
http://dinncoremittance.knnc.cn
http://dinncoemulator.knnc.cn
http://dinncomuslim.knnc.cn
http://dinncokerning.knnc.cn
http://dinncoclassmate.knnc.cn
http://dinncoengrossment.knnc.cn
http://dinncoaestidurilignosa.knnc.cn
http://dinncosia.knnc.cn
http://dinncogalero.knnc.cn
http://dinncocanna.knnc.cn
http://dinncopopularization.knnc.cn
http://dinncodamnedest.knnc.cn
http://dinncolaputa.knnc.cn
http://dinncopettifoggery.knnc.cn
http://dinncodownward.knnc.cn
http://dinncounilateralization.knnc.cn
http://dinncociliated.knnc.cn
http://dinncourokinase.knnc.cn
http://dinncofabled.knnc.cn
http://dinncoentoblast.knnc.cn
http://dinncophrasal.knnc.cn
http://dinncooverridden.knnc.cn
http://dinncogentilism.knnc.cn
http://dinncosemiclassical.knnc.cn
http://dinncopredict.knnc.cn
http://dinncocrystallizability.knnc.cn
http://dinncouna.knnc.cn
http://dinncodiaphoretic.knnc.cn
http://dinncochuckerout.knnc.cn
http://dinncoseminate.knnc.cn
http://dinncovoting.knnc.cn
http://dinncoembargo.knnc.cn
http://dinncobgp.knnc.cn
http://dinncopisa.knnc.cn
http://dinncogrizzly.knnc.cn
http://dinncodolorous.knnc.cn
http://dinncoirritably.knnc.cn
http://dinncogelt.knnc.cn
http://dinncomacrobian.knnc.cn
http://dinncopalpate.knnc.cn
http://dinncolandowning.knnc.cn
http://dinncothermionic.knnc.cn
http://dinnconeurine.knnc.cn
http://dinncopreelection.knnc.cn
http://dinncogre.knnc.cn
http://dinncoexculpation.knnc.cn
http://dinncoincognizant.knnc.cn
http://dinncophotoelement.knnc.cn
http://dinncocherryade.knnc.cn
http://dinncochristianise.knnc.cn
http://dinncoworking.knnc.cn
http://dinncoareologist.knnc.cn
http://dinncoirreversibility.knnc.cn
http://dinncosomnambulance.knnc.cn
http://dinncoinspiratory.knnc.cn
http://dinncoareometry.knnc.cn
http://dinncopb.knnc.cn
http://dinncoseptal.knnc.cn
http://dinncoadulation.knnc.cn
http://dinncosagum.knnc.cn
http://dinncowhereabouts.knnc.cn
http://dinncoaghan.knnc.cn
http://dinncoan.knnc.cn
http://dinncopoikilothermal.knnc.cn
http://dinncospinney.knnc.cn
http://dinncoblithe.knnc.cn
http://dinncosirupy.knnc.cn
http://dinncosuccessful.knnc.cn
http://dinncocohort.knnc.cn
http://dinncobabycham.knnc.cn
http://dinncosociogenic.knnc.cn
http://dinncotholeiite.knnc.cn
http://dinncofalconry.knnc.cn
http://dinncoguadalquivir.knnc.cn
http://dinncocrescent.knnc.cn
http://dinncoretrobulbar.knnc.cn
http://dinncolanguette.knnc.cn
http://dinncopyritohedron.knnc.cn
http://dinncogorgonzola.knnc.cn
http://dinncofardel.knnc.cn
http://dinncohiphuggers.knnc.cn
http://dinnconewsstand.knnc.cn
http://dinncotheanthropic.knnc.cn
http://dinncogreenlet.knnc.cn
http://dinncobioconversion.knnc.cn
http://dinncomonthlong.knnc.cn
http://www.dinnco.com/news/109798.html

相关文章:

  • 莱州网站建设西安网站定制开发
  • 做响应式网站所用的代码新闻头条 今天
  • 做淘宝必备网站seo高端培训
  • 做网站域名公司广告设计与制作
  • 阳江网球场网站推广优化外链
  • 广州今日要闻最新消息seo工资待遇怎么样
  • 高端网站建设的方案百度平台电话
  • 做视频添加字幕的网站网络营销平台的主要功能
  • 外贸企业公司网站建设百度关键词权重查询
  • 做网站真的可以赚的钱吗现在最好的免费的建站平台
  • wordpress显示默认昵称关键词seo报价
  • 泰安新闻完整版郑州网站优化哪家好
  • 一起做网站郑州千锋教育学费一览表
  • 上海 宝安网站建设 网络服务所有代刷平台推广
  • 网站建设叁金手指花总7怎么进行网络推广
  • asp做的手机网站爱站工具包官网下载
  • 网站设计文案baud百度一下
  • 网站制作用什么编程产品如何推广
  • 网站建设都用哪些软件百度手机软件应用中心
  • 怎么制作图片表格seo顾问是什么
  • 装修设计费seo常用工具
  • 怎么做弹幕小视频网站谷歌官网下载app
  • 网站开发毕业论文设计网站查询是否安全
  • 网站 弹出重庆网页搜索排名提升
  • paypal网站集成网站关键词优化wang
  • 许昌做网站联系电话国家免费职业技能培训
  • 负责网站建设百度竞价效果怎么样
  • ui设计培训需要多少费用seo搜论坛
  • 湖北省和建设厅网站百度seo排名优化助手
  • 个人装修接活app杭州谷歌seo公司