5060 Commits

Author SHA1 Message Date
ojw28
7f44d8f9b9 Merge pull request #367 from google/dev
dev -> dev-webm-vp9-opus
2015-03-25 12:12:44 +00:00
Oliver Woodman
b73b9a0509 Add workaround for #252 (but don't enable it by default). 2015-03-25 12:08:45 +00:00
Oliver Woodman
e54d07c1b0 Fix issue with new extractor input 2015-03-17 12:36:46 +00:00
Andrew Lewis
5e4a35fa7e Add Mp4SampleExtractor, for reading unfragmented MP4 files. 2015-03-13 18:10:37 +00:00
Andrew Lewis
6d8c4dd416 Add workaround for slow okhttp InputStream.close() on API levels 19/20. 2015-03-13 18:06:00 +00:00
Oliver Woodman
a22ccf9254 Another baby step to unified extractors.
- Have extractors read from an ExtractorInput. Benefits of this are
  (a) The ability to do a "full" read or skip of a specified number
  of bytes, (b) The ability to do multiple reads in your extractor's
  read method. The ExtractorInput will throw an InterruptedException
  if the read has been canceled.

- Provides the extractor with the ability to query the absolute
  position of the data being read in the stream. This is needed for
  things like parsing a segment index in fragmented mp4, where the
  position of the end of the box in the stream is required because
  the index offsets are all specified relative to that position.
2015-03-13 11:47:51 +00:00
Oliver Woodman
1111dd73a0 Further simplify HlsExtractor interface.
- Move to builder naming.
- Propagate formats to the TrackOutput instances, rather than having
  them be read through the Extractor. There was actually some weird
  indexing going on here before (which happened to work, but wasn't
  well defined).
2015-03-13 11:44:27 +00:00
Oliver Woodman
04cead415a Merge branch 'dev' of https://github.com/google/ExoPlayer into dev 2015-03-12 19:44:18 +00:00
Oliver Woodman
12807a7d4b Simplify encryption handling in HLS. 2015-03-12 19:44:06 +00:00
Oliver Woodman
fb36f85e0d Simplify encryption handling in HLS. 2015-03-12 19:42:00 +00:00
ojw28
fabd470550 Merge pull request #354 from canatella/aes-iv-fix
Fix AES decryption of HLS streams.
2015-03-12 16:43:24 +00:00
Damien Merenne
94dd9c41f4 Fix AES decryption of HLS streams.
As per http://tools.ietf.org/html/draft-pantos-http-live-streaming-04#section-5.2,
the initializaton vector (IV) of the AES decryption algorithm should be set to:
- the IV attribute value if present,
- the sequence number otherwise.

Currently, the IV is set once and use over all next media sequences
where the IV attribute is not set. The fix is to use the provided IV if
given or use the current media sequence number.
2015-03-12 13:34:58 +01:00
Oliver Woodman
5ca2e0fd95 First step toward extractor unification.
- It's probably easiest to think of this as a standalone HLS change, which is splitting out the "loading" and "consuming" sides of HlsExtractor and a good structural change in its own right. To do this, HlsExtractorWrapper becomes a final class implementing the consuming side. HlsExtractor becomes an interface defining the loading side.

- The bigger picture is that, hopefully, HlsExtractor will become a lightweight extractor interface that can be used throughout the library. Because it doesn't need to implement the consuming side, we'll save on having to re-implement the consuming side for every extractor (we'll probably need one consuming side implementation for HLS/DASH/SmoothStreaming, and a second one for everything else, both of which will use SampleQueue). It's expected that the HlsExtractor interface will need to change to accommodate all use cases.

- The next step in unification will be to try and have FragmentedMp4Extractor implement HlsExtractor (which will need renaming). Once this is done, I'll try and move the chunk package over to use the HlsExtractor interface.
2015-03-11 19:21:33 +00:00
Oliver Woodman
becc6fca4c Enhance SampleQueue/RollingSampleBuffer to support other use cases.
- This is a step toward hopefully converging HLS and CHUNK packages.
- Add support for encrypted samples.
- Add support for appending from a DataSource.
2015-03-11 15:49:53 +00:00
Oliver Woodman
5d0457152d Remove need for InlinedApi with a few more C constants. 2015-03-11 15:48:12 +00:00
Oliver Woodman
56a509d8e4 Clean up handling of encrypted samples in fmp4/webm extractors.
- The fmp4 extractor was reading from sampleEncryptionData even
  for not-encrypted samples, which I'm pretty sure isn't right.
  Fixed this. For all encrypted content I've seen, this change
  will be a no-op because isEncrypted is always true if there's
  an encryptionBox present.
- Made webm extractor only set cryptoInfo if isEncrypted is true.
- Align variable naming in the two extractors, for clarity.
2015-03-10 21:44:20 +00:00
Oliver Woodman
5e11b9f008 Add DrmInitData (missed from a previous commit). 2015-03-10 19:48:41 +00:00
Oliver Woodman
eba16e55b0 Support delayed loading by Loader. 2015-03-10 19:43:25 +00:00
Oliver Woodman
8c1088559e Generalize getPsshInfo to properly accomodate WebM.
- Rather than returning a map, return a DrmInitData object,
  with mapped and non-mapped implementations.
- Include a suitable mimeType to pass to the MediaDrm. Previously
  we were incorrectly passing the mimeType of the samples,
  where-as MediaDrm expects the container mimeType. Note that
  it doesn't matter whether the mimeType starts with "video" or
  "audio", hence using video mimeTypes everywhere.
2015-03-10 19:42:48 +00:00
Oliver Woodman
eec6458b43 Add handling of Extended Western European character set for CEA-608. 2015-03-10 19:37:47 +00:00
Oliver Woodman
4192ac56af WebM Extractor support for Encrypted content. 2015-03-10 19:36:37 +00:00
Oliver Woodman
1ebaaaebd5 Parse EXT-X-MEDIA tags with SUBTITLES type.
Not yet used by anything.

Issue: #151
2015-03-10 19:07:19 +00:00
Oliver Woodman
be103106cb HLS: Better stream selection at start of playback.
- Correctly handle bandwidth NO_ESTIMATE case.
- Don't consider switching without a previous chunk.
2015-03-10 19:06:07 +00:00
Oliver Woodman
489e99158f Remove getDurationUs from the SampleExtractor interface.
Set the duration on the MediaFormat instead.
2015-03-10 19:04:38 +00:00
Oliver Woodman
f3f9c845cd Add test for DefaultSampleSource. 2015-03-10 19:02:24 +00:00
Oliver Woodman
cdf19430ef Remove TrackInfo from the SampleExtractor interface. 2015-03-10 19:01:11 +00:00
ojw28
5dedf5d930 Merge pull request #340 from google/dev
dev -> dev-webm-vp9-opus
2015-03-06 16:44:18 +00:00
Oliver Woodman
fbd0a57e5c Push tests. 2015-03-06 16:39:00 +00:00
Oliver Woodman
462fea3eaf Correctly resolve Uris according to RFC3986.
Issue: #327
2015-03-05 11:56:00 +00:00
Sergio Moreno Mozota
9208c655d1 fix false positives in sync word detection thanks to @jeoliva 2015-03-04 20:46:22 +01:00
Oliver Woodman
457557b56f Parse ISO8601 timestamps using UTC timezone. 2015-03-04 11:02:43 +00:00
Oliver Woodman
a1d4a5e154 Continue waiting for keys until the codec is flushed.
It was possible for a codec input buffer to be filled with two frames' worth of
data, if seekTo was called after populating a buffer, if waitingForKeys was true
and seeking did not trigger a flush. This caused the CryptoInfo to be configured
as if the input buffer contained a large amount of reconfiguration data as
cleartext.

Move resetting waitingForKeys to flushCodec, so that we don't try to read the
next sample from the source until the first one has been consumed or discarded.
2015-03-03 18:16:22 +00:00
Oliver Woodman
baea1cd12d Add ftyp atom def 2015-03-03 17:17:02 +00:00
Oliver Woodman
b9addf28b2 Formatting tweaks for enhanced ID3 support + support in demo app. 2015-03-03 17:16:13 +00:00
Oliver Woodman
0c6566bce7 Add flags to DataSpec. Support GZIP option.
Also remove uriIsFullStream. It's not doing anything particularly
useful, so I think it makes sense to remove it from the public API;
it's unlikely anyone is using it.

Issue: #329
2015-03-03 17:14:48 +00:00
Oliver Woodman
3868b1d4cb Clean up media playlist blacklisting / fix nits.
It seems fairly safe to assume a playlist wont be blacklisted
within 1ms of the device booting :).
2015-03-03 17:11:21 +00:00
Andrey Udovenko
2bb2e2c44f Merge pull request #324 from jeoliva/id3
Add support for GEOB and PRIV ID3 frames.
2015-03-03 00:23:59 -05:00
J. Oliva
b03c8a713b Mime type string always finish with a single 0 byte
Mime type string always finish with a single 0 byte
2015-02-28 00:47:42 +01:00
J. Oliva
88475e4fee Fixed issue in the calculation of size of objectData
- Fixed issue in the calculation of size of objectData
- Indentation fixes
2015-02-27 22:09:05 +01:00
Sergio Moreno Mozota
2ce938d650 Added MPEG audio support to TsExtractor v.2 2015-02-27 14:29:21 +01:00
J. Oliva
1739af685a Removed indexOfNot method
Removed the unused method indexOfNot
2015-02-27 11:02:37 +01:00
J. Oliva
f33cdd97e6 Fixed an issue when looking for termination string in UTF-16 and UTF-16BE
Modified parse method to take into account different lengths for the
termination character (1 for UTF-8 and ISO-8859-1; 2 for UTF-16 and
UTF-16BE).
2015-02-27 10:57:43 +01:00
J. Oliva
c135bb7a57 Fixes for correctly supporting UTF-16 and UTF-16BE charsets
For fields encoded using UTF-16 or UTF-16BE charsets when looking for
termination character we have to look for two zero consecutive bytes.

Otherwise, as many characters encoded with UTF-16 or UTF-16BE has one
of their 2 bytes set with the value zero, we will be truncating text
fields.
2015-02-26 21:54:29 +01:00
Sergio Moreno Mozota
1545a052f0 Added MPEG audio support to TsExtractor 2015-02-26 19:12:58 +01:00
J. Oliva
ebbd022a52 Added new ID3 frames
- Added support for ID3 frames of types GEOB and PRIV.

 - GEOB type is commonly used by dynamic ads provider to include in the
stream information about the ads to be played.
 - PRIV type is commonly used for time synchronization (example:
synchronizing playback of a live stream and its webvtt captions) and
also by analytics companies to include tracking information in the
stream.

- Added a sample stream from Apple that contains ID3 metadata.
2015-02-26 16:49:05 +01:00
ojw28
ea95db2375 Merge pull request #316 from jeoliva/blackplaylist_management
Better management of blacklisted playlists
2015-02-25 14:33:26 +00:00
Oliver Woodman
07855aadcf Fix build after pull from dev 2015-02-25 14:13:04 +00:00
ojw28
7f70db9765 Merge pull request #321 from google/dev
dev -> dev-webm-vp9-opus
2015-02-25 14:04:48 +00:00
Oliver Woodman
006986cc58 Make NetworkLoadable use an injected HttpDataSource.
Note: I'm fairly confident that NetworkLoadable.Parser implementations
can live without the inputEncoding being specified. But not completely
100%...

Issue: #311
Issue: #56
2015-02-25 13:39:15 +00:00
Oliver Woodman
2ce17b601f Correctly bound search into segment indices.
The return value here assumed that the time being searched for
was beyond the start time of the last segment. This fix also
handles the case where the time is prior to the start of the
first segment.
2015-02-25 13:34:31 +00:00