15163 Commits

Author SHA1 Message Date
Oliver Woodman
759431048d Treat "no chunk to load yet" in the same way as finished.
The key change here is that nextLoadPositionUs is set to -1
if we're not loading but don't have a next chunk ready to
load. This ensures that "missing chunks" in one stream don't
prevent chunks in another stream from loading. This occurs
in SmoothStreaming with TTML subtitles, where the chunks are
sparse.
2014-10-09 17:27:20 +01:00
Oliver Woodman
027d9eefbd Smoother playback #1.
Propagate elapsedRealtimeUs to the video renderer. This allows
the renderer to calculate and adjust for the elapsed time since
the start of the current rendering loop. Typically this is <2ms,
but there situations where it can go higher (normally when the
video renderer ends up processing more than 1 output buffer in
a single loop).

Also made variable naming more consistent throughout the package.
2014-10-09 17:26:01 +01:00
Oliver Woodman
3b4409ae0b Allow relaxation of TTML validity requirement when parsing subtitles. 2014-10-09 17:19:14 +01:00
Oliver Woodman
d4e824634c Throw a checked exception rather than unchecked one.
So that we actually catch it, rather than having the process crash!
2014-10-09 17:17:43 +01:00
Oliver Woodman
43712ce41c Cap AudioTrack latencies at 10 seconds and log a warning if too large. 2014-10-09 17:16:13 +01:00
Oliver Woodman
ac18ac087b Fix missing ->IN_SYNC transition. 2014-10-09 17:13:14 +01:00
Oliver Woodman
be721943c6 Fix incorrect condition. 2014-10-02 12:23:08 +01:00
ojw28
1c92b28b16 Merge pull request #65 from google/dev
Add file missing from "Improve subtitle handling" change.
2014-10-01 22:17:32 +01:00
ojw28
7794df7bd8 Merge pull request #64 from google/dev
Add file missing from "Improve subtitle handling" change.
2014-10-01 22:17:11 +01:00
Oliver Woodman
dec40bcbd3 Add file missing from "Improve subtitle handling" change. 2014-10-01 22:14:44 +01:00
ojw28
f4d3079bba Merge pull request #63 from google/dev
Update dev-l
2014-10-01 22:10:16 +01:00
ojw28
422f23aceb Merge pull request #62 from google/dev
Update dev-hls
2014-10-01 22:09:48 +01:00
Andrey Udovenko
d64036c5ed Add basic HLS support (VOD and Live) with EXT-X-DISCONTINUITY. 2014-10-01 17:03:07 -04:00
ojw28
8c665e3dd2 Improve subtitle handling.
- Move parsing onto a background thread. This is analogous
  to how frame decoding is pushed to MediaCodec, and should
  prevent possible jank when new subtitle samples are parsed.
  This is more important for out-of-band subtitles, which can
  take a second or two to parse fully.

- Add Useful DataSpec method.
2014-10-01 21:27:25 +01:00
ojw28
ea1ab674a4 Strip trailing newline from WebVTT subtitles. 2014-10-01 21:26:12 +01:00
ojw28
9fc963acc6 Add missing param documentation. 2014-10-01 21:25:02 +01:00
ojw28
8ea3f9805c Add class to enable loading of out-of-band subtitle files. 2014-10-01 21:23:50 +01:00
ojw28
e99aaa4d67 Update CaptionStyleCompat for L. 2014-09-29 16:59:08 +01:00
ojw28
9cfe5fcf44 API level 21 enhancements for ExoPlayer playbacks.
- Use native frame release timing in video renderer for
  smoother video playback.
- Avoid unnecessary memory copy steps in audio renderer.
- Use non-blocking AudioTrack API.
2014-09-25 20:29:44 +01:00
ojw28
dd30632aa1 SmoothStreaming Live support.
Issue: #12
2014-09-25 20:16:30 +01:00
ojw28
4adf8f77f4 Tweak stop/disable cycles. 2014-09-25 20:13:40 +01:00
Oliver Woodman
fc230733ae Ignore blockingSendMessage calls after release.
Previously we'd end up blocking forever in this case, which
is the worst thing we could do :). We could either throw an
exception or just print a warning. Printing a warning is more
in line with what other methods do (Handler prints a "sending
message to dead thread" warning).
2014-09-23 11:21:44 +01:00
Oliver Woodman
da125bb5cc Merge DashLiveMpdFetcher logic into generic ManifestFetcher.
This allows ManifestFetcher to both execute the initial
manifest load and be plugged into an ExoPlayer ChunkSource,
where it can be used for repeated manfiest refreshes during
live playback.
2014-09-23 11:17:36 +01:00
Oliver Woodman
f82a331728 Fix StreamingDrmSessionmanager.
Use locally bound variable instead of class variable.
2014-09-23 11:14:16 +01:00
Oliver Woodman
1ed048dba8 Clean up TTML timestamp parsing. 2014-09-23 11:13:54 +01:00
Oliver Woodman
7cb55e23f6 Correctly handle zero length fragmentRun. 2014-09-23 11:13:31 +01:00
Oliver Woodman
4fdd68facf Fix SmoothStreamingManifest to handle large timestamps. 2014-09-23 11:13:09 +01:00
Oliver Woodman
c4e1c3543c Enhance Loader API. 2014-09-19 18:36:12 +01:00
Oliver Woodman
ce5eea72d2 Auto-infer character encoding. 2014-09-19 18:34:46 +01:00
Oliver Woodman
4344675098 Add WebVTT parser. 2014-09-19 18:34:05 +01:00
Oliver Woodman
525b309764 SmoothStreaming - Parse last chunk duration. 2014-09-19 18:33:23 +01:00
Oliver Woodman
f52742b100 Ensure that we try and call release on a renderer
Do this even if stop/disable fails.
2014-09-19 18:32:21 +01:00
Oliver Woodman
4e96caa623 Resolve reference Uris correctly.
Ignore the path of the base Uri if the reference starts with "/".
Spec - http://tools.ietf.org/html/rfc3986#section-5.2.2
2014-09-19 18:31:17 +01:00
Oliver Woodman
bf95592b2c Remove unused import. Tweak documentation. 2014-09-19 18:30:21 +01:00
Oliver Woodman
8378019839 Fix SmoothStreaming where audio FourCC is missing. 2014-09-19 18:29:34 +01:00
Oliver Woodman
b2fc944af1 Remove getLoadedData API from ExoPlayer components.
This API wasn't particularly nice. Best to remove it whilst
hopefully no-one is using it. Leaving the ReadHead abstraction
in place, since it might well prove useful in the future.
2014-09-19 18:26:04 +01:00
Oliver Woodman
c19faa63cd A few tiny bug fixes. 2014-09-11 18:03:11 +01:00
Oliver Woodman
ec90eac301 Support anamorphic video content. 2014-09-11 16:34:35 +01:00
Oliver Woodman
6c3ae7f175 Add SubtitleView and CaptionStyleCompat to ExoPlayer. 2014-09-11 16:30:39 +01:00
Oliver Woodman
e4b35e884a Transition ExoPlayer to use longs for ms timestamps. 2014-09-11 16:26:43 +01:00
Oliver Woodman
d85f4abb2b Support negative media timestamps (if people *really* want to send us them!). 2014-09-11 16:23:50 +01:00
Oliver Woodman
6b2b6ca479 Prevent device provisioning when another device provisioning request is already under process. 2014-09-11 16:23:13 +01:00
Oliver Woodman
bc01a4f48d Relax MediaCodecVideoTrackRenderer.canReconfigureCodec().
Allow non-H264 adaptive decoders.
2014-09-11 16:22:40 +01:00
Oliver Woodman
bf5ee6ff23 1. Parse live attributes from SmoothStreaming manifest.
2. Common interface for manifest parsers.
- This effectively moves the common interface from the Fetcher level
  (i.e. ManifestFetcher) to the Parser level (i.e. ManifestParser).
- The motivation here is to allow the implementation of components that
  can work with a generic ManifestParser implementation.
2014-09-11 16:22:01 +01:00
Oliver Woodman
d4e35358a1 Fix bad assertion. It doesn't hold for TTML subtitle chunks. 2014-09-11 16:09:52 +01:00
ojw28
280ccb1630 Merge pull request #43 from google/dev
Merge 1.0.13 to master
2014-09-08 11:41:56 +01:00
Oliver Woodman
6e9ba9ba47 Bump version to 1.0.13. 2014-09-08 11:38:20 +01:00
Oliver Woodman
ddd2d004f0 Make SmoothStreaming manifest more robust.
- Skips unrecognized elements rather than crashing.
- FourCC treated as required for video and optional elsewhere,
  as per the SmoothStreaming spec.
- Only parse initData text when we're actually in the ProtectionHeader element
2014-09-08 11:35:39 +01:00
Oliver Woodman
181eceaf4b Fixed MPD date/time parsing issue. 2014-09-08 11:34:06 +01:00
Oliver Woodman
52a300f1fd Merge fMP4/H264 and WebM/VP9 DASH implementations. 2014-09-08 11:33:12 +01:00