Bug 232873

Summary: Update libwebrtc to M96
Product: WebKit Reporter: youenn fablet <youennf>
Component: WebRTCAssignee: youenn fablet <youennf>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, annulen, eric.carlson, ews-watchlist, glefebvr, glenn, gyuyoung.kim, hta, jaya.allamsetty, jer.noble, philipj, pnormand, ryuan.choi, sergio, tommyw, vjaquez, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
patch
ews-feeder: commit-queue-
patch
none
patch
achristensen: review+, ews-feeder: commit-queue-
Patch above for wpe&wkgtk compilation
none
Unified patch for landing none

Description youenn fablet 2021-11-09 02:50:21 PST
Update libwebrtc to M96
Comment 1 Radar WebKit Bug Importer 2021-11-09 03:21:22 PST
<rdar://problem/85196125>
Comment 2 youenn fablet 2021-11-09 03:26:04 PST
Created attachment 443673 [details]
Patch
Comment 3 youenn fablet 2021-11-09 04:41:24 PST
Created attachment 443679 [details]
patch
Comment 4 youenn fablet 2021-11-09 05:07:21 PST
Created attachment 443682 [details]
patch
Comment 5 youenn fablet 2021-11-09 05:09:22 PST
Created attachment 443683 [details]
patch
Comment 6 youenn fablet 2021-11-09 07:28:01 PST
@Victor or @Philn, could you take a look at libwebrtc CMakeLists.txt? It probably needs some updates.
Comment 7 Víctor M. Jáquez L. 2021-11-09 07:36:03 PST
(In reply to youenn fablet from comment #6)
> @Victor or @Philn, could you take a look at libwebrtc CMakeLists.txt? It
> probably needs some updates.

Hi Youenn. I can take a look tomorrow morning, if that's ok for you.
Comment 8 youenn fablet 2021-11-09 08:08:05 PST
(In reply to Víctor M. Jáquez L. from comment #7)
> (In reply to youenn fablet from comment #6)
> > @Victor or @Philn, could you take a look at libwebrtc CMakeLists.txt? It
> > probably needs some updates.
> 
> Hi Youenn. I can take a look tomorrow morning, if that's ok for you.

Sounds good, thanks!
Comment 9 youenn fablet 2021-11-09 08:20:47 PST
Comment on attachment 443683 [details]
patch

Putting review flag while waiting for gtk compilation fixes
Comment 10 Víctor M. Jáquez L. 2021-11-10 03:32:29 PST
I can compile now without errors no warnings, but I have a doubt:

H264EncoderImpl now adds headers from OpenH264 for SVC. Shall I include third_party/openh264 completely or only those headers (they seem kind of self-contained)??
Comment 11 youenn fablet 2021-11-10 04:38:58 PST
(In reply to Víctor M. Jáquez L. from comment #10)
> I can compile now without errors no warnings, but I have a doubt:
> 
> H264EncoderImpl now adds headers from OpenH264 for SVC. Shall I include
> third_party/openh264 completely or only those headers (they seem kind of
> self-contained)??

That is a mistake,  I missed a #if defined(WEBKIT_LIBWEBRTC_OPENH264_ENCODER) && WEBKIT_LIBWEBRTC_OPENH264_ENCODER change.
Comment 12 youenn fablet 2021-11-10 04:39:34 PST
Something like:
+#if defined(WEBKIT_LIBWEBRTC_OPENH264_ENCODER) && WEBKIT_LIBWEBRTC_OPENH264_ENCODER
+#include "wels/codec_api.h"
+#include "wels/codec_app_def.h"
+#include "wels/codec_def.h"
+#include "wels/codec_ver.h"
+#else
 #include "third_party/openh264/src/codec/api/svc/codec_api.h"
 #include "third_party/openh264/src/codec/api/svc/codec_app_def.h"
 #include "third_party/openh264/src/codec/api/svc/codec_def.h"
 #include "third_party/openh264/src/codec/api/svc/codec_ver.h"
+#endif
Comment 13 Víctor M. Jáquez L. 2021-11-10 06:12:38 PST
Created attachment 443808 [details]
Patch above for wpe&wkgtk compilation
Comment 14 youenn fablet 2021-11-10 06:43:50 PST
Created attachment 443812 [details]
Unified patch for landing
Comment 15 youenn fablet 2021-11-10 06:45:43 PST
(In reply to youenn fablet from comment #12)
> Something like:
> +#if defined(WEBKIT_LIBWEBRTC_OPENH264_ENCODER) &&
> WEBKIT_LIBWEBRTC_OPENH264_ENCODER
> +#include "wels/codec_api.h"
> +#include "wels/codec_app_def.h"
> +#include "wels/codec_def.h"
> +#include "wels/codec_ver.h"
> +#else
>  #include "third_party/openh264/src/codec/api/svc/codec_api.h"
>  #include "third_party/openh264/src/codec/api/svc/codec_app_def.h"
>  #include "third_party/openh264/src/codec/api/svc/codec_def.h"
>  #include "third_party/openh264/src/codec/api/svc/codec_ver.h"
> +#endif

As a follow-up, I think we should add a "#if defined(WEBRTC_WEBKIT_BUILD)" to defined(WEBKIT_LIBWEBRTC_OPENH264_ENCODER) && WEBKIT_LIBWEBRTC_OPENH264_ENCODER.
That will make sure I will not remove that change at next libwebrtc update.
Comment 16 EWS 2021-11-10 07:55:40 PST
Committed r285577 (244085@main): <https://commits.webkit.org/244085@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 443812 [details].
Comment 17 Brent Fulgham 2022-02-12 21:40:25 PST
*** Bug 231785 has been marked as a duplicate of this bug. ***