1045 Commits

Author SHA1 Message Date
olly
bc75b9904c Fix test coverage failure for G3 exoplayer
Generates a manifest to have Google3InstrumentationTestRunner in order to fix the error in Zapfhahn (service to measure test coverage)

PiperOrigin-RevId: 274754720
2019-10-15 23:07:38 +01:00
aquilescanta
c996391b83 Register cast module
PiperOrigin-RevId: 274568660
2019-10-14 14:48:21 +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
sofijajvc
d01d8f0344 Use google cpu_features library
Currently, ndk cpu-features is being used.
This is now deprecated and google open-source
cpu_features library is recommended.

PiperOrigin-RevId: 273987647
2019-10-10 18:55:50 +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
sofijajvc
ad50f62eec Remove method for setting custom gav1 libraries
PiperOrigin-RevId: 273929000
2019-10-10 14:45:49 +01:00
sofijajvc
f098562208 Fix comments in AV1 extension
PiperOrigin-RevId: 273928626
2019-10-10 14:45:40 +01:00
andrewlewis
3574345960 Fail av1 extension build if CMake is missing
If a user has checked out libgav1 they almost certainly want to
build the extension, so fail if CMake is not present but
libgav1 is present. Also add a note to the README linking to
instructions for installing CMake.

Also remove the NDK check, as ndk.dir is apparently deprecated
and Android Studio appears to install this automatically anyway.

PiperOrigin-RevId: 273918142
2019-10-10 14:45:23 +01:00
sofijajvc
5cf82a5079 Support GL rendering with SimpleExoPlayer and PlayerView
PiperOrigin-RevId: 273760294
2019-10-10 14:45:14 +01:00
aquilescanta
a35a0925ed Mask repeatMode in CastPlayer
When the user calls setRepeatMode, the state modifications are
observed as immediate, in spite of being sent to the receiver app
as asynchronous operations.

PiperOrigin-RevId: 273754931
2019-10-10 14:45:06 +01:00
aquilescanta
5775a47010 Remove maybe prefix for cast setting methods
Also move the masking internal state update before the message
dispatch, so as to ensure the result of the operation prevails
over the masking state.

PiperOrigin-RevId: 273740585
2019-10-10 14:44:57 +01:00
sofijajvc
1312a54295 Avoid sync failures if libgav1 isn't present
PiperOrigin-RevId: 273734495
2019-10-10 14:44:48 +01:00
sofijajvc
70abbb9689 Add test AV1 video to demo app
PiperOrigin-RevId: 273706425
2019-10-10 14:44:20 +01:00
aquilescanta
dddce4307b Mask playWhenReady state in CastPlayer
When the user calls setPlayWhenReady, the state modifications are
observed as immediate, in spite of being sent to the receiver app
as asynchronous operations.

PiperOrigin-RevId: 273289768
2019-10-07 16:32:19 +01:00
aquilescanta
29eebca5c5 Fix section comments in CastPlayer
PiperOrigin-RevId: 273270892
2019-10-07 16:32:11 +01:00
sofijajvc
8f3a363dd2 Add OpenGL support to av1 extension: Libgav1VideoRenderer
Move reusable code from LibvpxVideoRenderer to SimpleDecoderVideoRenderer.
Pass outputBuffer to renderOutputBuffer method instead of keeping the reference in the renderer.

PiperOrigin-RevId: 272899549
2019-10-07 16:31:39 +01:00
olly
efe6e6408a Cleanup: Only clamp seek positions for FFWD/RWND
It's confusing that seekTo(player, windowIndex, positionMs) does
clamping, because it only makes sense if windowIndex is the current
window.

Note: This doesn't actually fix anything (other than code clarity).
In cases where we were passing other windowIndices, we always
passed 0 as the position and so the clamping logic wouldn't have
had any effect.
PiperOrigin-RevId: 272857104
2019-10-04 13:33:09 +01:00
Oliver Woodman
6e65a71806 Merge pull request #6379 from wingyippp:flac-seek-map-two-points
PiperOrigin-RevId: 272856747
2019-10-04 13:32:59 +01:00
olly
8453d07f54 Remove unnecessary DeleteLocalRef usage
Keeping the ones inside loops, because theoretically they
can be useful there (in practice, for this use case, it's
highly unlikely to make any difference).

PiperOrigin-RevId: 272834073
2019-10-04 13:32:42 +01:00
olly
3c235dfc1f Make factories return specific types
PiperOrigin-RevId: 272614917
2019-10-04 13:31:40 +01:00
wingyippp
8ce8e351e1 new int64_t[4] after check mSeekTable supported 2019-10-03 14:40:39 +08:00
wingyippp
03ba1c9a2f return null if Seek Table is not supported. proguard in flac-extension 2019-10-03 13:50:17 +08: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
sofijajvc
36d3fef2b5 Update vpx README file
PiperOrigin-RevId: 271942692
2019-10-02 21:27:50 +01:00
andrewlewis
9f8002f16a Update LINT.IfChange for extension constants
PiperOrigin-RevId: 271617996
2019-10-02 21:27:42 +01:00
sofijajvc
22c3be75ea Extract vpx code used for GL rendering to common classes
This will be used by both vp9 and av1 Exoplayer extensions.

PiperOrigin-RevId: 271568429
2019-10-02 21:27:27 +01:00
ibaker
c5b6c6229b Simplify the ffmpeg build instructions a little
In-line EXOPLAYER_ROOT which only has one reference. And change
FFMPEG_EXT_PATH to always include "/jni"

PiperOrigin-RevId: 270866662
2019-10-02 21:25:48 +01:00
bachinger
4ad4e3e4fc Rollback of 3b22db33ba
*** Original commit ***

add top-level playlist API to ExoPlayer

Public design doc:
https://docs.google.com/document/d/11h0S91KI5TB3NNZUtsCzg0S7r6nyTnF_tDZZAtmY93g

Issue: #6161

***

PiperOrigin-RevId: 270728267
2019-10-02 21:25:39 +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
sofijajvc
47ad497aa8 Add android config option for vp9 build
PiperOrigin-RevId: 270640701
2019-10-02 21:24:59 +01:00
olly
7fff1dfd9c Remove stray line of code (it's duplicated below)
PiperOrigin-RevId: 270289374
2019-09-20 17:49:03 +01:00
bachinger
3b22db33ba add top-level playlist API to ExoPlayer
Public design doc:
https://docs.google.com/document/d/11h0S91KI5TB3NNZUtsCzg0S7r6nyTnF_tDZZAtmY93g

Issue: #6161
PiperOrigin-RevId: 269584512
2019-09-18 23:23:13 +01:00
tonihei
c5ceefd609 Fix playback speed in MediaSessionConnector
The playback speed set in MediaSession's PlaybackStateCompat needs to be the
actual speed at which the playback position progresses and not the user-defined
target speed.

This fixed a bug where the position advances although the player lost audio
focus.

Issue:#6203
PiperOrigin-RevId: 269295249
2019-09-16 23:31:41 +01:00
tonihei
e784d2c507 Add Player.isPlaying and Player.getPlaybackSuppressionReason
The player may suppress playback when waiting for audio focus even if the
state==Player.READY. There is currently no getter or callback to obtain this
piece of information for UI updates or analytics.

Also, it's a important derived state to know whether the playback position is
advancing. Add isPlaying and the corresponding callback to allow retrieving
this information more easily.

Issue:#6203
PiperOrigin-RevId: 268921721
2019-09-16 23:31:20 +01:00
olly
1d3d92ee4b Upgrade to OkHttp 3.12.5
Issue: #4078
PiperOrigin-RevId: 268887744
2019-09-13 13:51:35 +01:00
bachinger
f08258e48d disable seekbar in media style notification for live stream
ISSUE: #6416
PiperOrigin-RevId: 268673895
2019-09-13 13:51:04 +01:00
wingyippp
070aab7225 return SeekPoints directly for flacGetSeekPoints JNI method. update the proguard-rules.txt 2019-09-10 20:19:51 +08:00
tonihei
77ed930251 Add Timeline.Window.uid.
This allows to uniquely identify a window within a Timeline. The value is set
correctly for all Window instances, but is not used anywhere yet.

PiperOrigin-RevId: 267556516
2019-09-10 10:27:07 +01:00
christosts
260db03167 Use DataSpec request params in HttpDataSource impls
Include Dataspec.httpRequestHeaders in CronetDataSource,
and OkHttpDataSource. Updated documentation of
HttpDataSource.open() to suggest that it should set request
headers (in decreasing priority) from (1) the passed DataSpec,
(2) parameters set with setRequestProperty() and (3) default
parameters set in the HttpDataSource.Factory. No mechanism
has been put in place to enforce this.

PiperOrigin-RevId: 266895574
2019-09-05 10:48:45 +01:00
olly
52edbaa9a3 Update cronet and workmanager dependencies
PiperOrigin-RevId: 266803888
2019-09-05 10:48:45 +01:00
olly
0dc997103b Use constant to define androidx media version
PiperOrigin-RevId: 266802551
2019-09-05 10:45:24 +01:00
olly
2d0b10a73a Use constant to define androidx annotation version
PiperOrigin-RevId: 266801762
2019-09-05 10:45:08 +01:00
wingyippp
d9529479fa get 2 SeekPoints from the getSeekPosition() in flac_parser 2019-09-04 00:32:16 +08:00
olly
a02237de20 Fix imports
PiperOrigin-RevId: 266676413
2019-09-01 22:03:52 +01:00
Oliver Woodman
51ed8ead6d Merge pull request #6303 from ittiam-systems:rtmp-3.1.0
PiperOrigin-RevId: 266407058
2019-09-01 22:02:38 +01:00
olly
d720d2c3f6 Simplify androidTest manifests & fix links to use https
PiperOrigin-RevId: 266396506
2019-09-01 22:02:17 +01:00
olly
f5c1e8b5e3 Add HttpDataSource.getResponseCode to provide the status code associated with the most recent HTTP response.
PiperOrigin-RevId: 266218104
2019-08-30 14:42:21 +01:00
andrewlewis
34cc5f4cb8 Defer adsManager.init until the timeline has loaded
If the app seeks after we get an ads manager but before the player exposes the
timeline with ads, we would end up expecting to play a preroll even after the
seek request arrived. This caused the player to get stuck.

Wait until a non-empty timeline has been exposed via onTimelineChanged before
initializing IMA (at which point it can start polling the player position). Seek
requests are not handled while an ad is playing.

PiperOrigin-RevId: 265058325
2019-08-23 17:04:01 +01:00
sofijajvc
75f744ae40 Fix VpxDecoder error codes to match the ones in vpx_jni.cc
PiperOrigin-RevId: 265018783
2019-08-23 17:03:45 +01:00