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

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

Issue 2675173003: Adding "adapter" ORTC objects on top of ChannelManager/BaseChannel/etc. (Closed)
Patch Set: Created 3 years, 10 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
(Empty)
1 /*
2 * Copyright 2017 The WebRTC project authors. All Rights Reserved.
3 *
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
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
11 // This file contains interfaces for RtpReceivers
12 // http://w3c.github.io/webrtc-pc/#rtcrtpreceiver-interface
13
14 #ifndef WEBRTC_API_ORTCRTPRECEIVERINTERFACE_H_
15 #define WEBRTC_API_ORTCRTPRECEIVERINTERFACE_H_
16
17 #include "webrtc/api/mediastreaminterface.h"
18 #include "webrtc/api/mediatypes.h"
19 #include "webrtc/api/rtcerror.h"
20 #include "webrtc/api/rtpparameters.h"
21 #include "webrtc/api/rtptransportinterface.h"
22
23 namespace webrtc {
24
25 // Note: Since receiver capabilities may depend on how the OrtcFactory was
26 // created, instead of a static "GetCapabilities" method on this interface,
27 // there is a "GetRtpReceiverCapabilities" method on the OrtcFactory.
28 class OrtcRtpReceiverInterface {
29 public:
30 virtual ~OrtcRtpReceiverInterface() {}
31
32 // Returns a track representing the media received by this receiver.
33 //
34 // Will never be null. There is a 1:1 mapping between receivers and remote
35 // MediaStreamTracks.
36 virtual rtc::scoped_refptr<MediaStreamTrackInterface> GetTrack() const = 0;
37
38 // Switches to receiving media on a new transport.
39 virtual RTCError SetTransport(RtpTransportInterface* transport) = 0;
40 // Returns previously set (or constructed-with) transport.
41 virtual RtpTransportInterface* GetTransport() const = 0;
42
43 // Allows the parameters of a receiver to be changed after being constructed.
44 // There are no limitations to how the parameters can be changed after
45 // construction, as long as they're valid (for example, they can't use the
46 // same payload type for two codecs).
47 //
48 // Equivalent to "receive" in the ORTC API.
49 virtual RTCError SetParameters(const RtpParameters& parameters) = 0;
50 // Returns previously set (or constructed-with) parameters.
51 virtual RtpParameters GetParameters() const = 0;
52
53 // This isn't really necessary, since an RtpReceiver always has a track and
54 // thus you can call GetTrack()->kind(). But it's added here for parity with
55 // OrtcRtpSenderInterface.
56 virtual cricket::MediaType GetKind() const = 0;
57
58 // TODO(deadbeef): GetContributingSources
59 };
60
61 } // namespace webrtc
62
63 #endif // WEBRTC_API_ORTCRTPRECEIVERINTERFACE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698