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
842b6578
Commit
842b6578
authored
Sep 30, 2014
by
Thomas Guillem
Committed by
Jean-Baptiste Kempf
Oct 01, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nativewindowpriv: add setOrientation
Signed-off-by:
Jean-Baptiste Kempf
<
jb@videolan.org
>
parent
cd6fd1d8
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
2 deletions
+35
-2
modules/video_output/android/nativewindowpriv.c
modules/video_output/android/nativewindowpriv.c
+29
-0
modules/video_output/android/utils.c
modules/video_output/android/utils.c
+3
-2
modules/video_output/android/utils.h
modules/video_output/android/utils.h
+3
-0
No files found.
modules/video_output/android/nativewindowpriv.c
View file @
842b6578
...
...
@@ -259,3 +259,32 @@ int ANativeWindowPriv_cancel( void *window, void *p_handle )
return
0
;
}
int
ANativeWindowPriv_setOrientation
(
void
*
window
,
int
orientation
)
{
ANativeWindow
*
anw
=
(
ANativeWindow
*
)
window
;
status_t
err
=
NO_ERROR
;
int
transform
;
CHECK_ANW
();
switch
(
orientation
)
{
case
90
:
transform
=
NATIVE_WINDOW_TRANSFORM_ROT_90
;
break
;
case
180
:
transform
=
NATIVE_WINDOW_TRANSFORM_ROT_180
;
break
;
case
270
:
transform
=
NATIVE_WINDOW_TRANSFORM_ROT_270
;
break
;
default:
transform
=
0
;
}
err
=
native_window_set_buffers_transform
(
anw
,
transform
);
CHECK_ERR
();
return
0
;
}
modules/video_output/android/utils.c
View file @
842b6578
...
...
@@ -61,11 +61,12 @@ int LoadNativeWindowPrivAPI(native_window_priv_api_t *native)
native
->
lock
=
dlsym
(
RTLD_DEFAULT
,
"ANativeWindowPriv_lock"
);
native
->
queue
=
dlsym
(
RTLD_DEFAULT
,
"ANativeWindowPriv_queue"
);
native
->
cancel
=
dlsym
(
RTLD_DEFAULT
,
"ANativeWindowPriv_cancel"
);
native
->
setOrientation
=
dlsym
(
RTLD_DEFAULT
,
"ANativeWindowPriv_setOrientation"
);
return
native
->
connect
&&
native
->
disconnect
&&
native
->
setup
&&
native
->
getMinUndequeued
&&
native
->
setBufferCount
&&
native
->
setCrop
&&
native
->
dequeue
&&
native
->
lock
&&
native
->
queue
&&
native
->
cancel
?
0
:
-
1
;
native
->
dequeue
&&
native
->
lock
&&
native
->
queue
&&
native
->
cancel
&&
native
->
setOrientation
?
0
:
-
1
;
}
extern
void
jni_getMouseCoordinates
(
int
*
,
int
*
,
int
*
,
int
*
);
...
...
modules/video_output/android/utils.h
View file @
842b6578
...
...
@@ -59,6 +59,8 @@ typedef int (*ptr_ANativeWindowPriv_dequeue) (void *, void **);
typedef
int
(
*
ptr_ANativeWindowPriv_lock
)
(
void
*
,
void
*
);
typedef
int
(
*
ptr_ANativeWindowPriv_queue
)
(
void
*
,
void
*
);
typedef
int
(
*
ptr_ANativeWindowPriv_cancel
)
(
void
*
,
void
*
);
typedef
int
(
*
ptr_ANativeWindowPriv_setOrientation
)
(
void
*
,
int
);
typedef
struct
{
ptr_ANativeWindowPriv_connect
connect
;
...
...
@@ -71,6 +73,7 @@ typedef struct
ptr_ANativeWindowPriv_lock
lock
;
ptr_ANativeWindowPriv_queue
queue
;
ptr_ANativeWindowPriv_cancel
cancel
;
ptr_ANativeWindowPriv_setOrientation
setOrientation
;
}
native_window_priv_api_t
;
/* Fill the structure passed as parameter and return 0 if all symbols are
...
...
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