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
429baf94
Commit
429baf94
authored
Apr 10, 2015
by
Thomas Guillem
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
android_window: move AndroidWindow_SetSurface up
parent
a83f5d13
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
31 deletions
+31
-31
modules/video_output/android/android_window.c
modules/video_output/android/android_window.c
+31
-31
No files found.
modules/video_output/android/android_window.c
View file @
429baf94
...
@@ -284,6 +284,37 @@ static void SetupPictureYV12(picture_t *p_picture, uint32_t i_in_stride)
...
@@ -284,6 +284,37 @@ static void SetupPictureYV12(picture_t *p_picture, uint32_t i_in_stride)
}
}
}
}
static
int
AndroidWindow_SetSurface
(
vout_display_sys_t
*
sys
,
android_window
*
p_window
,
jobject
jsurf
)
{
if
(
jsurf
!=
p_window
->
jsurf
)
{
if
(
p_window
->
p_handle_priv
)
{
sys
->
anwp
.
disconnect
(
p_window
->
p_handle_priv
);
p_window
->
p_handle_priv
=
NULL
;
}
if
(
p_window
->
p_handle
)
{
sys
->
anw
.
winRelease
(
p_window
->
p_handle
);
p_window
->
p_handle
=
NULL
;
}
}
p_window
->
jsurf
=
jsurf
;
if
(
!
p_window
->
jsurf
)
return
-
1
;
if
(
!
p_window
->
p_handle
&&
!
p_window
->
b_opaque
)
{
JNIEnv
*
p_env
;
if
(
!
(
p_env
=
jni_get_env
(
THREAD_NAME
)))
return
-
1
;
p_window
->
p_handle
=
sys
->
anw
.
winFromSurface
(
p_env
,
p_window
->
jsurf
);
if
(
!
p_window
->
p_handle
)
return
-
1
;
}
return
0
;
}
static
android_window
*
AndroidWindow_New
(
vout_display_sys_t
*
sys
,
static
android_window
*
AndroidWindow_New
(
vout_display_sys_t
*
sys
,
video_format_t
*
p_fmt
,
video_format_t
*
p_fmt
,
bool
b_use_priv
)
bool
b_use_priv
)
...
@@ -326,37 +357,6 @@ static android_window *AndroidWindow_New(vout_display_sys_t *sys,
...
@@ -326,37 +357,6 @@ static android_window *AndroidWindow_New(vout_display_sys_t *sys,
return
p_window
;
return
p_window
;
}
}
static
int
AndroidWindow_SetSurface
(
vout_display_sys_t
*
sys
,
android_window
*
p_window
,
jobject
jsurf
)
{
if
(
jsurf
!=
p_window
->
jsurf
)
{
if
(
p_window
->
p_handle_priv
)
{
sys
->
anwp
.
disconnect
(
p_window
->
p_handle_priv
);
p_window
->
p_handle_priv
=
NULL
;
}
if
(
p_window
->
p_handle
)
{
sys
->
anw
.
winRelease
(
p_window
->
p_handle
);
p_window
->
p_handle
=
NULL
;
}
}
p_window
->
jsurf
=
jsurf
;
if
(
!
p_window
->
jsurf
)
return
-
1
;
if
(
!
p_window
->
p_handle
&&
!
p_window
->
b_opaque
)
{
JNIEnv
*
p_env
;
if
(
!
(
p_env
=
jni_get_env
(
THREAD_NAME
)))
return
-
1
;
p_window
->
p_handle
=
sys
->
anw
.
winFromSurface
(
p_env
,
p_window
->
jsurf
);
if
(
!
p_window
->
p_handle
)
return
-
1
;
}
return
0
;
}
static
void
AndroidWindow_Destroy
(
vout_display_sys_t
*
sys
,
static
void
AndroidWindow_Destroy
(
vout_display_sys_t
*
sys
,
android_window
*
p_window
)
android_window
*
p_window
)
{
{
...
...
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