Deprecating AbsoluteCaptureTimeReceiver
Bug: chromium:1056230, webrtc:10739 Change-Id: I42b6a6f1c61eaaa468898a09bb7add30f0a419fb Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/223065 Reviewed-by: Danil Chapovalov <danilchap@webrtc.org> Commit-Queue: Minyue Li <minyue@webrtc.org> Cr-Commit-Position: refs/heads/master@{#34357}
This commit is contained in:

committed by
WebRTC LUCI CQ

parent
3f7b7170cc
commit
6e65f6a428
@ -140,8 +140,6 @@ rtc_library("rtp_rtcp") {
|
|||||||
"include/ulpfec_receiver.h",
|
"include/ulpfec_receiver.h",
|
||||||
"source/absolute_capture_time_interpolator.cc",
|
"source/absolute_capture_time_interpolator.cc",
|
||||||
"source/absolute_capture_time_interpolator.h",
|
"source/absolute_capture_time_interpolator.h",
|
||||||
"source/absolute_capture_time_receiver.cc", # DEPRECATED
|
|
||||||
"source/absolute_capture_time_receiver.h", # DEPRECATED
|
|
||||||
"source/absolute_capture_time_sender.cc",
|
"source/absolute_capture_time_sender.cc",
|
||||||
"source/absolute_capture_time_sender.h",
|
"source/absolute_capture_time_sender.h",
|
||||||
"source/active_decode_targets_helper.cc",
|
"source/active_decode_targets_helper.cc",
|
||||||
|
@ -1,41 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2019 The WebRTC project authors. All Rights Reserved.
|
|
||||||
*
|
|
||||||
* Use of this source code is governed by a BSD-style license
|
|
||||||
* that can be found in the LICENSE file in the root of the source
|
|
||||||
* tree. An additional intellectual property rights grant can be found
|
|
||||||
* in the file PATENTS. All contributing project authors may
|
|
||||||
* be found in the AUTHORS file in the root of the source tree.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "modules/rtp_rtcp/source/absolute_capture_time_receiver.h"
|
|
||||||
|
|
||||||
namespace webrtc {
|
|
||||||
|
|
||||||
AbsoluteCaptureTimeReceiver::AbsoluteCaptureTimeReceiver(Clock* clock)
|
|
||||||
: AbsoluteCaptureTimeInterpolator(clock) {}
|
|
||||||
|
|
||||||
void AbsoluteCaptureTimeReceiver::SetRemoteToLocalClockOffset(
|
|
||||||
absl::optional<int64_t> value_q32x32) {
|
|
||||||
capture_clock_offset_updater_.SetRemoteToLocalClockOffset(value_q32x32);
|
|
||||||
}
|
|
||||||
|
|
||||||
absl::optional<AbsoluteCaptureTime>
|
|
||||||
AbsoluteCaptureTimeReceiver::OnReceivePacket(
|
|
||||||
uint32_t source,
|
|
||||||
uint32_t rtp_timestamp,
|
|
||||||
uint32_t rtp_clock_frequency,
|
|
||||||
const absl::optional<AbsoluteCaptureTime>& received_extension) {
|
|
||||||
auto extension = AbsoluteCaptureTimeInterpolator::OnReceivePacket(
|
|
||||||
source, rtp_timestamp, rtp_clock_frequency, received_extension);
|
|
||||||
|
|
||||||
if (extension.has_value()) {
|
|
||||||
extension->estimated_capture_clock_offset =
|
|
||||||
capture_clock_offset_updater_.AdjustEstimatedCaptureClockOffset(
|
|
||||||
extension->estimated_capture_clock_offset);
|
|
||||||
}
|
|
||||||
|
|
||||||
return extension;
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace webrtc
|
|
@ -1,39 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2019 The WebRTC project authors. All Rights Reserved.
|
|
||||||
*
|
|
||||||
* Use of this source code is governed by a BSD-style license
|
|
||||||
* that can be found in the LICENSE file in the root of the source
|
|
||||||
* tree. An additional intellectual property rights grant can be found
|
|
||||||
* in the file PATENTS. All contributing project authors may
|
|
||||||
* be found in the AUTHORS file in the root of the source tree.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef MODULES_RTP_RTCP_SOURCE_ABSOLUTE_CAPTURE_TIME_RECEIVER_H_
|
|
||||||
#define MODULES_RTP_RTCP_SOURCE_ABSOLUTE_CAPTURE_TIME_RECEIVER_H_
|
|
||||||
|
|
||||||
#include "modules/rtp_rtcp/source/absolute_capture_time_interpolator.h"
|
|
||||||
#include "modules/rtp_rtcp/source/capture_clock_offset_updater.h"
|
|
||||||
#include "system_wrappers/include/clock.h"
|
|
||||||
|
|
||||||
namespace webrtc {
|
|
||||||
|
|
||||||
// DEPRECATED. Use `AbsoluteCaptureTimeInterpolator` instead.
|
|
||||||
class AbsoluteCaptureTimeReceiver : public AbsoluteCaptureTimeInterpolator {
|
|
||||||
public:
|
|
||||||
explicit AbsoluteCaptureTimeReceiver(Clock* clock);
|
|
||||||
|
|
||||||
absl::optional<AbsoluteCaptureTime> OnReceivePacket(
|
|
||||||
uint32_t source,
|
|
||||||
uint32_t rtp_timestamp,
|
|
||||||
uint32_t rtp_clock_frequency,
|
|
||||||
const absl::optional<AbsoluteCaptureTime>& received_extension);
|
|
||||||
|
|
||||||
void SetRemoteToLocalClockOffset(absl::optional<int64_t> value_q32x32);
|
|
||||||
|
|
||||||
private:
|
|
||||||
CaptureClockOffsetUpdater capture_clock_offset_updater_;
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace webrtc
|
|
||||||
|
|
||||||
#endif // MODULES_RTP_RTCP_SOURCE_ABSOLUTE_CAPTURE_TIME_RECEIVER_H_
|
|
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
#include <limits>
|
#include <limits>
|
||||||
|
|
||||||
#include "modules/rtp_rtcp/source/absolute_capture_time_receiver.h"
|
#include "modules/rtp_rtcp/source/absolute_capture_time_interpolator.h"
|
||||||
#include "system_wrappers/include/ntp_time.h"
|
#include "system_wrappers/include/ntp_time.h"
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
@ -26,7 +26,7 @@ constexpr TimeDelta AbsoluteCaptureTimeSender::kInterpolationMaxInterval;
|
|||||||
constexpr TimeDelta AbsoluteCaptureTimeSender::kInterpolationMaxError;
|
constexpr TimeDelta AbsoluteCaptureTimeSender::kInterpolationMaxError;
|
||||||
|
|
||||||
static_assert(
|
static_assert(
|
||||||
AbsoluteCaptureTimeReceiver::kInterpolationMaxInterval >=
|
AbsoluteCaptureTimeInterpolator::kInterpolationMaxInterval >=
|
||||||
AbsoluteCaptureTimeSender::kInterpolationMaxInterval,
|
AbsoluteCaptureTimeSender::kInterpolationMaxInterval,
|
||||||
"Receivers should be as willing to interpolate timestamps as senders.");
|
"Receivers should be as willing to interpolate timestamps as senders.");
|
||||||
|
|
||||||
@ -36,7 +36,7 @@ AbsoluteCaptureTimeSender::AbsoluteCaptureTimeSender(Clock* clock)
|
|||||||
uint32_t AbsoluteCaptureTimeSender::GetSource(
|
uint32_t AbsoluteCaptureTimeSender::GetSource(
|
||||||
uint32_t ssrc,
|
uint32_t ssrc,
|
||||||
rtc::ArrayView<const uint32_t> csrcs) {
|
rtc::ArrayView<const uint32_t> csrcs) {
|
||||||
return AbsoluteCaptureTimeReceiver::GetSource(ssrc, csrcs);
|
return AbsoluteCaptureTimeInterpolator::GetSource(ssrc, csrcs);
|
||||||
}
|
}
|
||||||
|
|
||||||
absl::optional<AbsoluteCaptureTime> AbsoluteCaptureTimeSender::OnSendPacket(
|
absl::optional<AbsoluteCaptureTime> AbsoluteCaptureTimeSender::OnSendPacket(
|
||||||
@ -108,7 +108,7 @@ bool AbsoluteCaptureTimeSender::ShouldSendExtension(
|
|||||||
|
|
||||||
// Should if interpolation would introduce too much error.
|
// Should if interpolation would introduce too much error.
|
||||||
const uint64_t interpolated_absolute_capture_timestamp =
|
const uint64_t interpolated_absolute_capture_timestamp =
|
||||||
AbsoluteCaptureTimeReceiver::InterpolateAbsoluteCaptureTimestamp(
|
AbsoluteCaptureTimeInterpolator::InterpolateAbsoluteCaptureTimestamp(
|
||||||
rtp_timestamp, rtp_clock_frequency, last_rtp_timestamp_,
|
rtp_timestamp, rtp_clock_frequency, last_rtp_timestamp_,
|
||||||
last_absolute_capture_timestamp_);
|
last_absolute_capture_timestamp_);
|
||||||
const int64_t interpolation_error_ms = UQ32x32ToInt64Ms(std::min(
|
const int64_t interpolation_error_ms = UQ32x32ToInt64Ms(std::min(
|
||||||
|
Reference in New Issue
Block a user