mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02:00
avutil/hwcontext_vdpau: Don't use AVHWFramesInternal.priv
Use AVHWFramesContext.hwctx instead. This simplifies access to VDPAUFramesContext as one no longer has to go through AVHWFramesInternal. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
f4df14b354
commit
ac86b52f80
@ -233,7 +233,7 @@ static void vdpau_buffer_free(void *opaque, uint8_t *data)
|
|||||||
static AVBufferRef *vdpau_pool_alloc(void *opaque, size_t size)
|
static AVBufferRef *vdpau_pool_alloc(void *opaque, size_t size)
|
||||||
{
|
{
|
||||||
AVHWFramesContext *ctx = opaque;
|
AVHWFramesContext *ctx = opaque;
|
||||||
VDPAUFramesContext *priv = ctx->internal->priv;
|
VDPAUFramesContext *priv = ctx->hwctx;
|
||||||
VDPAUDeviceContext *device_priv = ctx->device_ctx->hwctx;
|
VDPAUDeviceContext *device_priv = ctx->device_ctx->hwctx;
|
||||||
AVVDPAUDeviceContext *device_hwctx = &device_priv->p;
|
AVVDPAUDeviceContext *device_hwctx = &device_priv->p;
|
||||||
|
|
||||||
@ -261,7 +261,7 @@ static AVBufferRef *vdpau_pool_alloc(void *opaque, size_t size)
|
|||||||
static int vdpau_frames_init(AVHWFramesContext *ctx)
|
static int vdpau_frames_init(AVHWFramesContext *ctx)
|
||||||
{
|
{
|
||||||
VDPAUDeviceContext *device_priv = ctx->device_ctx->hwctx;
|
VDPAUDeviceContext *device_priv = ctx->device_ctx->hwctx;
|
||||||
VDPAUFramesContext *priv = ctx->internal->priv;
|
VDPAUFramesContext *priv = ctx->hwctx;
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
@ -311,7 +311,7 @@ static int vdpau_transfer_get_formats(AVHWFramesContext *ctx,
|
|||||||
enum AVHWFrameTransferDirection dir,
|
enum AVHWFrameTransferDirection dir,
|
||||||
enum AVPixelFormat **formats)
|
enum AVPixelFormat **formats)
|
||||||
{
|
{
|
||||||
VDPAUFramesContext *priv = ctx->internal->priv;
|
VDPAUFramesContext *priv = ctx->hwctx;
|
||||||
|
|
||||||
enum AVPixelFormat *fmts;
|
enum AVPixelFormat *fmts;
|
||||||
|
|
||||||
@ -334,7 +334,7 @@ static int vdpau_transfer_get_formats(AVHWFramesContext *ctx,
|
|||||||
static int vdpau_transfer_data_from(AVHWFramesContext *ctx, AVFrame *dst,
|
static int vdpau_transfer_data_from(AVHWFramesContext *ctx, AVFrame *dst,
|
||||||
const AVFrame *src)
|
const AVFrame *src)
|
||||||
{
|
{
|
||||||
VDPAUFramesContext *priv = ctx->internal->priv;
|
VDPAUFramesContext *priv = ctx->hwctx;
|
||||||
VdpVideoSurface surf = (VdpVideoSurface)(uintptr_t)src->data[3];
|
VdpVideoSurface surf = (VdpVideoSurface)(uintptr_t)src->data[3];
|
||||||
|
|
||||||
void *data[3];
|
void *data[3];
|
||||||
@ -392,7 +392,7 @@ static int vdpau_transfer_data_from(AVHWFramesContext *ctx, AVFrame *dst,
|
|||||||
static int vdpau_transfer_data_to(AVHWFramesContext *ctx, AVFrame *dst,
|
static int vdpau_transfer_data_to(AVHWFramesContext *ctx, AVFrame *dst,
|
||||||
const AVFrame *src)
|
const AVFrame *src)
|
||||||
{
|
{
|
||||||
VDPAUFramesContext *priv = ctx->internal->priv;
|
VDPAUFramesContext *priv = ctx->hwctx;
|
||||||
VdpVideoSurface surf = (VdpVideoSurface)(uintptr_t)dst->data[3];
|
VdpVideoSurface surf = (VdpVideoSurface)(uintptr_t)dst->data[3];
|
||||||
|
|
||||||
const void *data[3];
|
const void *data[3];
|
||||||
@ -514,7 +514,7 @@ const HWContextType ff_hwcontext_type_vdpau = {
|
|||||||
.name = "VDPAU",
|
.name = "VDPAU",
|
||||||
|
|
||||||
.device_hwctx_size = sizeof(VDPAUDeviceContext),
|
.device_hwctx_size = sizeof(VDPAUDeviceContext),
|
||||||
.frames_priv_size = sizeof(VDPAUFramesContext),
|
.frames_hwctx_size = sizeof(VDPAUFramesContext),
|
||||||
|
|
||||||
#if HAVE_VDPAU_X11
|
#if HAVE_VDPAU_X11
|
||||||
.device_create = vdpau_device_create,
|
.device_create = vdpau_device_create,
|
||||||
|
Loading…
Reference in New Issue
Block a user