Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(50)

Side by Side Diff: webrtc/api/rtpreceiverinterface.h

Issue 2046173002: Use VoiceChannel/VideoChannel directly from RtpSender/RtpReceiver. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Comment formatting. Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2015 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
11 // This file contains interfaces for RtpReceivers 11 // This file contains interfaces for RtpReceivers
12 // http://w3c.github.io/webrtc-pc/#rtcrtpreceiver-interface 12 // http://w3c.github.io/webrtc-pc/#rtcrtpreceiver-interface
13 13
14 #ifndef WEBRTC_API_RTPRECEIVERINTERFACE_H_ 14 #ifndef WEBRTC_API_RTPRECEIVERINTERFACE_H_
15 #define WEBRTC_API_RTPRECEIVERINTERFACE_H_ 15 #define WEBRTC_API_RTPRECEIVERINTERFACE_H_
16 16
17 #include <string> 17 #include <string>
18 18
19 #include "webrtc/api/mediastreaminterface.h" 19 #include "webrtc/api/mediastreaminterface.h"
20 #include "webrtc/api/proxy.h" 20 #include "webrtc/api/proxy.h"
21 #include "webrtc/api/rtpparameters.h"
21 #include "webrtc/base/refcount.h" 22 #include "webrtc/base/refcount.h"
22 #include "webrtc/base/scoped_ref_ptr.h" 23 #include "webrtc/base/scoped_ref_ptr.h"
24 #include "webrtc/pc/mediasession.h"
23 25
24 namespace webrtc { 26 namespace webrtc {
25 27
26 class RtpReceiverInterface : public rtc::RefCountInterface { 28 class RtpReceiverInterface : public rtc::RefCountInterface {
27 public: 29 public:
28 virtual rtc::scoped_refptr<MediaStreamTrackInterface> track() const = 0; 30 virtual rtc::scoped_refptr<MediaStreamTrackInterface> track() const = 0;
29 31
32 // Audio or video receiver?
33 virtual cricket::MediaType media_type() const = 0;
34
30 // Not to be confused with "mid", this is a field we can temporarily use 35 // Not to be confused with "mid", this is a field we can temporarily use
31 // to uniquely identify a receiver until we implement Unified Plan SDP. 36 // to uniquely identify a receiver until we implement Unified Plan SDP.
32 virtual std::string id() const = 0; 37 virtual std::string id() const = 0;
33 38
34 // The WebRTC specification only defines RTCRtpParameters in terms of senders, 39 // The WebRTC specification only defines RTCRtpParameters in terms of senders,
35 // but this API also applies them to receivers, similar to ORTC: 40 // but this API also applies them to receivers, similar to ORTC:
36 // http://ortc.org/wp-content/uploads/2016/03/ortc.html#rtcrtpparameters*. 41 // http://ortc.org/wp-content/uploads/2016/03/ortc.html#rtcrtpparameters*.
37 virtual RtpParameters GetParameters() const = 0; 42 virtual RtpParameters GetParameters() const = 0;
38 virtual bool SetParameters(const RtpParameters& parameters) = 0; 43 virtual bool SetParameters(const RtpParameters& parameters) = 0;
39 44
40 protected: 45 protected:
41 virtual ~RtpReceiverInterface() {} 46 virtual ~RtpReceiverInterface() {}
42 }; 47 };
43 48
44 // Define proxy for RtpReceiverInterface. 49 // Define proxy for RtpReceiverInterface.
45 BEGIN_SIGNALING_PROXY_MAP(RtpReceiver) 50 BEGIN_SIGNALING_PROXY_MAP(RtpReceiver)
46 PROXY_CONSTMETHOD0(rtc::scoped_refptr<MediaStreamTrackInterface>, track) 51 PROXY_CONSTMETHOD0(rtc::scoped_refptr<MediaStreamTrackInterface>, track)
52 PROXY_CONSTMETHOD0(cricket::MediaType, media_type)
47 PROXY_CONSTMETHOD0(std::string, id) 53 PROXY_CONSTMETHOD0(std::string, id)
48 PROXY_CONSTMETHOD0(RtpParameters, GetParameters); 54 PROXY_CONSTMETHOD0(RtpParameters, GetParameters);
49 PROXY_METHOD1(bool, SetParameters, const RtpParameters&) 55 PROXY_METHOD1(bool, SetParameters, const RtpParameters&)
50 END_SIGNALING_PROXY() 56 END_SIGNALING_PROXY()
51 57
52 } // namespace webrtc 58 } // namespace webrtc
53 59
54 #endif // WEBRTC_API_RTPRECEIVERINTERFACE_H_ 60 #endif // WEBRTC_API_RTPRECEIVERINTERFACE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698