1. 13 Jan, 2021 1 commit
    • Remove ExoPlaybackException.TYPE_OUT_OF_MEMORY · c63f3d92
      Catching OOM errors is bad practise unless there is a specific known
      cause that tried to allocate a large amount of memory. Without this
      known cause with a large allocation, the source of the error is
      likely somewhere else in the app and every random small further
      allocation may lead to additional OOM errors (for example b/145134199).
      
      We have three known causes in ExoPlayer:
       1. Source allocations based on unexpected values in streams. This is
          caught on the loader thread and reported as an
          UnexpectedLoaderException.
       2. Output buffer allocations by non-MediaCodec decoders. These are
          caught in SimpleDecoder on the decoder thread and reported as
          UnexpectedDecodeException.
       3. Input buffer allocations by non-MediaCodc decoders in their
          constructors. These are currently caught on a higher-level and
          reported as ExoPlaybackException.TYPE_OUT_OF_MEMORY.
      
      For consistency and to prevent catching OOM errors without known cause
      we can remove the generic TYPE_OUT_OF_MEMORY and catch the specific
      exception where it occurs to report it as an
      ExoPlaybackException.TYPE_RENDERER. This also has the added advantage
      that the format metadata is added to the exception.
      
      PiperOrigin-RevId: 351326688
      tonihei committed
  2. 12 Jan, 2021 3 commits
  3. 11 Jan, 2021 11 commits
  4. 08 Jan, 2021 18 commits
  5. 07 Jan, 2021 7 commits
    • Deprecate stop(boolean) · 456622a2
      `stop(true)` is almost the same as `clearMediaItems(); stop();`, except that
      any player error isn't cleared. Clearing media items more clearly expresses the
      intent.
      
      PiperOrigin-RevId: 350516748
      andrewlewis committed
    • Fix MIGHT_NOT_USE_FULL_NETWORK_SPEED for VOD DASH streams. · 2c925a41
      The flag compared against the nowTime in the period that is only
      set to a positive value for live streams.
      
      PiperOrigin-RevId: 350514934
      tonihei committed
    • Update surface frame-rate based on fixed frame-rate estimate · 855db95f
      PiperOrigin-RevId: 350442843
      olly committed
    • Clarify parameter Javadoc for playback speed values. · 25ed6b12
      In many cases we just used "playback speed" as a detailed Javadoc
      parameter or return type definition. This doesn't define which scale
      the speed is using.
      
      PlaybackParameters as the main point to set the speed already uses a
      more precise wording to describe the value as a factor by which playback
      will be sped up.
      
      This change replaces other usages of "playback speed" with this wording
      whereever we would usually add a unit, keeping "playback speed" for
      summary statements etc to reference the general concept that doesn't
      usually require a unit.
      
      PiperOrigin-RevId: 350379139
      tonihei committed
    • Propagate audio session ID to MediaCodecVideoRenderer · d1d28a41
      Issue: #8190
      PiperOrigin-RevId: 350357825
      olly committed
    • Turn on parallel video and audio adaptation by default. · aa2beb08
      The experimental setting shows positive results and can be turned
      on by default. To avoid adaptation between HLS audio formats without
      bitrates, we need to ensure that only formats with bitrates are
      considered for adaptation.
      
      Also added tests for these features.
      
      Issue: #5111
      PiperOrigin-RevId: 350315296
      tonihei committed
    • Keep pending output format after multiple flushes · 51d90a40
      The AsynchronousMediaCodecCallback has logic to retain a pending
      output format in case flush() is called. This commit fixes a case where
      calling flush() again while an output format is pending would nullify
      the pending output format.
      
      A unit test is added in AsynchronousMediaCodecCallback but not the
      AsynchronousMediaCodecAdapter. That is because the adapter operates
      directly on top of MediaCodec, but Robolectric's ShadowMediaCodec
      produces an output format on every MediaCodec.start(). This is
      unrealistic when operating MediaCodec in asynchronous mode where we
      need to call MediaCodec.start() after every MediaCodec.flush().
      
      PiperOrigin-RevId: 350176659
      christosts committed