1736 Commits

Author SHA1 Message Date
aquilescanta
b61b3ab011 Fixed premature linebreak
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=123620174
2016-06-15 19:41:53 +01:00
eguven
430985322d TestUtil.assertOutput() uses ExtractorFactory to create a new instance of the Extractor for each combination of simulation parameters.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=123506162
2016-06-15 19:41:53 +01:00
olly
8322592ee8 Fix flag issue causing corrupt output on DRM playbacks.
The issue is visible for DRM playbacks because
BUFFER_FLAG_ENCRYPTED is being cleared, which results
in trying to play encrypted samples without decryption.
The issue would have also incorrectly cleared key frame
flags too, for both clear and encrypted playbacks, but
I don't think we're using that flag downstream anywhere
and so the issue wasn't visible.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=123426582
2016-06-15 19:41:53 +01:00
aquilescanta
7bab9cabfb Added support for video track selection
We allow 2 configurations: Forcing seamless adaptiveness and allowing
mixed mime types adaptation.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=123420364
2016-06-15 19:41:53 +01:00
olly
8744e8dce9 Refactor #6.HLS.4
Pull more logic up to HlsSampleSource. Somewhat regretfully,
this also backs out the optimization work done toward the
ref'd issue. I think that's one for another time perhaps...

Issue: #551
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=123417413
2016-06-15 19:41:53 +01:00
olly
6d62962ab0 Bump version to 2.0.0.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=123410989
2016-06-15 19:41:53 +01:00
eguven
651237ac4f Moved/renamed OggExtractorFileTests.parseFile(...) methods to TestUtil.assertOutput(...).
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=123410374
2016-06-15 19:41:53 +01:00
olly
800006d08d Remove TODOs that we have little urge to actually do.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=123410274
2016-06-15 19:41:53 +01:00
eguven
ccfb6beb30 FakeExtractorOutput dump() and assertEquals(..., String dumpFile) methods to facilitate extractor test writing.
Changed OggExtractorFileTests to use dump files.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=123407516
2016-06-15 19:41:52 +01:00
olly
abc5c41ff4 Provide setPlaybackParams convenience method.
It's not a comprehensive solution for setting the
playback speed because (a) it doesn't apply when
audio is disabled, and (b) we do some timestamp
interpolation in a few places where we assume real
time. However in practice it works pretty well and
most apps probably don't allow disabling of audio,
so I think it makes sense to expose it.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=123406605
2016-06-15 19:41:52 +01:00
andrewlewis
5cf7c2ecf4 Separate enabling/setting TrackStreams in renderers (playlists #1).
This is in preparation for changing the TrackStream while keeping the renderer
enabled, to give seamless transitions for playlists.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=123394733
2016-06-15 19:41:52 +01:00
eguven
17f8ac8adf Validate Extractor behavior when load position is reset to 0 following an error.
Added a new method TestUtil.consumeTestData() to emulate
the exact behaviour and modified OggExtractorFileTests to
use it. Rest of the test will be fixed in follow up CLs.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=123320538
2016-06-15 19:41:35 +01:00
andrewlewis
c2b89d6285 Add SampleSourceProvider as a factory for SampleSources (playlists #2).
Initially only the first source index is used. In a later change,
ExoPlayerImplInternal will create SampleSources for different playlist item
indices as necessary.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=123312595
2016-06-15 19:41:35 +01:00
olly
c650ab64bc Less silly generics for Loader.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=123310694
2016-06-15 19:41:35 +01:00
olly
1ea149a4d2 Refactor #6.HLS.3
- Pull loading of the initial manifest up to HlsSampleSource.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=123305312
2016-06-15 19:41:35 +01:00
olly
e74fc80aab Loader improvements.
This change moves generally useful functionality (load timing
and fatal error propagation) inside of Loader, so that callers
don't have to duplicate effort.

The change also makes use of generics so that the callback
receives a Loadable with a more specific type.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=123304369
2016-06-15 19:41:35 +01:00
olly
db79f7989f Fix a few warnings.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=123302488
2016-06-15 19:41:35 +01:00
olly
10329eb111 Allow delivery to multiple messages in a single message.
Where multiple messages are required to be sent in order
to perform a player reconfiguration, it will usually be
desirable to process all messages in a single "transaction"
(i.e. without any rendering happening when only some of
the messages have been applied).
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=123228334
2016-06-15 19:41:34 +01:00
olly
ff7819e86a Delete another class from the demo app.
Merge the two MediaDrmCallback classes, since they're pretty
much identical.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=123220343
2016-06-15 19:41:34 +01:00
olly
f995509448 Give MSG constants different values.
This should be a no-op change, but it seems sensible to
have them not overlap.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=123208140
2016-06-15 19:41:34 +01:00
olly
35d7dad047 Clean up SimpleExoPlayer.
- Simplify setSurface by always blocking when the surface
  is being cleared.
- Add analogous setVolume API.
- Support setting of playback params for extension audio
  decoders. We can probably use this to add a setPlaybackRate
  API to SimpleExoPlayer for API level 23 and above only,
  but we'd probably want to make sure it works properly when
  there's no audio track too, so some thought will be
  required.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=123204581
2016-06-15 19:41:34 +01:00
olly
7d229003ad Add flexibility to DrmSessionManager.
DrmSessionManager is now an actual manager. For each session
request it may return a shared session (as things work now,
and as is suitable for Widevine VOD) or a separate instance
(e.g. for PlayReady where audio and video are protected with
different keys).
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=123203664
2016-06-15 19:41:34 +01:00
andrewlewis
da2cfd601d Keep intermediate .so files inside the ffmpeg directory.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=123203428
2016-06-15 19:41:34 +01:00
olly
c0cad7f396 Load demo app samples from json.
Also handle .exolist.json links. This lets you put a list of
samples somewhere (e.g. on the web). Clicking it opens the
app and displays the samples it defines.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=123198928
2016-06-15 19:41:34 +01:00
eguven
b6755c145e DefaultOggSeeker loop fix.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=123191416
2016-06-15 19:41:34 +01:00
vigneshv
9609302b3d Support VPx in ISO-BMFF (MP4) Container
Netflix created a spec to encapsulate VPx codecs in ISO-BMFF (MP4)
Container [1]. This CL adds support for VP8 and VP9 video codecs
in the MP4 container.

[1] https://github.com/Netflix/vp9-dash/blob/master/Downloads/VPCodecISOMediaFileFormatBinding.pdf
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=123160650
2016-06-15 19:41:34 +01:00
olly
ced7de15a9 Promote DemoPlayer to library as SimpleExoPlayer.
DemoPlayer moves into core library as SimpleExoPlayer, which
implements ExoPlayer.

Issue: #383
Issue: #592
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=123090184
2016-06-15 19:41:34 +01:00
olly
075e095cba Assume AAC-LC (or HE-AAC) in MPEG-TS.
Issue: #774
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=122987179
2016-06-15 19:41:34 +01:00
aquilescanta
c539db68ca Add first default track selection policies
With this CL:
* The first supported video track found is selected.
* The first supported audio track with preferred language is selected.
  If none, we fallback to the first supported one.
* For text, we only present a selection if one of the tracks has the
  preferred language and the track is flagged as forced.

TODO list:
* Add a selection policy for video (probably related with adaptiveness).
* We should decide what to do with the default flag.
* Perhaps, if no audio with the preferred language(assuming there is one)
  is found, we should fall back to a text track that has the preferred
  language.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=122985006
2016-06-15 19:41:34 +01:00
olly
58953d370f Simplify DemoPlayer + misc surrounding components.
1. Properly split out listening responsibilities so that
   DemoPlayer only listens to its own components.
2. Revert StreamingDrmSessionManager UnsupportedDrmScheme
   exceptions back to how they worked in V1, and inject
   a DrmSessionManager rather than a MediaDrmCallback into
   DemoPlayer.

This much better prepares DemoPlayer for promotion into
the core ExoPlayer library, since it removes assumptions
such as what SampleSource and DrmSessionManager impls
might be used with it.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=122980952
2016-06-15 19:41:34 +01:00
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