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

[android] Support KEY_MAX_INPUT_SIZE configurable from the webapp #1663

Merged
merged 1 commit into from
Jan 27, 2024

Conversation

borongc
Copy link
Contributor

@borongc borongc commented Sep 28, 2023

  1. Add HTMLVideoElement.setMaxVideoInputSize(max_video_input_size) to allow the web app to explicitly set the maximum size in bytes of a buffer of data for video described by android MediaFormat.
  2. If the setting value is 0, it uses the default value.
  3. This uses the SbThreadLocal to store max_video_input_size, which allows each player to acquire its input size from webapp.
  4. This implementation includes setting max_video_input_size per player, i.e., each player can configure its max_video_input_size.

b/176923480

@codecov
Copy link

codecov bot commented Sep 28, 2023

Codecov Report

Attention: 16 lines in your changes are missing coverage. Please review.

Comparison is base (6ffd243) 58.52% compared to head (c50d535) 58.49%.
Report is 1 commits behind head on main.

Files Patch % Lines
cobalt/dom/html_media_element.cc 0.00% 11 Missing ⚠️
...layer/filter/filter_based_player_worker_handler.cc 33.33% 4 Missing ⚠️
cobalt/media/player/web_media_player_impl.cc 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1663      +/-   ##
==========================================
- Coverage   58.52%   58.49%   -0.03%     
==========================================
  Files        1902     1900       -2     
  Lines       94536    94225     -311     
==========================================
- Hits        55326    55118     -208     
+ Misses      39210    39107     -103     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@borongc borongc force-pushed the buffer_size branch 3 times, most recently from db55c25 to 26a723f Compare October 2, 2023 22:37
@borongc borongc force-pushed the buffer_size branch 2 times, most recently from 9aed0f1 to 9fcbe93 Compare October 3, 2023 20:45
@borongc borongc force-pushed the buffer_size branch 3 times, most recently from 1969a78 to a774843 Compare October 4, 2023 18:09
Copy link
Contributor

@jasonzhangxx jasonzhangxx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, the change looks good to me. But as I don't know the context of the bug, I'll let Xiaoming to do the final approval.

@borongc borongc changed the title [media] Support KEY_MAX_INPUT_SIZE configurable from MIME attribute [android] Support KEY_MAX_INPUT_SIZE configurable from the webapp Nov 28, 2023
@borongc borongc force-pushed the buffer_size branch 5 times, most recently from 769980f to 4f51f63 Compare November 29, 2023 17:56
starboard/player.h Outdated Show resolved Hide resolved
cobalt/media/media_module.cc Outdated Show resolved Hide resolved
starboard/android/shared/media_is_video_supported.cc Outdated Show resolved Hide resolved
@borongc borongc force-pushed the buffer_size branch 7 times, most recently from 0399825 to 103a31c Compare December 8, 2023 20:39
@borongc borongc force-pushed the buffer_size branch 4 times, most recently from 026fd11 to a7392f3 Compare January 26, 2024 00:25
@borongc borongc force-pushed the buffer_size branch 3 times, most recently from 27a4160 to cfcb610 Compare January 26, 2024 23:56
@borongc borongc added the cp-24.lts.1+ Cherry Pick to the 24.lts.1+ branch label Jan 27, 2024
1. Add HTMLVideoElement.setMaxVideoInputSize(max_video_input_size) to allow the web app to explicitly set the maximum size in bytes of a buffer of data for video described by android MediaFormat.
2. If the setting value is 0, it uses the default value.
3. This uses the SbThreadLocal to store max_video_input_size, which allows each player to acquire its input size from webapp.
4. This implementation includes setting max_video_input_size per player, i.e., each player can configure its max_video_input_size.

b/176923480
@borongc borongc merged commit c39f97a into youtube:main Jan 27, 2024
371 of 376 checks passed
@borongc borongc deleted the buffer_size branch January 27, 2024 06:00
cobalt-github-releaser-bot pushed a commit that referenced this pull request Jan 27, 2024
)

1. Add HTMLVideoElement.setMaxVideoInputSize(max_video_input_size) to
allow the web app to explicitly set the maximum size in bytes of a
buffer of data for video described by android MediaFormat.
2. If the setting value is 0, it uses the default value.
3. This uses the SbThreadLocal to store max_video_input_size, which
allows each player to acquire its input size from webapp.
4. This implementation includes setting max_video_input_size per player,
i.e., each player can configure its max_video_input_size.

b/176923480

(cherry picked from commit c39f97a)
borongc added a commit to borongc/cobalt that referenced this pull request Jan 27, 2024
…utube#1663)

1. Add HTMLVideoElement.setMaxVideoInputSize(max_video_input_size) to
allow the web app to explicitly set the maximum size in bytes of a
buffer of data for video described by android MediaFormat.
2. If the setting value is 0, it uses the default value.
3. This uses the SbThreadLocal to store max_video_input_size, which
allows each player to acquire its input size from webapp.
4. This implementation includes setting max_video_input_size per player,
i.e., each player can configure its max_video_input_size.

b/176923480

(cherry picked from commit c39f97a)
borongc added a commit that referenced this pull request Jan 27, 2024
)

1. Add HTMLVideoElement.setMaxVideoInputSize(max_video_input_size) to
allow the web app to explicitly set the maximum size in bytes of a
buffer of data for video described by android MediaFormat.
2. If the setting value is 0, it uses the default value.
3. This uses the SbThreadLocal to store max_video_input_size, which
allows each player to acquire its input size from webapp.
4. This implementation includes setting max_video_input_size per player,
i.e., each player can configure its max_video_input_size.

b/176923480

(cherry picked from commit c39f97a)
borongc added a commit that referenced this pull request Jan 28, 2024
…le from the webapp (#2314)

Refer to the original PR: #1663

1. Add HTMLVideoElement.setMaxVideoInputSize(max_video_input_size) to
allow the web app to explicitly set the maximum size in bytes of a
buffer of data for video described by android MediaFormat.
2. If the setting value is 0, it uses the default value.
3. This uses the SbThreadLocal to store max_video_input_size, which
allows each player to acquire its input size from webapp.
4. This implementation includes setting max_video_input_size per player,
i.e., each player can configure its max_video_input_size.

b/176923480

Co-authored-by: Bo-Rong Chen <[email protected]>
borongc added a commit to borongc/cobalt that referenced this pull request Apr 9, 2024
…utube#1663)

1. Add HTMLVideoElement.setMaxVideoInputSize(max_video_input_size) to
allow the web app to explicitly set the maximum size in bytes of a
buffer of data for video described by android MediaFormat.
2. If the setting value is 0, it uses the default value.
3. This uses the SbThreadLocal to store max_video_input_size, which
allows each player to acquire its input size from webapp.
4. This implementation includes setting max_video_input_size per player,
i.e., each player can configure its max_video_input_size.

b/176923480
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cp-24.lts.1+ Cherry Pick to the 24.lts.1+ branch on_device
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants