45#ifndef HWACCEL_LIBAV_COMMON_H
46#define HWACCEL_LIBAV_COMMON_H
54#include <libavcodec/avcodec.h>
55#ifdef HWACC_COMMON_IMPL
56#include <libavutil/hwcontext.h>
89#ifdef HWACC_COMMON_IMPL
96int create_hw_device_ctx(
enum AVHWDeviceType
type, AVBufferRef **device_ref);
106int create_hw_frame_ctx(AVBufferRef *device_ref,
109 enum AVPixelFormat format,
110 enum AVPixelFormat sw_format,
struct video_frame * frame
const char * hw_accel_to_str(enum hw_accel_type type)
enum hw_accel_type hw_accel_from_pixfmt(enum AVPixelFormat)
void hwaccel_state_init(struct hw_accel_state *hwaccel)
Initializes hw_accel_state structure.
enum hw_accel_type hw_accel_from_str(const char *str)
void hwaccel_state_reset(struct hw_accel_state *hwaccel)
Uninitializes existing acceleration and resets hw_accel_state to initial state.
codec_t hw_accel_to_ug_pixfmt(enum hw_accel_type type)
void(* uninit)(struct hw_accel_state *)
Optional uninit function ptr.
AVFrame * tmp_frame
Temporary frame used when copying.
void * ctx
Type depends on hwaccel type.
bool copy
Specifies whether to use the copy mode.
This file contains some common data types.