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

Unified Diff: webrtc/audio/audio_send_stream.cc

Issue 1397123003: Add AudioSendStream to Call. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: more tests Created 5 years, 2 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/audio/audio_send_stream.cc
diff --git a/webrtc/audio/audio_send_stream.cc b/webrtc/audio/audio_send_stream.cc
new file mode 100644
index 0000000000000000000000000000000000000000..fcacce6dc51d8f4104d67a9a60355f015158d9bb
--- /dev/null
+++ b/webrtc/audio/audio_send_stream.cc
@@ -0,0 +1,66 @@
+/*
+ * Copyright (c) 2015 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.
+ */
+
+#include "webrtc/audio/audio_send_stream.h"
+
+#include <string>
+
+#include "webrtc/base/checks.h"
+
+namespace webrtc {
+std::string AudioSendStream::Config::Rtp::ToString() const {
tommi 2015/10/14 13:21:18 is this needed for debugging purposes? If so, can
the sun 2015/10/14 14:25:24 I like that idea, but it runs deeper than just thi
stefan-webrtc 2015/10/14 14:29:22 This string is used to LOG the stream configuratio
+ std::stringstream ss;
+ ss << "{ssrc: " << ssrc;
+ ss << ", extensions: [";
+ for (size_t i = 0; i < extensions.size(); ++i) {
tommi 2015/10/14 13:21:18 use range based loop?
the sun 2015/10/14 14:25:24 With the conditional "ss << ", ";" below, I don't
tommi 2015/10/14 14:49:28 Acknowledged.
+ ss << extensions[i].ToString();
+ if (i != extensions.size() - 1)
+ ss << ", ";
+ }
+ ss << ']';
+ ss << '}';
+ return ss.str();
+}
+
+std::string AudioSendStream::Config::ToString() const {
+ std::stringstream ss;
+ ss << "{rtp: " << rtp.ToString();
+ ss << ", voe_channel_id: " << voe_channel_id;
+ // TODO(solenberg): Encoder config.
+ ss << ", cng_payload_type: " << cng_payload_type;
+ ss << ", red_payload_type: " << red_payload_type;
+ ss << '}';
+ return ss.str();
+}
+
+namespace internal {
+AudioSendStream::AudioSendStream(const webrtc::AudioSendStream::Config& config)
+ : config_(config) {
+ RTC_DCHECK(config.voe_channel_id != -1);
+}
+
+webrtc::AudioSendStream::Stats AudioSendStream::GetStats() const {
+ return webrtc::AudioSendStream::Stats();
+}
+
+void AudioSendStream::Start() {
+}
+
+void AudioSendStream::Stop() {
+}
+
+void AudioSendStream::SignalNetworkState(NetworkState state) {
+}
+
+bool AudioSendStream::DeliverRtcp(const uint8_t* packet, size_t length) {
+ return false;
+}
+} // namespace internal
+} // namespace webrtc

Powered by Google App Engine
This is Rietveld 408576698