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}
diff --git a/webrtc/api/rtpsenderinterface.h b/webrtc/api/rtpsenderinterface.h
index 7129376..68547b0 100644
--- a/webrtc/api/rtpsenderinterface.h
+++ b/webrtc/api/rtpsenderinterface.h
@@ -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 @@
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 @@
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