Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
a464ed78
Commit
a464ed78
authored
Jun 12, 2013
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
VAAPI: Cleanup video_output/vaapi/spu.{c,h}
Rename functions and structures.
parent
50eebc56
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
192 additions
and
198 deletions
+192
-198
modules/video_output/vaapi/glx.c
modules/video_output/vaapi/glx.c
+21
-33
modules/video_output/vaapi/spu.c
modules/video_output/vaapi/spu.c
+131
-107
modules/video_output/vaapi/spu.h
modules/video_output/vaapi/spu.h
+19
-25
modules/video_output/vaapi/xcb.c
modules/video_output/vaapi/xcb.c
+21
-33
No files found.
modules/video_output/vaapi/glx.c
View file @
a464ed78
...
@@ -94,8 +94,7 @@ struct vout_display_sys_t
...
@@ -94,8 +94,7 @@ struct vout_display_sys_t
subpicture_t
*
prev_subpicture
;
subpicture_t
*
prev_subpicture
;
}
render
;
}
render
;
vlc_mutex_t
cache_lock
;
vlc_va_spu_cache_t
*
spu
;
vlc_array_t
cache
;
/* array of subpicture_subpicture_cache_t */
xcb_cursor_t
cursor
;
/* blank cursor */
xcb_cursor_t
cursor
;
/* blank cursor */
xcb_window_t
window
;
/* drawable X window */
xcb_window_t
window
;
/* drawable X window */
...
@@ -455,8 +454,12 @@ int OpenVaapiGLX(vlc_object_t *obj)
...
@@ -455,8 +454,12 @@ int OpenVaapiGLX(vlc_object_t *obj)
vd
->
sys
=
sys
;
vd
->
sys
=
sys
;
vlc_array_init
(
&
sys
->
cache
);
sys
->
spu
=
vlc_va_spu_cache_New
();
vlc_mutex_init
(
&
sys
->
cache_lock
);
if
(
!
sys
->
spu
)
{
free
(
sys
);
return
VLC_ENOMEM
;
}
sys
->
render
.
prev_subpicture
=
NULL
;
sys
->
render
.
prev_subpicture
=
NULL
;
sys
->
render
.
i_cache
=
0
;
sys
->
render
.
i_cache
=
0
;
...
@@ -620,8 +623,8 @@ void CloseVaapiGLX(vlc_object_t *obj)
...
@@ -620,8 +623,8 @@ void CloseVaapiGLX(vlc_object_t *obj)
}
}
/* Cleanup cache */
/* Cleanup cache */
vlc_mutex_destroy
(
&
sys
->
cache_lock
);
if
(
sys
->
spu
)
cache_SubpictureEmpty
(
obj
,
va
,
&
sys
->
cache
);
vlc_va_spu_cache_Delete
(
va
,
sys
->
spu
);
/* Cleanup VAAPI resources and connection */
/* Cleanup VAAPI resources and connection */
if
(
va
)
if
(
va
)
...
@@ -692,47 +695,36 @@ static void Render(vout_display_t *vd, picture_t *picture, subpicture_t *subpict
...
@@ -692,47 +695,36 @@ static void Render(vout_display_t *vd, picture_t *picture, subpicture_t *subpict
subpicture
,
sys
->
render
.
prev_subpicture
,
subpicture
,
sys
->
render
.
prev_subpicture
,
sys
->
render
.
i_cache
,
picture
->
p_sys
->
i_id
);
sys
->
render
.
i_cache
,
picture
->
p_sys
->
i_id
);
#endif
#endif
vlc_mutex_lock
(
&
sys
->
cache_lock
);
int
ret
=
vlc_va_spu_cache_Get
(
VLC_OBJECT
(
vd
),
sys
->
spu
,
sys
->
render
.
i_cache
,
int
ret
=
RenderCachedSubpictures
(
VLC_OBJECT
(
vd
),
sys
->
va
,
&
sys
->
cache
,
picture
,
subpicture
);
sys
->
render
.
i_cache
,
picture
,
subpicture
);
vlc_mutex_unlock
(
&
sys
->
cache_lock
);
if
(
ret
==
VLC_SUCCESS
)
if
(
ret
==
VLC_SUCCESS
)
return
;
return
;
}
}
/* new subpicture */
vlc_mutex_lock
(
&
sys
->
cache_lock
);
/* Release exra reference */
/* Release exra reference */
if
(
sys
->
render
.
i_cache
>
0
)
if
(
sys
->
render
.
i_cache
>
0
)
cache_SubpictureRelease
(
VLC_OBJECT
(
vd
),
sys
->
va
,
&
sys
->
cache
,
sys
->
render
.
i_cache
);
vlc_va_spu_cache_Release
(
sys
->
va
,
sys
->
spu
,
sys
->
render
.
i_cache
);
/* render new subpicture */
/* render new subpicture */
s
ubpicture_cache_t
*
cache
=
RenderDirectSubpictu
re
(
VLC_OBJECT
(
vd
),
sys
->
va
,
&
sys
->
sub_fmt
,
s
pu_cache_t
*
cache
=
vlc_va_spu_cache_Prepa
re
(
VLC_OBJECT
(
vd
),
sys
->
va
,
&
sys
->
sub_fmt
,
picture
,
subpicture
,
sys
->
sflags
);
picture
,
subpicture
,
sys
->
sflags
);
if
(
cache
==
NULL
)
if
(
cache
==
NULL
)
{
vlc_mutex_unlock
(
&
sys
->
cache_lock
);
return
;
return
;
}
#ifdef VAAPI_DEBUG
#ifdef VAAPI_DEBUG
msg_Dbg
(
vd
,
"new subpicture %p prev %p cache %d surface %d"
,
msg_Dbg
(
vd
,
"new subpicture %p prev %p cache %d surface %d"
,
subpicture
,
sys
->
render
.
prev_subpicture
,
cache_GetCache
ID
(
cache
),
surface
->
i_id
);
subpicture
,
sys
->
render
.
prev_subpicture
,
vlc_va_spu_cache_Get
ID
(
cache
),
surface
->
i_id
);
#endif
#endif
/* remember what was created, so it can be released in DisplayPicture() */
/* remember what was created, so it can be released in DisplayPicture() */
vlc_
array_append
(
&
sys
->
cache
,
(
void
*
)
cache
);
vlc_
va_spu_cache_Put
(
sys
->
spu
,
cache
);
sys
->
render
.
i_cache
=
cache_GetCache
ID
(
cache
);
sys
->
render
.
i_cache
=
vlc_va_spu_cache_Get
ID
(
cache
);
sys
->
render
.
prev_subpicture
=
subpicture
;
sys
->
render
.
prev_subpicture
=
subpicture
;
sys
->
render
.
i_start
=
subpicture
->
i_start
;
sys
->
render
.
i_start
=
subpicture
->
i_start
;
sys
->
render
.
i_stop
=
subpicture
->
i_stop
;
sys
->
render
.
i_stop
=
subpicture
->
i_stop
;
/* Hold extra reference */
/* Hold extra reference */
cache_SubpictureHold
(
VLC_OBJECT
(
vd
),
&
sys
->
cache
,
cache_GetCacheID
(
cache
));
vlc_va_spu_cache_Hold
(
sys
->
spu
,
vlc_va_spu_cache_GetID
(
cache
));
vlc_mutex_unlock
(
&
sys
->
cache_lock
);
}
}
static
void
DisplayVASurfaceGLX
(
vout_display_t
*
vd
,
picture_t
*
picture
)
static
void
DisplayVASurfaceGLX
(
vout_display_t
*
vd
,
picture_t
*
picture
)
...
@@ -821,11 +813,9 @@ static void DisplayPicture(vout_display_t *vd, picture_t *picture, subpicture_t
...
@@ -821,11 +813,9 @@ static void DisplayPicture(vout_display_t *vd, picture_t *picture, subpicture_t
if
(
subpicture
)
if
(
subpicture
)
{
{
vlc_mutex_lock
(
&
sys
->
cache_lock
);
ret
=
vlc_va_spu_cache_Link
(
VLC_OBJECT
(
vd
),
sys
->
va
,
sys
->
spu
,
picture
,
sys
->
sflags
);
ret
=
SubpictureRegionsLink
(
VLC_OBJECT
(
vd
),
sys
->
va
,
&
sys
->
cache
,
picture
,
sys
->
sflags
);
if
(
ret
==
VLC_EGENERIC
)
if
(
ret
==
VLC_EGENERIC
)
msg_Err
(
vd
,
"Failed linking subpicture to surface"
);
msg_Err
(
vd
,
"Failed linking subpicture to surface"
);
vlc_mutex_unlock
(
&
sys
->
cache_lock
);
}
}
if
(
!
vlc_gl_Lock
(
&
sys
->
gl
))
if
(
!
vlc_gl_Lock
(
&
sys
->
gl
))
...
@@ -840,16 +830,14 @@ static void DisplayPicture(vout_display_t *vd, picture_t *picture, subpicture_t
...
@@ -840,16 +830,14 @@ static void DisplayPicture(vout_display_t *vd, picture_t *picture, subpicture_t
if
(
subpicture
)
if
(
subpicture
)
{
{
vlc_mutex_lock
(
&
sys
->
cache_lock
);
if
(
ret
==
VLC_SUCCESS
)
if
(
ret
==
VLC_SUCCESS
)
{
{
if
(
SubpictureRegionsUnlink
(
VLC_OBJECT
(
vd
),
sys
->
va
,
&
sys
->
cache
,
picture
)
==
VLC_EGENERIC
)
if
(
vlc_va_spu_cache_Unlink
(
VLC_OBJECT
(
vd
),
sys
->
va
,
sys
->
spu
,
picture
)
==
VLC_EGENERIC
)
msg_Err
(
vd
,
"Could not find subpicture in cache"
);
msg_Err
(
vd
,
"Could not find subpicture in cache"
);
}
}
if
(
picture
->
p_sys
->
i_cache
>
0
)
if
(
picture
->
p_sys
->
i_cache
>
0
)
cache_SubpictureRelease
(
VLC_OBJECT
(
vd
),
sys
->
va
,
&
sys
->
cache
,
picture
->
p_sys
->
i_cache
);
vlc_va_spu_cache_Release
(
sys
->
va
,
sys
->
spu
,
picture
->
p_sys
->
i_cache
);
picture
->
p_sys
->
i_cache
=
0
;
picture
->
p_sys
->
i_cache
=
0
;
vlc_mutex_unlock
(
&
sys
->
cache_lock
);
}
}
out:
out:
...
...
modules/video_output/vaapi/spu.c
View file @
a464ed78
This diff is collapsed.
Click to expand it.
modules/video_output/vaapi/spu.h
View file @
a464ed78
...
@@ -28,45 +28,39 @@ static const vlc_fourcc_t va_subpicture_chromas[] = {
...
@@ -28,45 +28,39 @@ static const vlc_fourcc_t va_subpicture_chromas[] = {
0
0
};
};
/* NOTE: call all functions with sys->cache_lock held */
/* Check if subtitle format is supported by VA API */
/* Check if subtitle format is supported by VA API */
int
VASubtitleFourCC
(
vlc_va_conn_t
*
va
,
const
unsigned
int
vafourcc
,
VAImageFormat
*
sub_fmt
,
int
*
flags
);
int
VASubtitleFourCC
(
vlc_va_conn_t
*
va
,
const
unsigned
int
vafourcc
,
VAImageFormat
*
sub_fmt
,
int
*
flags
);
/* */
/* */
typedef
struct
v
asubpicture_cache_t
vasubpicture
_cache_t
;
typedef
struct
v
lc_va_spu_cache_t
vlc_va_spu
_cache_t
;
typedef
struct
s
ubpicture_cache_t
subpicture
_cache_t
;
typedef
struct
s
pu_cache_t
spu
_cache_t
;
/* Get Cache id */
/* Get Cache id */
unsigned
int
cache_GetCacheID
(
const
subpicture
_cache_t
*
cache
);
unsigned
int
vlc_va_spu_cache_GetID
(
const
spu
_cache_t
*
cache
);
/* Empty the array of cached subpictures */
/* Empty the array of cached subpictures */
void
cache_SubpictureEmpty
(
vlc_object_t
*
obj
,
vlc_va_conn_t
*
va
,
vlc_array_t
*
restrict
cache
);
vlc_va_spu_cache_t
*
vlc_va_spu_cache_New
(
void
);
void
vlc_va_spu_cache_Delete
(
vlc_va_conn_t
*
va
,
vlc_va_spu_cache_t
*
restrict
spu
);
/* Create new VASubpicture */
vasubpicture_cache_t
*
cache_SubpictureCreate
(
vlc_object_t
*
obj
,
vlc_va_conn_t
*
va
,
VAImageFormat
*
sub_fmt
,
const
subpicture_t
*
subpicture
,
const
subpicture_region_t
*
region
,
const
int
flags
);
/* Destory VASubpicture and cached subpicture */
void
cache_SubpictureDestroy
(
vlc_object_t
*
obj
,
vlc_va_conn_t
*
conn
,
subpicture_cache_t
*
cache
,
const
bool
b_force
);
/* Hold reference to subpicture cache object */
/* Hold and Release reference to subpicture cache object */
void
cache_SubpictureHold
(
vlc_object_t
*
obj
,
vlc_array_t
*
cache_array
,
const
int
cache_id
);
void
vlc_va_spu_cache_Hold
(
vlc_va_spu_cache_t
*
spu
,
const
int
cache_id
);
/* Release reference to subpicture cache object */
void
vlc_va_spu_cache_Release
(
vlc_va_conn_t
*
va
,
vlc_va_spu_cache_t
*
spu
,
const
int
cache_id
);
void
cache_SubpictureRelease
(
vlc_object_t
*
obj
,
vlc_va_conn_t
*
va
,
vlc_array_t
*
cache_array
,
const
int
cache_id
);
/* Link
VASubpicture to
VASurface */
/* Link
/Unlink VASubpicture to/from
VASurface */
int
SubpictureRegionsLink
(
vlc_object_t
*
obj
,
vlc_va_conn_t
*
va
,
vlc_array_t
*
cache_array
,
int
vlc_va_spu_cache_Link
(
vlc_object_t
*
obj
,
vlc_va_conn_t
*
va
,
vlc_va_spu_cache_t
*
spu
,
const
picture_t
*
picture
,
const
int
flags
);
const
picture_t
*
picture
,
const
int
flags
);
/* Unlink VASubpicture from VASurface */
int
vlc_va_spu_cache_Unlink
(
vlc_object_t
*
obj
,
vlc_va_conn_t
*
va
,
vlc_va_spu_cache_t
*
spu
,
int
SubpictureRegionsUnlink
(
vlc_object_t
*
obj
,
vlc_va_conn_t
*
va
,
vlc_array_t
*
cache_array
,
const
picture_t
*
picture
);
const
picture_t
*
picture
);
/* Render VLC subpictures as VASubpictures and put them into a subpicture cache */
/* Create VLC subpictures as VASubpictures and put them into a subpicture cache */
subpicture_cache_t
*
RenderDirectSubpicture
(
vlc_object_t
*
obj
,
vlc_va_conn_t
*
va
,
VAImageFormat
*
fmt
,
spu_cache_t
*
vlc_va_spu_cache_Prepare
(
vlc_object_t
*
obj
,
vlc_va_conn_t
*
va
,
VAImageFormat
*
fmt
,
picture_t
*
picture
,
subpicture_t
*
subpicture
,
int
flags
);
picture_t
*
picture
,
subpicture_t
*
subpicture
,
int
flags
);
/* Check if cached subpicture can be reused for the next Subpicture Render cycle */
/* Check if cached subpicture can be reused for the next Subpicture Render cycle */
int
RenderCachedSubpictures
(
vlc_object_t
*
obj
,
vlc_va_conn_t
*
va
,
vlc_array_t
*
cache_array
,
int
vlc_va_spu_cache_Get
(
vlc_object_t
*
obj
,
vlc_va_spu_cache_t
*
spu
,
const
unsigned
int
cache_id
,
const
unsigned
int
cache_id
,
picture_t
*
picture
,
subpicture_t
*
subpicture
);
picture_t
*
picture
,
subpicture_t
*
subpicture
);
void
vlc_va_spu_cache_Put
(
vlc_va_spu_cache_t
*
spu
,
spu_cache_t
*
cache
);
#endif
#endif
#endif
#endif
modules/video_output/vaapi/xcb.c
View file @
a464ed78
...
@@ -92,8 +92,7 @@ struct vout_display_sys_t
...
@@ -92,8 +92,7 @@ struct vout_display_sys_t
subpicture_t
*
prev_subpicture
;
subpicture_t
*
prev_subpicture
;
}
render
;
}
render
;
vlc_mutex_t
cache_lock
;
vlc_va_spu_cache_t
*
spu
;
vlc_array_t
cache
;
/* array of subpicture_subpicture_cache_t */
xcb_cursor_t
cursor
;
/* blank cursor */
xcb_cursor_t
cursor
;
/* blank cursor */
xcb_window_t
window
;
/* drawable X window */
xcb_window_t
window
;
/* drawable X window */
...
@@ -222,8 +221,12 @@ int OpenVaapiXCB(vlc_object_t *obj)
...
@@ -222,8 +221,12 @@ int OpenVaapiXCB(vlc_object_t *obj)
vd
->
sys
=
sys
;
vd
->
sys
=
sys
;
vlc_array_init
(
&
sys
->
cache
);
sys
->
spu
=
vlc_va_spu_cache_New
();
vlc_mutex_init
(
&
sys
->
cache_lock
);
if
(
!
sys
->
spu
)
{
free
(
sys
);
return
VLC_ENOMEM
;
}
sys
->
render
.
prev_subpicture
=
NULL
;
sys
->
render
.
prev_subpicture
=
NULL
;
sys
->
render
.
i_cache
=
0
;
sys
->
render
.
i_cache
=
0
;
...
@@ -354,8 +357,8 @@ void CloseVaapiXCB(vlc_object_t *obj)
...
@@ -354,8 +357,8 @@ void CloseVaapiXCB(vlc_object_t *obj)
sys
->
visible
=
false
;
sys
->
visible
=
false
;
/* Cleanup cache */
/* Cleanup cache */
vlc_mutex_destroy
(
&
sys
->
cache_lock
);
if
(
sys
->
spu
)
cache_SubpictureEmpty
(
obj
,
va
,
&
sys
->
cache
);
vlc_va_spu_cache_Delete
(
va
,
sys
->
spu
);
/* */
/* */
if
(
va
)
if
(
va
)
...
@@ -424,47 +427,36 @@ static void Render(vout_display_t *vd, picture_t *picture, subpicture_t *subpict
...
@@ -424,47 +427,36 @@ static void Render(vout_display_t *vd, picture_t *picture, subpicture_t *subpict
subpicture
,
sys
->
render
.
prev_subpicture
,
subpicture
,
sys
->
render
.
prev_subpicture
,
sys
->
render
.
i_cache
,
picture
->
p_sys
->
i_id
);
sys
->
render
.
i_cache
,
picture
->
p_sys
->
i_id
);
#endif
#endif
vlc_mutex_lock
(
&
sys
->
cache_lock
);
int
ret
=
vlc_va_spu_cache_Get
(
VLC_OBJECT
(
vd
),
sys
->
spu
,
sys
->
render
.
i_cache
,
int
ret
=
RenderCachedSubpictures
(
VLC_OBJECT
(
vd
),
sys
->
va
,
&
sys
->
cache
,
picture
,
subpicture
);
sys
->
render
.
i_cache
,
picture
,
subpicture
);
vlc_mutex_unlock
(
&
sys
->
cache_lock
);
if
(
ret
==
VLC_SUCCESS
)
if
(
ret
==
VLC_SUCCESS
)
return
;
return
;
}
}
/* new subpicture */
vlc_mutex_lock
(
&
sys
->
cache_lock
);
/* Release exra reference */
/* Release exra reference */
if
(
sys
->
render
.
i_cache
>
0
)
if
(
sys
->
render
.
i_cache
>
0
)
cache_SubpictureRelease
(
VLC_OBJECT
(
vd
),
sys
->
va
,
&
sys
->
cache
,
sys
->
render
.
i_cache
);
vlc_va_spu_cache_Release
(
sys
->
va
,
sys
->
spu
,
sys
->
render
.
i_cache
);
/* render new subpicture */
/* render new subpicture */
s
ubpicture_cache_t
*
cache
=
RenderDirectSubpictu
re
(
VLC_OBJECT
(
vd
),
sys
->
va
,
&
sys
->
sub_fmt
,
s
pu_cache_t
*
cache
=
vlc_va_spu_cache_Prepa
re
(
VLC_OBJECT
(
vd
),
sys
->
va
,
&
sys
->
sub_fmt
,
picture
,
subpicture
,
sys
->
sflags
);
picture
,
subpicture
,
sys
->
sflags
);
if
(
cache
==
NULL
)
if
(
cache
==
NULL
)
{
vlc_mutex_unlock
(
&
sys
->
cache_lock
);
return
;
return
;
}
#ifdef VAAPI_DEBUG
#ifdef VAAPI_DEBUG
msg_Dbg
(
vd
,
"new subpicture %p prev %p cache %d surface %d"
,
msg_Dbg
(
vd
,
"new subpicture %p prev %p cache %d surface %d"
,
subpicture
,
sys
->
render
.
prev_subpicture
,
cache_GetCache
ID
(
cache
),
surface
->
i_id
);
subpicture
,
sys
->
render
.
prev_subpicture
,
vlc_va_spu_cache_Get
ID
(
cache
),
surface
->
i_id
);
#endif
#endif
/* remember what was created, so it can be released in DisplayPicture() */
/* remember what was created, so it can be released in DisplayPicture() */
vlc_
array_append
(
&
sys
->
cache
,
(
void
*
)
cache
);
vlc_
va_spu_cache_Put
(
sys
->
spu
,
cache
);
sys
->
render
.
i_cache
=
cache_GetCache
ID
(
cache
);
sys
->
render
.
i_cache
=
vlc_va_spu_cache_Get
ID
(
cache
);
sys
->
render
.
prev_subpicture
=
subpicture
;
sys
->
render
.
prev_subpicture
=
subpicture
;
sys
->
render
.
i_start
=
subpicture
->
i_start
;
sys
->
render
.
i_start
=
subpicture
->
i_start
;
sys
->
render
.
i_stop
=
subpicture
->
i_stop
;
sys
->
render
.
i_stop
=
subpicture
->
i_stop
;
/* Hold extra reference */
/* Hold extra reference */
cache_SubpictureHold
(
VLC_OBJECT
(
vd
),
&
sys
->
cache
,
cache_GetCacheID
(
cache
));
vlc_va_spu_cache_Hold
(
sys
->
spu
,
vlc_va_spu_cache_GetID
(
cache
));
vlc_mutex_unlock
(
&
sys
->
cache_lock
);
}
}
static
void
DisplayVASurface
(
vout_display_t
*
vd
,
picture_t
*
picture
)
static
void
DisplayVASurface
(
vout_display_t
*
vd
,
picture_t
*
picture
)
...
@@ -531,26 +523,22 @@ static void DisplayPicture(vout_display_t *vd, picture_t *picture, subpicture_t
...
@@ -531,26 +523,22 @@ static void DisplayPicture(vout_display_t *vd, picture_t *picture, subpicture_t
if
(
subpicture
)
if
(
subpicture
)
{
{
vlc_mutex_lock
(
&
sys
->
cache_lock
);
ret
=
vlc_va_spu_cache_Link
(
VLC_OBJECT
(
vd
),
sys
->
va
,
sys
->
spu
,
picture
,
sys
->
sflags
);
ret
=
SubpictureRegionsLink
(
VLC_OBJECT
(
vd
),
sys
->
va
,
&
sys
->
cache
,
picture
,
sys
->
sflags
);
if
(
ret
==
VLC_EGENERIC
)
if
(
ret
==
VLC_EGENERIC
)
msg_Err
(
vd
,
"Failed linking subpicture to surface"
);
msg_Err
(
vd
,
"Failed linking subpicture to surface"
);
vlc_mutex_unlock
(
&
sys
->
cache_lock
);
}
}
DisplayVASurface
(
vd
,
picture
);
DisplayVASurface
(
vd
,
picture
);
if
(
subpicture
)
if
(
subpicture
)
{
{
vlc_mutex_lock
(
&
sys
->
cache_lock
);
if
(
ret
==
VLC_SUCCESS
)
if
(
ret
==
VLC_SUCCESS
)
{
{
if
(
SubpictureRegionsUnlink
(
VLC_OBJECT
(
vd
),
sys
->
va
,
&
sys
->
cache
,
picture
)
==
VLC_EGENERIC
)
if
(
vlc_va_spu_cache_Unlink
(
VLC_OBJECT
(
vd
),
sys
->
va
,
sys
->
spu
,
picture
)
==
VLC_EGENERIC
)
msg_Err
(
vd
,
"Could not find subpicture in cache"
);
msg_Err
(
vd
,
"Could not find subpicture in cache"
);
}
}
if
(
picture
->
p_sys
->
i_cache
>
0
)
if
(
picture
->
p_sys
->
i_cache
>
0
)
cache_SubpictureRelease
(
VLC_OBJECT
(
vd
),
sys
->
va
,
&
sys
->
cache
,
picture
->
p_sys
->
i_cache
);
vlc_va_spu_cache_Release
(
sys
->
va
,
sys
->
spu
,
picture
->
p_sys
->
i_cache
);
picture
->
p_sys
->
i_cache
=
0
;
picture
->
p_sys
->
i_cache
=
0
;
vlc_mutex_unlock
(
&
sys
->
cache_lock
);
}
}
out:
out:
...
...
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