1. 01 Nov, 2021 13 commits
    • Fix rounding error in fMP4 presentation time calculation · c05a5a16
      The presentation time in fMP4 is calculated by adding and subtracting
      3 values. All 3 values are currently converted to microseconds first
      before the calculation, leading to rounding errors. The rounding errors
      can be avoided by doing the conversion to microseconds as the last step.
      
      For example:
      In timescale 96000:  8008+8008-16016 = 0
      Rounding to us first: 83416+83416-166833=-1
      
      #minor-release
      
      PiperOrigin-RevId: 406809844
      tonihei committed
    • Throw pending clipping errors created during period preparation. · 69d6f841
      Currently, clipping errors are never thrown if we already have a
      MediaPeriod. This may happen for example for ProgressiveMediaSource
      where we need to create a MediaPeriod before knowing whether clipping
      is supported. Playback will still fail, but with unrelated assertion
      errors that are hard to understand for users.
      
      Fix this by setting the pending error on the ClippingMediaPeriod.
      
      #minor-release
      
      Issue: Issue: google/ExoPlayer#9580
      PiperOrigin-RevId: 406809737
      tonihei committed
    • Re-position IntDefs in media3 stable API · 23de0be4
      These IntDefs are now annotated with TYPE_USE [1], so they can be moved
      to directly before the type (int).
      
      [1] Since <unknown commit>
      
      PiperOrigin-RevId: 406803555
      ibaker committed
    • Add TYPE_USE to IntDefs used in the media3 stable API · 8829c45d
      This allows the use of the intdef in parameterized types,
      e.g. List<@MyIntDef Integer>
      
      For IntDefs that are already released in ExoPlayer 2.15.1 we add
      TYPE_USE in addition to all other reasonable targets, to maintain
      backwards compatibility with Kotlin code (where an incorrectly
      positioned annotation is a compilation failure). 'reasonable targets'
      includes FIELD, METHOD, PARAMETER and LOCAL_VARIABLE but not TYPE,
      CONSTRUCTOR, ANNOTATION_TYPE, PACKAGE or MODULE. TYPE_PARAMETER is
      implied by TYPE_USE.
      
      For not-yet-released IntDefs we just add TYPE_USE.
      
      #minor-release
      
      PiperOrigin-RevId: 406793413
      ibaker committed
    • Upgrade gradle plugin version · e1494398
      PiperOrigin-RevId: 406789671
      olly committed
    • Add large renderer position offset. · 9f352434
      This helps to prevent issues where decoders can't handle negative
      timestamps. In particular it avoids issues when the media accidentally
      or intentionally starts with small negative timestamps. But it also
      helps to prevent other renderer resets at a later point, for example
      if a live stream with a large start offset is enqueued in the playlist.
      
      #minor-release
      
      PiperOrigin-RevId: 406786977
      tonihei committed
    • Remove unecessary warning suppression in PlaybackException · 42f9ddb5
      PiperOrigin-RevId: 406783965
      ibaker committed
    • GL: Make ProjectionRenderer's GL Program @MonotonicNonNull. · c5392432
      PiperOrigin-RevId: 406385758
      huangdarwin committed
    • WavExtractor: split read stages into states · fa98935c
      This refactoring is the basis to support RF64 (see
      Issue: google/ExoPlayer#9543).
      
      #minor-release
      
      PiperOrigin-RevId: 406377924
      kimvde committed
    • Change Transformer to use Player.Listener. · 288899ee
      AnalyticsListener should not be used for non-analytical actions.
      
      PiperOrigin-RevId: 406355758
      samrobinson committed
    • Remove dependency from common tests to exoplayer · 8e2083a2
      PiperOrigin-RevId: 406354526
      olly committed
    • Update developer guide to use non-deprecated symbols · 405b8114
      #minor-release
      
      PiperOrigin-RevId: 406347412
      ibaker committed
    • ExoPlayer.Builder: lazily initialize default components · a0f8ac75
      Initialize default components lazily in ExoPlayer.Builder to avoid
      redundant component instantiations, useful in cases where apps
      overwrite default components with ExoPlayer.Builder setters.
      
      The fields in ExoPlayer.Builder are wrapped in a Supplier (rather than
      just making then nullable and initializing them in
      ExoPlayer.Builder.build()) so that we maintain the proguarding
      properties of this class. The exception is
      ExoPlayer.Builder.AnalyticsCollector which became nullable and is
      initialized in ExoPlayer.Builder.build() in order to use any Clock
      that has been set separately with ExoPlayer.Builder.setClock().
      
      #minor-release
      
      PiperOrigin-RevId: 406345976
      christosts committed
  2. 29 Oct, 2021 12 commits
  3. 27 Oct, 2021 7 commits
    • Allow missing full_range_flag in colr box with type=nclx · 39639f8d
      Test file produced with:
      $ MP4Box -add "sample.mp4#video:colr=nclc,1,1,1" -new sample_18byte_nclx_colr.mp4
      
      And then manually changing the `nclc` bytes to `nclx`.
      
      This produces an 18-byte `colr` box with type `nclx`. The bitstream of
      this file does not contain HDR content, so the file itself is invalid
      for playback with a real decoder, but adding the box is enough to test
      the extractor change in this commit.
      
      (aside: MP4Box will let you pass `nclx`, but it requires 4 parameters, i.e. it
      requires the full_range_flag to be set, resulting in a valid 19-byte colr box)
      
      #minor-release
      Issue: #9332
      PiperOrigin-RevId: 405842520
      ibaker committed
    • Migrate SegmentSpeedProviderTest off deprecated method. · 3bc0fae7
      PiperOrigin-RevId: 405841397
      samrobinson committed
    • Set assumedVideoMinimumCodecOperatingRate for all playbacks · 310f268a
      PiperOrigin-RevId: 405736227
      olly committed
    • Generalize findEsdsPosition to support other types · 383bad80
      - This CL does not introduce functional changes.
      - This change will allow searching for the clli box while
        parsing the mdcv box in order to construct the HDR
        static info contained in ColorInfo.
      
      #minor-release
      
      PiperOrigin-RevId: 405656499
      aquilescanta committed
    • Allow video MIME type to be set in TranscodingTransformer. · 8545a8b3
      Also check that the output video MIME type is supported with the given container MIME type in `TranscodingTransformer` and `TransformerBaseRenderer`.
      
      PiperOrigin-RevId: 405645362
      hschlueter committed
    • Replace ExtractorsFactory with MediaSourceFactory in ExoPlayer.Builder · 98200c26
      This has a few benefits:
        * Aligns the Builder constructors with the setters
          (setRenderersFactory is missing, but can be easily added in a
          follow-up change).
        * Allows DefaultMediaSourceFactory to be stripped by R8 and
          makes the shrinking dev guide for the cases of providing a custom
          MediaSourceFactory or directly instantiating MediaSource instances
          less weird too.
      
      #minor-release
      
      PiperOrigin-RevId: 405632981
      ibaker committed
    • Deduce encoder video format from decoder format. · 649fe702
      When no encoder video MIME type is specified, the `TransformerTranscodingVideoRenderer` now uses the video MIME type of the input for the encoder format.
      The input format is now read in a new method `ensureInputFormatRead` which is called before the other configuration methods. This removes the logic for reading the input format from `ensureDecoderConfigured`, because it is now needed for both encoder and decoder configuration but the encoder needs to be configured before GL and GL needs to be configured before the decoder, so the decoder can't read the format.
      The width and height are now inferred from the input and the frame rate and bit rate are still hard-coded but set by the `MediaCodecAdapterWrapper` instead of `TranscodingTransformer`.
      
      PiperOrigin-RevId: 405631263
      hschlueter committed
  4. 26 Oct, 2021 7 commits
  5. 25 Oct, 2021 1 commit