Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore/migrate media 1.0.2 #10

Merged
merged 10,000 commits into from
Jun 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
10000 commits
Select commit Hold shift + click to select a range
103b7cd
Reorder some release notes in other sections.
tonihei Nov 22, 2022
6661b75
Fix compilation error in ffmpeg JNI layer
christosts Nov 22, 2022
c2cbb63
Merge pull request #210 from androidx/release-1.0.0-beta03
microkatz Nov 23, 2022
537f8b2
Changed decoder list sort to order by functional support of format
microkatz Nov 11, 2022
bbf7324
Update targetSdkVersion of demo session app to appTargetSdkVersion
tianyif Nov 16, 2022
73d40e1
Add bundling exclusions with unit tests
marcbaechinger Nov 16, 2022
c11b5cf
Fix NPE when listener is not set
a-googler Nov 16, 2022
9ba059f
Add setPlaybackLooper ExoPlayer builder method
a-googler Nov 16, 2022
f3268ac
Load bitmaps for `MediaBrowserCompat`.
tianyif Nov 17, 2022
91c51fe
Mark broadcast receivers as not exported
tonihei Nov 17, 2022
9ac5062
Throw exception if a released player is passed to TestPlayerRunHelper
icbaker Nov 17, 2022
68a1571
Add additional codecs to the eosPropagationWorkaround list.
tonihei Nov 17, 2022
0e628fb
Pass correct frame size for passthrough playback
christosts Nov 17, 2022
9e42426
Add remaining state and getters to SimpleBasePlayer
tonihei Nov 18, 2022
f4f801a
Do not require package visibility when connecting to a Media3 session
tonihei Nov 21, 2022
3476ca9
Add `set -eu` to all shell scripts
icbaker Nov 21, 2022
fa6b8fe
Do not require package visibility when obtaining SessionTokens
tonihei Nov 22, 2022
dddb72b
Add `DefaultExtractorsFactory.setTsSubtitleFormats`
icbaker Nov 22, 2022
5a96fc7
Reorder some release notes in other sections.
tonihei Nov 22, 2022
d3d99f0
Load bitmaps for `MediaSessionCompat.QueueItem`.
tianyif Nov 22, 2022
782a69e
Migrate BROWSER_ROOT_HINTS_KEY_ROOT_CHILDREN_SUPPORTED_FLAGS to Media3
marcbaechinger Nov 23, 2022
9829ff3
Add helper method to convert platform session token to Media3 token
tonihei Nov 23, 2022
a98efd8
Merge pull request #10786 from TiVo:p-aacutil-test-impl
icbaker Nov 24, 2022
0ba58cc
Call future listener on the same handler that created the controller
marcbaechinger Nov 23, 2022
8b0c076
Exclude tracks from `PlayerInfo` if not changed
marcbaechinger Nov 23, 2022
b495d21
Misc fix in gradle build file
christosts Nov 23, 2022
d58b4fd
Handle the bitmap loading result with applicationHandler
tianyif Nov 23, 2022
101a249
Parse and set `peakBitrate` for Dolby TrueHD(AC-3) and (E-)AC-3
rohitjoins Nov 23, 2022
32f7a8b
Rollback of https://github.com/androidx/media/commit/76df06a7a364c580…
rohitjoins Nov 23, 2022
fda132f
Rollback of https://github.com/androidx/media/commit/427329175e87a7f3…
rohitjoins Nov 24, 2022
5ebbdc5
Use `ParsableBitArray` instead of `ParsableByteArray`
rohitjoins Nov 24, 2022
30dce91
Convert bitrates to bps before setting it
rohitjoins Nov 24, 2022
8767605
Remove flakiness from DefaultAnalyticsCollectorTest
tonihei Nov 25, 2022
d5815c5
Clean up javadoc on `Metadata.Entry.populateMediaMetadata`
icbaker Nov 25, 2022
f9c6fb4
Ensure messages sent on a dead thread don't block FakeClock execution
tonihei Nov 28, 2022
887179f
Merge pull request #10799 from OxygenCobalt:id3v2-multi-value
rohitjoins Nov 29, 2022
26f5e9b
Split up `Id3DecoderTest` methods
icbaker Nov 28, 2022
289f0cf
Remove impossible `UnsupportedEncodingException` from `Id3Decoder`
icbaker Nov 28, 2022
3bf9970
Merge pull request #10776 from dongvanhung:feature/add_support_clear_…
rohitjoins Nov 29, 2022
1d082ee
Bump cast sdk version and remove workaround for live duration
marcbaechinger Nov 29, 2022
e85e497
Add configuration to support OPUS offload
tonihei Nov 29, 2022
bb7e632
Use audio bitrate to calculate AudioTrack min buffer in passthrough
christosts Nov 29, 2022
4ecbd77
Add public constructors to `DefaultMediaNotificationProvider`
rohitjoins Nov 29, 2022
665f04d
Use the artist as the subtitle of the legacy media description
marcbaechinger Nov 30, 2022
05f640e
Rename SimpleBasePlayer.PlaylistItem to MediaItemData
tonihei Nov 30, 2022
93694b2
Decomission ControllerInfoProxy in favor of ControllerInfo.
a-googler Nov 30, 2022
8932c52
Parse and set bitrates in `Ac3Reader`
rohitjoins Nov 30, 2022
ed38ec7
Add media type to MediaMetadata
tonihei Dec 1, 2022
f8155f1
Add support for most setters in SimpleBasePlayer
tonihei Dec 1, 2022
6e58ca6
Merge pull request #10750 from Stronger197:subrip_utf_16
icbaker Dec 12, 2022
102873b
Split SubripDecoder and ParsableByteArray tests
icbaker Dec 1, 2022
1a9b1c4
Reduce log output for failing bitmap loads
christosts Dec 1, 2022
868e86c
Stop service when app is terminated while the player is paused
marcbaechinger Dec 1, 2022
8618263
Write media type with a custom key to legacy components.
tonihei Dec 2, 2022
c4f1c04
Added cancellation check for MediaBrowserFuture in demo session app
microkatz Dec 2, 2022
8844b4f
Removed ExoPlayer specific states from SimpleBasePlayer
microkatz Dec 2, 2022
5612f69
Fix `TextRenderer` exception when a subtitle file contains no cues
icbaker Dec 2, 2022
f43cc38
Fix `ExoPlayerTest` to use `C.TIME_UNSET` instead of `C.POSITION_UNSET`
icbaker Dec 2, 2022
515b6ac
Fix threading of onFallbackApplied callback
tonihei Dec 2, 2022
3df6949
Add javadoc links to README files
icbaker Dec 6, 2022
3b55ce2
Support release in SimpleBasePlayer
tonihei Dec 7, 2022
71a1254
Replace MediaMetadata folderType by isBrowsable
tonihei Dec 7, 2022
c32494a
Remove debug timeout multiplier.
tonihei Dec 8, 2022
80be30f
Clarify and correct allowed multi-threading for some Player methods
tonihei Dec 8, 2022
cdc07e2
Forward seek command details to seekTo method in BasePlayer
tonihei Dec 13, 2022
11bd727
Reset isLoading when calling SimpleBasePlayer.stop/release
tonihei Dec 13, 2022
1e7480d
Document the reason for defining private method `defaultIfNull`
rohitjoins Dec 13, 2022
d91c005
Remove parameters with default values from bundle in `MediaItem`
rohitjoins Dec 13, 2022
7ebab0e
Fix some release notes typos
andrewlewis Dec 14, 2022
8e8abda
Clear one-off events from state as soon as they are triggered.
tonihei Dec 14, 2022
b1e4ac4
Allow unset index and position values + remove period index
tonihei Dec 14, 2022
4f8d71e
Remove parameters with `null` values from bundle in `MediaMetadata`
rohitjoins Dec 15, 2022
9817c46
Use theme when loading drawables on API 21+
marcbaechinger Dec 15, 2022
44dbeb8
Rename `EMPTY_MEDIA_ITEM` to `PLACEHOLDER_MEDIA_ITEM`
rohitjoins Dec 16, 2022
097cdde
Clarify behavior for out-of-bounds indices and align implementations
tonihei Dec 16, 2022
da6c2df
Check if codec still exists before handling tunneling events
tonihei Dec 16, 2022
2186b6d
Avoid sending periodic position updates while paused and not loading
tonihei Dec 19, 2022
7768590
Add playlist and seek operations to SimpleBasePlayer
tonihei Dec 19, 2022
1126bbb
Remove ellipsis from Player javadoc
icbaker Dec 19, 2022
79bb53a
Fix Dackka error due to param name mismatch
icbaker Dec 19, 2022
fdc5930
Remove TODO from `ControllerInfo` - the existing approach is fine
icbaker Dec 19, 2022
9c81f3b
Add BitmapLoader injection in MediaController
tianyif Dec 19, 2022
16a67a4
Clarify some Player command and method javadoc
icbaker Dec 20, 2022
3d9fd60
Document the relationship between Player methods and available commands
icbaker Dec 20, 2022
bc82969
Add error messages to correctness assertions in SimpleBasePlayer
tonihei Dec 21, 2022
7d3375c
Fix recursive loop when registering controller visibility listeners
icbaker Dec 21, 2022
11b0baa
Update migration script
marcbaechinger Dec 21, 2022
13b72c4
Bump IMA SDK version to 3.29.0
marcbaechinger Dec 21, 2022
e07c887
Check `MediaMetadata` bundle to verify keys are skipped
rohitjoins Dec 21, 2022
0f8b861
Optimise bundling for `AdPlaybackState` using `AdPlaybackState.NONE`
rohitjoins Dec 21, 2022
a94aa8d
Fix order of playback controls in RTL layout
icbaker Dec 22, 2022
70156dc
Enable RTL support in the demo app
icbaker Dec 22, 2022
d67df79
Remove player listener on the application thread of the player
marcbaechinger Dec 22, 2022
7da071a
Check bundles in `MediaItem` to verify keys are skipped
rohitjoins Jan 4, 2023
21996be
Optimise bundling for `Timeline.Window` and `Timeline.Period`
rohitjoins Jan 4, 2023
4e7ccd7
Throw a ParserException instead of a NullPointerException if the samp…
a-googler Jan 4, 2023
2cfd05f
Fix typo in `DefaultTrackSelector.Parameters` field
rohitjoins Jan 5, 2023
96eb896
Initialise fields used for bundling as String directly
rohitjoins Jan 5, 2023
b6970c0
Update bandwidth meter estimates
tonihei Jan 10, 2023
84545e0
Add focusSkipButtonWhenAvailable to focus UI on ATV
marcbaechinger Jan 10, 2023
5d84804
Use onMediaMetadataChanged for updating the legacy session
marcbaechinger Jan 10, 2023
764daff
Improve Java doc about how to override notification drawables
marcbaechinger Jan 11, 2023
1b8608f
Request notification permission in demo app for API 33+
marcbaechinger Jan 11, 2023
2c08826
Document that `DownloadService` needs notification permissions
marcbaechinger Jan 11, 2023
b644c67
Add AdsLoader.focusSkipButton()
marcbaechinger Jan 11, 2023
a2aaad6
Catch FgSStartNotAllowedException when playback resumes
tianyif Jan 13, 2023
13dc59f
Correctly map deprecated methods in MediaController to replacement
tonihei Jan 16, 2023
55903af
Remove unneccesary parameter taking Player.Command
tonihei Jan 16, 2023
24b0367
Add missing command checks to MediaSessionLegacyStub and PlayerWrapper
tonihei Jan 16, 2023
903915d
Fix command check in MediaControllerImplBase
tonihei Jan 16, 2023
818ce72
Clarify what default settings are being used for SSAI AdsLoader
marcbaechinger Jan 16, 2023
79fd80f
Post notification for session app when FgS starting exception is caught
tianyif Jan 16, 2023
dd462e8
Filter what PlaybackStateCompat actions are advertised
christosts Jan 17, 2023
d41eede
Disables play/pause button when there's nothing to play
a-googler Jan 17, 2023
2eab93d
Make availableCommands known when bundling PlayerInfo
tonihei Jan 17, 2023
0606ab0
Fix javadoc references to `writeSampleData`
rohitjoins Jan 18, 2023
b8b6ddf
Correctly filter PlayerInfo by available getter commands.
tonihei Jan 18, 2023
5b18c2d
Extend command GET_CURRENT_MEDIA_ITEM to more methods.
tonihei Jan 19, 2023
28e3780
Update media controller position before pausing.
tonihei Jan 19, 2023
43677b9
Add command check for metadata in DefaultMediaNotificationProvider
tonihei Jan 19, 2023
967224c
Explicitly document most Player.Listener methods in terms of getters
icbaker Jan 19, 2023
107a481
Add the MediaSession as an argument to `getMediaButtons()`
marcbaechinger Jan 20, 2023
e266051
Add onSetMediaItems listener with access to start index and position
microkatz Jan 20, 2023
2adcfd9
Add missing # in release notes
christosts Jan 23, 2023
846258b
Deduplicate onSetMediaItem handler logic
microkatz Jan 24, 2023
207d67b
Suppress warnings in ImaUtil
christosts Jan 24, 2023
c357e67
Filter available commands based on PlaybackStateCompat actions
tonihei Jan 24, 2023
3708e75
Publish gradle attributes for AndroidX compatibility
icbaker Jan 25, 2023
d6c9fdb
Add missing } to publish.gradle
icbaker Jan 25, 2023
55312e1
Add missing command checks in UI module
tonihei Jan 25, 2023
5e6f79a
Tweak UI behavior when commands are missing.
tonihei Jan 27, 2023
c37442b
Match MergingMediaPeriod track selection by period index in id
microkatz Jan 27, 2023
bcdedb7
Double tap detection for Bluetooth media button events only
marcbaechinger Jan 27, 2023
631ff80
Fix timestamp comparison for seeks in fMP4
tonihei Jan 27, 2023
bfc4ed4
Inline method in PlayerService that is used from on call site only
marcbaechinger Jan 27, 2023
5528baa
Do not assume a valid queue in 3rd party sessions
marcbaechinger Jan 30, 2023
791c05b
Fix (another) `LeanbackPlayerAdapter` param name mismatch
icbaker Jan 31, 2023
d49bd45
Merge pull request #10793 from fraunhoferfokus:dash-thumbnail-support
christosts Feb 2, 2023
065418c
Publish ConcatenatingMediaSource2
marcbaechinger Feb 1, 2023
9bf18db
Session: advertise legacy FLAG_HANDLES_QUEUE_COMMANDS
christosts Feb 2, 2023
f983d91
Fix release note entry
christosts Feb 2, 2023
3fdaf78
Prepare media3 release notes for rc01
christosts Feb 13, 2023
9f43249
Minor fixes in release notes
christosts Feb 13, 2023
98bf30d
Version bump for ExoPlayer 2.18.3 & media3-1.0.0-rc01
christosts Feb 14, 2023
f17e846
Merge pull request #251 from androidx/release-1.0.0-rc01
christosts Feb 16, 2023
bd664ad
Detect HEVC HDR10 codec profile more accurately
christosts Feb 6, 2023
ba2b9b3
Fix AudioTrackPositionTracker logic for playback speed adjustments
tonihei Feb 7, 2023
e89c14a
Merge pull request #248 from lemondoglol:update-segment-size
microkatz Feb 8, 2023
70db687
Merge pull request #10959 from balachandarlinks:handle-sql-exception-…
christosts Feb 14, 2023
0ebb8ff
Document spatialization behavior constants.
tonihei Feb 10, 2023
3cc93b1
Add null check to `ExoPlayerImpl.isTunnelingEnabled`
icbaker Feb 10, 2023
3696076
AsynchronousMediaCodecAdapter: surface queueing errors sooner
christosts Feb 10, 2023
f2753e2
Add ad event listeners in the Looper event of the ad manager callback
marcbaechinger Feb 13, 2023
cfe861e
Catch IllegalArgumentExceptions in RTSP Response parsing
microkatz Feb 13, 2023
6a273a5
Add exception cause to thrown exception
a-googler Feb 14, 2023
3b00561
Fix error in documentation string
a-googler Feb 16, 2023
629a75e
Map `PLAYER_STATE_LOADING` to `STATE_BUFFERING`
marcbaechinger Feb 17, 2023
0e5dad5
Reduce number of calls to AudioTrack.getPlaybackHeadPosition
tonihei Feb 20, 2023
58a977e
Skip rendering multiple frames on the same vsync
christosts Feb 20, 2023
5ab4223
Use ArrayDeque for pending output stream changes.
tonihei Feb 23, 2023
a09bb70
Do not specify export flags for protected system broadcasts.
tonihei Feb 24, 2023
abf1eb8
Use more realistic time values for MediaCodecVideoRendererTest
tonihei Feb 27, 2023
f011cc8
Correctly update output info if previous stream has been fully rendered
tonihei Feb 27, 2023
512ca60
Add workaround for wrong PerformancePoints on some devices.
tonihei Feb 27, 2023
5822d68
Ensure output format is updated in sync with stream changes.
tonihei Feb 27, 2023
ad42800
Update notification play/pause button with matching player state
tianyif Feb 10, 2023
f690ebd
Fix some playback parameter signalling problems.
tonihei Feb 27, 2023
b44fb57
Ensure getPlaybackHeadPosition isn't called if not needed
tonihei Feb 28, 2023
ee4ac61
Update translations
tonihei Feb 28, 2023
7d6a359
Minor change in ForwardingPlayer javadoc
christosts Feb 28, 2023
ddd5e9b
Remove @see tags with <a> tags
icbaker Mar 1, 2023
dbf737d
Merge pull request #255 from mayurk2:use_edts_offset_if_it_is_for_ent…
tonihei Mar 1, 2023
64c6d8f
Update release notes for 1.0.0-rc02
tonihei Mar 2, 2023
67fd41a
Bump version numbers to Media3 1.0.0-rc02 and ExoPlayer 2.18.4
tonihei Mar 2, 2023
d47675f
Fix some JavaDoc in the Media3 session module
marcbaechinger Mar 2, 2023
2e6484d
Remove unreleased changed
tonihei Mar 2, 2023
7958737
Fix lint-baseline.xml for latest UI translations
tonihei Mar 2, 2023
af30f00
Add missing RELEASENOTES line
tonihei Mar 2, 2023
1ef427f
Merge pull request #261 from androidx/release-1.0.0-rc02
tonihei Mar 3, 2023
e78332f
Shorten labels to fix transformer demo UI
andrewlewis Mar 14, 2023
810cb6d
Shorten labels to fix transformer demo UI
andrewlewis Mar 14, 2023
14b0dcb
Add missing `@param` tags
icbaker Mar 3, 2023
e7f49a8
Update templates to more clearly signpost between exoplayer2 and media3
icbaker Mar 6, 2023
687362e
Document that custom commands can only be sent if they are defined
tonihei Mar 7, 2023
bfdd09b
Update docs and READMEs for media3 stable release
tonihei Mar 13, 2023
7f435f0
Update release notes for Media3 1.0.0 / ExoPlayer 2.18.5
tonihei Mar 14, 2023
dd2008b
Bump version numbers to Media3 1.0.0 and ExoPlayer 2.18.5
tonihei Mar 14, 2023
95f9e8f
Merge pull request #270 from androidx/release-1.0.0
tonihei Mar 22, 2023
7aff476
Add ExoPlayer versions to GH bug template
tonihei Mar 22, 2023
d1d1665
Fix javadoc links in media README files
rohitjoins Mar 30, 2023
2ca9050
Add media3 guide entries in README files
rohitjoins Mar 30, 2023
4666d57
Ensure `ForwardingPlayer` users do listener registration correctly
icbaker Mar 3, 2023
a94fb21
Make DefaultDashChunkSource more robust against empty segment timelines
tonihei Mar 7, 2023
60e0546
Merge pull request #11061 from cedricxperi:dts-udts-support
rohitjoins Mar 16, 2023
65d4202
Add support to fetch `ColorInfo` from `hvcc` box in `AtomParsers`
rohitjoins Mar 16, 2023
b70b320
Merge pull request #11064 from haixia-meta:release-v2
rohitjoins Mar 16, 2023
eea3703
Retry RTSP Setup with TCP if response with UDP is UnsupportedTransport
microkatz Mar 23, 2023
690ac23
Merge pull request #11051 from TiVo:p-fix-for-issue-11050
tianyif Mar 30, 2023
56dd0f7
Handle output format changes for empty sample streams correctly
tonihei Mar 24, 2023
66b1282
Post `OfflineLicenseHelper` interactions to its internal handler thread
icbaker Mar 28, 2023
d07fcc3
Remove remaining references to exoplayer.dev
tonihei Mar 29, 2023
1034250
Temporarily use exoplayer2-hosted SVGs in media3 javadoc
icbaker Mar 30, 2023
3daaad7
...Suppress `MissingSuperCall` warnings on onBackPressed()...
a-googler Mar 30, 2023
3480a27
Add warning logs if `DefaultDrmSessionManager` is used on wrong thread
icbaker Mar 31, 2023
654a678
Improve check for invalid connection request
tonihei Apr 3, 2023
10e2dfd
Remove Javadoc TODO from README of decoder extensions
rohitjoins Apr 5, 2023
86cc916
Allow duplicated MediaItems in a legacy session
tonihei Apr 5, 2023
5d11aa9
Implement missing broadcastCustomCommand to legacy controller
tonihei Apr 5, 2023
8aec88b
Add missing initial update to the subtitle button in the session demo
tonihei Apr 6, 2023
0690c9b
Replace deprecated onBackPressed call
tonihei Apr 11, 2023
abc9d8c
Change format logged when AudioSink throws InitializationException
christosts Apr 11, 2023
9360530
Update available commands when setting a new player in MediaSession
tonihei Apr 12, 2023
eb322b7
Precedence for app provided media button receiver
marcbaechinger Apr 12, 2023
1076756
Enable multidex for demo-gl app
rohitjoins Apr 12, 2023
ade8831
Bump version numbers to Media3 1.0.1 and ExoPlayer 2.18.6
rohitjoins Apr 13, 2023
ba6ccee
Update `colr` box values to be overridden by bitstream boxes
rohitjoins Apr 13, 2023
3b2b8d5
Ensure TrackSelectionParameters overrides match existing groups
tonihei Apr 13, 2023
d5a81c5
Use `@link` instead of `@value`
icbaker Apr 14, 2023
d784857
Document style guide and google-java-format in CONTRIBUTING.md
icbaker Apr 17, 2023
8c5c58e
Remove unnecessary check for currentMediaItem in legacy session stub
tonihei Apr 17, 2023
fa972d9
Fix thread access when creating notifications for media sessions
tonihei Apr 17, 2023
b1e3eac
Update release notes for Media3 1.0.1 / ExoPlayer 2.18.6
rohitjoins Apr 18, 2023
4f0b30b
Add `com.google.truth.extensions:truth-java8-extension` to JAR list
rohitjoins Apr 19, 2023
3c01488
Merge pull request #336 from androidx/release-1.0.1-stable
rohitjoins Apr 19, 2023
eee226e
Render last frame even if have not read BUFFER_FLAG_END_OF_STREAM
microkatz Apr 21, 2023
58cf3a7
Remove unnecessary Activity method overrides in session demo app
tonihei Apr 21, 2023
0f6a1eb
Update available commands when MediaSessionCompat actions change
tonihei Apr 21, 2023
3f5d777
Clarify threading requirement for MediaController.releaseFuture
tonihei Apr 21, 2023
2092472
Ensure `DrmSessionManager.setPlayer()` is called before `prepare()`
icbaker Apr 24, 2023
3149203
Merge pull request #313 from pengbins:fix_ts_h265reader_parse_sps
icbaker Apr 26, 2023
3406334
Allow `MediaLibraryService` to reject the resumption notification
marcbaechinger Apr 26, 2023
40ef64a
Fix leaks of media session service.
tonihei Apr 27, 2023
179e35b
Add JavaDoc to some undocumented methods and move them
marcbaechinger Apr 28, 2023
841bdc6
Add UTF-16 encoded subtitle support to SsaDecoder
microkatz Apr 28, 2023
feb83c2
Update translations
tof-tof May 3, 2023
b0b34de
Fix demo app UnsafeOptInUsageError lint errors
icbaker May 3, 2023
375cdb2
Use a for-each loop instead of `forEach` in `PlaybackService.kt`
icbaker May 3, 2023
7a1d7bf
Temporarily suppress missing permission lint in session demo
icbaker May 4, 2023
13191ed
Javadoc tweaks for `MediaSession.MediaItemsWithPosition`
icbaker May 5, 2023
3064bc9
Fix value type when unbundling LibraryResult without expected type
marcbaechinger May 5, 2023
a098f86
Add tests for `MediaLibraryInfo` version code consistency
icbaker May 5, 2023
f71370a
Remove a copybara stripping tag
icbaker May 10, 2023
0888dfb
Update the root project name check in `publish.gradle`
icbaker May 12, 2023
20ba325
Add consistency check to sending and receiving position updates
tonihei May 15, 2023
6a7a376
Update release notes for Media3 1.0.2
icbaker May 16, 2023
c484711
Update media3 version number to 1.0.2
icbaker May 17, 2023
69879cd
Add Media3 1.0.2 and ExoPlayer 2.18.7 to `bug.yml` template
icbaker May 17, 2023
d77e79a
Add `main`/`dev-v2` branch options to `bug.yml` template
icbaker May 17, 2023
2fc189d
Merge pull request #408 from androidx/release-1.0.2
icbaker May 17, 2023
e9af41e
Merge tag '1.0.2' of https://github.com/androidx/media into chore/mer…
guoen21 Jun 19, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ body:
label: Media3 Version
description: What version of Media3 (or ExoPlayer) are you using?
options:
- Media3 1.1.0-alpha01
- Media3 1.0.2
- Media3 1.0.1
- Media3 1.0.0
- Media3 1.0.0-rc02
Expand All @@ -30,6 +32,8 @@ body:
- Media3 1.0.0-alpha03
- Media3 1.0.0-alpha02
- Media3 1.0.0-alpha01
- Media3 `main` branch
- ExoPlayer 2.18.7
- ExoPlayer 2.18.6
- ExoPlayer 2.18.5
- ExoPlayer 2.18.4
Expand All @@ -46,6 +50,7 @@ body:
- ExoPlayer 2.14.2
- ExoPlayer 2.14.1
- ExoPlayer 2.14.0
- ExoPlayer `dev-v2` branch
- Older (unsupported)
validations:
required: true
Expand Down
35 changes: 35 additions & 0 deletions RELEASENOTES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,40 @@
# Release notes

### 1.0.2 (2023-05-18)

This release corresponds to the
[ExoPlayer 2.18.7 release](https://github.com/google/ExoPlayer/releases/tag/r2.18.7).

This release contains the following changes since the
[1.0.1 release](#101-2023-04-18):

* Core library:
* Add `Buffer.isLastSample()` that denotes if `Buffer` contains flag
`C.BUFFER_FLAG_LAST_SAMPLE`.
* Fix issue where last frame may not be rendered if the last sample with
frames is dequeued without reading the 'end of stream' sample.
([#11079](https://github.com/google/ExoPlayer/issues/11079)).
* Extractors:
* Fix parsing of H.265 SPS in MPEG-TS files by re-using the parsing logic
already used by RTSP and MP4 extractors
([#303](https://github.com/androidx/media/issues/303)).
* Text:
* SSA: Add support for UTF-16 files if they start with a byte order mark
([#319](https://github.com/androidx/media/issues/319)).
* Session:
* Fix issue where `MediaController` doesn't update its available commands
when connected to a legacy `MediaSessionCompat` that updates its
actions.
* Fix bug that prevented the `MediaLibraryService` from returning null for
a call from System UI to `Callback.onGetLibraryRoot` with
`params.isRecent == true` on API 30
([#355](https://github.com/androidx/media/issues/355)).
* Fix memory leak of `MediaSessionService` or `MediaLibraryService`
([#346](https://github.com/androidx/media/issues/346)).
* Fix bug where a combined `Timeline` and position update in a
`MediaSession` may cause a `MediaController` to throw an
`IllegalStateException`.

### 1.0.1 (2023-04-18)

This release corresponds to the
Expand Down
4 changes: 2 additions & 2 deletions constants.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
project.ext {
releaseVersion = '1.0.1'
releaseVersionCode = 1_000_001_3_00
releaseVersion = '1.0.2'
releaseVersionCode = 1_000_002_3_00
minSdkVersion = 16
appTargetSdkVersion = 33
// API version before restricting local file access.
Expand Down
2 changes: 2 additions & 0 deletions core_settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ if (gradle.ext.has('androidxMediaModulePrefix')) {
modulePrefix += gradle.ext.androidxMediaModulePrefix
}

rootProject.name = gradle.ext.androidxMediaProjectName

include modulePrefix + 'lib-common'
project(modulePrefix + 'lib-common').projectDir = new File(rootDir, 'libraries/common')

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +514,7 @@ public void onTracksChanged(Tracks tracks) {

private class PlayerErrorMessageProvider implements ErrorMessageProvider<PlaybackException> {

@OptIn(markerClass = androidx.media3.common.util.UnstableApi.class)
@Override
public Pair<Integer, String> getErrorMessage(PlaybackException e) {
String errorString = getString(R.string.error_generic);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import android.content.res.AssetManager;
import android.net.Uri;
import android.os.AsyncTask;
import android.os.Build;
import android.os.Bundle;
import android.text.TextUtils;
import android.util.JsonReader;
Expand Down Expand Up @@ -302,7 +303,7 @@ private void onSampleDownloadButtonClicked(PlaylistHolder playlistHolder) {
Toast.makeText(getApplicationContext(), downloadUnsupportedStringId, Toast.LENGTH_LONG)
.show();
} else if (!notificationPermissionToastShown
&& Util.SDK_INT >= 33
&& Build.VERSION.SDK_INT >= 33
&& checkSelfPermission(Api33.getPostNotificationPermissionString())
!= PackageManager.PERMISSION_GRANTED) {
downloadMediaItemWaitingForNotificationPermission = playlistHolder.mediaItems.get(0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*/
package androidx.media3.demo.session

import android.annotation.SuppressLint
import android.app.NotificationChannel
import android.app.NotificationManager
import android.app.PendingIntent.*
Expand All @@ -29,6 +30,7 @@ import androidx.media3.common.MediaItem
import androidx.media3.common.util.Util
import androidx.media3.exoplayer.ExoPlayer
import androidx.media3.session.*
import androidx.media3.session.LibraryResult.RESULT_ERROR_NOT_SUPPORTED
import androidx.media3.session.MediaSession.ControllerInfo
import com.google.common.collect.ImmutableList
import com.google.common.util.concurrent.Futures
Expand Down Expand Up @@ -95,7 +97,7 @@ class PlaybackService : MediaLibraryService() {
): MediaSession.ConnectionResult {
val connectionResult = super.onConnect(session, controller)
val availableSessionCommands = connectionResult.availableSessionCommands.buildUpon()
customCommands.forEach { commandButton ->
for (commandButton in customCommands) {
// Add custom command to available session commands.
commandButton.sessionCommand?.let { availableSessionCommands.add(it) }
}
Expand Down Expand Up @@ -142,6 +144,12 @@ class PlaybackService : MediaLibraryService() {
browser: ControllerInfo,
params: LibraryParams?
): ListenableFuture<LibraryResult<MediaItem>> {
if (params != null && params.isRecent) {
// The service currently does not support playback resumption. Tell System UI by returning
// an error of type 'RESULT_ERROR_NOT_SUPPORTED' for a `params.isRecent` request. See
// https://github.com/androidx/media/issues/355
return Futures.immediateFuture(LibraryResult.ofError(RESULT_ERROR_NOT_SUPPORTED))
}
return Futures.immediateFuture(LibraryResult.ofItem(MediaItemTree.getRootItem(), params))
}

Expand Down Expand Up @@ -270,6 +278,7 @@ class PlaybackService : MediaLibraryService() {
* by a media controller to resume playback when the {@link MediaSessionService} is in the
* background.
*/
@SuppressLint("MissingPermission") // TODO: b/280766358 - Request this permission at runtime.
override fun onForegroundServiceStartNotAllowedException() {
val notificationManagerCompat = NotificationManagerCompat.from(this@PlaybackService)
ensureNotificationChannel(notificationManagerCompat)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,16 +88,6 @@ class PlayerActivity : AppCompatActivity() {
initializeController()
}

override fun onResume() {
super.onResume()
playerView.onResume()
}

override fun onPause() {
super.onPause()
playerView.onPause()
}

override fun onStop() {
super.onStop()
playerView.player = null
Expand Down
2 changes: 1 addition & 1 deletion libraries/common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ rootProject.allprojects.forEach {
evaluationDependsOn(':' + it.name)
}
}
// copybara:media3-only

android {
buildTypes {
debug {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ public final class MediaLibraryInfo {

/** The version of the library expressed as a string, for example "1.2.3" or "1.2.3-beta01". */
// Intentionally hardcoded. Do not derive from other constants (e.g. VERSION_INT) or vice versa.
public static final String VERSION = "1.0.1";
public static final String VERSION = "1.0.2";

/** The version of the library expressed as {@code TAG + "/" + VERSION}. */
// Intentionally hardcoded. Do not derive from other constants (e.g. VERSION) or vice versa.
public static final String VERSION_SLASHY = "AndroidXMedia3/1.0.1";
public static final String VERSION_SLASHY = "AndroidXMedia3/1.0.2";

/**
* The version of the library expressed as an integer, for example 1002003300.
Expand All @@ -47,7 +47,7 @@ public final class MediaLibraryInfo {
* (123-045-006-3-00).
*/
// Intentionally hardcoded. Do not derive from other constants (e.g. VERSION) or vice versa.
public static final int VERSION_INT = 1_000_001_3_00;
public static final int VERSION_INT = 1_000_002_3_00;

/** Whether the library was compiled with {@link Assertions} checks enabled. */
public static final boolean ASSERTIONS_ENABLED = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,11 +233,28 @@ public int peekUnsignedByte() {
return (data[position] & 0xFF);
}

/** Peeks at the next char. */
/**
* Peeks at the next char.
*
* <p>Equivalent to passing {@link Charsets#UTF_16} or {@link Charsets#UTF_16BE} to {@link
* #peekChar(Charset)}.
*/
public char peekChar() {
return (char) ((data[position] & 0xFF) << 8 | (data[position + 1] & 0xFF));
}

/**
* Peeks at the next char (as decoded by {@code charset})
*
* @throws IllegalArgumentException if charset is not supported. Only US_ASCII, UTF-8, UTF-16,
* UTF-16BE, and UTF-16LE are supported.
*/
public char peekChar(Charset charset) {
Assertions.checkArgument(
SUPPORTED_CHARSETS_FOR_READLINE.contains(charset), "Unsupported charset: " + charset);
return (char) (peekCharacterAndSize(charset) >> Short.SIZE);
}

/** Reads the next byte as an unsigned value. */
public int readUnsignedByte() {
return (data[position++] & 0xFF);
Expand Down Expand Up @@ -649,27 +666,42 @@ private void skipLineTerminator(Charset charset) {
* UTF-8 and two bytes for UTF-16).
*/
private char readCharacterIfInList(Charset charset, char[] chars) {
char character;
int characterSize;
int characterAndSize = peekCharacterAndSize(charset);

if (characterAndSize != 0 && Chars.contains(chars, (char) (characterAndSize >> Short.SIZE))) {
position += characterAndSize & 0xFFFF;
return (char) (characterAndSize >> Short.SIZE);
} else {
return 0;
}
}

/**
* Peeks at the character at {@link #position} (as decoded by {@code charset}), returns it and the
* number of bytes the character takes up within the array packed into an int. First four bytes
* are the character and the second four is the size in bytes it takes. Returns 0 if {@link
* #bytesLeft()} doesn't allow reading a whole character in {@code charset} or if the {@code
* charset} is not one of US_ASCII, UTF-8, UTF-16, UTF-16BE, or UTF-16LE.
*
* <p>Only supports characters that occupy a single code unit (i.e. one byte for UTF-8 and two
* bytes for UTF-16).
*/
private int peekCharacterAndSize(Charset charset) {
byte character;
short characterSize;
if ((charset.equals(Charsets.UTF_8) || charset.equals(Charsets.US_ASCII)) && bytesLeft() >= 1) {
character = Chars.checkedCast(UnsignedBytes.toInt(data[position]));
character = (byte) Chars.checkedCast(UnsignedBytes.toInt(data[position]));
characterSize = 1;
} else if ((charset.equals(Charsets.UTF_16) || charset.equals(Charsets.UTF_16BE))
&& bytesLeft() >= 2) {
character = Chars.fromBytes(data[position], data[position + 1]);
character = (byte) Chars.fromBytes(data[position], data[position + 1]);
characterSize = 2;
} else if (charset.equals(Charsets.UTF_16LE) && bytesLeft() >= 2) {
character = Chars.fromBytes(data[position + 1], data[position]);
character = (byte) Chars.fromBytes(data[position + 1], data[position]);
characterSize = 2;
} else {
return 0;
}

if (Chars.contains(chars, character)) {
position += characterSize;
return Chars.checkedCast(character);
} else {
return 0;
}
return (Chars.checkedCast(character) << Short.SIZE) + characterSize;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
/*
* Copyright 2023 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package androidx.media3.common;

import static com.google.common.base.Preconditions.checkState;
import static com.google.common.truth.Truth.assertThat;

import androidx.test.ext.junit.runners.AndroidJUnit4;
import com.google.common.truth.Expect;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;

/** Tests for {@link MediaLibraryInfo}. */
@RunWith(AndroidJUnit4.class)
public class MediaLibraryInfoTest {

private static final Pattern VERSION_PATTERN =
Pattern.compile("(\\d+)\\.(\\d+)\\.(\\d+)(?:-(alpha|beta|rc)(\\d\\d))?");

@Rule public final Expect expect = Expect.create();

@Test
public void versionAndSlashyAreConsistent() {
assertThat(MediaLibraryInfo.VERSION_SLASHY)
.isEqualTo("AndroidXMedia3/" + MediaLibraryInfo.VERSION);
}

@Test
public void versionIntIsSelfConsistentAndConsistentWithVersionString() {
// Use the Truth .matches() call so any failure has a clearer error message, then call
// Matcher#matches() below so the subsequent group(int) calls work.
assertThat(MediaLibraryInfo.VERSION).matches(VERSION_PATTERN);
Matcher matcher = VERSION_PATTERN.matcher(MediaLibraryInfo.VERSION);
checkState(matcher.matches());

int major = Integer.parseInt(matcher.group(1));
int minor = Integer.parseInt(matcher.group(2));
int bugfix = Integer.parseInt(matcher.group(3));
String phase = matcher.group(4);

expect.that(major).isAtLeast(1);

int expectedVersionInt = 0;
expectedVersionInt += major * 1_000_000_000;
expectedVersionInt += minor * 1_000_000;
expectedVersionInt += bugfix * 1000;

int phaseInt;
if (phase != null) {
expect.that(bugfix).isEqualTo(0);
switch (phase) {
case "alpha":
phaseInt = 0;
break;
case "beta":
phaseInt = 1;
break;
case "rc":
phaseInt = 2;
break;
default:
throw new AssertionError("Unrecognized phase: " + phase);
}
int phaseCount = Integer.parseInt(matcher.group(5));
expect.that(phaseCount).isAtLeast(1);
expectedVersionInt += phaseCount;
} else {
// phase == null, so this is a stable or bugfix release.
phaseInt = 3;
}
expectedVersionInt += phaseInt * 100;
expect
.withMessage("VERSION_INT for " + MediaLibraryInfo.VERSION)
.that(MediaLibraryInfo.VERSION_INT)
.isEqualTo(expectedVersionInt);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ public final boolean isKeyFrame() {
return getFlag(C.BUFFER_FLAG_KEY_FRAME);
}

/** Returns whether the {@link C#BUFFER_FLAG_LAST_SAMPLE} flag is set. */
public final boolean isLastSample() {
return getFlag(C.BUFFER_FLAG_LAST_SAMPLE);
}

/** Returns whether the {@link C#BUFFER_FLAG_HAS_SUPPLEMENTAL_DATA} flag is set. */
public final boolean hasSupplementalData() {
return getFlag(C.BUFFER_FLAG_HAS_SUPPLEMENTAL_DATA);
Expand Down
Loading