1556 Commits

Author SHA1 Message Date
andrewlewis
ddde6edb92 Add FFmpeg extension.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=122978403
2016-06-15 19:41:33 +01:00
eguven
9981a83c05 Fix Ogg/Flac sync exception.
Restores input position after flac block size read.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=122978325
2016-06-15 19:41:33 +01:00
eguven
731d4283ab Ogg/Opus and Ogg/Flac search seeking
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=122977123
2016-06-15 19:41:33 +01:00
olly
7465db2a22 Merge ID3 parsing improvements from GitHub.
- Parse APIC and TextInformation frames.
- In MPEG-TS, don't mind if packets contain end padding.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=122743786
2016-06-15 19:41:33 +01:00
olly
83b43a6fe6 Assume 360p 4:3 H264 is supported from JB.
Issue: #1534
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=122742666
2016-06-15 19:41:33 +01:00
andrewlewis
fb3fdb34c7 Send H.265 parameter sets in TSs to the decoder.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=122730598
2016-06-15 19:41:33 +01:00
andrewlewis
7d9541848e Rename mpdIntent to intent.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=122730041
2016-06-15 19:41:33 +01:00
olly
7d4c786e21 Make DRM work in ExoPlayer V2.
Bigger changes will be coming, but this gets DRM back
up and working again.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=122719062
2016-06-15 19:41:33 +01:00
aquilescanta
80f67d908a Add flagDefault and flagForced support for Matroska
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=122636596
2016-06-15 19:41:33 +01:00
olly
d43824710e Fix seeking with WAV files.
Previously, rounding down to the nearest frame wasn't
being done correctly; seeking could seek into a sample.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=122618668
2016-06-15 19:41:33 +01:00
olly
362ea1d725 Update moe to include third_party jars.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=122612016
2016-06-15 19:41:33 +01:00
aquilescanta
fce17e7ffc Added a trackSelectionFlags field to format.
This field will allow us to flexibly add information provided by the container
or streaming manifests related to the tracks that must be selected.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=122559858
2016-06-15 19:41:33 +01:00
olly
a16a333df2 Clean up renderer event listeners.
- Don't report errors to listeners if playback will immediately
  fail. Doing so is redundant, since such errors are immediately
  reported through ExoPlayer's listener as a result of playback
  failure. We were also reporting these errors inconsistently
  across renderers.
- Reduce code duplication through EventDispatcher classes.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=122519976
2016-06-15 19:41:32 +01:00
olly
bfee449ed8 Fix FMP4 playback duration and absent tfdt handling.
- Parse duration from mehd box for FMP4.
- Handle absent tfdt boxes by accumulating decode time
  from one fragment to the next.

Issue: #1529
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=122512416
2016-06-15 19:41:32 +01:00
olly
9e65693e91 Misc cleanup.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=122506577
2016-06-15 19:41:32 +01:00
olly
a43144decf Don't require playback Looper to build DRM session manager.
This is required because in V2 we'll be instantiating DRM
session managers before the ExoPlayer instance (and hence
we wont have the Looper). This logic will be further cleaned
up in later CLs that overhaul DrmSessionManager in more
depth.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=122453765
2016-06-15 19:41:32 +01:00
andrewlewis
537f193c88 Improve precision of fragmented/unfragmented MP4 sniffing.
Search up to 4 KB for both fragmented and unfragmented files.

Detect files with an mvex box in their moov box as fragmented.

Fix reading of brands.

Issue: #1523
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=122429548
2016-06-15 19:41:32 +01:00
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
ebca7f9a21 Add missing issue template.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=122419424
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
d70f4a8fc7 Update FMP4 samples.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=122409929
2016-06-15 19:41:31 +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
olly
97c633f128 Advertise adaptive support in LibvpxVideoTrackRenderer.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=122247836
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
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