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
d959364c
Commit
d959364c
authored
Jan 11, 2007
by
Filippo Carone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
audio methods aligned to libvlc audio functions
parent
4db4b3af
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
27 deletions
+21
-27
bindings/java/VLCExample.java
bindings/java/VLCExample.java
+10
-10
bindings/java/org/videolan/jvlc/Audio.java
bindings/java/org/videolan/jvlc/Audio.java
+4
-4
bindings/java/org/videolan/jvlc/AudioIntf.java
bindings/java/org/videolan/jvlc/AudioIntf.java
+2
-2
bindings/java/src/audio-jni.cc
bindings/java/src/audio-jni.cc
+5
-11
No files found.
bindings/java/VLCExample.java
View file @
d959364c
...
...
@@ -67,16 +67,16 @@ public class VLCExample
System
.
out
.
print
(
"Setting volume to 150... "
);
jvlc
.
audio
.
setVolume
(
150
);
System
.
out
.
println
(
"done"
);
System
.
out
.
println
(
"Audio channel info: "
+
jvlc
.
audio
.
getChannel
());
System
.
out
.
println
(
"Audio track info: "
+
jvlc
.
audio
.
getTrack
());
System
.
out
.
print
(
"Setting left channel... "
);
jvlc
.
audio
.
setChannel
(
"left"
);
System
.
out
.
print
(
"done."
);
Thread
.
sleep
(
3000
);
System
.
out
.
print
(
"Setting right channel... "
);
jvlc
.
audio
.
setChannel
(
AudioIntf
.
RIGHT_CHANNEL
);
System
.
out
.
print
(
"done."
);
Thread
.
sleep
(
3000
);
//
System.out.println("Audio channel info: " + jvlc.audio.getChannel());
//
System.out.println("Audio track info: " + jvlc.audio.getTrack());
//
System.out.print("Setting left channel... ");
//
jvlc.audio.setChannel("left");
//
System.out.print("done.");
//
Thread.sleep(3000);
//
System.out.print("Setting right channel... ");
//
jvlc.audio.setChannel(AudioIntf.RIGHT_CHANNEL);
//
System.out.print("done.");
//
Thread.sleep(3000);
System
.
out
.
println
(
"INPUT INFORMATION"
);
System
.
out
.
println
(
"-----------------"
);
System
.
out
.
println
(
"Total length (ms) :\t"
+
jvlc
.
input
.
getLength
());
...
...
bindings/java/org/videolan/jvlc/Audio.java
View file @
d959364c
...
...
@@ -6,8 +6,8 @@ public class Audio implements AudioIntf {
private
native
int
_getTrack
();
private
native
void
_setTrack
(
int
track
);
private
native
String
_getChannel
();
private
native
void
_setChannel
(
String
channel
);
private
native
int
_getChannel
();
private
native
void
_setChannel
(
int
channel
);
private
native
boolean
_getMute
();
private
native
void
_setMute
(
boolean
value
);
private
native
void
_toggleMute
();
...
...
@@ -26,11 +26,11 @@ public class Audio implements AudioIntf {
_setTrack
(
track
);
}
public
String
getChannel
()
throws
VLCException
{
public
int
getChannel
()
throws
VLCException
{
return
_getChannel
();
}
public
void
setChannel
(
String
channel
)
throws
VLCException
{
public
void
setChannel
(
int
channel
)
throws
VLCException
{
_setChannel
(
channel
);
}
...
...
bindings/java/org/videolan/jvlc/AudioIntf.java
View file @
d959364c
...
...
@@ -71,13 +71,13 @@ public interface AudioIntf {
* @return channel
* @throws VLCException
*/
String
getChannel
()
throws
VLCException
;
int
getChannel
()
throws
VLCException
;
/**
* @param channel
* @throws VLCException
*/
void
setChannel
(
String
channel
)
throws
VLCException
;
void
setChannel
(
int
channel
)
throws
VLCException
;
/**
...
...
bindings/java/src/audio-jni.cc
View file @
d959364c
...
...
@@ -57,29 +57,23 @@ JNIEXPORT void JNICALL Java_org_videolan_jvlc_Audio__1setTrack (JNIEnv *env, job
CHECK_EXCEPTION_FREE
;
}
JNIEXPORT
j
string
JNICALL
Java_org_videolan_jvlc_Audio__1getChannel
(
JNIEnv
*
env
,
jobject
_this
)
JNIEXPORT
j
int
JNICALL
Java_org_videolan_jvlc_Audio__1getChannel
(
JNIEnv
*
env
,
jobject
_this
)
{
INIT_FUNCTION
;
char
*
res
;
res
=
libvlc_audio_get_channel
(
(
libvlc_instance_t
*
)
instance
,
exception
);
int
res
=
libvlc_audio_get_channel
(
(
libvlc_instance_t
*
)
instance
,
exception
);
CHECK_EXCEPTION_FREE
;
return
env
->
NewStringUTF
(
res
)
;
return
res
;
}
JNIEXPORT
void
JNICALL
Java_org_videolan_jvlc_Audio__1setChannel
(
JNIEnv
*
env
,
jobject
_this
,
j
string
channel
)
JNIEXPORT
void
JNICALL
Java_org_videolan_jvlc_Audio__1setChannel
(
JNIEnv
*
env
,
jobject
_this
,
j
int
channel
)
{
INIT_FUNCTION
;
const
char
*
value
=
env
->
GetStringUTFChars
(
channel
,
0
);
libvlc_audio_set_channel
(
(
libvlc_instance_t
*
)
instance
,
channel
,
exception
);
libvlc_audio_set_channel
(
(
libvlc_instance_t
*
)
instance
,
(
char
*
)
value
,
exception
);
env
->
ReleaseStringUTFChars
(
channel
,
value
);
CHECK_EXCEPTION_FREE
;
}
...
...
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