1. 29 Apr, 2021 5 commits
    • Remove deprecated CastPlayer methods · b65945b3
      PiperOrigin-RevId: 371102614
      olly committed
    • Avoid NPEs when checking the current thread in SimpleExoPlayer · b9b405ef
      Before, Looper.myLooper().getThread() could throw an NPE if the current
      thread didn't have any looper.
      
      #minor-release
      
      PiperOrigin-RevId: 371097485
      kimvde committed
    • Add get video size · de895c48
      Move VideoSize in the common module and have the Player return it.
      
      `Listener` and `AnalyticsListener` `onVideoSizeChanged` are updated
      with the old method deprecated.
      
      `VideoRendererEventListener.onVideoSizeChanged` was also migrated to
      `VideoSize` but the old method is removed, not deprecated.
      This is because:
       - apps calling/listening to this method is a rare and niche use-case.
       - it would introduce hard to diagnostic issues where if only the caller
         or the callee is updated to use the new method, the event will be lost.
         This doesn't occur with the other 2 listeners as the caller is always
         in ExoPlayer library and was updated to call both the old and new methods.
      
      VideoSize is used everywhere except in `Format` as this would lead to
      too much refactoring and backward compatibility breakage for little gain.
      
      #minor-release
      
      PiperOrigin-RevId: 371087419
      krocard committed
    • Reformat some javadoc · b5d47401
      PiperOrigin-RevId: 371068549
      ibaker committed
  2. 28 Apr, 2021 6 commits
  3. 27 Apr, 2021 12 commits
  4. 26 Apr, 2021 13 commits
    • Add missing removeDrmEventListener calls. · 45616f91
      We remove other source related listeners if a MediaSource is
      removed from the playlist or the player/source is released.
      This isn't currently done for the DRM listener.
      
      #minor-release
      
      PiperOrigin-RevId: 370482571
      tonihei committed
    • DebugMediaCodecVideoRenderer: expect output format change after flush · 7af95230
      The DebugMediaCodecVideoRenderer expects the MediaCodec to return an
      output format change after the MediaCodecRenderer detects an input
      format change, but the DebugMediaCodecVideoRenderer resets its state
      after flushing MediaCodec. This does not cover the following case: an
      input format change is detected when queueing sample with timestamp X
      and before the respective output buffer is dequeued, the player seeks
      back to X. After seeking back to X, the MCR does not trigger an input
      format change for X again, and MediaCodec (correctly) returns an output
      format change before dequeueing output X.
      
      This commit is changing DebugMediaCodecVideoRenderer to keep expecting
      an output format change after a flush, is one a format pending output.
      Such an an edge-case is addressed already in MediaCodecRenderer.
      
      PiperOrigin-RevId: 370482506
      christosts committed
    • Merge pull request #8851 from abeljim:dev-v2-8435-underlinestrikeout · ed5ec4e8
      PiperOrigin-RevId: 370474795
      Andrew Lewis committed
    • MediaCodecRenderer: do not call protected methods from constructor · a162d689
      MediaCodecRenderer is calling its protected methods
      resetCodecStateForRelease() and resetCodecStateForFlush() from its
      constructor. Classess that override the methods (eg.
      DebugMediaCodecVideoRenderer) need to checks if the methods
      are called from the superclass constructor thus their members are not
      initialized yet.
      
      With this change, the MCR constructor does not call the two
      methods and sets the respective state directly on its fields.
      
      PiperOrigin-RevId: 370445978
      christosts committed
    • Change String MediaMetadata.title to CharSequence trackTitle. · 3f3d1fb5
      PiperOrigin-RevId: 370439509
      samrobinson committed
    • CronetDataSource: fix overflow bug · bc69509a
      There is a bug when CronetDataSource opens an asset with a length
      bigger that Integer.MAX_INT  (2147483647 bytes, ~2GB). In read(),
      `bytesRemaining` is cast to int, which overflows and evaluates to a
      negative number, causing `bytesRead` to be negative too.
      
      PiperOrigin-RevId: 370434368
      christosts committed
    • DebugMediaCodecVideoRenderer clean-up · 2fba9215
      After refactoring MediaCodecRenderer's configureCodec() to
      getMediaCodecConfiguration(), there was some state initialization left
      in DebugMediaCodecVideoRenderer's configureCodec(). This is now moved
      inside DebugMediaCodecVideoRenderer.onCodecInitialized().
      
      PiperOrigin-RevId: 370430193
      christosts committed
    • Update MediaSourceFactory javadoc · d8ff0210
      Remove references to deprecated methods. I didn't replace the DRM info
      with references to non-deprecated methods because I'm not sure it
      belongs at class level. The methods themselves are already documented
      in detail.
      
      PiperOrigin-RevId: 370421087
      ibaker committed
    • Add thread names to the 'player accessed on wrong thread' message · 2b582b54
      This will help app developers identify which thread is being used and
      which is expected.
      
      PiperOrigin-RevId: 370409697
      ibaker committed
    • Merge pull request #8852 from abeljim:dev-v2 · 2a0b45ac
      PiperOrigin-RevId: 370407108
      Andrew Lewis committed
    • Fix 1 ErrorProneStyle finding: · 0db4f134
      * @Nullable is not a TYPE_USE annotation, so should appear before any modifiers and after Javadocs.
        (see go/java-style#s4.8.5-annotations)
      
      This CL looks good? Just LGTM and Approve it!
      This CL doesn’t look good? This is what you can do:
      * Suggest a fix on the CL (go/how-to-suggest-fix).
      * Revert this CL, by replying "REVERT: <provide reason>"
      * File a bug under go/error-prone-bug for category ErrorProneStyle if the change looks generally problematic.
      * Revert this CL and not get a CL that cleans up these paths in the future by
      replying "BLOCKLIST: <provide reason>". This is not reversible! We recommend to
      opt out the respective paths in your CL Robot configuration instead:
      go/clrobot-opt-out.
      
      This CL was generated by CL Robot - a tool that cleans up code findings
      (go/clrobot). The affected code paths have been enabled for CL Robot in //depot/google3/java/com/google/android/libraries/exoplayer/METADATA which is reachable following include_presubmits from //depot/google3/third_party/java_src/android_libs/media/METADATA.
      Anything wrong with the signup? File a bug at go/clrobot-bug.
      
      #codehealth
      
      PiperOrigin-RevId: 370377751
      olly committed
    • Add Player.getAvailableCommands() · 0616c0d1
      Add method getAvailableCommands() in Player interface to return
      the available commands. Method isCommandAvailable() moved to
      BasePlayer since it can be implelented by calling
      getAvailableCommands().
      
      PiperOrigin-RevId: 370059328
      christosts committed
    • Fix 4 ErrorProneStyle findings: · 87d8907b
      * @Encoding is not a TYPE_USE annotation, so should appear before any modifiers and after Javadocs.
        (see go/java-style#s4.8.5-annotations) (2 times)
      * @Nullable is not a TYPE_USE annotation, so should appear before any modifiers and after Javadocs.
        (see go/java-style#s4.8.5-annotations) (2 times)
      
      This CL looks good? Just LGTM and Approve it!
      This CL doesn’t look good? This is what you can do:
      * Suggest a fix on the CL (go/how-to-suggest-fix).
      * Revert this CL, by replying "REVERT: <provide reason>"
      * File a bug under go/error-prone-bug for category ErrorProneStyle if the change looks generally problematic.
      * Revert this CL and not get a CL that cleans up these paths in the future by
      replying "BLOCKLIST: <provide reason>". This is not reversible! We recommend to
      opt out the respective paths in your CL Robot configuration instead:
      go/clrobot-opt-out.
      
      This CL was generated by CL Robot - a tool that cleans up code findings
      (go/clrobot). The affected code paths have been enabled for CL Robot in //depot/google3/java/com/google/android/libraries/exoplayer/METADATA which is reachable following include_presubmits from //depot/google3/third_party/java_src/android_libs/media/METADATA.
      Anything wrong with the signup? File a bug at go/clrobot-bug.
      
      #codehealth
      
      PiperOrigin-RevId: 370048160
      olly committed
  5. 23 Apr, 2021 1 commit
  6. 22 Apr, 2021 3 commits