1. 10 Nov, 2022 4 commits
    • Fix Dackka/Metalava errors in test_utils module · 7f706c8a
      This involves reducing the visibility of methods/constructors that
      are already unusable outside the `androidx.media3.test.utils` package.
      
      #minor-release
      
      PiperOrigin-RevId: 487473005
      (cherry picked from commit ca8de0e4)
      ibaker committed
    • Fix Dackka/Metalava errors in av1, flac, ffmpeg, midi, and opus modules · 925e7330
      This uses `@hide` on `protected final` methods to hide them from Dackka
      javadoc generation, since these methods are inaccessible to developers
      anyway. These symbols will still (currently) be included in artefacts
      distributed on Maven (because we don't run Metalava as part of
      generating these artefacts).
      
      In some cases I had to change the visibility/finality of methods to make
      them `protected final` before adding the `@hide` annotation (but
      the impact should be very low, since most of these methods were either
      already unusable by app developers, or they shouldn't have been used).
      
      #minor-release
      
      PiperOrigin-RevId: 487472907
      (cherry picked from commit 1cd488ac)
      ibaker committed
    • Fix Dackka/Metalava errors in the HLS and RTSP modules · 2540dee1
      This makes two fixes:
      1. Remove `HlsSampleStreamWrapper.Callback` (package-private) from the
         list of interfaces implemented by `HlsMediaPeriod` (`public`) and
         move the implementation to a private inner class instead. This avoids
         Metalava complaining about a public class that inherits from a
         package-private type.
      2. Reduce the visibility of
         `RtpPayloadFormat.isFormatSupported(MediaDescription)` from `public`
         to package-private. The `MediaDescription` type is already
         package-private, so this method was already unusable outside the
         package.
      
      #minor-release
      
      PiperOrigin-RevId: 487472781
      (cherry picked from commit 9041d7b9)
      ibaker committed
    • Fix Dackka/Metalava errors in the ExoPlayer module · 01f30f0b
      This makes two types of fix:
      1. Align parameter names on overridden methods where the superclass
         has `@param` javadoc.
      2. Use `@hide` on `protected final` methods that refer to package-private
         types. This will hide these symbols from Dackka javadoc generation
         but not (currently) from the artefacts distributed on Maven. These
         methods are currently unusable outside their package anyway (e.g. by
         external developers) because of the dependency on a package-private
         type.
      
      This also changes some HLS, SmoothStreaming, and IMA code where I've renamed
      parameters of overridden methods to be consistent across the type
      hierarchy.
      
      #minor-release
      
      PiperOrigin-RevId: 487472665
      (cherry picked from commit 10c4a4df)
      ibaker committed
  2. 09 Nov, 2022 6 commits
    • HDR: Implement ForceInterpretHdrVideoAsSdr · 39d9aef0
      Also, document that we tone map when no HDR features are explicitly set
      
      PiperOrigin-RevId: 487310971
      (cherry picked from commit 8bdd2784)
      huangdarwin committed
    • Set HDR color info on FrameworkMuxer · 98c981f6
      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 d6c8e3a8)
      claincly committed
    • Change UnsupportedEncodingException to IllegalArgumentException · 70f74fde
      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 4598cc92)
      sheenachhabra committed
    • Add ExoPlayerAssetLoader · 1ffe6a73
      Just move some code around for now, to start setting up the overall
      structure.
      
      PiperOrigin-RevId: 487229329
      (cherry picked from commit 5d1cab0c)
      kimvde committed
    • Merge Issue: google/ExoPlayer#10762: Fix ffmpeg jni wrapper returning invalid result codes · 95d9e492
      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 6d2e7a1b)
      Tolriq committed
    • Move slow mo logic to sample pipelines · 881838ba
      This is to avoid having this logic in TransformerInternal once it is
      added.
      
      PiperOrigin-RevId: 487159941
      (cherry picked from commit b59fdf5e)
      kimvde committed
  3. 08 Nov, 2022 2 commits
  4. 07 Nov, 2022 3 commits
    • Move muxer initialization off application thread · 194a32c0
      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 b10b4e6d)
      sheenachhabra committed
    • HDR: Set decoder codec profile and level if available. · 09698192
      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 0b7e5bba)
      huangdarwin committed
    • HDR: Update test FileUtil to handle null ColorInfo. · 9ad56508
      PiperOrigin-RevId: 486706595
      (cherry picked from commit 0b53c934)
      huangdarwin committed
  5. 04 Nov, 2022 1 commit
  6. 03 Nov, 2022 4 commits
  7. 02 Nov, 2022 1 commit
  8. 01 Nov, 2022 4 commits
  9. 31 Oct, 2022 3 commits
  10. 28 Oct, 2022 3 commits
  11. 27 Oct, 2022 3 commits
    • Add test for muxer watchdog timer · d6520202
      PiperOrigin-RevId: 484298261
      (cherry picked from commit 42057cc9)
      kimvde committed
    • Make adding ad live breaks more robust · f06e8ee7
      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 136addf6)
      bachinger committed
    • Add muxer timer to detect when generating an output sample is too slow · 94f3b1bf
      This allows to throw when the Transformer is stuck or is too slow.
      
      PiperOrigin-RevId: 484179037
      (cherry picked from commit 376ee77f)
      kimvde committed
  12. 26 Oct, 2022 3 commits
    • Add AudioProcessor.AudioFormat equals method. · 861cd9a0
      PiperOrigin-RevId: 483983486
      (cherry picked from commit c9585d01)
      samrobinson committed
    • Mute input video player in transformer demo · 81b3e404
      PiperOrigin-RevId: 483969411
      (cherry picked from commit 8181b3c6)
      Googler committed
    • Fix `Cea608Decoder` handling of service switch commands in field 2 · 6b3bec86
      From ANSI-CTA-608-E R-2014 section 8.4:
      > When closed captioning is used on line 21, field 2, it shall conform
      > to all of the applicable specifications and recommended practices as
      > defined for field 1 services with the following differences:
      > 1. The non-printing character of the miscellaneous control-character
      >    pairs that fall in the range of 0x14, 0x20 to 0x14, 0x2F in field 1,
      >    shall be replaced with 0x15, 0x20 to 0x15, 0x2F when used in field
      >    2.
      > 2. The non-printing character of the miscellaneous control-character
      >    pairs that fall in the range of 0x1C, 0x20 to 0x1C, 0x2F in field
      >    1, shall be replaced with 0x1D, 0x20 to 0x1D, 0x2F when used in
      >    field 2.
      
      This basically means that `cc1=0x15` in field 2 should be interpreted as
      `cc1=0x14` in field 1, and same for `0x1D -> 0x1C`.
      
      The `isMiscCode`  method above already handles this by ignoring the LSB
      (the only difference between `0x14` and `0x15`, and `0x1C` and `0x1D`)
      by AND-ing with `0xF6` instead of `0xF7`. This change uses the same
      trick in `isServiceSwitchCommand`.
      
      Issue: google/ExoPlayer#10666
      #minor-release
      PiperOrigin-RevId: 483927506
      (cherry picked from commit 7c6d492f)
      ibaker committed
  13. 25 Oct, 2022 3 commits