186 Commits

Author SHA1 Message Date
Oliver Woodman
e8d2c00cf7 Add trace to chunk fetches. 2015-01-12 17:37:07 +00:00
Oliver Woodman
f65a093596 AudioTrack enhancements.
- Workaround issue where video may freeze whilst audio continues
  on some devices that have entered bad states.
- Fix wrap-around for playbacks lasting more than 27 hours.
2015-01-12 17:35:43 +00:00
Oliver Woodman
224fc2eef8 Omit range header if the range is 0-.
Apparently some servers don't like it, and in general it's
unnecessary to set the header for this case.
2015-01-12 17:34:00 +00:00
Oliver Woodman
1613c9c7a8 Refine logic for determining AudioTrack size.
- Target 4x the minimum specified by the framework.
- Impose a minimum duration (250ms).
- Impose a maximum duration (750ms, or the minimum
  specified by the framework if that's larger).

I've removed the ability to specify the multiplication
factor, since the underlying implementation is getting more
complicated, and we should really be able to figure this out
internally.
2015-01-06 20:13:50 +00:00
Oliver Woodman
d906e405a1 Propagate AudioTrack errors. 2015-01-02 17:35:57 +00:00
ojw28
a96a7fe782 Merge pull request #218 from google/master
Include gradle plugin 1.0.0
2014-12-23 10:53:29 +00:00
Sebastian Roth
e4ea9c1056 Include gradle plugin 1.0.0 2014-12-22 10:34:46 +08:00
Oliver Woodman
4c0554d0d7 Start adding support for more formats in WebM container. 2014-12-20 11:59:19 +00:00
Oliver Woodman
ed6fcb638e Fix reading single byte from DataSourceInputStream. 2014-12-20 11:57:49 +00:00
Oliver Woodman
99b438e4c4 Don't request that the server use DEFLATE compression.
If the server actually gives us a DEFLATE response, we
fail to handle it properly!
2014-12-19 12:06:00 +00:00
Oliver Woodman
4d6c9f27c2 Minor cleanup of AudioTrack. 2014-12-19 12:05:03 +00:00
Oliver Woodman
3a9d08edb5 Misc performance/correctness tweaks. 2014-12-17 19:18:33 +00:00
Oliver Woodman
f1fe109bfa Fix AC3Passthrough
- Handle read returning NOTHING_READ for AC-3 streams.
- Remove extra checks for the audio track being initialized.
- Call isInitialized() instead of checking audioTrack != null.
2014-12-17 19:16:02 +00:00
Oliver Woodman
11eb1c222b Identify AC-3 tracks by codecs="ac-3", not the MIME type. 2014-12-15 15:04:38 +00:00
Oliver Woodman
595147de9b Enforce sliding window of available segments for DASH DVB. 2014-12-15 15:03:10 +00:00
Oliver Woodman
978a4d857a Handle getting the audio track's position before the first AC-3 buffer.
ac3Bitrate is set only after the first buffer is handled, which meant that
getting the playback position would cause a divide by zero before then.

When playing back AC-3 content, the ac3Bitrate will always be set after the
first buffer is handled, so return a 0 position if it is not set.
2014-12-15 15:02:29 +00:00
Oliver Woodman
5a3340d638 Add initial AC3 passthrough support. 2014-12-12 14:18:54 +00:00
Oliver Woodman
81bf68b1cb Minor doc fixes. 2014-12-12 14:13:58 +00:00
Oliver Woodman
9d4e177347 Support DASH Live TTML subtitles.
Also add missing file.
2014-12-12 14:12:00 +00:00
Oliver Woodman
bb024fda08 Partial support for DASH DVB Live streams.
- Adds support for dash manifests that define SegmentTemplate
  but no SegmentTimeline.
- Assumes that the device clock is correct when calculating which
  segments to load. The final step here is to use the Utc timing
  element in the DASH manifest to obtain an accurate client clock.
- Doesn't yet enforce that the client shouldn't load segments that
  are in the future or behind the live window.
2014-12-12 14:07:48 +00:00
Oliver Woodman
f15e3973e0 Fix discovery of secure decoders on some L devices. 2014-12-10 14:05:51 +00:00
Oliver Woodman
86b2209ad0 Bump version to 1.1.0.
Also update gradle files.
2014-12-10 14:04:58 +00:00
Oliver Woodman
c4b2a01212 Allow out-of-band pssh data for DASH playbacks.
This fixes the referenced issue, except that the MPD parser
needs to actually parse out UUID and binary data for schemes
that we wish to support. Alternatively, it's easy to applications
to do this themselves by extending the parser and overriding
the parseContentProtection and buildContentProtection methods.

Github Issue: #119
2014-12-08 20:15:06 +00:00
Oliver Woodman
2f0a1779e2 Stop piping PSSH information through the extractor.
It's cleaner to not inject data into the extractor only
so that it can be read out as though it were parsed from
the stream. This is also an incremental step towards
fixing Github issue #119.
2014-12-08 20:13:52 +00:00
Oliver Woodman
cf80c4d9cb Allow passing of optional parameters in MediaDrm key requests. 2014-12-08 20:12:04 +00:00
Oliver Woodman
01151c9c65 Don't append base uri if chunkUrl is absolute. 2014-12-08 20:10:52 +00:00
Oliver Woodman
c8e5988e6d Fix handling of unknown duration in FMP4.
Issue: 186
2014-12-05 17:53:24 +00:00
Oliver Woodman
6f1832fb66 Support negative-fronted xs:duration values.
Issue: 186
2014-12-05 17:52:30 +00:00
Oliver Woodman
fc8c08d240 Fix #187 2014-12-05 17:51:52 +00:00
Oliver Woodman
4efc0abde9 Implement DASH Live.
Note: This adds support for the majority of DASH live streams,
however we do not yet correctly support live streams that rely
on UtcTimingElements in their manifests.

Issue: #52
2014-12-03 18:45:13 +00:00
Oliver Woodman
6652f864bd Audio improvements. 2014-12-03 18:33:36 +00:00
Oliver Woodman
2e1f9897e7 Fixed issue in which setting a representation duration to unknown wasn't handled correctly. 2014-12-03 18:30:56 +00:00
Oliver Woodman
dc644ae86d Make single MICROS_PER_SECOND constant + use it everywhere. 2014-12-03 18:30:15 +00:00
Oliver Woodman
656fc0b0ca Make sure SmoothStreaming manifest durations are -1 for Live.
Plus start to properly document the SmoothStreaming package.
Note that where the documentation is a little vague, this is
because the original SmoothStreaming documentation is equally
vague!
2014-12-03 18:26:48 +00:00
Oliver Woodman
165562d880 Add VSYNC aligning smooth frame release helper. 2014-11-27 18:15:16 +00:00
Oliver Woodman
2969bba60f Fix timestamp rollover issue for DASH live.
The timestamp scaling in SegmentBase.getSegmentTimeUs was
overflowing for some streams. Apply a similar trick to that
applied in the SmoothStreaming case to fix it.
2014-11-27 18:14:19 +00:00
Oliver Woodman
c534263032 Enhance parsing of xs:duration to support year/month/day. 2014-11-27 18:12:46 +00:00
Oliver Woodman
1a557a06c1 Support SmoothStreaming repeated chunk tags. 2014-11-27 18:11:43 +00:00
Oliver Woodman
ab00a4da03 Allow non-strict webvtt parsing. 2014-11-26 11:23:15 +00:00
Oliver Woodman
7dfebc2e11 Make default retry count public. 2014-11-26 11:22:54 +00:00
Oliver Woodman
69c7cb09c8 Correctly handle redirection when requesting manifests. 2014-11-21 17:54:55 +00:00
ojw28
8c980c8892 Merge pull request #164 from talklittle/dev
gradle plugin 0.14.4 fixes
2014-11-21 00:30:48 +00:00
Andrew Shu
66c48a1151 gradle: compileSdkVersion 21
fixes broken import statements
2014-11-20 12:18:54 -08:00
Andrew Shu
0ce3e6e8a6 fix compatibility with android gradle plugin 0.14 2014-11-20 12:05:45 -08:00
Oliver Woodman
2798b430ca Delete spurious file. 2014-11-20 12:23:29 +00:00
Oliver Woodman
33c37ebc82 Fix AudioTrack position reporting whilst paused.
Issue: #158
2014-11-20 11:04:38 +00:00
Oliver Woodman
2a832fd3c4 Minor stylistic tweaks. 2014-11-20 11:03:47 +00:00
ojw28
d506d7660d Merge pull request #147 from jonasl/dev-gc
MediaCodecTrackRenderer: Avoid excessive garbage generation
2014-11-19 16:08:38 +00:00
Oliver Woodman
127bcd18c3 Bring internal/external branches closer.
- Unredact internal error ids.
- Move images.
2014-11-19 15:58:26 +00:00
Jonas Larsson
255c3b27f6 MediaCodecTrackRenderer: Avoid excessive garbage generation
Looking up a long in a HashSet<Long> auto boxes the long and leaves
it for the GC. As decodeOnly is relatively infrequent it's much
better to do a simple linear search in a List<Long>. That way
we can avoid boxing every incoming time stamp value. In the general
case this will be linear searching in an empty list, a very fast
operation.

Signed-off-by: Jonas Larsson <jonas@hallerud.se>
2014-11-18 15:41:16 -08:00