chromium/third_party/openscreen/src/cast/streaming/sender_packet_router.cc

// Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "cast/streaming/sender_packet_router.h"

#include <algorithm>
#include <utility>

#include "cast/streaming/impl/packet_util.h"
#include "cast/streaming/public/constants.h"
#include "platform/base/span.h"
#include "util/chrono_helpers.h"
#include "util/osp_logging.h"
#include "util/saturate_cast.h"
#include "util/stringprintf.h"

namespace openscreen::cast {

operator<<;

SenderPacketRouter::SenderPacketRouter(Environment& environment,
                                       int max_burst_bitrate)
    :{}

SenderPacketRouter::SenderPacketRouter(Environment& environment,
                                       int max_packets_per_burst,
                                       milliseconds burst_interval)
    :{}

SenderPacketRouter::~SenderPacketRouter() {}

void SenderPacketRouter::OnSenderCreated(Ssrc receiver_ssrc, Sender* sender) {}

void SenderPacketRouter::OnSenderDestroyed(Ssrc receiver_ssrc) {}

void SenderPacketRouter::RequestRtcpSend(Ssrc receiver_ssrc) {}

void SenderPacketRouter::RequestRtpSend(Ssrc receiver_ssrc) {}

void SenderPacketRouter::OnReceivedPacket(const IPEndpoint& source,
                                          Clock::time_point arrival_time,
                                          std::vector<uint8_t> packet) {}

SenderPacketRouter::SenderEntries::iterator SenderPacketRouter::FindEntry(
    Ssrc receiver_ssrc) {}

void SenderPacketRouter::ScheduleNextBurst() {}

void SenderPacketRouter::SendBurstOfPackets() {}

int SenderPacketRouter::SendJustTheRtcpPackets(Clock::time_point send_time) {}

int SenderPacketRouter::SendJustTheRtpPackets(Clock::time_point send_time,
                                              int num_packets_to_send) {}

namespace {
constexpr int kBitsPerByte =;
constexpr auto kOneSecondInMilliseconds =;
}  // namespace

// static
int SenderPacketRouter::ComputeMaxPacketsPerBurst(int max_burst_bitrate,
                                                  int packet_size,
                                                  milliseconds burst_interval) {}

// static
int SenderPacketRouter::ComputeMaxBurstBitrate(int packet_size,
                                               int max_packets_per_burst,
                                               milliseconds burst_interval) {}

SenderPacketRouter::Sender::~Sender() = default;

// static
constexpr int SenderPacketRouter::kDefaultMaxBurstBitrate;
// static
constexpr milliseconds SenderPacketRouter::kDefaultBurstInterval;
// static
constexpr Clock::time_point SenderPacketRouter::kNever;

}  // namespace openscreen::cast