743 Commits

Author SHA1 Message Date
Oliver Woodman
f637fde962 Allow overriding of codec buffer dequeue block time. 2015-04-22 16:17:36 +01:00
Oliver Woodman
1a9bf018a4 Add frame rate to Format for use in format selection (when known). 2015-04-22 16:16:42 +01:00
Oliver Woodman
a7e2b719c5 Call init() on the extractor only once for each chunk.
On retrying loading a chunk, the state of the extractor was reset due to a call
to seek(). Prevent this call by only calling init() if no bytes were loaded.

Also make the DefaultExtractorInput use the loading position not the original
stream position so that its getPosition() method returns offsets relative to
the start of the stream, which fixes a bug where the chunk index offsets would
be relative to the wrong position if there was a retry while loading the chunk.
2015-04-22 16:14:46 +01:00
Oliver Woodman
21e69f3154 Add more loading info (including chunk loading times) to
BaseChunkSampleSourceEventListener.onLoadCompleted.
2015-04-22 16:13:19 +01:00
Oliver Woodman
3a1325b0af Make TsExtractor consistent with AdtsExtractor. 2015-04-22 16:11:23 +01:00
Nati Dykstein
647d9bedb8 fix for issue #403 2015-04-22 14:51:05 +03:00
Oliver Woodman
55e08ff712 Avoid time discontinuity when retrying a live stream.
Issue: #227
Issue: #389
2015-04-17 20:12:11 +01:00
Oliver Woodman
faf0e2c147 Improve retry logic.
1. Reset retry count to 0 if a Loadable makes progress.
2. Handle resume correctly in the case of live streams.

Issue: #227
Issue: #389
2015-04-17 20:10:31 +01:00
Oliver Woodman
4c94a846d5 webm_extractor: Fix issue in vorbis extraction.
Vorbis decoder in android MediaCodec [1] expects the last 4 bytes of the sample to be the number of samples in the current page. This definition holds good only for Ogg and is irrelevant for WebM. So we always set this to -1 (the decoder will ignore this value if we set it to -1). The android platform media extractor [2] does the same.
2015-04-17 20:09:45 +01:00
Oliver Woodman
b1aac839e6 Don't feed AC-3 input when the audio track is paused.
This works around an issue the audio track continues to play audio data written
after calling AudioTrack.pause(), which breaks rebuffering behavior (as video
can never catch up if audio continues to be consumed, in some circumstances).

Also don't increment the timestamp wrap count if the track is paused, to work
around an issue where the playback head position jumps back to zero after the
AudioTrack position jumps back to zero.
2015-04-17 20:08:54 +01:00
Oliver Woodman
c4eee71fa2 Support AAC without platform MediaExtractor.
Issue: #231
Issue: #227
2015-04-17 20:07:04 +01:00
Oliver Woodman
fb97fca04e Handle dynamic appearance/disappearance of ID3 track in HLS. 2015-04-17 20:04:52 +01:00
Oliver Woodman
5f74226d67 Make the audio track session workaround flag non-final. 2015-04-17 20:04:18 +01:00
Oliver Woodman
508e13e0bd Clean up + optimize ParsableByteArray. 2015-04-17 20:03:24 +01:00
Oliver Woodman
9092fad8e8 Fix subtitles. 2015-04-17 20:02:20 +01:00
Oliver Woodman
0523717841 Fix crash. 2015-04-17 20:01:59 +01:00
Oliver Woodman
e84c852169 Select E-AC-3 in preference to AC-3, and remove other tracks. 2015-04-17 20:01:06 +01:00
Oliver Woodman
3f1638de95 Use ENCODING_PCM_16BIT for keepSessionIdAudioTrack.
ENCODING_PCM_8BIT support is not required.
2015-04-17 19:59:58 +01:00
Oliver Woodman
e4e6a1caf0 Switch from AudioFormat.ENCODING_DEFAULT to .ENCODING_PCM_16BIT.
AudioTrack.getMinBufferSize does not handle ENCODING_DEFAULT so
switch back to ENCODING_PCM_16BIT.
2015-04-17 19:59:03 +01:00
Oliver Woodman
c3bf60b1a9 Add JavaDoc to remove lint warning about unused variable. 2015-04-14 16:45:46 +01:00
Oliver Woodman
7cf6aa86d2 Properly document in code how to pass CustomData to PlayReady DRM.
Issue: #339
2015-04-14 16:44:01 +01:00
Oliver Woodman
d9b3582baa Use OMX.google.raw.decoder for passthrough playback.
The OMX component needs to be configured with a format that has a
MIME type of audio/raw. Remove Ac3PassthroughAudioTrackRenderer,
which is no longer used.
2015-04-14 16:42:24 +01:00
Oliver Woodman
ed1dbddc75 Trim memory when disabling ExtractorSampleSource.
This prevents memory leakage even in the case where the app
is still holding a reference (direct or indirect) to the
Allocator.
2015-04-13 19:36:16 +01:00
Oliver Woodman
0d69a2eae8 Implement event reporting from HlsSampleSource.
Issue: #275
2015-04-13 19:03:04 +01:00
Oliver Woodman
e21f7801b5 Major surgery to move all playback modes to the new Extractor model. 2015-04-13 18:57:31 +01:00
Sergio Moreno Mozota
e5acc5a2c8 resync with Extractor changes 2015-04-13 16:58:19 +02:00
Sergio Moreno Mozota
da7ae2a925 Merge remote-tracking branch 'upstream/dev' into dev 2015-04-13 15:56:43 +02:00
Oliver Woodman
265adf9a8f Move chunk trigger constants into Chunk. 2015-04-11 02:09:40 +01:00
Oliver Woodman
a17ffa66f2 Delete test for the removed source package. 2015-04-11 02:05:53 +01:00
Oliver Woodman
ad56490bde Add ability to discard from write-side of DefaultTrackOutput. 2015-04-11 02:03:43 +01:00
Oliver Woodman
4c8f9a8c6f Remove source package, and restore original FrameworkSampleSource. 2015-04-11 02:00:47 +01:00
Oliver Woodman
587edf8e2b Add new style mp4/fmp4 extractors. 2015-04-11 01:58:34 +01:00
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