1. 24 Jan, 2020 4 commits
    • extensions/av1: use -O2 for release builds · d899e1fc
      + force arm (over thumb) mode for 32-bit builds
      
      -O2 improves performance ~30-40% over the default -Oz depending on the
      resolution; this is similar to what is done for vp9 which uses -O3.
      
      PiperOrigin-RevId: 290318121
      olly committed
    • Rollback of https://github.com/google/ExoPlayer/commit/ff89170b008b8b3438b7c002a156fbfb41c05174 · 72437e44
      *** Original commit ***
      
      Fix some logic in AnalyticsCollector.
      
      All events issued from ExoPlayerImpl (i.e. Player.EventListener events) currently
      try to use the media period data from the playing media period as set in the
      playback thread queue. This is only correct as long as there no pending masking
      operations in ExoPlayerImpl. That's why we currently disable this whenever the timeline
      is empty or a seek is pending. Since adding all the playlist API methods to the player,
      this is no longer the right choice. Moreover,...
      
      ***
      
      PiperOrigin-RevId: 290312118
      bachinger committed
    • Ensure tracks in PlaybackInfo are always in sync with position. · 4cf614c6
      Currently both are updated by separate setters. If an exception is thrown between
      the two setters, the state may not be consistent.
      
      Avoid this problem by always setting them together.
      
      PiperOrigin-RevId: 290293600
      tonihei committed
    • Fix some logic in AnalyticsCollector. · ff89170b
      All events issued from ExoPlayerImpl (i.e. Player.EventListener events) currently
      try to use the media period data from the playing media period as set in the
      playback thread queue. This is only correct as long as there no pending masking
      operations in ExoPlayerImpl. That's why we currently disable this whenever the timeline
      is empty or a seek is pending. Since adding all the playlist API methods to the player,
      this is no longer the right choice. Moreover, we don't have a definite API that tells
      AnalyticsCollector when a playlist API call has been handled (and we don't want to
      have one).
      
      We can fix this by always using the current Player position information as the source
      of truth (instead of the media period queue). This is definitely more correct and also
      works while a masking operation is pending. To fill in the additional information from
      the media period queue, we can look up a matching media period. This may not be the
      first one in the list if an operation is pending.
      
      The new methods are similar to the previous tryResolveWindowIndex method, but:
       1. They are always used (i.e. the current Player state is the main source of truth)
       2. They also check the correct ad playback state, that was just ignored previously.
      
      PiperOrigin-RevId: 290284916
      tonihei committed
  2. 17 Jan, 2020 7 commits
  3. 16 Jan, 2020 22 commits
  4. 13 Jan, 2020 7 commits
    • Simplify keeping track of current id in DefaultPlaybackSessionManager · c0ee312a
      We currently have a currentMediaPeriodId and an activeSessionId that are more
      or less tracking the same thing unless the current media period isn't "active" yet.
      
      Simplify this logic by using a single currentSessionId field and the respective
      isActive flag of this session. Also move all session creation and activation code in
      the same method to make it easier to reason about the code.
      
      This change also fixes a subtle bug where events after a seek to a new window
      are not ignored as they should.
      
      PiperOrigin-RevId: 289432181
      tonihei committed
    • DownloadService: No-op cleanup · ad7bcab4
      Issue: #6798
      PiperOrigin-RevId: 289424582
      olly committed
    • Add a clarifying comment to shouldContinueLoading handling. · 3c5c43c9
      PiperOrigin-RevId: 289424321
      tonihei committed
    • Deprecate DownloadService state change methods · d7643acd
      As discovered whilst investigating #6798, there are cases
      where these methods are not correctly. They were added as
      convenience methods that could be overridden by concrete
      DownloadService implementations, but since they don't work
      properly it's preferable to require application code to
      listen to their DownloadManager directly instead.
      
      Notes:
      
      - The original proposal to fix #6798 stored the state change
      events in memory until they could be delivered. This approach
      is not ideal because the events still end up being delivered
      later than they should be. We also want to fix the root cause
      in a different way that does not require doing this.
      - This change does not fix #6798. It's a preparatory step.
      
      Issue: #6798
      PiperOrigin-RevId: 289418555
      olly committed
    • PlayerTrackEmsgHandler: Release sample queue in release() · 15f974a2
      This change makes it clear the SampleQueue doesn't outlive
      the wrapping PlayerTrackEmsgHandler, and releases it from
      PlayerTrackEmsgHandler.release().
      
      This change is a no-op because calling release() is the
      same as reset() in this case (the behavior only differs if
      a non-dummy DrmSessionManager is being used).
      
      PiperOrigin-RevId: 289416622
      olly committed
    • Split HlsSampleStreamWrapper.init into two methods · 7f7632a3
      As a result, onMediaChunkLoadStarted gets invoked on the loading thread, and
      init on the playback thread, matching the thread access comments.
      
      Issue:#6321
      PiperOrigin-RevId: 289167981
      aquilescanta committed
    • Add NTP client to get time offset for live streams without UTCTiming. · 01e661f2
      Dash live streams require that the client has an accurate wall clock
      time and in absence of a UTCTiming element, this is assumed to be the
      NTP time.
      
      This change adds NTP time offset resolution for DASH live streams
      without such timing elements.
      
      PiperOrigin-RevId: 289098796
      tonihei committed