1. 09 Nov, 2022 8 commits
    • HDR: Implement ForceInterpretHdrVideoAsSdr · 45f6c24b
      Also, document that we tone map when no HDR features are explicitly set
      
      PiperOrigin-RevId: 487310971
      (cherry picked from commit 2ff5dab0)
      huangdarwin committed
    • Set HDR color info on FrameworkMuxer · e57838d7
      Not setting the color info results in a missing "colr" box in the produced
      container, under file/moov/trak/mdia/minf/stbl/stsd/hvc1. This means extractors
      will not be able to find out the transcoded file is HDR.
      
      In `Transformer`, this means it can't transcode this transcoded file, because
      it currently relies on the container bearing HDR info to construct the
      transcoding sample pipeline.
      
      PiperOrigin-RevId: 487276712
      (cherry picked from commit 3c74e076)
      claincly committed
    • Wait with PlayerInfo updates until all pending operations are done · dddc6026
      Accepting a PlayerInfo while the MediaController is masking its state
      means we are reverting all masking changes we've made earlier. This
      only makes sense if the update already contains the masked operation.
      If multiple operations are in flight (or are sent from the session
      while they are in flight), we need to wait until all of them are
      handled before accepting new updates.
      
      In cases where a new update from the session excludes the Timeline
      and the masked state is incompatible with the new update, we also
      risk an exception if we accept the update too early.
      
      PiperOrigin-RevId: 487266899
      (cherry picked from commit 0b4ba3e3)
      tonihei committed
    • Change UnsupportedEncodingException to IllegalArgumentException · bc3aef08
      In startTransformation method we were throwing UnsupportedEncodingException (IOException) when mediaItem with unsupported arguments is passed.
      Changed this to IllegalArgumentException which seems more logical here.
      
      PiperOrigin-RevId: 487259296
      (cherry picked from commit 818bf4a2)
      sheenachhabra committed
    • MediaController: Add missing event flags (2/2) · 707c2d89
      This is the follow-up commit where the onEvents callback
      raised by MediaController contains the missing events, for the
      case where MediaController is connected to a legacy MediaSession.
      
      #minor-release
      
      PiperOrigin-RevId: 487231996
      (cherry picked from commit c403b4ce)
      christosts committed
    • Add ExoPlayerAssetLoader · c89ceb87
      Just move some code around for now, to start setting up the overall
      structure.
      
      PiperOrigin-RevId: 487229329
      (cherry picked from commit 95f37b4d)
      kimvde committed
    • Merge Issue: google/ExoPlayer#10762: Fix ffmpeg jni wrapper returning invalid result codes · d262f760
      Imported from GitHub PR Issue: google/ExoPlayer#10762
      
      This ensure that ffmpeg error code are properly translated to values that the ExoPlayer decoder understand.
      The main gain is that it allows the decoder to properly ignore more cases of invalid data and recover.
      The second gain is that the other errors are now proper ExoPlayer errors and no more obscure buffer ones.
      
      Fixes: Issue: google/ExoPlayer#10760
      Merge 82ceeb77d6df71f5ffb0474db66a36fd6eb8e51a into 972e169b
      COPYBARA_INTEGRATE_REVIEW=go/exoghi/10762 from Tolriq:ffmpeg_error_code 82ceeb77d6df71f5ffb0474db66a36fd6eb8e51a
      PiperOrigin-RevId: 487189910
      
      (cherry picked from commit a1c04cd4)
      Tolriq committed
    • Move slow mo logic to sample pipelines · 59769552
      This is to avoid having this logic in TransformerInternal once it is
      added.
      
      PiperOrigin-RevId: 487159941
      (cherry picked from commit 714e5565)
      kimvde committed
  2. 08 Nov, 2022 2 commits
  3. 07 Nov, 2022 6 commits
    • Move muxer initialization off application thread · 64c87a5f
      Problem: We are initialising muxer as soon as we start the transformation. Now the startTransformation() method can be called from main thread, but muxer creation is an I/O operation and should be not be done on main thread.
      
      Solution: Added lazy initialisation of muxer object. The actual transformation happens on background thread so the muxer will be initialised lazily from background thread only.
      
      Another way was to provide an initialize() method on MuxerWrapper which will explicitly initialise muxer object but with this approach the caller need to call the initialise method before calling anything else. With current implementation the renderers are calling MuxerWrapper methods on various callbacks (Not sequentially) and also we are sharing same muxer with multiple renderers so It might become confusing for the caller on when to call the initialise() method. Also there are few methods on MuxerWrapper which dont really need muxer object. So in short it might make MuxerWrapper APIs more confusing.
      
      Validation: Verified the transformation from demo app.
      PiperOrigin-RevId: 486735787
      (cherry picked from commit eb357654)
      sheenachhabra committed
    • HDR: Set decoder codec profile and level if available. · a42050f4
      This should be necessary to ensure decoders see fewer errors.
      
      Setting this resulted in removing native_dequeueOutputBuffer errors on OMX.MTK decoders for in-app tone mapping prototyping.
      
      PiperOrigin-RevId: 486715941
      (cherry picked from commit e510d990)
      huangdarwin committed
    • HDR: Update test FileUtil to handle null ColorInfo. · b770eb86
      PiperOrigin-RevId: 486706595
      (cherry picked from commit 23e724a0)
      huangdarwin committed
    • Set matching folder type in Session demo app. · 13a4089e
      The folder type is useful metadata to understand programmatically
      what criterion was used to create the folder.
      
      PiperOrigin-RevId: 486653317
      (cherry picked from commit ab9f0608)
      tonihei committed
    • MediaControllerListenerWithMediaSessionCompatTest: clean imports · 3bad1f32
      Remove static imports to Player constants to make the code more readable.
      
      #minor-release
      
      PiperOrigin-RevId: 486619911
      (cherry picked from commit 09651ed2)
      christosts committed
    • Changed MediaController to return last estimated position while paused · 8270dd45
      The method getCurrentPosition() may return a lesser position during pause than the previous retrieved value due to ipc call delay in playerInfo update. Users see track position jump backwards at pause. Fixed to return last estimated position while paused if have not received updated playerInfo. Code is deduped to point getContentPosition() to getCurrentPosition() when !isPlayingAd.
      
      PiperOrigin-RevId: 486617341
      (cherry picked from commit 9336b95b)
      michaelkatz committed
  4. 04 Nov, 2022 1 commit
  5. 03 Nov, 2022 5 commits
  6. 02 Nov, 2022 2 commits
  7. 01 Nov, 2022 3 commits
  8. 31 Oct, 2022 3 commits
  9. 28 Oct, 2022 3 commits
  10. 27 Oct, 2022 5 commits
    • Add test for muxer watchdog timer · 2a809dce
      PiperOrigin-RevId: 484298261
      (cherry picked from commit 17303341)
      kimvde committed
    • Set BROWSER_SERVICE_EXTRAS_KEY_SEARCH_SUPPORTED automatically · dddb4841
      This root extra needs to be set by apps manually in media1 and we
      can do that automatically in Media3 based on the available session
      commands.
      
      #minor-release
      
      PiperOrigin-RevId: 484286833
      (cherry picked from commit 4c9ca8fa)
      bachinger committed
    • Use MediaBrowserCompat.rootHints as connections hints · 1c815873
      In Media3 there is the useful concept of connection hints that a
      client can set when building the session and that are sent to the
      service and passed to the `Callback.onConnect()` method when the
      browser connects.
      
      These connection hints are then included in the `ControllerInfo`
      object that later will be passed to every callback method and the
      implementor can then take decisions specific to these connection
      hints.
      
      These connection hints are not available in media1. However, when
      an app creates a `MediaBrowserCompat` object, the constructor takes
      a rootHint object that is sent to
      `MediaBrowserServiceCompat.onGetRoot()`.
      
      This change uses the browser rootHints as the connection hints when
      creating the `ControllerInfo` for legacy browsers and makes them
      available to the `MediaLibrarySession.Callback` domain methods in
      the same way as connection hints of a Media3 browser.
      
      PiperOrigin-RevId: 484220748
      (cherry picked from commit 21022c77)
      bachinger committed
    • Make adding ad live breaks more robust · 1607e3da
      This change makes adding ad events in live streams more robust by allowing ad
      groups to grow in number of ads if more ad events are received than initially
      announced by the SDK.
      
      With the IMA prefetch feature, an AdPod can grow in size in certain conditions
      like from initially 2 ads to 4 ads being part of the ad group. With this change,
      if an additional ad event arrives while the ad group is still being played,
      the ad group is expanded. If the event arrives late and the ad group is already
      completed, a new group is created for the remaining ads.
      
      This also covers the case where we join the live stream while an ad is being
      played and we missed at least one LOADED event from the SDK. Ads of the group
      before the first LOADED event are ignored in such a case.
      
      PiperOrigin-RevId: 484214760
      (cherry picked from commit 64e9e888)
      bachinger committed
    • Add muxer timer to detect when generating an output sample is too slow · 868375ea
      This allows to throw when the Transformer is stuck or is too slow.
      
      PiperOrigin-RevId: 484179037
      (cherry picked from commit 16cb5cbc)
      kimvde committed
  11. 26 Oct, 2022 2 commits