Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bound nextIndex on seek to be 0 <= nextIndex <= numSegments #5

Closed
ojw28 opened this issue Jul 1, 2014 · 0 comments
Closed

Bound nextIndex on seek to be 0 <= nextIndex <= numSegments #5

ojw28 opened this issue Jul 1, 2014 · 0 comments

Comments

@ojw28
Copy link
Contributor

ojw28 commented Jul 1, 2014

This helps avoid issues when seeking very close to the start and end of the track, in particular if the seek is to t=0 but the start time of the first segment is very slightly greater than 0.

If this makes sense, bounding should be applied in the following places:

https://github.com/google/ExoPlayer/blob/master/library/src/main/java/com/google/android/exoplayer/dash/DashMp4ChunkSource.java#L174

https://github.com/google/ExoPlayer/blob/master/library/src/main/java/com/google/android/exoplayer/dash/DashWebmChunkSource.java#L155

https://github.com/google/ExoPlayer/blob/master/library/src/main/java/com/google/android/exoplayer/smoothstreaming/SmoothStreamingManifest.java#L200

ojw28 added a commit that referenced this issue Jul 9, 2014
@ojw28 ojw28 closed this as completed Jul 9, 2014
ojw28 added a commit that referenced this issue Jun 15, 2016
Notes:

- The way this works is that every time the player needs to
  select some tracks it invokes the TrackSelector. When a
  track selection is actually activated (i.e. "hits the
  screen") it gets passed back to the TrackSelector, which
  allows it to expose the current tracks through an API that
  it may choose to define. Since playlist support doesn't exist
  yet, it's currently the case that the pass-back always occurs
  immediately.
- A TrackSelector can invalidate its previous selections if its
  selection criteria changes. This will force the player to invoke
  it again to make a new selection. If the new selection is the
  same as the previous one for a renderer then the player handles
  this efficiently (i.e. turns it into a no-op).
- DefaultTrackSelector supports disabling/enabling of renderers.
  Separately, it supports overrides to select specific formats.
  Since formats may change (playlists/periods), overrides are
  specific to not only the renderer but also the set of formats
  that are available to it. If the formats available to a renderer
  change then the override will no longer apply. If the same set
  of formats become available at some point later, it will apply
  once more. This will nicely handle cases like ad-insertion where
  the ads have different formats, but all segments of main content
  use the same set of formats.
- In general, in  multi-period or playlist cases, the preferred
  way of selecting formats will be via constraints (e.g. "don't play
  HD", "prefer higher quality audio") rather than explicit format
  selections. The ability to set various constraints on
  DefaultTrackSelector is future work.

Note about the demo app:

- I've removed the verbose log toggle. I doubt anyone has
  ever used it! I've also removed the background audio option.
  Without using a service it can't be considered a reference
  implementation, so it's probably best to leave developers to
  figure this one out. Finally, listening to AudioCapabilities
  has also gone. This will be replaced by having the player
  detect and handle the capabilities change internally in a
  future CL. This will work by allowing a renderer to invalidate
  the track selections when its capabilities change, much like
  how a selector is able to invalidate the track selections in
  this CL.
- It's now possible to enable ABR with an arbitrary subset of
  tracks.
- Unsupported tracks are shown grayed out in the UI. I'm not
  showing tracks that aren't associated to any renderer, but we
  could optionally add that later.
- Every time the tracks change, there's logcat output showing
  all of the tracks and which ones are enabled. Unassociated
  tracks are displayed in this output.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117122202
ojw28 pushed a commit that referenced this issue Jul 8, 2016
ExoPlayer.EventListener.onPositionDiscontinuity is notified during seeking and
transitioning from one source to the next.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=125578976
@google google locked and limited conversation to collaborators Jun 28, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant