13420 Commits

Author SHA1 Message Date
Rakesh Kumar
f2e0953643 Updated way to create a formatBuilder
Change-Id: I2c8eb8d6ee28d8c044d71db042f3b186ea5762f3
2022-03-03 19:59:56 +05:30
Rakesh Kumar
f6a7cceaaf Add support for RTSP VP8
Added VP8 RTP packet reader and added support for VP8 playback
through RTSP.

Change-Id: Ie22ab79a234f61681cf95886a6ed8104a742f056
2022-02-24 21:02:41 +05:30
samrobinson
4b72335d51 Add a TestTransformationResult class for additional test values.
This class will contain additional details such as frame count, once implemented.

#mse-bug-week

PiperOrigin-RevId: 429567678
2022-02-18 16:42:07 +00:00
Ian Baker
f3eb6e1376 Merge pull request #36 from ittiam-systems:rtp-h265
PiperOrigin-RevId: 429566102
2022-02-18 16:41:12 +00:00
claincly
99074f703a Improve exception message.
We use the `createForCodec` method that does not take a `MediaFormat` during
transformation, the error message always includes "no configured MediaFormat",
which is false.

PiperOrigin-RevId: 429553573
2022-02-18 16:40:19 +00:00
olly
9238dc758d Add Matroska Extractor Test Sample For Opus
PiperOrigin-RevId: 429386479
2022-02-18 14:56:25 +00:00
olly
c80d30ebce Avoid Clearing Supplemental Data Flag In MatroskExtractor
PiperOrigin-RevId: 429368911
2022-02-18 14:56:25 +00:00
olly
f1e59f8001 Libopus Support For WebM DiscardPadding
PiperOrigin-RevId: 429364728
2022-02-18 14:56:25 +00:00
hschlueter
cf85d1bdc8 Only allow HEVC output MIME selection in demo for API>=24.
The muxer doesn't support HEVC below API 24. The is documented in
the TransformationRequest javadoc and the Transformer.Builder will
throw if HEVC is requested below API 24 so the option should not
be part of the demo for those devices.

#mse-bug-week

PiperOrigin-RevId: 429343805
2022-02-18 14:56:25 +00:00
olly
fdd3973a09 Fix potential NPE in test_utils WebServerDispatcher
PiperOrigin-RevId: 429338648
2022-02-18 14:56:01 +00:00
Ian Baker
38717ce969 Reformat some javadoc 2022-02-18 14:54:02 +00:00
samrobinson
061aac7ab2 Add new public 4k60 portrait video to the demo application.
#mse-bug-week

PiperOrigin-RevId: 429323642
2022-02-18 14:52:48 +00:00
olly
f22025cc5e Simplify TracksInfo API
isTypeSupportedOrEmpty is very specific and a little hard to
understand unless you know the one thing it's useful for. This
commit replaces it with isTypeSupported, which can be used in
conjunction with the recently added containsType method.

PiperOrigin-RevId: 429312712
2022-02-17 16:15:14 +00:00
olly
265dd079e9 Move track type from TrackGroupInfo to TrackGroup
The track type is derived solely from the content. It does
not depend on any runtime properties such as the player's
capabilities of user track selection. Hence it belongs in
TrackGroup rather than TrackGroupInfo.

Note that this avoids TrackSelectionOverride from having to
re-derive the track type internally.

PiperOrigin-RevId: 429303312
2022-02-17 16:14:16 +00:00
aquilescanta
6b606b9987 Depend on llvm-xy bin utils instead of GNU's binutils
NDK 23 removes GNU's bin utils. More info in
https://android.googlesource.com/platform/ndk/+/master/docs/BuildSystemMaintainers.md#binutils.

LLVM bin utils are available in all modern NDK versions.

#minor-release
Issue: google/ExoPlayer#9933
PiperOrigin-RevId: 429299806
2022-02-17 15:08:04 +00:00
samrobinson
7a5b3b3e5c Save the bitmap produced by the FrameEditorDataProcessingTest to cache.
The bitmap can then be retrieved through ADB.

#mse-bug-week

PiperOrigin-RevId: 429293231
2022-02-17 15:02:09 +00:00
olly
09772908b3 Make sure native library loads use correct class loader
Merge of https://github.com/google/ExoPlayer/pull/9934

#minor-release

PiperOrigin-RevId: 429259055
2022-02-17 15:00:31 +00:00
hschlueter
61354497e3 Add enable fallback option to transformer demo.
Also invert disableFallback parameter in DefaultEncoderFactory
to enableFallback. Fallback is still enabled by default.

PiperOrigin-RevId: 429253266
2022-02-17 14:59:32 +00:00
bachinger
15995d3dc5 Use service context in DefaultActionFactory
We need to use a Service to create the pending intents in the
`DefaultActionFactory`.

PiperOrigin-RevId: 429115746
2022-02-17 11:52:24 +00:00
andrewlewis
b96787d374 Avoid attempting to mux out of order pre-API 25
Calling `MediaMuxer.writeSampleData` can block indefinitely on old API versions. It is better not to call this method to fail quickly with an exception rather than getting stuck.

Based on on-device testing media muxer doesn't generally handle out of order samples before API 25. There are a small number of devices where this does succeed but it seems preferable to turn this off everywhere to keep the code simple and have consistent behavior. Once we switch to in-app muxing this limitation will no longer apply.

#mse-bug-week

PiperOrigin-RevId: 429070255
2022-02-17 11:52:24 +00:00
bachinger
6978746f4f Clear ad playback state map when AdsLoader is released
#minor-release

PiperOrigin-RevId: 429067634
2022-02-17 11:52:24 +00:00
bachinger
5ee9c48244 Integrate IMA SSAI samples in main demo app
PiperOrigin-RevId: 429059793
2022-02-17 11:52:24 +00:00
bachinger
0842295a88 Make AdsLoader.State implement Bundleable
This allows the AdsLoader.State to be stored in savedInstanceState

#minor-release

PiperOrigin-RevId: 429057697
2022-02-17 11:52:24 +00:00
samrobinson
1af841698f Add exception information to AndroidTest analysis file.
Tested:
  Verified that the additional information is available through
  instrumentation tests, as well as via manual testing.

#mse-bug-week

PiperOrigin-RevId: 429038695
2022-02-17 11:52:23 +00:00
andrewlewis
677c5dc6d4 Skip tests requiring out of order muxing pre API 25
PiperOrigin-RevId: 429029496
2022-02-17 11:52:23 +00:00
christosts
b59869ede3 Create BitmapLoader
Create BitmapLoader component for loading artwork
images. Add the SimpleBitmapLoader which fetches images
from HTTP/HTTPS endpoints. Integrate BitmapLoader in
DefaultMediaNotificationProvider.

PiperOrigin-RevId: 429010249
2022-02-17 11:52:23 +00:00
bachinger
b8687a3111 Copy playback configuration when creating the content media item
#minor-release

PiperOrigin-RevId: 429006934
2022-02-17 11:52:23 +00:00
kimvde
f8d8bfb664 Handle player release timing out in transformer
- The resources were released twice before, which is not necessary since
  the MSG_RELEASE message is already in the internal player queue.
- The demo app was failing because the stop watch was stopped in
  onTransformationError after being reset.

#minor-release
#mse-bug-week

PiperOrigin-RevId: 428794426
2022-02-17 11:52:23 +00:00
olly
9137947797 Add TracksInfo methods for track selection UI
We need TracksInfo.hasTracksOfType to determine which tabs to
display in TrackSelectionDialog.

We need TrackGroupInfo.isAdaptiveSupported to determine whether
to allow multiple selection (check boxes) or not (radio buttons).

PiperOrigin-RevId: 428793739
2022-02-17 11:52:23 +00:00
hschlueter
3cd23de1cb Split GlFrameProcessor out of FrameEditor.
The GlFrameProcessor handles everything related to the GLSL program,
the FrameEditor manages the GL context and the data flow including
the input SurfaceTexture and output EGLSurface.

This will be split up further in follow-up CLs so that
GlFrameProcessors can be chained. At this CL, there are no
functional changes intended.

PiperOrigin-RevId: 428779179
2022-02-17 11:52:23 +00:00
bachinger
0db8047756 Store ad playback state in AdsLoader for resume after backgrounding
#minor-release

PiperOrigin-RevId: 428763656
2022-02-17 11:52:23 +00:00
hschlueter
9370665b79 Track presentation timestamps in FrameEditor.
PiperOrigin-RevId: 428763554
2022-02-17 11:52:23 +00:00
bachinger
b22273de01 Disable IMA SSAI DASH live streams for now
#minor-release

PiperOrigin-RevId: 428761508
2022-02-17 11:52:23 +00:00
huangdarwin
78b461f94c Transformer GL: Update TODOs.
Document some suboptimal things, and remove TODOs that were
fixed already or no longer relevant. Comment-only change.

PiperOrigin-RevId: 428749344
2022-02-17 11:52:23 +00:00
olly
8b01d07512 Flatten TrackSelectionParameters
PiperOrigin-RevId: 428747243
2022-02-17 11:52:23 +00:00
bachinger
91d4add082 Prevent adding multiple IMA SSAI media source instances to the playlist
Currently only a single instance of ImaServerSideAdInsertionMediaSource is
supported at the same time in a playlist. This change makes sure that an
attempt to add multiple instances is prevented by throwing a an exception.

#minor-release

PiperOrigin-RevId: 428743140
2022-02-17 11:52:23 +00:00
bachinger
d681e264aa Skip played server side inserted ads in a single period window
This change makes sure played server side ads are skipped in a single period
timeline. It avoids creating an ad-MediaPeriodInfo for played postrolls and
creates a content info instead. It also sets the end position for content infos
that terminate the stream before the stream is actually finished. This prevents
the player from continue playing the remaining media delivered by the
MediaPeriod.

We also make sure that the discontinuity of played ads are not reported because
there is actually no discontinuity.

#minor-release

PiperOrigin-RevId: 428734387
2022-02-17 11:52:23 +00:00
hschlueter
4dae8c75a8 Remove old TODO.
PiperOrigin-RevId: 428732950
2022-02-17 11:52:23 +00:00
bachinger
f3cc5327cd Do not manipulate the duration of SSAI periods in FakeTimeline
#minor-release

PiperOrigin-RevId: 428727560
2022-02-17 11:52:23 +00:00
bachinger
1a31faaeee Reset stream manager in AdsLoader.release()
This prevents a stack trace that is shown in the logs when the stream manager is
released after the activity was stopped. In this case the call to
`streamManager.destroy()` coming from `releaseSourceInternal()` of the media
source is too late and produces an error saying `Application attempted to call on
a destroyed WebView`. The error has no effect but it's nice to not have this
stack trace in the logs.

PiperOrigin-RevId: 428574231
2022-02-17 11:52:17 +00:00
bachinger
741ab34a63 Make AdsLoader.addMediaSourceResources package private.
#minor-release

PiperOrigin-RevId: 428565444
2022-02-17 10:39:15 +00:00
andrewlewis
1afba9676e Fix debug frame showing through player on old devices
PiperOrigin-RevId: 428524300
2022-02-17 10:38:13 +00:00
olly
76839a02d6 Add getFormat and length to TrackGroupInfo
PiperOrigin-RevId: 428520090
2022-02-17 10:37:20 +00:00
hschlueter
015592f534 Add glClear call before drawing.
PiperOrigin-RevId: 428492031
2022-02-17 10:36:22 +00:00
bachinger
28b8ae7076 Seek to start position when reusing the last used shared period
The last used shared media period is reused after all media periods have been
released. In case the sample streams are already filled up, they need to be
reset or they download samples from the current position up to the seek
position. This causes long buffering states or load stuck exceptions.

A seek when reusing the shared period takes care for reseting the period or
internally seeks to the current position in the already available samples.

#minor-release

PiperOrigin-RevId: 428484187
2022-02-17 10:35:31 +00:00
tonihei
6048ca2faa Make usage of live minDurationForQualityIncrease more consistent
We have two ways to choose the minDurationForQualityIncreaseMs value in
AdaptiveTrackSelection: use the configured value for non-live or when
enough buffered data is available, or use a fraction of the available
duration to allow switching when playing close to the live edge.

The decision point when to use which value isn't quite consistent because
we compare against availableDurationUs before making the adjustments. This
means there is range of values where no up-switching is possible despite
perfect buffering. Fix this by choosing the minimum of both values.

Issue: google/ExoPlayer#9784

#minor-release

PiperOrigin-RevId: 428474332
2022-02-17 10:34:42 +00:00
bachinger
6197a712ff Use content timeline to get ad group index and ad index in ad group
The timeline used to map ad groups to periods needs to report the original content period duration without subtracting the serverside inserted ad duration. When marking played ads in onPositionDiscontinuity, the public timeline has been used which crashed the app when the ads media source is playing on a window index different to zero (in a playlist).

#minor-release

PiperOrigin-RevId: 428465833
2022-02-17 10:33:44 +00:00
olly
f3a9c6f539 Rewrite AnalyticsCollector to use new track APIs
PiperOrigin-RevId: 428455848
2022-02-17 10:32:55 +00:00
andrewlewis
6adf2f8c91 Improve transformer activity layout
On Samsung S21 with light theme the debug labels weren't showing up because the player view was visible (with a black background) while the transformation was in progress, matching the debug label text color. Hide the player view until the transformation is complete to fix this.

Also tweak the layout slightly to add space between the card border and the labels.

#mse-bug-week

PiperOrigin-RevId: 428455824
2022-02-17 10:31:56 +00:00
krocard
743a46e1b2 Do not reference AnalyticsCollector in common constructor
This prevents it to be stripped by R8 if a custom one is
passed.

#minor-release

PiperOrigin-RevId: 428034999
2022-02-17 10:30:59 +00:00