Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
7840c4dc
Commit
7840c4dc
authored
Jul 24, 2013
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vdpau: revector (no functional changes)
parent
473c629a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
9 deletions
+23
-9
modules/hw/vdpau/picture.c
modules/hw/vdpau/picture.c
+18
-9
modules/hw/vdpau/vlc_vdpau.h
modules/hw/vdpau/vlc_vdpau.h
+5
-0
No files found.
modules/hw/vdpau/picture.c
View file @
7840c4dc
...
...
@@ -62,8 +62,8 @@ static const VdpProcamp procamp_default =
.
hue
=
0
.
f
,
};
VdpStatus
vlc_vdp_video_attach
(
vdp_t
*
vdp
,
VdpVideoSurface
surface
,
picture_t
*
pic
)
vlc_vdp_video_field_t
*
vlc_vdp_video_create
(
vdp_t
*
vdp
,
VdpVideoSurface
surface
)
{
vlc_vdp_video_field_t
*
field
=
malloc
(
sizeof
(
*
field
));
vlc_vdp_video_frame_t
*
frame
=
malloc
(
sizeof
(
*
frame
));
...
...
@@ -73,15 +73,9 @@ VdpStatus vlc_vdp_video_attach(vdp_t *vdp, VdpVideoSurface surface,
free
(
frame
);
free
(
field
);
vdp_video_surface_destroy
(
vdp
,
surface
);
return
VDP_STATUS_RESOURCES
;
return
NULL
;
}
assert
(
pic
->
format
.
i_chroma
==
VLC_CODEC_VDPAU_VIDEO_420
||
pic
->
format
.
i_chroma
==
VLC_CODEC_VDPAU_VIDEO_422
);
assert
(
!
picture_IsReferenced
(
pic
));
assert
(
pic
->
context
==
NULL
);
pic
->
context
=
field
;
field
->
destroy
=
SurfaceDestroy
;
field
->
frame
=
frame
;
field
->
structure
=
VDP_VIDEO_MIXER_PICTURE_STRUCTURE_FRAME
;
...
...
@@ -91,6 +85,21 @@ VdpStatus vlc_vdp_video_attach(vdp_t *vdp, VdpVideoSurface surface,
atomic_init
(
&
frame
->
refs
,
1
);
frame
->
surface
=
surface
;
frame
->
vdp
=
vdp_hold_x11
(
vdp
,
&
frame
->
device
);
return
field
;
}
VdpStatus
vlc_vdp_video_attach
(
vdp_t
*
vdp
,
VdpVideoSurface
surface
,
picture_t
*
pic
)
{
vlc_vdp_video_field_t
*
field
=
vlc_vdp_video_create
(
vdp
,
surface
);
if
(
unlikely
(
field
==
NULL
))
return
VDP_STATUS_RESOURCES
;
assert
(
pic
->
format
.
i_chroma
==
VLC_CODEC_VDPAU_VIDEO_420
||
pic
->
format
.
i_chroma
==
VLC_CODEC_VDPAU_VIDEO_422
);
assert
(
!
picture_IsReferenced
(
pic
));
assert
(
pic
->
context
==
NULL
);
pic
->
context
=
field
;
return
VDP_STATUS_OK
;
}
...
...
modules/hw/vdpau/vlc_vdpau.h
View file @
7840c4dc
...
...
@@ -286,6 +286,11 @@ typedef struct vlc_vdp_video_field
*/
VdpStatus
vlc_vdp_video_attach
(
vdp_t
*
,
VdpVideoSurface
,
picture_t
*
);
/**
* Wraps a VDPAU video surface into a VLC picture context.
*/
vlc_vdp_video_field_t
*
vlc_vdp_video_create
(
vdp_t
*
,
VdpVideoSurface
);
/**
* Performs a shallow copy of a VDPAU video surface context
* (the underlying VDPAU video surface is shared).
...
...
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