<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>265274</bug_id>
          
          <creation_ts>2023-11-22 20:58:52 -0800</creation_ts>
          <short_desc>[MSE] MSE objects should be using thread-safe refcount</short_desc>
          <delta_ts>2023-11-25 06:54:28 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Media</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>264134</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Jean-Yves Avenard [:jya]">jean-yves.avenard</reporter>
          <assigned_to name="Jean-Yves Avenard [:jya]">jean-yves.avenard</assigned_to>
          <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1994483</commentid>
    <comment_count>0</comment_count>
    <who name="Jean-Yves Avenard [:jya]">jean-yves.avenard</who>
    <bug_when>2023-11-22 20:58:52 -0800</bug_when>
    <thetext>With MSE in a Worker, the threading model of the MSE objects will be changing.

Currently, all run in the main thread.

As we progress bug 264134, the threading model will become:

HTMLMediaElement, MediaPlayer, MediaPlayerPrivate run on the main thread (MediaPlayerPrivate run in the GPU process).

MediaSource and SourceBuffer will run on either the main thread or in a worker.

MediaSourcePrivate and SourceBufferPrivate will run in a dedicated WorkQueue (either in the content process or in the GPU Process).

Currently, MediaSource (a MediaSourcePrivateClient) and SourceBuffer (a SourceBufferPrivateClient) are using non-thread safe refcounting and supports weakptr.
MediaSourcePrivate and SourceBufferPrivate are using non-thread safe refcounting and supports weakptr.

We want to make them use thread-safe refcounting and thread safe weakptr.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1994484</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2023-11-22 20:59:15 -0800</bug_when>
    <thetext>&lt;rdar://problem/118734205&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1994488</commentid>
    <comment_count>2</comment_count>
    <who name="Jean-Yves Avenard [:jya]">jean-yves.avenard</who>
    <bug_when>2023-11-22 21:24:18 -0800</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/20840</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1994737</commentid>
    <comment_count>3</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2023-11-25 06:54:26 -0800</bug_when>
    <thetext>Committed 271111@main (3e109296984d): &lt;https://commits.webkit.org/271111@main&gt;

Reviewed commits have been landed. Closing PR #20840 and removing active labels.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>