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

Unified Diff: webrtc/api/test/fakertpsenderreceiver.h

Issue 2611983002: TrackMediaInfoMap added. (Closed)
Patch Set: Created 3 years, 11 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/test/fakertpsenderreceiver.h
diff --git a/webrtc/api/test/fakertpsenderreceiver.h b/webrtc/api/test/fakertpsenderreceiver.h
new file mode 100644
index 0000000000000000000000000000000000000000..127ea498b49b13212b8486334439dceaa5d0336f
--- /dev/null
+++ b/webrtc/api/test/fakertpsenderreceiver.h
@@ -0,0 +1,62 @@
+/*
+ * Copyright 2016 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.
+ */
+
+#ifndef WEBRTC_API_TEST_FAKERTPSENDERRECEIVER_H_
+#define WEBRTC_API_TEST_FAKERTPSENDERRECEIVER_H_
+
+#include <string>
+#include <vector>
+
+#include "webrtc/api/rtpparameters.h"
+#include "webrtc/api/rtpreceiverinterface.h"
+#include "webrtc/api/rtpsenderinterface.h"
+
+namespace webrtc {
+
+class FakeRtpSender : public rtc::RefCountedObject<RtpSenderInterface> {
+ public:
+ FakeRtpSender(cricket::MediaType media_type, RtpParameters parameters);
+
+ bool SetTrack(MediaStreamTrackInterface* track) override;
+ rtc::scoped_refptr<MediaStreamTrackInterface> track() const override;
+ uint32_t ssrc() const override;
+ cricket::MediaType media_type() const override;
+ std::string id() const override;
+ std::vector<std::string> stream_ids() const override;
+ RtpParameters GetParameters() const override;
+ bool SetParameters(const RtpParameters& parameters) override;
+
+ private:
+ const cricket::MediaType media_type_;
+ RtpParameters rtp_parameters_;
+ rtc::scoped_refptr<MediaStreamTrackInterface> track_;
+};
+
+class FakeRtpReceiver : public rtc::RefCountedObject<RtpReceiverInterface> {
+ public:
+ FakeRtpReceiver(cricket::MediaType media_type, RtpParameters parameters);
+
+ void SetTrack(MediaStreamTrackInterface* track);
+ rtc::scoped_refptr<MediaStreamTrackInterface> track() const override;
+ cricket::MediaType media_type() const override;
+ std::string id() const override;
+ RtpParameters GetParameters() const override;
+ bool SetParameters(const RtpParameters& parameters) override;
+ void SetObserver(RtpReceiverObserverInterface* observer) override;
+
+ private:
+ const cricket::MediaType media_type_;
+ RtpParameters rtp_parameters_;
+ rtc::scoped_refptr<MediaStreamTrackInterface> track_;
+};
+
+} // namespace webrtc
+
+#endif // WEBRTC_API_TEST_FAKERTPSENDERRECEIVER_H_

Powered by Google App Engine
This is Rietveld 408576698