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

Side by Side Diff: webrtc/audio_send_stream.h

Issue 1924793002: Remove webrtc/stream.h and unutilized inheritance. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: re-rebase Created 4 years, 7 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 | « webrtc/audio_receive_stream.h ('k') | webrtc/common_types.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_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 <memory> 14 #include <memory>
15 #include <string> 15 #include <string>
16 #include <vector> 16 #include <vector>
17 17
18 #include "webrtc/base/scoped_ptr.h" 18 #include "webrtc/base/scoped_ptr.h"
19 #include "webrtc/config.h" 19 #include "webrtc/config.h"
20 #include "webrtc/modules/audio_coding/codecs/audio_encoder.h" 20 #include "webrtc/modules/audio_coding/codecs/audio_encoder.h"
21 #include "webrtc/stream.h"
22 #include "webrtc/transport.h" 21 #include "webrtc/transport.h"
23 #include "webrtc/typedefs.h" 22 #include "webrtc/typedefs.h"
24 23
25 namespace webrtc { 24 namespace webrtc {
26 25
27 // WORK IN PROGRESS 26 // WORK IN PROGRESS
28 // This class is under development and is not yet intended for for use outside 27 // This class is under development and is not yet intended for for use outside
29 // of WebRtc/Libjingle. Please use the VoiceEngine API instead. 28 // of WebRtc/Libjingle. Please use the VoiceEngine API instead.
30 // See: https://bugs.chromium.org/p/webrtc/issues/detail?id=4690 29 // See: https://bugs.chromium.org/p/webrtc/issues/detail?id=4690
31 30
32 class AudioSendStream : public SendStream { 31 class AudioSendStream {
33 public: 32 public:
34 struct Stats { 33 struct Stats {
35 // TODO(solenberg): Harmonize naming and defaults with receive stream stats. 34 // TODO(solenberg): Harmonize naming and defaults with receive stream stats.
36 uint32_t local_ssrc = 0; 35 uint32_t local_ssrc = 0;
37 int64_t bytes_sent = 0; 36 int64_t bytes_sent = 0;
38 int32_t packets_sent = 0; 37 int32_t packets_sent = 0;
39 int32_t packets_lost = -1; 38 int32_t packets_lost = -1;
40 float fraction_lost = -1.0f; 39 float fraction_lost = -1.0f;
41 std::string codec_name; 40 std::string codec_name;
42 int32_t ext_seqnum = -1; 41 int32_t ext_seqnum = -1;
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 int voe_channel_id = -1; 82 int voe_channel_id = -1;
84 83
85 // Ownership of the encoder object is transferred to Call when the config is 84 // Ownership of the encoder object is transferred to Call when the config is
86 // passed to Call::CreateAudioSendStream(). 85 // passed to Call::CreateAudioSendStream().
87 // TODO(solenberg): Implement, once we configure codecs through the new API. 86 // TODO(solenberg): Implement, once we configure codecs through the new API.
88 // std::unique_ptr<AudioEncoder> encoder; 87 // std::unique_ptr<AudioEncoder> encoder;
89 int cng_payload_type = -1; // pt, or -1 to disable Comfort Noise Generator. 88 int cng_payload_type = -1; // pt, or -1 to disable Comfort Noise Generator.
90 int red_payload_type = -1; // pt, or -1 to disable REDundant coding. 89 int red_payload_type = -1; // pt, or -1 to disable REDundant coding.
91 }; 90 };
92 91
92 // Starts stream activity.
93 // When a stream is active, it can receive, process and deliver packets.
94 virtual void Start() = 0;
95 // Stops stream activity.
96 // When a stream is stopped, it can't receive, process or deliver packets.
97 virtual void Stop() = 0;
98
93 // TODO(solenberg): Make payload_type a config property instead. 99 // TODO(solenberg): Make payload_type a config property instead.
94 virtual bool SendTelephoneEvent(int payload_type, int event, 100 virtual bool SendTelephoneEvent(int payload_type, int event,
95 int duration_ms) = 0; 101 int duration_ms) = 0;
96 virtual Stats GetStats() const = 0; 102 virtual Stats GetStats() const = 0;
103
104 protected:
105 virtual ~AudioSendStream() {}
97 }; 106 };
98 } // namespace webrtc 107 } // namespace webrtc
99 108
100 #endif // WEBRTC_AUDIO_SEND_STREAM_H_ 109 #endif // WEBRTC_AUDIO_SEND_STREAM_H_
OLDNEW
« no previous file with comments | « webrtc/audio_receive_stream.h ('k') | webrtc/common_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698