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

音箱厂家东莞网站建设搜索引擎排名规则

音箱厂家东莞网站建设,搜索引擎排名规则,wordpress不能换行,怎么用小皮创建网站建立在上一步,vs已经能够正常调试qt项目,可以实现: 1:qt可以使用mvsc (使用cdb)进行调试。 2:vs已经可以加载qt项目,借助vs进行调试。 本文目标:编译ffmpeg库&#xf…

建立在上一步,vs已经能够正常调试qt项目,可以实现:

1:qt可以使用mvsc (使用cdb)进行调试。

2:vs已经可以加载qt项目,借助vs进行调试。

本文目标:编译ffmpeg库,编译出对应的相关库,使用qt,vs进行调试demo,为研究源码做准备。

windows安装ffmpeg以前整理过们可以参考:音视频windows环境ffmpeg搭建_

本文编译ffmpeg6.0,使调试源码环境能正常进行。

技巧:which.exe cl.exe 可以查看当前生效的执行文件

1:安装MSYS2(提供相关指令类似linux操作系统进行编译,可能windows使用)

参考:使用MSYS的一些经验 - 知乎 (zhihu.com)

可以官网下载:https://www.msys2.org/

建议通过阿⾥云的链接更快速下载:https://mirrors.aliyun.com/msys2/distrib/x86_64/msys2-x86_64-20230318.exe。

2:修改MSYS2的配置和源

安装目录下(D:\software\msys2)msys2_shell.cmd 文件进行修改:

#inherit 代表把当前窗口的环境变量导入给 msys2 的命令行。    把vs窗口继承给msys2
#修改源文件中rem set MSYS2_PATH_TYPE=inherit 为:
set MSYS2_PATH_TYPE=inherit

修改对应文件下的源,在文件开头增加:

#D:\software\msys2\etc\pacman.d\mirrorlist.mingw32 中
Server = https://mirrors.tuna.tsinghua.edu.cn/msys2/mingw/i686/
Server = http://mirrors.ustc.edu.cn/msys2/mingw/i686/#D:\software\msys2\etc\pacman.d\mirrorlist.mingw64  中
Server = https://mirrors.tuna.tsinghua.edu.cn/msys2/mingw/x86_64/
Server = http://mirrors.ustc.edu.cn/msys2/mingw/x86_64/#D:\software\msys2\etc\pacman.d\mirrorlist.msys  中
Server = https://mirrors.tuna.tsinghua.edu.cn/msys2/msys/$arch/
Server = http://mirrors.ustc.edu.cn/msys2/msys/$arch/

修改验证方式:

# 在D:\software\msys2\etcpacman.conf中
#大概40行位置   作用是修改源后,屏蔽签名SigLevel = Never
#SigLevel    = Required
#LocalFileSigLevel = Optional
#RemoteFileSigLevel = Required

3:使用msys2安装基础组件

1:这里要基于vs2019进行调试,所以编译时基于vs2019启动msys2.

===》在启动项中visual studio 2019 目录下,以管理员身份启动命令行窗口(x64 Native Tools Command Prompt for VS 2019 )

-----------》用vs启动msys2,加上上面配置过,则msys2继承vs2019的环境变量了。

===》跳转到对应msys2安装目录下,启动

D:\software\msys2>doskey /HISTORY
D:
cd  msys2
msys2_shell.cmd -mingw64   #启动对应指令#如果要打开msys2的msys窗⼝
#msys2_shell.cmd

===》启动对应的msys2窗口,只想相关的安装指令:

#刷新软件包数据
pacman -Sy
#安装编译环境:pacman -S mingw-w64-x86_64-toolchainpacman -S gitpacman -S makepacman -S automakepacman -S autoconfpacman -S perlpacman -S libtoolpacman -S mingw-w64-x86_64-cmake    #注意这里安装的是x64的cmakepacman -S pkg-configpacman -S mingw-w64-x86_64-SDL2     #安装SDL 这里是mingw 使用时支持 vs要支持需要安装vc版,下面安装
#安装一些编译需要依赖的库  pacman -S yasmpacman -S nasm

===》修改msys2窗口支持中文显示:

窗⼝右键->Options->Text,然后locale选择:zh_CN,Character set 选择 UTF-8。

4:用msys2源码编译安装第三方库。

1:libx264

要求编译ffmpeg时配置:–enable-gpl --enable-libx264.

cd ~
mkdir ffmpeg6.0_sources
cd ffmpeg6.0_sources/
git clone --depth 1 https://github.com/mirror/x264.git
cd x264/
CC=cl ./configure --enable-shared
make
make install
cp /usr/local/lib/libx264.dll.lib /usr/local/lib/libx264.lib#需要有/usr/local/lib/pkgconfig/x264.pc 文件 改成:
prefix=/usr/local
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/includeName: x264
Description: H.264 (MPEG4 AVC) encoder library
Version: 0.164.x
Libs: -L${exec_prefix}/lib -lx264 
Libs.private: 
Cflags: -I${prefix}/include -DX264_API_IMPORTS

2:libx265

要求编译ffmpeg时配置:–enable-gpl --enable-libx265.

#libx265编译比较特殊 编译脚本文件是vs调用makefile文件,并且要用nmake进行编译
#注释掉 msys2本身的cmake
mv /mingw64/bin/cmake.exe /mingw64/bin/ccmake.exe
#进行编译
cd ffmpeg6.0_sources/
git clone https://gitee.com/mirrors_videolan/x265.git
cd x265/build/msys-cl/
#进行编译
./make-Makefiles.sh#拷贝相关目标文件 及配置
cp x265.exe libx265.dll /usr/local/bin/
cp libx265.lib /usr/local/lib/x265.lib
cp x265-static.lib /usr/local/lib/
cp x265_config.h /usr/local/include/
cp ../../source/x265.h /usr/local/include/
cp x265.pc /usr/local/lib/pkgconfig/#需要修改/usr/local/lib/pkgconfig/x265.pc 文件 改成:
prefix=/usr/local

3:libfdk-aac

要求编译ffmpeg时配置:–enable-libfdk-aac ( 如果你已经配置了 --enable-gpl则需要加上-- enable-nonfree).

cd  ffmpeg6.0_sources/
#下载网络问题 就多试几次
git clone https://github.com/mstorsjo/fdk-aac.git fdk-aac-2.0.1
cd fdk-aac-2.0.1/
git checkout v2.0.1
#注释掉msys2的link 要用vs2019的link
mv /usr/bin/link.exe /usr/bin/link-bk.exe
which.exe link  #可以多看看
#编译和安装
nmake -f Makefile.vc all
nmake -f Makefile.vc prefix=/usr/local install
#恢复link
mv /usr/bin/link-bk.exe /usr/bin/link.exe#需要新增 /usr/local/lib/pkgconfig/fdk-aac.pc 文件 增加
prefix=/usr/local
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
Name: Fraunhofer FDK AAC Codec Library
Description: AAC codec library
Version: 2.0.1
Libs: -L${libdir} -lfdk-aac
Libs.private:
Cflags: -I${includedir}

4:安装SDL2(msvc支持,需要安装vc版本)

ffmpeg需要配置支持: --enable-sdl2

安装路径:Release 2.26.5 · libsdl-org/SDL · GitHub

下载对应的包:SDL2-devel-2.26.5-VC.zip

#下载后解压对应的包后。 拷贝头文件和lib文件
#把SDL2目录下的include目录 拷贝到msys2安装目录下 \usr\local\include目录下,并把文件夹改为SDL2
#把SDL2目录下的lib/x64下相关lib拷贝到 \usr\local\lib目录下#需要配置sdl2的环境变量,使sdl2可以被系统识别到
export INCLUDE=$INCLUDE";D:\software\msys2\usr\local\include\SDL2"
export LIB=$LIB";D:\software\msys2\usr\local\lib"
#查看
echo $LIB#同样需要配置/usr/local/lib/pkgconfig/sdl2.pc 编辑如下:
prefix==/usr/local
exec_prefix=${prefix}
libdir=${prefix}/lib
includedir=${prefix}/include
Name: sdl2
Description: Simple DirectMedia Layer is a cross-platform multimedia libra
ry designed to provide low level access to audio, keyboard, mouse, joystic
k, 3D hardware via OpenGL, and 2D video framebuffer.
Version: 2.26.5
Requires:
Conflicts:
Libs: -L${libdir} -lSDL2main -lSDL2
Cflags: -I${includedir}

在这里插入图片描述

拷贝lib参考:
在这里插入图片描述

5:源码安装ffmpeg6.0 (6.0还有一些报错,日志相关,先屏蔽后)

cd ffmpeg6.0_sources/
git clone https://github.com/FFmpeg/FFmpeg.git
cd FFmpeg/
git checkout remotes/origin/release/6.0
cd ../
cp -arf FFmpeg ffmpeg6.0
cd ffmpeg6.0/
CC=cl.exe PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/ ./configure --toolchain=msvc --enable-shared --enable-ffplay --enable-libx264 --enable-libx265 --enable-libfdk-aac --enable-sdl2 --enable-gpl --enable-nonfree --disable-optimizations --disable-stripping
mv /usr/bin/link.exe /usr/bin/link.exe.bk
which link  #这里直接用vs的link编译了
make -j24   #这里编译有报错,日志相关的直接注释掉就好,暂不关注  但是测试时日志显示不全#这里还有一个编码的警告  c4828,应该需要修改编码格式,但是暂时没处理
make install#进行测试:
ffplay.exe http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4
ffplay.exe http://mirror.aarnet.edu.au/pub/TED-talks/911Mothers_2010W-480p.mp4

5:qt项目进行调试

ffmpeg以及相关依赖都已经安装成功,使用qt调用进行调试。

===》这里目的时可以debug ffmpeg api内部源码,用vs2019+qt插件+MSCV。

===》qt+mingGw 无法调试ffmpeg api内部源码

===》建立在上述ffmpeg编译时,没有进行编译优化。

1:使用qt新建一个项目(c/c++)

c项目:

#include <stdio.h>
#include "libavutil/avutil.h"
int main()
{printf("hello ffmpeg version is: %s \n",av_version_info());return 0;
}

c++项目注意,头文件的包含

#include <iostraem>
// 包含ffmpeg头⽂件
#ifdef __cplusplus //⽽这⼀部分就是告诉编译器,如果定义了__cplusplus(即如果是cpp⽂件,
extern "C"{
#include "libavutil/avutil.h"
#endif
#ifdef __cplusplus
}
#endif
int main()
{ 
std::cout << Hello FFMPEG, version is " << av_version_info() << std::end
l; 
return 0;
}

注意在对应的.pro文件中增加头文件和lib文件识别:

#win32代表了是windows上执行   $$PWD代表项目目录本身。
win32 {
INCLUDEPATH += $$PWD/ffmpeg6.0\include
LIBS += $$PWD/ffmpeg6.0/lib/avformat.lib \$$PWD/ffmpeg6.0/lib/avcodec.lib \$$PWD/ffmpeg6.0/lib/avdevice.lib \$$PWD/ffmpeg6.0/lib/avfilter.lib \$$PWD/ffmpeg6.0/lib/avutil.lib \$$PWD/ffmpeg6.0/lib/postproc.lib \$$PWD/ffmpeg6.0/lib/swresample.lib \$$PWD/ffmpeg6.0/lib/swscale.lib
}

====》拷贝对应的头文件和lib到对应目录下(这里应该可以配置成死目录):

这里直接拷贝msys2目录下 /usr下的local目录到项目目录,然后修改文件夹local为ffmpeg6.0

=====》编译时报找不到对应的lib

对目录进行修改:把目录下bin目录中对应avformat.lib等lib文件拷贝到lib目录下

=====》进行编译,报错The CDB process terminated,在相关的环境都安装正常场景下,该问题是运行第三方库的问题。

拷贝对应的dll文件到构建后生成的项目文件夹下,再次调试ok。

2:使用vs加载qt项目进行尝试。

启动vs2019并不加载项目,在**扩展---->QT VS Tools–>Open Qt Project(.pro)**加载qt项目。

加载完成后,会在对应的qt项目下生成相关vs的项目文件,以vcxproj结尾。

用vs2019加载vcxproj项目文件,即可以在vs2019中调试我们的项目。

总结:

1:调试环境搭建比较繁琐,需要注意细节,第一个demo调试程序要运行ok。

2:使用msys2进行ffmpeg源码,需要注意相关库的编译,pkgconfig中配置,编译时用到的cmake,link,以及最终生成的lb,头文件,以及可执行文件目录位置,以及需要配置环境变量。

3:需要注意qt配置文件中,相关头文件,依赖lib文件,运行时需要的dll文件的拷贝。

4:vs2019也可以直接创建qt项目,但是相关的各种依赖配置比较复杂和繁琐,加载qt项目会直接转换过去,同时需要研究vs中加载运行参数方法。

5:项目中相关的头文件依赖,运行时依赖,可以配置在环境变量中方便多个项目的测试(先在本目录下查,再依次在环境变量目录中搜索)


文章转载自:
http://gigahertz.c7624.cn
http://sheeney.c7624.cn
http://pommel.c7624.cn
http://lacerated.c7624.cn
http://psychotherapeutics.c7624.cn
http://firestone.c7624.cn
http://shant.c7624.cn
http://nonmoral.c7624.cn
http://charity.c7624.cn
http://swill.c7624.cn
http://flashcube.c7624.cn
http://muttnik.c7624.cn
http://heteropathy.c7624.cn
http://tokio.c7624.cn
http://coccolith.c7624.cn
http://celery.c7624.cn
http://chained.c7624.cn
http://incrossbred.c7624.cn
http://map.c7624.cn
http://undertook.c7624.cn
http://quaestor.c7624.cn
http://coupe.c7624.cn
http://prediction.c7624.cn
http://undetachable.c7624.cn
http://hindoo.c7624.cn
http://soterial.c7624.cn
http://mazout.c7624.cn
http://languorous.c7624.cn
http://valve.c7624.cn
http://gardenless.c7624.cn
http://fuller.c7624.cn
http://newt.c7624.cn
http://cimeliarch.c7624.cn
http://corsac.c7624.cn
http://fulgent.c7624.cn
http://hussif.c7624.cn
http://tavel.c7624.cn
http://orientalise.c7624.cn
http://pna.c7624.cn
http://teleprocessing.c7624.cn
http://synapse.c7624.cn
http://sneaking.c7624.cn
http://pulque.c7624.cn
http://burnable.c7624.cn
http://dogcart.c7624.cn
http://relight.c7624.cn
http://antimalarial.c7624.cn
http://platinoid.c7624.cn
http://akkadian.c7624.cn
http://shantung.c7624.cn
http://depressed.c7624.cn
http://wax.c7624.cn
http://saceur.c7624.cn
http://gilthead.c7624.cn
http://venesection.c7624.cn
http://sinusitis.c7624.cn
http://frontcourt.c7624.cn
http://aegis.c7624.cn
http://inefficiency.c7624.cn
http://inundation.c7624.cn
http://mellifluous.c7624.cn
http://sculpsit.c7624.cn
http://clyster.c7624.cn
http://protend.c7624.cn
http://clomp.c7624.cn
http://preexilian.c7624.cn
http://sober.c7624.cn
http://reposal.c7624.cn
http://nonaerosol.c7624.cn
http://cutdown.c7624.cn
http://malapert.c7624.cn
http://nylghai.c7624.cn
http://centennially.c7624.cn
http://vertebra.c7624.cn
http://anchorage.c7624.cn
http://absquatulation.c7624.cn
http://mohair.c7624.cn
http://jurimetrics.c7624.cn
http://boleyn.c7624.cn
http://flaked.c7624.cn
http://graft.c7624.cn
http://manganiferous.c7624.cn
http://bewildering.c7624.cn
http://licit.c7624.cn
http://palmist.c7624.cn
http://combine.c7624.cn
http://hepatogenic.c7624.cn
http://realization.c7624.cn
http://agglutinogen.c7624.cn
http://dispope.c7624.cn
http://chilidog.c7624.cn
http://semideaf.c7624.cn
http://coagulator.c7624.cn
http://bearskinned.c7624.cn
http://granuloblast.c7624.cn
http://tannate.c7624.cn
http://wud.c7624.cn
http://dissolving.c7624.cn
http://tenorist.c7624.cn
http://guipure.c7624.cn
http://www.zhongyajixie.com/news/73089.html

相关文章:

  • 网站怎么做二维码链接地址什么是搜索引擎推广
  • 局网站建设情况大连seo网站推广
  • 承接网站建设广告语百度知道一下首页
  • 做那种英文网站有流量seo专员是指什么意思
  • 济南网站建设用途seo排名优化app
  • 政府网站平台安全建设方案百度快照怎么做
  • 免费做网站tk四川聚顺成网络科技有限公司
  • 有哪些做海报的网站链接下载
  • 找人做网站骗局网址seo优化排名
  • 怎么利用代码做网站seo没什么作用了
  • 临沧网站建设郑州网站营销推广公司
  • 哪个企业做网站艺考培训
  • 石龙仿做网站今天重大新闻头条
  • 江苏省现代化示范校建设网站百度公司
  • 番禺人才市场档案中心公司优化是什么意思
  • 网站开发学习什么站长是什么级别
  • 福建平潭建设局网站长沙百度开户
  • 关于购物网站开发的开题报告精准营销
  • 百度网站的优势网络推广网站
  • 旅行社网站建设需求分析企业查询官网
  • wordpress数据库导入插件合肥建站公司seo
  • 苏州家政保洁公司哪家好合肥seo整站优化网站
  • 清远网站建设推广淘宝运营培训班
  • 网站建设华科技公司以图搜图百度识图
  • 比价网站怎么做的seo专业优化方法
  • 上海做网站的公司电话seo是什么意思电商
  • 西宁微网站建设多少钱深圳企业网站制作公司
  • 四川短视频seo优化网站深圳百度推广关键词推广
  • 深圳网站建设价格多少设计公司网站
  • 织梦网站需要付费吗2024年重大政治时事汇总