10461 Commits

Author SHA1 Message Date
olly
e98f5f34ce Fix gradle conflict resolution for Cronet tests
This resolves the following constraint resolution issue when running our release script:

> Cannot find a version of 'org.chromium.net:cronet-api' that satisfies the version constraints:
    Dependency path 'com.google.android.exoplayer:extension-cronet:unspecified' --> 'com.google.android.gms:play-services-cronet:17.0.0' --> 'org.chromium.net:cronet-api:72.3626.96'
    Constraint path 'com.google.android.exoplayer:extension-cronet:unspecified' --> 'org.chromium.net:cronet-api:{strictly 72.3626.96}' because of the following reason: debugRuntimeClasspath uses version 72.3626.96
    Dependency path 'com.google.android.exoplayer:extension-cronet:unspecified' --> 'org.chromium.net:cronet-embedded:76.3809.111' --> 'org.chromium.net:cronet-common:76.3809.111' --> 'org.chromium.net:cronet-api:76.3809.111'

#minor-release

PiperOrigin-RevId: 355414968
2021-02-04 00:23:55 +00:00
ibaker
710dff0388 Disable setOutputSurface workaround for all codecs in GTS tests
Issue: #8427
PiperOrigin-RevId: 355381785
2021-02-03 15:03:24 +00:00
kimvde
a2d0161eaf Add Transformer "Getting started" page
#minor-release

PiperOrigin-RevId: 355381610
2021-02-03 15:03:16 +00:00
olly
1bf53bfabc Refine ProGuard config workaround for Function
This is a more targeted workaround, which still allows for the
containing package name to be obfuscated.

#minor-release

PiperOrigin-RevId: 355381201
2021-02-03 15:03:07 +00:00
bachinger
63ae8f5417 Add PlayerNotificationManager.Builder
PiperOrigin-RevId: 355356169
2021-02-03 15:02:59 +00:00
olly
584a0730c9 Improve EventLogger static metadata formatting
#minor-release

PiperOrigin-RevId: 355203044
2021-02-03 15:02:50 +00:00
ibaker
8d1eddb027 Release notes tweaks for 2.13.0
* Move cherrypicked changes from dev-v2 to 2.13.0
* Use a bulleted list instead of comma-separated.
* Standardise everything into present, imperative sentences.
* Remove a couple of mixed-font words (I left cases with a separating
  apostrophe, as these seemed visually clearer).
* Merge multiple issue links into a single set of parentheses.

#minor-release

PiperOrigin-RevId: 355180143
2021-02-03 15:02:41 +00:00
ibaker
0b34cabca0 Document that DrmSessionManagerProvider doesn't call DSM#prepare()
#minor-release

PiperOrigin-RevId: 355159635
2021-02-03 15:02:32 +00:00
olly
b1920f3a78 Fix ProGuard configuration for 2.13
Note: We only support pro-guard on a best effort basis,
and developers should use R8 whenever possible.

#minor-release

PiperOrigin-RevId: 355129695
2021-02-02 13:06:52 +00:00
tonihei
05fddff84f Modernize bandwidth profile simulator.
Main improvement is to switch away from ExoPlayerTestRunner and to
split out the waiting component so that the same class can be used
from Robolectric tests in the future.

The only functional difference is that that BufferLengthLogAction
is removed completely because the data isn't used downstream and the
method of collecting this data is a bit arbitrary.

PiperOrigin-RevId: 355117850
2021-02-02 13:06:43 +00:00
kimvde
46b8b069ca Transformer: set audio decoder max input size
#minor-release

PiperOrigin-RevId: 354949992
2021-02-01 18:12:14 +00:00
kimvde
1ec326438f Merge MuxerWrapper stop() and release() methods
#minor-release

PiperOrigin-RevId: 354938190
2021-02-01 18:12:05 +00:00
ibaker
ffc1b5bbef Log a warning when SingleSampleMediaPeriod turns a load error into EOS
Without this no error is currently logged or propagated to EventLogger.
The propagation doesn't happen because
MergingMediaSource.ForwardingEventListener only propagates events
originating from the "main" source in the merge:
<unknown commit>

#minor-release

PiperOrigin-RevId: 354902467
2021-02-01 18:11:56 +00:00
andrewlewis
b9065e8dfa Simplify output buffer handling in transformer
We can dequeue as part of getting output buffers (or output buffer info) in
`MediaCodecAdapterWrapper`, which simplifies the caller slightly.

Also try to make minor clarifications in method naming in
`TransformerAudioRenderer`.

#minor-release

PiperOrigin-RevId: 354890796
2021-02-01 18:11:42 +00:00
andrewlewis
91dcf39db5 Simplify feeding codec input in transformer
The caller knows whether it's queued end-of-stream, so we can remove the return
value of the method.

#minor-release

PiperOrigin-RevId: 354888298
2021-02-01 18:11:33 +00:00
olly
35b99d634f Make Cronet extension depend only on common
This also moves DefaultHttpDataSource to common, which seems
sensible, else non-player components that need a DataSource
don't have any useful concrete implementations. We should
think about moving some of the other concrete implementations
to common as well.

PiperOrigin-RevId: 354738925
2021-02-01 18:11:23 +00:00
olly
eb0d8e6f28 Fix nullness issues in DefaultHttpDataSource
This is needed to move it to common, since we don't want to start
adding any nullness exemptions for the common module.

PiperOrigin-RevId: 354734715
2021-02-01 18:11:14 +00:00
andrewlewis
c3bce234ca Improve format propagation in transformer
- Store output format in `MediaCodecAdapterWrapper` when we get a format from
  the codec, instead of creating it on demand.
- Make format building code not audio-specific.
- Remove `MediaCodecAdapterWrapper.getConfigFormat` and instead keep track of
  the input/output formats in the renderer. This will mean that the code still
  works if an audio processor changes the audio format in future.
- Make exceptions thrown during audio rendering use the same (input) renderer
  format.
- Misc other minor cleanup.

#minor-release

PiperOrigin-RevId: 354556619
2021-02-01 18:11:04 +00:00
andrewlewis
afb41123c2 Switch transformer tests to use dump files
Add an interface to muxers to allow tests to pass a dumpable muxer.

#minor-release

PiperOrigin-RevId: 354543388
2021-02-01 18:10:55 +00:00
olly
2b24e88726 Pass full locale code to IMA
IMA can now handle the full locale code properly.

PiperOrigin-RevId: 354528700
2021-02-01 18:10:46 +00:00
Oliver Woodman
c9fce083f3 Merge pull request #8490 from szaboa:dev-2-8435-ssa-color
PiperOrigin-RevId: 354293679
2021-02-01 18:10:35 +00:00
tonihei
ae51e2e1d1 Also fix thread blocking nullness assertion when called from non-Looper
PiperOrigin-RevId: 354268013
2021-02-01 18:10:24 +00:00
krocard
60f3d8168c CastPlayer only depends on common
Thanks to the move of the Player API to common,
the cast player no longer need to depend on core.

#player-to-common

PiperOrigin-RevId: 354257309
2021-02-01 18:10:14 +00:00
tonihei
a60938db96 Fix triggering messages sent from non-Looper threads.
This can happen for instrumented tests that are run on a non-Looper
thread. If these tests send a message to a Looper thread to start the
test procedure, they should just triger the message directly as before.

PiperOrigin-RevId: 354066836
2021-02-01 18:10:05 +00:00
krocard
27d729f8c5 Rollback of 91b595bd27
*** Original commit ***

Update Gradle version to 4.1.1

This was suggested by AndroidStudio.

***

PiperOrigin-RevId: 353887400
2021-02-01 18:09:55 +00:00
krocard
91b595bd27 Update Gradle version to 4.1.1
This was suggested by AndroidStudio.

PiperOrigin-RevId: 353879939
2021-02-01 18:09:45 +00:00
Arnold Szabo
28a3921a6a Add color decoding tests to SsaDecoderTest, remove SubStation Alpha colors" from media.exolist.json. 2021-01-26 22:57:10 +01:00
Arnold Szabo
f8a47bc86d Modify the SsaColor to be more similar to the Optional class. 2021-01-26 21:37:01 +01:00
tonihei
9b3014dd79 Remove randomness from adaptive bitrate tests.
- The order of sample stream (and thus the order in which loads are
  triggered) currently depends on a Set and thus on the hash codes
  of the objects that change with every run. Changing to a List solves
  this problem.
- The FakeAdaptiveDataSet directly created a static Random (with random
  seed) to compute the variation of chunk sizes. Changing this to an
  injected Random object that can always be initialized with the same
  seed also removed this randomness from the tests.

PiperOrigin-RevId: 353878661
2021-01-26 17:13:46 +00:00
tonihei
2e52c0b8d8 Make FakeClock fully deterministic.
This is achieved by only triggering one message at a time. After
triggering a message we send another to ourselves to know when the
following message can be triggered.

Other required changes:
 - The messages need to be sorted correctly (by time and creation order)
 - To prevent deadlocks when one thread is waiting for another,
   we need to add new method to Clock to indicate that the current
   thread is about to wait. This then allows us to trigger messages
   from other threads in FakeClock.
 - AnalyticsCollectorTest needed some adjustments:
   - onTimelineChanged now deterministically arrives after the initial
     timline is already known, so some of the period information changes
     from window only to full period info.
   - The playlistOperations test suffers from a bug that the first frame
     is rendered too early and that's why we now get additional events.

PiperOrigin-RevId: 353877832
2021-01-26 17:13:35 +00:00
tonihei
a318e56d15 Fix FakeClock remove messages behaviour.
We currently only remove messages that have already been sent
to the actual Handler, not the pending ones that are only kept
in the FakeClock. Fix this by also removing matching messages
from the FakeClock list.

PiperOrigin-RevId: 353877049
2021-01-26 17:13:25 +00:00
tonihei
89ea38d155 Handle all messages in FakeClock.
Currently only delayed messages are handled. Change this to handling
all messages so that we have more control over their execution order.

This requires adding a new wrapper type for the Message to support
the obtainMessage + sendToTarget use case.

PiperOrigin-RevId: 353876557
2021-01-26 17:13:15 +00:00
tonihei
06fe0900a9 Remove FakeClock.sleep.
This functionality isn't used and there is no point in supporting
it.

PiperOrigin-RevId: 353876038
2021-01-26 17:13:03 +00:00
kimvde
0d85958a76 Fix parsing of Vorbis codec private
- Fix comparison between a byte and 0xFF to avoid conversion of 0xFF to
  byte and to int again (due to numeric promotion).
- Fix addition of int and byte with most significant bit set. The byte
  was incorrectly promoted to an int negative value.

Issue:#8496
#minor-release
PiperOrigin-RevId: 353865751
2021-01-26 15:59:41 +00:00
gyumin
3e8e3737d6 Add toBundle/fromBundle to AudioAttributes and DeviceInfo
PiperOrigin-RevId: 353864181
2021-01-26 15:59:32 +00:00
ibaker
f69e4be40e Add @RequiresApi(29) to RandomizedMp3Decoder
This is needed for the MediaFormat#getInteger calls in onConfigured().

The end-to-end playback tests this is used for have to run on API 29
anyway (because of ShadowMediaCodec and ShadowMediaCodecList
functionality).

#minor-release

PiperOrigin-RevId: 353858622
2021-01-26 15:59:24 +00:00
christosts
ccf031f9bb BandwidthMeter minor javadoc fix
PiperOrigin-RevId: 353858581
2021-01-26 15:59:15 +00:00
andrewlewis
b1df2f4e4b Elaborate method comments in transformer audio renderer
#minor-release

PiperOrigin-RevId: 353856211
2021-01-26 15:59:06 +00:00
ibaker
3c17aeb761 Remove duplicate release notes
These changes are all in 2.12.3, they shouldn't be in the 2.13.0
section.

#minor-release

PiperOrigin-RevId: 353855677
2021-01-26 15:58:57 +00:00
Arnold Szabo
2241320535 Remove unused static variable 2021-01-25 23:36:50 +01:00
Arnold Szabo
1364c01e09 Improve support of SSA (V4+) PrimaryColour style 2021-01-25 23:35:10 +01:00
ibaker
724ded167c Bump version to 2.13.0
PiperOrigin-RevId: 353655249
2021-01-25 17:38:56 +00:00
andrewlewis
e696a7c6e2 Use maximum supported channel count for Atmos from API 29
#minor-release

PiperOrigin-RevId: 353649545
2021-01-25 17:38:46 +00:00
olly
3fcc14b3c2 OkHttp/Rtmp extensions: Remove dependency on core
They only require common. This allows their use for non-playback networking
without requiring the user to depend on the whole of core. I will also make
the same change for Cronet, although this needs a little more work.

PiperOrigin-RevId: 353649388
2021-01-25 17:38:36 +00:00
olly
a1f06987eb Replace non-inclusively named constant
Issue: #7565
PiperOrigin-RevId: 353649187
2021-01-25 17:38:26 +00:00
krocard
b0258e7192 Move Player in common
This is the last CL to move Player in common.

#player-to-common

PiperOrigin-RevId: 353642347
2021-01-25 15:37:48 +00:00
krocard
ec43735054 Split mutations method out of TrackSelection
`TrackSelection` had mutation methods which were to be called only
internally by ExoPlayer components but were exposed in the
public `Player` interface.

The mutation methods have been moved out of `TrackSelection`
to a new class `ExoTrackSelection`.

Current track related read-only method have also been moved out,
because they are actually something quite unclear.
Even for a single item playlist, it's the track being buffered rather
than the track being played, which is unclear.
But when you have a playlist it starts to get really confusing,
because if the next item is being buffered, then it's actually
the last track to be buffered in the currently playing item.
As a final aside, the implementations don't do proper thread synchronization
to ensure visibility of updated state by the calling thread.

Exposing those mutable methods in the public `Player` interface
was problematic because they leaking internal concepts of `ExoPlayer`.
This is also required to minimize the `Player` interface for long term
stability.

`ExoTrackSelection` is a subclass of `TrackSelection`.
This is not ideal as an `TrackSelection` implementation could
break the current immutability.
This was done in order for this refactor to be simpler.
A future patch will fully split the two classes.

All `MediaPeriod` and `Sources` had to be updated to use the new
`TrackSelection` dynamic aspect class name.
An alternative would have been to break ExoPlayer's public API, keeping
`TrackSelection` as the dynamic aspect name, and calling the public static
aspect class `TrackSelectionState` or similar.
Nevertheless, while it would have impacted less files, it would have
many more small apps and casual users of ExoPlayer.

#player-to-common

PiperOrigin-RevId: 353637924
2021-01-25 15:37:38 +00:00
olly
b069a567ea Rename DUMMY_MEDIA_ID and related cleanup
Issue: #7565
PiperOrigin-RevId: 353616594
2021-01-25 15:37:28 +00:00
ibaker
5433b83a81 Upgrade Robolectric to 4.5 (from 4.5-alpha-3)
PiperOrigin-RevId: 353615959
2021-01-25 15:37:18 +00:00
christosts
3b08a792bb Fix bug in CronetDataSource
This change fixes a bug in CronetDataSource when it makes a Range
request but the server does not support Range requests and returns the
entire resource. Before the fix, the CronetDataSource would read more
bytes than the intended range.

PiperOrigin-RevId: 353614477
2021-01-25 15:37:08 +00:00