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
d32c3292
Commit
d32c3292
authored
Feb 20, 2015
by
Thomas Guillem
Committed by
Jean-Baptiste Kempf
Feb 20, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
android_window: check subpicture i_order instead of comparing md5
Signed-off-by:
Jean-Baptiste Kempf
<
jb@videolan.org
>
parent
5c07f87a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
21 deletions
+7
-21
modules/video_output/android/android_window.c
modules/video_output/android/android_window.c
+7
-21
No files found.
modules/video_output/android/android_window.c
View file @
d32c3292
...
@@ -33,7 +33,6 @@
...
@@ -33,7 +33,6 @@
#include <vlc_vout_display.h>
#include <vlc_vout_display.h>
#include <vlc_picture_pool.h>
#include <vlc_picture_pool.h>
#include <vlc_filter.h>
#include <vlc_filter.h>
#include <vlc_md5.h>
#include <dlfcn.h>
#include <dlfcn.h>
...
@@ -133,6 +132,7 @@ struct vout_display_sys_t
...
@@ -133,6 +132,7 @@ struct vout_display_sys_t
picture_t
*
p_sub_pic
;
picture_t
*
p_sub_pic
;
buffer_bounds
*
p_sub_buffer_bounds
;
buffer_bounds
*
p_sub_buffer_bounds
;
bool
b_sub_pic_locked
;
bool
b_sub_pic_locked
;
int64_t
i_sub_last_order
;
bool
b_has_subpictures
;
bool
b_has_subpictures
;
...
@@ -713,6 +713,7 @@ static int Open(vlc_object_t *p_this)
...
@@ -713,6 +713,7 @@ static int Open(vlc_object_t *p_this)
if
(
!
sys
->
p_sub_window
)
if
(
!
sys
->
p_sub_window
)
goto
error
;
goto
error
;
FixSubtitleFormat
(
sys
);
FixSubtitleFormat
(
sys
);
sys
->
i_sub_last_order
=
-
1
;
/* Export the subpicture capability of this vout. */
/* Export the subpicture capability of this vout. */
vd
->
info
.
subpicture_chromas
=
subpicture_chromas
;
vd
->
info
.
subpicture_chromas
=
subpicture_chromas
;
...
@@ -939,29 +940,14 @@ static void SubtitleGetDirtyBounds(vout_display_t *vd,
...
@@ -939,29 +940,14 @@ static void SubtitleGetDirtyBounds(vout_display_t *vd,
static
void
SubpicturePrepare
(
vout_display_t
*
vd
,
subpicture_t
*
subpicture
)
static
void
SubpicturePrepare
(
vout_display_t
*
vd
,
subpicture_t
*
subpicture
)
{
{
vout_display_sys_t
*
sys
=
vd
->
sys
;
vout_display_sys_t
*
sys
=
vd
->
sys
;
struct
md5_s
hash
;
ARect
memset_bounds
;
ARect
memset_bounds
;
InitMD5
(
&
hash
);
if
(
subpicture
)
if
(
subpicture
)
{
{
for
(
subpicture_region_t
*
r
=
subpicture
->
p_region
;
r
!=
NULL
;
r
=
r
->
p_next
)
{
if
(
subpicture
->
i_order
==
sys
->
i_sub_last_order
)
AddMD5
(
&
hash
,
&
r
->
i_x
,
sizeof
(
r
->
i_x
));
return
;
AddMD5
(
&
hash
,
&
r
->
i_y
,
sizeof
(
r
->
i_y
));
sys
->
i_sub_last_order
=
subpicture
->
i_order
;
AddMD5
(
&
hash
,
&
r
->
fmt
.
i_visible_width
,
sizeof
(
r
->
fmt
.
i_visible_width
));
AddMD5
(
&
hash
,
&
r
->
fmt
.
i_visible_height
,
sizeof
(
r
->
fmt
.
i_visible_height
));
AddMD5
(
&
hash
,
&
r
->
fmt
.
i_x_offset
,
sizeof
(
r
->
fmt
.
i_x_offset
));
AddMD5
(
&
hash
,
&
r
->
fmt
.
i_y_offset
,
sizeof
(
r
->
fmt
.
i_y_offset
));
const
int
pixels_offset
=
r
->
fmt
.
i_y_offset
*
r
->
p_picture
->
p
->
i_pitch
+
r
->
fmt
.
i_x_offset
*
r
->
p_picture
->
p
->
i_pixel_pitch
;
for
(
unsigned
int
y
=
0
;
y
<
r
->
fmt
.
i_visible_height
;
y
++
)
AddMD5
(
&
hash
,
&
r
->
p_picture
->
p
->
p_pixels
[
pixels_offset
+
y
*
r
->
p_picture
->
p
->
i_pitch
],
r
->
fmt
.
i_visible_width
);
}
}
}
EndMD5
(
&
hash
);
if
(
!
memcmp
(
hash
.
buf
,
sys
->
hash
,
16
))
return
;
memcpy
(
sys
->
hash
,
hash
.
buf
,
16
);
if
(
AndroidWindow_LockPicture
(
sys
,
sys
->
p_sub_window
,
sys
->
p_sub_pic
)
!=
0
)
if
(
AndroidWindow_LockPicture
(
sys
,
sys
->
p_sub_window
,
sys
->
p_sub_pic
)
!=
0
)
return
;
return
;
...
...
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