chromium/media/cast/sender/openscreen_frame_sender.h

// 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.

#ifndef MEDIA_CAST_SENDER_OPENSCREEN_FRAME_SENDER_H_
#define MEDIA_CAST_SENDER_OPENSCREEN_FRAME_SENDER_H_

#include <stdint.h>

#include <optional>

#include "base/containers/flat_map.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/raw_ref.h"
#include "base/memory/scoped_refptr.h"
#include "base/memory/weak_ptr.h"
#include "base/time/time.h"
#include "media/cast/cast_config.h"
#include "media/cast/cast_environment.h"
#include "media/cast/sender/frame_sender.h"
#include "media/cast/sender/video_bitrate_suggester.h"
#include "third_party/openscreen/src/cast/streaming/sender.h"

namespace media::cast {

struct SenderEncodedFrame;

// This is the Open Screen implementation of the FrameSender API. It wraps
// an openscreen::cast::Sender object and provides some basic functionality
// that is shared between the AudioSender, VideoSender, and RemotingSender
// classes.
//
// For more information, see the Cast Streaming README.md located at:
// https://source.chromium.org/chromium/chromium/src/+/main:third_party/openscreen/src/cast/streaming/README.md
//
// NOTE: This class mostly exists to wrap an openscreen::cast::Sender, implement
// frame dropping logic, and support type translation between Chrome and Open
// Screen.  See if it can be removed by migrating functionality into
// openscreen::cast::Sender.
//
// TODO(issues.chromium.org/329781397): Remove unnecessary wrapper objects in
// Chrome's implementation of the Cast sender.
class OpenscreenFrameSender : public FrameSender,
                              openscreen::cast::Sender::Observer {};

}  // namespace media::cast

#endif  // MEDIA_CAST_SENDER_OPENSCREEN_FRAME_SENDER_H_