FFmpeg 被声明为已否决 deprecated(2018 精)
'AVStream::codec': 被声明为已否决:
if(pFormatCtx->streams[i]->codec->codec_type==AVMEDIA_TYPE_VIDEO){
=>
if(pFormatCtx->streams[i]->codecpar->codec_type==AVMEDIA_TYPE_VIDEO){
'AVStream::codec': 被声明为已否决:
pCodecCtx = pFormatCtx->streams[videoindex]->codec;
=>
pCodecCtx = avcodec_alloc_context3(NULL);
avcodec_parameters_to_context(pCodecCtx, pFormatCtx->streams[videoindex]->codecpar);
'avpicture_get_size': 被声明为已否决:
avpicture_get_size(AV_PIX_FMT_YUV420P, pCodecCtx->width, pCodecCtx->height)
=>
#include "libavutil/imgutils.h"
av_image_get_buffer_size(AV_PIX_FMT_YUV420P, pCodecCtx->width, pCodecCtx->height, 1)
'avpicture_fill': 被声明为已否决:
avpicture_fill((AVPicture *)pFrameYUV, out_buffer, AV_PIX_FMT_YUV420P, pCodecCtx->width, pCodecCtx->height);
=>
av_image_fill_arrays(pFrameYUV->data, pFrameYUV->linesize, out_buffer, AV_PIX_FMT_YUV420P, pCodecCtx->width, pCodecCtx->height, 1);
'avcodec_decode_video2': 被声明为已否决:
ret = avcodec_decode_video2(pCodecCtx, pFrame, &got_picture, packet); //got_picture_ptr Zero if no frame could be decompressed
=>
ret = avcodec_send_packet(pCodecCtx, packet);
got_picture = avcodec_receive_frame(pCodecCtx, pFrame); //got_picture = 0 success, a frame was returned
//注意:got_picture含义相反
或者:
if (ret != 0)
{
prinitf("%s/n","error");
return;
}
while( avcodec_receive_frame(aCodecCtx, &frame) == 0){
//读取到一帧音频或者视频
//处理解码后音视频 frame
}
'av_free_packet': 被声明为已否决:
av_free_packet(packet);
=>
av_packet_unref(packet);
if (ret != 0){prinitf("%s/n","error");}
while( avcodec_receive_frame(aCodecCtx, &frame) == 0){
//读取到一帧音频或者视频
//处理解码后音视频 frame
}
FFmpeg 被声明为已否决 deprecated(2018 精)的更多相关文章
- FFmpeg被声明为已否决的解决方案
参考雷神的最简单的打印Hello World的程序: #include <stdio.h> #include <string.h> extern "C" { ...
- [转载] FFmpeg 错误 C4996: ‘avcodec_alloc_frame’: 被声明为已否决 解决方法
在 Visual Studio 2013 下编写 FFmpeg 程序时出错,错误如下: 出错代码如下: 解决方法为:将 avcodec_alloc_frame() 替换为 av_frame_alloc ...
- error C4996: 'GetVersionExW': 被声明为已否决
1.Project Properties > Configuration Properties > C/C++ > General > SDL checks关掉 其他方法:2. ...
- vs2013编译过程中,错误 59 error C4996: 'GetVersionExW': 被声明为已否决
好几次碰到这个错误,必须mark 一下!!!!!Project Properties > Configuration Properties > C/C++ > General > ...
- [已读]JavaScript编程精解
译者汤姆大叔,应该很多人都知道,他写了一系列的关于闭包与作用域理解的文章,但是由于创建了一些我不理解的新名词,我不爱看. <JavaScript编程精解>算是买得比较早的一本书,那会大肆搜 ...
- VS2013 FFmpeg开发环境配置
1.下载ffmpeg包(dll.include.lib) https://ffmpeg.zeranoe.com/builds/ 有3个版本:Static.Shared和Dev St ...
- 视频专家之路【四】:ffmpeg简单实战之获取属性
本文是听了雷宵骅大神的课之后的总结,部分内容借用了其PPT的内容,如有侵权请告知删除. 雷宵骅大神的博客为:https://blog.csdn.net/leixiaohua1020 本节的目的正式开始 ...
- FFMPEG学习----打印视频信息
FFMPEG学习资料少之又少,在此推荐雷神的博客: http://blog.csdn.net/leixiaohua1020 在这里,我们把打印视频里的相关信息作为学习FFMPEG的 Hello Wor ...
- 关于FFmpegInterop项目的编译
如果是从git 上下载的最新版本 FFmpeg,那么打开VS2015编译时会报出一个错误 C4996 'av_free_packet': 被声明为已否决 FFmpegInterop ...
随机推荐
- pandas 之 字符串处理
import numpy as np import pandas as pd Python has long been a popular raw data manipulation language ...
- 李代数E8 的根系 python绘图
安装前需安装依赖:(针对Centos7) yum install -y cairo pip install cairocffi 源代码:https://github.com/neozhaoliang/ ...
- Mac下Mysql配置
安装 http://www.mirrorservice.org/sites/ftp.mysql.com/Downloads/MySQL-5.6/mysql-5.6.41-macos10.13-x86_ ...
- C#常用的图片处理方法-图片剪切、图片压缩、多图合并代码
/// <summary> /// 图片转成圆角方法二 /// </summary> private Bitmap WayTwo(Bitmap bitmap) { //usin ...
- ansible(三)
setup ansible_all_ipv4_addresses # ipv4的所有地址 ansible_all_ipv6_addresses # ipv6的所有地址 ansible_date_tim ...
- adb命令 判断锁屏
通过adb命令获取手机是否锁屏状态,可以通过下面指令:1.adb shell dumpsys window policy |find "isStatusBarKeyguard"2. ...
- 准确率(Accuracy) 精确率(Precision) 与 召回率(Recall)
准确率(Accuracy)—— 针对整个模型 精确率(Precision) 灵敏度(Sensitivity):就是召回率(Recall) 参考:https://blog.csdn.net/Orange ...
- python - 将数据转换成 excl 表格, json 等文件 (dajngo - 打开网页后自动下载)
本篇只讲述怎么用. 具体 tablib 更多详细用法可参考博客 : https://blog.csdn.net/liangyuannao/article/details/41476277 # 不得不 ...
- Tips on C/C++
运算符优先级 !> 算术运算符 > 关系运算符 > (&& ||)> 条件运算符> 赋值运算符 > 逗号运算符 库引用 include &quo ...
- 异常0xc000041d的抛出过程
为了说明这个过程,我们必须写一个示例程序,如下: #include "stdafx.h" #include <tchar.h> #include <stdio.h ...