105 Commits

Author SHA1 Message Date
Oliver Woodman
b46d1fc7cc Bump dev version to 1.3.x 2015-02-16 22:30:28 +00:00
Oliver Woodman
61a86295fd Fix for video-only playbacks transitioning straight to STATE_ENDED.
The complexity around not enabling the video renderer before it
has a valid surface is because MediaCodecTrackRenderer supports
a "discard" mode where it pulls through and discards samples
without a decoder. This mode means that if the demo app were to
enable the renderer before supplying the surface, the renderer
could discard the first few frames prior to getting the surface,
meaning video rendering wouldn't happen until the following sync
frame.

To get a handle on complexity, I think we're better off just removing
support for this mode, which nicely decouples how the demo app
handles surfaces v.s. how it handles enabling/disabling renderers.
2015-02-12 17:02:34 +00:00
Oliver Woodman
7c66b6ed3b HLS optimization #1 (refactor).
This is the start of a sequence of changes to fix the ref'd
github issue. Currently TsExtractor involves multiple memory
copy steps:

DataSource->Ts_BitArray->Pes_BitArray->Sample->SampleHolder

This is inefficient, but more importantly, the copy into
Sample is problematic, because Samples are of dynamically
varying size. The way we end up expanding Sample objects to
be large enough to hold the data being written means that we
end up gradually expanding all Sample objects in the pool
(which wastes memory), and that we generate a lot of GC churn,
particularly when switching to a higher quality which can
trigger all Sample objects to expand.

The fix will be to reduce the copy steps to:

DataSource->TsPacket->SampleHolder

We will track Pes and Sample data with lists of pointers into
TsPackets, rather than actually copying the data. We will
recycle these pointers.

The following steps are approximately how the refactor will
progress:

1. Start reducing use of BitArray. It's going to be way too
complicated to track bit-granularity offsets into multiple packets,
and allow reading across packet boundaries. In practice reads
from Ts packets are all byte aligned except for small sections,
so we'll move over to using ParsableByteArray instead, so we
only need to track byte offsets.

2. Move TsExtractor to use ParsableByteArray except for small
sections where we really need bit-granularity offsets.

3. Do the actual optimization.

Issue: #278
2015-02-10 12:25:13 +00:00
Oliver Woodman
147bbe6d55 Simplify demo application.
- Remove simple variant. Maintaining both simple + full is
  unnecessary effort.
- Remove need to specify content id in Sample definition,
  except where it's actually required (for DRM requests in
  the Widevine GTS samples)
2015-02-06 11:52:14 +00:00
Oliver Woodman
d1fe33cdf8 Add DefaultSampleSource and SampleExtractor interface.
SampleExtractor will initially only be implemented by FrameworkSampleExtractor
which delegates to a MediaExtractor, but eventually it will also be implemented
by additional extractors.

The sample extractor can be used as a source of samples via DefaultSampleSource.
2015-02-02 14:59:30 +00:00
Oliver Woodman
ed0b02d09b Package restructuring to accommodate incoming features (sorry).
This may be painful in terms of applications having to change their
imports. Sorry about that.
2015-01-27 17:00:46 +00:00
ojw28
c6c6f2d83e Merge pull request #266 from google/dev
dev -> dev-hls
2015-01-27 15:10:34 +00:00
Oliver Woodman
ce2f681bd3 Add directories for extensions + additional demos 2015-01-26 16:18:41 +00:00
Oliver Woodman
db5cc21c33 Revert test 2015-01-26 15:18:27 +00:00
Oliver Woodman
fda8f6d35a Test 2015-01-26 15:12:17 +00:00
Oliver Woodman
7b41741db0 Revert test. 2015-01-26 15:01:25 +00:00
Oliver Woodman
76f44eeb13 Test. 2015-01-26 15:01:00 +00:00
Andrey Udovenko
4158ede6e3 Move Closed Captions processing to Eia608TrackRenderer. Use TextRenderer interface for captions. Sort captions based on video frames DTS. Add better control characters and special characters in basic North American character set support. Fixes #156 2015-01-21 11:54:23 -05:00
ojw28
06e9e5d3ea Merge pull request #234 from google/dev
dev -> dev-hls
2015-01-12 17:43:44 +00:00
Oliver Woodman
a879819dd3 Force callers into MediaCodecUtil to catch any exceptions that occur.
Issue: #217
Issue: #228
2015-01-12 17:40:55 +00:00
ojw28
869ecbfcf3 Merge pull request #225 from google/dev
dev -> dev-hls
2015-01-02 17:38:59 +00:00
Oliver Woodman
d906e405a1 Propagate AudioTrack errors. 2015-01-02 17:35:57 +00:00
ojw28
f745be8978 Merge pull request #219 from google/dev
Include gradle plugin 1.0.0
2014-12-23 10:53:58 +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
ea21eba87e Allow re-enabling video track without transition through buffering state. 2014-12-19 12:10:16 +00:00
ojw28
83e80f98fb Merge pull request #207 from google/dev
dev -> dev-hls
2014-12-17 19:25:12 +00:00
Oliver Woodman
ee823a95fc Add launcher icon source. 2014-12-17 19:22:52 +00:00
Oliver Woodman
48540c2ba0 Add icon for demo app. 2014-12-17 19:19:39 +00:00
Oliver Woodman
39c07d570c Adapt HLS on non-adaptive devices.
This just brings HLS treatment in the demo app in line with
DASH and SmoothStreaming.
2014-12-15 15:30:21 +00:00
ojw28
1face38709 Merge pull request #204 from google/dev
dev -> dev-hls
2014-12-15 15:12:21 +00:00
Oliver Woodman
57068a6406 Clear subtitle when text disabled. 2014-12-15 15:06:05 +00:00
Oliver Woodman
57faa49756 Fix crash running ExoPlayer demo on JB. My bad!
- We can't refer to UnsupportedSchemeException outside of the
V18 compat inner classes.
- There were also a few missing return; calls.
2014-12-15 15:05:06 +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
0cb8169323 Merge branch 'dev-hls' into dev 2014-12-12 14:23:43 +00:00
Oliver Woodman
5a3340d638 Add initial AC3 passthrough support. 2014-12-12 14:18:54 +00:00
Oliver Woodman
9d4e177347 Support DASH Live TTML subtitles.
Also add missing file.
2014-12-12 14:12:00 +00:00
Oliver Woodman
ae55b12bd8 Don't require samples to specify whether they're encrypted.
This wasn't actually used for anything other than showing a
toast, which is now generated based on the manifest instead.
2014-12-12 14:05:45 +00:00
Oliver Woodman
099bbe048f Correctly handle audio and video only DASH streams. 2014-12-12 14:02:14 +00:00
Oliver Woodman
3e33fddbc1 Correctly handle audio-only SmoothStreaming streams. 2014-12-12 13:59:45 +00:00
ojw28
035671b722 Merge pull request #198 from google/dev
dev -> dev-hls
2014-12-10 14:08:10 +00:00
Oliver Woodman
86b2209ad0 Bump version to 1.1.0.
Also update gradle files.
2014-12-10 14:04:58 +00:00
ojw28
1344b36da9 Merge pull request #194 from google/dev
dev -> dev-hls
2014-12-08 20:17:17 +00:00
Oliver Woodman
cf80c4d9cb Allow passing of optional parameters in MediaDrm key requests. 2014-12-08 20:12:04 +00:00
Oliver Woodman
3d775c1641 Use C constants + minor cleanup. 2014-12-03 18:50:31 +00:00
Oliver Woodman
511dd9435a Merge branch 'dev' into dev-hls 2014-12-03 18:48:20 +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
40f3172237 HLS: More control over buffering + tweak caption impl.
- Move all three buffering constants to a single class (the
  chunk source).
- Increase the target buffer to 40s for increased robustness
  against temporary network blips.
- Make values configurable via the chunk source constructor.
- Treat captions as a text track for HLS. This allows them to
  be enabled/disabled through the demo app UI.

Issue: #165
2014-11-26 17:21:41 +00:00
Oliver Woodman
8e2801ce9b Improve HLS ABR.
- Add options to switch abruptly at segment boundaries. Third
  parties who guarantee keyframes at the start of segments will
  want this, because it makes switching more efficient and hence
  rebuffering less likely.
- Switch quality faster when performing a splicing switch (when
  we detect that we need to switch variant, we now immediately
  request the same segment as we did last time for the new variant,
  rather than requesting one more segment for the old variant
  before doing this.
2014-11-26 12:08:46 +00:00
Oliver Woodman
410fcdeb87 Merge HLS playlist parsers, make a single parser identify the
playlist type (master or media).

Issue: #155
2014-11-26 12:01:36 +00:00
ojw28
52b95c1f83 Merge pull request #166 from google/dev
dev -> dev-hls
2014-11-21 00:32:12 +00:00
Andrew Shu
9658534b93 demo: compileSdkVersion 21 (was 19) 2014-11-20 15:54:48 -08:00
Andrew Shu
f7589ceee2 gradle: fix demo build.gradle 2014-11-20 12:18:35 -08:00
Oliver Woodman
826c73a16b Fix renderer count.
Issue: #153
2014-11-19 16:06:33 +00:00
Oliver Woodman
4280511a33 Seamless splicing for adaptive HLS. 2014-11-19 10:34:49 +00:00