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

Implement cross-thread MediaSource attachments #4314

Open
wants to merge 5 commits into
base: 25.lts.1+
Choose a base branch
from

Commits on Oct 31, 2024

  1. Implement cross-thread MediaSource attachments

    Port relevant Chromium code to the Cobalt 25 codebase to allow for
    `MediaSource` objects on a Dedicated Worker to render frames on a
    `HTMLMediaElement` owned by the main browser thread.
    
    Usage of this feature is gated behind the `MediaSource.EnableInWorkers`
    H5VCC flag. In addition, the
    `MediaElement.EnableUsingMediaSourceBufferedRange` and
    `MediaElement.EnableUsingMediaSourceAttachmentMethods` flags are also
    required as pre-requisite features.
    
    This commit does introduce mutex locks to the `SourceBuffer` and `MediaSource`
    classes that cannot be fully gated behind H5VCC flags. However, current
    usage of both classes is contained to single-threaded usecases. As such,
    the mutex lock code should be an effective no-op.
    
    This is based off of the following Chromium commits:
    
    * https://chromium-review.googlesource.com/c/chromium/src/+/2459431
    * https://chromium-review.googlesource.com/c/chromium/src/+/2617351
    * https://chromium-review.googlesource.com/c/chromium/src/+/2909389
    
    b/338425382
    at-ninja committed Oct 31, 2024
    Configuration menu
    Copy the full SHA
    5fc5cd4 View commit details
    Browse the repository at this point in the history

Commits on Nov 4, 2024

  1. Configuration menu
    Copy the full SHA
    7170dd0 View commit details
    Browse the repository at this point in the history
  2. Review feedback

    at-ninja committed Nov 4, 2024
    Configuration menu
    Copy the full SHA
    70c7b41 View commit details
    Browse the repository at this point in the history

Commits on Nov 13, 2024

  1. Adding black box test

    at-ninja committed Nov 13, 2024
    Configuration menu
    Copy the full SHA
    d34cf3d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b887f1d View commit details
    Browse the repository at this point in the history