| 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 |
| 48 Transport* receive_transport = nullptr; |
| 49 Transport* rtcp_send_transport = nullptr; |
| 50 |
| 47 // Underlying VoiceEngine handle, used to map AudioReceiveStream to | 51 // Underlying VoiceEngine handle, used to map AudioReceiveStream to |
| 48 // lower-level components. Temporarily used while VoiceEngine channels are | 52 // lower-level components. Temporarily used while VoiceEngine channels are |
| 49 // created outside of Call. | 53 // created outside of Call. |
| 50 int voe_channel_id = -1; | 54 int voe_channel_id = -1; |
| 51 | 55 |
| 52 // Identifier for an A/V synchronization group. Empty string to disable. | 56 // Identifier for an A/V synchronization group. Empty string to disable. |
| 53 // TODO(pbos): Synchronize streams in a sync group, not just one video | 57 // TODO(pbos): Synchronize streams in a sync group, not just one video |
| 54 // stream to one audio stream. Tracked by issue webrtc:4762. | 58 // stream to one audio stream. Tracked by issue webrtc:4762. |
| 55 std::string sync_group; | 59 std::string sync_group; |
| 56 | 60 |
| 57 // Decoders for every payload that we can receive. Call owns the | 61 // Decoders for every payload that we can receive. Call owns the |
| 58 // AudioDecoder instances once the Config is submitted to | 62 // AudioDecoder instances once the Config is submitted to |
| 59 // Call::CreateReceiveStream(). | 63 // Call::CreateReceiveStream(). |
| 60 // TODO(solenberg): Use unique_ptr<> once our std lib fully supports C++11. | 64 // TODO(solenberg): Use unique_ptr<> once our std lib fully supports C++11. |
| 61 std::map<uint8_t, AudioDecoder*> decoder_map; | 65 std::map<uint8_t, AudioDecoder*> decoder_map; |
| 62 | 66 |
| 63 // TODO(pbos): Remove config option once combined A/V BWE is always on. | 67 // TODO(pbos): Remove config option once combined A/V BWE is always on. |
| 64 bool combined_audio_video_bwe = false; | 68 bool combined_audio_video_bwe = false; |
| 65 }; | 69 }; |
| 66 | 70 |
| 67 virtual Stats GetStats() const = 0; | 71 virtual Stats GetStats() const = 0; |
| 68 }; | 72 }; |
| 69 } // namespace webrtc | 73 } // namespace webrtc |
| 70 | 74 |
| 71 #endif // WEBRTC_AUDIO_RECEIVE_STREAM_H_ | 75 #endif // WEBRTC_AUDIO_RECEIVE_STREAM_H_ |
| OLD | NEW |