imported/w3c/web-platform-tests/mediacapture-streams/MediaStreamTrack-MediaElement-disabled-video-is-black.https.html fails.
Created attachment 427995 [details] Patch
Comment on attachment 427995 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=427995&action=review > Source/WebCore/platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp:276 > + pushSample(blackSample.get()); Nit (maybe for other time): wouldn't it be nice pushSample was void pushSample(GRefPtr<GstSample>&&) ?
Comment on attachment 427995 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=427995&action=review >> Source/WebCore/platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp:276 >> + pushSample(blackSample.get()); > > Nit (maybe for other time): wouldn't it be nice pushSample was void pushSample(GRefPtr<GstSample>&&) ? I don't think that's possible currently because when the track is enabled the sample being pushed is not owned by the observer, but by the track that generates it. And a track can have more than one observer.
Committed r277175 (237461@main): <https://commits.webkit.org/237461@main>
<rdar://problem/77658069>
(In reply to Philippe Normand from comment #3) > Comment on attachment 427995 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=427995&action=review > > >> Source/WebCore/platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp:276 > >> + pushSample(blackSample.get()); > > > > Nit (maybe for other time): wouldn't it be nice pushSample was void pushSample(GRefPtr<GstSample>&&) ? > > I don't think that's possible currently because when the track is enabled > the sample being pushed is not owned by the observer, but by the track that > generates it. And a track can have more than one observer. It doesn't mean you can't create another GRefPtr<GstSample> by reffing the sampled owned by the track, right?