Commit graph

1405 commits

Author SHA1 Message Date
olly
67be677ddf Move more classes under source package
- Chunk package is only useful to source packages.
- BehindLiveWindowException is a source exception.
- SequenceableLoader is related to sources.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=127195307
2016-07-15 18:08:00 +01:00
andrewlewis
e4b08117fc Use adaptation workaround on N7v1.
Also, only enable the workaround when the resolution isn't changing but the
format is changing.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=127192637
2016-07-15 18:07:24 +01:00
olly
de27b2e043 TrackStream -> source.SampleStream
Also addded result constants to C to remove the dependency
on TrackStream from extractor.DefaultTrackOutput.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=127192488
2016-07-15 18:06:48 +01:00
olly
be9d77c59c Add new UI package.
There aren't really enough classes to justify it right
now, but if we're going to do a VideoView equivalent and
sensible player controls at some point, it's worth making
now to get classes into the correct place.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=127184374
2016-07-15 18:06:12 +01:00
andrewlewis
c936aee412 Fix condition for working around broken decoders.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=127102633
2016-07-15 18:05:02 +01:00
olly
bcca373f5b Rename DecoderInfo -> MediaCodecDecoderInfo
All other MediaCodec specific classes are prefixed MediaCodec,
and we now have other decoders that aren't not related to
MediaCodec.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=127093330
2016-07-15 18:04:19 +01:00
andrewlewis
fdf26d6a1f Work around volantis adaptation issue.
The volantis H.264/AVC decoder could get stuck when adapting between certain
stream formats where there was no change in resolution.

Queue a small Baseline profile SPS, PPS and IDR slice during adaptation on this
device, to force reallocation of reference frames.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=127091330
2016-07-15 18:03:45 +01:00
eguven
464869cf57 Fix DASH duration.
As multi period DASH isn't supported yet use the duration of the first period only.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=127086808
2016-07-15 18:03:09 +01:00
olly
4e86c55361 Introduce source package for sources
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=127073630
2016-07-15 18:02:31 +01:00
olly
a89bf3a477 Allow merging of both periods and sources.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=127073129
2016-07-15 18:01:15 +01:00
olly
9558a4cb99 Rename TrackRenderer -> Renderer
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=127065122
2016-07-15 18:00:32 +01:00
olly
8e0354c0a6 Finalize class naming
SampleSourceProvider -> MediaSource
SampleSource -> MediaPeriod
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=126914964
2016-07-15 17:59:52 +01:00
olly
c9ec7beb92 Add streamType/capabilities for extension audio renderers
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=126913487
2016-07-15 17:59:12 +01:00
aquilescanta
a845f1c4cc Add soft video constrains to DefaultTrackSelectionPolicy
Also make filterHdVideoTracks override setMaxVideoSize.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=126904080
2016-07-15 17:58:36 +01:00
olly
08bd4546ca Blacklist mp3 decoder on HTC One S
Issue: #377
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=126901901
2016-07-15 17:57:46 +01:00
olly
dbb43567a3 Finalize v2 directory + package name
- The package is renamed to avoid conflicts with v1, should any
app wish to include both v1 and v2 for a period of time. This is
similar to the approach used by some other open source projects
(e.g. okhttp).
- Copyright year is updated everywhere for completeness.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=126895326
2016-07-08 12:12:09 +01:00
andrewlewis
af3452d231 Make SampleSources reusable and implement SampleSourceProvider.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=126888556
2016-07-08 10:15:14 +01:00
andrewlewis
42d78b3559 Fix seeking before a source is set.
Before this change, calling seekTo then setPlayWhenReady would cause the player
throw an error, due to using the sample source provider before it's set.

Transition to the buffering state in seekToInternal only if we have a sample
source provider.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=126804528
2016-07-07 20:50:35 +01:00
olly
e02ca775f3 Optimize release of multiple allocations.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=126799524
2016-07-07 20:50:05 +01:00
olly
1a3de408ac A few bug fixes.
1. Suppress onContinueLoadingRequested until a source is
   prepared (since such calls are not supposed to be made
   until after preparation has completed).
2. Don't use the format evaluator in HlsChunkSource prior
   to prepration completing.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=126794616
2016-07-07 20:49:31 +01:00
olly
8c0e0b690e Don't abbreviate String as Str
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=126792706
2016-07-07 20:48:53 +01:00
olly
85741ff2d3 TTML: Parse and use frameRate/Multiplier + tickRate
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=126792535
2016-07-07 20:48:17 +01:00
olly
2426907f34 Fix positioning issues with ttml regions.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=126790829
2016-07-07 20:47:41 +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
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
Oliver Woodman
52c5342158 getBufferedPosition can't return unknown anymore 2016-07-07 20:15:27 +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
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
eguven
e6267cd253 DefaultOggSeeker: use skipFully() instead skip().
skip() may skip less than what we want here.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=124930478
2016-06-15 19:43:17 +01:00
andrewlewis
365812e820 Remove FrameworkSampleSource.
ExtractorSampleSource covers almost all use cases (except for AMR, AVI and
legacy Widevine). The FLAC extension must be compiled for support for FLAC
extraction.

FrameworkSampleSource has device-specific issues, makes blocking calls to the
underlying MediaExtractor, and does not provide much control over buffering.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=124850102
2016-06-15 19:43:17 +01:00
andrewlewis
a6b7cfb5e4 Close ParsingLoadable input streams that fail to open.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=124836804
2016-06-15 19:43:17 +01:00
olly
bd248ffee5 Ahem (fix bad constant value).
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=124836700
2016-06-15 19:43:17 +01:00
eguven
61df9aeb26 DashChunkSource: Workaround for missing segment at the end of the period.
Issue: #836
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=124832221
2016-06-15 19:43:17 +01:00
olly
266c0dce40 Add DashTest to V2
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=124831095
2016-06-15 19:43:17 +01:00
olly
f4e4fd51c6 Clean up chunked media source event listeners.
- Event listener is now at the SampleSource level, since the
  individual ChunkTrackStream instances are created internally.
- Event listener receives events corresponding to loads made
  at the SampleSource level (e.g. manifest fetches) in addition
  to those made by the ChunkTrackStream instances.
- Added ability for FormatEvaluators to propagate arbitrary
  information (as an Object) through to the listeners. This was
  a request from YouTube.
- Added significantly more information to each event, for example
  the DataSpec that defines the load being made is now passed, as
  is timing information.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=124732984
2016-06-15 19:43:17 +01:00
olly
5cd7deffe7 Add playback tests to V2.
DashTest will be migrated separately, since it's a little
more work.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=124722462
2016-06-15 19:43:17 +01:00
olly
0978227a84 Create a new CodecCounters on enable
If the same instance is reset then rapidly re-enabling the
renderer after disabling it can prevent an application from
reading the final values at the time when the renderer was
disabled. Hence we now instantiate a new CodecCounters each
time. This is needed to migrate DashTest to V2.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=124721106
2016-06-15 19:42:58 +01:00
andrewlewis
7ae9bf409b Play a sequence of sources (playlists #3).
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=124713796
2016-06-15 19:42:58 +01:00
olly
df4e4a72fa Print the name of the decoder we failed to query.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=124712775
2016-06-15 19:42:58 +01:00
andrewlewis
189a2502c5 Fix order of arguments in Format.copyWithDrmInitData.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=124705921
2016-06-15 19:42:58 +01:00
sharjeel
41b86f660c sgpd support in ExoV2
This is basically clone of [] for Exo V2.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=124682237
2016-06-15 19:42:58 +01:00
andrewlewis
2a3b4f6780 Don't flip() TextTrackRenderer EoS input buffers.
TextTrackRenderer would unconditionally flip input buffers read from its
source TrackStream, but the data could be null in the case where the buffer
signaled end of stream. Only flip if the corresponding flag is not set.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=124559077
2016-06-15 19:42:58 +01:00
eguven
4279e22138 TestUtil.assertOutput() also tests seeking.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=124556278
2016-06-15 19:42:58 +01:00
aquilescanta
461751b194 Add codec profiles for video container/sample formats.
This allows better decoding support checking.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=124550351
2016-06-15 19:42:58 +01:00
olly
ca9bd5e8e4 Define DATA_TYPE constants in C.
Things like manifests are loaded not in the context of a Chunk,
but we want to eventually be reporting all loading events. So
it makes senes to define data types at a global level.

Also added {@code} in a few places for consistency.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=124549737
2016-06-15 19:42:58 +01:00
tasnimsunny
b4746eddb3 Add cache initializtion signal to CacheEvictor
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=124374161
2016-06-15 19:42:12 +01:00
olly
4a3980c71e Add format change events to SimpleExoPlayer.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=124344637
2016-06-15 19:42:12 +01:00
eguven
cec658d573 ExtractorInput.setRetryPosition(): Called when reading fails and the required retry position is different from the last position.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=124242428
2016-06-15 19:42:04 +01:00
olly
1a1a454d09 Remove stray break from HLS playlist parser.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=124225444
2016-06-15 19:42:04 +01:00
olly
aa73e137d6 Propagate manifest format info through to renderers.
DASH and SS manifests define potentially useful information
that isn't present in the actual media streams. Primarily
the representation id, but bitrate, fps and language may
also be defined only at the manifest leve. This change merges
the information into the sample format that's propagated to
the renderers.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=124225175
2016-06-15 19:42:04 +01:00
olly
cb9a64da33 Merge ID3 parsing improvements from GitHub.
- Parse APIC and TextInformation frames.
- In MPEG-TS, don't mind if packets contain end padding.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=124079930
2016-06-15 19:42:04 +01:00
olly
444d21563c Fix MediaCodecUtil regression.
On older devices getCapabilitiesForType calls fail for some
secondary codecs. We didn't used to call getCapabilitiesForType
on secondary codecs, and so avoided this issue.

This change suppresses any exceptions encountered when
querying secondary decoders on API levels prior to N, to
restore previous behavior when a failure occurs.

Issue: #1534
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=124010242
2016-06-15 19:42:04 +01:00
andrewlewis
e684e42994 Clean up DefaultDataSources and add factory for okhttp DataSources.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=123991352
2016-06-15 19:42:04 +01:00
olly
c622483f79 Enable seamless rejoing for Vp9 extension.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=123982330
2016-06-15 19:42:04 +01:00
olly
afa1ad1a6a Keep playback position advancing when all renderers are disabled.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=123977520
2016-06-15 19:42:04 +01:00
olly
69bd31f7c2 Fix video renderer rejoining.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=123976645
2016-06-15 19:42:03 +01:00
andrewlewis
a100175b72 Rename TrackRenderer.reset to TrackRenderer.onReset.
This allows the TrackRenderer superclass to do things when the renderer is
reset, and makes resetting consistent with other 'events' on renderers.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=123974633
2016-06-15 19:42:03 +01:00
olly
ff745ac444 Make ExtractorSampleSource constructor consistent.
The allocator and buffering policy (e.g. how large the buffer
is) is moving to the top level as part of playlist support,
so it no longer makes sense to inject these parameters as
args into ExtractorSampleSource's constructor.

Instantiating the allocator and buffer size inside of the
source is temporary and only until they're moved up.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=123968976
2016-06-15 19:42:03 +01:00
aquilescanta
6fd610fc5f Added max video size selection to DefaultTrackSelectionPolicy.
It is possible to add use of this feature in the demo app, restricting the selected
tracks to the viewport size. But it should be added in a future CL.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=123965232
2016-06-15 19:42:03 +01:00
aquilescanta
105ef1da2d Discard trailing ctts entries with 0 sample counts
The bug this cl fixes is basically an uncaught case of []

Issue: #1567
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=123963779
2016-06-15 19:42:03 +01:00
olly
443a656ada Fix build.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=123958609
2016-06-15 19:42:03 +01:00