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

Side by Side Diff: webrtc/audio_receive_stream.h

Issue 1226123005: Define Stream base classes (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Code review follow-up 3 Created 5 years, 5 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 unified diff | Download patch
« no previous file with comments | « talk/media/webrtc/webrtcvideoengine2_unittest.cc ('k') | webrtc/audio_send_stream.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/typedefs.h" 20 #include "webrtc/typedefs.h"
20 21
21 namespace webrtc { 22 namespace webrtc {
22 23
23 class AudioDecoder; 24 class AudioDecoder;
24 25
25 class AudioReceiveStream { 26 class AudioReceiveStream : public ReceiveStream {
26 public: 27 public:
27 struct Stats {}; 28 struct Stats {};
28 29
29 struct Config { 30 struct Config {
30 std::string ToString() const; 31 std::string ToString() const;
31 32
32 // Receive-stream specific RTP settings. 33 // Receive-stream specific RTP settings.
33 struct Rtp { 34 struct Rtp {
34 std::string ToString() const; 35 std::string ToString() const;
35 36
36 // Synchronization source (stream identifier) to be received. 37 // Synchronization source (stream identifier) to be received.
37 uint32_t remote_ssrc = 0; 38 uint32_t remote_ssrc = 0;
38 39
39 // Sender SSRC used for sending RTCP (such as receiver reports). 40 // Sender SSRC used for sending RTCP (such as receiver reports).
40 uint32_t local_ssrc = 0; 41 uint32_t local_ssrc = 0;
41 42
42 // RTP header extensions used for the received stream. 43 // RTP header extensions used for the received stream.
43 std::vector<RtpExtension> extensions; 44 std::vector<RtpExtension> extensions;
44 } rtp; 45 } rtp;
45 46
46 // Decoders for every payload that we can receive. Call owns the 47 // Decoders for every payload that we can receive. Call owns the
47 // AudioDecoder instances once the Config is submitted to 48 // AudioDecoder instances once the Config is submitted to
48 // Call::CreateReceiveStream(). 49 // Call::CreateReceiveStream().
49 // TODO(solenberg): Use unique_ptr<> once our std lib fully supports C++11. 50 // TODO(solenberg): Use unique_ptr<> once our std lib fully supports C++11.
50 std::map<uint8_t, AudioDecoder*> decoder_map; 51 std::map<uint8_t, AudioDecoder*> decoder_map;
51 }; 52 };
52 53
53 virtual Stats GetStats() const = 0; 54 virtual Stats GetStats() const = 0;
54
55 protected:
56 virtual ~AudioReceiveStream() {}
57 }; 55 };
58 } // namespace webrtc 56 } // namespace webrtc
59 57
60 #endif // WEBRTC_AUDIO_RECEIVE_STREAM_H_ 58 #endif // WEBRTC_AUDIO_RECEIVE_STREAM_H_
OLDNEW
« no previous file with comments | « talk/media/webrtc/webrtcvideoengine2_unittest.cc ('k') | webrtc/audio_send_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698