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
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
- Return early if the selection is unchanged.
- Remove unnecessary variables.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=158138187
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
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
We do this everywhere for index based seeking already.
Issue: #2876
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=157568788
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
- 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
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
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
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
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
A DummySurface is useful with MediaCodec on API levels 23+.
Rather than having to release a MediaCodec instance when the
app no longer has a real surface to output to, it's possible
to retain the MediaCodec, using MediaCodec.setOutputSurface
to target a DummySurface instance instead. When the app has
a real surface to output to again, it can call swap this
surface back in instantaneously. Without DummySurface a new
MediaCodec has to be instantiated at this point, and decoding
can only start from a key-frame in the media.
A future change may hook this up internally in MediaCodecRenderer
for supported use cases, although this looks a little awkward. If
this approach isn't viable, we can require applications wanting
this to set a DummySurface themselves. This isn't easy to do with
the way SimpleExoPlayerView.setPlayer works at the moment, however,
so some changes will be needed either way.
Issue: #677
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=154931778
Looper.myLooper(), the default looper, may be null in background threads. This adds a fallback to use the main app looper.
This will allow ExoPlayer instances to be built in background threads in Photos.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=154845446
To inject custom renderers into SimpleExoPlayer, developers
currently need to extend SimpleExoPlayer and override the
renderer building methods. This is in contrast to the rest
of the library, where we use proper injection. This change
restores consistency. I think it's fine to make
SimpleExoPlayer final again, but if we find people extending
it for non-renderer purposes, we can revert that part of the
change.
ExoPlayerFactory now has analogous methods for the simple
and non-simple cases, which is a nice outcome.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=154295726