原来使用sws_scale的yuv转换RGB(基于CPU效率低),替换为使用opengl Shader(基于GPU使用glsl) 添加了全屏播放功能 修正了Seek不到实际位置的问题(h264只能跳转到关键帧),跳转到目标的位置 修正了由于特殊的视频尺寸会造成花屏的情况 (行对齐问题,通过行复制解决) 修正了程序退出时会宕掉的情况(添加线程退出处理) XPla...
--->avcodec_receive_frame avcodec_send_packet发送数据到ffmepg,放到解码队列中 avcodec_receive_frame将成功的解码队列中取出1个frame (如果失败会返回0) avcodec_send_packet后显示ret已经-11 ff_decode_get_packet,再h264_decode_frame(它会根据NAL Unit 的类型进行解码) decode时,2种调用方式,如下:(libavcode...
avcodec_send_frame(); avcodec_receive_packet(); 1. 2. 使用如下两个函数进行解码 , avcodec_send_packet(); avcodec_receive_frame(); 1. 2. 5、AVFilter 库 AVFilter 库 ( libavfilter ) 是 音视频滤镜库 , 该库 提供了一系列用于音视频过滤的功能 音视频滤镜 可以同时设置多个 , 称为 " 滤镜链 ...
AVFrame* av_frame_alloc(void) 分配一个avframe和设置字段的默认值。分配出来的AVFrame必须使用av_frame_free()释放。 avcodec_receive_frame 原型 int avcodec_receive_frame(AVCodecContext *avctx, AVFrame *frame) av_read_pause 原型 int av_read_pause(AVFormatContext *s) 暂停网络流(例如RSTP流),使用av...
ret = avcodec_receive_frame(codecCtx, YUVFrame); if (ret >= 0) { // 4.YUV转BGR24 AVFrame* RGB24Frame = av_frame_alloc(); AVPixelFormat yuvFmt = convertDeprecatedFormat(codecCtx->pix_fmt); struct SwsContext* convertCxt = sws_getContext( ...
AVFrame是包含码流参数较多的结构体 /** * Audio Video Frame. * New fields can be added to the end of AVFRAME with minor version * bumps. Similarly fields that are marked as to be only accessed by * av_opt_ptr() can be reordered. This allows 2 forks to add fields ...
SSIM, MS-SSIM)时,我们首先利用FFmpeg提供的API(avcodec_send_packet(),avcodec_receive_frame())...
const AVRational *supported_framerates; //支持帧率(视频) const enum AVPixelFormat *pix_fmts; //支持像素格式(视频) const int *supported_samplerates; //支持音频采样率(音频) const enum AVSampleFormat *sample_fmts; //支持采样格式(音频)
(ret=avcodec_send_frame(codecCtx,0))>=0){while(avcodec_receive_packet(codecCtx,pkt)>=0){cout<<"encoder success:"<<pkt->size<<endl;pkt->stream_index=vStreamIndex;av_packet_rescale_ts(pkt,codecCtx->time_base,fmtCtx->streams[vStreamIndex]->time_base);ret=av_interleaved_write_frame(...
frame_thread_encoder.c frame_thread_encoder.h fraps.c frwu.c ftr.c ftr_parser.c g2meet.c g722.c g722.h g722dec.c g722dsp.c g722dsp.h g722enc.c g723_1.c g723_1.h g723_1_parser.c g723_1dec.c g723_1enc.c g726.c g729.h g729_parser.c g729data.h g729dec....