2313 Commits

Author SHA1 Message Date
olly
2f7de7d3e8 Merge ContentDataSource fixes + tests from GitHub
https://github.com/google/ExoPlayer/pull/2963/files
8bb643976f

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=160128047
2017-06-30 18:39:16 +01:00
hoangtc
a5eba0162b Update DrmSessionException.
Make DrmSessionException takes in Throwable cause instead of Exception cause, which is more limiting and doesn't add any benefit.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=160121486
2017-06-30 18:39:04 +01:00
olly
fd9b162d0f Fix setSelectionOverride(index, tracks, null)
Issue: #2988

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=159958591
2017-06-30 18:37:11 +01:00
Oliver Woodman
d293cc4989 Mini cleanup 2017-06-30 18:37:03 +01:00
Oliver Woodman
5eb64dbe12 Fix ContentDataSource and enhance tests to validate read data 2017-06-30 18:36:56 +01:00
Karol Wrótniak
795e3be440 null AssetFileDescriptors support added in ContentDataSource 2017-06-30 18:36:48 +01:00
Karol Wrótniak
66c461e65b Comments from https://github.com/google/ExoPlayer/pull/2963#discussion_r122669328 applied 2017-06-30 18:36:41 +01:00
Karol Wrótniak
a0a50ac979 InputStream creation for ContentDataSource changed 2017-06-30 18:36:33 +01:00
Karol Wrótniak
4b8cddbefd Introduced failing unit test for ContentDataSource 2017-06-30 18:36:21 +01:00
olly
76faa5b6d2 Move clearing of joining deadline back to onStopped
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=159421000
2017-06-30 18:34:46 +01:00
olly
92206b9fc2 TTML: Ignore regions that don't declare origin and extent
Issue: #2953

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=159218386
2017-06-30 18:33:51 +01:00
olly
e618080c73 Adjust incorrect looking max-channel counts
Issue: #2940

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=159099602
2017-06-30 18:33:42 +01:00
olly
facfa52677 Log frame counts when we see a spurious audio timestamp
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=158977741
2017-06-30 18:30:51 +01:00
andrewlewis
4e578a1b21 Increase MP3 sniffing distance
Issue: #2951

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=158960483
2017-06-14 19:44:38 +01:00
olly
80be637dcc Allow overriding of getCodecMaxValues
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=158686545
2017-06-12 10:37:00 +01:00
olly
4510abf278 Update handled schemes for timing element resolution.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=158269487
2017-06-12 10:36:52 +01:00
olly
df99922ac1 Bump version + update release notes
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=158153988
2017-06-06 18:25:31 +01:00
olly
fb7cb507ea Expose current scrubber position through onScrubStart
Issue: #2910

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=158149904
2017-06-06 18:25:22 +01:00
olly
1ac8420b7f Constraint buffered percentage to [0,100]
Issue: #2902

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=158142754
2017-06-06 17:53:07 +01:00
aquilescanta
a0c884849e For HLS mode, pick the lowest PID track for each track type
This prevents strange behaviors for streams that changes the track declaration
order in the PMT.

NOTE: This should not change ANY behavior other than the one described above.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=158140890
2017-06-06 17:52:54 +01:00
olly
79048ffae6 Further cleanup of updateSelectedTrack
- Return early if the selection is unchanged.
- Remove unnecessary variables.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=158138187
2017-06-06 17:52:47 +01:00
hoangtc
8241bb8a6e Fix a minor bug with AdaptiveTrackSelection.
When updating track selection, we should only revert back from ideal
track selection to current track selection if the currently selected
track is not black-listed.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=158135644
2017-06-06 17:52:39 +01:00
aquilescanta
df5e75b76c Pick the lowest quality video when capabilities are exceeded
Issue:#2901

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=158006727
2017-06-06 17:52:33 +01:00
andrewlewis
cc748c30c7 Add a null check in DummySurface static initializer
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=157958694
2017-06-06 17:52:26 +01:00
andrewlewis
9796a09698 Assume CBR for MP3s with Info headers
Issue: #2895

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=157841519
2017-06-06 17:52:18 +01:00
olly
c36793ab36 Move adaptation disabling workaround into MediaCodecUtil
This is necessary to make sure that the correct thing happens
where MediaCodecInfo.adaptive is queried directly (for example,
MediaCodecVideoRenderer uses the field to determine how to size
input buffers). Also disable adaptive on Nexus 10.

Issue: #2806

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=157583473
2017-06-06 17:52:10 +01:00
aquilescanta
80600ffe1b Ignore invalid EXT-X-PLAYLIST-TYPE values
Issue:#2889

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=157571216
2017-06-06 17:52:01 +01:00
olly
c80b60f4ac Constraint seeks within bounds for ConstantBitrateSeeker
We do this everywhere for index based seeking already.

Issue: #2876

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=157568788
2017-06-06 17:51:54 +01:00
andrewlewis
854c8d0381 Fix DefaultTimeBar invalidation
Issue: #2871

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=157562792
2017-06-06 17:51:48 +01:00
aquilescanta
2795269dae Use AVERAGE-BANDWIDTH instead of BANDWIDTH when available
Also prevent BANDWIDTH's regex from matching the AVERAGE-BANDWIDTH attribute.

Issue:#2863

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=157219453
2017-06-06 17:51:40 +01:00
olly
5a754fe761 Don't fail if we find a track is unsupported
Use AUDIO_UNKNOWN instead. This is in line with our handling
of video tracks with VIDEO_UNKNOWN.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=157209428
2017-06-06 17:51:33 +01:00
olly
67cb7d8da5 Fix SmoothStreaming Timeline
There were a few things wrong. Specifically the case in
the ref'd issue. Also, the timeline was being marked as
non-dynamic in the empty-but-live case (it should be
marked dynamic as segments may be added later).

Issue: #2760

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=157103727
2017-06-06 17:50:49 +01:00
aquilescanta
22137f6215 Flexibilize Util.parseXsDateTime to allow single digit hour
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=156999955
2017-06-06 17:50:43 +01:00
olly
10f8944060 Don't select more than one audio/video/text track by default
Issue: #2618

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=156986606
2017-06-06 17:50:35 +01:00
olly
fe50459449 Bump version and update release notes
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=156872383
2017-05-23 17:58:33 +01:00
olly
bf71ad4883 Fix TTML positioning
Issue: #2824

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=156781252
2017-05-23 17:20:35 +01:00
olly
fb3c190556 Clear the correct buffer in MediaCodecRenderer
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=156131086
2017-05-23 17:19:55 +01:00
olly
a4a3154604 Clear up BaseRenderer.disable
- Call onDisabled last. onDisabled really shouldn't be doing
  anything with the stream, so pretty sure this is fine (and
  guarantees the stream is cleared properly even if onDisabled
  throws a RTE).
- Remove super.onDisabled calls from Text/Metadata renderers.
  This is just for consistency; we don't make such calls in
  other direct descendants of BaseRenderer.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=156130640
2017-05-23 17:19:43 +01:00
andrewlewis
a0f4bf0ee1 Constrain DefaultTimeBar maximum positions
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=156113616
2017-05-23 17:19:22 +01:00
bachinger
e7ec4e6755 Enlarge size of data array of parsable packetArray if ogg packet size exceeds
the current size.

https://github.com/google/ExoPlayer/issues/2782

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=156018137
2017-05-23 17:18:50 +01:00
sillywab8
1cda6e025e Add support for AVC Level 5.2 2017-05-23 17:18:38 +01:00
andrewlewis
7eadfb1ff0 Fix wrap_content handling in DefaultTimeBar
Issue: #2788

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=155705318
2017-05-11 07:43:41 +01:00
aquilescanta
8d6f5d86b4 Make MODE_SINGLE_PMT the default mode
Even though this is not strictly spec compliant, this will make exoplayer
behave like it used to before multiple program support. Developers
who want to take advantage of the multiple program support are probably
less than the ones who only want their stream to "just work". This is
particularly useful for streams obtained after a filtering component,
like a tv tuner.

Issue:#2757

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=155486122
2017-05-11 07:43:34 +01:00
aquilescanta
70b628526a Propagate playlist loading error if it prevents playback
This imitates DashMediaSource's behavior.

Issue:#2623

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=155485738
2017-05-11 07:43:27 +01:00
tasnimsunny
51132f58f9 Make removal of non-existent cache span a no-op
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=155413733
2017-05-11 07:42:58 +01:00
olly
1d6816d94b Avoid process death if OOM occurs on a loading thread
This is most commonly caused by malformed media, where
the media indicates that something we need to make an
allocation for is *really huge*. Failing playback is
appropriate for this case; killing the process is not.

Issue: #2780

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=155408062
2017-05-11 07:42:51 +01:00
andrewlewis
963b7cbf72 Fix interpolation for rate/pitch adjustment
Based on https://github.com/waywardgeek/sonic/commit/7b441933.

Issue: #2774

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=155349817
2017-05-11 07:42:41 +01:00
andrewlewis
2d2fcf1510 Use native byte order for SimpleOutputBuffers
The default byte order for ByteBuffers is big endian, but platform decoder
output buffers use native byte order. AudioProcessors handle native byte order
input/output.

When using a software audio decoding extension the Sonic audio processor would
receive big endian input but was outputting to a native byte order buffer,
which could be little endian. This mismatch caused audio output to be
distorted.

After this change both platform decoder and extension decoder output buffers
should be in native byte order.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=155320973
2017-05-11 07:42:34 +01:00
arakawa_yusuke
65607b2736 Remove fully-qualified name 2017-05-11 07:42:27 +01:00
olly
bcee02cde2 Don't set MAX_INPUT_SIZE to unnecessarily large values
If the codec isn't adaptive, there's no need to accommodate
the width/height/input-size of streams that don't have the
same resolution as the current stream. This is because we'll
always need to instantiate a new codec anyway.

Issue: #2607

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=155194458
2017-05-11 07:42:18 +01:00