1699 Commits

Author SHA1 Message Date
olly
d3cd0c2ee4 Fix another broken link (by removal).
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=126789395
2016-07-07 20:47:03 +01:00
aquilescanta
b523ff8d81 Added javadoc to DefaultTrackSelectionPolicy methods
Also fixed language comparison using Locale's.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=126703125
2016-07-07 20:46:26 +01:00
olly
19d65a7a9d Report loading on/off changes via ExoPlayer.
Also attempt to clear up naming a little, using "buffering" to
mean the user visible buffering state, and "loading" to mean a
source being loaded.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=126693592
2016-07-07 20:45:53 +01:00
andrewlewis
f4239eb571 Release Extractors when ExtractorSampleSource is released.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=126691912
2016-07-07 20:45:20 +01:00
olly
660b26e3ad Make NetworkLock non-static and less specific.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=126682871
2016-07-07 20:44:46 +01:00
andrewlewis
dd031691b0 Pass an ExtractorsFactory to ExtractorSampleSource.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=126672854
2016-07-07 20:44:12 +01:00
olly
06fd826a5c Restore injection of non-default retry count.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=126646585
2016-07-07 20:43:38 +01:00
olly
49a93daf9e Restore HLS playback tests.
This fixes HlsChunkSource to allow selection of variants
other than the first one (as originally ordered in the
master playlist) in the case that the first one is
blacklisted. Having done this, the two disabled tests can
be restored.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=126646547
2016-07-07 20:43:03 +01:00
olly
8db06a332f Fix HlsTrackStreamWrapper chunk queue updating
Also fix possible repeat-preparation for HlsTrackStreamWrapper
and ExtractorSampleSource.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=126640380
2016-07-07 20:42:27 +01:00
olly
7b9e47ec6b Event based buffering.
At a high level, everything that we need to load in sync
with anything else now implements a new SequenceableLoader
class. This includes ChunkTrackStream, since multiple
demuxed tracks in DASH/SS need to be loaded in sync with
one another. At a higher level, SampleSources are also
SequenceableLoaders, which allows them to be kept in sync
by MultiSampleSource.

CompositeSequenceableLoader is able to load multiple
instances SequenceableLoaders in sync with one another,
and is used in various places where this is required.

This change also removes LoadControl registration, which
was complicated and error prone.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=126632861
2016-07-07 20:41:52 +01:00
andrewlewis
7b673fe432 Fix miscellaneous consistency/formatting things.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=126631393
2016-07-07 20:41:18 +01:00
olly
f0f25aef83 Support playlists in exolist.json.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=126622342
2016-07-07 20:40:44 +01:00
aquilescanta
9f017d71ef Add HD content filtering to DefaultTrackSelectionPolicy
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=126324788
2016-07-07 20:40:00 +01:00
andrewlewis
a476e090bc Use getConstructor().newInstance() in ExtractorSampleSource.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=126306436
2016-07-07 20:39:22 +01:00
andrewlewis
2e77f02e7e Remove non-standard color constant.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=126286809
2016-07-07 20:38:49 +01:00
andrewlewis
33fc6126a7 Improve track selection with renderers reading ahead (playlists #6)
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=126202210
2016-07-07 20:38:13 +01:00
olly
bd3574dfba Allow SampleSourceProvider concatenation, simplify demo.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=126196431
2016-07-07 20:37:35 +01:00
olly
5c2bb2a852 Use the correct format for init segments loads.
This is causing getTrackIndex to fail for live playbacks.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=126189387
2016-07-07 20:36:59 +01:00
olly
e33278436f Misc bugfixes.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=126175948
2016-07-07 20:36:25 +01:00
olly
ca81444f95 Event based preparation.
- Removes the load delay that was previously present after
  source preparation.
- Prevents premature failure in the case that the buffering
  source fails to prepare.
- SampleSource.Callback will get a second method in a
  subsequent CL, approximately meaning "tell me if I can load
  more stuff". This will remove the need for LoadControl and
  the complexity that comes with it.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=126172573
2016-07-07 20:35:41 +01:00
olly
76f426e944 Introduce a global buffering policy.
This is required for buffering to work properly across
playlist transitions. It's also much simpler, since
specifying the buffering policy becomes independent of
the type of media being played (i.e. the source).
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=126051755
2016-07-07 20:34:57 +01:00
andrewlewis
fdd90256f4 Allow renderers to read ahead further than the next source.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=125951381
2016-07-07 20:34:04 +01:00
andrewlewis
6031f89fe9 Limit the maximum number of sources to buffer.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=125698923
2016-07-07 20:32:47 +01:00
andrewlewis
aa313f234d Set TrackStreams to be final on renderers that will be disabled.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=125691172
2016-07-07 20:32:11 +01:00
olly
494510d6ad Fix ready and ended conditions.
1. The readiness of the timeline is only relevant if there
   aren't any enabled renderers. It's also only ready if
   the source after the playing source is actually prepared
   (if not, we're waiting for preparation).
2. Prevent early transition to the ENDED state when the
   playback position hits the duration, but we're not at the
   final entry in the playlist.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=125685193
2016-07-07 20:31:38 +01:00
olly
a8883baa69 Start cleaning up buffering.
- Always continue loading if we've got less than the minimum
  amount of media in the buffer.
- Use LoadControl in ExtractorSampleSource.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=125679669
2016-07-07 20:31:04 +01:00
olly
5055a4aa91 Some restructing to make ExoPlayerImplInternal clearer.
- Update playbackInfo duration/position/bufferedPosition in a
  single place.
- Remove sampleSource variable, and remove side effects from
  getSampleSource. There was actually a subtle bug where
  getSampleSource wasn't called by anything where no renderers
  where enabled (meaning the source never transitioned).
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=125676540
2016-07-07 20:30:22 +01:00
olly
8eb1f3f57c Remove resumeInternal from ExoPlayerImplInternal.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=125670965
2016-07-07 20:29:45 +01:00
olly
291b210be3 A source is fully buffered if it has no enabled tracks.
Also, getBufferedPosition shouldn't be called if no tracks
are selected.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=125670213
2016-07-07 20:29:11 +01:00
olly
2746d59ea8 Handle TrackStream transitions in isSourceReady.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=125669080
2016-07-07 20:28:27 +01:00
olly
79cbd390ab bufferedPositionUs cannot be UNSET.
Also do some naming cleanup + do ms->us seek conversion
in ExoPlayerImpl, since that's where we now do all the
conversions coming out of the player.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=125662973
2016-07-07 20:27:53 +01:00
andrewlewis
e1d3c932fa Only update track streams in updateTrackStreams.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=125661172
2016-07-07 20:27:14 +01:00
andrewlewis
fc2cdef208 Don't return a TrackStream from TrackRenderer.disable.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=125659817
2016-07-07 20:26:37 +01:00
eguven
adc7ecec09 Support MPEG-TS streams that start/end with an incomplete TS packet or lost sync.
Issue: #1332
Issue: #1101
Issue: #1083
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=125659191
2016-07-07 20:25:59 +01:00
aquilescanta
762ec41f95 Add support for HLS track selection flags
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=125658752
2016-07-07 20:25:22 +01:00
olly
3e6c0ced82 A mini bit of Timeline simplification.
Pretty sure this does the same thing.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=125581858
2016-07-07 20:24:45 +01:00
olly
5eca669474 Move renderers into Timeline.
The outer class should only deal with the enabled renderers.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=125579652
2016-07-07 20:24:01 +01:00
andrewlewis
2073f3fce3 Expose source indices via ExoPlayer (playlists #5).
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
2016-07-07 20:23:21 +01:00
olly
f9fa54cd5d Have seekTo return new position directly.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=125476407
2016-07-07 20:22:38 +01:00
aquilescanta
e71cdb1bad Filter track support by profile and level
This CL only provides checks for HEVC codecs and adds codec information to Format
instances in DASH. Right now, we check that the supported profiles are advertised
individually and that the supported level is equal or higher than the requested codec
level.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=125470489
2016-07-07 20:22:02 +01:00
eguven
0139f3f276 Remove unnecessary cloning.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=125454697
2016-07-07 20:21:26 +01:00
eguven
6376f3a898 Upgrade gradle to benefit from instant run 'again'.
Now it needs to be 2.1.2 to support instant run.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=125445366
2016-07-07 20:17:07 +01:00
Oliver Woodman
52c5342158 getBufferedPosition can't return unknown anymore 2016-07-07 20:15:27 +01:00
olly
4c434005d4 Remove/simplify some extractor tests.
We have our snazzy new file-based extractor tests now,
and the other ones have historically proven way more
hassle than they're worth (e.g. I spent a good few hours
once just trying to work out how to fix the Mp4 extractor
test, having established it was the test and not the
code that was broken!).

I think some more can go from the ogg package, but leaving
in place for now because it's a bit less clear what to
get rid of.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=125330072
2016-07-07 20:11:18 +01:00
eguven
53cc88e2dc DefaultOggSeeker small optimization.
skipToNextPage() isn't necessary anymore.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=125147444
2016-07-07 20:09:28 +01:00
olly
4fe6e5d755 Misc fixes for playback tests.
- AllowedVideoJoiningTimeMs must be set to 0 for tests so
  that tests which disable/enable video renderers don't
  register a large number of dropped frames.
- Fixed a threading issue that could cause occassional test
  failure.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=124978843
2016-06-15 20:28:17 +01:00
olly
aab551e907 Add HlsTest to V2.
The ones that are commented out are legitimately broken
and will need a library fix.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=124978438
2016-06-15 20:27:48 +01:00
olly
e9f9df8faa Track selection UI needs to scroll.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=124976833
2016-06-15 20:27:14 +01:00
olly
ec4c7d3acf Remove Eclipse support. Simplify manifests.
It looks like the manifests are essentially pointless,
but various tools are unhappy if I delete them.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=124976509
2016-06-15 20:26:37 +01:00
andrewlewis
66a5c96c5a Calculate ExtractorSampleSource duration if unknown (playlists #4).
When buffering playlist items after the currently-playing one,
continueBuffering should take a position that is negative because the playback
position is before the start of the source being buffered. This change makes
sure that ExtractorSampleSources always have a known duration when they are
fully buffered, which means that the correct (negative) source-relative
position can be calculated.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=124949409
2016-06-15 20:25:26 +01:00