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_RECEIVE_STREAM_H_ | 11 #ifndef WEBRTC_AUDIO_RECEIVE_STREAM_H_ |
12 #define WEBRTC_AUDIO_RECEIVE_STREAM_H_ | 12 #define WEBRTC_AUDIO_RECEIVE_STREAM_H_ |
13 | 13 |
14 #include <map> | 14 #include <map> |
15 #include <string> | 15 #include <string> |
16 #include <vector> | 16 #include <vector> |
17 | 17 |
18 #include "webrtc/config.h" | 18 #include "webrtc/config.h" |
19 #include "webrtc/stream.h" | 19 #include "webrtc/stream.h" |
| 20 #include "webrtc/transport.h" |
20 #include "webrtc/typedefs.h" | 21 #include "webrtc/typedefs.h" |
21 | 22 |
22 namespace webrtc { | 23 namespace webrtc { |
23 | 24 |
24 class AudioDecoder; | 25 class AudioDecoder; |
25 | 26 |
26 class AudioReceiveStream : public ReceiveStream { | 27 class AudioReceiveStream : public ReceiveStream { |
27 public: | 28 public: |
28 struct Stats {}; | 29 struct Stats {}; |
29 | 30 |
30 struct Config { | 31 struct Config { |
31 std::string ToString() const; | 32 std::string ToString() const; |
32 | 33 |
33 // Receive-stream specific RTP settings. | 34 // Receive-stream specific RTP settings. |
34 struct Rtp { | 35 struct Rtp { |
35 std::string ToString() const; | 36 std::string ToString() const; |
36 | 37 |
37 // Synchronization source (stream identifier) to be received. | 38 // Synchronization source (stream identifier) to be received. |
38 uint32_t remote_ssrc = 0; | 39 uint32_t remote_ssrc = 0; |
39 | 40 |
40 // Sender SSRC used for sending RTCP (such as receiver reports). | 41 // Sender SSRC used for sending RTCP (such as receiver reports). |
41 uint32_t local_ssrc = 0; | 42 uint32_t local_ssrc = 0; |
42 | 43 |
43 // RTP header extensions used for the received stream. | 44 // RTP header extensions used for the received stream. |
44 std::vector<RtpExtension> extensions; | 45 std::vector<RtpExtension> extensions; |
45 } rtp; | 46 } rtp; |
46 | 47 |
47 // Underlying VoiceEngine handle, used to map AudioReceiveStream to | 48 Transport* receive_transport = nullptr; |
48 // lower-level components. Temporarily used while VoiceEngine channels are | 49 Transport* rtcp_send_transport = nullptr; |
49 // created outside of Call. | 50 |
| 51 // Underlying VoiceEngine handle, used to map AudioReceiveStream to lower- |
| 52 // level components. |
| 53 // TODO(solenberg): Remove when VoiceEngine channels are created outside |
| 54 // of Call. |
50 int voe_channel_id = -1; | 55 int voe_channel_id = -1; |
51 | 56 |
52 // Identifier for an A/V synchronization group. Empty string to disable. | 57 // Identifier for an A/V synchronization group. Empty string to disable. |
53 // TODO(pbos): Synchronize streams in a sync group, not just one video | 58 // TODO(pbos): Synchronize streams in a sync group, not just one video |
54 // stream to one audio stream. Tracked by issue webrtc:4762. | 59 // stream to one audio stream. Tracked by issue webrtc:4762. |
55 std::string sync_group; | 60 std::string sync_group; |
56 | 61 |
57 // Decoders for every payload that we can receive. Call owns the | 62 // Decoders for every payload that we can receive. Call owns the |
58 // AudioDecoder instances once the Config is submitted to | 63 // AudioDecoder instances once the Config is submitted to |
59 // Call::CreateReceiveStream(). | 64 // Call::CreateReceiveStream(). |
60 // TODO(solenberg): Use unique_ptr<> once our std lib fully supports C++11. | 65 // TODO(solenberg): Use unique_ptr<> once our std lib fully supports C++11. |
61 std::map<uint8_t, AudioDecoder*> decoder_map; | 66 std::map<uint8_t, AudioDecoder*> decoder_map; |
62 | 67 |
63 // TODO(pbos): Remove config option once combined A/V BWE is always on. | 68 // TODO(pbos): Remove config option once combined A/V BWE is always on. |
64 bool combined_audio_video_bwe = false; | 69 bool combined_audio_video_bwe = false; |
65 }; | 70 }; |
66 | 71 |
67 virtual Stats GetStats() const = 0; | 72 virtual Stats GetStats() const = 0; |
68 }; | 73 }; |
69 } // namespace webrtc | 74 } // namespace webrtc |
70 | 75 |
71 #endif // WEBRTC_AUDIO_RECEIVE_STREAM_H_ | 76 #endif // WEBRTC_AUDIO_RECEIVE_STREAM_H_ |
OLD | NEW |