19400 Commits

Author SHA1 Message Date
tofunmi
addfd3e986 Create ExternallyLoadedMediaPeriod and ExternallyLoadedMediaSource
PiperOrigin-RevId: 571292394
2023-10-06 03:54:19 -07:00
tonihei
89d01981bc Deprecate decode-only flag.
The flag is no longer used by our components and only set and checked
in a few places to guarantee compatiblity with existing renderers and
decoders that still use it.

The flag will be removed in the future due to its design limitations.

#minor-release

PiperOrigin-RevId: 571291168
2023-10-06 03:44:14 -07:00
simakova
d9cf350eb0 Add CompositionPlayer to the Transformer demo app
PiperOrigin-RevId: 571284291
2023-10-06 03:05:56 -07:00
tonihei
f8d2e362a5 Rename FfmpegVideoRenderer to ExperimentalFfmpegVideoRenderer
This makes it clearer that this class can't be used yet.

PiperOrigin-RevId: 571267898
2023-10-06 01:50:54 -07:00
ibaker
002ee0555d Update TextRenderer to handle CuesWithTiming instances directly
The existing `Subtitle` handling code is left intact to support the
legacy post-`SampleQueue` decoding path for now.

This also includes full support for merging overlapping `CuesWithTiming`
instances, which explains the test dump file changes, and which should
resolve the following issues (if used with the
decoder-before-`SampleQueue` subtitle logic added in
5d453fcf37):

* Issue: google/ExoPlayer#10295
* Issue: google/ExoPlayer#4794

It should also help resolve Issue: androidx/media#288, but that will also require
some changes in the DASH module to enable pre-`SampleQueue` subtitle
parsing (which should happen soon).

#minor-release

PiperOrigin-RevId: 571021417
2023-10-05 08:17:23 -07:00
tonihei
49b1e0bbc2 Remove release notes lines added by merge conflict
#minor-release

PiperOrigin-RevId: 571005643
2023-10-05 07:09:43 -07:00
ibaker
6057b59723 Add tests for CuesWithTiming.endTimeUs
#minor-release

PiperOrigin-RevId: 570988195
2023-10-05 05:51:54 -07:00
tofunmi
9cc75ca52e Change equalTo check in ImagePlaybackTest to atLeast
The aim of this test is to make sure the image is onscreen for the right amount of time, so to drive down flakes from the decoder taking too long, change this to an atLeast check

#minor-release

PiperOrigin-RevId: 570988044
2023-10-05 05:49:49 -07:00
tonihei
87f1b4252e Update documentation wrongly referencing the decode-only flag
#minor-release

PiperOrigin-RevId: 570973457
2023-10-05 04:32:40 -07:00
samrobinson
068d420ba2 Remove experimental keepAudioTrackOnSeek.
PiperOrigin-RevId: 570966027
2023-10-05 03:52:51 -07:00
huangdarwin
b153a271a3 Test: Ignore failing tests fixed in newer API versions.
PiperOrigin-RevId: 570954436
2023-10-05 02:53:15 -07:00
huangdarwin
40b990f5fa GL: Use only the index location returned by glGetAttribLocation
location and index are mostly equivalent, except that it's possible that location is more up-to-date than index, so we can just always use location.

PiperOrigin-RevId: 570950407
2023-10-05 02:35:11 -07:00
michaelkatz
42c1846984 Use RTSP Setup response timeout value in KeepAliveMonitor intervalMs
Set KeepAliveMonitor to send a keep-alive message at half the timeout value, if provided, by the RTSP Setup response.

Issue: androidx/media#662
PiperOrigin-RevId: 570946237
2023-10-05 02:13:54 -07:00
ibaker
bf7b91e57e Add CuesWithTiming.endTimeUs
In most cases this is more useful than `durationUs`.

We will keep `durationUs`, and the constructor will continue to take
`startTimeUs` and `durationUs`, to allow for use-cases where we don't
know the start time but still want to indicate a duration (this will be
used to implement CEA-608 timeout).

#minor-release

PiperOrigin-RevId: 570944449
2023-10-05 02:04:26 -07:00
huangdarwin
89a1bb528d Flush: VideoFrameProcessor Image Input.
Much simpler than ExternalTextureManager flushing, because
ExternalTextureManager complexity is due to decoder race condition behavior,
which we won't see for Bitmaps due to a more well-defined interface.

This is needed to test texture output flushing.

PiperOrigin-RevId: 570896363
2023-10-04 21:20:23 -07:00
tonihei
a03e20fe6c Add Decoder.setOutputStartTimeUs and use it in extension decoders
This gets rid of the reliance on the decode only flag that is still
set on input buffers to the decoder if they are less than the start
time.

We still need to set and check the decode-only flag in SimpleDecoder
to ensure compatbility with custom decoders that use the flag while
it's not fully removed.

PiperOrigin-RevId: 570736692
2023-10-04 10:37:25 -07:00
tonihei
64fe863f31 Remove wrong Javadoc
The corresponding logic has been removed in 796781d4c3

#minor-release

PiperOrigin-RevId: 570729509
2023-10-04 10:13:12 -07:00
tonihei
9ef1c20e7a Replace ENCODING_DTS_UHD_P2 value by reference to platform constant
#minor-release

PiperOrigin-RevId: 570696505
2023-10-04 08:09:04 -07:00
tofunmi
572fb4676c Update getName of BitmapFactoryImageDecoder
cleanup from 8f5835c51c

#minor-release

PiperOrigin-RevId: 570663437
2023-10-04 05:23:32 -07:00
tonihei
8e2bf21011 Add onAudioTrackInitialized/Released events
This is useful for analytics and understanding player behavior
during transitions.

#minor-release

PiperOrigin-RevId: 570623227
2023-10-04 01:50:15 -07:00
rohks
a879bae1ee Add nullness annotations to DecoderVideoRenderer
Also fixed a bug where format queue was polled with wrong timestamp value.

#fixit

PiperOrigin-RevId: 570420304
2023-10-03 10:06:35 -07:00
rohks
7a91474af9 Add nullness annotations to MediaCodecRenderer
#fixit

PiperOrigin-RevId: 570403923
2023-10-03 09:05:49 -07:00
tonihei
796781d4c3 Move decode-only handling out of MetadataDecoder interface logic
The interface requires the implementation to return null if the
decode-only flag is set. So instead of setting the flag and returning
null, we can simply not call the method and assume it's null.

The only reason where this wouldn't work is if the metadata format
has keyframe-like logic and requires previous metadata to decode
the next one. This is not something we came across before and it seems
ignorable. If that feature is needed in the future, we should instead
add a method to MetadataDecoder to set the first output timestamp.

#minor-release

PiperOrigin-RevId: 570399838
2023-10-03 08:49:18 -07:00
michaelkatz
da06bf057a Disable offload scheduling at set up for track transition
While sleeping for offload, position is estimated based on time playing. If asleep and AudioTrack is reused, then the position will keep incrementing as the subsequent item plays. That is until wakeup when playing position is updated to the timestamp of the second item. Offload scheduling should be disabled until track transitions fully.

PiperOrigin-RevId: 570397140
2023-10-03 08:37:31 -07:00
jbibik
bd5a3920b8 Add DashPlayback test with sideloaded TTML subtitles
The test is hidden behind the Ignore annotation due to some flakiness just like `webvttInMp4`. However, it will be removed when the subtitle parsing is moved to a pre-sample-queue architecture.

#minor-release

PiperOrigin-RevId: 570376275
2023-10-03 07:08:58 -07:00
jbibik
b83f12c4ba Add Dumper support for outputting multiline strings
PiperOrigin-RevId: 570348425
2023-10-03 04:47:31 -07:00
tonihei
c8aac24ffd Explicitly mark DecoderOutputBuffer as shouldBeSkipped if needed
In some cases, SimpleDecoder output needs to be skipped for rendering
because the decoder produces no data. This is one of the remaining
usages of BUFFER_FLAG_DECODE_ONLY at the moment and can be more
directly solved without using the flag. SimpleDecoder still needs to
check the flag though for backwards compatbility with custom decoders
while the flag is not completely removed.

PiperOrigin-RevId: 570345233
2023-10-03 04:28:21 -07:00
samrobinson
1bb501ab50 Deprecate experimental keepAudioTrackOnSeek methods.
#minor-release

PiperOrigin-RevId: 570340714
2023-10-03 04:09:49 -07:00
ibaker
9edbfa974a Fix Util.scaleLargeValue/Timestamp to handle negative numbers
#minor-release

PiperOrigin-RevId: 570337535
2023-10-03 03:52:02 -07:00
huangdarwin
fa51f8cd4d Effect: Move common statement out of switch/case
PiperOrigin-RevId: 570323141
2023-10-03 02:37:48 -07:00
huangdarwin
8953f26a5c Test: Move OpenGL tone mapping capabilities check to utility method.
PiperOrigin-RevId: 570316091
2023-10-03 02:00:55 -07:00
huangdarwin
9ca5d50b2d Test: Ignore failing tests fixed in newer API versions.
PiperOrigin-RevId: 570061196
2023-10-02 07:34:58 -07:00
Copybara-Service
b06d823238 Merge pull request #574 from hugohlln:main
PiperOrigin-RevId: 570037211
2023-10-02 05:36:28 -07:00
microkatz
f13a2e7e0f Updated method description to take into account the new void return type 2023-10-02 11:29:15 +00:00
microkatz
cd29d4637d Simplified class fields and method parameters due to using ArrayList 2023-10-02 11:29:15 +00:00
microkatz
34a0e3fa09 Updated typings to be List rather than ArrayList 2023-10-02 11:29:15 +00:00
microkatz
4b1b570c80 Added release note about DASH change 2023-10-02 11:29:15 +00:00
microkatz
8a6f4a91e9 Format with google-java-format 2023-10-02 11:29:15 +00:00
hhouillon
355484ebfb UrlTemplate uses ArrayLists instead of Arrays 2023-10-02 11:29:15 +00:00
Hugo Houillon
81e2472034 Dash UrlTemplate parses template using ArrayLists 2023-10-02 11:29:15 +00:00
hhouillon
022444e751 Edit DASH UrlTemplate identifiers parser and add UrlTemplate tests 2023-10-02 11:29:15 +00:00
hhouillon
eb5cbd902b DASH UrlTemplate parses template if it contains more than one time each identifier 2023-10-02 11:29:15 +00:00
christosts
144bd72236 MediaCodeVideoRenderer: flush video sink before codec
When seeking, we must first flush the video sink so it stops
using any SurfaceTextures before flushing MediaCodec.

#minor-release

PiperOrigin-RevId: 570015998
2023-10-02 04:03:23 -07:00
ibaker
e9bf41ca04 Mark test_session_current support app as MultiDexApplication
PiperOrigin-RevId: 570015354
2023-10-02 03:59:36 -07:00
bachinger
52d9fbff73 Update playlist UI when playlist is updated
When changing the playlist on Android Auto the UI of the
activity needs to be kept in sync.

PiperOrigin-RevId: 569528785
2023-09-29 10:42:58 -07:00
ibaker
8f5835c51c Rename DefaultImageDecoder to BitmapFactoryImageDecoder
This reflects the documented behaviour of this class.

#minor-release

PiperOrigin-RevId: 569475137
2023-09-29 06:27:24 -07:00
claincly
34dddfe9d5 Add previewing specific video graph.
PiperOrigin-RevId: 569473178
2023-09-29 06:16:16 -07:00
christosts
0b4638af15 ExportTest: make 8K asset and trim
Move remote 8K file to local and trim to 320ms.

Trim done with ffmpeg:

`ffmpeg -i {remote_file} -t 0.3 -c:v copy -c:a copy 8k24fps_300ms.mp4`

PiperOrigin-RevId: 569449962
2023-09-29 04:07:40 -07:00
bachinger
cbd23925d5 Add demos/session-automotive module
This change also enables Android Auto support for the
session demo.

PiperOrigin-RevId: 569448376
2023-09-29 04:00:58 -07:00
bachinger
a3b1661513 Bump Media3 version numbers for 1.2.0-alpha02
PiperOrigin-RevId: 569269992
2023-09-28 13:15:46 -07:00