Fix some warnings.

This commit is contained in:
Oliver Woodman 2015-11-17 16:03:10 +00:00
parent 8234a25110
commit 80e829d7d1
3 changed files with 13 additions and 1 deletions

View File

@ -15,6 +15,8 @@
*/
package com.google.android.exoplayer;
import com.google.android.exoplayer.util.Util;
import android.media.AudioFormat;
import android.media.MediaCodec;
import android.media.MediaExtractor;
@ -73,6 +75,15 @@ public final class C {
public static final int ENCODING_DTS = 7;
public static final int ENCODING_DTS_HD = 8;
// TODO: Change 6396 to AudioFormat.CHANNEL_OUT_7POINT1_SURROUND when the target API version is
// >= 23.
/**
* @see AudioFormat#CHANNEL_OUT_7POINT1_SURROUND
*/
@SuppressWarnings({"InlinedApi", "deprecation"})
public static final int CHANNEL_OUT_7POINT1_SURROUND = Util.SDK_INT < 23
? AudioFormat.CHANNEL_OUT_7POINT1 : 6396;
/**
* @see MediaExtractor#SAMPLE_FLAG_SYNC
*/

View File

@ -398,7 +398,7 @@ public final class AudioTrack {
channelConfig = AudioFormat.CHANNEL_OUT_5POINT1;
break;
case 8:
channelConfig = AudioFormat.CHANNEL_OUT_7POINT1;
channelConfig = C.CHANNEL_OUT_7POINT1_SURROUND;
break;
default:
throw new IllegalArgumentException("Unsupported channel count: " + channelCount);

View File

@ -434,6 +434,7 @@ public class StreamingDrmSessionManager implements DrmSessionManager {
super(looper);
}
@SuppressWarnings("deprecation")
@Override
public void handleMessage(Message msg) {
if (openCount == 0 || (state != STATE_OPENED && state != STATE_OPENED_WITH_KEYS)) {