4117 Commits

Author SHA1 Message Date
olly
68387f98ee Simplify demo app by moving EventLogger into core
It seems good to have EventLogger available from the library.
In particular because when app developers use it and then
submit bug reports, it makes it much easier to work out what
happened. It will also allow EventLogger to be used across
our (now multiple) demo apps.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=182389407
2018-01-23 19:03:31 +00:00
tonihei
029c95832c Add queue abstraction to ExoPlayerImplInternal.
This gets rid of the manual tracking of this queue with reading, playing,
and loading period holders. Still keeping these names for queue access methods.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=182378944
2018-01-23 19:01:51 +00:00
olly
c577d9d351 Let SimpleExoPlayerView/LeanbackPlayerAdapter bind with any Player
Also sanitize naming (PlayerView/PlayerControlView).

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=182364487
2018-01-23 19:00:20 +00:00
aquilescanta
605aeb3a42 Make id3 context usage robust against container format changes
Issue:#3622

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=182363243
2018-01-23 18:58:47 +00:00
olly
65597e0db8 DashMediaSource variable name cleanup
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=182261649
2018-01-23 18:57:18 +00:00
aquilescanta
78c6b39ae8 Fix HLS media playlist only playback
This was broken by []

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=182206548
2018-01-23 18:53:08 +00:00
aquilescanta
0697fb3955 Fail on HLS+TS loss of sync
Issue:#3632

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=182202289
2018-01-23 18:51:40 +00:00
olly
0708aa87ba Fix stray calculation in PGS decoder
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=182183184
2018-01-23 18:50:09 +00:00
aquilescanta
3919843db2 Force single audio and video sample queues
This solves the problem of having dense tracks' ids change.
For example, if the available variants offer both HEVC and AVC video
tracks, all video samples will map to the same sample queue even if
IDs don't match.

Issue:#3653

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=182070486
2018-01-23 18:48:44 +00:00
aquilescanta
be304486e0 Fix HLS' mime type propagation
Issue:#3653

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=182064250
2018-01-23 18:47:13 +00:00
olly
a4114f59b6 Seek at chunk level when seeking to chunk start positions
This avoids issues that can arise due to slight discrepancies between
chunk start times (obtained from the manifest of segment index) and
the timestamps of the samples contained within those chunks.

Issue: #2882

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=182054959
2018-01-23 18:45:44 +00:00
eguven
965bc4f677 Add JobDispatcherScheduler
This is a Scheduler implementation which uses Firebase JobDispatcher.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=182051350
2018-01-23 18:44:17 +00:00
hoangtc
6749623cd1 Handle DASH `emsg' events targeting player.
For live streaming, there are several types of DASH `emsg' events that directly
target the player. These events can signal whether the manifest is expired, or
the live streaming has ended, and should be handle directly within the player.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=182034591
2018-01-23 18:42:49 +00:00
andrewlewis
6bed2ffc04 Remove ndk-build from [] flac build rules
Android NDK r9 in [] is deprecated (see []

Update the ExoPlayer flac extensions to use android_jni_library.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=182017669
2018-01-23 18:41:05 +00:00
aquilescanta
515fdf3bfd Allow extension of DebugTextViewHelper
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=181970955
2018-01-23 18:39:37 +00:00
tonihei
cfed8791b0 Send downStreamFormatChanged notification for embedded streams.
This allows listeners to get notified of any change to the embedded tracks.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=181969023
2018-01-23 18:38:17 +00:00
olly
ebfd5a7fe0 Don't discard embedded queues beyond primary queue.
ChunkSampleStream.seekToUs assumes that if we can seek within the
primary sample queue, we can also seek within the embedded queues.
This assumption can be violated fairly easily if discardBuffer is
called with toKeyframe=true, since this can cause samples to be
discarded from the embedded queues within the period for which a
seek in the primary sample queue will succeed. This change fixes
the issue.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=181965902
2018-01-23 18:36:48 +00:00
olly
7b534cd9fd Update moe equivalence
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=181962471
2018-01-23 18:35:20 +00:00
eneim
88f8c768b0 Also check if the Uri is built for raw resource data, and then create the RawResourceDataSource for it. 2018-01-18 09:36:48 +09:00
eneim
408bc08682 Make Raw Resource Scheme to be public, accessible from outside. 2018-01-18 09:32:46 +09:00
Oliver Woodman
141f3aa836 Simplify PGS captions + sync with internal tree 2018-01-15 14:13:30 +00:00
ojw28
dc38e86945
Merge pull request #3673 from drhill/dev-v2_PGS
PGS subtitle decoding support
2018-01-15 13:47:16 +00:00
ojw28
96b7daa93a
Merge pull request #3667 from alexcohn/ndk-r16-support
minimal fix to support NDK r16
2018-01-15 13:47:05 +00:00
andrewlewis
f20c158a38 Fix IMA sample ad tag URL
Issue: #3703

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=181947101
2018-01-15 12:01:15 +00:00
tonihei
7a56403046 Add missing downstreamFormatChanged to Extractor and SingleSample media source.
These haven't been included in the recent changes but can be reported as
soon as the first sample of each stream is read.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=181753141
2018-01-15 11:59:46 +00:00
tonihei
ad3e6ef4cd Add missing onLoadStarted callback to Extractor and SingleSample media period.
We added the other callbacks some time ago, but didn't include onLoadStarted.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=181743764
2018-01-15 11:56:53 +00:00
tonihei
f977ba256f Add ad insertion discontinuity reason.
This it to distinguish between actual period transitions and the
transitions occuring to and from ads within one timeline period.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=181606023
2018-01-15 11:50:15 +00:00
olly
214d46d957 Set selection flags on image sample formats.
Issue: #3008

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=181455340
2018-01-15 11:46:07 +00:00
eguven
1fc250a9f3 Make CacheUtil documentation clearer
Also fixed some other Cache related javadoc.

Issue: #3374

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=181440687
2018-01-15 11:44:41 +00:00
aquilescanta
11bae0af5a Add minimal logging for SCTE-35 splice commands in the Demo App
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=181440439
2018-01-15 11:43:19 +00:00
andrewlewis
13fbe7b2f2 Fix cronet extension package name
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=181331715
2018-01-15 11:40:29 +00:00
andrewlewis
96e490d7fe Make it possible to subclass LibvpxVideoRenderer
Make LibvpxVideoRenderer non-final and add protected methods to match
MediaCodecVideoRenderer.

Reorganize methods to separate BaseRenderer, protected and internal methods.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=181320714
2018-01-15 11:36:09 +00:00
olly
ff1bb2f702 Apply SeekParameters to DASH + SmoothStreaming playbacks
Issue: #2882

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=181314086
2018-01-15 11:34:48 +00:00
tonihei
4ee971052b Improve Extractor partial read tests.
Partial reads were performed once using a partial size of 1 byte.
This was not enough to detect problems which only occur in combination
with IOExceptions. Partial reads are now only applied when no exception
is thrown.

Moreover, the tests didn't check whether the total number of sampled bytes
is what it is supposed to be. Added a field to the data dumps checking
the total number of bytes in the sampled data.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=181296545
2018-01-15 11:33:23 +00:00
eguven
d427a1dd62 Make Cache.getCachedSpans return empty set rather than null
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=181161289
2018-01-15 11:30:39 +00:00
andrewlewis
67d4626701 Add support for non-Extractor content MediaSources in IMA demo
Issue: #3676

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=181140929
2018-01-15 11:29:11 +00:00
olly
d533a83ae4 Partial revert of DRM fixes
----------------------------------
Original change description:

DRM fixes

- Parse multiple kids from default_KID. It's specified as a whitespace
  separated list of UUIDs rather than a single UUID.
- Opportunistically proceed with playback in cases where the manifest
  only defines a single SchemeData with the common PSSH UUID. In such
  cases the manifest isn't saying anything about which specific DRM
  schemes it supports.

Issue: #3630

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=181137621
2018-01-15 11:27:48 +00:00
olly
73892f21b1 Ubernit line re-order
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=181137491
2018-01-15 11:26:22 +00:00
tonihei
c991b80c85 Rmeove unused variable in Mp4Extractor and HeifExtractor.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=181135589
2018-01-15 11:24:57 +00:00
tonihei
4867748c50 Add assertions to check that media sources are not prepared twice.
This lets apps fail-fast when they try to reuse media source instances.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=180934445
2018-01-15 11:23:31 +00:00
eguven
4b018b4d19 Document how unset length request are cached
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=180929422
2018-01-15 11:22:07 +00:00
hoangtc
5364962dca Automatically apply rotation for TextureView in SimpleExoPlayer.
If SimpleExoPlayer is using TextView as output, we can handle video rotation by
automatically applying a matrix transformation to the TextureView when we have
this information available from the video (from video's metadata).

GitHub: #91

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=180925571
2018-01-15 11:20:41 +00:00
eguven
373935aeb6 Make CacheDataSource detect cache availability change
In certain conditions CacheDataSource switch to reading from upstream
without writing back to cache. This change makes it detect the change of
these conditions and switch to reading from or writing to cache.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=180901463
2018-01-15 11:16:25 +00:00
Drew Hill
aaf469ce06 code review changes and fix for discontinuity 2018-01-14 11:00:32 -05:00
Drew Hill
821ea0e58b moved floatresample into defaultaudiosink and added new constructor in defaultaudiosync to use that resample when audio input is 24/32bit pcm and the new flag is enabled 2018-01-06 00:26:18 -05:00
Drew Hill
ca0c090c1a add support in mediacodecaudiorenderer for 24bit pcm to float 2018-01-05 23:31:38 -05:00
Drew Hill
b610e11443 PGS subtitle decoding support 2018-01-05 23:10:51 -05:00
olly
a1bac99f3b Fix loadDrmInitData given DASH manifest parser changes
DASH manifests can now contain non-null but incomplete
DRM init data. Hence using the manifest init data when
non-null is not always the correct thing to do. This
change merges the sample and manifest formats (which
correctly merges the DRM init data) and then uses the
result.

Issue: #3630

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=180787784
2018-01-04 15:56:44 +00:00
andrewlewis
c89cc81b71 Configure MediaCodecs for realtime priority
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=180782164
2018-01-04 15:55:27 +00:00
andrewlewis
682953c411 Fix typos
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=180778084
2018-01-04 15:54:01 +00:00