1667 Commits

Author SHA1 Message Date
olly
8bf0243daf Fix mp3 extraction failure for short frames
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=134660133
2016-09-29 16:29:35 +01:00
cdrolle
040fe3b194 Refactored the text.eia608 package to text.cea.
All of the classes in the text.eia608 package have been moved to
text.cea, and renamed with the "cea" prefix instead of "eia". All of
the buffering logic has been extracted from Cea608Decoder (formerly
Eia608Decoder) into the abstract CeaDecoder, which Cea608Decoder
extends. Cea608Decoder also now expects a 3-byte sample (i.e. the
entire cc_data_pkt instead of just the cc_data_1 and cc_data_2 bytes).
Classes like RawCcExtractor and SeiReader, responsible for creating
these samples, have also been updated accordingly.

This change is a necessary precursor to adding support for multi
-channel CEA-608 and CEA-708 captions.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=134537482
2016-09-29 16:28:58 +01:00
andrewlewis
825ec70d31 Move preparation from MediaPeriod constructors to prepare().
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=134504088
2016-09-28 11:26:12 +01:00
aquilescanta
c7b5c967ff Remove duplicate methods in DefaultTrackSelector
This encourages a single invalidation when setting different parameters.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=134436136
2016-09-28 11:26:12 +01:00
aquilescanta
ed5decfafc Add ElementaryStreamReader's factory to inject custom readers in TSExtractor
Issue:#726

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=134433012
2016-09-28 11:26:12 +01:00
andrewlewis
4a62b2688c Post onPrepared so it runs after createPeriod has finished.
Issue: #1853

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=134409897
2016-09-28 11:26:12 +01:00
andrewlewis
85b61adb32 Call onPrepared/onSourceInfoRefreshed on the playback thread.
HlsSampleStreamWrapper and ExtractorMediaPeriod would call
onPrepared/onSourceInfoRefreshed from their loading threads. That was
problematic for ConcatenatingMediaSource and MergingMediaSource, which assume
that their callbacks are called on the same thread (iterating through timelines
from all sources and updating pendingTimelineSources respectively). This change
makes them post calls to the callbacks on the playback thread.

Generally, implementing a composite MediaSource is easier if
MediaPeriod.Callback's methods are all called on the same (playback) thread, so
this change makes that part of its contract.

Also post onContinueLoadingRequested from ExtractingLoadable because
MergingMediaPeriod.onContinueLoadingRequested reads trackGroups written on the
playback thread.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=134407280
2016-09-28 11:26:12 +01:00
olly
eaf8218855 Fix shutter open/close behavior
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=134389619
2016-09-28 11:26:12 +01:00
anjalibh
d74166cd35 Parse Projection, ProjectionPrivate
As described in https://github.com/google/spatial-media/blob/master/docs/spherical-video-v2-rfc.md.
Also parse StereoMode as per standard matroska spec.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=134302208
2016-09-28 11:26:00 +01:00
cdrolle
f5ebcb8d04 Modified the default position parameters of the Cue objects created by
Eia608Decoder.

Full preamble positioning will be provided in a subsequent CL. This CL
also contains some minor cleanup in Eia608Decoder and adds some TODOs
to handle the second channel.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=134299337
2016-09-28 11:25:40 +01:00
aquilescanta
7273237b28 Add an immutable holder for track selection parameters
This solves the thread unsafety issue of the default track selector and
allows atomic configuration changes.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=134288525
2016-09-28 11:25:40 +01:00
olly
65eda1d105 Add missing generic types
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=134099118
2016-09-28 11:25:40 +01:00
aquilescanta
94cc606091 Export variant codecs in HLS
Issue:#1772

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=134073672
2016-09-28 11:25:40 +01:00
andrewlewis
8cf107408d Replace stbl consistency assertions with a warning.
Issue: #1850

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=134073096
2016-09-28 11:25:40 +01:00
olly
654d914bb6 Fix DefaultHttpDataSource read when requested length is 0
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=134063990
2016-09-28 11:25:40 +01:00
olly
57a2749a9d Fix playback of short duration content
Issue #1837

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=133944552
2016-09-28 11:25:34 +01:00
andrewlewis
1546da899b Use @IntDef where possible.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=133932812
2016-09-28 11:25:02 +01:00
olly
59ee4341c5 Fix buffering issue for live streams
Issue: #1825

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=133401980
2016-09-16 18:56:40 +01:00
andrewlewis
22728d9ae4 Use new ParsableByteArray.reset where possible.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=133384105
2016-09-16 18:56:02 +01:00
olly
c17190319b Rename assets to avoid naming conflicts
Issue #1823

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=133267642
2016-09-16 18:54:09 +01:00
aquilescanta
70351bfae2 Create one HlsSampleStreamWrapper per track group
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=133243031
2016-09-16 18:53:27 +01:00
andrewlewis
6a099f1c57 Clean up MP3 synchronization and fix handling < 4 frames.
Also add a test MP3 stream with one frame.

Make FakeExtractorInput's end of input detection to apply also for peekFully, and
make its skip and read methods read at least one byte.

Issue: #1732

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=133241641
2016-09-16 18:52:42 +01:00
andrewlewis
b1f9798b89 Fix peeking the end of the stream then reading it.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=133240502
2016-09-16 18:51:52 +01:00
olly
ab49425e43 Fix crash on pre-api-21 devices.
The four-arg constructor didn't exist in ViewGroup for
earlier API levels. I think it can probably be safely
omitted, unless you know otherwise?

Issue: #1820

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=133156975
2016-09-14 20:18:13 +01:00
eguven
5512aae451 Revert CacheSpan EOS changes.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=133123235
2016-09-14 16:34:27 +01:00
olly
80d08a6e25 Fix the build
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=133120924
2016-09-14 16:33:46 +01:00
olly
bf0d398ba8 Fix RawResourceDataSource remaining length
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=133120449
2016-09-14 16:33:06 +01:00
olly
560071683f Guide V2 + a few related code tweaks
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=133022058
2016-09-13 19:15:31 +01:00
benm
2ebabc54eb Support raw resources inside the APK as a DataSource.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=133013132
2016-09-13 19:14:46 +01:00
aquilescanta
76a05ce30f Fix race condition in timestamp adjustment for HLS
If a Webvtt HlsChunkSource got to schedule its chunk load before the
master HlsChunkSource (the one that downloads the TS or the fMP4
chunks), the player would never get past the buffering state.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=132985792
2016-09-13 17:47:07 +01:00
olly
f4248410d9 PlaybackControlView improvements
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=132981908
2016-09-13 17:45:40 +01:00
olly
de67fa5017 Allow replacement of libraries for Opus/Flac/Ffmpeg too
- Also make some of the naming more concise + misc style cleanup.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=132899979
2016-09-13 17:44:10 +01:00
olly
c46c6f18c2 Add DRM request headers to exolist.json format
Plus misc fixes related to the added samples.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=132891534
2016-09-13 17:42:47 +01:00
olly
26e1306639 Fix HLS Timeline.isDynamic
- Also fix an issue that allowed blacklisting of all tracks,
due to incorrect index being used.
- Also fix an issue with track deselection for HLS.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=132882151
2016-09-13 17:42:05 +01:00
andrewlewis
2da35769ff Fix some typos/consistency nits.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=132876946
2016-09-13 17:41:24 +01:00
olly
383966b307 No-op cleanup for playback controls II
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=132862043
2016-09-13 17:40:00 +01:00
aquilescanta
625bb4ed48 Fix PMT descriptors parsing bug
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=132862014
2016-09-13 17:39:16 +01:00
olly
bcec597023 No-op cleanup for playback controls
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=132859943
2016-09-13 17:38:40 +01:00
olly
8190089b32 Rename defaultStartPosition -> defaultPosition
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=132858669
2016-09-13 17:37:59 +01:00
olly
94983675c2 Expose an unknown mimeType video track rather throwing in parser
Issue: #631

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=132858217
2016-09-13 17:37:17 +01:00
olly
f2ddfb0867 Expose getPhysicalDisplaySize for non-primary display
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=132856997
2016-09-13 17:35:58 +01:00
[]inger
7925342fa0 Provide a VideoView for simple use cases.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=132855091
2016-09-13 17:35:11 +01:00
aquilescanta
7e51c3af74 Add continuity counter support in Transport Streams
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=132684574
2016-09-13 17:33:38 +01:00
aquilescanta
3bad28ac91 Fix TsExtractor tests
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=132561841
2016-09-13 17:32:55 +01:00
aquilescanta
c78010c212 Add support for language descriptors in MPEG-2 TS
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=132559667
2016-09-13 17:32:10 +01:00
eguven
26466679df Added CacheDataSourceFactory, FileDataSourceFactory and CacheDataSinkFactory.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=132556806
2016-09-08 16:29:48 +01:00
aquilescanta
cab02289f5 Generalize the PtsTimestampAdjuster
This allows the adjustment of timestamps in microseconds along with
TS timestamps. This is useful for containers that include the
timestamps in microseconds format, like fMP4 and WebVTT.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=132547521
2016-09-08 16:29:48 +01:00
olly
04c28c6d7d Minimal change to fix seeking before prepare + finalize API
- This change fixes seeking before the prepare (or more
  accurately, before the timeline is set). The fix a minimal
  one to fix the behavior. It's inefficient compared to
  posting the pending seek onto the playback thread, which
  will be the long term solution.
- As of this change, I think we can call V2 "done". There are
  some loose ends to tie up, but the API is effectively
  finalized and the implementation is in a state where you
  can take it, use it and expect it to work.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=132468107
2016-09-08 16:29:48 +01:00
olly
8f70845631 Tweak VideoListener doc
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=132433848
2016-09-08 16:29:48 +01:00
aquilescanta
651f5fafa7 HLS: Instantiate an AC3 extractor for .ec3 files
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=132417755
2016-09-08 16:29:48 +01:00