FFmpeg
Data Structures | Functions | Variables
qsv_transcode.c File Reference
#include <stdio.h>
#include <errno.h>
#include <libavutil/hwcontext.h>
#include <libavcodec/avcodec.h>
#include <libavformat/avformat.h>
#include <libavutil/opt.h>

Go to the source code of this file.

Data Structures

struct  DynamicSetting
 

Functions

static int str_to_dict (char *optstr, AVDictionary **opt)
 
static int dynamic_set_parameter (AVCodecContext *avctx)
 
static int get_format (AVCodecContext *avctx, const enum AVPixelFormat *pix_fmts)
 
static int open_input_file (char *filename)
 
static int encode_write (AVPacket *enc_pkt, AVFrame *frame)
 
static int dec_enc (AVPacket *pkt, const AVCodec *enc_codec, char *optstr)
 
int main (int argc, char **argv)
 

Variables

static AVFormatContextifmt_ctx = NULL
 
static AVFormatContextofmt_ctx = NULL
 
static AVBufferRefhw_device_ctx = NULL
 
static AVCodecContextdecoder_ctx = NULL
 
static AVCodecContextencoder_ctx = NULL
 
static int video_stream = -1
 
static DynamicSettingdynamic_setting
 
static int setting_number
 
static int current_setting_number
 

Function Documentation

◆ str_to_dict()

static int str_to_dict ( char *  optstr,
AVDictionary **  opt 
)
static
Examples
qsv_transcode.c.

Definition at line 58 of file qsv_transcode.c.

Referenced by dec_enc(), and dynamic_set_parameter().

◆ dynamic_set_parameter()

static int dynamic_set_parameter ( AVCodecContext avctx)
static
Examples
qsv_transcode.c.

Definition at line 82 of file qsv_transcode.c.

Referenced by encode_write().

◆ get_format()

static int get_format ( AVCodecContext avctx,
const enum AVPixelFormat pix_fmts 
)
static
Examples
qsv_transcode.c.

Definition at line 118 of file qsv_transcode.c.

Referenced by open_input_file().

◆ open_input_file()

static int open_input_file ( char *  filename)
static
Examples
qsv_transcode.c.

Definition at line 133 of file qsv_transcode.c.

Referenced by main().

◆ encode_write()

static int encode_write ( AVPacket enc_pkt,
AVFrame frame 
)
static
Examples
qsv_transcode.c.

Definition at line 211 of file qsv_transcode.c.

Referenced by dec_enc(), and main().

◆ dec_enc()

static int dec_enc ( AVPacket pkt,
const AVCodec enc_codec,
char *  optstr 
)
static
Examples
qsv_transcode.c.

Definition at line 247 of file qsv_transcode.c.

Referenced by main().

◆ main()

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

Definition at line 343 of file qsv_transcode.c.

Variable Documentation

◆ ifmt_ctx

AVFormatContext* ifmt_ctx = NULL
static
Examples
qsv_transcode.c, and remux.c.

Definition at line 45 of file qsv_transcode.c.

Referenced by main(), and open_input_file().

◆ ofmt_ctx

AVFormatContext * ofmt_ctx = NULL
static
Examples
qsv_transcode.c, and remux.c.

Definition at line 45 of file qsv_transcode.c.

Referenced by dec_enc(), encode_write(), and main().

◆ hw_device_ctx

AVBufferRef* hw_device_ctx = NULL
static
Examples
qsv_transcode.c.

Definition at line 46 of file qsv_transcode.c.

Referenced by main(), and open_input_file().

◆ decoder_ctx

AVCodecContext* decoder_ctx = NULL
static
Examples
hw_decode.c, qsv_decode.c, and qsv_transcode.c.

Definition at line 47 of file qsv_transcode.c.

Referenced by dec_enc(), decode_packet(), main(), and open_input_file().

◆ encoder_ctx

AVCodecContext * encoder_ctx = NULL
static
Examples
qsv_transcode.c.

Definition at line 47 of file qsv_transcode.c.

Referenced by dec_enc(), dynamic_set_parameter(), encode_write(), and main().

◆ video_stream

int video_stream = -1
static
Examples
qsv_transcode.c.

Definition at line 48 of file qsv_transcode.c.

Referenced by main(), and open_input_file().

◆ dynamic_setting

DynamicSetting* dynamic_setting
static
Examples
qsv_transcode.c.

Definition at line 54 of file qsv_transcode.c.

Referenced by dynamic_set_parameter(), and main().

◆ setting_number

int setting_number
static
Examples
qsv_transcode.c.

Definition at line 55 of file qsv_transcode.c.

Referenced by dynamic_set_parameter(), and main().

◆ current_setting_number

int current_setting_number
static
Examples
qsv_transcode.c.

Definition at line 56 of file qsv_transcode.c.

Referenced by dynamic_set_parameter(), and main().