747 Commits

Author SHA1 Message Date
aquilescanta
95d0921114 Make LoadEventInfo a top level class
In order to reuse it in LoadErrorHandlingPolicy.

PiperOrigin-RevId: 281087397
2019-11-18 17:55:51 +00:00
olly
3515a5112d Release notes for 2.10.8
PiperOrigin-RevId: 281084720
2019-11-18 17:55:36 +00:00
kimvde
9b2917a9ae Add Java FLAC extractor
Seeking, live streams support and exposure of vorbis and ID3 data
are not part of this commit.

Issue: #6406
PiperOrigin-RevId: 281083332
2019-11-18 17:55:28 +00:00
andrewlewis
a5e14b4dae Fix byte order for HDR10+ static metadata
The implementation of writing HDR10+ static metadata assumed that the
application would use default (big endian) byte order for this metadata but
MediaCodec expects the order to match the specification CTA-861.3.

PiperOrigin-RevId: 281050806
2019-11-18 17:54:56 +00:00
krocard
5579cc89c6 Propagate end of stream received from OnFrameRenderedListener
Previously the renderer EOS (aka last frame rendered), was reported as soon
as the last encoded frame was queued in the codec renderer.
This leaded to EOS reported too early.

PiperOrigin-RevId: 280456277
2019-11-15 05:16:19 +00:00
tonihei
c8e7ecd367 Merge consecutive segments for downloading.
This speeds up downloads where segments have the same URL with different
byte ranges. We limit the merged segments to 20 seconds to ensure the download
progress of demuxed streams is roughly in line with the playable media duration.

Issue:#5978
PiperOrigin-RevId: 280410761
2019-11-15 05:16:11 +00:00
aquilescanta
51711a0c97 Fix MediaDrm leaks in OfflineLicenseHelper
PiperOrigin-RevId: 280176216
2019-11-15 05:16:03 +00:00
olly
20ab05103b First pass at finalizing 2.11.0 release notes
PiperOrigin-RevId: 280056790
2019-11-15 05:15:16 +00:00
ibaker
ddb70d96ad Require an end timecode in SSA and Subrip subtitles
SSA spec allows the lines in any order, so they must all have an end time:
http://moodub.free.fr/video/ass-specs.doc

The Matroska write-up of SubRip assumes the end time is present:
https://matroska.org/technical/specs/subtitles/srt.html

This will massively simplify merging issue:#6595

PiperOrigin-RevId: 279926730
2019-11-15 05:14:43 +00:00
andrewlewis
0351177611 Handle new signaling for E-AC3 JOC in DASH
Issue: #6636
PiperOrigin-RevId: 279666771
2019-11-15 05:13:31 +00:00
olly
a9ef9c46c8 Bump version to 2.11.0
Note: Release notes are not final.
PiperOrigin-RevId: 279125474
2019-11-15 05:12:58 +00:00
olly
87003b30fc Bump version to 2.10.7
PiperOrigin-RevId: 278658259
2019-11-05 18:36:21 +00:00
ibaker
07e93c15f9 Add support for subtitle files in the demo app
issue:#5523
PiperOrigin-RevId: 277927555
2019-11-05 16:16:53 +00:00
andrewlewis
a4e7274cca Update audio extension build configurations
- Fix FLAC extension build (currently broken due to use of std::array,
  but fixed by migrating to NDK r20).
- Move opus and ffmpeg extensions to NDK r20. For ffmpeg, upgrade to
  release 4.2 which requires using libswresample and updates to the
  build script.

Issue: #6601
PiperOrigin-RevId: 277924119
2019-11-05 16:16:38 +00:00
andrewlewis
656556b828 Clean up naming for GLSurfaceViews
PiperOrigin-RevId: 277896757
2019-11-05 16:15:29 +00:00
andrewlewis
fbea71b0fe Fix detection of Dolby Atmos in HLS
E-AC3 with JOC is signaled using the CHANNELS attribute for HLS:
https://developer.apple.com/documentation/http_live_streaming/hls_authoring_specification_for_apple_devices/hls_authoring_specification_for_apple_devices_appendices

PiperOrigin-RevId: 277680300
2019-11-05 16:13:41 +00:00
andrewlewis
d3933e5cac Recreate Opus decoder for stream change
The framework opus decoder discards some samples after a call to
flush(). Because we flush a decoder that is being retained across an
input format change, this means that the start of audio gets truncated
when transitioning to a new opus stream. See also
https://android.googlesource.com/platform/frameworks/av/+/refs/heads/android10-release/media/libstagefright/codecs/opus/dec/SoftOpus.cpp.

Avoid this by recreating opus decoders instead of flushing them. It
seems fine to do this for all opus decoders as reinitialization should
be cheap, OEM-provided implementations may also discard samples and
playback shouldn't be interrupted on reinitialization due to the
downstream AudioTrack buffer.

PiperOrigin-RevId: 277458759
2019-10-30 08:52:05 +00:00
aquilescanta
0f312561e5 Add shuffle and repeat modes to media session playback state invalidation
Which ensures both get updated when the MediaSessionConnector player
changes.

Issue:#6582
PiperOrigin-RevId: 277254889
2019-10-30 08:51:35 +00:00
samrobinson
b99203dada Post AudioFocusManager.onAudioFocusChange events to eventHandler.
PiperOrigin-RevId: 276452333
2019-10-30 08:49:09 +00:00
olly
7ccbc4c436 Remove VR code
- Leaving GvrAudioProcessor for now.
- Removing GvrPlayerActivity because it was never released. Also removing
  related UI classes. These were released, but it's unlikely anyone would
  have been using them directly.

PiperOrigin-RevId: 275822516
2019-10-30 08:47:06 +00:00
samrobinson
694ccf424b Added an ICY header workaround for unseekable MP3 streams.
Issue:#6537
PiperOrigin-RevId: 275477266
2019-10-18 17:43:21 +01:00
samrobinson
841b3a8bc7 Add AUDIO_BECOMING_NOISY handling to SimpleExoPlayer.
Feature enabled through the SimpleExoPlayer.setHandleAudioBecomingNoisy.

PiperOrigin-RevId: 274988924
2019-10-16 14:02:11 +01:00
olly
b71b9f7c58 Bump version to 2.10.6
PiperOrigin-RevId: 274534626
2019-10-14 13:57:41 +01:00
andrewlewis
1c66010b4a Add MediaFormat on video frame metadata listener
This is useful for apps that want to access HDR metadata that MediaCodec puts
in its output format.

PiperOrigin-RevId: 274169985
2019-10-13 12:41:47 +01:00
andrewlewis
5f71e86335 Handle legacy DASH audio channel configuration
Issue: #6523
PiperOrigin-RevId: 274160232
2019-10-13 12:41:24 +01:00
bachinger
674e92e1ee provide content description for the player view to make show/hide controls accessible
PiperOrigin-RevId: 274148026
2019-10-13 12:41:08 +01:00
sofijajvc
62618f24ec Remove copybara exclusions and add extension to the demo app
Issue: #3353
PiperOrigin-RevId: 273949689
2019-10-10 14:46:16 +01:00
ibaker
60566721d4 Enable ID3-in-EMSG for HLS streams
This supports both chunkless & traditional preparation

PiperOrigin-RevId: 273938344
2019-10-10 14:46:07 +01:00
sofijajvc
a96a82588e Update release notes for GL classes changes
PiperOrigin-RevId: 273937090
2019-10-10 14:45:58 +01:00
olly
b052ea9bed Parse Label elements for adaptation sets
Issue: #6297
PiperOrigin-RevId: 273297284
2019-10-07 16:32:50 +01:00
olly
c269890259 Define default colors as constants
It's confusing that app:played_color also modifies the colors
that derive from it, but the corresponding setter does not. It
seems generally clearer just to define constants.

PiperOrigin-RevId: 273249557
2019-10-07 16:31:55 +01:00
tonihei
4f640bc62e Add SequencableLoader.isLoading
This method allows the player to figure out whether we still have an ongoing
load even if LoadControl.shouldContinueLoading returns false.

PiperOrigin-RevId: 272445577
2019-10-02 21:30:07 +01:00
ibaker
f7b8d07cd2 Add specific error message if file-not-found for path with fragment or query
This doesn't change the current behaviour, just adds a clear error message
to the developer with instructions on how to avoid it.

Issue:#6470
PiperOrigin-RevId: 272405556
2019-10-02 21:29:45 +01:00
ibaker
6780b802e0 Pass the raw ICY metadata through IcyInfo
The ICY 'spec' isn't really clear/tight enough to do anything more
specific than this I think.

Issue:#6476
PiperOrigin-RevId: 272405322
2019-10-02 21:29:37 +01:00
samrobinson
f5873b8f00 WakeLock handling
Created the WakeLockManager for use in SimpleExoPlayer.
Added a setter in SimpleExoPlayer to adjust this functionality.

Issue:#5846
PiperOrigin-RevId: 272176998
2019-10-02 21:29:21 +01:00
tonihei
dd4f9bcaae Add Timeline.Window.isLive
This flag is currently merged into Window.isDynamic, which isn't always true
because
1. A window can be dynamic for other reasons (e.g. when the duration is still
missing).
2. A live stream can be become non-dynamic when it ends.

Issue:#2668
Issue:#5973
PiperOrigin-RevId: 271999378
2019-10-02 21:28:43 +01:00
sofijajvc
7c199eb1ad Move vpx constant for setting output renderer to common constants file
This will be used by both av1 and vp9 extensions.

PiperOrigin-RevId: 271949754
2019-10-02 21:28:05 +01:00
aquilescanta
b50da6d72e Add DefaultDrmSessionManager.Builder
Issue:#6334
Issue:#4721
Issue:#6334
Issue:#4867
PiperOrigin-RevId: 271577773
2019-10-02 21:27:35 +01:00
tonihei
004b9e8e8c Add EventListener.onPlaybackSuppressionReasonChanged
Adding this callback makes sense for completeness (we have similar callbacks
for all other playback state properties), and also to detect audio focus loss
while buffering which would currently trigger no callback because isPlaying
is still false.

Issue:#6203
PiperOrigin-RevId: 271347351
2019-10-02 21:26:41 +01:00
aquilescanta
cc8b774b41 Remove DefaultDrmSessionManager factory methods that enforce MediaDrm leaks
Inline invocations of these methods, which still leaks the MediaDrms.
However, it will be fixed once the DefaultDrmSessionManager API is finalized
and ExoMediaDrm.Providers are introduced.

Issue:#4721
PiperOrigin-RevId: 270681467
2019-10-02 21:25:31 +01:00
christosts
5695bae9d8 Remove DataSpec.FLAG_ALLOW_ICY_METADATA
Remove the flag DataSpec.FLAG_ALLOW_ICY_METADATA. Instead, set the
header IcyHeaders.REQUEST_HEADER_ENABLE_METADATA_NAME in the DataSpec
httpRequestHeaders.

BUG:134034248
PiperOrigin-RevId: 270662676
2019-10-02 21:25:07 +01:00
andrewlewis
258fff422a Publish SurfaceControl demo
Issue: #677
Issue: #5428
PiperOrigin-RevId: 270466031
2019-09-22 00:16:15 +01:00
olly
1feb03db2d Pull HLS audio transition fix into 2.10.5
PiperOrigin-RevId: 270327562
2019-09-22 00:15:51 +01:00
olly
d67926ef2b Pull focus fix into 2.10.5
PiperOrigin-RevId: 270295428
2019-09-20 18:12:00 +01:00
olly
600b5181a3 Add 2.10.5 release date
PiperOrigin-RevId: 270295080
2019-09-20 18:11:52 +01:00
tonihei
b0e2ce40d6 Add dates to releases in RELEASENOTES.
PiperOrigin-RevId: 270276830
2019-09-20 17:21:01 +01:00
aquilescanta
e5f9a858d3 When the HLS container format is not packed audio, reset timestmap offset
Issue:#6444
PiperOrigin-RevId: 270252126
2019-09-20 17:21:01 +01:00
tonihei
31b9280e0e Add track selection option to use accessiblity captioning manager settings
This option allows to set the preferred text language and role flags based
on the user's accessiblity captioning settings.

Issue:#5749
PiperOrigin-RevId: 270233205
2019-09-20 17:21:01 +01:00
bachinger
826fe3ac27 adjust and extend the documentation around playlist API in the developer guide
PiperOrigin-RevId: 270002330
2019-09-20 17:20:44 +01:00
olly
78ef6c6496 Update release notes
- Fatal error handling fix is now in 2.10.5

PiperOrigin-RevId: 269904669
2019-09-20 16:52:54 +01:00