Bug 189921

Summary: [WPE][GTK][WebRTC] Fixup VP8 encoding support
Product: WebKit Reporter: Thibault Saunier <tsaunier>
Component: New BugsAssignee: Thibault Saunier <tsaunier>
Status: RESOLVED FIXED    
Severity: Normal CC: alex, calvaris, commit-queue, pnormand, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch none

Thibault Saunier
Reported 2018-09-24 11:46:14 PDT
[WPE][GTK][WebRTC] Fixup VP8 encoding support
Attachments
Patch (8.52 KB, patch)
2018-09-24 11:52 PDT, Thibault Saunier
no flags
Patch (10.54 KB, patch)
2018-09-25 04:56 PDT, Thibault Saunier
no flags
Patch (10.54 KB, patch)
2018-09-25 05:33 PDT, Thibault Saunier
no flags
Thibault Saunier
Comment 1 2018-09-24 11:52:14 PDT
Philippe Normand
Comment 2 2018-09-25 01:58:29 PDT
Comment on attachment 350658 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=350658&action=review > Source/WebCore/platform/mediastream/libwebrtc/GStreamerVideoEncoderFactory.cpp:380 > fragmentationInfo->fragmentationTimeDiff[0] = 0; > + gst_buffer_unmap(buffer, &map); You could use the GstMappedBuffer thing here maybe?
Thibault Saunier
Comment 3 2018-09-25 04:56:23 PDT
Philippe Normand
Comment 4 2018-09-25 05:20:48 PDT
Comment on attachment 350746 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=350746&action=review > Source/WebCore/ChangeLog:14 > + + And do not raise a GStreamer error when GStreanerVideoEnclder::OnEncodedImage typo Enclder > Source/WebCore/platform/mediastream/libwebrtc/GStreamerVideoEncoderFactory.cpp:84 > + SetRestrictionCaps(WTFMove(caps)); Are all the SetRestrictionCaps call sites OK now? > Source/WebCore/platform/mediastream/libwebrtc/GStreamerVideoEncoderFactory.cpp:255 > + GST_ERROR_OBJECT(m_pipeline.get(), "Encode callback failed: %d", result.error); > > return GST_FLOW_OK; Is it OK to return FLOW_OK also when an error is raised? > Source/WebCore/platform/mediastream/libwebrtc/GStreamerVideoEncoderFactory.cpp:370 > + memcpy(encodedImage->_buffer, map.data(), map.size()); I know we had this before but would there be a way to avoid this?
Thibault Saunier
Comment 5 2018-09-25 05:31:38 PDT
(In reply to Philippe Normand from comment #4) > Comment on attachment 350746 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=350746&action=review > > > Source/WebCore/ChangeLog:14 > > + + And do not raise a GStreamer error when GStreanerVideoEnclder::OnEncodedImage > > typo Enclder Fixed. > > Source/WebCore/platform/mediastream/libwebrtc/GStreamerVideoEncoderFactory.cpp:84 > > + SetRestrictionCaps(WTFMove(caps)); > > Are all the SetRestrictionCaps call sites OK now? It is the only call yes. > > Source/WebCore/platform/mediastream/libwebrtc/GStreamerVideoEncoderFactory.cpp:255 > > + GST_ERROR_OBJECT(m_pipeline.get(), "Encode callback failed: %d", result.error); > > > > return GST_FLOW_OK; > > Is it OK to return FLOW_OK also when an error is raised? It is not raising an error anymore, just a "small" runtime `GST_ERROR`, the only 2 return values for `webrtc::EncodedImageCallback::Result` are: * OK * ERROR_SEND_FAILED so basically we should not stop processing when `ERROR_SEND_FAILED` happens, so no reason to post an error on the bus. > > Source/WebCore/platform/mediastream/libwebrtc/GStreamerVideoEncoderFactory.cpp:370 > > + memcpy(encodedImage->_buffer, map.data(), map.size()); > > I know we had this before but would there be a way to avoid this? There might be a way but I can't see any encoder implementation avoiding this memcpy, it is an encoded frame so it shouldn't be a huge deal in practice.
Xabier Rodríguez Calvar
Comment 6 2018-09-25 05:32:11 PDT
Comment on attachment 350746 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=350746&action=review >> Source/WebCore/ChangeLog:14 >> + + And do not raise a GStreamer error when GStreanerVideoEnclder::OnEncodedImage > > typo Enclder and GStreaner :)
Thibault Saunier
Comment 7 2018-09-25 05:33:22 PDT
WebKit Commit Bot
Comment 8 2018-09-25 11:41:18 PDT
Comment on attachment 350748 [details] Patch Clearing flags on attachment: 350748 Committed r236466: <https://trac.webkit.org/changeset/236466>
WebKit Commit Bot
Comment 9 2018-09-25 11:41:20 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 10 2018-09-25 11:42:23 PDT
Note You need to log in before you can comment on or make changes to this bug.