Loading...
Searching...
No Matches
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 AVFormatContext * | ifmt_ctx = NULL
static AVFormatContext * | ofmt_ctx = NULL
static AVBufferRef * | hw_device_ctx = NULL
static AVCodecContext * | decoder_ctx = NULL
static AVCodecContext * | encoder_ctx = NULL
static int | video_stream = -1
static AVStream * | ost
static int | initialized = 0

## Function Documentation

## get_vaapi_format()

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()

int open_input_file | ( | const char * | filename | ) |

static

Definition at line 59 of file vaapi_transcode.c.

## encode_write()

int encode_write | ( | AVPacket * | enc_pkt,
|  | AVFrame * | frame )

static

Definition at line 109 of file vaapi_transcode.c.

## dec_enc()

int dec_enc | ( | AVPacket * | pkt,
|  | const AVCodec * | enc_codec )

static

Examples
  qsv_transcode.c, and vaapi_transcode.c.

Definition at line 142 of file vaapi_transcode.c.

Referenced by main().

## main()

int main | ( | int | argc,
|  | char ** | argv )

Definition at line 222 of file vaapi_transcode.c.

## Variable Documentation

## ifmt_ctx

AVFormatContext* ifmt_ctx = NULL

static

Definition at line 38 of file vaapi_transcode.c.

## ofmt_ctx

AVFormatContext * ofmt_ctx = NULL

static

Definition at line 38 of file vaapi_transcode.c.

## hw_device_ctx

AVBufferRef* hw_device_ctx = NULL

static

Definition at line 39 of file vaapi_transcode.c.

## decoder_ctx

AVCodecContext* decoder_ctx = NULL

static

Examples
  hw_decode.c, qsv_decode.c, qsv_transcode.c, and vaapi_transcode.c.

Definition at line 40 of file vaapi_transcode.c.

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

## encoder_ctx

AVCodecContext * encoder_ctx = NULL

static

Examples
  qsv_transcode.c, and vaapi_transcode.c.

Definition at line 40 of file vaapi_transcode.c.

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

## video_stream

int video_stream = -1

static

Definition at line 41 of file vaapi_transcode.c.

## 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(), close_stream(), dec_enc(), dec_enc(), get_audio_frame(), get_video_frame(), open_audio(), open_video(), write_audio_frame(), 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().