mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-13 13:50:40 +01:00
Deprecate old names for EncodedImage::RtpTimestamp accessor and setter
Replace remaining webrtc usage of the deprecated names. Bug: webrtc:9378 Change-Id: Ie5bd2d3eaf68316e7c827fc35c7c7d8e2eadeb9f Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/321584 Reviewed-by: Harald Alvestrand <hta@webrtc.org> Auto-Submit: Danil Chapovalov <danilchap@webrtc.org> Commit-Queue: Harald Alvestrand <hta@webrtc.org> Cr-Commit-Position: refs/heads/main@{#40824}
This commit is contained in:
parent
f97058e9ed
commit
2d508f10d3
7 changed files with 15 additions and 13 deletions
|
@ -83,9 +83,11 @@ class RTC_EXPORT EncodedImage {
|
|||
void SetRtpTimestamp(uint32_t timestamp) { timestamp_rtp_ = timestamp; }
|
||||
uint32_t RtpTimestamp() const { return timestamp_rtp_; }
|
||||
|
||||
// TODO(bugs.webrtc.org/9378): Delete two functions below.
|
||||
void SetTimestamp(uint32_t timestamp) { SetRtpTimestamp(timestamp); }
|
||||
uint32_t Timestamp() const { return RtpTimestamp(); }
|
||||
// TODO(bugs.webrtc.org/9378): Delete two functions below after 2023-10-12
|
||||
[[deprecated]] void SetTimestamp(uint32_t timestamp) {
|
||||
SetRtpTimestamp(timestamp);
|
||||
}
|
||||
[[deprecated]] uint32_t Timestamp() const { return RtpTimestamp(); }
|
||||
|
||||
void SetEncodeTime(int64_t encode_start_ms, int64_t encode_finish_ms);
|
||||
|
||||
|
|
|
@ -46,17 +46,17 @@ class RTC_EXPORT VCMEncodedFrame : public EncodedImage {
|
|||
using EncodedImage::GetEncodedData;
|
||||
using EncodedImage::NtpTimeMs;
|
||||
using EncodedImage::PacketInfos;
|
||||
using EncodedImage::RtpTimestamp;
|
||||
using EncodedImage::set_size;
|
||||
using EncodedImage::SetColorSpace;
|
||||
using EncodedImage::SetEncodedData;
|
||||
using EncodedImage::SetPacketInfos;
|
||||
using EncodedImage::SetRtpTimestamp;
|
||||
using EncodedImage::SetSpatialIndex;
|
||||
using EncodedImage::SetSpatialLayerFrameSize;
|
||||
using EncodedImage::SetTimestamp;
|
||||
using EncodedImage::size;
|
||||
using EncodedImage::SpatialIndex;
|
||||
using EncodedImage::SpatialLayerFrameSize;
|
||||
using EncodedImage::Timestamp;
|
||||
|
||||
/**
|
||||
* Get render time in milliseconds
|
||||
|
|
|
@ -108,7 +108,7 @@ TEST_F(GenericDecoderTest, FrameDroppedIfTooManyFramesInFlight) {
|
|||
decoder_.SetDelayedDecoding(10);
|
||||
for (int i = 0; i < kMaxFramesInFlight + 1; ++i) {
|
||||
EncodedFrame encoded_frame;
|
||||
encoded_frame.SetTimestamp(90000 * i);
|
||||
encoded_frame.SetRtpTimestamp(90000 * i);
|
||||
generic_decoder_.Decode(encoded_frame, clock_->CurrentTime());
|
||||
}
|
||||
|
||||
|
|
|
@ -100,12 +100,12 @@ int32_t VideoDecoderWrapper::Decode(const EncodedImage& image_param,
|
|||
EncodedImage input_image(image_param);
|
||||
// We use RTP timestamp for capture time because capture_time_ms_ is always 0.
|
||||
input_image.capture_time_ms_ =
|
||||
input_image.Timestamp() / kNumRtpTicksPerMillisec;
|
||||
input_image.RtpTimestamp() / kNumRtpTicksPerMillisec;
|
||||
|
||||
FrameExtraInfo frame_extra_info;
|
||||
frame_extra_info.timestamp_ns =
|
||||
input_image.capture_time_ms_ * rtc::kNumNanosecsPerMillisec;
|
||||
frame_extra_info.timestamp_rtp = input_image.Timestamp();
|
||||
frame_extra_info.timestamp_rtp = input_image.RtpTimestamp();
|
||||
frame_extra_info.timestamp_ntp = input_image.ntp_time_ms_;
|
||||
frame_extra_info.qp =
|
||||
qp_parsing_enabled_ ? ParseQP(input_image) : absl::nullopt;
|
||||
|
|
|
@ -305,7 +305,7 @@ void VideoEncoderWrapper::OnEncodedFrame(
|
|||
// CopyOnWriteBuffer.
|
||||
EncodedImage frame_copy = frame;
|
||||
|
||||
frame_copy.SetTimestamp(frame_extra_info.timestamp_rtp);
|
||||
frame_copy.SetRtpTimestamp(frame_extra_info.timestamp_rtp);
|
||||
frame_copy.capture_time_ms_ = capture_time_ns / rtc::kNumNanosecsPerMillisec;
|
||||
|
||||
if (frame_copy.qp_ < 0)
|
||||
|
|
|
@ -83,7 +83,7 @@ class ObjCEncodedImageBuffer : public webrtc::EncodedImageBufferInterface {
|
|||
freeWhenDone:NO];
|
||||
self.encodedWidth = rtc::dchecked_cast<int32_t>(encodedImage._encodedWidth);
|
||||
self.encodedHeight = rtc::dchecked_cast<int32_t>(encodedImage._encodedHeight);
|
||||
self.timeStamp = encodedImage.Timestamp();
|
||||
self.timeStamp = encodedImage.RtpTimestamp();
|
||||
self.captureTimeMs = encodedImage.capture_time_ms_;
|
||||
self.ntpTimeMs = encodedImage.ntp_time_ms_;
|
||||
self.flags = encodedImage.timing_.flags;
|
||||
|
@ -111,7 +111,7 @@ class ObjCEncodedImageBuffer : public webrtc::EncodedImageBufferInterface {
|
|||
encodedImage.set_size(self.buffer.length);
|
||||
encodedImage._encodedWidth = rtc::dchecked_cast<uint32_t>(self.encodedWidth);
|
||||
encodedImage._encodedHeight = rtc::dchecked_cast<uint32_t>(self.encodedHeight);
|
||||
encodedImage.SetTimestamp(self.timeStamp);
|
||||
encodedImage.SetRtpTimestamp(self.timeStamp);
|
||||
encodedImage.capture_time_ms_ = self.captureTimeMs;
|
||||
encodedImage.ntp_time_ms_ = self.ntpTimeMs;
|
||||
encodedImage.timing_.flags = self.flags;
|
||||
|
|
|
@ -252,7 +252,7 @@ EncodedImageCallback::Result QualityAnalyzingVideoEncoder::OnEncodedImage(
|
|||
std::pair<uint32_t, uint16_t> timestamp_frame_id;
|
||||
while (!timestamp_to_frame_id_list_.empty()) {
|
||||
timestamp_frame_id = timestamp_to_frame_id_list_.front();
|
||||
if (timestamp_frame_id.first == encoded_image.Timestamp()) {
|
||||
if (timestamp_frame_id.first == encoded_image.RtpTimestamp()) {
|
||||
break;
|
||||
}
|
||||
timestamp_to_frame_id_list_.pop_front();
|
||||
|
@ -271,7 +271,7 @@ EncodedImageCallback::Result QualityAnalyzingVideoEncoder::OnEncodedImage(
|
|||
// posting frame to it, but then call the callback for this frame.
|
||||
RTC_LOG(LS_ERROR) << "QualityAnalyzingVideoEncoder::OnEncodedImage: No "
|
||||
"frame id for encoded_image.Timestamp()="
|
||||
<< encoded_image.Timestamp();
|
||||
<< encoded_image.RtpTimestamp();
|
||||
return EncodedImageCallback::Result(
|
||||
EncodedImageCallback::Result::Error::OK);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue