media/library/core/src/main
olly 7773831d88 Add DummySurface for use with MediaCodec
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
2017-05-04 20:52:19 +01:00
..
java/com/google/android/exoplayer2 Add DummySurface for use with MediaCodec 2017-05-04 20:52:19 +01:00
javadoc/com/google/android/exoplayer2/doc-files Modularize ExoPlayer steps 1 + 2. 2017-03-22 18:49:30 +00:00
AndroidManifest.xml Modularize ExoPlayer steps 1 + 2. 2017-03-22 18:49:30 +00:00