Skip to content

Commit

Permalink
[GStreamer][MediaStream] http/wpt/mediastream/transfer-mediastreamtra…
Browse files Browse the repository at this point in the history
…ck-to-worker.html asserts/fails

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

Reviewed by Xabier Rodriguez-Calvar.

The test was failing/asserting because the notified video frames were created with a zero
presentation size. By using the createWrappedSample() API the presentation size is set from the
sample caps.

* LayoutTests/platform/glib/TestExpectations:
* Source/WebCore/platform/mediastream/gstreamer/GStreamerVideoCapturer.cpp:
(WebCore::GStreamerVideoCapturer::setSinkVideoFrameCallback):

Canonical link: https://commits.webkit.org/273491@main
  • Loading branch information
philn committed Jan 25, 2024
1 parent 5a1edfb commit 7725039
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions LayoutTests/platform/glib/TestExpectations
Original file line number Diff line number Diff line change
Expand Up @@ -1872,8 +1872,6 @@ webkit.org/b/187603 fast/mediastream/media-stream-track-source-failure.html [ Ti

webkit.org/b/264803 fast/mediastream/mediastreamtrack-video-resize-event.html [ Failure ]

http/wpt/mediastream/transfer-mediastreamtrack-to-worker.html [ Failure Crash ]

# Adding transceivers without tracks is broken.
webkit.org/b/265865 imported/w3c/web-platform-tests/webrtc-stats/rtp-stats-creation.html [ Skip ]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ void GStreamerVideoCapturer::setSinkVideoFrameCallback(SinkVideoFrameCallback&&
m_sinkVideoFrameCallback.first = g_signal_connect_swapped(sink(), "new-sample", G_CALLBACK(+[](GStreamerVideoCapturer* capturer, GstElement* sink) -> GstFlowReturn {
auto gstSample = adoptGRef(gst_app_sink_pull_sample(GST_APP_SINK(sink)));
auto presentationTime = fromGstClockTime(GST_BUFFER_PTS(gst_sample_get_buffer(gstSample.get())));
capturer->m_sinkVideoFrameCallback.second(VideoFrameGStreamer::create(WTFMove(gstSample), WebCore::FloatSize(), presentationTime));
capturer->m_sinkVideoFrameCallback.second(VideoFrameGStreamer::createWrappedSample(gstSample, presentationTime));
return GST_FLOW_OK;
}), this);
}
Expand Down

0 comments on commit 7725039

Please sign in to comment.