19537 Commits

Author SHA1 Message Date
Alexey Rochev
adee4626d3 ffmpeg: reallocate output buffer dynamically
With FFmpeg we can't determine size of output buffer ahead of time for all codecs,
so we need to reallocate it when needed instead of simply failing.
2023-10-31 12:25:32 +00:00
ibaker
3a527a888a Split openAssetFileDescriptor from RawResourceDataSource.open
This moves the invocation of `transferInitializing` slightly earlier,
but this is consistent with other `DataSource` implementations like
`OkHttpDataSource`.

PiperOrigin-RevId: 578137236
2023-10-31 04:38:57 -07:00
ibaker
88f554c74b Add cross-package support to RawResourceDataSource
This has been documented to work since this class was created, but until
now we were always trying to resolve using the current application's
`Resources.getIdentifier` method. This commit changes to resolve to the
other app's `Resources` object if the package name doesn't match the
current package.

This will only work if the current app has package-visibility to the
destination package: http://g.co/dev/packagevisibility

This is hard to test because to do so robustly requires being able to
guaranteed that another test APK will be installed with a known raw
resource inside it.

PiperOrigin-RevId: 577864992
2023-10-30 09:17:45 -07:00
ibaker
26789b56c2 Remove unecessary proguard config symlink
PiperOrigin-RevId: 577858121
2023-10-30 08:53:51 -07:00
ibaker
841cdf170b Reduce HlsMediaPeriod to package-private visibility
This type shouldn't be directly depended on from outside the HLS
package.

PiperOrigin-RevId: 577833188
2023-10-30 07:17:52 -07:00
ibaker
db1ab1dcf3 Remove stray parentheses from release notes
#minor-release

PiperOrigin-RevId: 577809964
2023-10-30 05:19:34 -07:00
ibaker
e30e43ec3f Migrate EventLogger to non-deprecated AnalyticsListener methods
Also suppress a warning about unused constructor parameters.

#minor-release

PiperOrigin-RevId: 577795245
2023-10-30 04:05:46 -07:00
jbibik
1ac6263869 Test DASH playback + standalone WebVTT parsed during extraction
This change applies to standalone WebVTT files linked directly from the manifest.

Since DASH only supports stand-alone IMSC1 (TTML) and WebVTT text files, this change concludes the support extension of text-based subtitle files to be parse during extraction.

PiperOrigin-RevId: 577468830
2023-10-28 08:44:11 -07:00
jbibik
97efa70852 Add DASH support for parsing standalone TTML files during extraction
This change applies to standalone TTML files linked directly from the manifest.

As a result, we no longer have the flakiness in the DashPlaybackTest which uses sidecar-loaded (standalone file) TTML subtitles. We experimentally opt into parsing subtitles during extraction and use SubtitleExtractor in hybrid mode.

PiperOrigin-RevId: 577457256
2023-10-28 06:59:45 -07:00
jbibik
1359b0147d Add an HLS End-to-End test with WebVtt sidecar subtitles
These subtitles are parsed using the old-flow, i.e. after decoding.

PiperOrigin-RevId: 577452579
2023-10-28 06:15:24 -07:00
ibaker
e8cca688ad Bump okhttp dependency to 4.12
Issue: androidx/media#768
PiperOrigin-RevId: 577208115
2023-10-27 08:34:19 -07:00
sheenachhabra
5b0be4e8b0 Create unique name for export output file.
With pause/resume functionality coming in, we need the output file
path to be different from the previous one.

PiperOrigin-RevId: 577175540
2023-10-27 06:12:23 -07:00
huangdarwin
fed88cf6f5 Flush: Disallow flushing when there's no active input.
Throws when calling flush when there's no active input, for example
before an input stream is registered or after all output streams have
ended.

PiperOrigin-RevId: 577165419
2023-10-27 05:23:38 -07:00
ibaker
dd6306e1ba Rollback of a19f577976
PiperOrigin-RevId: 577139027
2023-10-27 03:12:19 -07:00
huangdarwin
346b9257ba Flush: VideoFrameProcessor texture output
PiperOrigin-RevId: 576928149
2023-10-26 11:06:04 -07:00
claincly
841b4fba9a Fix GL releasing surface that doesn't need releasing
PiperOrigin-RevId: 576545767
2023-10-25 09:05:11 -07:00
sheenachhabra
1e2815cade Simplify Mp4ExtractorWrapper implementation
Changes includes:
1. Create static factory method and hide constructor.
2. Move all the fetching logic to init() method.

PiperOrigin-RevId: 576544902
2023-10-25 09:02:02 -07:00
claincly
3204da41fe Add performance test for composition previewing
PiperOrigin-RevId: 576509031
2023-10-25 06:22:16 -07:00
huangdarwin
e91ce868ad Flush: Add javadoc to mention flush limitation.
PiperOrigin-RevId: 576482193
2023-10-25 04:10:32 -07:00
sheenachhabra
fe6305931d Add moto g(20) API 30 in the allowed frame dropping list
This is a workaround to avoid frame dropping.

PiperOrigin-RevId: 576467065
2023-10-25 03:07:08 -07:00
Googler
8796b2e21e Add isPrioritizeImageOverVideoEnabled to TrackSelectionParameters
This CL adds an isPrioritizeImageOverVideoEnabled flag to
TrackSelectionParameters and an API to set the flag value.

The flag will be used by DefaultTrackSelector to determine whether
to select an image track if both an image track and a video track are available.

PiperOrigin-RevId: 576175162
2023-10-24 10:01:22 -07:00
ibaker
e7a255cfbb Add httpengine module to core_settings.gradle
PiperOrigin-RevId: 576166099
2023-10-24 09:32:10 -07:00
rohks
00943a0a73 Add com.github.philburk:jsyn to JAR list
#minor-release

PiperOrigin-RevId: 576148893
2023-10-24 08:32:07 -07:00
tofunmi
beed1bd76e Pass initial timestamp offset to EncodedSampleExporter
When transmuxing, we usually only need to offset the timestamp by the position of a mediaItem in a sequence.

Trim optimization introduces another type of offset: for the transmux of the second part of the video we need to offset the timestamps by the total duration already trancoded by transformer.

PiperOrigin-RevId: 576134656
2023-10-24 07:39:23 -07:00
rohks
d6b11738e2 Move HttpEngineDataSource release note to unreleased section
PiperOrigin-RevId: 576127741
2023-10-24 07:04:53 -07:00
huangdarwin
a8a590c305 Effect: Clarify flush behavior in javadoc
PiperOrigin-RevId: 576118064
2023-10-24 06:13:22 -07:00
claincly
1fc34676d9 Make sure effects are applied on the correct frame
The events happens in the following order, assuming two media items:

1. First media item is fully decoded, record the last frame's pts
  - Note frame processing is still ongoing for this media item
2. Renderer sends `onOutputFormatChanged()` to signal the second media item
3. **Block sending the frames of the second media item to the `VideoSink`**
4. Frame processing finishes on the first media item
5. The last frame of the first media item is released
6. **Reconfigure the `VideoSink` to apply new effects**
7. **Start sending the frames of the second media item to the `VideoSink`**

This CL implements the **events in bold**

PiperOrigin-RevId: 576098798
2023-10-24 04:45:05 -07:00
claincly
e8adbd9075 Require duration in EditedMediaItem in composition previewing
Adds an additional field for actual presentation duration of the
EditedMediaItem

PiperOrigin-RevId: 576090574
2023-10-24 04:09:14 -07:00
tofunmi
771d203204 ExoAssetLoaderRenderer:Drop negative timestamp buffers when transmuxing
Prevents queuing unneeded buffers when transmuxing. (we already do this when transcoding).

PiperOrigin-RevId: 576080462
2023-10-24 03:21:56 -07:00
Copybara-Service
64d93eb0d1 Merge pull request #710 from loki666:patch-2
PiperOrigin-RevId: 575817952
2023-10-23 07:58:17 -07:00
christosts
71602767ca Restructure TrackEvent.populateFrom() 2023-10-23 14:44:27 +00:00
Philippe Simons
a06430a513 Update TrackEvent.java 2023-10-23 14:32:03 +00:00
Philippe Simons
b27b65199a Update TrackEvent.java 2023-10-23 14:32:03 +00:00
Philippe Simons
fc2099dede MIDI: Ignore SysEx messages
ignore SysEx messages instead of choking
2023-10-23 14:32:03 +00:00
rohks
105bdf57d8 Reorder RELEASENOTES to move unreleased changes to correct section
#minor-release

PiperOrigin-RevId: 575807109
2023-10-23 07:06:46 -07:00
simakova
1ba1998e8d Update param description in TimestampWrapper
PiperOrigin-RevId: 575806256
2023-10-23 07:02:09 -07:00
rohks
9d3d7abdc6 Bump Media3 version numbers for 1.2.0-rc01
#minor-release

PiperOrigin-RevId: 575805495
2023-10-23 06:57:55 -07:00
rohks
7202f5d4de Update RELEASENOTES for 1.2.0-rc01 release
#minor-release

PiperOrigin-RevId: 575795800
2023-10-23 06:10:31 -07:00
michaelkatz
4515a0c3f2 Fallback to legacy sizerate check for H264 if CDD PerfPoint check fails
Some devices supporting Performance Points for decoder coverage are missing coverage over the CDD requirements for H264. For these cases ExoPlayer should fall back to legacy resolution and frame rate support checks. If there is an H264 stream evaluated as a `PerformancePointCoverageResult` of `COVERAGE_RESULT_NO`, then ExoPlayer checks for coverage of the [720p CDD requirement](https://source.android.com/docs/compatibility/10/android-10-cdd#5_3_4_h_264).

Issue: google/ExoPlayer#10898

Issue: androidx/media#693
PiperOrigin-RevId: 575768836
2023-10-23 03:49:50 -07:00
bachinger
a79d44edc5 Use MediaSessionImpl.onMediaButtonEvent() to dispatch key events
This change moves the handling of any media button event into
`MediaSessionImpl.onMediaButtonEvent(intent)`. This includes
the double click handling from `MediaSessionLegacyStub`.

The advantage is that everything is in one place which allows
to offer `MediaSession.Callback.onMediaButtonEvent` with which
an app can override the default implementation and handle media
buttons in a custom way.

Media button events can originate from various places:

- Delivered to `MediaSessionService.onStartCommand(Intent)`
  - A `PendingIntent` from the notification below API 33
  - An `Intent` sent to the `MediaButtonReceiver` by the system dispatched
    to the service
- Delivered to `MediaSessionCompat.Callback.onMediaButtonEvent(Intent)`
  implemented by `MediaSessionLegacyStub` during the session is active
  - Bluetooth (headset/remote control)
  - Apps/system using `AudioManager.dispatchKeyEvent(KeyEvent)`
  - Apps/system using `MediaControllerCompat.dispatchKeyEvent(keyEvent)`

Issue: androidx/media#12
Issue: androidx/media#159
Issue: androidx/media#216
Issue: androidx/media#249

#minor-release

PiperOrigin-RevId: 575231251
2023-10-20 08:55:15 -07:00
rohks
a8ab9e2c70 Update translations in the ui module
#minor-release

PiperOrigin-RevId: 575161190
2023-10-20 02:52:30 -07:00
simakova
beb1711d4c Remove CompositionPlayer activity from the transformer demo app
The CompositionPlayer is not ready yet.

Issue: androidx/media#741
PiperOrigin-RevId: 574859927
2023-10-19 07:19:15 -07:00
tonihei
bfd1a2724c Add missing command checks to playback resumption flow
Player methods shouldn't be called if they are not available and the
entry point to the playback resumption flow only checks
COMMAND_PLAY_PAUSE.

#minor-release

PiperOrigin-RevId: 574834148
2023-10-19 05:39:21 -07:00
Copybara-Service
5f80a47081 Merge pull request #728 from lawadr:audio-capabilities-fix
PiperOrigin-RevId: 574829263
2023-10-19 05:18:21 -07:00
claincly
2673b64371 Ignore 8k export test on incapable devices
And add a test to cover 8k transcode to lower resolution

PiperOrigin-RevId: 574809781
2023-10-19 03:58:13 -07:00
bachinger
54d5810fc3 Do not hide System UI when app rejects connection
If an app rejects the connection of the internal media notification manager
the session should behave like without the the media notification controller.
The legacy System UI controller should not be hidden or even rejected to
connect in such a case.

#minor-release

PiperOrigin-RevId: 574807901
2023-10-19 03:51:19 -07:00
tonihei
8f44916e97 Add release notes 2023-10-19 09:45:28 +01:00
lawadr
580ff6759c Fix AudioCapabilities regression
Since DEFAULT_MAX_CHANNEL_COUNT was increased from 8 to 10,
getMaxSupportedChannelCountForPassthrough always throws if its loop
enters its second iteration (channelCount of 9). This is due to
Util.getAudioTrackChannelConfig returning CHANNEL_INVALID when passed a
channelCount of 9, and setting CHANNEL_INVALID as the AudioFormat's
channel mask throws an exception.

This change skips each iteration where CHANNEL_INVALID is returned.
2023-10-19 09:17:41 +01:00
tonihei
f0cab4d03e Rollback of 64bd3bcad3
PiperOrigin-RevId: 574766164
2023-10-19 01:06:08 -07:00
Googler
cf3733765c Rollback of eafe2e35f0
PiperOrigin-RevId: 574755143
2023-10-19 00:21:43 -07:00