FFmpeg  4.0
Functions | Variables
vaapi_encode.c File Reference

Intel VAAPI-accelerated encoding example. More...

#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <libavcodec/avcodec.h>
#include <libavutil/pixdesc.h>
#include <libavutil/hwcontext.h>

Go to the source code of this file.

Functions

static int set_hwframe_ctx (AVCodecContext *ctx, AVBufferRef *hw_device_ctx)
 
static int encode_write (AVCodecContext *avctx, AVFrame *frame, FILE *fout)
 
int main (int argc, char *argv[])
 

Variables

static int width
 
static int height
 
static AVBufferRefhw_device_ctx = NULL
 

Detailed Description

Intel VAAPI-accelerated encoding example.

Definition in file vaapi_encode.c.

Function Documentation

◆ set_hwframe_ctx()

static int set_hwframe_ctx ( AVCodecContext ctx,
AVBufferRef hw_device_ctx 
)
static
Examples:
vaapi_encode.c.

Definition at line 42 of file vaapi_encode.c.

Referenced by main().

◆ encode_write()

static int encode_write ( AVCodecContext avctx,
AVFrame frame,
FILE *  fout 
)
static
Examples:
vaapi_encode.c.

Definition at line 72 of file vaapi_encode.c.

Referenced by main().

◆ main()

int main ( int  argc,
char *  argv[] 
)
Examples:
vaapi_encode.c.

Definition at line 100 of file vaapi_encode.c.

Variable Documentation

◆ width

int width
static

Definition at line 39 of file vaapi_encode.c.

Referenced by main(), and set_hwframe_ctx().

◆ height

int height
static
Examples:
vaapi_encode.c.

Definition at line 39 of file vaapi_encode.c.

Referenced by main(), and set_hwframe_ctx().

◆ hw_device_ctx

AVBufferRef* hw_device_ctx = NULL
static
Examples:
vaapi_encode.c.

Definition at line 40 of file vaapi_encode.c.