Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC
Manage
Activity
Members
Labels
Plan
Issues
4k
Issue boards
Milestones
Code
Merge requests
451
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VideoLAN
VLC
Commits
da46c38e
Commit
da46c38e
authored
2 years ago
by
Denis Charmet
Browse files
Options
Downloads
Patches
Plain Diff
vout: android: asynchronously resize vout window
parent
34f09854
No related branches found
Branches containing commit
No related tags found
1 merge request
!1978
vout: Use a fair display lock and interrupt wait
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
modules/video_output/Makefile.am
+2
-1
2 additions, 1 deletion
modules/video_output/Makefile.am
modules/video_output/android/window.c
+18
-1
18 additions, 1 deletion
modules/video_output/android/window.c
with
20 additions
and
2 deletions
modules/video_output/Makefile.am
+
2
−
1
View file @
da46c38e
...
...
@@ -287,7 +287,8 @@ libegl_android_plugin_la_SOURCES = video_output/opengl/egl.c
libegl_android_plugin_la_CFLAGS
=
$(
AM_CFLAGS
)
$(
EGL_CFLAGS
)
-DUSE_PLATFORM_ANDROID
=
1
libegl_android_plugin_la_LIBADD
=
$(
EGL_LIBS
)
libandroid_utils.la
libandroid_window_plugin_la_SOURCES
=
video_output/android/window.c
libandroid_window_plugin_la_SOURCES
=
video_output/android/window.c
\
video_output/wasync_resize_compressor.h
libandroid_window_plugin_la_LIBADD
=
libandroid_utils.la
$(
LIBDL
)
libandroid_display_plugin_la_SOURCES
=
video_output/android/display.c
...
...
This diff is collapsed.
Click to expand it.
modules/video_output/android/window.c
+
18
−
1
View file @
da46c38e
...
...
@@ -37,6 +37,7 @@
#include
<jni.h>
#include
"utils.h"
#include
"../wasync_resize_compressor.h"
static
int
Open
(
vlc_window_t
*
);
static
void
Close
(
vlc_window_t
*
);
...
...
@@ -56,11 +57,16 @@ vlc_module_begin()
add_shortcut
(
"android"
)
vlc_module_end
()
typedef
struct
{
vlc_wasync_resize_compressor_t
compressor
;
}
vout_window_sys_t
;
static
void
OnNewWindowSize
(
vlc_window_t
*
wnd
,
unsigned
i_width
,
unsigned
i_height
)
{
vlc_window_ReportSize
(
wnd
,
i_width
,
i_height
);
vout_window_sys_t
*
sys
=
(
vout_window_sys_t
*
)
wnd
->
sys
;
vlc_wasync_resize_compressor_reportSize
(
&
sys
->
compressor
,
i_width
,
i_height
);
}
static
void
OnNewMouseCoords
(
vlc_window_t
*
wnd
,
...
...
@@ -94,6 +100,15 @@ static int Open(vlc_window_t *wnd)
if
(
jobj
==
NULL
)
return
VLC_EGENERIC
;
vout_window_sys_t
*
sys
=
vlc_obj_malloc
(
VLC_OBJECT
(
wnd
),
sizeof
(
*
sys
));
if
(
sys
==
NULL
)
return
VLC_ENOMEM
;
if
(
vlc_wasync_resize_compressor_init
(
&
sys
->
compressor
,
wnd
))
return
VLC_EGENERIC
;
wnd
->
sys
=
sys
;
AWindowHandler
*
p_awh
=
AWindowHandler_new
(
VLC_OBJECT
(
wnd
),
wnd
,
&
(
awh_events_t
)
{
OnNewWindowSize
,
OnNewMouseCoords
});
if
(
p_awh
==
NULL
)
...
...
@@ -112,6 +127,8 @@ static int Open(vlc_window_t *wnd)
*/
static
void
Close
(
vlc_window_t
*
wnd
)
{
vout_window_sys_t
*
sys
=
(
vout_window_sys_t
*
)
wnd
->
sys
;
vlc_wasync_resize_compressor_destroy
(
&
sys
->
compressor
);
AWindowHandler_destroy
(
wnd
->
handle
.
anativewindow
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment