1260 Commits

Author SHA1 Message Date
olly
ecf50c4f9e Fix too-long TAG + remove unused methods.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=122426685
2016-06-15 19:41:32 +01:00
olly
2e8e8aba9d Always inject loadable retry count.
Now [DASH/SS]SampleSource instances are creating ChunkTrackStream
instances dynamically, it makes sense to always require that the
min retry count be injected from that level. The SampleSource
implementations should also use the retry count when refreshing
the manifest.

The option to configure the retry count on the SampleSource classes
will arrive in a later CL.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=122424774
2016-06-15 19:41:32 +01:00
olly
6977c8f455 Bit of naming/documentation cleanup.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=122423250
2016-06-15 19:41:32 +01:00
aquilescanta
2f4bfc3f5f Add the TrackSelectionPolicy to decouple track "assignment" and selection
Allows the user to provide their own criteria for selecting one of the available tracks
without having to reimplement the track assignment logic, i.e. linking type x tracks with
type x renderer.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=122422087
2016-06-15 19:41:32 +01:00
olly
23769fe82e Work around broken AAC decoder.
Issue: #1528
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=122421357
2016-06-15 19:41:32 +01:00
olly
ca49d6ff40 Refactor #6.HLS.2
Rename HlsSampleSource2 -> HlsSampleSource.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=122418334
2016-06-15 19:41:32 +01:00
olly
770f2c2c58 Refactor #6.HLS.1
1. Merge HlsOutput and HlsSampleSource -> HlsTrackStreamWrapper.
2. Rename HlsSource -> HlsSampleSource2. This will be renamed to
   HlsSampleSource in a subsequent CL.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=122415970
2016-06-15 19:41:32 +01:00
andrewlewis
51cf8bed29 Fix UUID constant reference.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=122412543
2016-06-15 19:41:32 +01:00
olly
d689a8fdfd Make Format implement Parcelable.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=122407769
2016-06-15 19:41:31 +01:00
olly
efaea81194 Use CodecCounters consistently in all renderers.
- Increment skippedBufferCount for VPX and ADTR.
- Set maxConsecutiveDroppedOutputBufferCount count for VPX.
  Tweak its meaning to ignore skipped frames.
- Remove outputFormat/outputBuffer changed counts. These add
  limited value. Also, MediaCodec is moving toward a model where
  you don't see the output buffers changing because you dequeue
  them one at a time (like how our extension decoders work).
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=122258530
2016-06-15 19:41:31 +01:00
olly
3760f514a9 Flesh out ExoPlayer extensions.
1. AudioDecoderTrackRenderer now reports decoder initialization
   and AudioTrack underruns.
2. AudioDecoderTrackRenderer can now render more than one output
   buffer per call to doSomeWork, to be consistent with
   MediaCodecAudioTrackRenderer. This may also prevent audio
   underruns in the case that audio is fragmented into many small
   buffers.
3. AudioDecoderTrackRenderer now has an overridable method that
   receives the audio session id, to be consistent with
   MediaCodecAudioTrackRenderer.
4. Fix unsafe event notification in LibvpxVideoTrackRenderer.
5. Vpx and AudioDecoder extensions now increment the CodecCounter
   inputBufferCount field correctly.
6. Decoders now have names :).
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=122250009
2016-06-15 19:41:31 +01:00
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
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
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
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