1. 19 May, 2021 8 commits
    • Assign ERROR_CODE_BEHIND_LIVE_WINDOW to BehindLiveWindowExceptions · 66c1aede
      PiperOrigin-RevId: 374425179
      aquilescanta committed
    • Fix `core_settings.gradle` to not assume `exoplayerRoot` is absolute · 73f28d48
      Gradle warns against passing a relative path to `new File(String)`:
      https://docs.gradle.org/current/userguide/working_with_files.html#sec:single_file_paths
      
      This change fixes all usages of `exoplayerRoot` to pass it to Gradle's
      `Project.file()` first, which returns an absolute `File`.
      
      To reproduce the problem in Issue: #8927:
      1. Checkout ExoPlayer git project, to e.g. `~/ExoPlayer/exoplayer-git`
      2. Create a new Android Studio project in e.g. `~/AndroidStudioProjects/exoplayer-test`
      3. Edit the new project's `settings.gradle` file as described in
         https://github.com/google/ExoPlayer/blob/release-v2/README.md
         using a relative path for `exoplayerRoot`:
         ```
         gradle.ext.exoplayerRoot = '../../ExoPlayer/exoplayer-git'
         ```
      4. In a shell:
         ```bash
         $ cd ~/AndroidStudioProjects/exoplayer-test/app
         $ ../gradlew build
         ```
      
      (Step 4 is important, it seems running `./gradlew` from the project root
      doesn't trigger the relative path problem)
      
      This change fixes the problem, and also works with `exoplayerRoot` as a
      `File` or `Path` object. `String`, `File` and `Path` all work with relative or
      absolute paths:
      ```
      gradle.ext.exoplayerRoot = '/home/ibaker/ExoPlayer/exoplayer-git'
      gradle.ext.exoplayerRoot = '../../ExoPlayer/exoplayer-git'
      gradle.ext.exoplayerRoot = new File('/home/ibaker/ExoPlayer/exoplayer-git')
      gradle.ext.exoplayerRoot = new File('../../ExoPlayer/exoplayer-git')
      gradle.ext.exoplayerRoot = Paths.get('/home/ibaker/ExoPlayer/exoplayer-git')
      gradle.ext.exoplayerRoot = Paths.get('../../ExoPlayer/exoplayer-git')
      ```
      
      Note: The Path versions above require importing `java.nio.file.Paths`
      and changing the `apply from:` line in the project's settings.gradle
      file to something like:
      ```
      apply from: file(gradle.ext.exoplayerRoot.resolve('core_settings.gradle'))
      ```
      It's assumed that a project wanting to pass a `Path` will make these
      changes.
      
      Issue: #8927
      PiperOrigin-RevId: 374421627
      ibaker committed
    • Add an IntDef for DATA_TYPE_* constants · 22779596
      PiperOrigin-RevId: 374418502
      aquilescanta committed
    • Re-order error codes for symmetry · 6c06b4ef
      PiperOrigin-RevId: 374416794
      aquilescanta committed
    • Bubble up the errorCode argument in preparation for new factory methods · 61c92007
      Notes:
      - The only functional change is that createForRemote now assings ERROR_CODE_REMOTE_ERROR.
      - createForSource still uses ERROR_CODE_UNSPECIFIED, even though it expects an
        IOException. The reason for not using ERROR_CODE_IO_UNSPECIFIED is that the reason for
        the error might not be IO. For example, malformed media, or BehindLiveWindowException,
        which have non-IO error codes. So using UNSPECIFIED saves a later change in category.
      PiperOrigin-RevId: 374390407
      aquilescanta committed
    • Add Util class for server-side inserted ads. · 378b3f6e
      When working with SSAI ads, we need to easily convert positions between
      the underlying stream and the media model that exposes ad groups. To
      simplify this, we can add util methods (that are testable on their own).
      
      In addition, we need an easy way to build AdPlaybackStates for SSAI
      inserted ads. The metadata is obtained out-of-band and usually has the
      ad group start and end times in the underlying stream only. Hence, we
      also add a util method to add a new ad group based on this information.
      
      PiperOrigin-RevId: 374369360
      tonihei committed
    • Deduplicate calls to maybeNotifyPlaybackInfoChanged · c7db9fb3
      PiperOrigin-RevId: 374253036
      aquilescanta committed
    • Add track number & total to MediaMetadata · 25b453a5
      #minor-release
      
      PiperOrigin-RevId: 374235979
      samrobinson committed
  2. 17 May, 2021 9 commits
  3. 14 May, 2021 8 commits
  4. 13 May, 2021 12 commits
  5. 12 May, 2021 3 commits
    • Minor copy edits for RTSP docs · d38edcc9
      #minor-release
      
      PiperOrigin-RevId: 373402932
      olly committed
    • Minor copy edits for RTSP docs · cccb4006
      #minor-release
      
      PiperOrigin-RevId: 373402932
      olly committed
    • Allow ad groups to specify a resume offset. · ef5a0b6c
      Content after ad groups currently always resumes at the ad break position (unless
      overridden by a seek or similar).  In some cases, media inserting ads wants to
      specify an offset after the ad group at which playback should resume. A common
      example is a live stream that inserts an ad and then wants to continue streaming
      at the current live edge.
      
      Support this use case by allowing ad groups to specify a content resume offset
      and making sure that the content start position after the ad group uses this offset.
      
      PiperOrigin-RevId: 373393807
      tonihei committed