[Webkit-unassigned] [Bug 70895] Add WebCore platform interface needed by updated MediaStream API design

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Nov 21 08:01:52 PST 2011


https://bugs.webkit.org/show_bug.cgi?id=70895


Adam Bergkvist <adam.bergkvist at ericsson.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #115608|0                           |1
        is obsolete|                            |
 Attachment #116089|                            |review?
               Flag|                            |




--- Comment #7 from Adam Bergkvist <adam.bergkvist at ericsson.com>  2011-11-21 08:01:51 PST ---
Created an attachment (id=116089)
 --> (https://bugs.webkit.org/attachment.cgi?id=116089&action=review)
Updated patch

(In reply to comment #4)
> Does MediaStreamCenter keep any state?  If not, perhaps it should be a collection of free functions.

Yes, e.g., each media capture device is only represented by a single MediaStreamSource instance so the MediaStreamCenter must keep track of the MediaStreamSource instances it has created.

(In reply to comment #5)
> (From update of attachment 115608 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=115608&action=review
> 
> > Source/WebCore/platform/mediastream/MediaStreamCenter.cpp:38
> > +#include "MediaStream.h"
> 
> Another issue is that MediaStream.h is outside the Platform directory and Platform isn't allowed to include headers from the rest of WebCore.

Fixed (introduced MediaStreamDescriptorOwner on the platform level). Fixed similar issue with UserMediaRequest.

> > Source/WebCore/platform/mediastream/MediaStreamCenter.cpp:48
> > +MediaStreamCenter& MediaStreamCenter::instance()
> > +{
> > +    ASSERT(isMainThread());
> > +    DEFINE_STATIC_LOCAL(MediaStreamCenter, center, ());
> > +    return center;
> > +}
> 
> The reason I ask these questions is that "static" is almost certainly the wrong scope for any state in WebKit.

One reason it's static is to allow MediaStreamSource instances (which correspond to specific media capture devices) to out-live everything else. A MediaStreamSource can be used by several unrelated pages and muting a source takes effect in all pages.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list