Bug 168234 - [WebRTC] Implement description getters for libwebrtc RTCPeerConnection
Summary: [WebRTC] Implement description getters for libwebrtc RTCPeerConnection
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: youenn fablet
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-13 10:30 PST by youenn fablet
Modified: 2017-02-14 11:41 PST (History)
3 users (show)

See Also:


Attachments
Patch (7.42 KB, patch)
2017-02-13 11:50 PST, youenn fablet
no flags Details | Formatted Diff | Diff
Patch (9.15 KB, patch)
2017-02-13 11:59 PST, youenn fablet
no flags Details | Formatted Diff | Diff
Patch for landing (7.42 KB, patch)
2017-02-14 11:05 PST, youenn fablet
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description youenn fablet 2017-02-13 10:30:31 PST
Currently, we are returning null, which is preventing to pass some W3C tests.
Comment 1 youenn fablet 2017-02-13 11:50:10 PST
Created attachment 301366 [details]
Patch
Comment 2 youenn fablet 2017-02-13 11:59:02 PST
Created attachment 301368 [details]
Patch
Comment 3 Alex Christensen 2017-02-13 17:37:37 PST
Comment on attachment 301368 [details]
Patch

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

> Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:66
> -static inline const char* sessionDescriptionType(RTCSessionDescription::SdpType sdpType)
> +static inline const char* toSessionDescriptionType(RTCSessionDescription::SdpType sdpType)

Let's not do this change.

> Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:88
> +    auto type = description.type();
> +    if (type == webrtc::SessionDescriptionInterface::kOffer)
> +        return RTCSessionDescription::SdpType::Offer;
> +    if (type == webrtc::SessionDescriptionInterface::kAnswer)
> +        return RTCSessionDescription::SdpType::Answer;
> +    ASSERT(type == webrtc::SessionDescriptionInterface::kPrAnswer);
> +    return RTCSessionDescription::SdpType::Pranswer;

switch(description.type())
Comment 4 youenn fablet 2017-02-14 11:05:17 PST
Created attachment 301525 [details]
Patch for landing
Comment 5 youenn fablet 2017-02-14 11:06:36 PST
(In reply to comment #3)
> Comment on attachment 301368 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=301368&action=review
> 
> > Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:66
> > -static inline const char* sessionDescriptionType(RTCSessionDescription::SdpType sdpType)
> > +static inline const char* toSessionDescriptionType(RTCSessionDescription::SdpType sdpType)
> 
> Let's not do this change.

OK

> 
> > Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:88
> > +    auto type = description.type();
> > +    if (type == webrtc::SessionDescriptionInterface::kOffer)
> > +        return RTCSessionDescription::SdpType::Offer;
> > +    if (type == webrtc::SessionDescriptionInterface::kAnswer)
> > +        return RTCSessionDescription::SdpType::Answer;
> > +    ASSERT(type == webrtc::SessionDescriptionInterface::kPrAnswer);
> > +    return RTCSessionDescription::SdpType::Pranswer;
> 
> switch(description.type())

description.type() is a static const char[].
Comment 6 WebKit Commit Bot 2017-02-14 11:41:51 PST
Comment on attachment 301525 [details]
Patch for landing

Clearing flags on attachment: 301525

Committed r212315: <http://trac.webkit.org/changeset/212315>
Comment 7 WebKit Commit Bot 2017-02-14 11:41:56 PST
All reviewed patches have been landed.  Closing bug.