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

Unified Diff: webrtc/api/ortcrtpsenderinterface.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 side-by-side diff with in-line comments
Download patch
Index: webrtc/api/ortcrtpsenderinterface.h
diff --git a/webrtc/api/ortcrtpsenderinterface.h b/webrtc/api/ortcrtpsenderinterface.h
new file mode 100644
index 0000000000000000000000000000000000000000..b27b883d605b07c667063fc75b90c96665d0f8b4
--- /dev/null
+++ b/webrtc/api/ortcrtpsenderinterface.h
@@ -0,0 +1,61 @@
+/*
+ * Copyright 2017 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+// This file contains interfaces for RtpSenders
+// http://w3c.github.io/webrtc-pc/#rtcrtpsender-interface
+
+#ifndef WEBRTC_API_ORTCRTPSENDERINTERFACE_H_
+#define WEBRTC_API_ORTCRTPSENDERINTERFACE_H_
+
+#include "webrtc/api/mediatypes.h"
+#include "webrtc/api/mediastreaminterface.h"
+#include "webrtc/api/rtcerror.h"
+#include "webrtc/api/rtpparameters.h"
+#include "webrtc/api/rtptransportinterface.h"
+
+namespace webrtc {
+
+// Note: Since sender capabilities may depend on how the OrtcFactory was
+// created, instead of a static "GetCapabilities" method on this interface,
+// there is a "GetRtpSenderCapabilities" method on the OrtcFactory.
+class OrtcRtpSenderInterface {
+ public:
+ virtual ~OrtcRtpSenderInterface() {}
+
+ // Returns INVALID_PARAMETER error if an audio track is set on a video
+ // RtpSender, or vice-versa.
+ virtual RTCError SetTrack(MediaStreamTrackInterface* track) = 0;
+ // Returns previously set (or constructed-with) track.
+ virtual rtc::scoped_refptr<MediaStreamTrackInterface> GetTrack() const = 0;
+
+ // Switches to sending media on a new transport.
+ virtual RTCError SetTransport(RtpTransportInterface* transport) = 0;
+ // Returns previously set (or constructed-with) transport.
+ virtual RtpTransportInterface* GetTransport() const = 0;
+
+ // Allows the parameters of a sender to be changed after being constructed.
+ // There are no limitations to how the parameters can be changed after
+ // construction, as long as they're valid (for example, they can't use the
+ // same payload type for two codecs).
+ //
+ // Equivalent to "send" in the ORTC API.
+ virtual RTCError SetParameters(const RtpParameters& parameters) = 0;
+ // Returns previously set (or constructed-with) parameters.
+ virtual RtpParameters GetParameters() const = 0;
+
+ // Audio or video sender?
+ virtual cricket::MediaType GetKind() const = 0;
+
+ // TODO(deadbeef): SSRC conflict signal.
+};
+
+} // namespace webrtc
+
+#endif // WEBRTC_API_ORTCRTPSENDERINTERFACE_H_

Powered by Google App Engine
This is Rietveld 408576698