chromium/media/cast/sender/openscreen_frame_sender.cc

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

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/40285824): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "media/cast/sender/openscreen_frame_sender.h"

#include <algorithm>
#include <limits>
#include <memory>
#include <utility>
#include <vector>

#include "base/feature_list.h"
#include "base/functional/bind.h"
#include "base/logging.h"
#include "base/numerics/safe_conversions.h"
#include "base/trace_event/trace_event.h"
#include "media/base/media_switches.h"
#include "media/cast/common/openscreen_conversion_helpers.h"
#include "media/cast/common/sender_encoded_frame.h"
#include "media/cast/constants.h"
#include "third_party/openscreen/src/cast/streaming/encoded_frame.h"

namespace media::cast {
namespace {

// The additional number of frames that can be in-flight when input exceeds the
// maximum frame rate.
static constexpr int kMaxFrameBurst =;

EnqueueFrameResult;
CastStreamingFrameDropReason ToFrameDropReason(EnqueueFrameResult result) {}

}  // namespace

std::unique_ptr<FrameSender> FrameSender::Create(
    scoped_refptr<CastEnvironment> cast_environment,
    const FrameSenderConfig& config,
    std::unique_ptr<openscreen::cast::Sender> sender,
    Client& client,
    FrameSender::GetSuggestedVideoBitrateCB get_bitrate_cb) {}

// Convenience macro used in logging statements throughout this file.
#define VLOG_WITH_SSRC(N)

OpenscreenFrameSender::OpenscreenFrameSender(
    scoped_refptr<CastEnvironment> cast_environment,
    const FrameSenderConfig& config,
    std::unique_ptr<openscreen::cast::Sender> sender,
    Client& client,
    FrameSender::GetSuggestedVideoBitrateCB get_bitrate_cb)
    :{}

OpenscreenFrameSender::~OpenscreenFrameSender() {}

bool OpenscreenFrameSender::NeedsKeyFrame() const {}

void OpenscreenFrameSender::SetTargetPlayoutDelay(
    base::TimeDelta new_target_playout_delay) {}

base::TimeDelta OpenscreenFrameSender::GetTargetPlayoutDelay() const {}

void OpenscreenFrameSender::OnFrameCanceled(
    openscreen::cast::FrameId frame_id) {}

void OpenscreenFrameSender::OnPictureLost() {}

void OpenscreenFrameSender::RecordLatestFrameTimestamps(
    FrameId frame_id,
    base::TimeTicks reference_time,
    RtpTimeTicks rtp_timestamp) {}

base::TimeDelta OpenscreenFrameSender::GetInFlightMediaDuration() const {}

RtpTimeTicks OpenscreenFrameSender::GetRecordedRtpTimestamp(
    FrameId frame_id) const {}

int OpenscreenFrameSender::GetUnacknowledgedFrameCount() const {}

int OpenscreenFrameSender::GetSuggestedBitrate(base::TimeTicks playout_time,
                                               base::TimeDelta playout_delay) {}

double OpenscreenFrameSender::MaxFrameRate() const {}

void OpenscreenFrameSender::SetMaxFrameRate(double max_frame_rate) {}

base::TimeDelta OpenscreenFrameSender::TargetPlayoutDelay() const {}

base::TimeDelta OpenscreenFrameSender::CurrentRoundTripTime() const {}

base::TimeTicks OpenscreenFrameSender::LastSendTime() const {}

FrameId OpenscreenFrameSender::LastAckedFrameId() const {}

base::TimeDelta OpenscreenFrameSender::GetAllowedInFlightMediaDuration() const {}

CastStreamingFrameDropReason OpenscreenFrameSender::EnqueueFrame(
    std::unique_ptr<SenderEncodedFrame> encoded_frame) {}

CastStreamingFrameDropReason OpenscreenFrameSender::ShouldDropNextFrame(
    base::TimeDelta frame_duration) {}

void OpenscreenFrameSender::RecordShouldDropNextFrame(bool should_drop) {}
}  // namespace media::cast