Commit 1d636520 by tonihei Committed by Oliver Woodman

Auto-register AnalyticsCollector as bandwidth meter listener.

This allows to automatically forward bandwidth estimate events to
AnalyticsListeners.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=205642752
parent 3c4b0aa1
......@@ -4,6 +4,8 @@
* Add `AudioListener` for listening to changes in audio configuration during
playback ([#3994](https://github.com/google/ExoPlayer/issues/3994)).
* MPEG-TS: Support CEA-608/708 in H262
([#2565](https://github.com/google/ExoPlayer/issues/2565)).
* MPEG-PS: Support reading duration from MPEG-PS Streams
([#4476](https://github.com/google/ExoPlayer/issues/4476)).
* MediaSession extension:
......
......@@ -80,12 +80,6 @@ public final class C {
/** The number of bits per byte. */
public static final int BITS_PER_BYTE = 8;
/** non-Wide aspect ratio */
public static final int NON_WIDE_ASPECT_RATIO_TYPE = 1;
/** Wide aspect ratio */
public static final int WIDE_ASPECT_RATIO_TYPE = 2;
/**
* The name of the ASCII charset.
*/
......
......@@ -80,6 +80,7 @@ public class SimpleExoPlayer
private final CopyOnWriteArraySet<MetadataOutput> metadataOutputs;
private final CopyOnWriteArraySet<VideoRendererEventListener> videoDebugListeners;
private final CopyOnWriteArraySet<AudioRendererEventListener> audioDebugListeners;
private final BandwidthMeter bandwidthMeter;
private final AnalyticsCollector analyticsCollector;
private Format videoFormat;
......@@ -181,6 +182,7 @@ public class SimpleExoPlayer
AnalyticsCollector.Factory analyticsCollectorFactory,
Clock clock,
Looper looper) {
this.bandwidthMeter = bandwidthMeter;
componentListener = new ComponentListener();
videoListeners = new CopyOnWriteArraySet<>();
audioListeners = new CopyOnWriteArraySet<>();
......@@ -215,6 +217,7 @@ public class SimpleExoPlayer
audioDebugListeners.add(analyticsCollector);
audioListeners.add(analyticsCollector);
addMetadataOutput(analyticsCollector);
bandwidthMeter.addEventListener(eventHandler, analyticsCollector);
if (drmSessionManager instanceof DefaultDrmSessionManager) {
((DefaultDrmSessionManager) drmSessionManager).addListener(eventHandler, analyticsCollector);
}
......@@ -854,6 +857,7 @@ public class SimpleExoPlayer
if (mediaSource != null) {
mediaSource.removeEventListener(analyticsCollector);
}
bandwidthMeter.removeEventListener(analyticsCollector);
currentCues = Collections.emptyList();
}
......
......@@ -681,7 +681,7 @@ import java.util.List;
parent.setPosition(position + Atom.HEADER_SIZE + StsdData.STSD_HEADER_SIZE);
// Default values.
List<byte[]> initializationData = null;
List<byte[]> initializationData = Collections.emptyList();
long subsampleOffsetUs = Format.OFFSET_SAMPLE_RELATIVE;
String mimeType;
......@@ -707,8 +707,18 @@ import java.util.List;
throw new IllegalStateException();
}
out.format = Format.createTextSampleFormat(Integer.toString(trackId), mimeType, null,
Format.NO_VALUE, 0, language, Format.NO_VALUE, null, subsampleOffsetUs, initializationData);
out.format =
Format.createTextSampleFormat(
Integer.toString(trackId),
mimeType,
/* codecs= */ null,
/* bitrate= */ Format.NO_VALUE,
/* selectionFlags= */ 0,
language,
/* accessibilityChannel= */ Format.NO_VALUE,
/* drmInitData= */ null,
subsampleOffsetUs,
initializationData);
}
private static void parseVideoSampleEntry(ParsableByteArray parent, int atomType, int position,
......
......@@ -15,13 +15,11 @@
*/
package com.google.android.exoplayer2.extractor.ts;
import android.os.Bundle;
import android.support.annotation.IntDef;
import android.util.SparseArray;
import com.google.android.exoplayer2.C;
import com.google.android.exoplayer2.Format;
import com.google.android.exoplayer2.extractor.ts.TsPayloadReader.EsInfo;
import com.google.android.exoplayer2.text.cea.Cea708InitializationData;
import com.google.android.exoplayer2.util.MimeTypes;
import com.google.android.exoplayer2.util.ParsableByteArray;
import java.lang.annotation.Retention;
......@@ -82,13 +80,6 @@ public final class DefaultTsPayloadReaderFactory implements TsPayloadReader.Fact
*/
public DefaultTsPayloadReaderFactory(@Flags int flags, List<Format> closedCaptionFormats) {
this.flags = flags;
if (!isSet(FLAG_OVERRIDE_CAPTION_DESCRIPTORS) && closedCaptionFormats.isEmpty()) {
closedCaptionFormats = new ArrayList();
closedCaptionFormats.add(Format.createTextSampleFormat(null,
MimeTypes.APPLICATION_CEA608, 0, null));
closedCaptionFormats.add(Format.createTextSampleFormat(null,
MimeTypes.APPLICATION_CEA708, 0, null));
}
this.closedCaptionFormats = closedCaptionFormats;
}
......@@ -146,32 +137,32 @@ public final class DefaultTsPayloadReaderFactory implements TsPayloadReader.Fact
* @return A {@link SeiReader} for closed caption tracks.
*/
private SeiReader buildSeiReader(EsInfo esInfo) {
return new SeiReader(getCCformats(esInfo));
return new SeiReader(getClosedCaptionFormats(esInfo));
}
/**
* If {@link #FLAG_OVERRIDE_CAPTION_DESCRIPTORS} is set, returns a {@link UserDataReader} for
* {@link #closedCaptionFormats}. If unset, parses the PMT descriptor information and returns a
* {@link UserDataReader} for the declared formats, or {@link #closedCaptionFormats} if the descriptor
* is not present.
* {@link UserDataReader} for the declared formats, or {@link #closedCaptionFormats} if the
* descriptor is not present.
*
* @param esInfo The {@link EsInfo} passed to {@link #createPayloadReader(int, EsInfo)}.
* @return A {@link UserDataReader} for closed caption tracks.
*/
private UserDataReader buildUserDataReader(EsInfo esInfo) {
return new UserDataReader(getCCformats(esInfo));
return new UserDataReader(getClosedCaptionFormats(esInfo));
}
/**
* If {@link #FLAG_OVERRIDE_CAPTION_DESCRIPTORS} is set, returns a {@link List<Format>} of
* {@link #closedCaptionFormats}. If unset, parses the PMT descriptor information and returns a
* {@link List<Format>} for the declared formats, or {@link #closedCaptionFormats} if the descriptor
* is not present.
* If {@link #FLAG_OVERRIDE_CAPTION_DESCRIPTORS} is set, returns a {@link List<Format>} of {@link
* #closedCaptionFormats}. If unset, parses the PMT descriptor information and returns a {@link
* List<Format>} for the declared formats, or {@link #closedCaptionFormats} if the descriptor is
* not present.
*
* @param esInfo The {@link EsInfo} passed to {@link #createPayloadReader(int, EsInfo)}.
* @return A {@link List<Format>} containing list of closed caption formats.
*/
private List<Format> getCCformats(EsInfo esInfo) {
private List<Format> getClosedCaptionFormats(EsInfo esInfo) {
if (isSet(FLAG_OVERRIDE_CAPTION_DESCRIPTORS)) {
return closedCaptionFormats;
}
......@@ -198,16 +189,33 @@ public final class DefaultTsPayloadReaderFactory implements TsPayloadReader.Fact
mimeType = MimeTypes.APPLICATION_CEA608;
accessibilityChannel = 1;
}
// Skip easy_reader(1), wide_aspect_ratio(1), reserved(14).
byte misc = (byte)scratchDescriptorData.readUnsignedByte();
boolean isWideAspectRatio = ((misc & 0x60) == 0x60);
Bundle params = new Bundle();
params.putInt(Format.KEY_ASPECT_RATIO_TYPE,
isWideAspectRatio ? C.WIDE_ASPECT_RATIO_TYPE: C.NON_WIDE_ASPECT_RATIO_TYPE);
closedCaptionFormats.add(Format.createTextSampleFormat(null, mimeType, null,
Format.NO_VALUE, 0, language, accessibilityChannel, null,
params));
// easy_reader(1), wide_aspect_ratio(1), reserved(6).
byte flags = (byte) scratchDescriptorData.readUnsignedByte();
// Skip reserved (8).
scratchDescriptorData.skipBytes(1);
List<byte[]> initializationData;
// The wide_aspect_ratio flag only has meaning for CEA-708.
if (isDigital) {
boolean isWideAspectRatio = (flags & 0x40) != 0;
initializationData = Cea708InitializationData.buildData(isWideAspectRatio);
} else {
initializationData = Collections.emptyList();
}
closedCaptionFormats.add(
Format.createTextSampleFormat(
/* id= */ null,
mimeType,
/* codecs= */ null,
/* bitrate= */ Format.NO_VALUE,
/* selectionFlags= */ 0,
language,
accessibilityChannel,
/* drmInitData= */ null,
Format.OFFSET_SAMPLE_RELATIVE,
initializationData));
}
} else {
// Unknown descriptor. Ignore.
......@@ -221,5 +229,4 @@ public final class DefaultTsPayloadReaderFactory implements TsPayloadReader.Fact
private boolean isSet(@Flags int flag) {
return (flags & flag) != 0;
}
}
......@@ -49,9 +49,13 @@ public final class H262Reader implements ElementaryStreamReader {
private boolean hasOutputFormat;
private long frameDurationUs;
private final UserDataReader userDataReader;
private final ParsableByteArray userDataParsable;
// State that should be reset on seek.
private final boolean[] prefixFlags;
private final CsdBuffer csdBuffer;
private final NalUnitTargetBuffer userData;
private long totalBytesWritten;
private boolean startedFirstSample;
......@@ -63,13 +67,11 @@ public final class H262Reader implements ElementaryStreamReader {
private long sampleTimeUs;
private boolean sampleIsKeyframe;
private boolean sampleHasPicture;
private NalUnitTargetBuffer userData = null;
private UserDataReader userDataReader = null;
// Scratch variables to avoid allocations.
private ParsableByteArray userDataParsable = null;
public H262Reader() {
this(null);
}
public H262Reader(UserDataReader userDataReader) {
this.userDataReader = userDataReader;
prefixFlags = new boolean[4];
......@@ -77,6 +79,9 @@ public final class H262Reader implements ElementaryStreamReader {
if (userDataReader != null) {
userData = new NalUnitTargetBuffer(START_USER_DATA, 128);
userDataParsable = new ParsableByteArray();
} else {
userData = null;
userDataParsable = null;
}
}
......@@ -84,7 +89,7 @@ public final class H262Reader implements ElementaryStreamReader {
public void seek() {
NalUnitUtil.clearPrefixFlags(prefixFlags);
csdBuffer.reset();
if (userData != null) {
if (userDataReader != null) {
userData.reset();
}
totalBytesWritten = 0;
......@@ -124,7 +129,7 @@ public final class H262Reader implements ElementaryStreamReader {
if (!hasOutputFormat) {
csdBuffer.onData(dataArray, offset, limit);
}
if (userData != null) {
if (userDataReader != null) {
userData.appendToNalUnit(dataArray, offset, limit);
}
return;
......@@ -132,11 +137,11 @@ public final class H262Reader implements ElementaryStreamReader {
// We've found a start code with the following value.
int startCodeValue = data.data[startCodeOffset + 3] & 0xFF;
// This is the number of bytes from the current offset to the start of the next start
// code. It may be negative if the start code started in the previously consumed data.
int lengthToStartCode = startCodeOffset - offset;
if (!hasOutputFormat) {
// This is the number of bytes from the current offset to the start of the next start
// code. It may be negative if the start code started in the previously consumed data.
int lengthToStartCode = startCodeOffset - offset;
if (lengthToStartCode > 0) {
csdBuffer.onData(dataArray, offset, startCodeOffset);
}
......@@ -151,8 +156,7 @@ public final class H262Reader implements ElementaryStreamReader {
hasOutputFormat = true;
}
}
if (userDataReader != null && userData != null) {
int lengthToStartCode = startCodeOffset - offset;
if (userDataReader != null) {
int bytesAlreadyPassed = 0;
if (lengthToStartCode > 0) {
userData.appendToNalUnit(dataArray, offset, startCodeOffset);
......
......@@ -52,9 +52,18 @@ import java.util.List;
|| MimeTypes.APPLICATION_CEA708.equals(channelMimeType),
"Invalid closed caption mime type provided: " + channelMimeType);
String formatId = channelFormat.id != null ? channelFormat.id : idGenerator.getFormatId();
output.format(Format.createTextSampleFormat(formatId, channelMimeType, null, Format.NO_VALUE,
channelFormat.selectionFlags, channelFormat.language, channelFormat.accessibilityChannel,
null));
output.format(
Format.createTextSampleFormat(
formatId,
channelMimeType,
/* codecs= */ null,
/* bitrate= */ Format.NO_VALUE,
channelFormat.selectionFlags,
channelFormat.language,
channelFormat.accessibilityChannel,
/* drmInitData= */ null,
Format.OFFSET_SAMPLE_RELATIVE,
channelFormat.initializationData));
outputs[i] = output;
}
}
......
/*
* Copyright (C) 2017 The Android Open Source Project
* Copyright (C) 2018 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -19,39 +19,48 @@ import com.google.android.exoplayer2.C;
import com.google.android.exoplayer2.Format;
import com.google.android.exoplayer2.extractor.ExtractorOutput;
import com.google.android.exoplayer2.extractor.TrackOutput;
import com.google.android.exoplayer2.text.cea.CeaUtil;
import com.google.android.exoplayer2.util.Assertions;
import com.google.android.exoplayer2.util.MimeTypes;
import com.google.android.exoplayer2.util.ParsableByteArray;
import java.util.List;
/**
* Consumes user data structure, outputting contained CEA-608/708 messages to a {@link TrackOutput}.
*/
/** Consumes user data, outputting contained CEA-608/708 messages to a {@link TrackOutput}. */
/* package */ final class UserDataReader {
private static final int USER_DATA_START_CODE = 0x0001B2;
private final List<Format> closedCaptionFormats;
private final TrackOutput[] outputs;
private final int USER_DATA_START_CODE = 0x0001B2;
private final int USER_DATA_IDENTIFIER_GA94 = 0x47413934;
private final int USER_DATA_TYPE_CODE_MPEG_CC = 0x03;
public UserDataReader(List<Format> closedCaptionFormats) {
this.closedCaptionFormats = closedCaptionFormats;
outputs = new TrackOutput[closedCaptionFormats.size()];
}
public void createTracks(ExtractorOutput extractorOutput,
TsPayloadReader.TrackIdGenerator idGenerator) {
public void createTracks(
ExtractorOutput extractorOutput, TsPayloadReader.TrackIdGenerator idGenerator) {
for (int i = 0; i < outputs.length; i++) {
idGenerator.generateNewId();
TrackOutput output = extractorOutput.track(idGenerator.getTrackId(), C.TRACK_TYPE_TEXT);
Format channelFormat = closedCaptionFormats.get(i);
String channelMimeType = channelFormat.sampleMimeType;
Assertions.checkArgument(MimeTypes.APPLICATION_CEA608.equals(channelMimeType)
|| MimeTypes.APPLICATION_CEA708.equals(channelMimeType),
"Invalid closed caption mime type provided: " + channelMimeType);
output.format(Format.createTextSampleFormat(idGenerator.getFormatId(), channelMimeType, null,
Format.NO_VALUE, channelFormat.selectionFlags, channelFormat.language,
channelFormat.accessibilityChannel, null, channelFormat.params));
Assertions.checkArgument(
MimeTypes.APPLICATION_CEA608.equals(channelMimeType)
|| MimeTypes.APPLICATION_CEA708.equals(channelMimeType),
"Invalid closed caption mime type provided: " + channelMimeType);
output.format(
Format.createTextSampleFormat(
idGenerator.getFormatId(),
channelMimeType,
/* codecs= */ null,
/* bitrate= */ Format.NO_VALUE,
channelFormat.selectionFlags,
channelFormat.language,
channelFormat.accessibilityChannel,
/* drmInitData= */ null,
Format.OFFSET_SAMPLE_RELATIVE,
channelFormat.initializationData));
outputs[i] = output;
}
}
......@@ -60,33 +69,13 @@ import java.util.List;
if (userDataPayload.bytesLeft() < 9) {
return;
}
//check if payload is used_data_type (0x01B2)
int userDataStartCode = userDataPayload.readInt();
int userDataIdentifier = userDataPayload.readInt();
int userDataTypeCode = userDataPayload.readUnsignedByte();
if (userDataStartCode == USER_DATA_START_CODE && userDataIdentifier == USER_DATA_IDENTIFIER_GA94
&& userDataTypeCode == USER_DATA_TYPE_CODE_MPEG_CC) {
if (userDataPayload.bytesLeft() < 2) {
return;
}
// read cc_count and process_cc_data_flag byte.
int ccByte = userDataPayload.readUnsignedByte();
boolean processCCDataFlag = ((ccByte & 0x40) != 0);
int ccCount = (ccByte & 0x1F);
// skip reserved em_data byte of MPEG_CC structure
userDataPayload.skipBytes(1);
int payLoadSize = ccCount * 3;
if (processCCDataFlag && payLoadSize != 0) {
int ccPos = userDataPayload.getPosition();
for (TrackOutput output : outputs) {
output.sampleData(userDataPayload, payLoadSize);
output.sampleMetadata(pesTimeUs, C.BUFFER_FLAG_KEY_FRAME, payLoadSize, 0, null);
userDataPayload.setPosition(ccPos);
}
}
if (userDataStartCode == USER_DATA_START_CODE
&& userDataIdentifier == CeaUtil.USER_DATA_IDENTIFIER_GA94
&& userDataTypeCode == CeaUtil.USER_DATA_TYPE_CODE_MPEG_CC) {
CeaUtil.consumeCcData(pesTimeUs, userDataPayload, outputs);
}
}
}
......@@ -107,7 +107,7 @@ public interface SubtitleDecoderFactory {
case MimeTypes.APPLICATION_MP4CEA608:
return new Cea608Decoder(format.sampleMimeType, format.accessibilityChannel);
case MimeTypes.APPLICATION_CEA708:
return new Cea708Decoder(format.accessibilityChannel);
return new Cea708Decoder(format.accessibilityChannel, format.initializationData);
case MimeTypes.APPLICATION_DVBSUBS:
return new DvbDecoder(format.initializationData);
case MimeTypes.APPLICATION_PGS:
......
......@@ -152,10 +152,10 @@ public final class Cea708Decoder extends CeaDecoder {
private DtvCcPacket currentDtvCcPacket;
private int currentWindow;
public Cea708Decoder(int accessibilityChannel) {
public Cea708Decoder(int accessibilityChannel, List<byte[]> initializationData) {
ccData = new ParsableByteArray();
serviceBlockPacket = new ParsableBitArray();
selectedServiceNumber = (accessibilityChannel == Format.NO_VALUE) ? 1 : accessibilityChannel;
selectedServiceNumber = accessibilityChannel == Format.NO_VALUE ? 1 : accessibilityChannel;
cueBuilders = new CueBuilder[NUM_WINDOWS];
for (int i = 0; i < NUM_WINDOWS; i++) {
......
......@@ -26,13 +26,13 @@ public final class CeaUtil {
private static final String TAG = "CeaUtil";
public static final int USER_DATA_IDENTIFIER_GA94 = Util.getIntegerCodeForString("GA94");
public static final int USER_DATA_TYPE_CODE_MPEG_CC = 0x3;
private static final int PAYLOAD_TYPE_CC = 4;
private static final int COUNTRY_CODE = 0xB5;
private static final int PROVIDER_CODE_ATSC = 0x31;
private static final int PROVIDER_CODE_DIRECTV = 0x2F;
private static final int USER_ID_GA94 = Util.getIntegerCodeForString("GA94");
private static final int USER_ID_DTG1 = Util.getIntegerCodeForString("DTG1");
private static final int USER_DATA_TYPE_CODE = 0x3;
/**
* Consumes the unescaped content of an SEI NAL unit, writing the content of any CEA-608 messages
......@@ -67,26 +67,12 @@ public final class CeaUtil {
boolean messageIsSupportedCeaCaption =
countryCode == COUNTRY_CODE
&& (providerCode == PROVIDER_CODE_ATSC || providerCode == PROVIDER_CODE_DIRECTV)
&& userDataTypeCode == USER_DATA_TYPE_CODE;
&& userDataTypeCode == USER_DATA_TYPE_CODE_MPEG_CC;
if (providerCode == PROVIDER_CODE_ATSC) {
messageIsSupportedCeaCaption &=
userIdentifier == USER_ID_GA94 || userIdentifier == USER_ID_DTG1;
messageIsSupportedCeaCaption &= userIdentifier == USER_DATA_IDENTIFIER_GA94;
}
if (messageIsSupportedCeaCaption) {
// Ignore first three bits: reserved (1) + process_cc_data_flag (1) + zero_bit (1).
int ccCount = seiBuffer.readUnsignedByte() & 0x1F;
// Ignore em_data (1)
seiBuffer.skipBytes(1);
// Each data packet consists of 24 bits: marker bits (5) + cc_valid (1) + cc_type (2)
// + cc_data_1 (8) + cc_data_2 (8).
int sampleLength = ccCount * 3;
int sampleStartPosition = seiBuffer.getPosition();
for (TrackOutput output : outputs) {
seiBuffer.setPosition(sampleStartPosition);
output.sampleData(seiBuffer, sampleLength);
output.sampleMetadata(
presentationTimeUs, C.BUFFER_FLAG_KEY_FRAME, sampleLength, 0, null);
}
consumeCcData(presentationTimeUs, seiBuffer, outputs);
}
}
seiBuffer.setPosition(nextPayloadPosition);
......@@ -94,6 +80,40 @@ public final class CeaUtil {
}
/**
* Consumes caption data (cc_data), writing the content as samples to all of the provided outputs.
*
* @param presentationTimeUs The presentation time in microseconds for any samples.
* @param ccDataBuffer The buffer containing the caption data.
* @param outputs The outputs to which any samples should be written.
*/
public static void consumeCcData(
long presentationTimeUs, ParsableByteArray ccDataBuffer, TrackOutput[] outputs) {
// First byte contains: reserved (1), process_cc_data_flag (1), zero_bit (1), cc_count (5).
int firstByte = ccDataBuffer.readUnsignedByte();
boolean processCcDataFlag = (firstByte & 0x40) != 0;
if (!processCcDataFlag) {
// No need to process.
return;
}
int ccCount = firstByte & 0x1F;
ccDataBuffer.skipBytes(1); // Ignore em_data
// Each data packet consists of 24 bits: marker bits (5) + cc_valid (1) + cc_type (2)
// + cc_data_1 (8) + cc_data_2 (8).
int sampleLength = ccCount * 3;
int sampleStartPosition = ccDataBuffer.getPosition();
for (TrackOutput output : outputs) {
ccDataBuffer.setPosition(sampleStartPosition);
output.sampleData(ccDataBuffer, sampleLength);
output.sampleMetadata(
presentationTimeUs,
C.BUFFER_FLAG_KEY_FRAME,
sampleLength,
/* offset= */ 0,
/* encryptionData= */ null);
}
}
/**
* Reads a value from the provided buffer consisting of zero or more 0xFF bytes followed by a
* terminating byte not equal to 0xFF. The returned value is ((0xFF * N) + T), where N is the
* number of 0xFF bytes and T is the value of the terminating byte.
......
......@@ -85,9 +85,9 @@ public final class DefaultHlsExtractorFactory implements HlsExtractorFactory {
|| lastPathSegment.startsWith(MP4_FILE_EXTENSION_PREFIX, lastPathSegment.length() - 5)) {
extractor =
new FragmentedMp4Extractor(
0,
/* flags= */ 0,
timestampAdjuster,
null,
/* sideloadedTrack= */ null,
drmInitData,
muxedCaptionFormats != null ? muxedCaptionFormats : Collections.emptyList());
} else {
......@@ -102,7 +102,11 @@ public final class DefaultHlsExtractorFactory implements HlsExtractorFactory {
// closed caption track on channel 0.
muxedCaptionFormats =
Collections.singletonList(
Format.createTextSampleFormat(null, MimeTypes.APPLICATION_CEA608, 0, null));
Format.createTextSampleFormat(
/* id= */ null,
MimeTypes.APPLICATION_CEA608,
/* selectionFlags= */ 0,
/* language= */ null));
}
String codecs = format.codecs;
if (!TextUtils.isEmpty(codecs)) {
......
......@@ -49,7 +49,7 @@ public class DefaultTrackNameProvider implements TrackNameProvider {
} else {
trackName = buildLabelString(format);
}
return trackName.length() == 0 ? resources.getString(R.string.exo_track_unknown) : trackName + " - " + format.id;
return trackName.length() == 0 ? resources.getString(R.string.exo_track_unknown) : trackName;
}
private String buildResolutionString(Format format) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment