[Webkit-unassigned] [Bug 158191] WebRTC: Update RTCPeerConnection.addTrack() to create (or reuse) an RTCRtpTransceiver

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jun 1 13:05:10 PDT 2016


https://bugs.webkit.org/show_bug.cgi?id=158191

--- Comment #3 from Adam Bergkvist <adam.bergkvist at ericsson.com> ---
(In reply to comment #2)
> Comment on attachment 280254 [details]
> Proposed patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=280254&action=review
> 
> > Source/WebCore/Modules/mediastream/RTCPeerConnection.h:67
> > +    Vector<RefPtr<RTCRtpSender>> getSenders() const override { return m_transceiverSet->getSenders(); }
> > +    Vector<RefPtr<RTCRtpReceiver>> getReceivers() const { return m_transceiverSet->getReceivers(); }
> 
> Can these return a reference to a const Vector: "const Vector<RefPtr<...>>&"?

Yes they can; and probably should :). createOfferTask uses getSenders() and modifies the resulting vector, but it can create a new vector from the const ref for its special purpose.

> > Source/WebCore/Modules/mediastream/RTCPeerConnection.h:68
> > +    const Vector<RefPtr<RTCRtpTransceiver>>& getTransceivers() const override { return m_transceiverSet->list(); }
> 
> Can this be final instead of override?

Seems to work. I'm a bit unsure what the result is being that the entire class is final.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160601/3ee85be1/attachment.html>


More information about the webkit-unassigned mailing list