media: Wire URL-player renderer factory plumbing - #11056
Closed
abhijeetk wants to merge 4 commits into
Closed
Conversation
Add use_starboard_url_player GN capability flag, derived from use_starboard_media and tvOS platform detection. Expose it as BUILDFLAG(USE_STARBOARD_URL_PLAYER) through build_config.h and register matching Mojo enabled_features entry. Add RendererType::kUrlPlayer = 13 to the C++ enum, Mojom enum, traits mapping, and histogram. The new enum is gated behind USE_STARBOARD_URL_PLAYER so non-tvOS builds are unaffected. This establishes the capability boundary for all subsequent URL-player CLs. Bug: 512045535
Add mojom::Renderer::InitializeWithUrl(client, source_url) to deliver the URL on the renderer Mojo pipe, keeping URL delivery and initialization ordered on the same pipe. Add UrlPlayerRenderer for tvOS URL-based playback via SbPlayerBridge and UrlPlayerRendererWrapper as the Mojo service bridge. The wrapper's InitializeWithUrl() sets the URL on the renderer internally then calls Initialize(). MojoRendererService validates the renderer type and URL before forwarding via static_cast, guarded by GetRendererType() == kUrlPlayer and ReportBadMessage(). Bug: 512045535
Add UrlPlayerRendererClient to the tvOS URL-player build, which drives URL-player playback over Mojo by calling InitializeWithUrl() directly on the renderer pipe. Add MediaResource::GetMediaUrl() behind USE_STARBOARD_URL_PLAYER so the client can retrieve the media URL from the demuxer. The base implementation returns an empty GURL; UrlPlayerDemuxer will override it in a later CL. Client unit tests are deferred to a later CL when all their dependencies (InitializeWithStreamPointers, SetSourceUrl mojom) are available. Build: ninja -C out/tvos-arm64-device_qa cobalt media_unittests (pass)
Add CreateUrlPlayerRenderer to mojom::InterfaceFactory, guarded by use_starboard_url_player, and route it through the renderer process, browser media proxy, and GPU media service. Add UrlPlayerRendererClientFactory, which creates a URL-player MojoRenderer via MojoRendererFactory::CreateUrlPlayerRenderer and wraps it in UrlPlayerRendererClient. Add URL-player factory coverage and update fake InterfaceFactory implementations in tests. Build: ninja -C out/tvos-arm64-device_qa cobalt nplb media_unittests Bug: 512045535
Collaborator
Author
|
Thanks for all review comments. We are moving ahead with approach in PR #10698 (UrlPlayer using StarboardRenderer). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add CreateUrlPlayerRenderer to mojom::InterfaceFactory, guarded by
use_starboard_url_player, and route it through the renderer process,
browser media proxy, and GPU media service.
Add UrlPlayerRendererClientFactory, which creates a URL-player
MojoRenderer via MojoRendererFactory::CreateUrlPlayerRenderer and wraps
it in UrlPlayerRendererClient.
Add URL-player factory coverage and update fake InterfaceFactory
implementations in tests.
Build: ninja -C out/tvos-arm64-simulator_qa cobalt nplb media_unittests
Bug: 512045535