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

Side by Side 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 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_INCLUDE_AUDIO_CODING_MODULE_H_ 11 #ifndef WEBRTC_MODULES_AUDIO_CODING_INCLUDE_AUDIO_CODING_MODULE_H_
12 #define WEBRTC_MODULES_AUDIO_CODING_INCLUDE_AUDIO_CODING_MODULE_H_ 12 #define WEBRTC_MODULES_AUDIO_CODING_INCLUDE_AUDIO_CODING_MODULE_H_
13 13
14 #include <string> 14 #include <string>
15 #include <vector> 15 #include <vector>
16 16
17 #include "webrtc/base/deprecation.h"
17 #include "webrtc/base/optional.h" 18 #include "webrtc/base/optional.h"
18 #include "webrtc/common_types.h" 19 #include "webrtc/common_types.h"
19 #include "webrtc/modules/audio_coding/include/audio_coding_module_typedefs.h" 20 #include "webrtc/modules/audio_coding/include/audio_coding_module_typedefs.h"
20 #include "webrtc/modules/audio_coding/neteq/include/neteq.h" 21 #include "webrtc/modules/audio_coding/neteq/include/neteq.h"
21 #include "webrtc/modules/include/module.h" 22 #include "webrtc/modules/include/module.h"
22 #include "webrtc/system_wrappers/include/clock.h" 23 #include "webrtc/system_wrappers/include/clock.h"
23 #include "webrtc/typedefs.h" 24 #include "webrtc/typedefs.h"
24 25
25 namespace webrtc { 26 namespace webrtc {
26 27
(...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after
640 virtual int SetMaximumPlayoutDelay(int time_ms) = 0; 641 virtual int SetMaximumPlayoutDelay(int time_ms) = 0;
641 642
642 // 643 //
643 // The shortest latency, in milliseconds, required by jitter buffer. This 644 // The shortest latency, in milliseconds, required by jitter buffer. This
644 // is computed based on inter-arrival times and playout mode of NetEq. The 645 // is computed based on inter-arrival times and playout mode of NetEq. The
645 // actual delay is the maximum of least-required-delay and the minimum-delay 646 // actual delay is the maximum of least-required-delay and the minimum-delay
646 // specified by SetMinumumPlayoutDelay() API. 647 // specified by SetMinumumPlayoutDelay() API.
647 // 648 //
648 virtual int LeastRequiredDelayMs() const = 0; 649 virtual int LeastRequiredDelayMs() const = 0;
649 650
650 ///////////////////////////////////////////////////////////////////////////
651 // int32_t PlayoutTimestamp() 651 // int32_t PlayoutTimestamp()
652 // The send timestamp of an RTP packet is associated with the decoded 652 // The send timestamp of an RTP packet is associated with the decoded
653 // audio of the packet in question. This function returns the timestamp of 653 // audio of the packet in question. This function returns the timestamp of
654 // the latest audio obtained by calling PlayoutData10ms(). 654 // the latest audio obtained by calling PlayoutData10ms().
655 // 655 //
656 // Input: 656 // Input:
657 // -timestamp : a reference to a uint32_t to receive the 657 // -timestamp : a reference to a uint32_t to receive the
658 // timestamp. 658 // timestamp.
659 // Return value: 659 // Return value:
660 // 0 if the output is a correct timestamp. 660 // 0 if the output is a correct timestamp.
661 // -1 if failed to output the correct timestamp. 661 // -1 if failed to output the correct timestamp.
662 // 662 //
663 // TODO(tlegrand): Change function to return the timestamp. 663 RTC_DEPRECATED virtual int32_t PlayoutTimestamp(uint32_t* timestamp) = 0;
664 virtual int32_t PlayoutTimestamp(uint32_t* timestamp) = 0; 664
665 ///////////////////////////////////////////////////////////////////////////
666 // int32_t PlayoutTimestamp()
667 // The send timestamp of an RTP packet is associated with the decoded
668 // audio of the packet in question. This function returns the timestamp of
669 // the latest audio obtained by calling PlayoutData10ms(), or empty if no
670 // valid timestamp is available.
671 //
672 virtual rtc::Optional<uint32_t> PlayoutTimestamp() = 0;
665 673
666 /////////////////////////////////////////////////////////////////////////// 674 ///////////////////////////////////////////////////////////////////////////
667 // int32_t PlayoutData10Ms( 675 // int32_t PlayoutData10Ms(
668 // Get 10 milliseconds of raw audio data for playout, at the given sampling 676 // Get 10 milliseconds of raw audio data for playout, at the given sampling
669 // frequency. ACM will perform a resampling if required. 677 // frequency. ACM will perform a resampling if required.
670 // 678 //
671 // Input: 679 // Input:
672 // -desired_freq_hz : the desired sampling frequency, in Hertz, of the 680 // -desired_freq_hz : the desired sampling frequency, in Hertz, of the
673 // output audio. If set to -1, the function returns 681 // output audio. If set to -1, the function returns
674 // the audio at the current sampling frequency. 682 // the audio at the current sampling frequency.
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
790 virtual std::vector<uint16_t> GetNackList( 798 virtual std::vector<uint16_t> GetNackList(
791 int64_t round_trip_time_ms) const = 0; 799 int64_t round_trip_time_ms) const = 0;
792 800
793 virtual void GetDecodingCallStatistics( 801 virtual void GetDecodingCallStatistics(
794 AudioDecodingCallStats* call_stats) const = 0; 802 AudioDecodingCallStats* call_stats) const = 0;
795 }; 803 };
796 804
797 } // namespace webrtc 805 } // namespace webrtc
798 806
799 #endif // WEBRTC_MODULES_AUDIO_CODING_INCLUDE_AUDIO_CODING_MODULE_H_ 807 #endif // WEBRTC_MODULES_AUDIO_CODING_INCLUDE_AUDIO_CODING_MODULE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698