There are still things broken about the seeker, but this
cleans up some of the weird bits.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=177315136
Also slightly improve language normalization/documentation.
For this CL, it is assumed that null and "und" languages are different
entities. Once we fully tackle language tag normalization, we can decide
whether to normalize the "undefined" language.
Issue:#2867
Issue:#2980
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=177008509
A message to stop the playback and to quit the playback thread was posted in release().
The stop message removed all other already queued messages which might include
the second message to quit the thread. That led to infinite waiting in the
release method because the playback thread never got the quit signal.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=176997104
currentTimeMillis is not guaranteed to be monotonic and elapsedRealtime is
recommend for interval timing.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=176853118
In a test run where no exceptions were thrown on the main thread and the test
did not time out, exceptions from onPlayerError were not correctly propagated to
the test thread (handleException would be called with null).
Fix ExoPlayerTestRunner.onPlayerError to propagate the actual exception from the
player.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=176825907
We've found that in our production environment, the AAC stream's timestamp exceeds the 33bit limit from time to time, when it happens, `peekId3PrivTimestamp` returns a value that is greater than `TimestampAdjuster.MAX_PTS_PLUS_ONE`, which causes a overflow in `TimestampAdjuster.adjustTsTimestamp` (overflow inside `ptsToUs`) after playing for a while . When the overflow happens, the start time of the stream becomes negative and the playback simply stucks at buffering forever.
I fully understand that the 33bit is a spec requirement, thus I asked our stream provider to correct this mistake. But in the mean time, I'd also like ExoPlayer to handle this situation more error tolerance, as in other platforms (iOS, browsers) we see more tolerance behavior.
Parse DASH manifest's publishTime node as defined by ISO/IEC 23009-1:2014,
section 5.3.1.2.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=176525922
Add Builder pattern to SingleSampleMediaSource and mark existing constructors as
deprecated.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=176332964
- MediaSourceTestRunner aims to encapsulate some of the logic
currently used in DynamicConcatenatingMediaSourceTest, so it
can be re-used for testing other MediaSource implementations.
- The change also fixes DynamicConcatenatingMediaSourceTest to
execute calls on the correct threads, and to release handler
threads at the end of each test.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=176117535
This test seems to obtain a timeline from a prepared
FakeMediaSource, but that's identical to the timeline
passed into that source to start with :).
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=176117133
This is helpful for tests which don't care about detailled timeline set-ups
besides the number of windows.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=176097369
Add Builder pattern to ExtractorMediaSource and mark existing constructors as
deprecated.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=176088810
This change makes sure progress is being made before reporting
a discontinuity. Else in cases like having no network and
playing a live stream, we allow the discontinuity to be read
each time an internal retry occurs, meaning it gets read
repeatedly. This does no harm, but is noisy and unnecessary.
We should also not allow skipping whilst there is a pending
reset or discontinuity notification, just like we don't allow
reads.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=175953064
Also switch from using MIME types to C.ENCODING_* encodings in DefaultAudioSink.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=175936872
Add Builder pattern to HlsMediaSource and mark existing constructors as
deprecated.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=175803853
The purpose of this change isn't to fix anything. It's just to
simplify things a little bit. There will be following CLs that
make some changes to get things onto correct threads.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=175800354
This allows to remove the LazyMediaSource used within
DynamicConcatenatingMediaSourceTest and also allows to write test which
simulates dynamic timeline or manifest updates.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=175680371
We deliberately compare the track group returned by the track selection
with the track group in the parameter to check if the track selection is
referring to this particular track group.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=175660909
Add Builder pattern to SsMediaSource and mark existing constructors as
deprecated.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=175659618
This also allows exposing multiple CC channels to any fMP4 extractor client.
Issue:#1661
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=174458725
Add onEnable() and onDisable() call-backs to TrackSelection. This allows
TrackSelection to perform interesting operations (like subscribe to
NetworkStatus) and clean up after itself.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=175558485
Start with DASH MediaSource. The number of injected arguments is getting
out-of-control.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=175529031
Someone must have forgotten to do this when rewriting this class.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=175296249
Also fix propagation of ad errors that occur when no player
is attached.
Issue: #3548
Issue: #3556
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=178767997