Commit graph

250 commits

Author SHA1 Message Date
olly
c01c2c34f7 Store full accessibility descriptors in parsed DASH manifest
Issue: #2362

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=145402640
2017-01-24 14:25:47 +00:00
aquilescanta
b1ec5e3a25 Move TimestampAdjuster from extractor to util
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=145295850
2017-01-24 14:25:47 +00:00
aquilescanta
18d7cdf39f Add pts adjustment in SpliceInfoDecoder
This allows the user to interpret PTSs in the playback timebase.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=145280921
2017-01-24 14:25:47 +00:00
Oliver Woodman
55ca323cee Add upstream.crypto package (and friends). 2017-01-20 20:50:02 +00:00
olly
ae01c1a6fd Move inband event streams to Representation
This is more consistent with our handling of DRM init data,
and is more correct. It'll be up to whoever's using the
manifest to look one layer deeper and figure out what event
streams are defined on all representations, if they wish to
do so.

Issue #2176

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=144968183
2017-01-20 15:38:30 +00:00
andrewlewis
bc4dc591f5 Fix some style nits in ID3 chapter support.
Issue: #2316

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=144815010
2017-01-18 11:28:06 +00:00
Oliver Woodman
5aff31c061 Further improve ID3 parsing 2017-01-17 15:29:07 +00:00
olly
7f967f3057 DASH: Parse Role elements to select default audio/text tracks
Issue: #2058

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=144693705
2017-01-17 13:44:14 +00:00
aquilescanta
6e481178ea Track HLS discontinuities when playlist does not declare sequence
This is an initial version that does not handle cross-playlists
adjustment in an ideal way.

Issue:#1789

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=144692969
2017-01-17 13:43:18 +00:00
olly
79a0899124 Always re-send format if sample buffer is null
Also clear the playingPeriodHolder in the case the renderers
are being disabled. This is required to ensure that
setPlayingPeriodHolder isn't turned into a no-op, which will
break the seek.

Issue: #2330

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=144635220
2017-01-17 13:40:05 +00:00
eguven
63123f455c Add SimpleCache tests for encrypted index file
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=144431191
2017-01-13 17:27:26 +00:00
aquilescanta
264ba8cfcf Change MetadataDecoder interface to receive a MetadataInputBuffer
This allows passing a subsampleOffsetUs as in Text decoding.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=144334172
2017-01-13 17:27:25 +00:00
aquilescanta
4a6a8553e9 Check #EXTM3U header is present in HLS playlists
Issue:#2301

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=144334062
2017-01-13 17:27:25 +00:00
eguven
5c89bbedb7 Fix leftover bytes in cached content index file
Extra calls to CipherOutputStream.close() causes each time extra 16 bytes written to the
underlying OutputStream. Prevented close() is called more than once and also discarded any
data in ReusableBufferedOutputStream buffer on reset().

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=144063120
2017-01-13 17:01:37 +00:00
olly
f2634d11f5 Support emsg metadata decoding
Note: End to end emsg support is still non-functional.
There's some additional plumbing that still needs to
be done.

Issue: #2176

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=143775147
2017-01-06 16:57:35 +00:00
eguven
9d5c750fe9 Support offline drm key downloading and restoring
Renamed StreamingDrmSessionManager to DefaultDrmSessionManager and added functionality to download, restore, renew and release offline keys. Added a utility class, OfflineLicenseHelper, to facilitate use of DefaultDrmSessionManager for downloading, renewing and releasing offline keys.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=143769955
2017-01-06 16:56:31 +00:00
andrewlewis
b2a153d568 Add a player test for renderers reading ahead.
Also move timeline, manifest and format verifications into the test* methods.

Issue: #2252

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=143761969
2017-01-06 16:55:09 +00:00
olly
5082d1f282 Some boilerplate for DASH EMSG support
- Parse EMSG leaf atoms during FMP4 extraction (although
  currently they're just discarded).
- Add readNullTerminatedString to ParsableByteArray.

Issue: #2176

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=143555965
2017-01-04 23:07:58 +00:00
olly
2512bd6e77 Add test for decoding ID3 PRIV frame
I wrote this whilst investigating a user issue. It looks like
we don't need to do anything about the issue itself, but since
I wrote the test we may as well keep it!

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=143549697
2017-01-04 23:07:57 +00:00
olly
b774660989 Add multi-period ExoPlayer unit test
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=143475824
2017-01-04 23:07:57 +00:00
Oliver Woodman
0b141aeeee Revert "Improving handling of atoms with size less than header in FragmentedMp4Extractor."
This reverts commit 71186ef16e.
2017-01-04 22:32:28 +00:00
cblay
71186ef16e Improving handling of atoms with size less than header in FragmentedMp4Extractor.
These currently lead to cryptic ArrayIndexOutOfBoundsExceptions being thrown from System.arraycopy() so my proposal is to throw a more useful ParserException instead.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=142087132
2017-01-04 22:26:58 +00:00
olly
4bb8793203 Deduplicate reported position discontinuities
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=142257743
2016-12-16 16:21:16 +00:00
olly
588124da76 Test playback of empty timeline completes successfully
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=142157778
2016-12-16 16:21:16 +00:00
cblay
37317520f4 Improving handling of atoms with size less than header in FragmentedMp4Extractor.
These currently lead to cryptic ArrayIndexOutOfBoundsExceptions being thrown from System.arraycopy() so my proposal is to throw a more useful ParserException instead.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=142087132
2016-12-16 16:21:16 +00:00
andrewlewis
f276eb2ce7 Add ClippingMediaSource.
ClippingMediaSource wraps a single period/window video-on-demand source and
exposes a specified time range within it.

Issue: #1988

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=141991215
2016-12-14 14:23:38 +00:00
olly
e5bc00ea94 Fix DataSourceInputStream + add unit test
Issue: #2162

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=141177715
2016-12-06 20:06:04 +00:00
olly
2db7c50d7c Fix test.
The definition of negative line indices was intentionally shifted
by one because the way VTT defines them doesn't appear to allow for
cues to be positioned at the very bottom of the screen in the case
that ANCHOR_TYPE_END is used.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=141168028
2016-12-06 20:05:23 +00:00
aquilescanta
931670957f Add support for multiple table sections in PSI section
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=141073182
2016-12-06 20:01:13 +00:00
olly
bbbd61e319 Skip negative SubRip timecodes
Issue: #2145

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=140868079
2016-12-02 19:37:14 +00:00
andrewlewis
45bc4a0374 Pass player and isTopLevelSource to MediaSource.prepareSource.
These additions are useful for sources that need to track the playback position
and control playback.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=140828310
2016-12-02 19:23:35 +00:00
cdrolle
2753664c6b Fixed an error in the date and time parser's handling of time zones.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=140400905
2016-11-30 21:57:29 +00:00
andrewlewis
f9c7343e76 Add basic unit test for ExoPlayer/ExoPlayerImplInternal.
The simple verifications in this test may be useful for smoke testing, but the
coverage of ExoPlayerImplInternal is low. The intention is to add tests for
more complex logic in ExoPlayerImplInternal in later changes.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=140327358
2016-11-30 21:54:05 +00:00
eguven
fa3d129b14 Fix some of the issues pointed by android lint tool
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=139915885
2016-11-25 20:18:32 +00:00
andrewlewis
77715fbfbe Fix some analysis warnings.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=139901449
2016-11-25 20:18:32 +00:00
eguven
35054f8f7c Added ReusableBufferedOutputStream.
ReusableBufferedOutputStream is a subclass of BufferedOutputStream with a reset(OutputStream) that allows an instance to be re-used with another underlying output stream.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=139505999
2016-11-18 12:52:46 +00:00
eguven
ff1a008817 Delete temporary test folders on test exit.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=138860196
2016-11-18 12:43:48 +00:00
eguven
92a98d1ce2 Encrypt SimpleCache index file.
Clean up AtomicFile and make it return a custom FileOutputStream
for writing which handles IOException automatically during write
operations.

It also syncs the file descriptor and deletes the backup file on
close() call. This fixes the order of flush and close operations
when the fileoutputstream is wrapped by another OutputStream.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=138779187
2016-11-10 21:15:35 +00:00
olly
7ac1cab2d5 Set language to null unless explicitly defined as "und" in container
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=138758504
2016-11-10 21:15:35 +00:00
olly
aefc5165fd Fix cache upgrade
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=138687623
2016-11-10 21:15:28 +00:00
aquilescanta
b1fe274df3 Replace java.text.ParseException for ExoPlayer's ParserException
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=138628300
2016-11-10 21:15:20 +00:00
cdrolle
a4935a9ba0 Added support for multiple RawCC (CEA-608/CEA-708) tracks in DASH.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=138392065
2016-11-10 21:14:57 +00:00
eguven
a6e2770116 Upgrade SimpleCacheSpan files during createCacheEntry call.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=138379386
2016-11-10 21:14:29 +00:00
eguven
ff77d1e72c Add index file to hold header information for cached content.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=138373878
2016-11-10 21:14:29 +00:00
aquilescanta
992cfdecc2 Feed timestamps from loaded chunks back to the playlist tracker
This is the first step towards allowing discontinuities in the
playlist tracking. Also changed durationSecs for durationUs in
MediaPlaylist.Segment.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=138207732
2016-11-10 21:14:29 +00:00
zhihuichen
e2081f40fb move baseUrl from segments to representations: V2
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=138136090
2016-11-10 21:14:29 +00:00
aquilescanta
aaf38adc26 Add support for HLS live seeking
In order to expose the live window, it is necessary (unlike before) to refresh
the live playlists being played periodically so as to know where the user can
seek to. For this, the HlsPlaylistTracker is added, which is basically a map
from HlsUrl's to playlist. One of the playlists involved in the playback will
be chosen to define the live window. The playlist tracker it periodically.
The rest of the playilst will be loaded lazily. N.B: This means that for VOD,
playlists are not refreshed at all. There are three important features missing
in this CL(that will be added in later CLs):

* Blacklisting HlsUrls that point to resources that return 4xx response codes.
    As per [Internal: b/18948961].
* Allow loaded chunks to feed timestamps back to the tracker, to fix any
    drifting in live playlists.
* Dinamically choose the HlsUrl that points to the playlist that defines the
    live window.

Other features:
--------------

The tracker can also be used for keeping track of discontinuities. In the case
of single variant playlists, this is particularly useful. Might also work if
there is a that the live playlists are aligned (but this is more like working
around the issue, than actually solving it). For this, see [Internal: b/32166568]
and [Internal: b/28985320].

Issue:#87

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=138054302
2016-11-10 20:54:03 +00:00
Oliver Woodman
8a89abcbf1 Merge branch 'dev-v2-id3' into dev-v2 2016-10-27 12:37:22 +01:00
aquilescanta
0b8e9754ca Pass initialization parameters to section readers
Unlike with PesReaders, sections don't have a standard way
of providing timestmaps or even generating tracks. We need
to pass this information so that readers decide what to do
with it.

Issue:#726

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=137162494
2016-10-27 12:27:21 +01:00
aquilescanta
1809836c21 Provide a method for creating a reader for a particular PID
This allows the user to create section readers(usually) for reserved pids,
like SDT, EIT, CAT, etc.

Issue:#726

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=137150853
2016-10-27 12:26:32 +01:00