Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
a97bb6d8
Commit
a97bb6d8
authored
Nov 25, 2014
by
Thomas Guillem
Committed by
Jean-Baptiste Kempf
Nov 25, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
android_window: prepare subtitles on vd->prepare
Signed-off-by:
Jean-Baptiste Kempf
<
jb@videolan.org
>
parent
03b99bee
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
15 deletions
+20
-15
modules/video_output/android/android_window.c
modules/video_output/android/android_window.c
+20
-15
No files found.
modules/video_output/android/android_window.c
View file @
a97bb6d8
...
...
@@ -131,6 +131,7 @@ struct vout_display_sys_t
filter_t
*
p_spu_blend
;
picture_t
*
p_sub_pic
;
buffer_bounds
*
p_sub_buffer_bounds
;
bool
b_sub_pic_locked
;
bool
b_has_subpictures
;
...
...
@@ -903,7 +904,7 @@ static void SubtitleGetDirtyBounds(vout_display_t *vd,
SubtitleRegionToBounds
(
subpicture
,
&
sys
->
p_sub_buffer_bounds
[
i
].
bounds
);
}
static
void
Subpicture
Display
(
vout_display_t
*
vd
,
subpicture_t
*
subpicture
)
static
void
Subpicture
Prepare
(
vout_display_t
*
vd
,
subpicture_t
*
subpicture
)
{
vout_display_sys_t
*
sys
=
vd
->
sys
;
struct
md5_s
hash
;
...
...
@@ -933,6 +934,7 @@ static void SubpictureDisplay(vout_display_t *vd, subpicture_t *subpicture)
if
(
AndroidWindow_LockPicture
(
sys
,
sys
->
p_sub_window
,
sys
->
p_sub_pic
)
!=
0
)
return
;
sys
->
b_sub_pic_locked
=
true
;
/* Clear the subtitles surface. */
SubtitleGetDirtyBounds
(
vd
,
subpicture
,
&
memset_bounds
);
...
...
@@ -946,8 +948,6 @@ static void SubpictureDisplay(vout_display_t *vd, subpicture_t *subpicture)
if
(
subpicture
)
picture_BlendSubpicture
(
sys
->
p_sub_pic
,
sys
->
p_spu_blend
,
subpicture
);
AndroidWindow_UnlockPicture
(
sys
,
sys
->
p_sub_window
,
sys
->
p_sub_pic
,
true
);
}
static
picture_pool_t
*
Pool
(
vout_display_t
*
vd
,
unsigned
requested_count
)
...
...
@@ -961,20 +961,11 @@ static picture_pool_t *Pool(vout_display_t *vd, unsigned requested_count)
static
void
Prepare
(
vout_display_t
*
vd
,
picture_t
*
picture
,
subpicture_t
*
subpicture
)
{
VLC_UNUSED
(
picture
);
VLC_UNUSED
(
subpicture
);
SendEventDisplaySize
(
vd
);
}
static
void
Display
(
vout_display_t
*
vd
,
picture_t
*
picture
,
subpicture_t
*
subpicture
)
{
vout_display_sys_t
*
sys
=
vd
->
sys
;
VLC_UNUSED
(
picture
);
/* refcount lowers to 0, and pool_cfg.unlock is called */
UnlockPicture
(
picture
,
true
);
picture_Release
(
picture
);
SendEventDisplaySize
(
vd
);
if
(
subpicture
)
{
if
(
sys
->
b_sub_invalid
)
{
...
...
@@ -1005,7 +996,7 @@ static void Display(vout_display_t *vd, picture_t *picture,
surface are expensive operations. */
if
(
sys
->
b_has_subpictures
)
{
Subpicture
Display
(
vd
,
subpicture
);
Subpicture
Prepare
(
vd
,
subpicture
);
if
(
!
subpicture
)
{
/* The surface has been cleared and there is no new
...
...
@@ -1014,7 +1005,21 @@ static void Display(vout_display_t *vd, picture_t *picture,
sys
->
b_has_subpictures
=
false
;
}
}
}
static
void
Display
(
vout_display_t
*
vd
,
picture_t
*
picture
,
subpicture_t
*
subpicture
)
{
vout_display_sys_t
*
sys
=
vd
->
sys
;
/* refcount lowers to 0, and pool_cfg.unlock is called */
UnlockPicture
(
picture
,
true
);
picture_Release
(
picture
);
if
(
sys
->
b_sub_pic_locked
)
{
sys
->
b_sub_pic_locked
=
false
;
AndroidWindow_UnlockPicture
(
sys
,
sys
->
p_sub_window
,
sys
->
p_sub_pic
,
true
);
}
if
(
subpicture
)
subpicture_Delete
(
subpicture
);
}
...
...
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