Move media_type to RtpTransceiverInterface
Media type is not part of the WebRTC spec for RtpTransceiver, but it is
handy and the RtpSender/RtpReceiver also have it.
Bug: webrtc:7600
Change-Id: I8350069502588bff478db4dc1318329626dcf9be
Reviewed-on: https://webrtc-review.googlesource.com/50560
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21988}
diff --git a/api/rtptransceiverinterface.h b/api/rtptransceiverinterface.h
index 5d74ae1..4106793 100644
--- a/api/rtptransceiverinterface.h
+++ b/api/rtptransceiverinterface.h
@@ -63,6 +63,10 @@
// https://w3c.github.io/webrtc-pc/#dom-rtcrtptransceiver
class RtpTransceiverInterface : public rtc::RefCountInterface {
public:
+ // Media type of the transceiver. Any sender(s)/receiver(s) will have this
+ // type as well.
+ virtual cricket::MediaType media_type() const = 0;
+
// The mid attribute is the mid negotiated and present in the local and
// remote descriptions. Before negotiation is complete, the mid value may be
// null. After rollbacks, the value may change from a non-null value to null.