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
387b07cd
Commit
387b07cd
authored
Dec 19, 2011
by
Martin Storsjö
Committed by
Jean-Baptiste Kempf
Dec 19, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
androidsurface: Update the surfaceflinger video output for ICS
Signed-off-by:
Jean-Baptiste Kempf
<
jb@videolan.org
>
parent
dbb19bb6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
3 deletions
+15
-3
modules/video_output/androidsurface.c
modules/video_output/androidsurface.c
+15
-3
No files found.
modules/video_output/androidsurface.c
View file @
387b07cd
...
...
@@ -36,6 +36,9 @@
#ifndef ANDROID_SYM_S_LOCK
# define ANDROID_SYM_S_LOCK "_ZN7android7Surface4lockEPNS0_11SurfaceInfoEb"
#endif
#ifndef ANDROID_SYM_S_LOCK2
# define ANDROID_SYM_S_LOCK2 "_ZN7android7Surface4lockEPNS0_11SurfaceInfoEPNS_6RegionE"
#endif
#ifndef ANDROID_SYM_S_UNLOCK
# define ANDROID_SYM_S_UNLOCK "_ZN7android7Surface13unlockAndPostEv"
#endif
...
...
@@ -67,6 +70,8 @@ extern void jni_SetAndroidSurfaceSize(int width, int height);
// _ZN7android7Surface4lockEPNS0_11SurfaceInfoEb
typedef
void
(
*
Surface_lock
)(
void
*
,
void
*
,
int
);
// _ZN7android7Surface4lockEPNS0_11SurfaceInfoEPNS_6RegionE
typedef
void
(
*
Surface_lock2
)(
void
*
,
void
*
,
void
*
);
// _ZN7android7Surface13unlockAndPostEv
typedef
void
(
*
Surface_unlockAndPost
)(
void
*
);
...
...
@@ -83,6 +88,7 @@ struct vout_display_sys_t {
picture_pool_t
*
pool
;
void
*
p_library
;
Surface_lock
s_lock
;
Surface_lock2
s_lock2
;
Surface_unlockAndPost
s_unlockAndPost
;
picture_resource_t
resource
;
...
...
@@ -115,9 +121,10 @@ static inline void *LoadSurface(const char *psz_lib, vout_display_sys_t *sys) {
void
*
p_library
=
dlopen
(
psz_lib
,
RTLD_NOW
);
if
(
p_library
)
{
sys
->
s_lock
=
(
Surface_lock
)(
dlsym
(
p_library
,
ANDROID_SYM_S_LOCK
));
sys
->
s_lock2
=
(
Surface_lock2
)(
dlsym
(
p_library
,
ANDROID_SYM_S_LOCK2
));
sys
->
s_unlockAndPost
=
(
Surface_unlockAndPost
)(
dlsym
(
p_library
,
ANDROID_SYM_S_UNLOCK
));
if
(
sys
->
s_lock
&&
sys
->
s_unlockAndPost
)
{
if
(
(
sys
->
s_lock
||
sys
->
s_lock2
)
&&
sys
->
s_unlockAndPost
)
{
return
p_library
;
}
dlclose
(
p_library
);
...
...
@@ -129,6 +136,8 @@ static void *InitLibrary(vout_display_sys_t *sys) {
void
*
p_library
;
if
((
p_library
=
LoadSurface
(
"libsurfaceflinger_client.so"
,
sys
)))
return
p_library
;
if
((
p_library
=
LoadSurface
(
"libgui.so"
,
sys
)))
return
p_library
;
return
LoadSurface
(
"libui.so"
,
sys
);
}
...
...
@@ -154,7 +163,7 @@ static int Open(vlc_object_t *p_this) {
sys
->
p_library
=
p_library
=
InitLibrary
(
sys
);
if
(
!
p_library
)
{
free
(
sys
);
msg_Err
(
vd
,
"Could not initialize libui.so/libsurfaceflinger_client.so!"
);
msg_Err
(
vd
,
"Could not initialize libui.so/lib
gui.so/lib
surfaceflinger_client.so!"
);
vlc_mutex_unlock
(
&
single_instance
);
return
VLC_EGENERIC
;
}
...
...
@@ -253,7 +262,10 @@ static int AndroidLockSurface(picture_t *picture) {
return
VLC_EGENERIC
;
}
sys
->
s_lock
(
surf
,
info
,
1
);
if
(
sys
->
s_lock
)
sys
->
s_lock
(
surf
,
info
,
1
);
else
sys
->
s_lock2
(
surf
,
info
,
NULL
);
// input size doesn't match the surface size,
// request a resize
...
...
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