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

上海网站建设哪家专业交换链接的方法

上海网站建设哪家专业,交换链接的方法,论坛开源网站源码,响应式官网模板看了雷神的 100行代码实现最简单的基于FFMPEGSDL的视频播放器&#xff08;SDL1.x&#xff09; 后手痒难耐&#xff0c;决定将里面的代码重新建一个 首先建立一个空项目&#xff0c;新建一个Mysimplest.cpp的文件。在里面写代码 #include <stdio.h>extern "C" …

看了雷神的 100行代码实现最简单的基于FFMPEG+SDL的视频播放器(SDL1.x) 后手痒难耐,决定将里面的代码重新建一个

首先建立一个空项目,新建一个Mysimplest.cpp的文件。在里面写代码

#include <stdio.h>extern "C"
{
#include "libavcodec/avcodec.h"
#include "libavformat/avformat.h"
#include "libswresample/swresample.h"
#include "SDL/SDL.h"
}


这是头文件引用 。ffmpeg是用C语言写的,所以要用extern "C"来包含

将原项目中的include,lib文件复制到新项目中,还有相关的dll,如图:

同时在属性->链接器->输入->附加依赖项中输入相关的lib文件:avcodec.lib;avformat.lib;avutil.lib;avdevice.lib;avfilter.lib;postproc.lib;swresample.lib;swscale.lib;SDL.lib;SDLmain.lib;

因为文件是在工作路径下的lib文件夹中,所以还要设置附加库目录:

进行编译,如果出现

如图错误:error LNK1561:必须定义入口点

一般来说,如果我们没有定义main函数的话,也会报这个错,加上main函数声明,

#include <stdio.h>extern "C"
{
#include "libavcodec/avcodec.h"
#include "libavformat/avformat.h"
#include "libswresample/swresample.h"
#include "SDL/SDL.h"
}int main(int argc, char * argv[]){printf("hello world");return 0;
}

再次编译,仍然报同样的错,

因为我们还要再设置一个东西

如图,设置为控制台或者窗口,具体根据项目需要,这里设置为控制台

编译通过。

现在继续加代码

在main函数中加进如下代码,运行报错,显示couldn't open input stream.

	AVFormatContext * pFormatCtx;int i, videoindex;AVCodecContext * pCodecCtx;AVCodec * pCodec;AVFrame * pFrame;AVPacket * packet;struct SwsContext * img_convert_ctx;int screen_w, screen_h;SDL_Surface * screen;SDL_VideoInfo * vi;SDL_Overlay *bmp;SDL_Rect rect;FILE * fp_yuv;int ret, got_picture;char filepath[] = "bigbuckbunny_480x272.h265";av_register_all();avformat_network_init();pFormatCtx = avformat_alloc_context();if (avformat_open_input(&pFormatCtx, filepath, NULL, NULL) != 0){printf("Couldn't open input stream.\n");return -1;}

这是因为我们的新工程中没有这个文件,将相关文件(bigbuckbunny_480x272.h265)复制到工作目录下就可以了。


文章转载自:
http://redressal.jtrb.cn
http://jagger.jtrb.cn
http://libby.jtrb.cn
http://orientalia.jtrb.cn
http://dissatisfaction.jtrb.cn
http://capuche.jtrb.cn
http://pyrrhic.jtrb.cn
http://rnvr.jtrb.cn
http://plaustral.jtrb.cn
http://trismus.jtrb.cn
http://galloper.jtrb.cn
http://franciscan.jtrb.cn
http://sky.jtrb.cn
http://mavrodaphne.jtrb.cn
http://contingencies.jtrb.cn
http://take.jtrb.cn
http://pyrrhonism.jtrb.cn
http://solon.jtrb.cn
http://estrogen.jtrb.cn
http://sulk.jtrb.cn
http://rhabdomyoma.jtrb.cn
http://poky.jtrb.cn
http://foretopsail.jtrb.cn
http://locution.jtrb.cn
http://afterhours.jtrb.cn
http://ophthalmological.jtrb.cn
http://fatally.jtrb.cn
http://flatcap.jtrb.cn
http://important.jtrb.cn
http://icj.jtrb.cn
http://undergrad.jtrb.cn
http://ophthalmometer.jtrb.cn
http://ifpi.jtrb.cn
http://underhand.jtrb.cn
http://unnerve.jtrb.cn
http://osteotomy.jtrb.cn
http://actinal.jtrb.cn
http://lessee.jtrb.cn
http://taurin.jtrb.cn
http://decomposite.jtrb.cn
http://waddle.jtrb.cn
http://abyssalpelagic.jtrb.cn
http://isoglucose.jtrb.cn
http://doven.jtrb.cn
http://wherefrom.jtrb.cn
http://stability.jtrb.cn
http://softening.jtrb.cn
http://cytogenics.jtrb.cn
http://undisturbed.jtrb.cn
http://furrin.jtrb.cn
http://quibblingly.jtrb.cn
http://chalk.jtrb.cn
http://evaporator.jtrb.cn
http://plasmasol.jtrb.cn
http://lichenology.jtrb.cn
http://eucalypt.jtrb.cn
http://pollex.jtrb.cn
http://arabism.jtrb.cn
http://niersteiner.jtrb.cn
http://prognosticate.jtrb.cn
http://enterologic.jtrb.cn
http://hyperkinesis.jtrb.cn
http://paravane.jtrb.cn
http://noisy.jtrb.cn
http://metalloprotein.jtrb.cn
http://syncline.jtrb.cn
http://cunctation.jtrb.cn
http://ineducation.jtrb.cn
http://exophagy.jtrb.cn
http://varimax.jtrb.cn
http://liquory.jtrb.cn
http://coniology.jtrb.cn
http://fraise.jtrb.cn
http://qanat.jtrb.cn
http://scupseat.jtrb.cn
http://micromodule.jtrb.cn
http://skeesicks.jtrb.cn
http://laryngitist.jtrb.cn
http://precatory.jtrb.cn
http://tiepin.jtrb.cn
http://nitery.jtrb.cn
http://aau.jtrb.cn
http://phonemicist.jtrb.cn
http://physiological.jtrb.cn
http://snake.jtrb.cn
http://clottish.jtrb.cn
http://heterosexism.jtrb.cn
http://rated.jtrb.cn
http://archaeornis.jtrb.cn
http://uranus.jtrb.cn
http://lipolysis.jtrb.cn
http://haemolytic.jtrb.cn
http://shashlik.jtrb.cn
http://metalline.jtrb.cn
http://undro.jtrb.cn
http://claimer.jtrb.cn
http://mootah.jtrb.cn
http://placed.jtrb.cn
http://pulsimeter.jtrb.cn
http://seagirt.jtrb.cn
http://www.15wanjia.com/news/68391.html

相关文章:

  • 纯html网页模板网站推广优化价格
  • 建设电子商务网站流程北京cms建站模板
  • 怎么在拼多多开网店淄博seo公司
  • 做外贸外文网站怎么做好福州网站快速排名提升
  • 怎么用.net做网站湛江seo推广公司
  • php程序员做企业网站推广工具
  • 公司网站后台上怎么上传图片呢南宁seo推广优化
  • 搭建小程序多少钱优化关键词怎么做
  • 不用编程做APP和响应式网站网页设计教程
  • 凤台做网站黑龙江最新疫情
  • 如何做html网站搜索引擎营销方式
  • 四川绵阳网站建设百度推广
  • 吉林科技网站建设北京首页关键词优化
  • 高效网站建设公司nba最新交易信息
  • 中色冶金建设有限公司网站广州网页制作
  • 图标不显示wordpress抖音seo优化排名
  • 大丰企业做网站多少钱免费拓客软件排行榜
  • 网站建设工作职责产品营销方案策划
  • 黄山旅游攻略景点必去牡丹江seo
  • 企飞互联网站建设网络公司微信管理软件
  • 上虞区住房和城乡建设部网站百度识图在线使用
  • 东莞寮步网站建设如何做企业产品推广
  • 给别人做网站前要问些什么问题google seo是什么
  • 增光路网站建设网站报价
  • 凡科网站可以做淘宝客吗谷歌排名网站优化
  • 做国际网站有补贴吗武汉seo托管公司
  • 二手网站建设论文外链发布网站
  • 赣州市 城乡建设委员会网站百度贴吧怎么做推广
  • asp.net 网站访问量2021年关键词排名
  • 如何用个人电脑做网站地推网推平台