OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 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 | 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 | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
11 #ifndef WEBRTC_AUDIO_SEND_STREAM_H_ | 11 #ifndef WEBRTC_AUDIO_SEND_STREAM_H_ |
12 #define WEBRTC_AUDIO_SEND_STREAM_H_ | 12 #define WEBRTC_AUDIO_SEND_STREAM_H_ |
13 | 13 |
14 #include <string> | 14 #include <string> |
15 #include <vector> | 15 #include <vector> |
16 | 16 |
17 #include "webrtc/base/scoped_ptr.h" | 17 #include "webrtc/base/scoped_ptr.h" |
18 #include "webrtc/config.h" | 18 #include "webrtc/config.h" |
19 #include "webrtc/modules/audio_coding/codecs/audio_encoder.h" | 19 #include "webrtc/modules/audio_coding/codecs/audio_encoder.h" |
20 #include "webrtc/stream.h" | 20 #include "webrtc/stream.h" |
| 21 #include "webrtc/transport.h" |
21 #include "webrtc/typedefs.h" | 22 #include "webrtc/typedefs.h" |
22 | 23 |
23 namespace webrtc { | 24 namespace webrtc { |
24 | 25 |
25 class AudioSendStream : public SendStream { | 26 class AudioSendStream : public SendStream { |
26 public: | 27 public: |
27 struct Stats {}; | 28 struct Stats {}; |
28 | 29 |
29 struct Config { | 30 struct Config { |
| 31 Config() = delete; |
| 32 explicit Config(newapi::Transport* send_transport) |
| 33 : send_transport(send_transport) {} |
| 34 |
30 std::string ToString() const; | 35 std::string ToString() const; |
31 | 36 |
32 // Receive-stream specific RTP settings. | 37 // Receive-stream specific RTP settings. |
33 struct Rtp { | 38 struct Rtp { |
34 std::string ToString() const; | 39 std::string ToString() const; |
35 | 40 |
36 // Sender SSRC. | 41 // Sender SSRC. |
37 uint32_t ssrc = 0; | 42 uint32_t ssrc = 0; |
38 | 43 |
39 // RTP header extensions used for the received stream. | 44 // RTP header extensions used for the received stream. |
40 std::vector<RtpExtension> extensions; | 45 std::vector<RtpExtension> extensions; |
41 } rtp; | 46 } rtp; |
42 | 47 |
| 48 // Transport for outgoing packets. |
| 49 newapi::Transport* send_transport = nullptr; |
| 50 |
43 rtc::scoped_ptr<AudioEncoder> encoder; | 51 rtc::scoped_ptr<AudioEncoder> encoder; |
44 int cng_payload_type = -1; // pt, or -1 to disable Comfort Noise Generator. | 52 int cng_payload_type = -1; // pt, or -1 to disable Comfort Noise Generator. |
45 int red_payload_type = -1; // pt, or -1 to disable REDundant coding. | 53 int red_payload_type = -1; // pt, or -1 to disable REDundant coding. |
46 }; | 54 }; |
47 | 55 |
48 virtual Stats GetStats() const = 0; | 56 virtual Stats GetStats() const = 0; |
49 }; | 57 }; |
50 } // namespace webrtc | 58 } // namespace webrtc |
51 | 59 |
52 #endif // WEBRTC_AUDIO_SEND_STREAM_H_ | 60 #endif // WEBRTC_AUDIO_SEND_STREAM_H_ |
OLD | NEW |