Bug 218748

Summary: [GStreamer] refactor video encoder with WebKit style
Product: WebKit Reporter: Víctor M. Jáquez L. <vjaquez>
Component: WebRTCAssignee: Víctor M. Jáquez L. <vjaquez>
Status: RESOLVED FIXED    
Severity: Normal CC: alex, calvaris, eric.carlson, ews-watchlist, glenn, hta, jer.noble, philipj, pnormand, sergio, tommyw, tsaunier, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description Víctor M. Jáquez L. 2020-11-10 06:02:07 PST
libwebrtc/GStreamerVideoEncoder is written in a GStreamer code-style. It would be better to refactor it using C++/WebKit style, as the other GStreamer elements inside WebKit.
Comment 1 Víctor M. Jáquez L. 2020-11-10 07:27:06 PST
Created attachment 413694 [details]
Patch
Comment 2 Xabier Rodríguez Calvar 2020-11-11 03:44:56 PST
Let's wait for Phil and Thibault's comments, since IIRC, it was their idea to keep it this way to ease a possible upstreaming process to GStreamer eventually.
Comment 3 Thibault Saunier 2020-11-11 04:33:09 PST
(In reply to Xabier Rodríguez Calvar from comment #2)
> Let's wait for Phil and Thibault's comments, since IIRC, it was their idea
> to keep it this way to ease a possible upstreaming process to GStreamer
> eventually.

It indeed was the plan and the reason why we used the GStreamer coding style. I never took the time to make it happen and am not 100% sure what other GStreamer maintainer will think of it so I have no hard opinion at that point.
Comment 4 Philippe Normand 2020-11-23 01:32:44 PST
Comment on attachment 413694 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=413694&action=review

> Source/WebCore/platform/mediastream/libwebrtc/GStreamerVideoEncoder.cpp:39
> +    GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC, GST_PAD_ALWAYS, GST_STATIC_CAPS ("video/x-h264;video/x-vp8;video/x-vp9"));

vp9 is added here, but I see no mention of a vp9enc below. Maybe add vp9 in a follow-up patch, if this patch is meant to be a refactoring only.
Comment 5 Víctor M. Jáquez L. 2020-11-23 03:58:03 PST
Created attachment 414799 [details]
Patch
Comment 6 EWS 2020-11-27 02:22:08 PST
Committed r270187: <https://trac.webkit.org/changeset/270187>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 414799 [details].
Comment 7 Radar WebKit Bug Importer 2020-11-27 02:23:16 PST
<rdar://problem/71761576>