Move DTMF sender to RtpSender (as opposed to WebRtcSession).
Previously in the spec, there was a createDtmfSender method on PeerConnection, but that's been replaced by a "dtmf" attribute on RtpSender, which allows getting a DTMF sender without having an audio track. This also simplifies the code slightly, since tracks are now not necessary for identification. BUG=webrtc:4180 Review-Url: https://codereview.webrtc.org/2666853002 Cr-Commit-Position: refs/heads/master@{#16409}
This commit is contained in:
@ -17,6 +17,7 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "webrtc/api/dtmfsenderinterface.h"
|
||||
#include "webrtc/api/mediatypes.h"
|
||||
#include "webrtc/api/mediastreaminterface.h"
|
||||
#include "webrtc/api/proxy.h"
|
||||
@ -51,6 +52,9 @@ class RtpSenderInterface : public rtc::RefCountInterface {
|
||||
virtual RtpParameters GetParameters() const = 0;
|
||||
virtual bool SetParameters(const RtpParameters& parameters) = 0;
|
||||
|
||||
// Returns null for a video sender.
|
||||
virtual rtc::scoped_refptr<DtmfSenderInterface> GetDtmfSender() const = 0;
|
||||
|
||||
protected:
|
||||
virtual ~RtpSenderInterface() {}
|
||||
};
|
||||
@ -66,6 +70,7 @@ BEGIN_SIGNALING_PROXY_MAP(RtpSender)
|
||||
PROXY_CONSTMETHOD0(std::vector<std::string>, stream_ids)
|
||||
PROXY_CONSTMETHOD0(RtpParameters, GetParameters);
|
||||
PROXY_METHOD1(bool, SetParameters, const RtpParameters&)
|
||||
PROXY_CONSTMETHOD0(rtc::scoped_refptr<DtmfSenderInterface>, GetDtmfSender);
|
||||
END_PROXY_MAP()
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
Reference in New Issue
Block a user