Bug 191611 - [WebRTC] Provide default implementation of LibWebRTCProvider
Summary: [WebRTC] Provide default implementation of LibWebRTCProvider
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebRTC (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Ross Kirsling
URL:
Keywords: InRadar
Depends on:
Blocks: 191038
  Show dependency treegraph
 
Reported: 2018-11-13 16:57 PST by Don Olmstead
Modified: 2018-11-13 20:53 PST (History)
5 users (show)

See Also:


Attachments
Patch (16.86 KB, patch)
2018-11-13 17:48 PST, Ross Kirsling
no flags Details | Formatted Diff | Diff
Patch (16.86 KB, patch)
2018-11-13 17:49 PST, Ross Kirsling
no flags Details | Formatted Diff | Diff
Patch for landing (12.02 KB, patch)
2018-11-13 19:30 PST, Ross Kirsling
no flags Details | Formatted Diff | Diff
Patch for landing (16.74 KB, patch)
2018-11-13 19:32 PST, Ross Kirsling
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Don Olmstead 2018-11-13 16:57:43 PST
If !USE(LIBWEBRTC) there should be a default disabled LibWebRTCProvider. Currently Windows has one since it has no support but other platforms should be taken into account.
Comment 1 Ross Kirsling 2018-11-13 17:48:01 PST Comment hidden (obsolete)
Comment 2 Ross Kirsling 2018-11-13 17:49:46 PST
Created attachment 354740 [details]
Patch
Comment 3 Don Olmstead 2018-11-13 17:58:43 PST
Comment on attachment 354740 [details]
Patch

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

> Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:71
> +#if !USE(LIBWEBRTC)
> +bool LibWebRTCProvider::webRTCAvailable()
> +{
> +#if PLATFORM(COCOA)
> +    return true;
> +#else
> +    return false;
> +#endif
> +}
> +#endif

I know this was in the original code for cocoa returning true but I have a feeling this is a bug on their end. If so you can just collapse this into one big #if
Comment 4 Michael Catanzaro 2018-11-13 18:08:44 PST
Comment on attachment 354740 [details]
Patch

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

> Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:55
> -#if !PLATFORM(COCOA) && !PLATFORM(GTK) && !PLATFORM(WPE)
> +#if !USE(LIBWEBRTC) || (!PLATFORM(COCOA) && !USE(GSTREAMER))

Confusing... why not just:

#if !USE(LIBWEBRTC)

>> Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:71
>> +#endif
> 
> I know this was in the original code for cocoa returning true but I have a feeling this is a bug on their end. If so you can just collapse this into one big #if

Yeah Don is right, there's no way this is supposed to return true. We could do archaeology to figure out where it broke... or just fix it now. :)
Comment 5 Don Olmstead 2018-11-13 18:12:39 PST
(In reply to Michael Catanzaro from comment #4)
> Comment on attachment 354740 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=354740&action=review
> 
> > Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:55
> > -#if !PLATFORM(COCOA) && !PLATFORM(GTK) && !PLATFORM(WPE)
> > +#if !USE(LIBWEBRTC) || (!PLATFORM(COCOA) && !USE(GSTREAMER))
> 
> Confusing... why not just:
> 
> #if !USE(LIBWEBRTC)

Technically it seemed like the Glib ports wanted USE(LIBWEBRTC) && USE(GSTREAMER) to be true.

> >> Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:71
> >> +#endif
> > 
> > I know this was in the original code for cocoa returning true but I have a feeling this is a bug on their end. If so you can just collapse this into one big #if
> 
> Yeah Don is right, there's no way this is supposed to return true. We could
> do archaeology to figure out where it broke... or just fix it now. :)

Yea its really weird not sure if we should wait for youenn to chime in.
Comment 6 youenn fablet 2018-11-13 19:15:02 PST
Comment on attachment 354740 [details]
Patch

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

>>>> Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:71
>>>> +#endif
>>> 
>>> I know this was in the original code for cocoa returning true but I have a feeling this is a bug on their end. If so you can just collapse this into one big #if
>> 
>> Yeah Don is right, there's no way this is supposed to return true. We could do archaeology to figure out where it broke... or just fix it now. :)
> 
> Yea its really weird not sure if we should wait for youenn to chime in.

Yep, sounds good to simplify it.
Comment 7 Ross Kirsling 2018-11-13 19:30:49 PST Comment hidden (obsolete)
Comment 8 Ross Kirsling 2018-11-13 19:32:19 PST
Created attachment 354757 [details]
Patch for landing
Comment 9 WebKit Commit Bot 2018-11-13 19:57:29 PST
Comment on attachment 354757 [details]
Patch for landing

Clearing flags on attachment: 354757

Committed r238159: <https://trac.webkit.org/changeset/238159>
Comment 10 WebKit Commit Bot 2018-11-13 19:57:31 PST
All reviewed patches have been landed.  Closing bug.
Comment 11 Radar WebKit Bug Importer 2018-11-13 19:58:21 PST
<rdar://problem/46051555>
Comment 12 Ross Kirsling 2018-11-13 20:16:49 PST
Argh, this is what I get for being impatient -- GTK/WPE build fix incoming.
Comment 13 Ross Kirsling 2018-11-13 20:23:20 PST
(In reply to Ross Kirsling from comment #12)
> Argh, this is what I get for being impatient -- GTK/WPE build fix incoming.

Committed r238160: <https://trac.webkit.org/changeset/238160>
Comment 14 Don Olmstead 2018-11-13 20:27:43 PST
Your unreviewed build fix should be doing USE(GSTREAMER) && USE(LIBWEBRTC). Of course check the file to see what’s there.
Comment 15 Ross Kirsling 2018-11-13 20:53:00 PST
(In reply to Don Olmstead from comment #14)
> Your unreviewed build fix should be doing USE(GSTREAMER) && USE(LIBWEBRTC).
> Of course check the file to see what’s there.

Sorry about that.

Committed r238161: <https://trac.webkit.org/changeset/238161>