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
c9640234
Commit
c9640234
authored
Nov 14, 2014
by
Thomas Guillem
Committed by
Jean-Baptiste Kempf
Nov 15, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nativewindowpriv: fix connect before ics
Signed-off-by:
Jean-Baptiste Kempf
<
jb@videolan.org
>
parent
65c6b73a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
9 deletions
+21
-9
modules/video_output/android/nativewindowpriv.c
modules/video_output/android/nativewindowpriv.c
+21
-9
No files found.
modules/video_output/android/nativewindowpriv.c
View file @
c9640234
...
@@ -77,6 +77,24 @@ struct native_window_priv
...
@@ -77,6 +77,24 @@ struct native_window_priv
}\
}\
} while (0)
} while (0)
static
int
window_connect
(
ANativeWindow
*
anw
)
{
#if ANDROID_API >= 14
return
native_window_api_connect
(
anw
,
NATIVE_WINDOW_API_MEDIA
);
#else
return
native_window_connect
(
anw
,
NATIVE_WINDOW_API_EGL
);
#endif
}
static
int
window_disconnect
(
ANativeWindow
*
anw
)
{
#if ANDROID_API >= 14
return
native_window_api_disconnect
(
anw
,
NATIVE_WINDOW_API_MEDIA
);
#else
return
native_window_disconnect
(
anw
,
NATIVE_WINDOW_API_EGL
);
#endif
}
native_window_priv
*
ANativeWindowPriv_connect
(
void
*
window
)
native_window_priv
*
ANativeWindowPriv_connect
(
void
*
window
)
{
{
native_window_priv
*
priv
;
native_window_priv
*
priv
;
...
@@ -93,19 +111,15 @@ native_window_priv *ANativeWindowPriv_connect( void *window )
...
@@ -93,19 +111,15 @@ native_window_priv *ANativeWindowPriv_connect( void *window )
&
module
)
!=
0
)
&
module
)
!=
0
)
return
NULL
;
return
NULL
;
#if ANDROID_API >= 14
if
(
window_connect
(
anw
)
!=
0
)
{
if
(
native_window_api_connect
(
anw
,
NATIVE_WINDOW_API_MEDIA
)
!=
0
)
{
LOGE
(
"native_window_api_connect FAIL"
);
LOGE
(
"native_window_api_connect FAIL"
);
return
NULL
;
return
NULL
;
}
}
#endif
priv
=
calloc
(
1
,
sizeof
(
native_window_priv
)
);
priv
=
calloc
(
1
,
sizeof
(
native_window_priv
)
);
if
(
!
priv
)
{
if
(
!
priv
)
{
#if ANDROID_API >= 14
window_disconnect
(
anw
);
native_window_api_disconnect
(
anw
,
NATIVE_WINDOW_API_MEDIA
);
#endif
return
NULL
;
return
NULL
;
}
}
priv
->
anw
=
anw
;
priv
->
anw
=
anw
;
...
@@ -116,9 +130,7 @@ native_window_priv *ANativeWindowPriv_connect( void *window )
...
@@ -116,9 +130,7 @@ native_window_priv *ANativeWindowPriv_connect( void *window )
int
ANativeWindowPriv_disconnect
(
native_window_priv
*
priv
)
int
ANativeWindowPriv_disconnect
(
native_window_priv
*
priv
)
{
{
#if ANDROID_API >= 14
window_disconnect
(
priv
->
anw
);
native_window_api_disconnect
(
priv
->
anw
,
NATIVE_WINDOW_API_MEDIA
);
#endif
free
(
priv
);
free
(
priv
);
return
0
;
return
0
;
...
...
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