FFmpeg
Data Structures | Functions | Variables
hwcontext_mediacodec.c File Reference
#include "config.h"
#include <android/native_window.h>
#include <dlfcn.h>
#include <media/NdkMediaCodec.h>
#include "buffer.h"
#include "common.h"
#include "hwcontext.h"
#include "hwcontext_internal.h"
#include "hwcontext_mediacodec.h"

Go to the source code of this file.

Data Structures

struct  MediaCodecDeviceContext
 

Functions

static int mc_device_create (AVHWDeviceContext *ctx, const char *device, AVDictionary *opts, int flags)
 
static int mc_device_init (AVHWDeviceContext *ctx)
 
static void mc_device_uninit (AVHWDeviceContext *ctx)
 

Variables

const HWContextType ff_hwcontext_type_mediacodec
 

Function Documentation

◆ mc_device_create()

static int mc_device_create ( AVHWDeviceContext ctx,
const char *  device,
AVDictionary opts,
int  flags 
)
static

Definition at line 39 of file hwcontext_mediacodec.c.

◆ mc_device_init()

static int mc_device_init ( AVHWDeviceContext ctx)
static

Definition at line 62 of file hwcontext_mediacodec.c.

◆ mc_device_uninit()

static void mc_device_uninit ( AVHWDeviceContext ctx)
static

Definition at line 92 of file hwcontext_mediacodec.c.

Variable Documentation

◆ ff_hwcontext_type_mediacodec

const HWContextType ff_hwcontext_type_mediacodec
Initial value:
= {
.name = "mediacodec",
.device_hwctx_size = sizeof(MediaCodecDeviceContext),
.device_create = mc_device_create,
.device_uninit = mc_device_uninit,
.pix_fmts = (const enum AVPixelFormat[]){
},
}

Definition at line 107 of file hwcontext_mediacodec.c.

AVPixelFormat
AVPixelFormat
Pixel format.
Definition: pixfmt.h:71
mc_device_create
static int mc_device_create(AVHWDeviceContext *ctx, const char *device, AVDictionary *opts, int flags)
Definition: hwcontext_mediacodec.c:39
AV_HWDEVICE_TYPE_MEDIACODEC
@ AV_HWDEVICE_TYPE_MEDIACODEC
Definition: hwcontext.h:38
device_init
static int device_init(AVFormatContext *ctx, int *width, int *height, uint32_t pixelformat)
Definition: v4l2.c:204
pix_fmts
static enum AVPixelFormat pix_fmts[]
Definition: libkvazaar.c:304
AV_PIX_FMT_MEDIACODEC
@ AV_PIX_FMT_MEDIACODEC
hardware decoding through MediaCodec
Definition: pixfmt.h:316
MediaCodecDeviceContext
Definition: hwcontext_mediacodec.c:31
mc_device_uninit
static void mc_device_uninit(AVHWDeviceContext *ctx)
Definition: hwcontext_mediacodec.c:92
AV_PIX_FMT_NONE
@ AV_PIX_FMT_NONE
Definition: pixfmt.h:72
mc_device_init
static int mc_device_init(AVHWDeviceContext *ctx)
Definition: hwcontext_mediacodec.c:62