Add PeerConnection GetRtpSender/ReceiverCapabilities

Those are static functions in the spec, so implemented as member functions
of the PeerConnectionFactory instead.

Bug: webrtc:7577, webrtc:9441
Change-Id: Iccb24180e096e713d24e7e25ecfd5d7bbd7638f9
Reviewed-on: https://webrtc-review.googlesource.com/85341
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23768}
This commit is contained in:
Florent Castelli
2018-06-28 14:09:33 +02:00
committed by Commit Bot
parent 0d4070a18c
commit 72b751af0b
12 changed files with 189 additions and 23 deletions

View File

@ -1307,6 +1307,22 @@ class PeerConnectionFactoryInterface : public rtc::RefCountInterface {
return nullptr;
}
// Returns the capabilities of an RTP sender of type |kind|.
// If for some reason you pass in MEDIA_TYPE_DATA, returns an empty structure.
// TODO(orphis): Make pure virtual when all subclasses implement it.
virtual RtpCapabilities GetRtpSenderCapabilities(
cricket::MediaType kind) const {
return {};
}
// Returns the capabilities of an RTP receiver of type |kind|.
// If for some reason you pass in MEDIA_TYPE_DATA, returns an empty structure.
// TODO(orphis): Make pure virtual when all subclasses implement it.
virtual RtpCapabilities GetRtpReceiverCapabilities(
cricket::MediaType kind) const {
return {};
}
virtual rtc::scoped_refptr<MediaStreamInterface> CreateLocalMediaStream(
const std::string& stream_id) = 0;