1736 Commits

Author SHA1 Message Date
olly
2d8b51a709 Convert extractor factory classes to static final objects
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=127415273
2016-07-15 18:16:18 +01:00
olly
f758082d40 Big (and hopefully near-final) rename.
1. Rename "extensions" package to "decoder". It's used by both
   text and (should be used by) metadata, so it's no longer just
   for extensions.
2. Move Buffer objects move into the decoder package.
3. Rename SubtitleParser and MetadataParser to SubtitleDecoder
   and MetadataDecoder respectively, since they extend Decoder.
   Ditto for all subclasses.
4. Subtitle and Metadata decoders now throw their own exception
   types rather than ParserException.
5. Move MediaCodec classes into a mediacodec package, with the
   exception of the concrete audio and video renderers.
6. Create an audio package to hold the two audio renderer classes
   plus related util classes.
7. Create a video package to hold the one video renderer class
   plus related util classes.

After this change the following nice properties hold:

1. Want a video renderer? Look in the video package. Ditto for
   audio, text and metadata.
2. All TrackRenderer implementations use a decoder of some kind
   to decode buffers received from the source, so we have
   consistent terminology there.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=127326805
2016-07-15 18:14:55 +01:00
olly
4f718363b5 Remove BandwidthMeter from SimpleExoPlayer
The BandwidthMeter should only be used by MediaSource
instances and the objects they reference, so there's
really no reason for the player to need to know about it.

This change sacrifices DebugTextViewHelper showing the
estimated bandwidth, but I think that's a price worth
paying.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=127316755
2016-07-15 18:14:14 +01:00
eguven
4a5bb55920 Split DashMediaSource MediaPeriod implementation into DashMediaPeriod and support multiple periods.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=127315877
2016-07-15 18:13:33 +01:00
aquilescanta
a0c1595725 Add support for CEA608 in MP4 and fMP4
Issue: #1658
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=127312721
2016-07-15 18:12:57 +01:00
[]inger
e4a3483d6f Propagate audioSessionId.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=127300225
2016-07-15 18:12:20 +01:00
andrewlewis
11e2e0e640 Release Extractors on the loader's thread.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=127294338
2016-07-15 18:11:38 +01:00
olly
62ebcaf853 Remove unnecessary res placeholder files
I think these were needed for Eclipse only.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=127232262
2016-07-15 18:11:05 +01:00
olly
ea0cfdeeb1 Remove dead code from SmoothStreamingChunkSource
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=127232159
2016-07-15 18:10:29 +01:00
vigneshv
6b4918fa9b vp9: Expose libvpx build configuration
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=127216536
2016-07-15 18:09:49 +01:00
andrewlewis
acef34a6f3 Set the output buffer position/limit only if it's non-null.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=127196797
2016-07-15 18:09:11 +01:00
olly
d4d1640808 Use extension rather than composition for track selection
It doesn't look like TrackSelectionPolicy is going to be
useful other than with DefaultTrackSelector, and it's kinda
confusing dealing with both "selector" and "policy"
terminology. This change does the following:

DefaultTrackSelector -> selector.MappingTrackSelector
DefaultTrackSelectionPolicy -> selector.DefaultTrackSelector
TrackSelectionPolicy -> [deleted]
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=127196326
2016-07-15 18:08:36 +01:00
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
aquilescanta
9385b4fdf4 Add version to SampleChooserActivity for Exoplayer2
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=127179274
2016-07-15 18:05:37 +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
andrewlewis
b8fef7bf99 Delete Eclipse .cproject files.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=127073328
2016-07-15 18:01:51 +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
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