18677 Commits

Author SHA1 Message Date
peng bin
6ae8c8c041 Use NalUnitUtil.parseH265SpsNalUnitPayload when parsing MPEG-TS files
This implicitly fixes a bug by removing the buggy implementation in H265Reader in favour of a working one. This change also adds tests to confirm the parsing bug is fixed.
2023-04-25 09:15:25 +01:00
peng bin
114020c2d8 Fix previousNumDeltaPocs in skipShortTermRefPicSets 2023-04-25 09:15:25 +01:00
Ian Baker
75d81c7630 Derive previousNumDeltaPocs from numNegativePics and numPositivePics
This more closely matches the equations in equations 7-61 and 7-62 in
See H.265/HEVC (2014) section 7.4.8.
2023-04-25 09:15:25 +01:00
peng bin
a65b5a5c2b Fix previousNumDeltaPocs in skipShortTermRefPicSets 2023-04-25 09:15:25 +01:00
peng bin
b08120d752 Fix used_by_curr_pic_flag to align with H.265 spec 2023-04-25 09:15:25 +01:00
peng bin
bc0dc01a69 Add a test sample for ts+h265 2023-04-25 09:15:25 +01:00
ibaker
6aacbc6bbb Ensure DrmSessionManager.setPlayer() is called before prepare()
`prepare()` now logs a warning if it's called before `setPlayer()`
because it's not possible to tell if it's being called on the wrong
thread (since 3480a27994).

This change finds all the places one is called immediately after the
other and flips the order to be more correct.

Issue: androidx/media#350

#minor-release

PiperOrigin-RevId: 526582294
2023-04-24 11:40:19 +01:00
huangdarwin
de32536e20 HDR: Remove exportUnexpectedColorInfo test.
PiperOrigin-RevId: 526086973
2023-04-24 11:39:09 +01:00
rohks
8a73d8d3fe Add support to fetch ColorInfo from avcC box in AtomParsers
#minor-release

PiperOrigin-RevId: 526082823
2023-04-24 11:37:55 +01:00
claincly
a0fe3b29c2 Allow customizing VideoFrameProcessor input and output colors in MCVR.
PiperOrigin-RevId: 526081541
2023-04-24 11:37:07 +01:00
claincly
bb0c4a468a Fix MCVR is not able to find FrameProcessor.Factory constructor.
The constructor is removed in 316a2ce0ee.

PiperOrigin-RevId: 526068585
2023-04-24 11:36:20 +01:00
tonihei
0bac4e24e4 Add routing controller id to DeviceInfo
And forward the id to the VolumeProviderCompat and read it from the platform
MediaController for compatibility.

PiperOrigin-RevId: 526046892
2023-04-24 11:35:08 +01:00
ibaker
8d17faea33 Rollback of d7983f9485
*** Original commit ***

Bump Guava version to 31.1

***

PiperOrigin-RevId: 526046600
2023-04-24 11:34:24 +01:00
tonihei
d9fd8f4310 Add Builder for DeviceInfo
This simplifies the addition of new fields in the future.

Also do some misc clean up for the volume limit values:
 - Add some documentation to mention assumed defaults
 - Add the IntRange annotations to match the ones we have in Player
   already
 - Mention the limits in the relevant Player methods
 - Avoid bundling default values
 - Improve range checks for masking in MediaController

PiperOrigin-RevId: 526029619
2023-04-24 11:33:13 +01:00
tonihei
186f3d5c77 Clarify threading requirement for MediaController.releaseFuture
And remove unnecessary check for isDone.

Issue: androidx/media#345
PiperOrigin-RevId: 525999615
2023-04-24 11:32:02 +01:00
tonihei
79fab6783e Update available commands when MediaSessionCompat actions change
This is a bug currently, where commands are created once but never
updated again if the actions in MediaSessionCompat are changed.

PiperOrigin-RevId: 525999084
2023-04-24 11:31:15 +01:00
tonihei
2de89ca2ce Remove unnecessary Activity method overrides in session demo app
The PlayerView methods are documented to only be needed for sphrerical
playbacks, which we are not using in the session demo app.

PiperOrigin-RevId: 525986709
2023-04-24 11:29:46 +01:00
michaelkatz
affbb7c57e Render last frame even if have not read BUFFER_FLAG_END_OF_STREAM
If the limited number of input buffers causes reading of all samples except the last one conveying end of stream, then the last frame will not be rendered.

PiperOrigin-RevId: 525974445
2023-04-24 11:29:00 +01:00
claincly
353523bb07 Simplify end of stream signaling again
Whenever a frame is queued to the shader, it's guaranteed that there will be a
subsequent `onInputFrameProcessed` callback, so we can pass on the
end-of-stream signal there.

PiperOrigin-RevId: 525850141
2023-04-24 11:28:14 +01:00
claincly
acbd340e84 Rename INPUT_TYPE_TEXID, and cleanup.
PiperOrigin-RevId: 525761936
2023-04-24 11:27:07 +01:00
ibaker
d7983f9485 Bump Guava version to 31.1
PiperOrigin-RevId: 525756451
2023-04-24 11:25:54 +01:00
sheenachhabra
546b25bbc9 Set default value 0 for compressorname
PiperOrigin-RevId: 525734520
2023-04-24 11:24:48 +01:00
tofunmi
0c4b486081 Add context sharing capabilities to the default GlObjectsProvider
Creates a way for apps to provide their EGLContext to DefaultVideoFrameProcessor, so that we can attach their context to the one we create. See [the EGL docs for more information about how contexts are shared in GL](https://registry.khronos.org/EGL/sdk/docs/man/html/eglCreateContext.xhtml)

PiperOrigin-RevId: 525708652
2023-04-24 11:23:37 +01:00
tofunmi
e020e159d4 Add video/raw to MimeTypes
PiperOrigin-RevId: 525693833
2023-04-24 11:22:28 +01:00
tofunmi
0f8fa232e7 Change isInputTextureExternal boolean parameter to inputType intDef
PiperOrigin-RevId: 525690361
2023-04-24 11:21:41 +01:00
huangdarwin
3bc0172188 Remove extra param from createForVideoFrameProcessingException
This arg was always the same value, so it can be simplified.

PiperOrigin-RevId: 525677735
2023-04-24 11:20:32 +01:00
tofunmi
316a2ce0ee Remove deprecated constructor in DefaultVideoFrameProcessor.Factory
Remove deprecated factory constructor and replace all call instances of it.

PiperOrigin-RevId: 525476062
2023-04-24 11:19:49 +01:00
tofunmi
aa0d7d7339 Add srgb color transfer
PiperOrigin-RevId: 525467798
2023-04-24 11:18:48 +01:00
tofunmi
9406410c48 Release BitmapTextureManager resources
PiperOrigin-RevId: 525434071
2023-04-24 11:17:31 +01:00
tofunmi
ec45c0d441 Add javadoc for ExternalTextureManager.release()
PiperOrigin-RevId: 525430439
2023-04-24 11:16:13 +01:00
Rohit Singh
e96b7cc5c7 Merge branch 'release' 2023-04-19 18:42:08 +01:00
Rohit Kumar Singh
3c01488f8d
Merge pull request #336 from androidx/release-1.0.1-stable
1.0.1
2023-04-19 18:08:17 +01:00
rohks
4f0b30b8a5 Add com.google.truth.extensions:truth-java8-extension to JAR list
PiperOrigin-RevId: 525415067
(cherry picked from commit 3788172afdf7531f7adc9deb52a2a65c292a8b01)
2023-04-19 13:10:35 +01:00
rohks
3788172afd Add com.google.truth.extensions:truth-java8-extension to JAR list
PiperOrigin-RevId: 525415067
2023-04-19 13:00:06 +01:00
rohks
b1e3eac0f2 Update release notes for Media3 1.0.1 / ExoPlayer 2.18.6
PiperOrigin-RevId: 525176828
(cherry picked from commit 07ff3eeeadc6d7a00ad3bf941aebe34f5ac6855a)
2023-04-18 19:07:04 +01:00
bachinger
85fb32d70f Use withLivePostrollPlaeholderAppended to add placeholder
PiperOrigin-RevId: 525177113
2023-04-18 18:14:32 +01:00
rohks
07ff3eeead Update release notes for Media3 1.0.1 / ExoPlayer 2.18.6
PiperOrigin-RevId: 525176828
2023-04-18 18:13:24 +01:00
tofunmi
9c3d30791a Move glObjectsProvider to DefaultVideoFrameProcessor.Factory.Builder
Removes glObjectsProvider from `VideoFrameProcessor` and `Effects`. Apps will set the glObjectsProvider on the DefaultVideoFrameProcessor.Factory.Builder when providing a custom DefaultVideoFrameProcessor.Factory, rather than in `Effects`.

PiperOrigin-RevId: 525169059
2023-04-18 18:12:14 +01:00
tofunmi
fae8111f59 Rename InternalTextureManager to BitmapTextureManager
A new texture manager will be created for input by texture ID so this texture manager won't be the only one to handle internal (i.e. non-external) textures.

PiperOrigin-RevId: 525116460
2023-04-18 18:11:02 +01:00
bachinger
c623b965c5 Use DataSourceBitmapLoader in session demo app
Issue: androidx/media#327
PiperOrigin-RevId: 525103046
2023-04-18 18:09:24 +01:00
andrewlewis
990f7ef5b5 Select codecs without util methods
`findDecoder/EncoderForFormat` seem to be more restrictive than querying
`MediaCodecList` as done for playback, and it's not clear that the cases where
no codec is found correspond to actual cases that would fail given that it
seems this returns an empty string for many cases in production.

Switch to using `MediaCodecUtil` and `EncoderUtil` for querying codecs instead.

PiperOrigin-RevId: 525078321
2023-04-18 18:08:18 +01:00
kimvde
23b1cab56c Fix video timestamp 0 set to large value in some cases
PiperOrigin-RevId: 525064269
2023-04-18 18:07:19 +01:00
Googler
ffa969f97c Expose MssimCaluclator for use in Duetdev tests
Child: <unknown commit>

PiperOrigin-RevId: 524876651
2023-04-18 18:06:01 +01:00
tonihei
fa972d9c1f Fix thread access when creating notifications for media sessions
The sessions may have different application threads for their players,
and the service with its notification provider runs on the main thread.
To ensure everything runs on the correct thread, this change labels
methods where needed and fixes thread access in some places.

Issue: androidx/media#318
PiperOrigin-RevId: 524849598
(cherry picked from commit ffa3743069408cf794cd48e8608df749e09d719e)
2023-04-18 17:05:28 +01:00
tonihei
8c5c58ec7e Remove unnecessary check for currentMediaItem in legacy session stub
This check was a leftover from when the metadata was generated from
the MediaItem only. Since we moved to the actual MediaMetadata fields,
the check is completely unnecessary and prevents accessing metadata
when the GET_CURRENT_MEDIA_ITEM command is not available.

PiperOrigin-RevId: 524837587
(cherry picked from commit e0bb23d4634421ede8827948a3ddae9c5d4a9089)
2023-04-18 15:19:27 +01:00
ibaker
d784857f1f Document style guide and google-java-format in CONTRIBUTING.md
Prompted by discussion on this commit: e8117496e0

#minor-release

PiperOrigin-RevId: 524795901
(cherry picked from commit f799766db53f42c89d4de3ac5a4ad21f9ca411e9)
2023-04-18 15:18:42 +01:00
ibaker
d5a81c5c41 Use @link instead of @value
Dackka doesn't support `@value`

PiperOrigin-RevId: 524309695
(cherry picked from commit b834e49f9ff1b3777e5b69c609b9eed83e9e6a5f)
2023-04-18 15:18:39 +01:00
tonihei
3b2b8d528d Ensure TrackSelectionParameters overrides match existing groups
The overrides specified by a MediaController may not use the exact
same TrackGroup instances as known to the Player because the groups
have been bundled to and from the controller. This bundling may
alter the instance slightly depending on the version used on each
side of the communication and the fields set (e.g. Format.metadata
is not supported for bundling).

This issue can be solved by creating unique track group ids for
each group on the session side before bundling. On the way back,
the groups in the track selection parameters can be mapped backed
to their original instances based on this id.

Issue: androidx/media#296
PiperOrigin-RevId: 523986626
(cherry picked from commit 1c557e2fd18c77243474af2f8c99fa6ea061b38a)
2023-04-18 15:17:40 +01:00
rohks
ba6ccee802 Update colr box values to be overridden by bitstream boxes
#minor-release

PiperOrigin-RevId: 523983688
(cherry picked from commit 596a7c7033ba061b48ac4edd5647c6d2fb813a2d)
2023-04-18 15:16:49 +01:00
rohks
ade8831166 Bump version numbers to Media3 1.0.1 and ExoPlayer 2.18.6
#minor-release

PiperOrigin-RevId: 523959161
(cherry picked from commit e033dbac03bfa0eb2aa13f855360fafe9f1bd488)
2023-04-18 15:16:49 +01:00