19093 Commits

Author SHA1 Message Date
Oliver Woodman
f002e6a76e Add test for DefaultExtractorInput + trivial Extractor sanity checks. 2015-04-11 01:42:48 +01:00
Oliver Woodman
7d8141e419 Add new style mp3 extractor. 2015-04-11 01:42:03 +01:00
Oliver Woodman
4a1fed9e86 Add new style WebM extractor. 2015-04-11 01:30:11 +01:00
Oliver Woodman
6c5af23230 Minor tweaks to HlsSampleSource. 2015-04-11 01:12:40 +01:00
Oliver Woodman
da656e6f26 More steps towards unified extractors. 2015-04-11 01:07:41 +01:00
Oliver Woodman
53a47524a1 Support non-square pixels in HLS.
Github issue: #375
2015-04-11 00:59:00 +01:00
Oliver Woodman
37d12ff14a Steps toward generalizing the Extractor interface for all extractors. 2015-04-11 00:55:38 +01:00
Oliver Woodman
3a551c73ba Move hls.parser to a new extractor package.
This package will house all extractors, which will be unified
to implement a single Extractor interface.
2015-04-11 00:27:24 +01:00
Oliver Woodman
fc176b9cbe Fix TsExtractor bug.
The limit on the ts packet buffer can be reduced during processing
if it's discovered to have padding. Hence we need to reset it back
to the ts packet size before processing each packet.
2015-04-10 23:41:45 +01:00
Oliver Woodman
61443b2f12 Relocate content of Mp4Util to more sensible locations.
- Atom related stuff in Mp4Util is moved to Atom.
- Remainder of Mp4Util is renamed to H264Util.
2015-04-10 23:31:03 +01:00
Oliver Woodman
fea2140d57 Add ability to query size/rate support in MediaCodecUtil. 2015-04-10 23:15:52 +01:00
Oliver Woodman
38efb1fc3f Clean up Aes128DataSource. 2015-04-10 23:12:47 +01:00
Oliver Woodman
6bf52dd69c Report decoder initialization information out of track renderer. 2015-04-10 23:06:57 +01:00
Oliver Woodman
a17123c49b Clean up codec reinitialization. 2015-04-10 23:03:50 +01:00
Oliver Woodman
380c427fb3 Make MediaCodecVideoTrackRenderer easier to extend. 2015-04-10 23:01:09 +01:00
Oliver Woodman
a085d2f29b Add END_OF_INPUT constant + start using it. 2015-04-10 23:00:23 +01:00
Oliver Woodman
608d685b2c Add missing header. 2015-04-10 22:56:13 +01:00
Oliver Woodman
d745384d99 Change decodeOnly to be a sample flag. 2015-04-10 22:55:12 +01:00
Oliver Woodman
70b0e55a8b Remove deprecated bandwidth parameter. 2015-04-10 22:39:15 +01:00
Oliver Woodman
c901025643 Don't attempt license request when keys expire.
- Keys should not expire during normal playbacks of correctly configured content.
- Attempting to refresh on expiration causes a race condition, that may result
  in either failure or brief re-buffer, for the 30s license test video.
- This change provides deterministic behavior, which is to always fail.
2015-04-10 22:38:06 +01:00
Oliver Woodman
d108c13535 Remove deprecated method. 2015-04-10 22:36:07 +01:00
Oliver Woodman
4dc8e8f951 Add audio and m3u8 mime types. 2015-04-10 22:35:03 +01:00
Oliver Woodman
ecaf329b0d Improve ParsableByteArray performance + enhance API. 2015-04-10 22:34:06 +01:00
Oliver Woodman
ed658b8e8d Attempt to guard against ExoCache corruption. 2015-04-10 22:33:10 +01:00
Oliver Woodman
cfcbca6c95 Make FileDataSource throw EOFException. 2015-04-10 22:29:51 +01:00
Oliver Woodman
362dc5f382 Don't fail if server doesn't support partial requests.
Some servers, probably edge cache machines that exclusively serve
chunked media, don't support partial requests. Which is kind of
vaguely reasonable for that particular case. This change modifies
DefaultHttpDataSource to correctly handle this case, by manually
skipping data up to the requested position (and making sure not to
read more data than the requested length).
2015-04-10 22:28:20 +01:00
Oliver Woodman
1a198b8a30 Minor cleanup (remove deprecated method, fix javadoc) 2015-04-10 22:24:39 +01:00
ojw28
9183525b5e Merge pull request #221 from martinbonnin/better_input_format_change_for_non_adaptive_codecs
better handling of input format change for non-adaptive codecs
2015-04-01 13:56:15 +01:00
ojw28
fcc2138e9f Merge pull request #374 from google/dev
dev -> dev-webm-vp9-opus
2015-03-31 11:29:42 +01:00
Oliver Woodman
acd1b9acff Enable ContentProtect elements at the Representation level 2015-03-31 11:28:51 +01:00
Oliver Woodman
5a5935cb72 Fix HLS playlist parsing of boolean attributes.
The regex included quotation marks like X="YES", but the manifests
don't actually contain them, for examples X=YES.
2015-03-30 15:56:39 +01:00
Oliver Woodman
85be2aed0a Add ability to release via Bintray. 2015-03-25 23:50:27 +00:00
Oliver Woodman
d27b6de119 Release AudioTrack when done. 2015-03-25 12:13:53 +00:00
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