1. 05 Sep, 2019 16 commits
  2. 01 Sep, 2019 3 commits
  3. 30 Aug, 2019 10 commits
  4. 23 Aug, 2019 11 commits
    • Do not compare bitrates of audio tracks with different languages. · d1084f27
      The last selection criteria is the audio bitrate to prefer higher-quality
      streams. We shouldn't apply this criterium though if the languages of the
      tracks are different.
      
      Issue:#6335
      PiperOrigin-RevId: 265064756
      tonihei committed
    • Defer adsManager.init until the timeline has loaded · 34cc5f4c
      If the app seeks after we get an ads manager but before the player exposes the
      timeline with ads, we would end up expecting to play a preroll even after the
      seek request arrived. This caused the player to get stuck.
      
      Wait until a non-empty timeline has been exposed via onTimelineChanged before
      initializing IMA (at which point it can start polling the player position). Seek
      requests are not handled while an ad is playing.
      
      PiperOrigin-RevId: 265058325
      andrewlewis committed
    • Fix VpxDecoder error codes to match the ones in vpx_jni.cc · 75f744ae
      PiperOrigin-RevId: 265018783
      sofijajvc committed
    • Add @CallSuper annotations in SimpleDecoder · aae64151
      The implementation can't work properly unless these methods are called by
      subclasses, so annotate them to require calling the super implementation when
      overriding.
      
      PiperOrigin-RevId: 265017433
      andrewlewis committed
    • Move playback error into PlaybackInfo. · 29af6899
      The error is closely related to the playback state IDLE and should be updated
      in sync with the state to prevent unexpected event ordering and/or keeping the
      error after re-preparation.
      
      Issue:#5407
      PiperOrigin-RevId: 265014630
      tonihei committed
    • Update comment to indicate correct int value of "FLAG_ALLOW_CACHE_FRAGMENTATION"… · 7883eabb
      Update comment to indicate correct int value of "FLAG_ALLOW_CACHE_FRAGMENTATION" in ExoPlayer2 upstream DataSpec
      
      Currently the value of FLAG_ALLOW_CACHE_FRAGMENTATION is defined as "1 << 4" but commented as "8". Either the value of FLAG_ALLOW_CACHE_FRAGMENTATION should be "1 << 3", or the comment should be 16. Here I am modifying the comment since it does not affect any current behavior.
      
      PiperOrigin-RevId: 265011839
      olly committed
    • Avoid potential ArrayStoreException with audio processors · 6748eeca
      The app is able to pass a more specialized array type, so the Arrays.copyOf call
      produces an array into which it's not valid to store arbitrary AudioProcessors.
      
      Create a new array and copy into it to avoid this problem.
      
      PiperOrigin-RevId: 264779164
      andrewlewis committed
    • Prevent NPE in ImaAdsLoader onPositionDiscontinuity. · 51476fa2
      Any seek before the first timeline becomes available will result in a NPE.
      Change it to handle that case gracefully.
      
      Issue:#5831
      PiperOrigin-RevId: 264603061
      tonihei committed
    • Gracefully handle chunkful preparation without chunks. · 6a1331f1
      This situation happens if the first chunk to load is already behind the end
      of the stream. In this case, the preparation never completes because
      HlsSampleStreamWrapper gets stuck in a prepared=false and loadingFinished=true
      state.
      
      Gracefully handle this situation by attempting to load the last chunk if still
      unprepared to ensure that track information is obtained as far as possible.
      Otherwise, it wouldn't be possible to play anything even when seeking back.
      
      Issue:#6314
      PiperOrigin-RevId: 264599465
      tonihei committed
    • Support out-of-band HDR10+ metadata for VP9 · f0aae7ae
      Extract supplemental data from block additions in WebM/Matroska.
      
      Allow storing supplemental data alongside samples in the SampleQueue and write
      it as a separate field in DecoderInputBuffers.
      
      Handle supplemental data in the VP9 extension by propagating it to the output
      buffer.
      
      Handle supplemental data for HDR10+ in MediaCodecVideoRenderer by passing it to
      MediaCodec.setParameters, if supported by the component.
      
      PiperOrigin-RevId: 264582805
      andrewlewis committed
    • Fix handling of delayed AdsLoader.start · c361e3ab
      AdsMediaSource posts AdsLoader.start to the main thread during preparation, but
      the app may call AdsLoader.setPlayer(null) before it actually runs (e.g., if
      initializing then quickly backgrounding the player).
      
      This is valid usage of the API so handle this case instead of asserting. Because
      not calling setPlayer at all is a pitfall of the API, track whether setPlayer
      has been called and still assert that in AdsLoader.start.
      
      PiperOrigin-RevId: 264329632
      andrewlewis committed