Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
VLC-Android
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
319
Issues
319
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
VideoLAN
VLC-Android
Commits
645e32af
Commit
645e32af
authored
Apr 07, 2015
by
Thomas Guillem
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
LibVLC: add a method to activate spdif and surround
parent
4c3e3aa4
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
2 deletions
+18
-2
libvlc/jni/libvlcjni.c
libvlc/jni/libvlcjni.c
+9
-2
libvlc/src/org/videolan/libvlc/LibVLC.java
libvlc/src/org/videolan/libvlc/LibVLC.java
+9
-0
No files found.
libvlc/jni/libvlcjni.c
View file @
645e32af
...
...
@@ -461,7 +461,10 @@ void Java_org_videolan_libvlc_LibVLC_nativeInit(JNIEnv *env, jobject thiz)
(
*
env
)
->
ReleaseStringUTFChars
(
env
,
cachePath
,
cache_path
);
}
#define MAX_ARGV 20
methodId
=
(
*
env
)
->
GetMethodID
(
env
,
cls
,
"isHdmiAudioEnabled"
,
"()Z"
);
bool
hdmi_audio
=
(
*
env
)
->
CallBooleanMethod
(
env
,
thiz
,
methodId
);
#define MAX_ARGV 22
const
char
*
argv
[
MAX_ARGV
];
int
argc
=
0
;
...
...
@@ -500,7 +503,11 @@ void Java_org_videolan_libvlc_LibVLC_nativeInit(JNIEnv *env, jobject thiz)
argv
[
argc
++
]
=
"--no-omxil-dr"
;
#endif
}
if
(
hdmi_audio
)
{
argv
[
argc
++
]
=
"--spdif"
;
argv
[
argc
++
]
=
"--audiotrack-audio-channels"
;
argv
[
argc
++
]
=
"8"
;
// 7.1 maximum
}
argv
[
argc
++
]
=
b_verbose
?
"-vvv"
:
"-vv"
;
/* Reconnect on lost HTTP streams, e.g. network change */
...
...
libvlc/src/org/videolan/libvlc/LibVLC.java
View file @
645e32af
...
...
@@ -86,6 +86,7 @@ public class LibVLC {
private
boolean
frameSkip
=
false
;
private
int
networkCaching
=
0
;
private
boolean
httpReconnect
=
false
;
private
boolean
hdmiAudioEnabled
=
false
;
/** Path of application-specific cache */
private
String
mCachePath
=
""
;
...
...
@@ -338,6 +339,14 @@ public class LibVLC {
this
.
vout
=
VOUT_ANDROID_WINDOW
;
}
public
void
setHdmiAudioEnabled
(
boolean
enable
)
{
this
.
hdmiAudioEnabled
=
enable
;
}
public
boolean
isHdmiAudioEnabled
()
{
return
this
.
hdmiAudioEnabled
;
}
public
boolean
useCompatSurface
()
{
return
this
.
vout
!=
VOUT_ANDROID_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