46 Commits

Author SHA1 Message Date
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
0f57a5f1cf Merge branch 'dev' of persistent-https://github.com/google/ExoPlayer into dev 2014-08-01 15:44:15 +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
ojw28
c1259969f8 Merge pull request #17 from rejasupotaro/dev
Thanks!
2014-07-24 11:23:36 +01:00
rejasupotaro
e33f5a514c Update README.md 2014-07-18 23:14:07 +09:00
Kentaro Takiguchi
fa83b2fa5e Add jarRelease task 2014-07-18 23:00:44 +09:00
Kentaro Takiguchi
5a888f3a6d Update tools version 2014-07-18 23:00:44 +09:00
Kentaro Takiguchi
50f69f22df Add gitignore 2014-07-18 23:00:12 +09:00
ojw28
553a1d2ec1 Merge pull request #16 from google/dev
Add missing files.
2014-07-18 14:56:36 +01:00
Oliver Woodman
bb5cfd52c5 Add missing files. 2014-07-18 14:55:24 +01:00
ojw28
4228f2cfa3 Merge pull request #15 from google/dev
Merge 1.0.11 to master
2014-07-18 14:43:59 +01:00
Oliver Woodman
1ed65dfb85 Add some additional information to README.md. 2014-07-18 14:37:46 +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
b398c594fa Fix minSdkVersion for demo app 2014-07-07 14:41:45 +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
273fad845e Fix verify error running on JellyBean #2. 2014-06-24 14:05:59 -07:00
Oliver Woodman
1482dde4a9 Fix verify error running on JellyBean. Add link to Javadoc 2014-06-24 13:49:19 -07:00
Oliver Woodman
27ab5c83a6 Initial drop. 1.0.10. 2014-06-16 12:56:04 +01:00