Delete RtpVideoStreamReceiver methods GetRtpReceiver and rtp_rtcp
Replaced by new method GetSyncInfo. Bug: webrtc:7135 Change-Id: I541567a5ca173dc334fd85e83f15b25a3120b8aa Reviewed-on: https://webrtc-review.googlesource.com/91123 Commit-Queue: Niels Moller <nisse@webrtc.org> Reviewed-by: Erik Språng <sprang@webrtc.org> Cr-Commit-Position: refs/heads/master@{#24148}
This commit is contained in:
@ -175,8 +175,22 @@ bool RtpVideoStreamReceiver::AddReceiveCodec(
|
||||
return rtp_payload_registry_.RegisterReceivePayload(video_codec) == 0;
|
||||
}
|
||||
|
||||
RtpReceiver* RtpVideoStreamReceiver::GetRtpReceiver() const {
|
||||
return rtp_receiver_.get();
|
||||
absl::optional<Syncable::Info> RtpVideoStreamReceiver::GetSyncInfo() const {
|
||||
Syncable::Info info;
|
||||
|
||||
if (!rtp_receiver_->GetLatestTimestamps(
|
||||
&info.latest_received_capture_timestamp,
|
||||
&info.latest_receive_time_ms)) {
|
||||
return absl::nullopt;
|
||||
}
|
||||
if (rtp_rtcp_->RemoteNTP(&info.capture_time_ntp_secs,
|
||||
&info.capture_time_ntp_frac, nullptr, nullptr,
|
||||
&info.capture_time_source_clock) != 0) {
|
||||
return absl::nullopt;
|
||||
}
|
||||
|
||||
// Leaves info.current_delay_ms uninitialized.
|
||||
return info;
|
||||
}
|
||||
|
||||
int32_t RtpVideoStreamReceiver::OnReceivedPayloadData(
|
||||
|
@ -18,6 +18,7 @@
|
||||
#include <vector>
|
||||
|
||||
#include "call/rtp_packet_sink_interface.h"
|
||||
#include "call/syncable.h"
|
||||
#include "call/video_receive_stream.h"
|
||||
#include "modules/include/module_common_types.h"
|
||||
#include "modules/rtp_rtcp/include/receive_statistics.h"
|
||||
@ -75,12 +76,13 @@ class RtpVideoStreamReceiver : public RtpData,
|
||||
|
||||
bool AddReceiveCodec(const VideoCodec& video_codec,
|
||||
const std::map<std::string, std::string>& codec_params);
|
||||
RtpReceiver* GetRtpReceiver() const;
|
||||
RtpRtcp* rtp_rtcp() const { return rtp_rtcp_.get(); }
|
||||
|
||||
void StartReceive();
|
||||
void StopReceive();
|
||||
|
||||
// Produces the transport-related timestamps; current_delay_ms is left unset.
|
||||
absl::optional<Syncable::Info> GetSyncInfo() const;
|
||||
|
||||
bool DeliverRtcp(const uint8_t* rtcp_packet, size_t rtcp_packet_length);
|
||||
|
||||
void FrameContinuous(int64_t seq_num);
|
||||
|
@ -371,24 +371,13 @@ int VideoReceiveStream::id() const {
|
||||
|
||||
absl::optional<Syncable::Info> VideoReceiveStream::GetInfo() const {
|
||||
RTC_DCHECK_CALLED_SEQUENTIALLY(&module_process_sequence_checker_);
|
||||
Syncable::Info info;
|
||||
absl::optional<Syncable::Info> info =
|
||||
rtp_video_stream_receiver_.GetSyncInfo();
|
||||
|
||||
RtpReceiver* rtp_receiver = rtp_video_stream_receiver_.GetRtpReceiver();
|
||||
RTC_DCHECK(rtp_receiver);
|
||||
if (!rtp_receiver->GetLatestTimestamps(
|
||||
&info.latest_received_capture_timestamp,
|
||||
&info.latest_receive_time_ms))
|
||||
if (!info)
|
||||
return absl::nullopt;
|
||||
|
||||
RtpRtcp* rtp_rtcp = rtp_video_stream_receiver_.rtp_rtcp();
|
||||
RTC_DCHECK(rtp_rtcp);
|
||||
if (rtp_rtcp->RemoteNTP(&info.capture_time_ntp_secs,
|
||||
&info.capture_time_ntp_frac, nullptr, nullptr,
|
||||
&info.capture_time_source_clock) != 0) {
|
||||
return absl::nullopt;
|
||||
}
|
||||
|
||||
info.current_delay_ms = video_receiver_.Delay();
|
||||
info->current_delay_ms = video_receiver_.Delay();
|
||||
return info;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user