1625 Commits

Author SHA1 Message Date
andrewlewis
7e58f4cd9d Allow AudioDecoderTrackRenderers to override their output formats.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=122247516
2016-06-15 19:41:31 +01:00
andrewlewis
403f164b75 Pass the sample Format to AudioDecoderTrackRenderer.createDecoder.
The FFmpeg extension can support various different MIME types, so pass the
whole format to configure the decoder.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=122246589
2016-06-15 19:41:31 +01:00
olly
ea8d0a7aef Move UUID constants to C, and make C an interface.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=122242006
2016-06-15 19:41:31 +01:00
olly
b53a941ffd Fix crash (by calling correct DecoderInfo constructor).
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=122159478
2016-06-15 19:41:31 +01:00
olly
e29cb37403 Fix WavExtractor bug.
When skipToData is called the peek position is not equal
to the read position of the input. Hence peeking a chunk
header and then skipping by that amount wont do the right
thing :)!
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=122157603
2016-06-15 19:41:30 +01:00
olly
9bfe62a5a5 Support 32-bit WAV.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=122157513
2016-06-15 19:41:30 +01:00
olly
7301b53829 Add MediaCodecSelector.getPassthroughDecoderInfo.
Issue: #1518
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=122157463
2016-06-15 19:41:30 +01:00
andrewlewis
180d10334a Add .cproject for FLAC Eclipse build.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=122157285
2016-06-15 19:41:30 +01:00
andrewlewis
1dcd454477 Rename util.extensions package to extensions.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=122151232
2016-06-15 19:41:30 +01:00
olly
68d39b5159 Remove DecoderInputBuffer.size
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=122146105
2016-06-15 19:41:30 +01:00
olly
f9f95d638b Make ExtractorSampleSource amenable to proguarding.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=122085277
2016-06-15 19:41:30 +01:00
olly
356288a018 Fix documentation.
- Merge guide.md updates from GitHub.
- Update Opus repository.
- Fix missing link in Opus README.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=122080285
2016-06-15 19:41:30 +01:00
olly
af78ff849a Add MediaCodecSelector.getPassthroughDecoderInfo.
Issue: #1518
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=122080068
2016-06-15 19:41:30 +01:00
andrewlewis
7980e495a7 Remove an extra blank line in ExtractorSampleSource.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=122065476
2016-06-15 19:41:30 +01:00
olly
5ca9f62753 Refactor #6.HLS.0
Mechanical step to create a new HlsSource in the library.
Note that naming is now confusing. This will be fixed in
the next CL, when:

HlsSource -> HlsSampleSource
HlsSampleSource+HlsOutput -> HlsOutput
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=122054800
2016-06-15 19:41:30 +01:00
eguven
9ee3030b79 Opus initialization data should be in native order.
http://developer.android.com/reference/android/media/MediaCodec.html#CSD
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=121957004
2016-06-15 19:41:30 +01:00
olly
58c0ab1779 Broaden OMX.SEC.MP3.Decoder blacklisting.
Issue: #398
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=121949973
2016-06-15 19:41:30 +01:00
andrewlewis
cba4d80277 Add extension renderers before library renderers.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=121942162
2016-06-15 19:41:30 +01:00
eguven
19859eef96 Upgrade gradle to version 2.1.0 to benefit from instant run.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=121941168
2016-06-15 19:41:29 +01:00
olly
73c90ca0bc Enable FF/RW using Fugu remote.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=121940474
2016-06-15 19:41:29 +01:00
eguven
3674f9598e ogg't'opus reader
Support for opus content in ogg container.
TODO: Sample duration and seeking.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=121940392
2016-06-15 19:41:29 +01:00
olly
30ab3bef9a Bump version to 1.5.8.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=121931978
2016-06-15 19:41:29 +01:00
[]inger
28eaa2cb24 Support Ogg containers without a properly flagged last page.
Such files are slightly off spec but easy to support.(https://github.com/google/ExoPlayer/issues/1506)
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=121927762
2016-06-15 19:41:09 +01:00
olly
b61e7cdbc4 Support 8-bit and 24-bit PCM with re-sampling.
This is a cleaned up version of the pull request below,
which will be merged with this change then applied on top.

https://github.com/google/ExoPlayer/pull/1490

Issue: #1246
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=121926682
2016-06-15 19:41:09 +01:00
cblay
d2c524d726 Add open/read http exception classes.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=121871799
2016-06-15 19:40:39 +01:00
olly
9f2707cfa3 Push DrmInitData into Format.
- This means DrmInitData is propagated through sample queues (i.e.
  is effectively attached to every sample, so we can see when it
  changes when reading from the queue).
- It also allows different DrmInitData per track, which is possible
  in muxed MKV/WebM, and per Representation for DASH, although we
  wont be able to seamlessly adapt in the latter case.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=121821928
2016-06-15 19:40:39 +01:00
olly
e284d6166a Remove AudioTrack API level 16 dependency.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=121685491
2016-06-15 19:40:39 +01:00
olly
523f2662ef Skip arbitrary chunks before WAV fmt chunk.
I've seen a sample that has a LIST chunk prior to fmt. It
seems best just to skip all chunks until the format is
located. As per the RIFF spec:

"Programs must expect (and ignore) any unknown chunks
encountered, as with all RIFF forms."

https://www.aelius.com/njh/wavemetatools/doc/riffmci.pdf
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=121682470
2016-06-15 19:40:39 +01:00
olly
99c0ba005a Add support for TTML Regions extent
This allows limiting the horizontal extension of the cues.
NOTE: So far, we only support percentages for size magnitudes.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=121682404
2016-06-15 19:40:39 +01:00
eguven
642b2009f3 Add extensions to v2 demo app.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=121674924
2016-06-15 19:40:39 +01:00
cdrolle
cf0a31a7bb Fixed an NPE with self-initializing DASH segments.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=121660680
2016-06-15 19:40:38 +01:00
olly
27132bb2da Update MediaCodecUtil in V2.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=121566154
2016-06-15 19:40:38 +01:00
olly
7f98887468 Add support for rechunking fixed-sample-size data.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=121565738
2016-06-15 19:40:38 +01:00
olly
1fea3fe3c0 Add support for TTML regions.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=121564959
2016-06-15 19:40:38 +01:00
cdrolle
d978398faf Added SubtitleParser interface (extending Decoder)
SubtitleParser includes a method updating the current
playback position for parsers that need to be aware
of the position in order to determine how to batch
captions (i.e. Eia608Parser).
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=121519712
2016-06-15 19:40:09 +01:00
olly
6e86cafce0 Fix broken test.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=121501144
2016-06-15 19:40:09 +01:00
olly
6e5ae4eddc Simplify DrmInitData.
- This moves to a single DrmInitData implementation that supports
  both specific and universal UUID matching. You can also do a
  combination of the two, which was not previously possible.
- The object model is simplified as a result. This is a precursor
  to a change where DrmInitData will be included directly in the
  Format to enable key rotation.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=121472592
2016-06-15 19:40:09 +01:00
eguven
686816a610 Fix format constructor parameter order.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=121468904
2016-06-15 19:40:09 +01:00
aquilescanta
45a46c3e6e Add getTrackType to allow track selection
In order to apply track type specific policies in
the track selection, we need to know the type of
the track renderer, this method returns one of the
constants defined in C.java of the form TRACK_TYPE_*
to allow renderer classification.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=121369021
2016-06-15 19:39:52 +01:00
olly
6b9c43e578 Avoid expensive equality checks in DefaultTrackOutput.
If the media format changes from one Format object to another
one that's is equal (but not the same object), readData would
end up performing an expensive equality evaluation on every
invocation.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=121362300
2016-06-15 19:39:52 +01:00
andrewlewis
c2bd01a756 Removed unused parameter.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=121102072
2016-06-15 19:39:52 +01:00
olly
f0e6fff011 Remove unused private constants.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=121101188
2016-06-15 19:39:52 +01:00
olly
a1299ea722 Have DrmInitData classes implement hashCode/equals.
This will be required for key rotation to work, since
we'll need a way to determine whether or not the init
data has changed.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=121018211
2016-06-15 19:39:52 +01:00
andrewlewis
9b57487845 Handle gapless audio metadata in elst.
Only edit lists that truncate the first/last sample are supported, which is
sufficient to handle AAC encoder delay/padding.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=121011278
2016-06-15 19:39:52 +01:00
olly
23cb9532c5 Refactor #6.5: Restore DASH UTC timing element support.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=121002218
2016-06-15 19:39:52 +01:00
olly
0841d043b8 Refactor #6.4: Create child source instances on demand.
Dash/SS SampleSources now instantiate ChunkSource and
ChunkSampleSource (renamed to ChunkTrackStream) instances
on demand as tracks are enabled. The TrackGroups exposed
by the DASH/SS SampleSources are now constructed at the
top level.

Note that this change resolves the TODOs at the top of the
ChunkSource classes, allowing multiple adaptation sets of
the same type.

Next steps will include:

- Bring back UTC timing element support for DASH, which
  will be an extra request during preparation in  the DASH
  SampleSource.
- Simplification of manifest fetching to use a Loader directly
  in the two top level SampleSource classes. ManifestFetcher
  should eventually go away once HLS no longer needs it.
- Eventually, some consolidation between DASH/SS. There's a
  lot of common code there now.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=121001777
2016-06-15 19:39:52 +01:00
olly
d82bb3f657 Refactor #6.3: Pull drm parsing up to SS SampleSource.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=121001478
2016-06-15 19:39:52 +01:00
olly
eb3460b3aa Refactor #6.2: Start to simplify components.
Parse the duration of the media directly from the manifest
in the DASH/SS SampleSource implementations.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=121001296
2016-06-15 19:39:52 +01:00
olly
b38d004553 Refactor #6.1: Pull up manifest requests.
This change pulls manifest refresh responsibility up to the
top level Dash/SS SampleSource implementations. In following
steps more of the manifest processing logic will be pulled
up (e.g. extracting track groups from the initial manifest),
which will allow ChunkSampleSource/ChunkSource instances to
be further simplified and created on demand.

I've avoided moving/renaming anything for now, so as to keep
it fairly easy to review.

Note that this change does the TODO related to releasing the
manifest fetchers.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=121001139
2016-06-15 19:39:52 +01:00
olly
15a890c3ce Refactor #6.0: Add SampleSources for DASH and SS.
This is a mechanical change. The two new SampleSource classes
are forked from MultiSampleSource, with the logic that previously
was in the demo app's SourceBuilder methods copied into the
corresponding constructors. Subsequent steps will:

1. Pull the initial manifest processing from DashChunkSource and
SmoothStreamingChunkSource into the new SampleSource classes.
2. Remove the construction of ChunkSampleSource instances from
the constructors, instead instantiating children only as needed
when tracks are enabled.
3. Simplify ChunkSampleSource down into a ChunkTrackStream object.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=121001021
2016-06-15 19:39:52 +01:00