Commit graph

5911 commits

Author SHA1 Message Date
Jonas Larsson
467f19568b TsExtractor: Account for frame cropping when parsing SPS
Passing uncropped dimensions to certain decoders will make them
output frames without proper cropping set.

Signed-off-by: Jonas Larsson <jonas@hallerud.se>
2014-11-18 08:53:54 -08:00
Oliver Woodman
360d452dad Avoid seeking if seekPosition==currentPosition 2014-11-14 18:32:22 +00:00
Oliver Woodman
eb1210d410 Make sampleQueue thread safe 2014-11-14 18:31:55 +00:00
Oliver Woodman
6b123590ca Correctly propagate errors 2014-11-14 16:31:47 +00:00
Oliver Woodman
643f33f7e9 Properly handle different profiles (skipping SPS data as needed). 2014-11-14 16:31:23 +00:00
Oliver Woodman
fd51901620 Big HLS update. Add start of adaptive support, but leave disabled for now. 2014-11-13 16:32:10 +00:00
Oliver Woodman
6c6ba900a9 Fix the build. 2014-11-13 16:23:44 +00:00
ojw28
0005f41fe9 Merge pull request #138 from google/dev
dev -> dev-hls
2014-11-13 16:20:13 +00:00
Oliver Woodman
d14e11c507 Additional extraction for AC3 2014-11-13 16:13:55 +00:00
Oliver Woodman
456d53e178 Minor cleanup. 2014-11-13 16:13:02 +00:00
Oliver Woodman
2d97d31a9e Add ability to make fine-grained frame release timestamp adjustments 2014-11-13 16:11:52 +00:00
Oliver Woodman
f1c646b793 Add diagnostic info to decoder exceptions + minor cleanup 2014-11-13 16:10:21 +00:00
Oliver Woodman
59688397fa Suppress deprecation warnings 2014-11-13 16:08:43 +00:00
Oliver Woodman
bc871c94a6 Add bitrate to MediaFormat 2014-11-13 16:08:16 +00:00
Oliver Woodman
4460b7c626 Fix typo 2014-11-13 16:06:49 +00:00
ojw28
7b5c4d705f Merge pull request #131 from google/dev-l
Merge dev-l into dev-hls, now L SDK is released.
2014-11-10 08:49:20 +00:00
ojw28
5abb413f4e Merge pull request #127 from google/dev
dev -> dev-l
2014-11-06 19:30:47 +00:00
ojw28
e9dacb08df Merge pull request #126 from google/dev
dev -> dev-hls
2014-11-06 19:30:24 +00:00
Oliver Woodman
1653e81687 Add configurable retry count to ChunkSampleSource 2014-11-06 19:28:21 +00:00
Oliver Woodman
eccf8d7924 Minor Webvtt parsing tweaks 2014-11-06 19:27:28 +00:00
Oliver Woodman
d2e73dd566 Add brackets to make expression clearer. 2014-11-06 19:26:41 +00:00
Oliver Woodman
aeb17e6a88 HLS improvements + steps towards ABR. 2014-11-06 19:22:14 +00:00
Oliver Woodman
9790430a62 Trim whitespace from codecs 2014-11-06 19:17:22 +00:00
Oliver Woodman
55b4272a46 Pro-actively parse the final PES packet. 2014-11-05 17:25:02 +00:00
ojw28
e6c7e29647 Merge pull request #121 from google/dev
dev -> dev-l
2014-11-05 17:15:39 +00:00
Andrey Udovenko
71f918c01b ID3 refactoring to match apple's player behavior #67 2014-11-05 11:54:45 -05:00
Andrey Udovenko
c781fcd13d Merge pull request #117 from google/dev
Add cookies support and use the same UserAgent in ManifestFetcher and in...
2014-11-04 14:20:36 -05:00
Andrey Udovenko
712e46085d Add cookies support and use the same UserAgent in ManifestFetcher and in HttpDataSource. 2014-11-04 14:06:37 -05:00
Andrey Udovenko
a76addba5d Add AES-128 encryption support for HLS #69 and parsing logic for CODECS and RESOLUTION attributes. 2014-11-04 13:38:22 -05:00
ojw28
059835e357 Merge pull request #113 from google/dev
dev -> dev-l
2014-11-03 12:21:45 +00:00
ojw28
f4a5cd637f Merge pull request #112 from google/dev
dev -> dev-hls
2014-11-03 12:21:04 +00:00
Oliver Woodman
19eb7795fe Fix default startNumber.
Issue: #108
2014-11-03 12:01:53 +00:00
Oliver Woodman
4c146ee28d Neaten TsExtractor a little.
- Add a readBit method to BitsArray for reading a boolean flag.
- Make things accessed from inner classes package visibility to avoid
  the compiler generating thunk methods.
2014-10-28 19:48:54 +00:00
ojw28
d71b9b7ca1 Merge pull request #100 from google/dev
dev -> dev-l
2014-10-28 19:30:00 +00:00
ojw28
b6bbf50c0e Merge pull request #99 from google/dev
dev -> dev-hls
2014-10-28 19:29:29 +00:00
Oliver Woodman
2422912be8 Refactor HLS support.
- The HlsSampleSource now owns the extractor. TsChunk is more or less dumb.
  The previous model was weird, because you'd end up "reading" samples from
  TsChunk objects that were actually parsed from the previous chunk (due to
  the way the extractor was shared and maintained internal queues).
- Split out consuming and reading in the extractor.
- Make it so we consume 5s ahead. This is a window we allow for uneven
  interleaving, whilst preventing huge read-ahead (e.g. in the case of sparse
  ID3 samples).
- Avoid flushing the extractor for a discontinuity until it has been fully
  drained of previously parsed samples. This avoids skipping media shortly
  before discontinuities.
- Also made start-up faster by avoiding double-loading the first segment.

Issue: #3
2014-10-28 19:25:44 +00:00
Oliver Woodman
78f34cf480 Add svg source for diagrams. 2014-10-28 18:22:26 +00:00
Oliver Woodman
11cbe2819e Clean up project files. 2014-10-28 17:55:21 +00:00
Andrey Udovenko
d3a05c9a44 Add ID3 Timed Metadata support for HLS #67 2014-10-28 13:24:12 -04:00
ojw28
dd2921f9b2 Merge pull request #97 from google/dev
dev
2014-10-28 14:19:18 +00:00
ojw28
3bee259de9 Merge pull request #96 from google/dev
dev -> dev-hls
2014-10-28 14:18:56 +00:00
Oliver Woodman
c34f7368ae Minor tweak to UriDataSource. 2014-10-28 14:12:55 +00:00
Oliver Woodman
5ba3f1eea3 Fix build. 2014-10-28 10:08:49 +00:00
ojw28
119eb6712a Merge pull request #93 from google/dev
Dev -> Dev-hls
2014-10-27 11:06:31 +00:00
ojw28
1057a45812 Merge pull request #92 from google/dev
Dev -> Dev-l
2014-10-27 11:06:10 +00:00
Oliver Woodman
192cdc66a2 Ignore secure decoders. They shouldn't be explicitly listed. 2014-10-27 11:00:04 +00:00
Oliver Woodman
067422a491 Cleanup TextTrackRenderer. 2014-10-27 10:59:37 +00:00
Oliver Woodman
5f6b197355 Allow direct and indirect buffer replacement.
Also tweak ManifestFetcher.
2014-10-27 10:58:43 +00:00
Oliver Woodman
ae6e082d2f Add a UriDataSource for reading from file or network. 2014-10-27 10:54:51 +00:00
Oliver Woodman
6aeb989327 Add some MimeTypes that will be useful in the future. 2014-10-27 10:54:20 +00:00
Oliver Woodman
f859205438 Let FileDataSource report to a TransferListener. 2014-10-27 10:52:45 +00:00
Oliver Woodman
b8415dba59 Parse all UUID boxes, not just the first one. 2014-10-27 10:51:45 +00:00
ojw28
4c348d8aa6 Merge pull request #83 from google/dev
Pull dev -> dev-l
2014-10-20 16:59:46 +01:00
ojw28
c2c7a75681 Merge pull request #82 from google/dev
Pull dev -> dev-hls
2014-10-20 16:59:18 +01:00
Oliver Woodman
1f0d411886 Make mpd parser more ameanable for extension. 2014-10-20 16:55:38 +01:00
Oliver Woodman
5a87133219 Add case for 7.1 audio. 2014-10-20 16:54:51 +01:00
Oliver Woodman
5f0be427a4 Update HlsSampleSource + correctly propagate error from prepare.
Issue: #81
2014-10-20 16:53:43 +01:00
Oliver Woodman
4853611803 Remove additional "/" from merged URLs.
Issue: #81
2014-10-20 16:45:56 +01:00
Oliver Woodman
60d162df18 Fix overflow when comparing HLS Segments for long videos. 2014-10-15 20:42:26 +01:00
Oliver Woodman
fcd9ec6c23 Tweak audio renderer to match dev/dev-hls. 2014-10-09 21:55:10 +01:00
Oliver Woodman
fd3016cd13 Use setVolume on API level 21 devices, plus minor naming cleanup. 2014-10-09 17:54:30 +01:00
ojw28
d2e480f01b Merge pull request #75 from google/dev
Merge dev -> dev-hls
2014-10-09 17:31:36 +01:00
ojw28
989bbef24e Merge pull request #74 from google/dev
Merge dev -> dev-l
2014-10-09 17:31:05 +01:00
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
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
Oliver Woodman
1ddd5c6e16 Parse some DASH manifest components for DVB LIVE. 2014-09-08 11:30:21 +01:00
Oliver Woodman
5d35698d8f Make MediaCodecTrackRenderer discard non-keyframes after seek.
This means that after a decoder flush, the renderer will avoid
feeding non-keyframes into the decoder until it has received and
fed the first keyframe. The decoder has no way of correctly
decoding non-keyframes that arrive before a keyframe.
2014-09-08 11:30:20 +01:00
Oliver Woodman
5b2f0566a7 Fix potential cause of infinite-spinner-without-failure.
It looks like for the case of self-contained media segments,
it's possible to get stuck without failure in the case that
the load fails having loaded less than the length of the init
data.
2014-09-08 11:30:19 +01:00
Oliver Woodman
92e3208121 Don't try and read a trackEncryptionBox unless we actually have a saiz atom to parse.
Issue: #35
2014-09-08 11:30:18 +01:00
Oliver Woodman
14048b013a Add disclaimer to stop people getting confused by the minSdkVersion.
Issue: #31
2014-09-08 11:30:17 +01:00
Oliver Woodman
d465ab7029 Call FormatHolder what it really is.
Since we have a Format class as well, it's very confusing that
FormatHolder actually holds a MediaFormat. I think it's quite
likely that Format will need promoting into the root package as
part of the HLS work, which will make this even more confusing
(although it is possible that for HLS we'll define yet another
Format class, if it turns out we need significantly different
fields).

Note - I deliberately avoided renaming the formatHolder
args/params, because they're not particularly ambiguous and
because it introduces some ugly line breaks.
2014-09-08 11:30:16 +01:00
Oliver Woodman
3b25928a13 Make audio renderer more robust to bad getTimestamp values. 2014-09-08 11:30:15 +01:00
Oliver Woodman
a7b88cd6a9 Tighten isReady() up again.
- Bring back requirement for the first video frame to be rendered
  before isReady returns true, *unless* we've deduced that the
  upstream source is serving multiple renderers.
- Ditto for requiring that the audio track has some buffered data.
2014-09-08 11:30:14 +01:00
Oliver Woodman
98a7573812 Minor changes to fix Javadoc.
- cache ref didn't work because it referred to a private variable
  (which isn't documented) from a public interface definition
  (which is). Meaning the Javadoc generator was trying to link
  to documentation that didn't exist.
2014-09-08 11:30:12 +01:00
Oliver Woodman
5b9c92cb83 Bump version to 1.0.12. 2014-08-14 15:45:33 +01:00
Oliver Woodman
4e7b333aee Support chunked requests. 2014-08-14 15:44:09 +01:00
Oliver Woodman
af6e144adc Fix bug introduced supporting self-contained media chunks.
The equals check we perform needs to ignore the max dimensions.
This tended to work in practice because formats would be the
same object, but in the case where different format objects
are used, things can break.
2014-08-12 21:35:13 +01:00
Oliver Woodman
5cfa9adacc Add missing C file. 2014-08-12 14:16:28 +01:00
Oliver Woodman
58e9e61688 Remove unnecessary SuppressWarning annotations. 2014-08-12 14:13:43 +01:00
Oliver Woodman
e0a29c841e Don't release AudioTrack unless we have to. 2014-08-12 14:12:05 +01:00
Oliver Woodman
4a745b1cd8 Optimize out quite a few allocations in FragmentedMp4Parser. 2014-08-12 13:55:38 +01:00
Oliver Woodman
005e98fc34 Simplify parsing of encryption data + support SENC boxes.
Issue: #4
2014-08-11 19:42:04 +01:00
Oliver Woodman
8ec8840261 Minor cleanup.
- Add constants class. Currently housing a single lonely variable,
which is used generally throughout the library, and so no longer
nicely fits into a specific class.

- Rename a few other constants to add clear units.

- Made minor tweak to ExoPlayer documentation.
2014-08-11 18:38:39 +01:00
Oliver Woodman
25a532656c Optimize some CodecCounter inefficiency.
1. Use ints rather than longs.
2. Remove some counters that dont seem hugely useful.
3. Replace use of volatile with explicit method calls that
   cause a memory barrier. This is a lot more efficient than
   using volatile because it can be invoked only once per
   doSomeWork.
2014-08-11 17:42:08 +01:00
Oliver Woodman
9a124120ff Changes around renderer readiness and extraction.
- Make MediaCodecTrackRenderer.isReady more permissive.
  This largely fixes #21
- Bring WebmExtractor closer to FragmentedMp4Extractor.
  The two will probably be placed under a common interface
  fairly soon, which will allow significant code
  deduplication.
2014-08-01 15:56:26 +01:00
Oliver Woodman
41ff1e4071 Add CacheDataSource.Listener. 2014-08-01 15:54:32 +01:00
Oliver Woodman
b1992c3848 Don't call doSomeWork if we're preparing 2014-08-01 15:53:49 +01:00
Oliver Woodman
2a82ff353b Make DefaultWebmExtractor handle cues and format independently.
* Remove concept of being prepared by simply reporting if format
and/or cues are known.
* Allow replacement of format and/or cues later in the stream.
* Initialization and index segments can be parsed independently
of one another but must be in order due to internal WebM dependencies.
* Let seekTo() work even when cues are unknown.
2014-08-01 15:53:08 +01:00
Oliver Woodman
32464e6de4 Fix integer variant of library version. 2014-08-01 15:51:48 +01:00
Oliver Woodman
ad26085e5c Finish painful bytes/sec -> bits/sec conversion. 2014-08-01 15:51:21 +01:00
Oliver Woodman
ef6be7957d Merge branch 'dev' of https://github.com/google/ExoPlayer into dev 2014-07-28 14:31:20 +01:00
Oliver Woodman
b3277c666b Add language to Format (+other misc fix). 2014-07-28 14:29:21 +01:00
Kentaro Takiguchi
fa83b2fa5e Add jarRelease task 2014-07-18 23:00:44 +09:00
Oliver Woodman
bb5cfd52c5 Add missing files. 2014-07-18 14:55:24 +01:00
Oliver Woodman
edb5446440 Bump version to 1.0.11. 2014-07-18 14:31:55 +01:00
Oliver Woodman
62d17cabf0 Add support for SegmentTemplate and SegmentList mpds.
Misc Notes:
- Removed content type filters because some of third parties
  don't set content type.
2014-07-18 14:30:30 +01:00
Oliver Woodman
87461821fe Define DashSegmentIndex wrapper.
This paves the way for SegmentTemplate and SegmentList based
mpds, which will implement DashSegmentIndex directly rather than
parsing an index from the media stream.

- Define DashSegmentIndex.
- Make use of DashSegmentIndex in chunk sources.
- Define an implementation of DashSegmentIndex that wraps a SegmentIndex.
- Add method that will allow Representations to return a DashSegmentIndex
  directly in the future.
- Add support for non-contiguous index and initialization data in media streams.
  For the Webm case this isn't enabled yet due to extractor limitations.
- Removed ability to fetch multiple chunks. This functionality does not extend
  properly to SegmentList and SegmentTemplate variants of DASH.
2014-07-17 11:28:05 +01:00
Oliver Woodman
d7d14037b8 Add utility classes for SegmentTemplate/SegmentList refactor.
A step towards supporting SegmentTemplate style MPDs.
2014-07-15 18:32:37 +01:00
Oliver Woodman
058333565d Use bits/sec instead of bytes/sec for format bandwidth.
Why: This was a bad initial choice. Manifests typically define bandwidth in
bits/sec. If you divide by 8 then you're throwing away information due to
rounding. Unfortunately it turns out that SegmentTemplate based manifests
require you to be able to recall the bitrate exactly (because it's substituted
in during segment URL construction).

Medium term: We should consider converting all our bandwidth estimation
over to bits/sec as well.

Note1: Also changed Period id to be a string, to match the mpd spec.
Note2: Made small optimization in FormatEvaluator to not consider discarding
the first chunk (durationBeforeThisSegmentUs will always be negative, and even
in the error case where it's not, removing the first thunk should be an error).
2014-07-15 13:55:59 +01:00
Oliver Woodman
4366afc273 Support self-contained media chunks.
- Support parsing of moov atoms contained within each chunk.
- Also do a small cleanup to WebM parser.
2014-07-15 12:47:08 +01:00
Oliver Woodman
16fe6a809e More flexible mimeType handling in mpd parser.
- Allow the content type of an adaptation set to be inferred
from the mimeTypes of the contained representations.
- Ensure the contained mimeTypes are consistent with one
another, and with the adaptation set.

Ref: Issue #2
2014-07-10 12:01:12 +01:00
Oliver Woodman
686ac2a6f5 Refactor WebM extractor. 2014-07-09 23:20:23 +01:00
Oliver Woodman
9e16dec2f8 Add support for relative baseUrls in DASH manifests.
Ref: Issue #2
2014-07-09 23:15:58 +01:00
Oliver Woodman
1b957268a6 Add utility methods for inexact ceil/floor binary searches.
This change also fixes issue #5
2014-07-09 15:34:42 +01:00
Oliver Woodman
f1213a7656 Fix NaN comparison error. 2014-07-07 17:06:01 +01:00
Oliver Woodman
43b7efa986 Widen support for fMP4 streams.
- Add support for parsing avc3 boxes.
- Make workaround for signed sample offsets in trun files always enabled.
- Generalize remaining workaround into a flag, to make it easy to add additional workarounds going forward without changing the API.
- Fix DataSourceStream bug where read wouldn't return -1 having fully read segment whose spec length was unbounded.
2014-07-07 15:55:01 +01:00
Oliver Woodman
e4ae7e08db Small javadoc tweak. 2014-07-04 01:10:52 +01:00
Oliver Woodman
47c0bbd6b5 Propagate erors to ChunkSource implementations.
This can help custom ChunkSource implementations to act on
this information. For example an adaptive implementation may
choose to blacklist a problematic format if loads of that
format keep failing.
2014-07-04 01:06:20 +01:00
Oliver Woodman
4fd4c89518 Refactored ExoPlayer to use String-based format ids. 2014-07-04 01:04:10 +01:00
Oliver Woodman
563b434de2 Keep audio time in sync with arbitrary decodeOnly samples.
AudioTrack time will go out of sync if the decodeOnly flag
is set of arbitrary samples (as opposed to just those following
a seek). It's a pretty obscure case and it would be weird for
anyone to do it, but we should be robust against it anyway.
2014-07-04 00:52:19 +01:00
Oliver Woodman
50b276fe31 Fixed issue in which MediaChunk.seekToStart might not actually seek to the start of the segment. 2014-07-04 00:47:44 +01:00
Oliver Woodman
8cad387393 Fix ChunkSource disable definition. 2014-07-04 00:45:09 +01:00
Oliver Woodman
ea796f916c Enhance Cache/SimpleCache.
1. Fix SimpleCache startReadWrite asymmetry. Allow more concurrency.

- startReadWrite does not have the concept of a read lock. Once
  a cached span is returned, the caller can do whatever it likes
  for as long as it wants to. This allows a read to be performed
  in parallel with a write that starts after it.
- If there's an ongoing write, startReadWrite will block even if
  the return operation will be a read. So there's a weird asymmetry
  where reads can happen in parallel with writes, but only if the
  reads were started first.
- This CL removes the asymmetry, by allowing a read to start even
  if the write lock is held.
- Note that the reader needs to be prepared for the thing it's
  reading to disappear, but this was already the case, and will
  always be the case since the reader will need to handle disk
  read failures anyway.

2. Add isCached method.
2014-07-04 00:29:18 +01:00
Oliver Woodman
27ab5c83a6 Initial drop. 1.0.10. 2014-06-16 12:56:04 +01:00