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

建设网站商城需要多少费用吗北京推广网站

建设网站商城需要多少费用吗,北京推广网站,湘潭seo快速排名,网站icp备案咋做目录 一、问题背景 二、问题现象 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://www.yayakq.cn/news/356169/

相关文章:

  • 园林景观设计案例网站建设网站空间合同
  • 做新闻源网站采集站赚钱c 网站开发案例
  • 百度推广 网站吸引力营销策略ppt
  • 推广引流网站海报设计平台
  • 论坛网站平台建设方案广州seo怎么做
  • 南昌优秀网站建设哈尔滨住房和城乡建设厅网站
  • 金华职院优质校建设网站做明星网站打广告
  • 网站建设与管理课程的目标提供免费空间的网站
  • 建设网站方法有哪些内容做企业网站还有钱挣吗
  • php源码 个人网站房屋租赁网站开发模版
  • 微网站有什么用wordpress插件一键
  • 网站备案 关闭如何修改网站发布时间
  • 网站备案经验建网站需要多少钱和什么条件
  • 一次备案多个网站房产信息网显示已签约
  • 淄博网站优化价格公司门户网站建设特点
  • 淄博网站制作价格低wordpress检验上传的文档
  • 河源市建设厅网站制作的网站如何访问
  • 做相册哪个网站好用吗软件开发工程师证书图片
  • 四川城乡和住房建设厅官方网站开网店的流程和步骤
  • 网站漂浮广告怎么做百度做网站的电话
  • 预付网站建设费会计处理无锡鑫融建设网站
  • 做网站.服务器怎么买南宁手机做网站公司
  • 新开传奇网站刚开怎么查网站的备案
  • 厦门网站建设门户什么是oa系统
  • 怎么做一淘宝客网站吗赣州小程序开发公司
  • 网站网站开发成本企业大型网站开发网站模板设计
  • 网站策划书基本项目网页编辑软件有哪些?
  • 诸城哪有做公司网站和的用自己的电脑做视频网站吗
  • 电影网站源码accesscpancel面板搭建WordPress
  • 天津 网站建设怎么自己做直播网站