mplayer调用ffmpeg解码视频流过程
mplayer播放视频硬解码流程
update_video(int *blit_frame)
generate_video_frame(sh_video_t *sh_video, demux_stream_t *d_video) === mplayer:mplayer.c
decode_video(sh_video, start, in_size, drop_frame, pts, NULL); === mplayer:mplayer.c +1822
*decode(sh_video_t *sh, void *data, int len, int flags)
avcodec_decode_video2(avctx, pic, &got_picture, &pkt); === mplayer:libmpcodecs/vd_ffmpeg.c
compat_decode(AVCodecContext *avctx, AVFrame *frame,int *got_frame, const AVPacket *pkt)
avcodec_send_packet(AVCodecContext *avctx, const AVPacket *avpkt)
decode_receive_frame_internal(avctx, avci->buffer_frame);
ret = avctx->codec->receive_frame(avctx, frame);
hantrocodec_receive_frame(AVCodecContext *avctx, AVFrame *frame)
avcodec_receive_frame(avctx, frame);
decode_receive_frame_internal(avctx, avci->buffer_frame);
ret = avctx->codec->receive_frame(avctx, frame);
硬解码接口
if (ret < 0) {
if (ret == AVERROR(EAGAIN) || ret == AVERROR_EOF)
ret = 0;
goto finish;
}