From 58fc967b1d1e656b893128dbe552fe75821639c9 Mon Sep 17 00:00:00 2001 From: xiaomings Date: Fri, 10 Jan 2025 15:20:22 -0800 Subject: [PATCH] Move demuxer_memory_limit_starboard.cc (#4683) Move it from //media/base/ to //media/base/starboard/ so it gets code format. Also modified .github/CODEOWNERS and .pre-commit-config.yaml to add //media/base/starboard. b/322027866 --- .github/CODEOWNERS | 1 + .pre-commit-config.yaml | 1 + .../{ => starboard}/demuxer_memory_limit_starboard.cc | 9 ++++----- 3 files changed, 6 insertions(+), 5 deletions(-) rename media/base/{ => starboard}/demuxer_memory_limit_starboard.cc (85%) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index a0bc3b84a002..1de9dbebc05f 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -7,6 +7,7 @@ /.github/ # no owners /cobalt/ # no owners +/media/base/starboard/ # no owners /media/starboard/ # no owners /starboard/ # no owners /components/viz/service/display/starboard/ # no owners diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index fb4cce48ae98..3e7a98b28eaa 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,6 +9,7 @@ files: | (?x)^( .github/| cobalt/| + media/base/starboard/| media/starboard/| starboard/| components/viz/service/display/starboard/| diff --git a/media/base/demuxer_memory_limit_starboard.cc b/media/base/starboard/demuxer_memory_limit_starboard.cc similarity index 85% rename from media/base/demuxer_memory_limit_starboard.cc rename to media/base/starboard/demuxer_memory_limit_starboard.cc index 188878d8715c..6790fcc48d65 100644 --- a/media/base/demuxer_memory_limit_starboard.cc +++ b/media/base/starboard/demuxer_memory_limit_starboard.cc @@ -18,10 +18,10 @@ #include "media/base/demuxer_memory_limit.h" +#include "base/logging.h" #include "media/base/decoder_buffer.h" #include "media/base/starboard_utils.h" #include "media/base/video_codecs.h" -#include "base/logging.h" namespace media { @@ -30,10 +30,9 @@ size_t GetDemuxerStreamAudioMemoryLimit( return DecoderBuffer::Allocator::GetInstance()->GetAudioBufferBudget(); } -size_t GetDemuxerStreamVideoMemoryLimit( - Demuxer::DemuxerTypes /*demuxer_type*/, - const VideoDecoderConfig* video_config, - const std::string& mime_type) { +size_t GetDemuxerStreamVideoMemoryLimit(Demuxer::DemuxerTypes /*demuxer_type*/, + const VideoDecoderConfig* video_config, + const std::string& mime_type) { return static_cast( GetSbMediaVideoBufferBudget(video_config, mime_type)); }