FFmpeg deprecated总结整理

PIX_FMT_YUV420P

PIX_FMT_YUV420P -> AV_PIX_FMT_YUV420P

AVStream::codec

pFormatCtx->streams[i]->codec->codec_type 
pFormatCtx->streams[i]->codecpar->codec_type

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);

ret = avcodec_send_packet(pCodecCtx, packet);
got_picture = avcodec_receive_frame(pCodecCtx, pFrame); 

av_free_packet

av_free_packet(packet);

av_packet_unref(packet);

avcodec_decode_audio4

int ret = avcodec_send_packet(aCodecCtx, &pkt);
while( avcodec_receive_frame(aCodecCtx, &frame) == 0) {
}
  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值