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

r2.18.0 #10349

Merged
merged 1,540 commits into from Jun 17, 2022
Merged

r2.18.0 #10349

merged 1,540 commits into from Jun 17, 2022
This pull request is big! We’re only showing the most recent 250 commits.

Commits on Apr 25, 2022

  1. FrameProcessor: Avoid early rounding in Presentation output dimensions.

    PiperOrigin-RevId: 444253425
    dway123 authored and icbaker committed Apr 25, 2022
    Copy the full SHA
    f1cda5f View commit details
    Browse the repository at this point in the history
  2. Keep AudioTrack on flush as default

    PiperOrigin-RevId: 444264961
    Samrobbo authored and icbaker committed Apr 25, 2022
    Copy the full SHA
    b816a3f View commit details
    Browse the repository at this point in the history
  3. Rollback of androidx/media@8a41682

    *** Original commit ***
    
    Keep AudioTrack on flush as default
    
    ***
    
    PiperOrigin-RevId: 444327724
    Samrobbo authored and icbaker committed Apr 25, 2022
    Copy the full SHA
    f0b34b8 View commit details
    Browse the repository at this point in the history
  4. Revert of a29206d

    PiperOrigin-RevId: 444347415
    Samrobbo authored and icbaker committed Apr 25, 2022
    Copy the full SHA
    d194ba9 View commit details
    Browse the repository at this point in the history
  5. Remove unused field lastPlayerInfo

    PiperOrigin-RevId: 444247251
    marcbaechinger authored and icbaker committed Apr 25, 2022
    Copy the full SHA
    bf16273 View commit details
    Browse the repository at this point in the history
  6. Revert of 8c07f1e

    PiperOrigin-RevId: 444347415
    Samrobbo authored and icbaker committed Apr 25, 2022
    Copy the full SHA
    059c359 View commit details
    Browse the repository at this point in the history

Commits on Apr 26, 2022

  1. Add 30 second high motion clips to AndroidTestUtil.

    30 second clips at higher resolutions are useful for testing encoder
    behaviour compared to shorter clips.
    
    PiperOrigin-RevId: 444505865
    Samrobbo authored and icbaker committed Apr 26, 2022
    Copy the full SHA
    c87d03e View commit details
    Browse the repository at this point in the history
  2. Add 30 second high motion clips to AndroidTestUtil.

    30 second clips at higher resolutions are useful for testing encoder
    behaviour compared to shorter clips.
    
    PiperOrigin-RevId: 444505865
    Samrobbo authored and icbaker committed Apr 26, 2022
    Copy the full SHA
    d88bd14 View commit details
    Browse the repository at this point in the history
  3. Transformer GL: save actual bitmap before checking pixel diffs.

    This allows the actual bitmap to be saved, even if output
    dimensions are different than expected. Otherwise, differing
    output dimensions would throw an exception, preventing the bitmap
    from being saved.
    
    PiperOrigin-RevId: 444512210
    dway123 authored and icbaker committed Apr 26, 2022
    Copy the full SHA
    3cf7f58 View commit details
    Browse the repository at this point in the history
  4. Transformer GL: save actual bitmap before checking pixel diffs.

    This allows the actual bitmap to be saved, even if output
    dimensions are different than expected. Otherwise, differing
    output dimensions would throw an exception, preventing the bitmap
    from being saved.
    
    PiperOrigin-RevId: 444512210
    dway123 authored and icbaker committed Apr 26, 2022
    Copy the full SHA
    877ba22 View commit details
    Browse the repository at this point in the history
  5. Transformer: remove unused bitmap test option.

    Remove unused saveTestBitmapToCacheDirectory throwOnFailure option.
    
    #cleanup
    
    PiperOrigin-RevId: 444516857
    dway123 authored and icbaker committed Apr 26, 2022
    Copy the full SHA
    22c9b81 View commit details
    Browse the repository at this point in the history
  6. Transformer: remove unused bitmap test option.

    Remove unused saveTestBitmapToCacheDirectory throwOnFailure option.
    
    #cleanup
    
    PiperOrigin-RevId: 444516857
    dway123 authored and icbaker committed Apr 26, 2022
    Copy the full SHA
    b29d496 View commit details
    Browse the repository at this point in the history
  7. Fix incorrect format variable

    PiperOrigin-RevId: 444530943
    marcbaechinger authored and icbaker committed Apr 26, 2022
    Copy the full SHA
    6708b43 View commit details
    Browse the repository at this point in the history
  8. Media Solutions: Fix misspelling for "roboletric"

    roboletric -> robolectric
    
    PiperOrigin-RevId: 440101421
    dway123 authored and icbaker committed Apr 26, 2022
    Copy the full SHA
    4b46ace View commit details
    Browse the repository at this point in the history
  9. Filter media notification actions

    The DefaultMediaNotificationProvider checks if a command is available
    before putting the respective action in the notification.
    
    PiperOrigin-RevId: 440114422
    christosts authored and icbaker committed Apr 26, 2022
    Copy the full SHA
    005882e View commit details
    Browse the repository at this point in the history
  10. Change SSIM transcode MIME type to H264.

    The MIME type was set to H265 to force transcoding. Now that we have an encoder
    factory that forces encoding, switching back to H264 ensures the quality test
    is conducted on more devices (those don't support H265 can be tested now).
    
    However, H265 should be part of the quality test after we have proper mechanism
    to skip test based on device capability.
    
    PiperOrigin-RevId: 440132471
    claincly authored and icbaker committed Apr 26, 2022
    Copy the full SHA
    7fc699e View commit details
    Browse the repository at this point in the history
  11. FrameProcessor: Add setCrop to Presentation.

    PiperOrigin-RevId: 440325693
    dway123 authored and icbaker committed Apr 26, 2022
    Copy the full SHA
    187b45b View commit details
    Browse the repository at this point in the history
  12. Add WorkerThread annotation to FrameProcessorChain helpers.

    PiperOrigin-RevId: 440347550
    hmsch authored and icbaker committed Apr 26, 2022
    Copy the full SHA
    1fbaa5c View commit details
    Browse the repository at this point in the history
  13. Expect PresentationTime Discontinuity During Stream Transitions

    PiperOrigin-RevId: 440378974
    ojw28 authored and icbaker committed Apr 26, 2022
    Copy the full SHA
    e4b0c20 View commit details
    Browse the repository at this point in the history
  14. Media: Remove unused test images.

    PiperOrigin-RevId: 441142050
    dway123 authored and icbaker committed Apr 26, 2022
    Copy the full SHA
    fbcb49e View commit details
    Browse the repository at this point in the history
  15. Remove transformer from inputValues json.

    Transformer resolves to null when wrapped, this is a debug line
    that was not removed.
    
    PiperOrigin-RevId: 441200790
    Samrobbo authored and icbaker committed Apr 26, 2022
    Copy the full SHA
    36c5b94 View commit details
    Browse the repository at this point in the history
  16. Make TransformerEndToEndTest constants private.

    PiperOrigin-RevId: 441230941
    hmsch authored and icbaker committed Apr 26, 2022
    Copy the full SHA
    af84358 View commit details
    Browse the repository at this point in the history
  17. Rename TracksInfo and TrackGroupInfo

    1. TracksInfo is renamed to Tracks
    2. TracksInfo.TrackGroupInfo is renamed to Tracks.Group
    
    PiperOrigin-RevId: 441232373
    ojw28 authored and icbaker committed Apr 26, 2022
    Copy the full SHA
    83daa05 View commit details
    Browse the repository at this point in the history
  18. FrameProcessor: Add aspect ratio changes to Presentation.

    PiperOrigin-RevId: 441250773
    dway123 authored and icbaker committed Apr 26, 2022
    Copy the full SHA
    34f014c View commit details
    Browse the repository at this point in the history
  19. Merge pull request #59 from h6ah4i:fix/cleanup-callbacks-on-media-con…

    …troller-release
    
    PiperOrigin-RevId: 441253378
    icbaker committed Apr 26, 2022
    Copy the full SHA
    85c0975 View commit details
    Browse the repository at this point in the history
  20. Removing using the test asset that has Mp3 audio track.

    The stream with the mp3 track is added because
    
    - We only encode to AAC
    - We only encode when the source track is not AAC
    
    Now that we have a way to force encoding, we no longer need the mp3 track.
    
    The test asset is kept for later parameterized testing.
    
    PiperOrigin-RevId: 440876080
    claincly authored and icbaker committed Apr 26, 2022
    Copy the full SHA
    9230381 View commit details
    Browse the repository at this point in the history
  21. Upgrade compileSdkVersion to 32 (Android 12L)

    PiperOrigin-RevId: 441424063
    christosts authored and icbaker committed Apr 26, 2022
    Copy the full SHA
    d152fc2 View commit details
    Browse the repository at this point in the history
  22. Rename GlFrameProcessor updateProgramAndDraw to drawFrame.

    What a minimal implementation should include is now explained in the
    interface javadoc while the method name reflects what the method does.
    
    PiperOrigin-RevId: 441432059
    hmsch authored and icbaker committed Apr 26, 2022
    Copy the full SHA
    f25c912 View commit details
    Browse the repository at this point in the history
  23. Clarify TransformationRequest setResolution javadoc.

    Scaling and rotation using ScaleToFitFrameProcessor may change the
    the resolution and aspect ratio, so defaulting to the same as the
    input is no longer accurate.
    
    PiperOrigin-RevId: 441463349
    hmsch authored and icbaker committed Apr 26, 2022
    Copy the full SHA
    22e016e View commit details
    Browse the repository at this point in the history
  24. FrameProcessor: Move test bitmaps to a separate directory.

    * Group what's now many related test PNGs by moving them to their own directory.
    * Move bitmap references to files where they're used, as each bitmap is only
    used once each, except the original bitmap.
    
    PiperOrigin-RevId: 441485489
    dway123 authored and icbaker committed Apr 26, 2022
    Copy the full SHA
    29e3254 View commit details
    Browse the repository at this point in the history
  25. Fix incorrect test id.

    PiperOrigin-RevId: 440906834
    Samrobbo authored and icbaker committed Apr 26, 2022
    Copy the full SHA
    7b78548 View commit details
    Browse the repository at this point in the history
  26. Tracks.Group/TrackGroup variable naming disambiguation

    PiperOrigin-RevId: 441712166
    ojw28 authored and icbaker committed Apr 26, 2022
    Copy the full SHA
    d9f0c2c View commit details
    Browse the repository at this point in the history
  27. Transformer Demo: Add short test video

    Add a very short (1 second) video, so that some manual tests / prototyping,
    including tests for the start and end of a video, encoder selection, or
    changes applied to frames, can finish quickly.
    
    PiperOrigin-RevId: 441756901
    dway123 authored and icbaker committed Apr 26, 2022
    Copy the full SHA
    d629e45 View commit details
    Browse the repository at this point in the history
  28. FrameProcessor: Add checks to ensure width and height are positive.

    Negative and zero values should be disallowed.
    
    PiperOrigin-RevId: 441757246
    dway123 authored and icbaker committed Apr 26, 2022
    Copy the full SHA
    3f4d03e View commit details
    Browse the repository at this point in the history
  29. Allow suppression of AssertionError in TransformerAndroidTestRunner.

    PiperOrigin-RevId: 440952335
    Samrobbo authored and icbaker committed Apr 26, 2022
    Copy the full SHA
    e4d7e5e View commit details
    Browse the repository at this point in the history
  30. Rename Player.COMMAND_GET_TRACK_INFOS to COMMAND_GET_TRACKS

    `Player.getCurrentTracksInfo` was renamed to `Player.getCurrentTracks` in
    androidx/media@83daa05.
    
    PiperOrigin-RevId: 441825078
    icbaker committed Apr 26, 2022
    Copy the full SHA
    5186798 View commit details
    Browse the repository at this point in the history
  31. Add checks for device capability in tests.

    PiperOrigin-RevId: 442751310
    claincly authored and icbaker committed Apr 26, 2022
    Copy the full SHA
    7a67609 View commit details
    Browse the repository at this point in the history
  32. Fix FrameProcessorChain method ordering.

    signalEndOfInputStream makes more sense before isEnded and
    getPendingInputFrameCount is related to registerInputFrame.
    
    PiperOrigin-RevId: 441134418
    hmsch authored and icbaker committed Apr 26, 2022
    Copy the full SHA
    eea6fc0 View commit details
    Browse the repository at this point in the history
  33. Block until FrameProcessorChain is released.

    This is safer because it will prevent any future problems with
    creating a new FrameProcessorChain before the previous one has
    completed its async release.
    
    From [eglDestroyContext documentation](https://www.khronos.org/registry/EGL/sdk/docs/man/html/eglDestroyContext.xhtml):
    "If the EGL rendering context is not current to any thread,
    eglDestroyContext destroys it immediately."
    The context isn't current to any thread here because GlUtil calls
    eglMakeCurrent with EGL_NO_CONTEXT before calling eglDestroyContext.
    So everthing should be released once the FrameProcessorChain's
    release task terminates.
    
    PiperOrigin-RevId: 442807484
    hmsch authored and icbaker committed Apr 26, 2022
    Copy the full SHA
    afa551a View commit details
    Browse the repository at this point in the history
  34. Add context param to GlFrameProcessor initialize().

    PiperOrigin-RevId: 442826391
    hmsch authored and icbaker committed Apr 26, 2022
    Copy the full SHA
    5248bbb View commit details
    Browse the repository at this point in the history
  35. FrameProcessor: Improve PresentationFrameProcessor javadocs.

    PiperOrigin-RevId: 442835160
    dway123 authored and icbaker committed Apr 26, 2022
    Copy the full SHA
    7f7e84b View commit details
    Browse the repository at this point in the history
  36. Add 4 different video resolutions for bitrate analysis.

    PiperOrigin-RevId: 442844189
    Samrobbo authored and icbaker committed Apr 26, 2022
    Copy the full SHA
    d1f8e96 View commit details
    Browse the repository at this point in the history
  37. Media: Remove unused test images.

    PiperOrigin-RevId: 441142050
    dway123 authored and icbaker committed Apr 26, 2022
    Copy the full SHA
    5174bf3 View commit details
    Browse the repository at this point in the history
  38. DownloadHelper: propagate errors to callback

    When downlading an adaptive asset, if an ExoPlaybackException happens
    during track selection, the player raises an
    UnsupportedOperationException which is not handled gracefully and can
    crash the app main thread.
    
    This change catches the error and forwards it to
    DownloadHelper.Callback.onPrepareError() as an IOException.
    
    PiperOrigin-RevId: 443015332
    christosts authored and icbaker committed Apr 26, 2022
    Copy the full SHA
    63052e1 View commit details
    Browse the repository at this point in the history
  39. Apply resolution fix.

    Some devices under report their resolution support, like 2144 for 2160 in
    H265, 1072 for 1080 in H264. This CL only takes care of these two cases,
    
    - reporting 1920x1080 is supported when the device reports 1920x1072, and
    - reporting 3840x2160 is supported when the device reports 3840x2144
    
    PiperOrigin-RevId: 443095042
    claincly authored and icbaker committed Apr 26, 2022
    Copy the full SHA
    f903e4a View commit details
    Browse the repository at this point in the history
  40. Remove transformer from inputValues json.

    Transformer resolves to null when wrapped, this is a debug line
    that was not removed.
    
    PiperOrigin-RevId: 441200790
    Samrobbo authored and icbaker committed Apr 26, 2022
    Copy the full SHA
    3b21c7e View commit details
    Browse the repository at this point in the history
  41. Don't use API 26 SurfaceTexture constructor in frame processor tests.

    After this change the test will use EGL_NO_SURFACE or a pixel buffer surface if using no surface is not supported.
    
    PiperOrigin-RevId: 443113794
    hmsch authored and icbaker committed Apr 26, 2022
    Copy the full SHA
    6939464 View commit details
    Browse the repository at this point in the history
  42. Align MediaCodec and Decoder AudioRenderer onDisabled logic.

    PiperOrigin-RevId: 443156130
    Samrobbo authored and icbaker committed Apr 26, 2022
    Copy the full SHA
    a29206d View commit details
    Browse the repository at this point in the history
  43. Make TransformerEndToEndTest constants private.

    PiperOrigin-RevId: 441230941
    hmsch authored and icbaker committed Apr 26, 2022
    Copy the full SHA
    3f47c1e View commit details
    Browse the repository at this point in the history
  44. Expand Samsung/1+ workaround to API 31 + 32

    The issue with decoding getting stuck is still reproducible on `samsung/beyond1lteeea/beyond1:12/SP1A.210812.016/G973FXXUEGULB:user/release-keys`.
    
    PiperOrigin-RevId: 443368546
    andrewlewis authored and icbaker committed Apr 26, 2022
    Copy the full SHA
    27c1876 View commit details
    Browse the repository at this point in the history
  45. Fix Basic authentication header

    Issue: #9544
    
    The header must include the word "Basic", but the word is missing.
    
    #minor-release
    
    PiperOrigin-RevId: 443386880
    claincly authored and icbaker committed Apr 26, 2022
    Copy the full SHA
    16b0cee View commit details
    Browse the repository at this point in the history
  46. FrameProcessor: Create EncoderCompatibilityFrameProcessor.

    Split rotationDegrees changes to EncoderCompatibilityFrameProcessor, a new
    FrameProcessor.
    
    This removes automatic rotationDegrees adjustments from Presentation, which
    allows Presentation to be used for changes before the end of a
    FrameProcessorChain pipeline.
    
    PiperOrigin-RevId: 443387226
    dway123 authored and icbaker committed Apr 26, 2022
    Copy the full SHA
    3cfdfb4 View commit details
    Browse the repository at this point in the history
  47. Remove a completed TODO item

    PiperOrigin-RevId: 443620931
    claincly authored and icbaker committed Apr 26, 2022
    Copy the full SHA
    f9bce2a View commit details
    Browse the repository at this point in the history
  48. Rename TracksInfo and TrackGroupInfo

    1. TracksInfo is renamed to Tracks
    2. TracksInfo.TrackGroupInfo is renamed to Tracks.Group
    
    PiperOrigin-RevId: 441232373
    ojw28 authored and icbaker committed Apr 26, 2022
    Copy the full SHA
    0ad508b View commit details
    Browse the repository at this point in the history
  49. Fix encoder configuration before API 25

    Float I-frame intervals are only supported from API 25 onwards (see https://developer.android.com/reference/android/media/MediaFormat#KEY_I_FRAME_INTERVAL).
    
    Setting a null value for profile/level can cause a native crash when configuring the decoder.
    
    PiperOrigin-RevId: 443647924
    andrewlewis authored and icbaker committed Apr 26, 2022
    Copy the full SHA
    0a378a4 View commit details
    Browse the repository at this point in the history
  50. Add an SSIM test with 360p input

    This test should run on all devices from API 21 (the media uses Baseline
    profile level 3.0 H.264) to give us coverage of the full pipeline (forcing
    re-encoding) and SSIM calculation on all devices.
    
    PiperOrigin-RevId: 443650002
    andrewlewis authored and icbaker committed Apr 26, 2022
    Copy the full SHA
    c8744ee View commit details
    Browse the repository at this point in the history
  51. Catch unchecked exception in RtspSessionTiming parsing.

    Issue: #10165
    #minor-release
    PiperOrigin-RevId: 443653894
    claincly authored and icbaker committed Apr 26, 2022
    Copy the full SHA
    59ced53 View commit details
    Browse the repository at this point in the history
  52. FrameProcessor: Add aspect ratio changes to Presentation.

    PiperOrigin-RevId: 441250773
    dway123 authored and icbaker committed Apr 26, 2022
    Copy the full SHA
    304d579 View commit details
    Browse the repository at this point in the history
  53. Transformer GL: Avoid no-op ScaleToFit / Presentation FrameProcessors

    Avoid no-op FrameProcessors in VideoTranscodingSamplePipeline, to avoid
    creating resources for and executing GL for a no-op vertex+fragment shader.
    
    EncoderCompatibilityFrameProcessor will still always be exercised.
    
    PiperOrigin-RevId: 443675833
    dway123 authored and icbaker committed Apr 26, 2022
    Copy the full SHA
    36d190b View commit details
    Browse the repository at this point in the history
  54. Use last frame processor to draw on debug surface view.

    The last frame processor could use a different drawing command
    than a four vertex triangle strip. So we need call its drawing
    method again instead of assuming the shape.
    
    PiperOrigin-RevId: 444217274
    hmsch authored and icbaker committed Apr 26, 2022
    Copy the full SHA
    0274345 View commit details
    Browse the repository at this point in the history
  55. Fix warning about potential integer overflow in DefaultAudioSink

    PiperOrigin-RevId: 444221415
    icbaker committed Apr 26, 2022
    Copy the full SHA
    b7a4151 View commit details
    Browse the repository at this point in the history
  56. Upgrade compileSdkVersion to 32 (Android 12L)

    PiperOrigin-RevId: 441424063
    christosts authored and icbaker committed Apr 26, 2022
    Copy the full SHA
    f4e0339 View commit details
    Browse the repository at this point in the history
  57. Rename GlFrameProcessor updateProgramAndDraw to drawFrame.

    What a minimal implementation should include is now explained in the
    interface javadoc while the method name reflects what the method does.
    
    PiperOrigin-RevId: 441432059
    hmsch authored and icbaker committed Apr 26, 2022
    Copy the full SHA
    fe7e330 View commit details
    Browse the repository at this point in the history
  58. Clarify TransformationRequest setResolution javadoc.

    Scaling and rotation using ScaleToFitFrameProcessor may change the
    the resolution and aspect ratio, so defaulting to the same as the
    input is no longer accurate.
    
    PiperOrigin-RevId: 441463349
    hmsch authored and icbaker committed Apr 26, 2022
    Copy the full SHA
    2ad44a7 View commit details
    Browse the repository at this point in the history
  59. FrameProcessor: Move test bitmaps to a separate directory.

    * Group what's now many related test PNGs by moving them to their own directory.
    * Move bitmap references to files where they're used, as each bitmap is only
    used once each, except the original bitmap.
    
    PiperOrigin-RevId: 441485489
    dway123 authored and icbaker committed Apr 26, 2022
    Copy the full SHA
    e077c76 View commit details
    Browse the repository at this point in the history
  60. Tracks.Group/TrackGroup variable naming disambiguation

    PiperOrigin-RevId: 441712166
    ojw28 authored and icbaker committed Apr 26, 2022
    Copy the full SHA
    fbd8273 View commit details
    Browse the repository at this point in the history
  61. Transformer Demo: Add short test video

    Add a very short (1 second) video, so that some manual tests / prototyping,
    including tests for the start and end of a video, encoder selection, or
    changes applied to frames, can finish quickly.
    
    PiperOrigin-RevId: 441756901
    dway123 authored and icbaker committed Apr 26, 2022
    Copy the full SHA
    ef96932 View commit details
    Browse the repository at this point in the history
  62. FrameProcessor: Add checks to ensure width and height are positive.

    Negative and zero values should be disallowed.
    
    PiperOrigin-RevId: 441757246
    dway123 authored and icbaker committed Apr 26, 2022
    Copy the full SHA
    96b5014 View commit details
    Browse the repository at this point in the history
  63. Rename Player.COMMAND_GET_TRACK_INFOS to COMMAND_GET_TRACKS

    `Player.getCurrentTracksInfo` was renamed to `Player.getCurrentTracks` in
    0ad508b.
    
    PiperOrigin-RevId: 441825078
    icbaker committed Apr 26, 2022
    Copy the full SHA
    6c80a82 View commit details
    Browse the repository at this point in the history
  64. Add checks for device capability in tests.

    PiperOrigin-RevId: 442751310
    claincly authored and icbaker committed Apr 26, 2022
    Copy the full SHA
    570769a View commit details
    Browse the repository at this point in the history
  65. Block until FrameProcessorChain is released.

    This is safer because it will prevent any future problems with
    creating a new FrameProcessorChain before the previous one has
    completed its async release.
    
    From [eglDestroyContext documentation](https://www.khronos.org/registry/EGL/sdk/docs/man/html/eglDestroyContext.xhtml):
    "If the EGL rendering context is not current to any thread,
    eglDestroyContext destroys it immediately."
    The context isn't current to any thread here because GlUtil calls
    eglMakeCurrent with EGL_NO_CONTEXT before calling eglDestroyContext.
    So everthing should be released once the FrameProcessorChain's
    release task terminates.
    
    PiperOrigin-RevId: 442807484
    hmsch authored and icbaker committed Apr 26, 2022
    Copy the full SHA
    ba5d570 View commit details
    Browse the repository at this point in the history
  66. Add context param to GlFrameProcessor initialize().

    PiperOrigin-RevId: 442826391
    hmsch authored and icbaker committed Apr 26, 2022
    Copy the full SHA
    7e76f77 View commit details
    Browse the repository at this point in the history
  67. FrameProcessor: Improve PresentationFrameProcessor javadocs.

    PiperOrigin-RevId: 442835160
    dway123 authored and icbaker committed Apr 26, 2022
    Copy the full SHA
    6138a0b View commit details
    Browse the repository at this point in the history
  68. Add 4 different video resolutions for bitrate analysis.

    PiperOrigin-RevId: 442844189
    Samrobbo authored and icbaker committed Apr 26, 2022
    Copy the full SHA
    eb72e0a View commit details
    Browse the repository at this point in the history
  69. DownloadHelper: propagate errors to callback

    When downlading an adaptive asset, if an ExoPlaybackException happens
    during track selection, the player raises an
    UnsupportedOperationException which is not handled gracefully and can
    crash the app main thread.
    
    This change catches the error and forwards it to
    DownloadHelper.Callback.onPrepareError() as an IOException.
    
    PiperOrigin-RevId: 443015332
    christosts authored and icbaker committed Apr 26, 2022
    Copy the full SHA
    c199368 View commit details
    Browse the repository at this point in the history
  70. Apply resolution fix.

    Some devices under report their resolution support, like 2144 for 2160 in
    H265, 1072 for 1080 in H264. This CL only takes care of these two cases,
    
    - reporting 1920x1080 is supported when the device reports 1920x1072, and
    - reporting 3840x2160 is supported when the device reports 3840x2144
    
    PiperOrigin-RevId: 443095042
    claincly authored and icbaker committed Apr 26, 2022
    Copy the full SHA
    3459197 View commit details
    Browse the repository at this point in the history
  71. Don't use API 26 SurfaceTexture constructor in frame processor tests.

    After this change the test will use EGL_NO_SURFACE or a pixel buffer surface if using no surface is not supported.
    
    PiperOrigin-RevId: 443113794
    hmsch authored and icbaker committed Apr 26, 2022
    Copy the full SHA
    e996d48 View commit details
    Browse the repository at this point in the history
  72. Align MediaCodec and Decoder AudioRenderer onDisabled logic.

    PiperOrigin-RevId: 443156130
    Samrobbo authored and icbaker committed Apr 26, 2022
    Copy the full SHA
    8c07f1e View commit details
    Browse the repository at this point in the history
  73. Expand Samsung/1+ workaround to API 31 + 32

    The issue with decoding getting stuck is still reproducible on `samsung/beyond1lteeea/beyond1:12/SP1A.210812.016/G973FXXUEGULB:user/release-keys`.
    
    PiperOrigin-RevId: 443368546
    andrewlewis authored and icbaker committed Apr 26, 2022
    Copy the full SHA
    3867f8e View commit details
    Browse the repository at this point in the history
  74. Fix Basic authentication header

    Issue: #9544
    
    The header must include the word "Basic", but the word is missing.
    
    #minor-release
    
    PiperOrigin-RevId: 443386880
    claincly authored and icbaker committed Apr 26, 2022
    Copy the full SHA
    084dfc0 View commit details
    Browse the repository at this point in the history
  75. FrameProcessor: Create EncoderCompatibilityFrameProcessor.

    Split rotationDegrees changes to EncoderCompatibilityFrameProcessor, a new
    FrameProcessor.
    
    This removes automatic rotationDegrees adjustments from Presentation, which
    allows Presentation to be used for changes before the end of a
    FrameProcessorChain pipeline.
    
    PiperOrigin-RevId: 443387226
    dway123 authored and icbaker committed Apr 26, 2022
    Copy the full SHA
    20dac7c View commit details
    Browse the repository at this point in the history
  76. Update the playback speed details in the live streaming dev guide

    ExoPlayer's default behaviour changed in b12918d.
    
    Issue: #10170
    #minor-release
    PiperOrigin-RevId: 443611196
    icbaker committed Apr 26, 2022
    Copy the full SHA
    f08dea2 View commit details
    Browse the repository at this point in the history
  77. Remove a completed TODO item

    PiperOrigin-RevId: 443620931
    claincly authored and icbaker committed Apr 26, 2022
    Copy the full SHA
    3abc547 View commit details
    Browse the repository at this point in the history
  78. Fix encoder configuration before API 25

    Float I-frame intervals are only supported from API 25 onwards (see https://developer.android.com/reference/android/media/MediaFormat#KEY_I_FRAME_INTERVAL).
    
    Setting a null value for profile/level can cause a native crash when configuring the decoder.
    
    PiperOrigin-RevId: 443647924
    andrewlewis authored and icbaker committed Apr 26, 2022
    Copy the full SHA
    5a3ed34 View commit details
    Browse the repository at this point in the history
  79. Add an SSIM test with 360p input

    This test should run on all devices from API 21 (the media uses Baseline
    profile level 3.0 H.264) to give us coverage of the full pipeline (forcing
    re-encoding) and SSIM calculation on all devices.
    
    PiperOrigin-RevId: 443650002
    andrewlewis authored and icbaker committed Apr 26, 2022
    Copy the full SHA
    6443d5b View commit details
    Browse the repository at this point in the history
  80. Catch unchecked exception in RtspSessionTiming parsing.

    Issue: #10165
    #minor-release
    PiperOrigin-RevId: 443653894
    claincly authored and icbaker committed Apr 26, 2022
    Copy the full SHA
    85bd080 View commit details
    Browse the repository at this point in the history
  81. Transformer GL: Avoid no-op ScaleToFit / Presentation FrameProcessors

    Avoid no-op FrameProcessors in VideoTranscodingSamplePipeline, to avoid
    creating resources for and executing GL for a no-op vertex+fragment shader.
    
    EncoderCompatibilityFrameProcessor will still always be exercised.
    
    PiperOrigin-RevId: 443675833
    dway123 authored and icbaker committed Apr 26, 2022
    Copy the full SHA
    4f272cc View commit details
    Browse the repository at this point in the history
  82. Use last frame processor to draw on debug surface view.

    The last frame processor could use a different drawing command
    than a four vertex triangle strip. So we need call its drawing
    method again instead of assuming the shape.
    
    PiperOrigin-RevId: 444217274
    hmsch authored and icbaker committed Apr 26, 2022
    Copy the full SHA
    928a69d View commit details
    Browse the repository at this point in the history
  83. Fix warning about potential integer overflow in DefaultAudioSink

    PiperOrigin-RevId: 444221415
    icbaker committed Apr 26, 2022
    Copy the full SHA
    40c27c4 View commit details
    Browse the repository at this point in the history
  84. FrameProcessor: Avoid early rounding in Presentation output dimensions.

    PiperOrigin-RevId: 444253425
    dway123 authored and icbaker committed Apr 26, 2022
    Copy the full SHA
    0760520 View commit details
    Browse the repository at this point in the history
  85. Keep AudioTrack on flush as default

    PiperOrigin-RevId: 444264961
    Samrobbo authored and icbaker committed Apr 26, 2022
    Copy the full SHA
    8da6c35 View commit details
    Browse the repository at this point in the history
  86. Rollback of 8da6c35

    *** Original commit ***
    
    Keep AudioTrack on flush as default
    
    ***
    
    PiperOrigin-RevId: 444327724
    Samrobbo authored and icbaker committed Apr 26, 2022
    Copy the full SHA
    d536fe3 View commit details
    Browse the repository at this point in the history
  87. Transformer GL: Add support for pixelWidthHeightRatio.

    To ensure frame processor operations operate on square pixels,
    make the frame taller or wider for non-square input pixels.
    
    In addition to automated tests, this was tested by changing the
    inputFormat.pixelWidthHeightRatio in the TransformerVideoRenderer.
    
    PiperOrigin-RevId: 444553517
    dway123 authored and ojw28 committed Apr 26, 2022
    Copy the full SHA
    1eadde5 View commit details
    Browse the repository at this point in the history
  88. Merge pull request #10214 from cedricxperi:dev-v2

    PiperOrigin-RevId: 444585404
    ojw28 committed Apr 26, 2022
    Copy the full SHA
    c25a3af View commit details
    Browse the repository at this point in the history

Commits on May 3, 2022

  1. Rollback of 8da8c5e

    *** Original commit ***
    
    Upgrade Robolectric dependency to 4.8
    
    ***
    
    PiperOrigin-RevId: 446175705
    christosts authored and icbaker committed May 3, 2022
    Copy the full SHA
    c517d9a View commit details
    Browse the repository at this point in the history
  2. Misc fix on parameter comment

    PiperOrigin-RevId: 446181877
    christosts authored and icbaker committed May 3, 2022
    Copy the full SHA
    02d847f View commit details
    Browse the repository at this point in the history
  3. Separate matrix effect specification and implementation.

    This change splits AdvancedFrameProcessor into 4 files:
    - MatrixTransformationFrameProcessor for the GlFrameProcessor
      implementation
    - MatrixTransformation and GlMatrixTransformation for the GlEffect
      specification
    - MatrixUtils for the static matrix helpers
    
    PiperOrigin-RevId: 446236384
    hmsch authored and icbaker committed May 3, 2022
    Copy the full SHA
    0bba5c6 View commit details
    Browse the repository at this point in the history
  4. Use Android 12L APIs directly

    Some APIs from Android 12L were used either via reflection or
    constants values were hard-coded. We can now use these APIs directly
    since we upgraded the compile SDK version to 32.
    
    PiperOrigin-RevId: 446167543
    christosts authored and icbaker committed May 3, 2022
    Copy the full SHA
    3830d02 View commit details
    Browse the repository at this point in the history

Commits on May 4, 2022

  1. Migrate usages of the deprecated TrackSelectionParameters.CREATOR

    PiperOrigin-RevId: 446400192
    icbaker committed May 4, 2022
    Copy the full SHA
    8bb11f3 View commit details
    Browse the repository at this point in the history
  2. Upgrade Robolectric dependency to 4.8.1

    PiperOrigin-RevId: 446423017
    ojw28 authored and icbaker committed May 4, 2022
    Copy the full SHA
    dec1d37 View commit details
    Browse the repository at this point in the history
  3. Add frame processor based on MediaPipe to demo

    PiperOrigin-RevId: 446432695
    andrewlewis authored and icbaker committed May 4, 2022
    Copy the full SHA
    ee3a183 View commit details
    Browse the repository at this point in the history
  4. Add TrackSelector.release()

    The TrackSelector is released when the player is released. The
    TrackSelector can be reused if TrackSelector.init() is called again.
    
    PiperOrigin-RevId: 446439717
    christosts authored and icbaker committed May 4, 2022
    Copy the full SHA
    e62338e View commit details
    Browse the repository at this point in the history
  5. GL: Update exoplayer to use bindTexture.

    Refactoring change only.
    
    PiperOrigin-RevId: 446475708
    dway123 authored and icbaker committed May 4, 2022
    Copy the full SHA
    3730c1e View commit details
    Browse the repository at this point in the history
  6. Use MatrixTransformation instead of wrapping its GlFrameProcssor.

    ScaleToFitFrameProcessor, PresentationFrameProcessor,
    and EncoderCompatibilityFrameProcessor now each implement
    MatrixTransformation instead of wrapping
    MatrixTransformationFrameProcessor.
    
    PiperOrigin-RevId: 446480286
    hmsch authored and icbaker committed May 4, 2022
    Copy the full SHA
    3701e80 View commit details
    Browse the repository at this point in the history

Commits on May 5, 2022

  1. Workaround for OkHttp Interrupt issues.

    Relates to square/okhttp#3146. This was from androidx/media#71.
    
    There is a draft PR https://github.com/square/okhttp/pull/7185/files which documents OkHttp's ideal handling of cancellation including interrupts.
    
    But a few key points
    
    1) This is a target state, and OkHttp does not currently handle interrupts correctly.  In the past this has been identified, and the advice is to avoid interrupts on Http threads, see discussion on square/okhttp#1902. Also an attempt at a fix here square/okhttp#7023 which wasn't in a form to land.
    
    2) Even with this fixed, it is likely to never be optimal, because of OkHttp sharing a socket connection for multiple inflight requests.
    
    From square/okhttp#7185
    
    ```
    Thread.interrupt() is Clumsy
    ----------------------------
    
    `Thread.interrupt()` is Java's built-in mechanism to cancel an in-flight `Thread`, regardless of
    what work it's currently performing.
    
    We recommend against using `Thread.interrupt()` with OkHttp because it may disrupt shared resources
    including HTTP/2 connections and cache files. In particular, calling `Thread.interrupt()` may cause
    unrelated threads' call to fail with an `IOException`.
    ```
    
    This PR leaves the Loader/DataSource thread parked on a countdown latch, while this may seem wasteful and an additional context switch. However in practice the response isn't returned until the Http2Connection and Http2Reader have a response from the server and these means effectively parking in a `wait()` statement here https://github.com/square/okhttp/blob/9e039e94123defbfd5f11dc64ae146c46b7230eb/okhttp/src/jvmMain/kotlin/okhttp3/internal/http2/Http2Stream.kt#L140
    
    PiperOrigin-RevId: 446652468
    yschimke authored and icbaker committed May 5, 2022
    Copy the full SHA
    0f502b2 View commit details
    Browse the repository at this point in the history
  2. Remove redundant attribute from matrix transformation vertex shader.

    The texture coordinates can be derived from the frame coordinates.
    
    PiperOrigin-RevId: 446770538
    hmsch authored and icbaker committed May 5, 2022
    Copy the full SHA
    ff1305c View commit details
    Browse the repository at this point in the history

Commits on May 6, 2022

  1. Remove ExoPlayer's RawCcExtractor

    RawCC is a Google-internal subtitle format, and is no longer used with
    ExoPlayer.
    
    PiperOrigin-RevId: 446950691
    icbaker committed May 6, 2022
    Copy the full SHA
    a0ac261 View commit details
    Browse the repository at this point in the history
  2. Transformer GL: Remove obsolete TODOs.

    We won't try to provide/rethrow helpful error messages that are already
    provided by GL, as this sort of task would expand into writing a GL verifier.
    A Gl verifier is unnecessarily complex for minimal payoff, especially as Apps
    expected to read GL error messages would mostly be those writing custom
    GlFrameProcessors, who should be already be familiar with reading GL error
    messages anyways.
    
    PiperOrigin-RevId: 446950837
    dway123 authored and icbaker committed May 6, 2022
    Copy the full SHA
    7cf5964 View commit details
    Browse the repository at this point in the history
  3. Disable transcoding when reading content URIs

    Before this change, we list the formats for which we don't
    want transcoding. This change disables transcoding altogether.
    
    This was tested by checking that transcoding takes place on a
    short camera recording only when the added flag is not present
    (and AndroidManifest does not declare support for HEVC).
    
    PiperOrigin-RevId: 446986580
    AquilesCanta authored and icbaker committed May 6, 2022
    Copy the full SHA
    521e067 View commit details
    Browse the repository at this point in the history
  4. Match the suggested bitrate to the actual Kush Gauge formula.

    As defined in Kush Amerasinghe's paper 'H.264 For the rest of us'.
    
    PiperOrigin-RevId: 446988272
    Samrobbo authored and icbaker committed May 6, 2022
    Copy the full SHA
    5df6a58 View commit details
    Browse the repository at this point in the history

Commits on May 9, 2022

  1. Fix review comment in RTPVp9Reader

    Change-Id: I7e2d36eb3d69fb09e0d0bbc283d41165c69d4076
    rakeshnitb committed May 9, 2022
    Copy the full SHA
    a1cff9a View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    432ae9d View commit details
    Browse the repository at this point in the history
  3. Merge pull request #10150 from egor-n:dev-v2-8435-outlinecolour

    PiperOrigin-RevId: 444787307
    icbaker committed May 9, 2022
    Copy the full SHA
    a8c0a1b View commit details
    Browse the repository at this point in the history
  4. Transformer Demo: Add video with pixelWidthHeightRatio != 1.

    This can allow apps to test and demonstrate support for videos with
    pixelWidthHeightRatio != 1.
    
    PiperOrigin-RevId: 444815182
    dway123 authored and icbaker committed May 9, 2022
    Copy the full SHA
    a5adc8d View commit details
    Browse the repository at this point in the history
  5. Merge pull request #9967 from jruesga:cea708-handle-multiple-service-…

    …blocks
    
    PiperOrigin-RevId: 444816821
    icbaker committed May 9, 2022
    Copy the full SHA
    925a907 View commit details
    Browse the repository at this point in the history
  6. Clean up Util.inferContentType methods

    This fixes some small niggles:
    1. `inferContentType(String)` is documented to take a path, but in the
       tests we're passing full URIs.
    2. A `String` parameter is usually a path, but also a MIME type or an
       extension. In the new methods, the meaning of a `String` parameter
       is always clear from the name of the method.
    3. `inferContentType(String)` is always passed an extension in
       'production' code (which has to be manually prefixed with a dot).
    4. `inferContentType(Uri, @nullable String)` always ignores the Uri if
       the String is non-null. IMO this logic is clearer to a reader if it's
       just in-lined at the call-site.
    
    These methods are used from the demo apps, so will be part of the stable
    API.
    
    PiperOrigin-RevId: 444826053
    icbaker committed May 9, 2022
    Copy the full SHA
    754eb15 View commit details
    Browse the repository at this point in the history
  7. Ignore mandatory SDP fields as ExoPlayer doesn't use them

    Issue: #10049
    PiperOrigin-RevId: 444833508
    claincly authored and icbaker committed May 9, 2022
    Copy the full SHA
    5d1af64 View commit details
    Browse the repository at this point in the history
  8. Fix calculations that may lose precision compared to their target type

    PiperOrigin-RevId: 444861268
    icbaker committed May 9, 2022
    Copy the full SHA
    91b0d55 View commit details
    Browse the repository at this point in the history
  9. Fix incorrect JavaDoc

    PiperOrigin-RevId: 444874326
    marcbaechinger authored and icbaker committed May 9, 2022
    Copy the full SHA
    4c2ea75 View commit details
    Browse the repository at this point in the history
  10. Fix PeriodicVignetteFrameProcessor javadoc.

    The parameter was removed in a previous CL but wasn't removed
    from the javadoc yet.
    
    PiperOrigin-RevId: 444879675
    hmsch authored and icbaker committed May 9, 2022
    Copy the full SHA
    3874245 View commit details
    Browse the repository at this point in the history
  11. Reading AV1 initialization data.

    We add an entire class like we do for parsing other codec initialization formats; it's currently not doing any parsing though (... initialization data is really simple for AV1 though: just the entire contents of the box).
    
    For testing, we add the sample file, having been re-encoded with ffmpeg (and we also happen to have another av1 file, too).
    
    PiperOrigin-RevId: 444890282
    ojw28 authored and icbaker committed May 9, 2022
    Copy the full SHA
    825976c View commit details
    Browse the repository at this point in the history
  12. Add format when building a URI for an IMA SSAI media item

    PiperOrigin-RevId: 445098397
    marcbaechinger authored and icbaker committed May 9, 2022
    Copy the full SHA
    ebcd3b0 View commit details
    Browse the repository at this point in the history
  13. Add device capability based test skipping.

    Change test name prefix from `transform` to `transcode` for consistency.
    
    PiperOrigin-RevId: 445106224
    claincly authored and icbaker committed May 9, 2022
    Copy the full SHA
    a161482 View commit details
    Browse the repository at this point in the history
  14. Transformer: Restrict frame buffer size for all omx decoders API >= 29.

    PiperOrigin-RevId: 445119411
    dway123 authored and icbaker committed May 9, 2022
    Copy the full SHA
    404192e View commit details
    Browse the repository at this point in the history
  15. Change video asset used in TranscodeQualityTest

    The old video has a `irregular' resolution of 1080x720. Change to a 1920x1080
    video.
    
    PiperOrigin-RevId: 445124065
    claincly authored and icbaker committed May 9, 2022
    Copy the full SHA
    be634bf View commit details
    Browse the repository at this point in the history
  16. Remove unneeded warning suppression from FrameworkMediaDrm

    PiperOrigin-RevId: 445162900
    icbaker committed May 9, 2022
    Copy the full SHA
    d711405 View commit details
    Browse the repository at this point in the history
  17. Transformer: Misc nits

    * Add a /* paramName= */ comment
    * Remove an unnecessary comma.
    * Remove extra "internal " for a b/### link
    
    PiperOrigin-RevId: 445169649
    dway123 authored and icbaker committed May 9, 2022
    Copy the full SHA
    c67d691 View commit details
    Browse the repository at this point in the history
  18. Upgrade Robolectric dependency to 4.8

    PiperOrigin-RevId: 445196313
    ojw28 authored and icbaker committed May 9, 2022
    Copy the full SHA
    8da8c5e View commit details
    Browse the repository at this point in the history
  19. Fix Util.inferContentTypeForExtension to handle .ism (smooth streaming)

    This method was introduced in 754eb15
    as a replacement for Util.inferContentType(String) but it incorrectly
    didn't return TYPE_SS when passed "ism" or "isml".
    
    PiperOrigin-RevId: 445217167
    icbaker committed May 9, 2022
    Copy the full SHA
    bec9431 View commit details
    Browse the repository at this point in the history
  20. Remove empty <p> tag from WebvttDecoder

    PiperOrigin-RevId: 445217294
    icbaker committed May 9, 2022
    Copy the full SHA
    c5ad28a View commit details
    Browse the repository at this point in the history
  21. Rename CONTENT_TYPE_ @AudioContentType values to AUDIO_CONTENT_TYPE_*

    This is consistent with the IntDef name, and frees up the CONTENT_TYPE_
    prefix for the @ContentType values (which are currently just TYPE_*,
    and therefore ambiguous with lots of other 'type' values in C).
    
    PiperOrigin-RevId: 445356476
    icbaker committed May 9, 2022
    Copy the full SHA
    07d08ba View commit details
    Browse the repository at this point in the history
  22. Prefix @ContentType values with CONTENT_

    PiperOrigin-RevId: 445356625
    icbaker committed May 9, 2022
    Copy the full SHA
    a433163 View commit details
    Browse the repository at this point in the history
  23. Add copies of PlayerControlView's public listeners to PlayerView

    Developers are expected to (eventually) only use methods on
    PlayerView (and not PlayerControlView) to interact with the UI
    controller.
    
    PiperOrigin-RevId: 445361488
    icbaker committed May 9, 2022
    Copy the full SHA
    a840f97 View commit details
    Browse the repository at this point in the history
  24. Return recommended output size for FrameProcessorChain.

    Also add warning for what can happen if this is ignored.
    
    Previously the return value was overridden by setOutputSurface, now
    setOutputSurface only overrides the values using internally.
    
    PiperOrigin-RevId: 445377036
    hmsch authored and icbaker committed May 9, 2022
    Copy the full SHA
    75c72f3 View commit details
    Browse the repository at this point in the history
  25. Use cronet for DRM requests in the main demo app

    This ensures that both content and licenses are requested using the
    same HTTP stack.
    
    #minor-release
    
    PiperOrigin-RevId: 445378940
    icbaker committed May 9, 2022
    Copy the full SHA
    b0df946 View commit details
    Browse the repository at this point in the history
  26. Allow stable API users to use DebugTextViewHelper

    This is used from the main demo app.
    
    PiperOrigin-RevId: 445420580
    icbaker committed May 9, 2022
    Copy the full SHA
    b9a8da4 View commit details
    Browse the repository at this point in the history
  27. Add MIDI mime types to decoder_midi and api.txt

    PiperOrigin-RevId: 445445952
    ojw28 authored and icbaker committed May 9, 2022
    Copy the full SHA
    ad25c2a View commit details
    Browse the repository at this point in the history
  28. Add AV1 support to the getCodecMaxInputSize function.

    PiperOrigin-RevId: 445973162
    ojw28 authored and icbaker committed May 9, 2022
    Copy the full SHA
    2283b94 View commit details
    Browse the repository at this point in the history
  29. Introduce GlEffect interface for effect specification.

    PiperOrigin-RevId: 446143537
    hmsch authored and icbaker committed May 9, 2022
    Copy the full SHA
    76627d7 View commit details
    Browse the repository at this point in the history
  30. Migrate usages from C.TYPE_* to C.CONTENT_TYPE_*

    PiperOrigin-RevId: 446156308
    icbaker committed May 9, 2022
    Copy the full SHA
    1809a0b View commit details
    Browse the repository at this point in the history
  31. Allow stable API users to bundle/unbundle TrackSelectionParameters

    It's reasonable to serialize this type to support backgrounding
    use-cases, as demonstrated by the main demo app.
    
    PiperOrigin-RevId: 446161300
    icbaker committed May 9, 2022
    Copy the full SHA
    33b049c View commit details
    Browse the repository at this point in the history
  32. Opt some more bits of the main demo app into the unstable API

    PiperOrigin-RevId: 446161354
    icbaker committed May 9, 2022
    Copy the full SHA
    eb1dc50 View commit details
    Browse the repository at this point in the history
  33. Don't implement Player.Listener from SubtitleView

    We never register SubtitleView as a Player.Listener directly, it's
    always done via PlayerView.
    
    PiperOrigin-RevId: 447467037
    icbaker committed May 9, 2022
    Copy the full SHA
    06d73e9 View commit details
    Browse the repository at this point in the history
  34. Add listener for FrameProcessingExceptions.

    This listener replaces
    FrameProcessorChain#getAndRethrowBackgroundExceptions.
    The listener uses a new exception type FrameProcessingException
    separate from TransformationException as the frame processing
    components will be made reusable outside of transformer soon.
    
    PiperOrigin-RevId: 447455746
    hmsch authored and icbaker committed May 9, 2022
    Copy the full SHA
    f08fdf6 View commit details
    Browse the repository at this point in the history

Commits on May 10, 2022

  1. Expose the codec name to the analysis files.

    PiperOrigin-RevId: 447724152
    Samrobbo authored and icbaker committed May 10, 2022
    Copy the full SHA
    6ac1306 View commit details
    Browse the repository at this point in the history
  2. Fix GlUtil vector size constant name.

    This constant is used for https://docs.gl/es2/glVertexAttribPointer
    which takes the number of components per generic vertex attribute
    (meaning the size of the individual coordinate vectors here) not the
    number of attributes (the number of vertices that the old constant
    name referred to).
    
    PiperOrigin-RevId: 447427241
    hmsch authored and icbaker committed May 10, 2022
    Copy the full SHA
    e89189e View commit details
    Browse the repository at this point in the history

Commits on May 23, 2022

  1. Add DefaultMediaSourceFactory.setDataSourceFactory

    Also add this to the stable API instead of the constructor that takes
    `DataSource.Factory`.
    
    PiperOrigin-RevId: 450414119
    icbaker committed May 23, 2022
    Copy the full SHA
    e39a324 View commit details
    Browse the repository at this point in the history
  2. Skip performance tests if device is not capable.

    PiperOrigin-RevId: 450427828
    claincly authored and icbaker committed May 23, 2022
    Copy the full SHA
    ffb75d7 View commit details
    Browse the repository at this point in the history
  3. Add a dev guide section about ForwardingPlayer

    Issue: #9897
    Issue: #10268
    
    #minor-release
    
    PiperOrigin-RevId: 450428520
    icbaker committed May 23, 2022
    Copy the full SHA
    96f35bb View commit details
    Browse the repository at this point in the history
  4. Do not setOffloadEndOfStream if AudioTrack is not playing

    AudioTrack.setOffloadEndOfStream should be called after a track
    has been buffered. Additionally, the AudioTrack must be playing.
    
    It has been observed that for very short media (<1s), the AudioTrack
    might not have started immediately after the read that buffered
    the audio.
    
    In such a situation, calling AudioTrack.setOffloadEndOfStream throws
    and playback fails.
    
    Avoid this failure by checking that the AudioTrack is playing before
    calling setOffloadEndOfStream.
    
    This means that very short gapless media will not be gapless, this was
    deemed acceptable given that such very short media should be very rare
    in offload.
    
    PiperOrigin-RevId: 450431146
    marcbaechinger authored and icbaker committed May 23, 2022
    Copy the full SHA
    3c9b0b9 View commit details
    Browse the repository at this point in the history
  5. Rollback of e705999

    *** Original commit ***
    
    Rollback of 57182ac
    
    *** Original commit ***
    
    Remove `@Nullable` from `MediaSource.Factory` setters
    
    The null-behaviour of these methods creates a minimization footgun,
    because **any** call to these setters will prevent R8 from removing
    the default implementation (even if it's never used by the app) - this
    is because R8 can't tell the default imple...
    
    ***
    
    PiperOrigin-RevId: 450453325
    icbaker committed May 23, 2022
    Copy the full SHA
    ecea2b9 View commit details
    Browse the repository at this point in the history
  6. Don't reallocate EGLSurface for same debug surface.

    Recreating an EGLSurface for a surface that already has an
    EGLSurface is not allowed according to the
    [documentation](https://www.khronos.org/registry/EGL/sdk/docs/man/html/eglCreatePlatformWindowSurface.xhtml).
    
    This fix was tested on the devices listed in the bug
    description (Pixel 5a, Nexus 5).
    
    PiperOrigin-RevId: 450473569
    hmsch authored and icbaker committed May 23, 2022
    Copy the full SHA
    ccd61b1 View commit details
    Browse the repository at this point in the history
  7. Rollback of 57182ac

    *** Original commit ***
    
    Remove `@Nullable` from `MediaSource.Factory` setters
    
    The null-behaviour of these methods creates a minimization footgun,
    because **any** call to these setters will prevent R8 from removing
    the default implementation (even if it's never used by the app) - this
    is because R8 can't tell the default implementation is only used if the
    parameter is `null`.
    
    ******
    
    PiperOrigin-RevId: 450410833
    icbaker committed May 23, 2022
    Copy the full SHA
    274f3a1 View commit details
    Browse the repository at this point in the history

Commits on May 24, 2022

  1. Force encoding for the on-device regression tests.

    transformWithDecodeEncode is now transformWithoutDecodeEncode,
    to test the passthrough path.
    
    PiperOrigin-RevId: 447796892
    Samrobbo authored and icbaker committed May 24, 2022
    Copy the full SHA
    271cdbe View commit details
    Browse the repository at this point in the history
  2. Expose decoder name to analysis files.

    PiperOrigin-RevId: 447950623
    Samrobbo authored and icbaker committed May 24, 2022
    Copy the full SHA
    d254967 View commit details
    Browse the repository at this point in the history
  3. Refactor MIDI and Flac extractor loaders for deduplication

    Add MIDI filetype information for use in the ExtractorsFactory
    
    PiperOrigin-RevId: 447976272
    Hamzah-z authored and icbaker committed May 24, 2022
    Copy the full SHA
    dce0db3 View commit details
    Browse the repository at this point in the history
  4. Adds key functionality for basic MIDI synthesization

    - Add a MidiRenderer skeleton with basic playback
    - Add MidiDecoder with placeholder synthesizer (JSyn) impl
    - Make MidiExtractor feed placeholder data
    - Add Renderer extension loaders for MIDI
    
    PiperOrigin-RevId: 448212797
    Hamzah-z authored and icbaker committed May 24, 2022
    Copy the full SHA
    0948fd1 View commit details
    Browse the repository at this point in the history
  5. Transformer GL: Update test name reference.

    The prior test does not exist, and is not a pixel test.
    
    PiperOrigin-RevId: 448224929
    dway123 authored and icbaker committed May 24, 2022
    Copy the full SHA
    dd365cb View commit details
    Browse the repository at this point in the history
  6. Add support for static RTP payload types.

    Some RTP foramts are statically assigned, so they don't have the rtpmap
    attribute. Create the missing rtpmap attribute in this case.
    
    PiperOrigin-RevId: 448239724
    claincly authored and icbaker committed May 24, 2022
    Copy the full SHA
    010a00e View commit details
    Browse the repository at this point in the history
  7. Remove network type test restrictions for API 29/30

    Network type detection on these API levels couldn't be tested
    yet because of a missing Robolectric feature. This was fixed by
    the recent Robolectric upgrade and the restrictions can be removed.
    
    This also requires to replicate the platform hack we rely on on
    these API levels.
    
    PiperOrigin-RevId: 448240431
    tonihei authored and icbaker committed May 24, 2022
    Copy the full SHA
    3eb6f0e View commit details
    Browse the repository at this point in the history
  8. Increase test timeout for 4k60 regression test.

    Pixel 5 was occasionally reaching the 2 minute limit.
    
    PiperOrigin-RevId: 448244803
    Samrobbo authored and icbaker committed May 24, 2022
    Copy the full SHA
    800e533 View commit details
    Browse the repository at this point in the history
  9. Add DefaultMediaSourceFactory.{set,clear}LocalAdInsertionConfig

    Deprecate the setAdsLoaderProvider and setAdViewProvider methods these
    replace.
    
    PiperOrigin-RevId: 448251423
    icbaker committed May 24, 2022
    Copy the full SHA
    938728c View commit details
    Browse the repository at this point in the history
  10. Fix warning about ambiguous @EnsuresNonNull annotation

    ```
    [expression.parameter.name.shadows.field] The postcondition
    EnsuresNonNull on the declaration of method 'setContentTimeline'
    contains ambiguous identifier 'contentTimeline'. Use
    "this.contentTimeline" for the field, or "#1" for the formal parameter.
      private void setContentTimeline(Timeline contentTimeline) {
                   ^
    ```
    
    PiperOrigin-RevId: 448285571
    icbaker committed May 24, 2022
    Copy the full SHA
    b9f1cb4 View commit details
    Browse the repository at this point in the history
  11. Combine multiple matrix transformations in one shader.

    When using a MatrixTransformationFrameProcessor per transformation
    matrix, each frame processor's shader applies the matrix to the
    vertices and clips the result to the NDC range when drawing the
    output frame.
    This change combines consecutive MatrixTransformations into a single
    MatrixTransformationFrameProcessor by multiplying the individual
    matrices while updating and clipping the visible polygon after
    each matrix and mapping the resulting visible polygon back to the
    input space so that its vertices and the combined transformation
    matrix can be used in the shader.
    
    PiperOrigin-RevId: 448521068
    hmsch authored and icbaker committed May 24, 2022
    Copy the full SHA
    df1b733 View commit details
    Browse the repository at this point in the history
  12. Add language normalization for "arb" (Standard Arabic)

    This is an individual language (ISO 639-3) part of the Arabic
    macrolanguage ("ar" in ISO 639-1). Add this mapping to our
    existing list similar to other individual to macrolanguage
    mappings we have already.
    
    Issue: Issue: #10255
    PiperOrigin-RevId: 448911950
    tonihei authored and icbaker committed May 24, 2022
    Copy the full SHA
    daa4c1c View commit details
    Browse the repository at this point in the history
  13. Merge pull request #64 from ittiam-systems:rtp-vp9

    PiperOrigin-RevId: 448978892
    icbaker committed May 24, 2022
    Copy the full SHA
    f28f802 View commit details
    Browse the repository at this point in the history
  14. Add replacement for deprecated network type override constant

    The MMWAVE constant was deprecated in favour of a new constant
    with a better name. Thus, we need to check for both constants now.
    
    PiperOrigin-RevId: 449018959
    tonihei authored and icbaker committed May 24, 2022
    Copy the full SHA
    4636030 View commit details
    Browse the repository at this point in the history
  15. Fix demo app crash when media pipe isn't loaded

    The toast message about media pipe not loading needs to be shown on the main
    (UI) thread.
    
    PiperOrigin-RevId: 449199285
    andrewlewis authored and icbaker committed May 24, 2022
    Copy the full SHA
    578afa8 View commit details
    Browse the repository at this point in the history
  16. Update stale bug reference.

    The old reference was just for prototyping HDR. The new reference is for planned work to use the correct formats for input and output for HDR editing in GL.
    
    PiperOrigin-RevId: 449211792
    andrewlewis authored and icbaker committed May 24, 2022
    Copy the full SHA
    b2f46fa View commit details
    Browse the repository at this point in the history
  17. Create new class to store cues and timestamp.

    We need to pass timestamp for the list of cues so we are defining a new class CueGroup which will store both cues and timestamp.
    
    PiperOrigin-RevId: 449212054
    rohitjoins authored and icbaker committed May 24, 2022
    Copy the full SHA
    a27b539 View commit details
    Browse the repository at this point in the history
  18. Fix initialization of media pipe processors with assets

    PiperOrigin-RevId: 449221156
    andrewlewis authored and icbaker committed May 24, 2022
    Copy the full SHA
    d6dc3c5 View commit details
    Browse the repository at this point in the history
  19. Attempt to load OpenCV when loading MediaPipe

    PiperOrigin-RevId: 449227706
    andrewlewis authored and icbaker committed May 24, 2022
    Copy the full SHA
    bea17b4 View commit details
    Browse the repository at this point in the history
  20. Tidy releasing FrameProcessorChain

    PiperOrigin-RevId: 449238525
    andrewlewis authored and icbaker committed May 24, 2022
    Copy the full SHA
    b3dc32d View commit details
    Browse the repository at this point in the history
  21. Add missing equals to MergingMediaPeriod.ForwardingTrackSelection

    This causes a bug where the forwarded selections are no longer
    assumed equal and the child MediaPeriods will think they need
    to reset streams even though the selection stayed the same.
    
    Issue: Issue: #10248
    PiperOrigin-RevId: 449454038
    tonihei authored and icbaker committed May 24, 2022
    Copy the full SHA
    e9d5381 View commit details
    Browse the repository at this point in the history
  22. Remove all null-tolerant methods from BundleableUtil.

    In most cases it's clearer to in-line these null-checks with ternary
    operators.
    
    PiperOrigin-RevId: 449474621
    icbaker committed May 24, 2022
    Copy the full SHA
    aef2f15 View commit details
    Browse the repository at this point in the history
  23. Clarify the priority of live config values in the dev guide

    PiperOrigin-RevId: 449485592
    icbaker committed May 24, 2022
    Copy the full SHA
    cfaf39c View commit details
    Browse the repository at this point in the history
  24. Rename expected to reference in SsimHelper.

    Reference is clearer when used in conjunction with actual, and matches
    other SSIM documentation.
    
    PiperOrigin-RevId: 449486177
    Samrobbo authored and icbaker committed May 24, 2022
    Copy the full SHA
    97331a6 View commit details
    Browse the repository at this point in the history
  25. Migrate leaf listeners of Player to new onCues override

    PiperOrigin-RevId: 449587030
    rohitjoins authored and icbaker committed May 24, 2022
    Copy the full SHA
    75dc0e2 View commit details
    Browse the repository at this point in the history
  26. Track validity of debug SurfaceView

    The debug surface view's output surface can become invalid during a transformation due to the parent activity pausing, for example. This can currently cause a crash when backing out of the `TransformerActivity` in the demo because the surface can be destroyed before the transformer has fully canceled.
    
    Also clarify naming of the outputSurface and inline the private method that created `EGLSurface`s (it was shorter after removing the debug preview).
    
    PiperOrigin-RevId: 449963440
    andrewlewis authored and icbaker committed May 24, 2022
    Copy the full SHA
    7ef65b6 View commit details
    Browse the repository at this point in the history
  27. Fix comment in MediaCodecRenderer

    This constant name was updated in 1bcf1cf
    
    PiperOrigin-RevId: 449969093
    icbaker committed May 24, 2022
    Copy the full SHA
    685761b View commit details
    Browse the repository at this point in the history
  28. Use @C.DataType intdef in HlsDataSourceFactory.createDataSource

    PiperOrigin-RevId: 449973324
    icbaker committed May 24, 2022
    Copy the full SHA
    bbb6d8f View commit details
    Browse the repository at this point in the history
  29. Simplify some DefaultMediaSourceFactory instantiation in the dev guide

    In many cases we're passing a 'custom' DataSource.Factory where it's not
    relevant for the respective dev guide section.
    
    #minor-release
    
    PiperOrigin-RevId: 450374171
    icbaker committed May 24, 2022
    Copy the full SHA
    5baeffb View commit details
    Browse the repository at this point in the history
  30. Remove 5G-NSA detection on API 29/30.

    This detection relies on an unsupported workaround and may trigger
    permission warnings in tools analyzing permission usage although
    no permission is needed or requested by app code.
    
    Given the majority of 5G-NSA playbacks are on API 31+ by now,
    we can remove this path to avoid the permission confusion and the
    unsupported detection workaround.
    
    PiperOrigin-RevId: 450382586
    tonihei authored and icbaker committed May 24, 2022
    Copy the full SHA
    48a0301 View commit details
    Browse the repository at this point in the history
  31. Remove @Nullable from MediaSource.Factory setters

    The null-behaviour of these methods creates a minimization footgun,
    because **any** call to these setters will prevent R8 from removing
    the default implementation (even if it's never used by the app) - this
    is because R8 can't tell the default implementation is only used if the
    parameter is `null`.
    
    PiperOrigin-RevId: 450386627
    icbaker committed May 24, 2022
    Copy the full SHA
    57182ac View commit details
    Browse the repository at this point in the history
  32. Remove @Nullable from some Dash/Hls/SsMediaSource.Factory methods

    The null-behaviour of these methods creates a minimization footgun,
    because **any** call to these setters will prevent R8 from removing
    the default implementation (even if it's never used by the app) - this
    is because R8 can't tell the default implementation is only used if the
    parameter is `null`.
    
    Follow-up to 57182ac
    
    PiperOrigin-RevId: 450395941
    icbaker committed May 24, 2022
    Copy the full SHA
    dc6cc45 View commit details
    Browse the repository at this point in the history
  33. Reorder demo samples

    Put cloud storage samples at the top to avoid having a sample at the top of the list where we don't control the server.
    
    Also update labels not to mention progressive container type, as it's irrelevant for Transformer, which always transmuxes even if it doesn't transcode.
    
    #ame-bug-week
    
    PiperOrigin-RevId: 450403784
    andrewlewis authored and icbaker committed May 24, 2022
    Copy the full SHA
    4277ac3 View commit details
    Browse the repository at this point in the history

Commits on May 26, 2022

  1. Wrap TelephonyCallback in nested class to avoid class loading issues.

    PiperOrigin-RevId: 450643824
    tonihei authored and marcbaechinger committed May 26, 2022
    Copy the full SHA
    9c5bc56 View commit details
    Browse the repository at this point in the history
  2. Skip transform4K60 test if 4K decoding is not supported.

    4K decoding is not supported (not required to be supported) on all
    devices, e.g., Nexus 5 does not support it.
    
    PiperOrigin-RevId: 450682519
    hmsch authored and marcbaechinger committed May 26, 2022
    Copy the full SHA
    066327d View commit details
    Browse the repository at this point in the history
  3. Make Rating.RATING_UNSET package-private

    This value is only needed by subclasses of `Rating`, all of which are
    in this package (the `Rating` constructor is already package-private to
    ensure this).
    
    PiperOrigin-RevId: 450886872
    icbaker authored and marcbaechinger committed May 26, 2022
    Copy the full SHA
    7465383 View commit details
    Browse the repository at this point in the history
  4. Replace 640x360 H264 test video with 320x240 H264 video.

    Decoding and encoding 320x240 H264 video should be supported
    on all devices from Android 5.0 based on CDD requirements.
    https://source.android.com/compatibility/5.0/android-5.0-cdd#5_2_video_encoding
    
    640x360 encoding doesn't seem to be supported on Nexus 5.
    
    PiperOrigin-RevId: 450901715
    hmsch authored and marcbaechinger committed May 26, 2022
    Copy the full SHA
    52ad75c View commit details
    Browse the repository at this point in the history
  5. Skip SSIM calculation on Nexus 5 API 21.

    There is a problem with the ImageReader formats used by the
    SSIM helper that only occurs for Nexus 5 API 21, so as a workaround
    we can skip the SSIM calculation on Nexus 5 API 21.
    
    This skips just the SSIM calculation (by setting the value to
    1.0 instead and logging). The tests still run when SSIM is skipped
    so that we can detect other failures.
    
    PiperOrigin-RevId: 450903183
    hmsch authored and marcbaechinger committed May 26, 2022
    Copy the full SHA
    2b4642f View commit details
    Browse the repository at this point in the history
  6. Fix some inconsistencies in the MediaItem API

    * Rename (via deprecation)
      `MediaItem.DrmConfiguration.Builder#forceSessionsForAudioAndVideoTracks`
      to `setForceSessionsForAudioAndVideoTracks`. This is more consistent
      with existing 'force' method names both in this class and in
      `TrackSelectionParameters.Builder`.
    * Add missing `@Nullable` annotation to the parameter for
      `MediaItem.SubtitleConfiguration.Builder#setMimeType`. This annotation
      is already present on the `MediaItem.SubtitleConfiguration#mimeType`
      field that this setter corresponds to.
    
    PiperOrigin-RevId: 450941336
    icbaker authored and marcbaechinger committed May 26, 2022
    Copy the full SHA
    b8769b2 View commit details
    Browse the repository at this point in the history
  7. Fix typos flagged by lint

    PiperOrigin-RevId: 451135097
    icbaker authored and marcbaechinger committed May 26, 2022
    Copy the full SHA
    53b4452 View commit details
    Browse the repository at this point in the history

Commits on May 30, 2022

  1. Rename GlFrameProcessor to SingleFrameGlTextureProcessor.

    Also update names of implementations to match design doc.
    In follow-ups, SingleFrameGlTextureProcessor will become
    an abstract implementation of a new GlTextureProcessor
    interface.
    
    Texture processor makes sense as it processes OpenGL textures.
    The term frame processor will be used for something else in
    follow-ups.
    
    PiperOrigin-RevId: 451142085
    hmsch authored and marcbaechinger committed May 30, 2022
    Copy the full SHA
    d37cf34 View commit details
    Browse the repository at this point in the history
  2. Replace frame processor with texture processor in TODO comment.

    PiperOrigin-RevId: 451142799
    hmsch authored and marcbaechinger committed May 30, 2022
    Copy the full SHA
    bc1ec9d View commit details
    Browse the repository at this point in the history
  3. Simplify DefaultMediaSourceFactory instantiation in a test

    There's no need to manually construct a 'default'
    DefaultDataSource.Factory instance, we can just pass the `Context` to
    `DefaultMediaSourceFactory` and let it construct the
    `DefaultDataSource.Factory` internally.
    
    PiperOrigin-RevId: 451155747
    icbaker authored and marcbaechinger committed May 30, 2022
    Copy the full SHA
    32fd374 View commit details
    Browse the repository at this point in the history
  4. Fix handling clipping in transformer renderers.

    Decode-only video frames (needed when the frame at / first frame after the
    clipping start is not a key frame) need to be decoded but not passed to
    the frame processor chain or encoder.
    
    The clipping start offset needs to be removed from the frame timestamps
    in the passthrough and video pipelines.
    There are no changes needed for this in the audio pipeline, as it doesn't
    use the input timestamps -- it uses its own timestamps derived from the
    buffer sizes instead.
    
    Also add demo option to try this out.
    
    #minor-release
    
    PiperOrigin-RevId: 451353609
    hmsch authored and marcbaechinger committed May 30, 2022
    Copy the full SHA
    541460a View commit details
    Browse the repository at this point in the history
  5. Transformer: Skip SSIM in tests when fallback is applied.

    SSIM calculation requires the input and output dimensions to be identical.
    
    For devices that can't encode the input dimensions, skip SSIM calculations and
    log the cause. Only apply this on tests where the encoder may not support the
    input file dimensions.
    
    PiperOrigin-RevId: 451364904
    dway123 authored and marcbaechinger committed May 30, 2022
    Copy the full SHA
    14fc317 View commit details
    Browse the repository at this point in the history
  6. Expand SSIM skipping to all Nexus API 21 devices.

    PiperOrigin-RevId: 451371681
    hmsch authored and marcbaechinger committed May 30, 2022
    Copy the full SHA
    89e239e View commit details
    Browse the repository at this point in the history
  7. Use video passthrough if clipping starts at key frame.

    PiperOrigin-RevId: 451380267
    hmsch authored and marcbaechinger committed May 30, 2022
    Copy the full SHA
    6b521b2 View commit details
    Browse the repository at this point in the history
  8. Unconditionally sleep for offload

    Unconditionally sleep for offload, if the audio buffer is full.
    Previously ExoPlayer would not sleep if the expected wake-up was
    in 2s. This was to prevent underrun if the wake-up was delayed.
    
    Experiments have shown that the wakup audio buffer is far more
    than 2s (around 1min). Additionally,
    the metric was incorrect because it measured both,
    AudioTrack + DSP.
    
    Finally, this metric was erroneous after a gapless transition,
    when the head position would reset to 0 and thus the computed
    delay until next wakeup was too large.
    
    PiperOrigin-RevId: 451383701
    marcbaechinger committed May 30, 2022
    Copy the full SHA
    74c68b3 View commit details
    Browse the repository at this point in the history
  9. Use updated test name in BUILD and docs.

    PiperOrigin-RevId: 451384408
    Samrobbo authored and marcbaechinger committed May 30, 2022
    Copy the full SHA
    a96dd2d View commit details
    Browse the repository at this point in the history
  10. Clarify variables and improve documentation of SSIM.

    PiperOrigin-RevId: 451392021
    Samrobbo authored and marcbaechinger committed May 30, 2022
    Copy the full SHA
    1becb45 View commit details
    Browse the repository at this point in the history
  11. Transformer: Add 8k24fps transform test.

    Most devices won't support 8k decoding, so they'll skip this test entirely.
    
    As the video is quite short, this test shouldn't be any longer than the nearby,
    long-running 4k60 test.
    
    PiperOrigin-RevId: 451423368
    dway123 authored and marcbaechinger committed May 30, 2022
    Copy the full SHA
    983e074 View commit details
    Browse the repository at this point in the history
  12. Treat pixels as unsigned and correct pixel count division.

    PiperOrigin-RevId: 451428202
    Samrobbo authored and marcbaechinger committed May 30, 2022
    Copy the full SHA
    38720a6 View commit details
    Browse the repository at this point in the history
  13. Wrap framework AudioAttributes in new AudioAttributesV21 class

    PiperOrigin-RevId: 451831531
    icbaker authored and marcbaechinger committed May 30, 2022
    Copy the full SHA
    6dd065a View commit details
    Browse the repository at this point in the history
  14. Retain stream time offsets through codecs

    ExoPlayer applies a large time offset to buffers so that, if the input has negative timestamps, generally buffers seen by the decoders should have positive timestamps. Modify how the offset is handled in `Transformer` so that decoders and encoders generally see positive timestamps, by leaving the offset on samples when reading them in the base renderer (remove the code that removed the offset), and then removing the offset when muxing. Also update the frame processor chain and slow motion flattening code to retain the existing behavior after this change (these both need original media presentation timestamps)
    
    Tested via existing end-to-end tests and manually verified that the overlay frame processor shows the expected original media timestamps.
    
    Aside: we don't need the same logic as ExoPlayer to track stream offsets across the decoder yet, because we don't try to handle stream changes during playback in single asset editing. (There is an edge case of multi-period DASH that may not work but I doubt anyone will use that as input to `Transformer` before we change the code to handle multi-asset properly.) In future we should try to refactor interaction with the decoder to use the same code for Transformer and ExoPlayer.
    PiperOrigin-RevId: 451846055
    andrewlewis authored and marcbaechinger committed May 30, 2022
    Copy the full SHA
    84efc5e View commit details
    Browse the repository at this point in the history
  15. Add RequestMetadata to MediaItem

    These fields can be used to transport additional request properties
    when the requester doesn't know the details needed for the actual
    playback (i.e. the LocalConfiguration).
    
    PiperOrigin-RevId: 451857093
    tonihei authored and marcbaechinger committed May 30, 2022
    Copy the full SHA
    38248af View commit details
    Browse the repository at this point in the history
  16. Remove MediaMetadata.mediaUrl

    This value only existed to allow setting media URLs from external sources
    (e.g. in a MediaController) so that a player can start playing this item.
    Now that we have MediaItem.RequestMetadata.mediaUrl we can remove this value
    from MediaMetadata because it's request metadata, not media metadata.
    
    PiperOrigin-RevId: 451857413
    tonihei authored and marcbaechinger committed May 30, 2022
    Copy the full SHA
    8e015c4 View commit details
    Browse the repository at this point in the history
  17. Skip BitrateAnalysisTest if device is incapable.

    Add bitrate check to the "can encode" criteria.
    
    PiperOrigin-RevId: 451868042
    claincly authored and marcbaechinger committed May 30, 2022
    Copy the full SHA
    d411461 View commit details
    Browse the repository at this point in the history
  18. Use fluent assertions

    Gives a bit more information upon failures
    
    PiperOrigin-RevId: 451882968
    AquilesCanta authored and marcbaechinger committed May 30, 2022
    Copy the full SHA
    d1c3b05 View commit details
    Browse the repository at this point in the history
  19. Copy the full SHA
    b332d66 View commit details
    Browse the repository at this point in the history
  20. Update the Gradle Wrapper and Android Gradle Plugin

    The current verion of AGP warns it doesn't support Android API 32 [1].
    
    The wrapper was upgraded with ([instructions](https://docs.gradle.org/current/userguide/gradle_wrapper.html#sec:upgrading_wrapper)):
    ```shell
    $ ./gradlew wrapper --gradle-version 7.4.2 --distribution-type all
    ```
    
    [1]
    ```
    WARNING:We recommend using a newer Android Gradle plugin to use compileSdk = 32
    
    This Android Gradle plugin (7.0.3) was tested up to compileSdk = 31
    
    This warning can be suppressed by adding
        android.suppressUnsupportedCompileSdk=32
        to this project's gradle.properties
    
        The build will continue, but you are strongly encouraged to update your project to
        use a newer Android Gradle Plugin that has been tested with compileSdk = 32
    ```
    
    #minor-release
    
    PiperOrigin-RevId: 451893214
    (cherry picked from commit 7fc9bb9)
    icbaker authored and marcbaechinger committed May 30, 2022
    Copy the full SHA
    10a7e75 View commit details
    Browse the repository at this point in the history

Commits on May 31, 2022

  1. Add explicit cast to ByteBuffer for Java 8 compatibility

    PiperOrigin-RevId: 451994696
    (cherry picked from commit 1c5032e)
    marcbaechinger committed May 31, 2022
    Copy the full SHA
    401c220 View commit details
    Browse the repository at this point in the history
  2. Add @deprecated javadoc to all @Deprecated @Override methods

    This ensures the 'use X instead' message is easily visible in the
    generated HTML for the overriding method. Currently it's not, e.g.:
    https://exoplayer.dev/doc/reference/com/google/android/exoplayer2/BasePlayer.html#getCurrentWindowIndex()
    
    #minor-release
    
    PiperOrigin-RevId: 452002224
    (cherry picked from commit d711dee)
    icbaker authored and marcbaechinger committed May 31, 2022
    Copy the full SHA
    30bed6c View commit details
    Browse the repository at this point in the history
  3. Add some imports required for javadoc

    #minor-release
    
    PiperOrigin-RevId: 452002758
    (cherry picked from commit f76baae)
    icbaker authored and marcbaechinger committed May 31, 2022
    Copy the full SHA
    b0a9b90 View commit details
    Browse the repository at this point in the history
  4. Remove deprecated calls

    #minor-release
    
    PiperOrigin-RevId: 452006137
    (cherry picked from commit 5460ac8)
    marcbaechinger committed May 31, 2022
    Copy the full SHA
    49c5e32 View commit details
    Browse the repository at this point in the history
  5. Permit duplicate Opus headers

    This reinstates the permissive behaviour removed by
    fe7e5b8
    
    Test file created by opening bear.opus in a hex editor and naively
    duplicating the two header packets, starting at (and including) the
    first `OggS` in the file and ending just before the third `OggS`.
    
    #minor-release
    
    Issue: #10038
    PiperOrigin-RevId: 452015662
    (cherry picked from commit b6b2826)
    icbaker authored and marcbaechinger committed May 31, 2022
    Copy the full SHA
    27e0c80 View commit details
    Browse the repository at this point in the history
  6. Create withMediaPipe variant only if AAR is present

    This should fix running `./gradlew clean test` if MediaPipe hasn't been built, for example.
    
    PiperOrigin-RevId: 452033698
    (cherry picked from commit 14ed32c)
    andrewlewis authored and marcbaechinger committed May 31, 2022
    Copy the full SHA
    6e735ac View commit details
    Browse the repository at this point in the history
  7. Ignore decoding test cases when library not available

    #minor-release
    
    PiperOrigin-RevId: 452043577
    (cherry picked from commit c386644)
    marcbaechinger committed May 31, 2022
    Copy the full SHA
    2b8dbb5 View commit details
    Browse the repository at this point in the history

Commits on Jun 7, 2022

  1. Fix HiddenTypedefConstant Metalava error on PlaybackException

    This is done by removing the `@FieldNumber` IntDef completely. It's not
    really adding much value anyway, because it's `open` so there's no real
    enforcement to prevent passing 'incorrect' values.
    
    #minor-release
    
    PiperOrigin-RevId: 452108972
    (cherry picked from commit 97210b5)
    icbaker authored and marcbaechinger committed Jun 7, 2022
    Copy the full SHA
    c107b94 View commit details
    Browse the repository at this point in the history
  2. Filter bogus AndroidX Media jar file when creating javadoc

    #minor-release
    
    PiperOrigin-RevId: 452282128
    (cherry picked from commit 2441bc6)
    marcbaechinger committed Jun 7, 2022
    Copy the full SHA
    aadd0c8 View commit details
    Browse the repository at this point in the history
  3. Rename DefaultTrackSelector.ParametersBuilder to Parameters.Builder

    We generally nest the `Builder` for `Foo` inside `Foo`. In this case,
    there's already a `DefaultTrackSelector.Parameters.Builder` type visible
    to a developer, it just happens to be the 'common'
    `TrackSelectorParameters.Builder`, so using it is a bit weird. For
    example this code snippet doesn't compile because
    `DefaultTrackSelector.Parameters.Builder#build()` returns
    `TrackSelectionParameters`. This CL fixes that problem and the code
    snippet now compiles.
    
    ```java
    DefaultTrackSelector.Parameters params =
       new DefaultTrackSelector.Parameters.Builder(context).build()
    ```
    
    #minor-release
    
    PiperOrigin-RevId: 453215702
    (cherry picked from commit 8816223)
    icbaker authored and marcbaechinger committed Jun 7, 2022
    Copy the full SHA
    dd27a9a View commit details
    Browse the repository at this point in the history
  4. Use a shared keyForField implementation in track selection parameters

    The current setup with distinct, private `keyForField` implementations,
    leaves open the (theoretical) possibility of a clash in the `Bundle`
    keys used by the superclass and subclass. This change brings
    consistency with our only other extensible `Bundleable` type
    (`PlaybackException`).
    
    #minor-release
    
    PiperOrigin-RevId: 453385875
    (cherry picked from commit a056f08)
    icbaker authored and marcbaechinger committed Jun 7, 2022
    Copy the full SHA
    5030145 View commit details
    Browse the repository at this point in the history

Commits on Jun 9, 2022

  1. Merge pull request #53 from ittiam-systems:rtp_opus

    PiperOrigin-RevId: 453490088
    (cherry picked from commit ade3452)
    marcbaechinger committed Jun 9, 2022
    Copy the full SHA
    68054de View commit details
    Browse the repository at this point in the history
  2. Clarify that ShuffleOrder must be consistent in both directions

    #minor-release
    
    PiperOrigin-RevId: 453622964
    (cherry picked from commit 2c2be2d)
    icbaker authored and marcbaechinger committed Jun 9, 2022
    Copy the full SHA
    2e2bbdd View commit details
    Browse the repository at this point in the history
  3. Audio passthrough: handle unset audio format channel count

    With HLS chunkless preparation, audio formats may have no value
    for channel count. In this case, the DefaultAudioSink will either query
    the platform for a supported channel count (API 29+) or assume a max
    channel count based on the encoding spec in order to decide whether the
    audio format can be played with audio passthrough.
    
    Issue: #10204
    
    #minor-release
    
    PiperOrigin-RevId: 453644548
    (cherry picked from commit b3b57bc)
    christosts authored and marcbaechinger committed Jun 9, 2022
    Copy the full SHA
    4e3617c View commit details
    Browse the repository at this point in the history
  4. Add COMMAND_SET_MEDIA_ITEM to Player.Commands

    Some Player implementations have no playlist capability but can still
    set a MediaItem for playback. Examples are a MediaController connected
    to a legacy MediaSession, ExoPlayer up to 2.12 or MediaPlayer.
    
    To indicate this capability, we need an allowed command in addition
    to COMMAND_CHANGE_MEDIA_ITEMS that just allows to set a single item
    that replaces everything that is currently played.
    
    #minor-release
    
    PiperOrigin-RevId: 453879626
    (cherry picked from commit 2056152)
    tonihei authored and marcbaechinger committed Jun 9, 2022
    Copy the full SHA
    c1aff0d View commit details
    Browse the repository at this point in the history
  5. Merge pull request #69 from ittiam-systems:rtp_amr_test

    PiperOrigin-RevId: 453905355
    (cherry picked from commit 8a31e33)
    marcbaechinger committed Jun 9, 2022
    Copy the full SHA
    56079ba View commit details
    Browse the repository at this point in the history
  6. Fix bug: playback is frozen with HLS chunkless preparation

    This change fixes a bug where the player is frozen with HLS chunkless
    preparation because the audio stream wrappers are not marked as master
    timestamp sources before preparation.
    
    #minor-release
    
    PiperOrigin-RevId: 453941815
    (cherry picked from commit 9174841)
    christosts authored and marcbaechinger committed Jun 9, 2022
    Copy the full SHA
    b7cf772 View commit details
    Browse the repository at this point in the history
  7. Minor fix: remove final from methods of final class

    #minor-release
    
    PiperOrigin-RevId: 453408087
    (cherry picked from commit 527db57)
    christosts authored and marcbaechinger committed Jun 9, 2022
    Copy the full SHA
    64d33ad View commit details
    Browse the repository at this point in the history
  8. DefaultTrackSelector: Constrain audio channel count

    The track selector will select multi-channel formats when those can be
    spatialized, otherwise the selector will prefer stereo/mono audio
    tracks. When the device supports audio spatialization (Android 12L+),
    the DefaultTrackSelector will monitor for changes in the platform
    Spatializer and trigger a new track selection upon a
    Spatializer change event.
    
    Devices with a `television` UI mode are excluded from audio channel
    count constraints.
    
    #minor-release
    
    PiperOrigin-RevId: 453957269
    (cherry picked from commit 9f3c595)
    christosts authored and marcbaechinger committed Jun 9, 2022
    Copy the full SHA
    9a793da View commit details
    Browse the repository at this point in the history

Commits on Jun 13, 2022

  1. Ensure DRAIN_ACTION_FLUSH_AND_UPDATE_DRM_SESSION is always executed

    `codecDrainAction` is set to `DRAIN_ACTION_NONE` in 3 places in
    `MediaCodecRenderer`:
    * The constructor (so there's no prior state to worry about)
    * `updateDrmSessionV23()`: Where `mediaCrypto` is reconfigured based
      on `sourceDrmSession` and `codecDrmSession` is also updated to
      `sourceDrmSession`.
    * `resetCodecStateForFlush()`: Where (before this change) the action
      is unconditionally set back to `DRAIN_ACTION_NONE` and so any
      required updated implied by
      `DRAIN_ACTION_FLUSH_AND_UPDATE_DRM_SESSION` is not done.
    
    This change ensures that `flushOrReleaseCodec()` handles
    `DRAIN_ACTION_FLUSH_AND_UPDATE_DRM_SESSION` before calling .
    
    This probably also resolves Issue: #10274
    
    #minor-release
    
    PiperOrigin-RevId: 454114428
    (cherry picked from commit c736a72)
    icbaker authored and marcbaechinger committed Jun 13, 2022
    Copy the full SHA
    31e6ba9 View commit details
    Browse the repository at this point in the history
  2. Use correct placeholder PlayerID value in test

    The default constructor is only allowed to be called on
    API < 32 and the test should use the defined UNSET constant
    to be API independent.
    
    #minor-release
    
    PiperOrigin-RevId: 454568893
    (cherry picked from commit 0ed5321)
    tonihei authored and marcbaechinger committed Jun 13, 2022
    Copy the full SHA
    c1f1eb7 View commit details
    Browse the repository at this point in the history

Commits on Jun 14, 2022

  1. Merge pull request #10322 from DolbyLaboratories:dev-v2-multichannel

    PiperOrigin-RevId: 454641746
    (cherry picked from commit 1c373d5)
    marcbaechinger committed Jun 14, 2022
    Copy the full SHA
    941c5d8 View commit details
    Browse the repository at this point in the history
  2. Spatializer: Assume linear channel count for E-AC3 JOC streams

    #minor-release
    
    PiperOrigin-RevId: 454884692
    (cherry picked from commit 6dc4b39)
    christosts authored and marcbaechinger committed Jun 14, 2022
    Copy the full SHA
    fd1fb96 View commit details
    Browse the repository at this point in the history

Commits on Jun 15, 2022

  1. Suppress lint errors RestrictedApis in lib-media2

    PiperOrigin-RevId: 454939082
    (cherry picked from commit d1fbef8)
    marcbaechinger committed Jun 15, 2022
    Copy the full SHA
    ff582ec View commit details
    Browse the repository at this point in the history
  2. Make HttpDataSourceTestEnv require API 19

    PiperOrigin-RevId: 454945333
    (cherry picked from commit 4759472)
    marcbaechinger committed Jun 15, 2022
    Copy the full SHA
    d1e50de View commit details
    Browse the repository at this point in the history
  3. Add many quantity for fr an fr-CA

    See https://issuetracker.google.com/208178382
    
    PiperOrigin-RevId: 454949204
    (cherry picked from commit 6fd777c)
    marcbaechinger committed Jun 15, 2022
    Copy the full SHA
    341f158 View commit details
    Browse the repository at this point in the history
  4. Add lint base to make gradle lint run without errors

    PiperOrigin-RevId: 454951844
    (cherry picked from commit 8b65c6a)
    marcbaechinger committed Jun 15, 2022
    Copy the full SHA
    4739e4d View commit details
    Browse the repository at this point in the history
  5. Merge pull request #9915 from dburckh:avi

    PiperOrigin-RevId: 455094147
    (cherry picked from commit 1ca382d)
    marcbaechinger committed Jun 15, 2022
    Copy the full SHA
    a785fbe View commit details
    Browse the repository at this point in the history
  6. Updating translations

    #minor-release
    
    PiperOrigin-RevId: 455128997
    (cherry picked from commit 499d3f9)
    marcbaechinger committed Jun 15, 2022
    Copy the full SHA
    cdd2157 View commit details
    Browse the repository at this point in the history
  7. Update initial bitrate estimates

    #minor-release
    
    PiperOrigin-RevId: 455140203
    (cherry picked from commit 05b69a7)
    tonihei authored and marcbaechinger committed Jun 15, 2022
    Copy the full SHA
    fb6e3ea View commit details
    Browse the repository at this point in the history

Commits on Jun 16, 2022

  1. Merge pull request #63 from ittiam-systems:rtp-h263

    PiperOrigin-RevId: 455347182
    (cherry picked from commit e220f53)
    marcbaechinger committed Jun 16, 2022
    Copy the full SHA
    0a4684d View commit details
    Browse the repository at this point in the history
  2. Version bump to exoplayer:2.18.0 and media3:1.0.0-beta01

    #minor-release
    
    PiperOrigin-RevId: 455350486
    (cherry picked from commit 209d308)
    marcbaechinger committed Jun 16, 2022
    Copy the full SHA
    3dcc24e View commit details
    Browse the repository at this point in the history
  3. Add lint base xml file for string.xml files

    Fixing lint errors in the string.xml files makes no sense because these are
    overridden with the next automated string import. Adding a lint-baseline.xml
    instead for the ui module.
    
    See https://issuetracker.google.com/208178382
    
    #minor-release
    
    PiperOrigin-RevId: 455354304
    (cherry picked from commit 495480a)
    marcbaechinger committed Jun 16, 2022
    Copy the full SHA
    da12792 View commit details
    Browse the repository at this point in the history
  4. Update JavaDoc

    #minor-release
    
    PiperOrigin-RevId: 455361427
    (cherry picked from commit 87420fc)
    marcbaechinger committed Jun 16, 2022
    Copy the full SHA
    3da5ab7 View commit details
    Browse the repository at this point in the history
  5. Copy the full SHA
    8781449 View commit details
    Browse the repository at this point in the history
  6. Fix release notes

    #minor-release
    
    PiperOrigin-RevId: 455372269
    (cherry picked from commit 71ae88f)
    marcbaechinger committed Jun 16, 2022
    Copy the full SHA
    460d221 View commit details
    Browse the repository at this point in the history

Commits on Jun 17, 2022

  1. Add lint baseline for spurious API-level warnings

    The API 32 SDK has incorrect versioning metadata for Spatializer. It
    reports the whole class has only been present since API 33 (which is
    surely impossible given it's present in the API 32 SDK):
    https://issuetracker.google.com/234009300
    
    The metadata seems to be correct in the API 33 SDK, so this baseline
    will no longer be needed when we bump to `compileSdkVersion = 33`.
    icbaker committed Jun 17, 2022
    Copy the full SHA
    85d8682 View commit details
    Browse the repository at this point in the history