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

Unified Diff: webrtc/modules/audio_coding/include/audio_coding_module.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 side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/audio_coding/include/audio_coding_module.h
diff --git a/webrtc/modules/audio_coding/include/audio_coding_module.h b/webrtc/modules/audio_coding/include/audio_coding_module.h
index 305d8ea6d3c09acf2dc0f1098da7b0e37c86bdb2..381e35e639b27061cd83d986fe3b39f03603cdea 100644
--- a/webrtc/modules/audio_coding/include/audio_coding_module.h
+++ b/webrtc/modules/audio_coding/include/audio_coding_module.h
@@ -14,6 +14,7 @@
#include <string>
#include <vector>
+#include "webrtc/base/deprecation.h"
#include "webrtc/base/optional.h"
#include "webrtc/common_types.h"
#include "webrtc/modules/audio_coding/include/audio_coding_module_typedefs.h"
@@ -647,7 +648,6 @@ class AudioCodingModule {
//
virtual int LeastRequiredDelayMs() const = 0;
- ///////////////////////////////////////////////////////////////////////////
// int32_t PlayoutTimestamp()
// The send timestamp of an RTP packet is associated with the decoded
// audio of the packet in question. This function returns the timestamp of
@@ -660,8 +660,16 @@ class AudioCodingModule {
// 0 if the output is a correct timestamp.
// -1 if failed to output the correct timestamp.
//
- // TODO(tlegrand): Change function to return the timestamp.
- virtual int32_t PlayoutTimestamp(uint32_t* timestamp) = 0;
+ RTC_DEPRECATED virtual int32_t PlayoutTimestamp(uint32_t* timestamp) = 0;
+
+ ///////////////////////////////////////////////////////////////////////////
+ // int32_t PlayoutTimestamp()
+ // The send timestamp of an RTP packet is associated with the decoded
+ // audio of the packet in question. This function returns the timestamp of
+ // the latest audio obtained by calling PlayoutData10ms(), or empty if no
+ // valid timestamp is available.
+ //
+ virtual rtc::Optional<uint32_t> PlayoutTimestamp() = 0;
///////////////////////////////////////////////////////////////////////////
// int32_t PlayoutData10Ms(

Powered by Google App Engine
This is Rietveld 408576698