mirror of
https://github.com/androidx/media.git
synced 2025-05-12 18:19:50 +08:00
Merge pull request #5578 from szaboa:dev-v2-5529
PiperOrigin-RevId: 239398940
This commit is contained in:
commit
a86a9137be
@ -5,6 +5,7 @@
|
|||||||
* Update to Mockito 2
|
* Update to Mockito 2
|
||||||
* Add new `ExoPlaybackException` types for remote exceptions and out-of-memory
|
* Add new `ExoPlaybackException` types for remote exceptions and out-of-memory
|
||||||
errors.
|
errors.
|
||||||
|
* DASH: Parse role and accessibility descriptors into `Format.roleFlags`.
|
||||||
* HLS:
|
* HLS:
|
||||||
* Work around lack of LA_URL attribute in PlayReady key request init data.
|
* Work around lack of LA_URL attribute in PlayReady key request init data.
|
||||||
* Prevent unnecessary reloads of initialization segments.
|
* Prevent unnecessary reloads of initialization segments.
|
||||||
|
@ -109,6 +109,7 @@ import com.google.android.gms.cast.MediaTrack;
|
|||||||
/* codecs= */ null,
|
/* codecs= */ null,
|
||||||
/* bitrate= */ Format.NO_VALUE,
|
/* bitrate= */ Format.NO_VALUE,
|
||||||
/* selectionFlags= */ 0,
|
/* selectionFlags= */ 0,
|
||||||
|
/* roleFlags= */ 0,
|
||||||
mediaTrack.getLanguage());
|
mediaTrack.getLanguage());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -979,6 +979,69 @@ public final class C {
|
|||||||
*/
|
*/
|
||||||
public static final int NETWORK_TYPE_OTHER = 8;
|
public static final int NETWORK_TYPE_OTHER = 8;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Track role flags. Possible values are {@link #ROLE_FLAG_MAIN}, {@link #ROLE_FLAG_ALTERNATE},
|
||||||
|
* {@link #ROLE_FLAG_SUPPLEMENTARY}, {@link #ROLE_FLAG_COMMENTARY}, {@link #ROLE_FLAG_DUB}, {@link
|
||||||
|
* #ROLE_FLAG_EMERGENCY}, {@link #ROLE_FLAG_CAPTION}, {@link #ROLE_FLAG_SUBTITLE}, {@link
|
||||||
|
* #ROLE_FLAG_SIGN}, {@link #ROLE_FLAG_ENHANCED_AUDIO_INTELLIGIBILITY}, {@link
|
||||||
|
* #ROLE_FLAG_DESCRIPTION}.
|
||||||
|
*/
|
||||||
|
@Documented
|
||||||
|
@Retention(RetentionPolicy.SOURCE)
|
||||||
|
@IntDef(
|
||||||
|
flag = true,
|
||||||
|
value = {
|
||||||
|
ROLE_FLAG_MAIN,
|
||||||
|
ROLE_FLAG_ALTERNATE,
|
||||||
|
ROLE_FLAG_SUPPLEMENTARY,
|
||||||
|
ROLE_FLAG_COMMENTARY,
|
||||||
|
ROLE_FLAG_DUB,
|
||||||
|
ROLE_FLAG_EMERGENCY,
|
||||||
|
ROLE_FLAG_CAPTION,
|
||||||
|
ROLE_FLAG_SUBTITLE,
|
||||||
|
ROLE_FLAG_SIGN,
|
||||||
|
ROLE_FLAG_ENHANCED_AUDIO_INTELLIGIBILITY,
|
||||||
|
ROLE_FLAG_DESCRIPTION
|
||||||
|
})
|
||||||
|
public @interface RoleFlags {}
|
||||||
|
/** Indicates a main track. */
|
||||||
|
public static final int ROLE_FLAG_MAIN = 1;
|
||||||
|
/**
|
||||||
|
* Indicates an alternate track. For example a video track recorded from an different view point
|
||||||
|
* than the main track(s).
|
||||||
|
*/
|
||||||
|
public static final int ROLE_FLAG_ALTERNATE = 1 << 1;
|
||||||
|
/**
|
||||||
|
* Indicates a supplementary track, meaning the track has lower importance than the main track(s).
|
||||||
|
* For example a video track that provides a visual accompaniment to a main audio track.
|
||||||
|
*/
|
||||||
|
public static final int ROLE_FLAG_SUPPLEMENTARY = 1 << 2;
|
||||||
|
/** Indicates the track contains commentary, for example from the director. */
|
||||||
|
public static final int ROLE_FLAG_COMMENTARY = 1 << 3;
|
||||||
|
/**
|
||||||
|
* Indicates the track is in a different language from the original, for example dubbed audio or
|
||||||
|
* translated captions.
|
||||||
|
*/
|
||||||
|
public static final int ROLE_FLAG_DUB = 1 << 4;
|
||||||
|
/** Indicates the track contains information about a current emergency. */
|
||||||
|
public static final int ROLE_FLAG_EMERGENCY = 1 << 5;
|
||||||
|
/**
|
||||||
|
* Indicates the track contains captions. This flag may be set on video tracks to indicate the
|
||||||
|
* presence of burned in captions.
|
||||||
|
*/
|
||||||
|
public static final int ROLE_FLAG_CAPTION = 1 << 6;
|
||||||
|
/**
|
||||||
|
* Indicates the track contains subtitles. This flag may be set on video tracks to indicate the
|
||||||
|
* presence of burned in subtitles.
|
||||||
|
*/
|
||||||
|
public static final int ROLE_FLAG_SUBTITLE = 1 << 7;
|
||||||
|
/** Indicates the track contains a visual sign-language interpretation of an audio track. */
|
||||||
|
public static final int ROLE_FLAG_SIGN = 1 << 8;
|
||||||
|
/** Indicates the track is designed for improved intelligibility of dialogue. */
|
||||||
|
public static final int ROLE_FLAG_ENHANCED_AUDIO_INTELLIGIBILITY = 1 << 9;
|
||||||
|
/** Indicates the track contains an audio or textual description of a video track. */
|
||||||
|
public static final int ROLE_FLAG_DESCRIPTION = 1 << 10;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Converts a time in microseconds to the corresponding time in milliseconds, preserving
|
* Converts a time in microseconds to the corresponding time in milliseconds, preserving
|
||||||
* {@link #TIME_UNSET} and {@link #TIME_END_OF_SOURCE} values.
|
* {@link #TIME_UNSET} and {@link #TIME_END_OF_SOURCE} values.
|
||||||
|
@ -50,6 +50,8 @@ public final class Format implements Parcelable {
|
|||||||
public final @Nullable String label;
|
public final @Nullable String label;
|
||||||
/** Track selection flags. */
|
/** Track selection flags. */
|
||||||
@C.SelectionFlags public final int selectionFlags;
|
@C.SelectionFlags public final int selectionFlags;
|
||||||
|
/** Track role flags. */
|
||||||
|
@C.RoleFlags public final int roleFlags;
|
||||||
/**
|
/**
|
||||||
* The average bandwidth in bits per second, or {@link #NO_VALUE} if unknown or not applicable.
|
* The average bandwidth in bits per second, or {@link #NO_VALUE} if unknown or not applicable.
|
||||||
*/
|
*/
|
||||||
@ -189,7 +191,8 @@ public final class Format implements Parcelable {
|
|||||||
height,
|
height,
|
||||||
frameRate,
|
frameRate,
|
||||||
initializationData,
|
initializationData,
|
||||||
selectionFlags);
|
selectionFlags,
|
||||||
|
/* roleFlags= */ 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Format createVideoContainerFormat(
|
public static Format createVideoContainerFormat(
|
||||||
@ -203,11 +206,13 @@ public final class Format implements Parcelable {
|
|||||||
int height,
|
int height,
|
||||||
float frameRate,
|
float frameRate,
|
||||||
@Nullable List<byte[]> initializationData,
|
@Nullable List<byte[]> initializationData,
|
||||||
@C.SelectionFlags int selectionFlags) {
|
@C.SelectionFlags int selectionFlags,
|
||||||
|
@C.RoleFlags int roleFlags) {
|
||||||
return new Format(
|
return new Format(
|
||||||
id,
|
id,
|
||||||
label,
|
label,
|
||||||
selectionFlags,
|
selectionFlags,
|
||||||
|
roleFlags,
|
||||||
bitrate,
|
bitrate,
|
||||||
codecs,
|
codecs,
|
||||||
/* metadata= */ null,
|
/* metadata= */ null,
|
||||||
@ -311,6 +316,7 @@ public final class Format implements Parcelable {
|
|||||||
id,
|
id,
|
||||||
/* label= */ null,
|
/* label= */ null,
|
||||||
/* selectionFlags= */ 0,
|
/* selectionFlags= */ 0,
|
||||||
|
/* roleFlags= */ 0,
|
||||||
bitrate,
|
bitrate,
|
||||||
codecs,
|
codecs,
|
||||||
/* metadata= */ null,
|
/* metadata= */ null,
|
||||||
@ -362,6 +368,7 @@ public final class Format implements Parcelable {
|
|||||||
sampleRate,
|
sampleRate,
|
||||||
initializationData,
|
initializationData,
|
||||||
selectionFlags,
|
selectionFlags,
|
||||||
|
/* roleFlags= */ 0,
|
||||||
language);
|
language);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -376,11 +383,13 @@ public final class Format implements Parcelable {
|
|||||||
int sampleRate,
|
int sampleRate,
|
||||||
@Nullable List<byte[]> initializationData,
|
@Nullable List<byte[]> initializationData,
|
||||||
@C.SelectionFlags int selectionFlags,
|
@C.SelectionFlags int selectionFlags,
|
||||||
|
@C.RoleFlags int roleFlags,
|
||||||
@Nullable String language) {
|
@Nullable String language) {
|
||||||
return new Format(
|
return new Format(
|
||||||
id,
|
id,
|
||||||
label,
|
label,
|
||||||
selectionFlags,
|
selectionFlags,
|
||||||
|
roleFlags,
|
||||||
bitrate,
|
bitrate,
|
||||||
codecs,
|
codecs,
|
||||||
/* metadata= */ null,
|
/* metadata= */ null,
|
||||||
@ -485,6 +494,7 @@ public final class Format implements Parcelable {
|
|||||||
id,
|
id,
|
||||||
/* label= */ null,
|
/* label= */ null,
|
||||||
selectionFlags,
|
selectionFlags,
|
||||||
|
/* roleFlags= */ 0,
|
||||||
bitrate,
|
bitrate,
|
||||||
codecs,
|
codecs,
|
||||||
metadata,
|
metadata,
|
||||||
@ -550,6 +560,7 @@ public final class Format implements Parcelable {
|
|||||||
codecs,
|
codecs,
|
||||||
bitrate,
|
bitrate,
|
||||||
selectionFlags,
|
selectionFlags,
|
||||||
|
/* roleFlags= */ 0,
|
||||||
language,
|
language,
|
||||||
/* accessibilityChannel= */ NO_VALUE);
|
/* accessibilityChannel= */ NO_VALUE);
|
||||||
}
|
}
|
||||||
@ -562,12 +573,14 @@ public final class Format implements Parcelable {
|
|||||||
@Nullable String codecs,
|
@Nullable String codecs,
|
||||||
int bitrate,
|
int bitrate,
|
||||||
@C.SelectionFlags int selectionFlags,
|
@C.SelectionFlags int selectionFlags,
|
||||||
|
@C.RoleFlags int roleFlags,
|
||||||
@Nullable String language,
|
@Nullable String language,
|
||||||
int accessibilityChannel) {
|
int accessibilityChannel) {
|
||||||
return new Format(
|
return new Format(
|
||||||
id,
|
id,
|
||||||
label,
|
label,
|
||||||
selectionFlags,
|
selectionFlags,
|
||||||
|
roleFlags,
|
||||||
bitrate,
|
bitrate,
|
||||||
codecs,
|
codecs,
|
||||||
/* metadata= */ null,
|
/* metadata= */ null,
|
||||||
@ -680,6 +693,7 @@ public final class Format implements Parcelable {
|
|||||||
id,
|
id,
|
||||||
/* label= */ null,
|
/* label= */ null,
|
||||||
selectionFlags,
|
selectionFlags,
|
||||||
|
/* roleFlags= */ 0,
|
||||||
bitrate,
|
bitrate,
|
||||||
codecs,
|
codecs,
|
||||||
/* metadata= */ null,
|
/* metadata= */ null,
|
||||||
@ -721,6 +735,7 @@ public final class Format implements Parcelable {
|
|||||||
id,
|
id,
|
||||||
/* label= */ null,
|
/* label= */ null,
|
||||||
selectionFlags,
|
selectionFlags,
|
||||||
|
/* roleFlags= */ 0,
|
||||||
bitrate,
|
bitrate,
|
||||||
codecs,
|
codecs,
|
||||||
/* metadata=*/ null,
|
/* metadata=*/ null,
|
||||||
@ -766,6 +781,7 @@ public final class Format implements Parcelable {
|
|||||||
codecs,
|
codecs,
|
||||||
bitrate,
|
bitrate,
|
||||||
selectionFlags,
|
selectionFlags,
|
||||||
|
/* roleFlags= */ 0,
|
||||||
language);
|
language);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -777,11 +793,13 @@ public final class Format implements Parcelable {
|
|||||||
@Nullable String codecs,
|
@Nullable String codecs,
|
||||||
int bitrate,
|
int bitrate,
|
||||||
@C.SelectionFlags int selectionFlags,
|
@C.SelectionFlags int selectionFlags,
|
||||||
|
@C.RoleFlags int roleFlags,
|
||||||
@Nullable String language) {
|
@Nullable String language) {
|
||||||
return new Format(
|
return new Format(
|
||||||
id,
|
id,
|
||||||
label,
|
label,
|
||||||
selectionFlags,
|
selectionFlags,
|
||||||
|
roleFlags,
|
||||||
bitrate,
|
bitrate,
|
||||||
codecs,
|
codecs,
|
||||||
/* metadata= */ null,
|
/* metadata= */ null,
|
||||||
@ -814,6 +832,7 @@ public final class Format implements Parcelable {
|
|||||||
id,
|
id,
|
||||||
/* label= */ null,
|
/* label= */ null,
|
||||||
/* selectionFlags= */ 0,
|
/* selectionFlags= */ 0,
|
||||||
|
/* roleFlags= */ 0,
|
||||||
/* bitrate= */ NO_VALUE,
|
/* bitrate= */ NO_VALUE,
|
||||||
/* codecs= */ null,
|
/* codecs= */ null,
|
||||||
/* metadata= */ null,
|
/* metadata= */ null,
|
||||||
@ -850,6 +869,7 @@ public final class Format implements Parcelable {
|
|||||||
id,
|
id,
|
||||||
/* label= */ null,
|
/* label= */ null,
|
||||||
/* selectionFlags= */ 0,
|
/* selectionFlags= */ 0,
|
||||||
|
/* roleFlags= */ 0,
|
||||||
bitrate,
|
bitrate,
|
||||||
codecs,
|
codecs,
|
||||||
/* metadata= */ null,
|
/* metadata= */ null,
|
||||||
@ -880,6 +900,7 @@ public final class Format implements Parcelable {
|
|||||||
@Nullable String id,
|
@Nullable String id,
|
||||||
@Nullable String label,
|
@Nullable String label,
|
||||||
@C.SelectionFlags int selectionFlags,
|
@C.SelectionFlags int selectionFlags,
|
||||||
|
@C.RoleFlags int roleFlags,
|
||||||
int bitrate,
|
int bitrate,
|
||||||
@Nullable String codecs,
|
@Nullable String codecs,
|
||||||
@Nullable Metadata metadata,
|
@Nullable Metadata metadata,
|
||||||
@ -912,6 +933,7 @@ public final class Format implements Parcelable {
|
|||||||
this.id = id;
|
this.id = id;
|
||||||
this.label = label;
|
this.label = label;
|
||||||
this.selectionFlags = selectionFlags;
|
this.selectionFlags = selectionFlags;
|
||||||
|
this.roleFlags = roleFlags;
|
||||||
this.bitrate = bitrate;
|
this.bitrate = bitrate;
|
||||||
this.codecs = codecs;
|
this.codecs = codecs;
|
||||||
this.metadata = metadata;
|
this.metadata = metadata;
|
||||||
@ -950,6 +972,7 @@ public final class Format implements Parcelable {
|
|||||||
id = in.readString();
|
id = in.readString();
|
||||||
label = in.readString();
|
label = in.readString();
|
||||||
selectionFlags = in.readInt();
|
selectionFlags = in.readInt();
|
||||||
|
roleFlags = in.readInt();
|
||||||
bitrate = in.readInt();
|
bitrate = in.readInt();
|
||||||
codecs = in.readString();
|
codecs = in.readString();
|
||||||
metadata = in.readParcelable(Metadata.class.getClassLoader());
|
metadata = in.readParcelable(Metadata.class.getClassLoader());
|
||||||
@ -986,12 +1009,12 @@ public final class Format implements Parcelable {
|
|||||||
accessibilityChannel = in.readInt();
|
accessibilityChannel = in.readInt();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public Format copyWithMaxInputSize(int maxInputSize) {
|
public Format copyWithMaxInputSize(int maxInputSize) {
|
||||||
return new Format(
|
return new Format(
|
||||||
id,
|
id,
|
||||||
label,
|
label,
|
||||||
selectionFlags,
|
selectionFlags,
|
||||||
|
roleFlags,
|
||||||
bitrate,
|
bitrate,
|
||||||
codecs,
|
codecs,
|
||||||
metadata,
|
metadata,
|
||||||
@ -1023,6 +1046,7 @@ public final class Format implements Parcelable {
|
|||||||
id,
|
id,
|
||||||
label,
|
label,
|
||||||
selectionFlags,
|
selectionFlags,
|
||||||
|
roleFlags,
|
||||||
bitrate,
|
bitrate,
|
||||||
codecs,
|
codecs,
|
||||||
metadata,
|
metadata,
|
||||||
@ -1064,6 +1088,7 @@ public final class Format implements Parcelable {
|
|||||||
id,
|
id,
|
||||||
label,
|
label,
|
||||||
selectionFlags,
|
selectionFlags,
|
||||||
|
roleFlags,
|
||||||
bitrate,
|
bitrate,
|
||||||
codecs,
|
codecs,
|
||||||
metadata,
|
metadata,
|
||||||
@ -1128,6 +1153,7 @@ public final class Format implements Parcelable {
|
|||||||
|
|
||||||
// Merge manifest and sample format values.
|
// Merge manifest and sample format values.
|
||||||
@C.SelectionFlags int selectionFlags = this.selectionFlags | manifestFormat.selectionFlags;
|
@C.SelectionFlags int selectionFlags = this.selectionFlags | manifestFormat.selectionFlags;
|
||||||
|
@C.RoleFlags int roleFlags = this.roleFlags | manifestFormat.roleFlags;
|
||||||
DrmInitData drmInitData =
|
DrmInitData drmInitData =
|
||||||
DrmInitData.createSessionCreationData(manifestFormat.drmInitData, this.drmInitData);
|
DrmInitData.createSessionCreationData(manifestFormat.drmInitData, this.drmInitData);
|
||||||
|
|
||||||
@ -1135,6 +1161,7 @@ public final class Format implements Parcelable {
|
|||||||
id,
|
id,
|
||||||
label,
|
label,
|
||||||
selectionFlags,
|
selectionFlags,
|
||||||
|
roleFlags,
|
||||||
bitrate,
|
bitrate,
|
||||||
codecs,
|
codecs,
|
||||||
metadata,
|
metadata,
|
||||||
@ -1166,6 +1193,7 @@ public final class Format implements Parcelable {
|
|||||||
id,
|
id,
|
||||||
label,
|
label,
|
||||||
selectionFlags,
|
selectionFlags,
|
||||||
|
roleFlags,
|
||||||
bitrate,
|
bitrate,
|
||||||
codecs,
|
codecs,
|
||||||
metadata,
|
metadata,
|
||||||
@ -1197,6 +1225,7 @@ public final class Format implements Parcelable {
|
|||||||
id,
|
id,
|
||||||
label,
|
label,
|
||||||
selectionFlags,
|
selectionFlags,
|
||||||
|
roleFlags,
|
||||||
bitrate,
|
bitrate,
|
||||||
codecs,
|
codecs,
|
||||||
metadata,
|
metadata,
|
||||||
@ -1228,6 +1257,7 @@ public final class Format implements Parcelable {
|
|||||||
id,
|
id,
|
||||||
label,
|
label,
|
||||||
selectionFlags,
|
selectionFlags,
|
||||||
|
roleFlags,
|
||||||
bitrate,
|
bitrate,
|
||||||
codecs,
|
codecs,
|
||||||
metadata,
|
metadata,
|
||||||
@ -1259,6 +1289,7 @@ public final class Format implements Parcelable {
|
|||||||
id,
|
id,
|
||||||
label,
|
label,
|
||||||
selectionFlags,
|
selectionFlags,
|
||||||
|
roleFlags,
|
||||||
bitrate,
|
bitrate,
|
||||||
codecs,
|
codecs,
|
||||||
metadata,
|
metadata,
|
||||||
@ -1290,6 +1321,7 @@ public final class Format implements Parcelable {
|
|||||||
id,
|
id,
|
||||||
label,
|
label,
|
||||||
selectionFlags,
|
selectionFlags,
|
||||||
|
roleFlags,
|
||||||
bitrate,
|
bitrate,
|
||||||
codecs,
|
codecs,
|
||||||
metadata,
|
metadata,
|
||||||
@ -1321,6 +1353,7 @@ public final class Format implements Parcelable {
|
|||||||
id,
|
id,
|
||||||
label,
|
label,
|
||||||
selectionFlags,
|
selectionFlags,
|
||||||
|
roleFlags,
|
||||||
bitrate,
|
bitrate,
|
||||||
codecs,
|
codecs,
|
||||||
metadata,
|
metadata,
|
||||||
@ -1393,6 +1426,7 @@ public final class Format implements Parcelable {
|
|||||||
result = 31 * result + (id == null ? 0 : id.hashCode());
|
result = 31 * result + (id == null ? 0 : id.hashCode());
|
||||||
result = 31 * result + (label != null ? label.hashCode() : 0);
|
result = 31 * result + (label != null ? label.hashCode() : 0);
|
||||||
result = 31 * result + selectionFlags;
|
result = 31 * result + selectionFlags;
|
||||||
|
result = 31 * result + roleFlags;
|
||||||
result = 31 * result + bitrate;
|
result = 31 * result + bitrate;
|
||||||
result = 31 * result + (codecs == null ? 0 : codecs.hashCode());
|
result = 31 * result + (codecs == null ? 0 : codecs.hashCode());
|
||||||
result = 31 * result + (metadata == null ? 0 : metadata.hashCode());
|
result = 31 * result + (metadata == null ? 0 : metadata.hashCode());
|
||||||
@ -1441,6 +1475,7 @@ public final class Format implements Parcelable {
|
|||||||
}
|
}
|
||||||
// Field equality checks ordered by type, with the cheapest checks first.
|
// Field equality checks ordered by type, with the cheapest checks first.
|
||||||
return selectionFlags == other.selectionFlags
|
return selectionFlags == other.selectionFlags
|
||||||
|
&& roleFlags == other.roleFlags
|
||||||
&& bitrate == other.bitrate
|
&& bitrate == other.bitrate
|
||||||
&& maxInputSize == other.maxInputSize
|
&& maxInputSize == other.maxInputSize
|
||||||
&& subsampleOffsetUs == other.subsampleOffsetUs
|
&& subsampleOffsetUs == other.subsampleOffsetUs
|
||||||
@ -1537,6 +1572,7 @@ public final class Format implements Parcelable {
|
|||||||
dest.writeString(id);
|
dest.writeString(id);
|
||||||
dest.writeString(label);
|
dest.writeString(label);
|
||||||
dest.writeInt(selectionFlags);
|
dest.writeInt(selectionFlags);
|
||||||
|
dest.writeInt(roleFlags);
|
||||||
dest.writeInt(bitrate);
|
dest.writeInt(bitrate);
|
||||||
dest.writeString(codecs);
|
dest.writeString(codecs);
|
||||||
dest.writeParcelable(metadata, 0);
|
dest.writeParcelable(metadata, 0);
|
||||||
|
@ -39,7 +39,6 @@ import org.junit.runner.RunWith;
|
|||||||
public final class FormatTest {
|
public final class FormatTest {
|
||||||
|
|
||||||
private static final List<byte[]> initData;
|
private static final List<byte[]> initData;
|
||||||
|
|
||||||
static {
|
static {
|
||||||
byte[] initData1 = new byte[] {1, 2, 3};
|
byte[] initData1 = new byte[] {1, 2, 3};
|
||||||
byte[] initData2 = new byte[] {4, 5, 6};
|
byte[] initData2 = new byte[] {4, 5, 6};
|
||||||
@ -68,6 +67,7 @@ public final class FormatTest {
|
|||||||
"id",
|
"id",
|
||||||
"label",
|
"label",
|
||||||
C.SELECTION_FLAG_DEFAULT,
|
C.SELECTION_FLAG_DEFAULT,
|
||||||
|
C.ROLE_FLAG_MAIN,
|
||||||
/* bitrate= */ 1024,
|
/* bitrate= */ 1024,
|
||||||
"codec",
|
"codec",
|
||||||
metadata,
|
metadata,
|
||||||
|
@ -39,6 +39,7 @@ public final class RawCcExtractorTest {
|
|||||||
/* codecs= */ "cea608",
|
/* codecs= */ "cea608",
|
||||||
/* bitrate= */ Format.NO_VALUE,
|
/* bitrate= */ Format.NO_VALUE,
|
||||||
/* selectionFlags= */ 0,
|
/* selectionFlags= */ 0,
|
||||||
|
/* roleFlags= */ 0,
|
||||||
/* language= */ null,
|
/* language= */ null,
|
||||||
/* accessibilityChannel= */ 1)),
|
/* accessibilityChannel= */ 1)),
|
||||||
"rawcc/sample.rawcc");
|
"rawcc/sample.rawcc");
|
||||||
|
@ -276,9 +276,9 @@ public class DashManifestParser extends DefaultHandler
|
|||||||
ArrayList<SchemeData> drmSchemeDatas = new ArrayList<>();
|
ArrayList<SchemeData> drmSchemeDatas = new ArrayList<>();
|
||||||
ArrayList<Descriptor> inbandEventStreams = new ArrayList<>();
|
ArrayList<Descriptor> inbandEventStreams = new ArrayList<>();
|
||||||
ArrayList<Descriptor> accessibilityDescriptors = new ArrayList<>();
|
ArrayList<Descriptor> accessibilityDescriptors = new ArrayList<>();
|
||||||
|
ArrayList<Descriptor> roleDescriptors = new ArrayList<>();
|
||||||
ArrayList<Descriptor> supplementalProperties = new ArrayList<>();
|
ArrayList<Descriptor> supplementalProperties = new ArrayList<>();
|
||||||
List<RepresentationInfo> representationInfos = new ArrayList<>();
|
List<RepresentationInfo> representationInfos = new ArrayList<>();
|
||||||
@C.SelectionFlags int selectionFlags = 0;
|
|
||||||
|
|
||||||
boolean seenFirstBaseUrl = false;
|
boolean seenFirstBaseUrl = false;
|
||||||
do {
|
do {
|
||||||
@ -300,7 +300,7 @@ public class DashManifestParser extends DefaultHandler
|
|||||||
language = checkLanguageConsistency(language, xpp.getAttributeValue(null, "lang"));
|
language = checkLanguageConsistency(language, xpp.getAttributeValue(null, "lang"));
|
||||||
contentType = checkContentTypeConsistency(contentType, parseContentType(xpp));
|
contentType = checkContentTypeConsistency(contentType, parseContentType(xpp));
|
||||||
} else if (XmlPullParserUtil.isStartTag(xpp, "Role")) {
|
} else if (XmlPullParserUtil.isStartTag(xpp, "Role")) {
|
||||||
selectionFlags |= parseRole(xpp);
|
roleDescriptors.add(parseDescriptor(xpp, "Role"));
|
||||||
} else if (XmlPullParserUtil.isStartTag(xpp, "AudioChannelConfiguration")) {
|
} else if (XmlPullParserUtil.isStartTag(xpp, "AudioChannelConfiguration")) {
|
||||||
audioChannels = parseAudioChannelConfiguration(xpp);
|
audioChannels = parseAudioChannelConfiguration(xpp);
|
||||||
} else if (XmlPullParserUtil.isStartTag(xpp, "Accessibility")) {
|
} else if (XmlPullParserUtil.isStartTag(xpp, "Accessibility")) {
|
||||||
@ -321,7 +321,7 @@ public class DashManifestParser extends DefaultHandler
|
|||||||
audioChannels,
|
audioChannels,
|
||||||
audioSamplingRate,
|
audioSamplingRate,
|
||||||
language,
|
language,
|
||||||
selectionFlags,
|
roleDescriptors,
|
||||||
accessibilityDescriptors,
|
accessibilityDescriptors,
|
||||||
segmentBase);
|
segmentBase);
|
||||||
contentType = checkContentTypeConsistency(contentType,
|
contentType = checkContentTypeConsistency(contentType,
|
||||||
@ -464,24 +464,6 @@ public class DashManifestParser extends DefaultHandler
|
|||||||
return Pair.create(schemeType, schemeData);
|
return Pair.create(schemeType, schemeData);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Parses a Role element.
|
|
||||||
*
|
|
||||||
* @param xpp The parser from which to read.
|
|
||||||
* @throws XmlPullParserException If an error occurs parsing the element.
|
|
||||||
* @throws IOException If an error occurs reading the element.
|
|
||||||
* @return {@link C.SelectionFlags} parsed from the element.
|
|
||||||
*/
|
|
||||||
protected int parseRole(XmlPullParser xpp) throws XmlPullParserException, IOException {
|
|
||||||
String schemeIdUri = parseString(xpp, "schemeIdUri", null);
|
|
||||||
String value = parseString(xpp, "value", null);
|
|
||||||
do {
|
|
||||||
xpp.next();
|
|
||||||
} while (!XmlPullParserUtil.isEndTag(xpp, "Role"));
|
|
||||||
return "urn:mpeg:dash:role:2011".equals(schemeIdUri) && "main".equals(value)
|
|
||||||
? C.SELECTION_FLAG_DEFAULT : 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parses children of AdaptationSet elements not specifically parsed elsewhere.
|
* Parses children of AdaptationSet elements not specifically parsed elsewhere.
|
||||||
*
|
*
|
||||||
@ -508,7 +490,7 @@ public class DashManifestParser extends DefaultHandler
|
|||||||
int adaptationSetAudioChannels,
|
int adaptationSetAudioChannels,
|
||||||
int adaptationSetAudioSamplingRate,
|
int adaptationSetAudioSamplingRate,
|
||||||
String adaptationSetLanguage,
|
String adaptationSetLanguage,
|
||||||
@C.SelectionFlags int adaptationSetSelectionFlags,
|
List<Descriptor> adaptationSetRoleDescriptors,
|
||||||
List<Descriptor> adaptationSetAccessibilityDescriptors,
|
List<Descriptor> adaptationSetAccessibilityDescriptors,
|
||||||
SegmentBase segmentBase)
|
SegmentBase segmentBase)
|
||||||
throws XmlPullParserException, IOException {
|
throws XmlPullParserException, IOException {
|
||||||
@ -572,7 +554,7 @@ public class DashManifestParser extends DefaultHandler
|
|||||||
audioSamplingRate,
|
audioSamplingRate,
|
||||||
bandwidth,
|
bandwidth,
|
||||||
adaptationSetLanguage,
|
adaptationSetLanguage,
|
||||||
adaptationSetSelectionFlags,
|
adaptationSetRoleDescriptors,
|
||||||
adaptationSetAccessibilityDescriptors,
|
adaptationSetAccessibilityDescriptors,
|
||||||
codecs,
|
codecs,
|
||||||
supplementalProperties);
|
supplementalProperties);
|
||||||
@ -593,11 +575,14 @@ public class DashManifestParser extends DefaultHandler
|
|||||||
int audioSamplingRate,
|
int audioSamplingRate,
|
||||||
int bitrate,
|
int bitrate,
|
||||||
String language,
|
String language,
|
||||||
@C.SelectionFlags int selectionFlags,
|
List<Descriptor> roleDescriptors,
|
||||||
List<Descriptor> accessibilityDescriptors,
|
List<Descriptor> accessibilityDescriptors,
|
||||||
String codecs,
|
String codecs,
|
||||||
List<Descriptor> supplementalProperties) {
|
List<Descriptor> supplementalProperties) {
|
||||||
String sampleMimeType = getSampleMimeType(containerMimeType, codecs);
|
String sampleMimeType = getSampleMimeType(containerMimeType, codecs);
|
||||||
|
@C.SelectionFlags int selectionFlags = parseSelectionFlagsFromRoleDescriptors(roleDescriptors);
|
||||||
|
@C.RoleFlags int roleFlags = parseRoleFlagsFromRoleDescriptors(roleDescriptors);
|
||||||
|
roleFlags |= parseRoleFlagsFromAccessibilityDescriptors(accessibilityDescriptors);
|
||||||
if (sampleMimeType != null) {
|
if (sampleMimeType != null) {
|
||||||
if (MimeTypes.AUDIO_E_AC3.equals(sampleMimeType)) {
|
if (MimeTypes.AUDIO_E_AC3.equals(sampleMimeType)) {
|
||||||
sampleMimeType = parseEac3SupplementalProperties(supplementalProperties);
|
sampleMimeType = parseEac3SupplementalProperties(supplementalProperties);
|
||||||
@ -614,7 +599,8 @@ public class DashManifestParser extends DefaultHandler
|
|||||||
height,
|
height,
|
||||||
frameRate,
|
frameRate,
|
||||||
/* initializationData= */ null,
|
/* initializationData= */ null,
|
||||||
selectionFlags);
|
selectionFlags,
|
||||||
|
roleFlags);
|
||||||
} else if (MimeTypes.isAudio(sampleMimeType)) {
|
} else if (MimeTypes.isAudio(sampleMimeType)) {
|
||||||
return Format.createAudioContainerFormat(
|
return Format.createAudioContainerFormat(
|
||||||
id,
|
id,
|
||||||
@ -627,6 +613,7 @@ public class DashManifestParser extends DefaultHandler
|
|||||||
audioSamplingRate,
|
audioSamplingRate,
|
||||||
/* initializationData= */ null,
|
/* initializationData= */ null,
|
||||||
selectionFlags,
|
selectionFlags,
|
||||||
|
roleFlags,
|
||||||
language);
|
language);
|
||||||
} else if (mimeTypeIsRawText(sampleMimeType)) {
|
} else if (mimeTypeIsRawText(sampleMimeType)) {
|
||||||
int accessibilityChannel;
|
int accessibilityChannel;
|
||||||
@ -645,12 +632,21 @@ public class DashManifestParser extends DefaultHandler
|
|||||||
codecs,
|
codecs,
|
||||||
bitrate,
|
bitrate,
|
||||||
selectionFlags,
|
selectionFlags,
|
||||||
|
roleFlags,
|
||||||
language,
|
language,
|
||||||
accessibilityChannel);
|
accessibilityChannel);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return Format.createContainerFormat(
|
return Format.createContainerFormat(
|
||||||
id, label, containerMimeType, sampleMimeType, codecs, bitrate, selectionFlags, language);
|
id,
|
||||||
|
label,
|
||||||
|
containerMimeType,
|
||||||
|
sampleMimeType,
|
||||||
|
codecs,
|
||||||
|
bitrate,
|
||||||
|
selectionFlags,
|
||||||
|
roleFlags,
|
||||||
|
language);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Representation buildRepresentation(
|
protected Representation buildRepresentation(
|
||||||
@ -1064,6 +1060,103 @@ public class DashManifestParser extends DefaultHandler
|
|||||||
return audioChannels;
|
return audioChannels;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Selection flag parsing.
|
||||||
|
|
||||||
|
protected int parseSelectionFlagsFromRoleDescriptors(List<Descriptor> roleDescriptors) {
|
||||||
|
for (int i = 0; i < roleDescriptors.size(); i++) {
|
||||||
|
Descriptor descriptor = roleDescriptors.get(i);
|
||||||
|
if ("urn:mpeg:dash:role:2011".equalsIgnoreCase(descriptor.schemeIdUri)
|
||||||
|
&& "main".equals(descriptor.value)) {
|
||||||
|
return C.SELECTION_FLAG_DEFAULT;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Role and Accessibility parsing.
|
||||||
|
|
||||||
|
@C.RoleFlags
|
||||||
|
protected int parseRoleFlagsFromRoleDescriptors(List<Descriptor> roleDescriptors) {
|
||||||
|
@C.RoleFlags int result = 0;
|
||||||
|
for (int i = 0; i < roleDescriptors.size(); i++) {
|
||||||
|
Descriptor descriptor = roleDescriptors.get(i);
|
||||||
|
if ("urn:mpeg:dash:role:2011".equalsIgnoreCase(descriptor.schemeIdUri)) {
|
||||||
|
result |= parseDashRoleSchemeValue(descriptor.value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@C.RoleFlags
|
||||||
|
protected int parseRoleFlagsFromAccessibilityDescriptors(
|
||||||
|
List<Descriptor> accessibilityDescriptors) {
|
||||||
|
@C.RoleFlags int result = 0;
|
||||||
|
for (int i = 0; i < accessibilityDescriptors.size(); i++) {
|
||||||
|
Descriptor descriptor = accessibilityDescriptors.get(i);
|
||||||
|
if ("urn:mpeg:dash:role:2011".equalsIgnoreCase(descriptor.schemeIdUri)) {
|
||||||
|
result |= parseDashRoleSchemeValue(descriptor.value);
|
||||||
|
} else if ("urn:tva:metadata:cs:AudioPurposeCS:2007"
|
||||||
|
.equalsIgnoreCase(descriptor.schemeIdUri)) {
|
||||||
|
result |= parseTvaAudioPurposeCsValue(descriptor.value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@C.RoleFlags
|
||||||
|
protected int parseDashRoleSchemeValue(String value) {
|
||||||
|
if (value == null) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
switch (value) {
|
||||||
|
case "main":
|
||||||
|
return C.ROLE_FLAG_MAIN;
|
||||||
|
case "alternate":
|
||||||
|
return C.ROLE_FLAG_ALTERNATE;
|
||||||
|
case "supplementary":
|
||||||
|
return C.ROLE_FLAG_SUPPLEMENTARY;
|
||||||
|
case "commentary":
|
||||||
|
return C.ROLE_FLAG_COMMENTARY;
|
||||||
|
case "dub":
|
||||||
|
return C.ROLE_FLAG_DUB;
|
||||||
|
case "emergency":
|
||||||
|
return C.ROLE_FLAG_EMERGENCY;
|
||||||
|
case "caption":
|
||||||
|
return C.ROLE_FLAG_CAPTION;
|
||||||
|
case "subtitle":
|
||||||
|
return C.ROLE_FLAG_SUBTITLE;
|
||||||
|
case "sign":
|
||||||
|
return C.ROLE_FLAG_SIGN;
|
||||||
|
case "description":
|
||||||
|
return C.ROLE_FLAG_DESCRIPTION;
|
||||||
|
case "enhanced-audio-intelligibility":
|
||||||
|
return C.ROLE_FLAG_ENHANCED_AUDIO_INTELLIGIBILITY;
|
||||||
|
default:
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@C.RoleFlags
|
||||||
|
protected int parseTvaAudioPurposeCsValue(String value) {
|
||||||
|
if (value == null) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
switch (value) {
|
||||||
|
case "1": // Audio description for the visually impaired.
|
||||||
|
return C.ROLE_FLAG_DESCRIPTION;
|
||||||
|
case "2": // Audio description for the hard of hearing.
|
||||||
|
return C.ROLE_FLAG_ENHANCED_AUDIO_INTELLIGIBILITY;
|
||||||
|
case "3": // Supplemental commentary.
|
||||||
|
return C.ROLE_FLAG_SUPPLEMENTARY;
|
||||||
|
case "4": // Director's commentary.
|
||||||
|
return C.ROLE_FLAG_COMMENTARY;
|
||||||
|
case "6": // Main programme audio.
|
||||||
|
return C.ROLE_FLAG_MAIN;
|
||||||
|
default:
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Utility methods.
|
// Utility methods.
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -193,6 +193,7 @@ public final class DashMediaPeriodTest {
|
|||||||
/* codecs= */ null,
|
/* codecs= */ null,
|
||||||
bitrate,
|
bitrate,
|
||||||
/* selectionFlags= */ 0,
|
/* selectionFlags= */ 0,
|
||||||
|
/* roleFlags= */ 0,
|
||||||
/* language= */ null);
|
/* language= */ null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -207,6 +208,7 @@ public final class DashMediaPeriodTest {
|
|||||||
/* codecs= */ null,
|
/* codecs= */ null,
|
||||||
bitrate,
|
bitrate,
|
||||||
/* selectionFlags= */ 0,
|
/* selectionFlags= */ 0,
|
||||||
|
/* roleFlags= */ 0,
|
||||||
/* language= */ null),
|
/* language= */ null),
|
||||||
/* baseUrl= */ "",
|
/* baseUrl= */ "",
|
||||||
new SingleSegmentBase());
|
new SingleSegmentBase());
|
||||||
@ -223,6 +225,7 @@ public final class DashMediaPeriodTest {
|
|||||||
/* codecs= */ null,
|
/* codecs= */ null,
|
||||||
/* bitrate= */ Format.NO_VALUE,
|
/* bitrate= */ Format.NO_VALUE,
|
||||||
/* selectionFlags= */ 0,
|
/* selectionFlags= */ 0,
|
||||||
|
/* roleFlags= */ 0,
|
||||||
language),
|
language),
|
||||||
/* baseUrl= */ "",
|
/* baseUrl= */ "",
|
||||||
new SingleSegmentBase());
|
new SingleSegmentBase());
|
||||||
|
@ -85,7 +85,8 @@ public final class DashUtilTest {
|
|||||||
/* height= */ 768,
|
/* height= */ 768,
|
||||||
Format.NO_VALUE,
|
Format.NO_VALUE,
|
||||||
/* initializationData= */ null,
|
/* initializationData= */ null,
|
||||||
/* selectionFlags= */ 0);
|
/* selectionFlags= */ 0,
|
||||||
|
/* roleFlags= */ 0);
|
||||||
if (drmInitData != null) {
|
if (drmInitData != null) {
|
||||||
format = format.copyWithDrmInitData(drmInitData);
|
format = format.copyWithDrmInitData(drmInitData);
|
||||||
}
|
}
|
||||||
|
@ -702,7 +702,8 @@ public final class HlsMediaPeriod implements MediaPeriod, HlsSampleStreamWrapper
|
|||||||
variantFormat.height,
|
variantFormat.height,
|
||||||
variantFormat.frameRate,
|
variantFormat.frameRate,
|
||||||
/* initializationData= */ null,
|
/* initializationData= */ null,
|
||||||
variantFormat.selectionFlags);
|
variantFormat.selectionFlags,
|
||||||
|
/* roleFlags= */ 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Format deriveAudioFormat(
|
private static Format deriveAudioFormat(
|
||||||
@ -740,6 +741,7 @@ public final class HlsMediaPeriod implements MediaPeriod, HlsSampleStreamWrapper
|
|||||||
/* sampleRate= */ Format.NO_VALUE,
|
/* sampleRate= */ Format.NO_VALUE,
|
||||||
/* initializationData= */ null,
|
/* initializationData= */ null,
|
||||||
selectionFlags,
|
selectionFlags,
|
||||||
|
/* roleFlags= */ 0,
|
||||||
language);
|
language);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -78,6 +78,7 @@ public final class HlsMasterPlaylist extends HlsPlaylist {
|
|||||||
/* codecs= */ null,
|
/* codecs= */ null,
|
||||||
/* bitrate= */ Format.NO_VALUE,
|
/* bitrate= */ Format.NO_VALUE,
|
||||||
/* selectionFlags= */ 0,
|
/* selectionFlags= */ 0,
|
||||||
|
/* roleFlags= */ 0,
|
||||||
/* language= */ null);
|
/* language= */ null);
|
||||||
return new HlsUrl(url, format, /* name= */ "");
|
return new HlsUrl(url, format, /* name= */ "");
|
||||||
}
|
}
|
||||||
|
@ -329,7 +329,8 @@ public final class HlsPlaylistParser implements ParsingLoadable.Parser<HlsPlayli
|
|||||||
height,
|
height,
|
||||||
frameRate,
|
frameRate,
|
||||||
/* initializationData= */ null,
|
/* initializationData= */ null,
|
||||||
/* selectionFlags= */ 0);
|
/* selectionFlags= */ 0,
|
||||||
|
/* roleFlags= */ 0);
|
||||||
variants.add(new HlsMasterPlaylist.HlsUrl(line, format, /* name= */ ""));
|
variants.add(new HlsMasterPlaylist.HlsUrl(line, format, /* name= */ ""));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -361,6 +362,7 @@ public final class HlsPlaylistParser implements ParsingLoadable.Parser<HlsPlayli
|
|||||||
/* sampleRate= */ Format.NO_VALUE,
|
/* sampleRate= */ Format.NO_VALUE,
|
||||||
/* initializationData= */ null,
|
/* initializationData= */ null,
|
||||||
selectionFlags,
|
selectionFlags,
|
||||||
|
/* roleFlags= */ 0,
|
||||||
language);
|
language);
|
||||||
if (isMediaTagMuxed(variants, uri)) {
|
if (isMediaTagMuxed(variants, uri)) {
|
||||||
muxedAudioFormat = format;
|
muxedAudioFormat = format;
|
||||||
@ -404,6 +406,7 @@ public final class HlsPlaylistParser implements ParsingLoadable.Parser<HlsPlayli
|
|||||||
/* codecs= */ null,
|
/* codecs= */ null,
|
||||||
/* bitrate= */ Format.NO_VALUE,
|
/* bitrate= */ Format.NO_VALUE,
|
||||||
selectionFlags,
|
selectionFlags,
|
||||||
|
/* roleFlags= */ 0,
|
||||||
language,
|
language,
|
||||||
accessibilityChannel));
|
accessibilityChannel));
|
||||||
break;
|
break;
|
||||||
|
@ -127,7 +127,8 @@ public final class HlsMediaPeriodTest {
|
|||||||
/* height= */ Format.NO_VALUE,
|
/* height= */ Format.NO_VALUE,
|
||||||
/* frameRate= */ Format.NO_VALUE,
|
/* frameRate= */ Format.NO_VALUE,
|
||||||
/* initializationData= */ null,
|
/* initializationData= */ null,
|
||||||
/* selectionFlags= */ 0),
|
/* selectionFlags= */ 0,
|
||||||
|
/* roleFlags= */ 0),
|
||||||
/* name= */ "");
|
/* name= */ "");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -145,7 +146,8 @@ public final class HlsMediaPeriodTest {
|
|||||||
/* height= */ Format.NO_VALUE,
|
/* height= */ Format.NO_VALUE,
|
||||||
/* frameRate= */ Format.NO_VALUE,
|
/* frameRate= */ Format.NO_VALUE,
|
||||||
/* initializationData= */ null,
|
/* initializationData= */ null,
|
||||||
/* selectionFlags= */ 0),
|
/* selectionFlags= */ 0,
|
||||||
|
/* roleFlags= */ 0),
|
||||||
/* name= */ "");
|
/* name= */ "");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -169,6 +171,7 @@ public final class HlsMediaPeriodTest {
|
|||||||
/* sampleRate= */ Format.NO_VALUE,
|
/* sampleRate= */ Format.NO_VALUE,
|
||||||
/* initializationData= */ null,
|
/* initializationData= */ null,
|
||||||
/* selectionFlags= */ 0,
|
/* selectionFlags= */ 0,
|
||||||
|
/* roleFlags= */ 0,
|
||||||
language);
|
language);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -681,7 +681,8 @@ public class SsManifestParser implements ParsingLoadable.Parser<SsManifest> {
|
|||||||
height,
|
height,
|
||||||
/* frameRate= */ Format.NO_VALUE,
|
/* frameRate= */ Format.NO_VALUE,
|
||||||
codecSpecificData,
|
codecSpecificData,
|
||||||
/* selectionFlags= */ 0);
|
/* selectionFlags= */ 0,
|
||||||
|
/* roleFlags= */ 0);
|
||||||
} else if (type == C.TRACK_TYPE_AUDIO) {
|
} else if (type == C.TRACK_TYPE_AUDIO) {
|
||||||
sampleMimeType = sampleMimeType == null ? MimeTypes.AUDIO_AAC : sampleMimeType;
|
sampleMimeType = sampleMimeType == null ? MimeTypes.AUDIO_AAC : sampleMimeType;
|
||||||
int channels = parseRequiredInt(parser, KEY_CHANNELS);
|
int channels = parseRequiredInt(parser, KEY_CHANNELS);
|
||||||
@ -705,6 +706,7 @@ public class SsManifestParser implements ParsingLoadable.Parser<SsManifest> {
|
|||||||
samplingRate,
|
samplingRate,
|
||||||
codecSpecificData,
|
codecSpecificData,
|
||||||
/* selectionFlags= */ 0,
|
/* selectionFlags= */ 0,
|
||||||
|
/* roleFlags= */ 0,
|
||||||
language);
|
language);
|
||||||
} else if (type == C.TRACK_TYPE_TEXT) {
|
} else if (type == C.TRACK_TYPE_TEXT) {
|
||||||
String language = (String) getNormalizedAttribute(KEY_LANGUAGE);
|
String language = (String) getNormalizedAttribute(KEY_LANGUAGE);
|
||||||
@ -728,6 +730,7 @@ public class SsManifestParser implements ParsingLoadable.Parser<SsManifest> {
|
|||||||
/* codecs= */ null,
|
/* codecs= */ null,
|
||||||
bitrate,
|
bitrate,
|
||||||
/* selectionFlags= */ 0,
|
/* selectionFlags= */ 0,
|
||||||
|
/* roleFlags= */ 0,
|
||||||
/* language= */ null);
|
/* language= */ null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -89,6 +89,7 @@ public class SsMediaPeriodTest {
|
|||||||
/* codecs= */ null,
|
/* codecs= */ null,
|
||||||
bitrate,
|
bitrate,
|
||||||
/* selectionFlags= */ 0,
|
/* selectionFlags= */ 0,
|
||||||
|
/* roleFlags= */ 0,
|
||||||
/* language= */ null);
|
/* language= */ null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -101,6 +102,7 @@ public class SsMediaPeriodTest {
|
|||||||
/* codecs= */ null,
|
/* codecs= */ null,
|
||||||
bitrate,
|
bitrate,
|
||||||
/* selectionFlags= */ 0,
|
/* selectionFlags= */ 0,
|
||||||
|
/* roleFlags= */ 0,
|
||||||
/* language= */ null);
|
/* language= */ null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -113,6 +115,7 @@ public class SsMediaPeriodTest {
|
|||||||
/* codecs= */ null,
|
/* codecs= */ null,
|
||||||
/* bitrate= */ Format.NO_VALUE,
|
/* bitrate= */ Format.NO_VALUE,
|
||||||
/* selectionFlags= */ 0,
|
/* selectionFlags= */ 0,
|
||||||
|
/* roleFlags= */ 0,
|
||||||
language);
|
language);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -122,6 +122,7 @@ public class SsManifestTest {
|
|||||||
/* codecs= */ null,
|
/* codecs= */ null,
|
||||||
/* bitrate= */ Format.NO_VALUE,
|
/* bitrate= */ Format.NO_VALUE,
|
||||||
/* selectionFlags= */ 0,
|
/* selectionFlags= */ 0,
|
||||||
|
/* roleFlags= */ 0,
|
||||||
/* language= */ null);
|
/* language= */ null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user