Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
VideoLAN
VLC-Android
Commits
1de1ab2c
Commit
1de1ab2c
authored
Mar 31, 2015
by
Thomas Guillem
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use HWDecoderUtil.getAudioOutputFromDevice
parent
71e78226
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
9 deletions
+12
-9
libvlc/src/org/videolan/libvlc/LibVLC.java
libvlc/src/org/videolan/libvlc/LibVLC.java
+5
-4
vlc-android/src/org/videolan/vlc/gui/PreferencesActivity.java
...android/src/org/videolan/vlc/gui/PreferencesActivity.java
+7
-5
No files found.
libvlc/src/org/videolan/libvlc/LibVLC.java
View file @
1de1ab2c
...
@@ -318,10 +318,11 @@ public class LibVLC {
...
@@ -318,10 +318,11 @@ public class LibVLC {
}
}
public
void
setAout
(
int
aout
)
{
public
void
setAout
(
int
aout
)
{
if
(
aout
==
AOUT_OPENSLES
&&
LibVlcUtil
.
isICSOrLater
())
final
HWDecoderUtil
.
AudioOutput
hwaout
=
HWDecoderUtil
.
getAudioOutputFromDevice
();
this
.
aout
=
AOUT_OPENSLES
;
if
(
hwaout
==
HWDecoderUtil
.
AudioOutput
.
AUDIOTRACK
||
hwaout
==
HWDecoderUtil
.
AudioOutput
.
OPENSLES
)
else
aout
=
hwaout
==
HWDecoderUtil
.
AudioOutput
.
OPENSLES
?
AOUT_OPENSLES
:
AOUT_AUDIOTRACK
;
this
.
aout
=
AOUT_AUDIOTRACK
;
this
.
aout
=
aout
==
AOUT_OPENSLES
?
AOUT_OPENSLES
:
AOUT_AUDIOTRACK
;
}
}
public
int
getVout
()
{
public
int
getVout
()
{
...
...
vlc-android/src/org/videolan/vlc/gui/PreferencesActivity.java
View file @
1de1ab2c
...
@@ -20,6 +20,7 @@
...
@@ -20,6 +20,7 @@
package
org.videolan.vlc.gui
;
package
org.videolan.vlc.gui
;
import
org.videolan.libvlc.HWDecoderUtil
;
import
org.videolan.libvlc.LibVLC
;
import
org.videolan.libvlc.LibVLC
;
import
org.videolan.libvlc.LibVlcUtil
;
import
org.videolan.libvlc.LibVlcUtil
;
import
org.videolan.vlc.MediaDatabase
;
import
org.videolan.vlc.MediaDatabase
;
...
@@ -219,7 +220,12 @@ public class PreferencesActivity extends PreferenceActivity implements OnSharedP
...
@@ -219,7 +220,12 @@ public class PreferencesActivity extends PreferenceActivity implements OnSharedP
// Audio output
// Audio output
ListPreference
aoutPref
=
(
ListPreference
)
findPreference
(
"aout"
);
ListPreference
aoutPref
=
(
ListPreference
)
findPreference
(
"aout"
);
if
(
LibVlcUtil
.
isGingerbreadOrLater
())
{
final
HWDecoderUtil
.
AudioOutput
aout
=
HWDecoderUtil
.
getAudioOutputFromDevice
();
if
(
aout
==
HWDecoderUtil
.
AudioOutput
.
AUDIOTRACK
||
aout
==
HWDecoderUtil
.
AudioOutput
.
OPENSLES
)
{
/* no AudioOutput choice */
PreferenceGroup
group
=
(
PreferenceGroup
)
findPreference
(
"advanced_prefs_group"
);
group
.
removePreference
(
aoutPref
);
}
else
{
int
aoutEntriesId
=
R
.
array
.
aouts
;
int
aoutEntriesId
=
R
.
array
.
aouts
;
int
aoutEntriesIdValues
=
R
.
array
.
aouts_values
;
int
aoutEntriesIdValues
=
R
.
array
.
aouts_values
;
aoutPref
.
setEntries
(
aoutEntriesId
);
aoutPref
.
setEntries
(
aoutEntriesId
);
...
@@ -233,10 +239,6 @@ public class PreferencesActivity extends PreferenceActivity implements OnSharedP
...
@@ -233,10 +239,6 @@ public class PreferencesActivity extends PreferenceActivity implements OnSharedP
if
(
intValue
!=
LibVLC
.
AOUT_AUDIOTRACK
&&
intValue
!=
LibVLC
.
AOUT_OPENSLES
)
if
(
intValue
!=
LibVLC
.
AOUT_AUDIOTRACK
&&
intValue
!=
LibVLC
.
AOUT_OPENSLES
)
aoutPref
.
setValue
(
String
.
valueOf
(
LibVLC
.
AOUT_AUDIOTRACK
));
aoutPref
.
setValue
(
String
.
valueOf
(
LibVLC
.
AOUT_AUDIOTRACK
));
}
}
}
else
{
/* only audiotrack before gingerbread */
PreferenceGroup
group
=
(
PreferenceGroup
)
findPreference
(
"advanced_prefs_group"
);
group
.
removePreference
(
aoutPref
);
}
}
// Video output
// Video output
// FIXME : This setting is disable until OpenGL it's fixed
// FIXME : This setting is disable until OpenGL it's fixed
...
...
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