-
Notifications
You must be signed in to change notification settings - Fork 127
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
[media] Refine DecoderBufferAllocator memory budget #4674
base: main
Are you sure you want to change the base?
Conversation
999579f
to
acd1769
Compare
acd1769
to
8d0214c
Compare
b5863f1
to
d3802ad
Compare
media/base/BUILD.gn
Outdated
@@ -462,7 +462,9 @@ source_set("base") { | |||
] | |||
} | |||
|
|||
if (is_android) { | |||
if (is_cobalt && use_starboard_media) { | |||
sources += [ "demuxer_memory_limit_starboard.cc" ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As this is not under /*/starboard/
directory, the code doesn't get formatted.
Should we move this to /media/base/starboard
, so we can get it formatted?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for catching this. I forced code formatting on decoder_buffer.h and demuxer_memory_limit_starboard.cc so they are ok now.
I am also happy to move the latter to //media/base/starboard if that's preferred. Just wanted to double check if we should create the folder and move the file there, or we should also create a BUILD.gn for it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a folder. We did the same thing for all other places.
We should consider to follow the same approach. Example PR is #4352.
7def28c
to
9ddf1c6
Compare
|
||
if (video_config->codec() == VideoCodec::kH264) { | ||
LOG(INFO) << "H264 encountered, assume 8 bits."; | ||
return 8; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: as 8 bits and 10 bits are used frequently, should we consider to define them as constexpr, so the name itself can know they are 8 and 10 bits?
2081cd7
to
028c2e6
Compare
Now SbMedia budget functions are properly respected when deciding MediaSource buffer memory limits. DecoderBuffer::Allocator interface has been refined to remove SbMedia types, and all Starboard dependency is resolved inside the concrete DecoderBufferAllocator implementation in //media/starboard. The logic to determine whether a video is 10 bits has been refined, as the video mime type is no longer available. b/322027866
028c2e6
to
7fc63cd
Compare
Now SbMedia budget functions are properly respected when deciding MediaSource buffer memory limits.
DecoderBuffer::Allocator interface has been refined to remove SbMedia types, and all Starboard dependency is resolved inside the concrete DecoderBufferAllocator implementation in //media/starboard.
The logic to determine whether a video is 10 bits has been refined, as the video mime type is no longer available.
b/322027866