Delete rtc::PacketTime (was an alias for int64_t)

Followup to https://webrtc-review.googlesource.com/c/91860.

Bug: webrtc:9584
Change-Id: Icadf73d6c275ef32167357fc33b3c08158fa096f
Reviewed-on: https://webrtc-review.googlesource.com/c/114545
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26109}
This commit is contained in:
Niels Möller
2018-12-17 12:35:30 +01:00
committed by Commit Bot
parent c98c8a0a9d
commit 29e13fd2ca
5 changed files with 10 additions and 20 deletions

View File

@ -77,8 +77,8 @@ class NetworkPacket {
absl::optional<PacketOptions> packet_options_;
bool is_rtcp_;
// If using a PacketReceiver for incoming degradation, populate with
// appropriate MediaType and PacketTime. This type/timing will be kept and
// forwarded. The PacketTime might be altered to reflect time spent in fake
// appropriate MediaType and packet time. This type/timing will be kept and
// forwarded. The packet time might be altered to reflect time spent in fake
// network pipe.
MediaType media_type_;
absl::optional<int64_t> packet_time_us_;
@ -124,8 +124,8 @@ class FakeNetworkPipe : public webrtc::SimulatedPacketReceiverInterface,
// Implements the PacketReceiver interface. When/if packets are delivered,
// they will be passed directly to the receiver instance given in
// SetReceiver(), without passing through a Demuxer. The receive time in
// PacketTime will be increased by the amount of time the packet spent in the
// SetReceiver(), without passing through a Demuxer. The receive time
// will be increased by the amount of time the packet spent in the
// fake network pipe.
PacketReceiver::DeliveryStatus DeliverPacket(MediaType media_type,
rtc::CopyOnWriteBuffer packet,

View File

@ -7042,7 +7042,7 @@ TEST_F(WebRtcVideoChannelTestWithClock, GetSources) {
EXPECT_TRUE(SetDefaultCodec());
EXPECT_TRUE(SetSend(true));
EXPECT_EQ(0, renderer_.num_rendered_frames());
channel_->OnPacketReceived(&packet1, rtc::PacketTime());
channel_->OnPacketReceived(&packet1, /*packet_time_us=*/-1);
std::vector<webrtc::RtpSource> sources = channel_->GetSources(kSsrc);
EXPECT_EQ(1u, sources.size());
@ -7052,7 +7052,7 @@ TEST_F(WebRtcVideoChannelTestWithClock, GetSources) {
// a new packet.
int64_t timeDeltaMs = 1;
fake_clock_.AdvanceTime(webrtc::TimeDelta::ms(timeDeltaMs));
channel_->OnPacketReceived(&packet1, rtc::PacketTime());
channel_->OnPacketReceived(&packet1, /*packet_time_us=*/-1);
int64_t timestamp2 = channel_->GetSources(kSsrc)[0].timestamp_ms();
EXPECT_EQ(timestamp2, timestamp1 + timeDeltaMs);
@ -7077,7 +7077,7 @@ TEST_F(WebRtcVideoChannelTestWithClock, GetContributingSources) {
EXPECT_TRUE(SetDefaultCodec());
EXPECT_TRUE(SetSend(true));
EXPECT_EQ(0, renderer_.num_rendered_frames());
channel_->OnPacketReceived(&packet1, rtc::PacketTime());
channel_->OnPacketReceived(&packet1, /*packet_time_us=*/-1);
{
ASSERT_EQ(2u, channel_->GetSources(kSsrc).size());
@ -7106,7 +7106,7 @@ TEST_F(WebRtcVideoChannelTestWithClock, GetContributingSources) {
int64_t timeDeltaMs = 1;
fake_clock_.AdvanceTime(webrtc::TimeDelta::ms(timeDeltaMs));
channel_->OnPacketReceived(&packet2, rtc::PacketTime());
channel_->OnPacketReceived(&packet2, /*packet_time_us=*/-1);
{
ASSERT_EQ(2u, channel_->GetSources(kSsrc).size());

View File

@ -460,10 +460,8 @@ bool BaseChannel::SendPacket(bool rtcp,
}
void BaseChannel::OnRtpPacket(const webrtc::RtpPacketReceived& parsed_packet) {
// Reconstruct the PacketTime from the |parsed_packet|.
// RtpPacketReceived.arrival_time_ms = (PacketTime + 500) / 1000;
// Note: The |not_before| field is always 0 here. This field is not currently
// used, so it should be fine.
// Take packet time from the |parsed_packet|.
// RtpPacketReceived.arrival_time_ms = (timestamp_us + 500) / 1000;
int64_t timestamp_us = -1;
if (parsed_packet.arrival_time_ms() > 0) {
timestamp_us = parsed_packet.arrival_time_ms() * 1000;

View File

@ -862,9 +862,6 @@ rtc_static_library("rtc_base") {
defines = []
deps = [
":checks",
# For deprecation of rtc::PacketTime, in asyncpacketsocket.h.
":deprecation",
":stringutils",
"..:webrtc_common",
"../api:array_view",

View File

@ -12,7 +12,6 @@
#define RTC_BASE_ASYNCPACKETSOCKET_H_
#include "rtc_base/constructormagic.h"
#include "rtc_base/deprecation.h"
#include "rtc_base/dscp.h"
#include "rtc_base/network/sent_packet.h"
#include "rtc_base/socket.h"
@ -52,10 +51,6 @@ struct PacketOptions {
PacketInfo info_signaled_after_sent;
};
// TODO(bugs.webrtc.org/9584): Compatibility alias, delete as soon as downstream
// code is updated.
typedef int64_t PacketTime;
// Provides the ability to receive packets asynchronously. Sends are not
// buffered since it is acceptable to drop packets under high load.
class AsyncPacketSocket : public sigslot::has_slots<> {