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

Go to the source code of this file.

Functions

static enum AVPixelFormat get_vaapi_format (AVCodecContext *ctx, const enum AVPixelFormat *pix_fmts)
 
static int open_input_file (const char *filename)
 
static int encode_write (AVPacket *enc_pkt, AVFrame *frame)
 
static int dec_enc (AVPacket *pkt, const AVCodec *enc_codec)
 
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 AVStreamost
 
static int initialized = 0
 

Function Documentation

◆ get_vaapi_format()

static enum AVPixelFormat get_vaapi_format ( AVCodecContext ctx,
const enum AVPixelFormat pix_fmts 
)
static
Examples
vaapi_transcode.c.

Definition at line 45 of file vaapi_transcode.c.

Referenced by open_input_file().

◆ open_input_file()

static int open_input_file ( const char *  filename)
static
Examples
vaapi_transcode.c.

Definition at line 59 of file vaapi_transcode.c.

Referenced by main().

◆ encode_write()

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

Definition at line 109 of file vaapi_transcode.c.

Referenced by dec_enc(), and main().

◆ dec_enc()

static int dec_enc ( AVPacket pkt,
const AVCodec enc_codec 
)
static
Examples
vaapi_transcode.c.

Definition at line 142 of file vaapi_transcode.c.

Referenced by main().

◆ main()

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

Definition at line 224 of file vaapi_transcode.c.

Variable Documentation

◆ ifmt_ctx

AVFormatContext* ifmt_ctx = NULL
static
Examples
vaapi_transcode.c.

Definition at line 38 of file vaapi_transcode.c.

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

◆ ofmt_ctx

AVFormatContext * ofmt_ctx = NULL
static
Examples
vaapi_transcode.c.

Definition at line 38 of file vaapi_transcode.c.

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

◆ hw_device_ctx

AVBufferRef* hw_device_ctx = NULL
static
Examples
vaapi_transcode.c.

Definition at line 39 of file vaapi_transcode.c.

Referenced by main(), and open_input_file().

◆ decoder_ctx

AVCodecContext* decoder_ctx = NULL
static
Examples
vaapi_transcode.c.

Definition at line 40 of file vaapi_transcode.c.

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

◆ encoder_ctx

AVCodecContext * encoder_ctx = NULL
static
Examples
vaapi_transcode.c.

Definition at line 40 of file vaapi_transcode.c.

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

◆ video_stream

int video_stream = -1
static
Examples
vaapi_transcode.c.

Definition at line 41 of file vaapi_transcode.c.

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

◆ ost

AVStream* ost
static
Examples
mux.c, qsv_transcode.c, and vaapi_transcode.c.

Definition at line 42 of file vaapi_transcode.c.

Referenced by add_stream(), adjust_frame_pts_to_encoder_tb(), avformat_transfer_internal_stream_timing_info(), bsf_init(), check_keyboard_interaction(), check_output_constraints(), check_recording_time(), check_streamcopy_filters(), choose_encoder(), choose_output(), choose_pix_fmts(), close_output_stream(), close_stream(), configure_filtergraph(), configure_output_audio_filter(), configure_output_video_filter(), copy_meta(), dash_check_bitstream(), dec_enc(), do_audio_out(), do_streamcopy(), do_subtitle_out(), do_video_out(), enc_stats_init(), enc_stats_write(), encode_frame(), flush_encoders(), get_audio_frame(), get_ost_filters(), get_video_frame(), got_eagain(), hw_device_setup_for_encode(), init_encoder_time_base(), init_output_filter(), init_output_stream(), init_output_stream_encode(), init_output_stream_streamcopy(), init_output_stream_wrapper(), init_simple_filtergraph(), ms_from_ost(), mux_check_init(), muxer_thread(), need_output(), new_attachment_stream(), new_audio_stream(), new_data_stream(), new_output_stream(), new_subtitle_stream(), new_unknown_stream(), new_video_stream(), of_add_attachments(), of_add_metadata(), of_open(), of_output_packet(), of_stream_init(), ogg_restore(), ogg_save(), open_audio(), open_video(), ost_free(), print_final_stats(), print_report(), process_forced_keyframes(), process_input(), process_input_packet(), process_subtitle(), queue_packet(), reap_filters(), reset_eagain(), seg_check_bitstream(), set_channel_layout(), set_dispositions(), set_encoder_id(), setup_sync_queues(), submit_encode_frame(), submit_packet(), sync_queue_process(), thread_start(), thread_submit_packet(), transcode(), transcode_init(), transcode_step(), trigger_fix_sub_duration_heartbeat(), update_video_stats(), video_sync_process(), webm_chunk_init(), webm_chunk_write_header(), write_audio_frame(), write_packet(), and write_video_frame().

◆ initialized

int initialized = 0
static
Examples
vaapi_transcode.c.

Definition at line 43 of file vaapi_transcode.c.

Referenced by dec_enc(), and writer_register_all().