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

[media] Turn SbPlayerPrivate into an interface #4575

Merged
merged 1 commit into from
Dec 14, 2024

Conversation

xiaomings
Copy link
Contributor

This allows us to move the implementation to a sub-class named SbPlayerPrivateImpl in namespace starboard::shared::starboard::player, which has the following benefits:

  1. It allows the implementation to use symbols inside the starboard namespace directly.
  2. By moving concrete implementation from the global namespace into a nested namespace, a binary can make use of two implementations (each in their own namespaces), e.g. experimenting on them.

b/327287075

Copy link
Contributor

@yell0wd0g yell0wd0g left a comment

Choose a reason for hiding this comment

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

Just a quick note that I prefer using final for subclasses that are, well, final. This makes easy for the reader to infer that they are leaf nodes. I think SbPlayerPrivateImpl is such a class.

This allows us to move the implementation to a sub-class named
SbPlayerPrivateImpl in namespace starboard::shared::starboard::player,
which has the following benefits:

1. It allows the implementation to use symbols inside the starboard
   namespace directly.
2. By moving concrete implementation from the global namespace into a
   nested namespace, a binary can make use of two implementations
   (each in their own namespaces), e.g. experimenting on them.

b/327287075
@xiaomings
Copy link
Contributor Author

Done, and I also make all overridden methods final.

@xiaomings xiaomings merged commit 77da172 into youtube:main Dec 14, 2024
68 of 70 checks passed
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