Fix some typos/consistency nits.
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=132876946
This commit is contained in:
parent
45a5331e30
commit
2da35769ff
@ -353,10 +353,11 @@ public class PlayerActivity extends Activity implements OnClickListener, ExoPlay
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Build a DataSource factory.
|
* Returns a new DataSource factory.
|
||||||
*
|
*
|
||||||
* @param useBandwidthMeter Whether to set {@link #BANDWIDTH_METER} as a listener to the new
|
* @param useBandwidthMeter Whether to set {@link #BANDWIDTH_METER} as a listener to the new
|
||||||
* DataSource factory.
|
* DataSource factory.
|
||||||
|
* @return A new DataSource factory.
|
||||||
*/
|
*/
|
||||||
private DataSource.Factory buildDataSourceFactory(boolean useBandwidthMeter) {
|
private DataSource.Factory buildDataSourceFactory(boolean useBandwidthMeter) {
|
||||||
return new DefaultDataSourceFactory(this, useBandwidthMeter ? BANDWIDTH_METER : null,
|
return new DefaultDataSourceFactory(this, useBandwidthMeter ? BANDWIDTH_METER : null,
|
||||||
@ -364,10 +365,11 @@ public class PlayerActivity extends Activity implements OnClickListener, ExoPlay
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Build a HttpDataSource factory.
|
* Returns a new HttpDataSource factory.
|
||||||
*
|
*
|
||||||
* @param useBandwidthMeter Whether to set {@link #BANDWIDTH_METER} as a listener to the new
|
* @param useBandwidthMeter Whether to set {@link #BANDWIDTH_METER} as a listener to the new
|
||||||
* DataSource factory.
|
* DataSource factory.
|
||||||
|
* @return A new HttpDataSource factory.
|
||||||
*/
|
*/
|
||||||
private HttpDataSource.Factory buildHttpDataSourceFactory(boolean useBandwidthMeter) {
|
private HttpDataSource.Factory buildHttpDataSourceFactory(boolean useBandwidthMeter) {
|
||||||
return new DefaultHttpDataSourceFactory(userAgent, useBandwidthMeter ? BANDWIDTH_METER : null);
|
return new DefaultHttpDataSourceFactory(userAgent, useBandwidthMeter ? BANDWIDTH_METER : null);
|
||||||
|
@ -52,7 +52,7 @@ package com.google.android.exoplayer2;
|
|||||||
* <img src="doc-files/timeline-live-limited.svg" alt="Example timeline for a live stream with
|
* <img src="doc-files/timeline-live-limited.svg" alt="Example timeline for a live stream with
|
||||||
* limited availability">
|
* limited availability">
|
||||||
* </p>
|
* </p>
|
||||||
* A timeline for a live stream consists of a period whose duration is unknown, since its
|
* A timeline for a live stream consists of a period whose duration is unknown, since it's
|
||||||
* continually extending as more content is broadcast. If content only remains available for a
|
* continually extending as more content is broadcast. If content only remains available for a
|
||||||
* limited period of time then the window may start at a non-zero position, defining the region of
|
* limited period of time then the window may start at a non-zero position, defining the region of
|
||||||
* content that can still be played. The window will have {@link Window#isDynamic} set to true if
|
* content that can still be played. The window will have {@link Window#isDynamic} set to true if
|
||||||
|
@ -319,7 +319,7 @@ public final class MediaCodecUtil {
|
|||||||
switch (parts[0]) {
|
switch (parts[0]) {
|
||||||
case CODEC_ID_HEV1:
|
case CODEC_ID_HEV1:
|
||||||
case CODEC_ID_HVC1:
|
case CODEC_ID_HVC1:
|
||||||
return getHevcProileAndLevel(codec, parts);
|
return getHevcProfileAndLevel(codec, parts);
|
||||||
case CODEC_ID_AVC1:
|
case CODEC_ID_AVC1:
|
||||||
case CODEC_ID_AVC2:
|
case CODEC_ID_AVC2:
|
||||||
return getAvcProfileAndLevel(codec, parts);
|
return getAvcProfileAndLevel(codec, parts);
|
||||||
@ -328,7 +328,7 @@ public final class MediaCodecUtil {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Pair<Integer, Integer> getHevcProileAndLevel(String codec, String[] parts) {
|
private static Pair<Integer, Integer> getHevcProfileAndLevel(String codec, String[] parts) {
|
||||||
if (parts.length < 4) {
|
if (parts.length < 4) {
|
||||||
// The codec has fewer parts than required by the HEVC codec string format.
|
// The codec has fewer parts than required by the HEVC codec string format.
|
||||||
Log.w(TAG, "Ignoring malformed HEVC codec string: " + codec);
|
Log.w(TAG, "Ignoring malformed HEVC codec string: " + codec);
|
||||||
|
@ -96,7 +96,6 @@ import java.util.Locale;
|
|||||||
* gaps in playback in case playlist drift apart.
|
* gaps in playback in case playlist drift apart.
|
||||||
*/
|
*/
|
||||||
private static final double LIVE_VARIANT_SWITCH_SAFETY_EXTRA_SECS = 2.0;
|
private static final double LIVE_VARIANT_SWITCH_SAFETY_EXTRA_SECS = 2.0;
|
||||||
private static final String TAG = "HlsChunkSource";
|
|
||||||
private static final String AAC_FILE_EXTENSION = ".aac";
|
private static final String AAC_FILE_EXTENSION = ".aac";
|
||||||
private static final String AC3_FILE_EXTENSION = ".ac3";
|
private static final String AC3_FILE_EXTENSION = ".ac3";
|
||||||
private static final String EC3_FILE_EXTENSION = ".ec3";
|
private static final String EC3_FILE_EXTENSION = ".ec3";
|
||||||
@ -242,7 +241,7 @@ import java.util.Locale;
|
|||||||
int chunkMediaSequence;
|
int chunkMediaSequence;
|
||||||
if (live) {
|
if (live) {
|
||||||
if (previous == null) {
|
if (previous == null) {
|
||||||
// When playling a live stream, the starting chunk will be the third counting from the live
|
// When playing a live stream, the starting chunk will be the third counting from the live
|
||||||
// edge.
|
// edge.
|
||||||
chunkMediaSequence = Math.max(0, mediaPlaylist.segments.size() - 3)
|
chunkMediaSequence = Math.max(0, mediaPlaylist.segments.size() - 3)
|
||||||
+ mediaPlaylist.mediaSequence;
|
+ mediaPlaylist.mediaSequence;
|
||||||
|
@ -929,8 +929,7 @@ public final class Util {
|
|||||||
if ("Sony".equals(Util.MANUFACTURER) && Util.MODEL.startsWith("BRAVIA")
|
if ("Sony".equals(Util.MANUFACTURER) && Util.MODEL.startsWith("BRAVIA")
|
||||||
&& context.getPackageManager().hasSystemFeature("com.sony.dtv.hardware.panel.qfhd")) {
|
&& context.getPackageManager().hasSystemFeature("com.sony.dtv.hardware.panel.qfhd")) {
|
||||||
return new Point(3840, 2160);
|
return new Point(3840, 2160);
|
||||||
} else if ("NVIDIA".equals(Util.MANUFACTURER) && Util.MODEL != null
|
} else if ("NVIDIA".equals(Util.MANUFACTURER) && Util.MODEL.contains("SHIELD")) {
|
||||||
&& Util.MODEL.contains("SHIELD")) {
|
|
||||||
// Attempt to read sys.display-size.
|
// Attempt to read sys.display-size.
|
||||||
String sysDisplaySize = null;
|
String sysDisplaySize = null;
|
||||||
try {
|
try {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user