Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
09a145b3
Commit
09a145b3
authored
Sep 12, 2016
by
Mark Thompson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hwcontext_vdpau: Remove duplicate definition of GET_CALLBACK
parent
de452e50
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
24 deletions
+13
-24
hwcontext_vdpau.c
libavutil/hwcontext_vdpau.c
+13
-24
No files found.
libavutil/hwcontext_vdpau.c
View file @
09a145b3
...
...
@@ -127,13 +127,6 @@ static int vdpau_init_pixmfts(AVHWDeviceContext *ctx)
return
0
;
}
static
int
vdpau_device_init
(
AVHWDeviceContext
*
ctx
)
{
AVVDPAUDeviceContext
*
hwctx
=
ctx
->
hwctx
;
VDPAUDeviceContext
*
priv
=
ctx
->
internal
->
priv
;
VdpStatus
err
;
int
ret
;
#define GET_CALLBACK(id, result) \
do { \
void *tmp; \
...
...
@@ -142,15 +135,22 @@ do {
av_log(ctx, AV_LOG_ERROR, "Error getting the " #id " callback.\n"); \
return AVERROR_UNKNOWN; \
} \
priv->result = tmp;
\
result = tmp;
\
} while (0)
static
int
vdpau_device_init
(
AVHWDeviceContext
*
ctx
)
{
AVVDPAUDeviceContext
*
hwctx
=
ctx
->
hwctx
;
VDPAUDeviceContext
*
priv
=
ctx
->
internal
->
priv
;
VdpStatus
err
;
int
ret
;
GET_CALLBACK
(
VDP_FUNC_ID_VIDEO_SURFACE_QUERY_GET_PUT_BITS_Y_CB_CR_CAPABILITIES
,
get_transfer_caps
);
GET_CALLBACK
(
VDP_FUNC_ID_VIDEO_SURFACE_GET_BITS_Y_CB_CR
,
get_data
);
GET_CALLBACK
(
VDP_FUNC_ID_VIDEO_SURFACE_PUT_BITS_Y_CB_CR
,
put_data
);
GET_CALLBACK
(
VDP_FUNC_ID_VIDEO_SURFACE_CREATE
,
surf_create
);
GET_CALLBACK
(
VDP_FUNC_ID_VIDEO_SURFACE_DESTROY
,
surf_destroy
);
priv
->
get_transfer_caps
);
GET_CALLBACK
(
VDP_FUNC_ID_VIDEO_SURFACE_GET_BITS_Y_CB_CR
,
priv
->
get_data
);
GET_CALLBACK
(
VDP_FUNC_ID_VIDEO_SURFACE_PUT_BITS_Y_CB_CR
,
p
riv
->
p
ut_data
);
GET_CALLBACK
(
VDP_FUNC_ID_VIDEO_SURFACE_CREATE
,
priv
->
surf_create
);
GET_CALLBACK
(
VDP_FUNC_ID_VIDEO_SURFACE_DESTROY
,
priv
->
surf_destroy
);
ret
=
vdpau_init_pixmfts
(
ctx
);
if
(
ret
<
0
)
{
...
...
@@ -444,17 +444,6 @@ static int vdpau_device_create(AVHWDeviceContext *ctx, const char *device,
return
AVERROR_UNKNOWN
;
}
#define GET_CALLBACK(id, result) \
do { \
void *tmp; \
err = hwctx->get_proc_address(hwctx->device, id, &tmp); \
if (err != VDP_STATUS_OK) { \
av_log(ctx, AV_LOG_ERROR, "Error getting the " #id " callback.\n"); \
return AVERROR_UNKNOWN; \
} \
result = tmp; \
} while (0)
GET_CALLBACK
(
VDP_FUNC_ID_GET_INFORMATION_STRING
,
get_information_string
);
GET_CALLBACK
(
VDP_FUNC_ID_DEVICE_DESTROY
,
priv
->
device_destroy
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment