2132 Commits

Author SHA1 Message Date
Oliver Woodman
139252c9d3 Propagate defaultRequestProperties + make getDefaultRequestProperties final 2017-03-13 16:25:44 +00:00
olly
3131074338 Upgrade dependencies
Issue: #2516

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=149942409
2017-03-13 15:54:10 +00:00
bachinger
aede0f894d Propagate updates of default header fields of the HttpDataSource.BaseFactory to HttpDataSource instances.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=149780233
2017-03-13 15:54:10 +00:00
aquilescanta
952bde700b Ensure only timestamp adjustment masters set first sample timestamps
Without this, it is possible that a non timestamp master instances
the adjuster with its own chunk start time. When chunks are not
aligned, this breaks adjustment.

Issue:#2424

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=149764488
2017-03-13 15:54:10 +00:00
ojw28
6d61519421 Merge pull request #2547 from LiveLike/program-date-time-regex
Support comma separators in ISO-8601 date/time format for milliseconds
2017-03-13 10:00:35 +00:00
Ben Wilber
578b9545f0 Support commas in ISO-8601 date/time format for millis 2017-03-10 16:09:58 -05:00
eguven
f21cdcb9c5 Allow null DataSink.Factory in CacheDataSourceFactory
CacheDataSource allows null DataSink. Do the same in CacheDataSourceFactory.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=149750696
2017-03-10 14:24:43 +00:00
aquilescanta
cb0187959c Fix NPE in HLS playback of non-muxed streams
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=149749504
2017-03-10 14:24:43 +00:00
cdrolle
0cb9802e1b Fixed CEA-708 issues
Caption characters weren't being assigned to the correct window and the lack of
pen location support was causing multiple lines (and words) to be concatenated.

As per the CEA-708-B specification, section 8.10.5, when we encounter a DefineWindow
command, we're also supposed to update the current window to the newly defined one.
We were not doing this previously, resulting in text that should have been in separate
windows being combined into one. Furthermore, some content uses the SetPenLocation
command to move the cursor down a line instead of appending a new line. As we don't
currently support SetPenLocation, this resulted in multiple lines (and words) being
concatenated together, potentially causing the text to extend past the edge of the
window/screen. This change implements a workaround (until SetPenLocation is properly
supported) for this issue in which setting the pen location to a new row will append
a new-line to that window.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=149679613
2017-03-10 14:24:43 +00:00
cdrolle
b84c84cc76 Fixed CEA-708 issue where cues weren't updated at the appropriate times
As per the CEA-708-B specification, section 8.10.4, cues don't necessarily
need either an ETX command or any of the C1 commands before being updated
with the latest buffered content. While those commands do indicate that the
cues should be updated immediately, the cues can also be updated after a
service block has been processed if it appended text to the buffer.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=149673162
2017-03-10 14:24:43 +00:00
eguven
b6773dba05 Add PriorityDataSourceFactory
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=149543747
2017-03-10 14:24:43 +00:00
aquilescanta
3be4451e13 Allow injection of DataSource's per type of data
This allows the client to define what data source is used for
media chunks, encryption chunks and playlists.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=149537766
2017-03-10 14:24:43 +00:00
eguven
78e7c3c510 Make CacheDataSourceFactory createDataSource return specific type
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=149533820
2017-03-10 14:24:43 +00:00
olly
45c7fe9b00 Drain embedded track sample queues when not enabled.
I think it's likely we'll revert back to discarding media
in sync with the playback position for ExtractorMediaSource
and HlsMediaSource too, where the tracks are muxed with ones
we're requesting anyway.

Note: discardBuffer is named as it is because it'll also be
used to discard for enabled tracks soon, as a result of the
remaining TODO in ChunkSampleStream. For enabled tracks the
discard will also be conditional on the samples having been
consumed, obviously.

Issue: #2362
Issue: #2176

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=149525857
2017-03-10 14:24:43 +00:00
olly
09471defd7 Enabled EMSG and CEA-608 embedded streams for DASH
Issue: #2362
Issue: #2176

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=149524412
2017-03-10 14:24:43 +00:00
andrewlewis
99e19a92af Fix SampleStream javadoc.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=149431794
2017-03-10 14:24:43 +00:00
aquilescanta
e7462f05f5 Add maxVideoBitrate to DefaultTrackSelector.Parameters
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=149097876
2017-03-10 14:24:43 +00:00
aquilescanta
8e9711e8aa Allow packed audio without PRIV timestamps
We use the segments' start time when the timestmap is not present.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=149006252
2017-03-10 14:24:43 +00:00
eguven
e40bba2852 Add Cache.getCachedBytes() which returns the length of the cached or not data block length
This method can be used to determine not cached parts of a content.
The 'length' parameter allows quicker responses without going through all adjacent spans.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=149005688
2017-03-10 14:24:43 +00:00
aquilescanta
247da48e9d Make ElementaryStreamReader's public
This allows building a TsPayloadReader.Factory without
having to wrap the default one.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=149004102
2017-03-10 14:24:43 +00:00
sxp
0dee4aec70 Deprecate instead of delete BaseRender.readSource(FormatHolder, DecoderInputBuffer)
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=148808381
2017-03-10 14:24:43 +00:00
mofneko
5b0192a3dd Update HlsPlaylistTracker.java
Fix unused variable.
2017-03-08 03:20:34 +09:00
andrewlewis
a9079f67aa Fix some documentation nits.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=148776593
2017-02-28 17:37:44 +00:00
olly
ab8fd14724 Support multiple track outputs from BaseMediaChunk
Issue: #2362
Issue: #2176

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=148764237
2017-02-28 17:36:45 +00:00
andrewlewis
d58008eeb7 Rename BufferProcessor to AudioProcessor.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=148763781
2017-02-28 17:35:35 +00:00
olly
91639b26cd Add some pipelining in MetadataRenderer
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=148760782
2017-02-28 17:34:29 +00:00
andrewlewis
b3cfeaa17b Discard extra silent channels on Samsung Galaxy S6/S7.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=148654495
2017-02-28 13:47:18 +00:00
eguven
2411d0fc76 Move and rename PRIORITY_PLAYBACK to C constants class
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=148651265
2017-02-28 13:47:18 +00:00
eguven
98f4fb85c2 Move utility methods to DashUtil class
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=148647040
2017-02-28 13:47:18 +00:00
aquilescanta
e26723cdc7 Add MODE_SINGLE_PMT to TsExtractor
This mode allows the extractor to support streams with multiple
programs declared in the PAT, but only one PMT. This is necessary
to support tuner-obtained media.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=148636312
2017-02-28 13:47:18 +00:00
olly
35988395d2 Fix incorrect Javadoc
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=148633347
2017-02-28 13:47:18 +00:00
olly
ad857852e5 Discard subtitles with invalid positions
textWidth can be negative if textLeft extends parentRight (i.e.
the subtitle is positioned entirely off the screen to the RHS).
We should just discard and log a warning in this case.

Issue: #2497

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=148481310
2017-02-28 13:47:18 +00:00
andrewlewis
129334d2a0 Clean up method ordering in ResamplingBufferProcessor.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=148444806
2017-02-28 13:47:18 +00:00
olly
88fc337db0 Expose empty CEA-608 and EMSG tracks for DASH
This change exposes declared CEA-608 and EMSG tracks. The
tracks currently provide no samples.

Issue: #2362
Issue: #2176

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=148390849
2017-02-28 13:47:18 +00:00
olly
d99cb28e6a Correctly handle a SampleStream ending without providing a format
I'm going to introduce an EmptySampleStream that will be used in
some cases in conjunction as part of 608/EMSG support. This change
avoids EmptySampleStream having to provide a dummy format.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=148383831
2017-02-28 13:47:18 +00:00
aquilescanta
ef2541e654 Fix negative start time values
Issue:#2495

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=148348663
2017-02-28 13:47:18 +00:00
andrewlewis
e3a57146d2 Fix BufferProcessor.queueEndOfStream javadoc
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=148344328
2017-02-28 13:47:18 +00:00
andrewlewis
82d33cde68 Add support for draining audio output.
At the end of playback, BufferProcessors need to be drained to process all
remaining data, then the output needs to be written to the AudioTrack before
stop() is called.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=148339194
2017-02-28 13:47:18 +00:00
Oliver Woodman
5fe5076c86 Clarify naming for ClearKey DRM support 2017-02-23 14:51:58 +00:00
Oliver Woodman
3bb08e58f6 Cleanup of CENC support 2017-02-23 14:27:23 +00:00
ojw28
7e02e58e16 Merge pull request #2372 from wasabeef/dev-v2-cenc-clearkey
Added support for CENC ClearKey
2017-02-23 14:17:11 +00:00
aquilescanta
3fc3349e95 Add support for Caption Format Descriptor
This allows the TsExtractor to automatically determine the
closed caption tracks to expose by parsing available
descriptors.

Issue:#2161

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=148321380
2017-02-23 14:14:23 +00:00
olly
698e081eda Handle empty PRIV frames
Issue: #2486

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=148217936
2017-02-23 14:13:30 +00:00
olly
ddbced7317 Conditionally enable EMSG/608 based on manifest declarations
Issue: #2362
Issue: #2176

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=148216614
2017-02-23 14:12:28 +00:00
andrewlewis
682987a0cf Separate input/output handling in BufferProcessors.
This allows BufferProcessors to partially and/or asynchronously handle
input/output. Document contract for queueInput and getOutput.

Update ResamplingBufferProcessor to use the new interface.

Separate submitting bytes vs. writing data to the AudioTrack.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=148212269
2017-02-23 14:11:23 +00:00
aquilescanta
896550883f Add support for multiple CC channels in HLS
Issue:#2161

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=148203980
2017-02-23 14:10:18 +00:00
aquilescanta
e86629ef3a Allow exposing multiple CEA608 tracks for Transport Streams
This CL allows passing multiple formats describing CC channels to the
TS payload reader factory. As a simple usecase, ATSC can expose both
608 channels by passing a two element list with the corresponding
accessibility channels. The HLS media source can construct this list
from the EXT-X-MEDIA:TYPE="CLOSED-CAPTIONS" tags, including language
and selection flags. The interface extends without modification to
708.

Pending work:
* Multiple CC channels in HLS.
* caption_service_descriptor parsing for overriding the user's selection.
* 708 support in SEI reader.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=148030293
2017-02-23 14:09:05 +00:00
olly
a84216c3a9 Allow enabling of EMSG/608 outputs on DefaultDashChunkSource
Issue #2176

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=148027655
2017-02-23 14:08:01 +00:00
aquilescanta
72e1eae6f5 Discard preparation chunk if track selection does not include it
This avoids breaking the player if the first variant is not
supported by the device.

Issue:#2353

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=148025791
2017-02-23 14:06:54 +00:00
andrewlewis
17762ebaa2 Reformat @IntDef field/return type annotations.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=148018580
2017-02-23 14:04:42 +00:00