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
d7ad3f6f
Commit
d7ad3f6f
authored
Sep 20, 2012
by
Ludovic Fauvet
Committed by
Jean-Baptiste Kempf
Sep 21, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
android vout: expose the density to the JNI
parent
1394bd28
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
modules/video_output/androidsurface.c
modules/video_output/androidsurface.c
+9
-2
No files found.
modules/video_output/androidsurface.c
View file @
d7ad3f6f
...
...
@@ -66,7 +66,7 @@ vlc_module_end()
extern
void
*
jni_LockAndGetAndroidSurface
();
extern
void
jni_UnlockAndroidSurface
();
extern
void
jni_SetAndroidSurfaceSize
(
int
width
,
int
height
);
extern
void
jni_SetAndroidSurfaceSize
(
int
width
,
int
height
,
int
sar_num
,
int
sar_den
);
// _ZN7android7Surface4lockEPNS0_11SurfaceInfoEb
typedef
void
(
*
Surface_lock
)(
void
*
,
void
*
,
int
);
...
...
@@ -92,6 +92,10 @@ struct vout_display_sys_t {
Surface_unlockAndPost
s_unlockAndPost
;
picture_resource_t
resource
;
/* density */
int
i_sar_num
;
int
i_sar_den
;
};
/* */
...
...
@@ -218,6 +222,9 @@ static int Open(vlc_object_t *p_this) {
/* Fix initial state */
vout_display_SendEventFullscreen
(
vd
,
false
);
sys
->
i_sar_num
=
vd
->
source
.
i_sar_num
;
sys
->
i_sar_den
=
vd
->
source
.
i_sar_den
;
return
VLC_SUCCESS
;
enomem:
...
...
@@ -270,7 +277,7 @@ static int AndroidLockSurface(picture_t *picture) {
// input size doesn't match the surface size,
// request a resize
if
(
info
->
w
!=
sw
||
info
->
h
!=
sh
)
{
jni_SetAndroidSurfaceSize
(
sw
,
sh
);
jni_SetAndroidSurfaceSize
(
sw
,
sh
,
sys
->
i_sar_num
,
sys
->
i_sar_den
);
sys
->
s_unlockAndPost
(
surf
);
jni_UnlockAndroidSurface
();
return
VLC_EGENERIC
;
...
...
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