blob: 0d0c072bf4a58fd94ac82639a439530afc5bea5a [file] [log] [blame]
solenbergc7a8b082015-10-16 14:35:07 -07001/*
2 * Copyright (c) 2015 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#include "webrtc/audio/audio_send_stream.h"
12
13#include <string>
14
15#include "webrtc/base/checks.h"
16#include "webrtc/base/logging.h"
17
18namespace webrtc {
19std::string AudioSendStream::Config::Rtp::ToString() const {
20 std::stringstream ss;
21 ss << "{ssrc: " << ssrc;
22 ss << ", extensions: [";
23 for (size_t i = 0; i < extensions.size(); ++i) {
24 ss << extensions[i].ToString();
25 if (i != extensions.size() - 1)
26 ss << ", ";
27 }
28 ss << ']';
29 ss << '}';
30 return ss.str();
31}
32
33std::string AudioSendStream::Config::ToString() const {
34 std::stringstream ss;
35 ss << "{rtp: " << rtp.ToString();
36 ss << ", voe_channel_id: " << voe_channel_id;
37 // TODO(solenberg): Encoder config.
38 ss << ", cng_payload_type: " << cng_payload_type;
39 ss << ", red_payload_type: " << red_payload_type;
40 ss << '}';
41 return ss.str();
42}
43
44namespace internal {
45AudioSendStream::AudioSendStream(const webrtc::AudioSendStream::Config& config)
46 : config_(config) {
47 LOG(LS_INFO) << "AudioSendStream: " << config_.ToString();
48 RTC_DCHECK(config.voe_channel_id != -1);
49}
50
51AudioSendStream::~AudioSendStream() {
52 LOG(LS_INFO) << "~AudioSendStream: " << config_.ToString();
53}
54
55webrtc::AudioSendStream::Stats AudioSendStream::GetStats() const {
56 return webrtc::AudioSendStream::Stats();
57}
58
59void AudioSendStream::Start() {
60}
61
62void AudioSendStream::Stop() {
63}
64
65void AudioSendStream::SignalNetworkState(NetworkState state) {
66}
67
68bool AudioSendStream::DeliverRtcp(const uint8_t* packet, size_t length) {
69 return false;
70}
71} // namespace internal
72} // namespace webrtc