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

Add VideoGeometrySetter Service for Cobalt #4810

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

Conversation

borongc
Copy link
Contributor

@borongc borongc commented Jan 31, 2025

StarboardRender needs to be informed with the video geometry information from the display compositor. VideoGeometrySetter provides the IPC between the StarobardRenderer and the display compositor so the video geometry information can reach StarboardRenderer.

This refers to https://chromium-review.googlesource.com/c/chromium/src/+/1799692 with the following modifications:

  • VideoGeometrySetterService is in Renderer thread, and it is exposed to ContentBrowserClient.
  • ContentBrowserClient binds VideoGeometrySetterService after receiving mojo::PendingRemotecobalt::media::mojom::VideoGeometrySetter from compositing thread (viz) to Renderer thread.
  • ContentRendererClient creates a custom StarboardRendererFactory, which allows to bind overlay_plane_id for each StarboardRenderer with VideoGeometrySetterService.

This CL also cleans up the old implementations for setting video bounds: #4385, because it is unnecessary with this PR.

b/391938746

@borongc borongc force-pushed the sbplayer_bounds branch 10 times, most recently from 1cdc360 to 20fc77f Compare February 4, 2025 21:05
borongc added a commit to borongc/cobalt that referenced this pull request Feb 4, 2025
Copy chromecast::media::VideoGeometrySetterService to Cobalt folder, as this is needed for youtube#4810.

The PR doesn't have any functional changes.

b/391938746
@borongc borongc force-pushed the sbplayer_bounds branch 2 times, most recently from b67c02b to 5bd4dcf Compare February 4, 2025 23:38
@borongc borongc marked this pull request as ready for review February 4, 2025 23:39
@borongc borongc requested review from a team as code owners February 4, 2025 23:39
@borongc borongc requested a review from kaidokert February 4, 2025 23:39
borongc added a commit to borongc/cobalt that referenced this pull request Feb 5, 2025
Copy chromecast::media::VideoGeometrySetterService to Cobalt folder, as this is needed for youtube#4810.

The PR doesn't have any functional changes.

b/391938746
@@ -83,10 +84,17 @@ blink::UserAgentMetadata GetCobaltUserAgentMetadata() {
return metadata;
}

CobaltContentBrowserClient::CobaltContentBrowserClient() = default;
CobaltContentBrowserClient::CobaltContentBrowserClient() {
render_process_observer_.reset(new CobaltRenderProcessObserver());
Copy link
Contributor

Choose a reason for hiding this comment

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

I thinksthis CL is not ready for review, but JIC nit: prefer std::make_unique<> instead of new:

https://chromium.googlesource.com/chromium/src/+/main/styleguide/c++/c++-dos-and-donts.md#use-and-instead-of-bare

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This follows CobaltWebContentsObserver, should we put all of them to std::make_unique<>?

borongc added a commit that referenced this pull request Feb 5, 2025
Copy chromecast::media::VideoGeometrySetterService to Cobalt folder, as
this is needed for #4810.

The PR doesn't have any functional changes.

b/391938746
@borongc borongc force-pushed the sbplayer_bounds branch 5 times, most recently from 96701d6 to c3b20c0 Compare February 6, 2025 04:37
StarboardRender needs to be informed with the video geometry information from
the display compositor. VideoGeometrySetter provides the IPC between
the StarobardRenderer and the display compositor so the video geometry
information can reach StarboardRenderer.

This is from https://chromium-review.googlesource.com/c/chromium/src/+/1799692.

b/391938746
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.

2 participants