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

Move starboard media headers to prevent circular dependency #4593

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sideb0ard
Copy link
Contributor

b/380940036

Separate headers and implementation to prevent unnecessary circular dependency.

@sideb0ard sideb0ard requested review from a team as code owners December 17, 2024 00:42
@sideb0ard sideb0ard requested a review from briantting December 17, 2024 00:42
Copy link
Member

@kaidokert kaidokert left a comment

Choose a reason for hiding this comment

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

Looks like a clean move and extracts a dependency, always good.

@sideb0ard sideb0ard requested a review from xiaomings December 17, 2024 16:49
@@ -371,6 +371,15 @@ source_set("base") {
"webvtt_util.h",
]

if (use_starboard_media) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This may not be the best way to resolve this circular dependency. The original dependency from //media/base to //media/starboard was introduced in https://github.com/youtube/cobalt/pull/4348/files#diff-ec1e4ec37e5873a7e4de1c82ef9858dd14c5e4c82d786879d8aa65b3e909df98R67. The code adds decoder_buffer_allocator_ to MediaClient, which is supposed to be mostly an interface.

The concrete implementation (i.e. decoder_buffer_allocator_) should be added to a derived class of MediaClient, e.g. RenderMediaClient. In that case the circular dependency will be removed, and Starboard code can stay in //media/starboard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants