1. 01 Oct, 2018 6 commits
    • Fix prepare position of DeferredMediaPeriods for windows with non-zero offset. · 46731cdd
      If we prepare a deferred media period before the actual timeline is available,
      we either prepare with position zero (= the default) or with a non-zero
      initial seek position.
      
      So far, the zero (default) position got replaced by the actual default position
      (including any potential non-zero window offset) when the timeline became known.
      
      However, a non-zero initial seek position was not corrected by the non-zero
      window offset. This is fixed by this change.
      
      Related to that, we always assumed that the deferred media period will the
      first period in the actual timeline. This is not true if we prepare with an
      offset (either because of an initial seek position or because of a default
      window position). So, we also determine the actual first period when the
      timeline becomes known.
      
      Issue:#4873
      
      -------------
      Created by MOE: https://github.com/google/moe
      MOE_MIGRATED_REVID=215213030
      tonihei committed
    • Improve MediaPeriodHolder documentation and member access. · 90ca3716
      -------------
      Created by MOE: https://github.com/google/moe
      MOE_MIGRATED_REVID=215205796
      tonihei committed
    • Clarify and improve TrackSelection .enable() and .disable() calls. · d97d289b
      These two methods are meant to indicate to the track selection that it's
      started or stopped being used. This is helpful to schedule background tasks
      related to track selection (e.g. register network change listeners etc.).
      This intention is not clearly stated in the method docs.
      
      Also, all track selections of all prebuffered periods stay enabled in
      parallel at the moment. As the whole purpose of these methods is to know
      whether dynamic updates via updateSelectedTrack may happen, it's better to
      only enable track selections of the current loading media period. That's
      similar to how we always forward the loading track selections to the
      LoadControl.
      
      This change:
       1. Improves the JavaDoc of TrackSelection.
       2. Disables track selections if loading moves to another period.
       3. Reenables track selection if loading moves back to a previous period.
      
      -------------
      Created by MOE: https://github.com/google/moe
      MOE_MIGRATED_REVID=215199987
      tonihei committed
    • Use recommended way of checking for TV · f59f5577
      Switch to the recommended way of checking whether the app is running on a TV
      device.
      
      -------------
      Created by MOE: https://github.com/google/moe
      MOE_MIGRATED_REVID=215177587
      andrewlewis committed
    • Extend physical display size workaround for ATVs · 5d5b641c
      Extend Sony workaround up to and including Oreo.
      
      Due to a platform issue the Display API couldn't report 1080p UI
      and 4k SurfaceView support until Oreo. Since Oreo it is still
      common for devices to misreport their display sizes via Display,
      so this change switches to using system properties up to and
      including Pie.
      
      On Pie treble may prevent writing sys.display-size so check for
      vendor.display-size instead.
      
      -------------
      Created by MOE: https://github.com/google/moe
      MOE_MIGRATED_REVID=214987203
      andrewlewis committed
    • Add @Documented to @IntDef and @StringDef annotations. · 5c8dabad
      This makes the annotations appear in the generated JavaDoc.
      
      -------------
      Created by MOE: https://github.com/google/moe
      MOE_MIGRATED_REVID=214952419
      tonihei committed
  2. 27 Sep, 2018 13 commits
  3. 26 Sep, 2018 5 commits
  4. 24 Sep, 2018 9 commits
  5. 21 Sep, 2018 7 commits
    • Add missing calls to LoadControl.onTracksSelected. · 108a7099
      This method needs to be called whenever the track selection of the current
      loading period changes, but also when the loading period itself (and thus
      the "loading track selection") changes. These are the same situations in which
      we update the loading media period id and thus we can move both updates in
      a common helper method.
      
      -------------
      Created by MOE: https://github.com/google/moe
      MOE_MIGRATED_REVID=213959982
      tonihei committed
    • Fix broken Javadoc · edf7561b
      -------------
      Created by MOE: https://github.com/google/moe
      MOE_MIGRATED_REVID=213951977
      olly committed
    • Propagate output format in tunneling mode · b79156c3
      From API 23 this uses the timed format queue. Before API 23 the
      format is notified as soon as the buffer is queued.
      
      -------------
      Created by MOE: https://github.com/google/moe
      MOE_MIGRATED_REVID=213830729
      andrewlewis committed
    • Reset start trim only if input was queued · b58daf8d
      Before this change we would reset the start trim to zero after initial
      configuration (at the start of playback) and after seeking to any position. The
      fact that no trimming was applied at the start of playback meant that after the
      first period transition we'd see a mismatch between the next buffer timestamp
      (equal to the duration of the period taking into account edits) and the duration
      of audio submitted to the sink.
      
      This change modifies the behavior so that we reset the start trim to zero only
      if some audio was queued since configuration. This is incorrect in the case of
      starting playback at a non-zero position, but fixes the common case of starting
      at zero. As before, a later seek to any position is handled via a flush and
      resets the trim as required.
      
      Transitions from one period to the next are unaffected by this change.
      
      One way to implement start trimming correctly would be to provide the input
      buffer timestamp to the audio processors and only trim when handling audio from
      the start of the stream, but that is a larger change so left for later.
      
      -------------
      Created by MOE: https://github.com/google/moe
      MOE_MIGRATED_REVID=213828511
      andrewlewis committed
    • Add IMA tests to presubmit · a5fc7883
      Also fix internal build by adding some methods.
      
      -------------
      Created by MOE: https://github.com/google/moe
      MOE_MIGRATED_REVID=213828434
      andrewlewis committed
    • Fix ImaAdsLoaderTest · 7e55a631
      -------------
      Created by MOE: https://github.com/google/moe
      MOE_MIGRATED_REVID=213824217
      andrewlewis committed
    • Compensate for trimmed audio in buffer time check · 1c07b95f
      After a period transition the first buffer queued has the sum of previous period
      durations added to its source presentation timestamp. These durations take into
      account gapless edits, but the check on the timestamp was based on the submitted
      frame count, not the frame count after trimming.
      
      This change fixes an issue where audio/video would gradually drift apart due to
      accumulated error in the audio track position, which could lead to freezing due
      to the audio renderer stopping being ready and switching to the standalone media
      clock.
      
      Issue: #4559
      
      -------------
      Created by MOE: https://github.com/google/moe
      MOE_MIGRATED_REVID=213819908
      andrewlewis committed