FFmpeg
Functions | Variables
extract_mvs.c File Reference
#include <libavutil/motion_vector.h>
#include <libavcodec/avcodec.h>
#include <libavformat/avformat.h>

Go to the source code of this file.

Functions

static int decode_packet (const AVPacket *pkt)
 
static int open_codec_context (AVFormatContext *fmt_ctx, enum AVMediaType type)
 
int main (int argc, char **argv)
 

Variables

static AVFormatContextfmt_ctx = NULL
 
static AVCodecContextvideo_dec_ctx = NULL
 
static AVStreamvideo_stream = NULL
 
static const char * src_filename = NULL
 
static int video_stream_idx = -1
 
static AVFrameframe = NULL
 
static int video_frame_count = 0
 

Function Documentation

◆ decode_packet()

static int decode_packet ( const AVPacket pkt)
static
Examples
extract_mvs.c.

Definition at line 45 of file extract_mvs.c.

Referenced by main().

◆ open_codec_context()

static int open_codec_context ( AVFormatContext fmt_ctx,
enum AVMediaType  type 
)
static
Examples
extract_mvs.c.

Definition at line 86 of file extract_mvs.c.

Referenced by main().

◆ main()

int main ( int  argc,
char **  argv 
)
Examples
extract_mvs.c.

Definition at line 133 of file extract_mvs.c.

Variable Documentation

◆ fmt_ctx

AVFormatContext* fmt_ctx = NULL
static
Examples
extract_mvs.c.

Definition at line 36 of file extract_mvs.c.

Referenced by main(), and open_codec_context().

◆ video_dec_ctx

AVCodecContext* video_dec_ctx = NULL
static
Examples
extract_mvs.c.

Definition at line 37 of file extract_mvs.c.

Referenced by decode_packet(), main(), and open_codec_context().

◆ video_stream

AVStream* video_stream = NULL
static
Examples
extract_mvs.c.

Definition at line 38 of file extract_mvs.c.

Referenced by main(), and open_codec_context().

◆ src_filename

const char* src_filename = NULL
static
Examples
extract_mvs.c.

Definition at line 39 of file extract_mvs.c.

Referenced by main(), and open_codec_context().

◆ video_stream_idx

int video_stream_idx = -1
static
Examples
extract_mvs.c.

Definition at line 41 of file extract_mvs.c.

Referenced by main(), and open_codec_context().

◆ frame

AVFrame* frame = NULL
static
Examples
extract_mvs.c.

Definition at line 42 of file extract_mvs.c.

Referenced by decode_packet(), and main().

◆ video_frame_count

int video_frame_count = 0
static
Examples
extract_mvs.c.

Definition at line 43 of file extract_mvs.c.

Referenced by decode_packet().