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

Side by Side Diff: webrtc/modules/audio_coding/neteq/include/neteq.h

Issue 1853183002: Change NetEq::GetPlayoutTimestamp to return an rtc::Optional<uint32_t> (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Adding back the old PlayoutTimestamp method, now DEPRECATED Created 4 years, 8 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 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_MODULES_AUDIO_CODING_NETEQ_INCLUDE_NETEQ_H_ 11 #ifndef WEBRTC_MODULES_AUDIO_CODING_NETEQ_INCLUDE_NETEQ_H_
12 #define WEBRTC_MODULES_AUDIO_CODING_NETEQ_INCLUDE_NETEQ_H_ 12 #define WEBRTC_MODULES_AUDIO_CODING_NETEQ_INCLUDE_NETEQ_H_
13 13
14 #include <string.h> // Provide access to size_t. 14 #include <string.h> // Provide access to size_t.
15 15
16 #include <string> 16 #include <string>
17 17
18 #include "webrtc/base/constructormagic.h" 18 #include "webrtc/base/constructormagic.h"
19 #include "webrtc/base/optional.h"
19 #include "webrtc/common_types.h" 20 #include "webrtc/common_types.h"
20 #include "webrtc/modules/audio_coding/neteq/audio_decoder_impl.h" 21 #include "webrtc/modules/audio_coding/neteq/audio_decoder_impl.h"
21 #include "webrtc/typedefs.h" 22 #include "webrtc/typedefs.h"
22 23
23 namespace webrtc { 24 namespace webrtc {
24 25
25 // Forward declarations. 26 // Forward declarations.
26 class AudioFrame; 27 class AudioFrame;
27 struct WebRtcRTPHeader; 28 struct WebRtcRTPHeader;
28 29
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 // Same as RtcpStatistics(), but does not reset anything. 237 // Same as RtcpStatistics(), but does not reset anything.
237 virtual void GetRtcpStatisticsNoReset(RtcpStatistics* stats) = 0; 238 virtual void GetRtcpStatisticsNoReset(RtcpStatistics* stats) = 0;
238 239
239 // Enables post-decode VAD. When enabled, GetAudio() will return 240 // Enables post-decode VAD. When enabled, GetAudio() will return
240 // kOutputVADPassive when the signal contains no speech. 241 // kOutputVADPassive when the signal contains no speech.
241 virtual void EnableVad() = 0; 242 virtual void EnableVad() = 0;
242 243
243 // Disables post-decode VAD. 244 // Disables post-decode VAD.
244 virtual void DisableVad() = 0; 245 virtual void DisableVad() = 0;
245 246
246 // Gets the RTP timestamp for the last sample delivered by GetAudio(). 247 // Returns the RTP timestamp for the last sample delivered by GetAudio().
247 // Returns true if the RTP timestamp is valid, otherwise false. 248 // The return value will be empty if no valid timestamp is available.
248 virtual bool GetPlayoutTimestamp(uint32_t* timestamp) = 0; 249 virtual rtc::Optional<uint32_t> GetPlayoutTimestamp() = 0;
249 250
250 // Returns the sample rate in Hz of the audio produced in the last GetAudio 251 // Returns the sample rate in Hz of the audio produced in the last GetAudio
251 // call. If GetAudio has not been called yet, the configured sample rate 252 // call. If GetAudio has not been called yet, the configured sample rate
252 // (Config::sample_rate_hz) is returned. 253 // (Config::sample_rate_hz) is returned.
253 virtual int last_output_sample_rate_hz() const = 0; 254 virtual int last_output_sample_rate_hz() const = 0;
254 255
255 // Not implemented. 256 // Not implemented.
256 virtual int SetTargetNumberOfChannels() = 0; 257 virtual int SetTargetNumberOfChannels() = 0;
257 258
258 // Not implemented. 259 // Not implemented.
(...skipping 29 matching lines...) Expand all
288 289
289 protected: 290 protected:
290 NetEq() {} 291 NetEq() {}
291 292
292 private: 293 private:
293 RTC_DISALLOW_COPY_AND_ASSIGN(NetEq); 294 RTC_DISALLOW_COPY_AND_ASSIGN(NetEq);
294 }; 295 };
295 296
296 } // namespace webrtc 297 } // namespace webrtc
297 #endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_INCLUDE_NETEQ_H_ 298 #endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_INCLUDE_NETEQ_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698