chromium/components/cast_streaming/browser/frame/stream_consumer.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.

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

#include "components/cast_streaming/browser/frame/stream_consumer.h"

#include <algorithm>

#include "base/containers/span.h"
#include "base/logging.h"
#include "base/numerics/safe_conversions.h"
#include "base/task/sequenced_task_runner.h"
#include "components/cast_streaming/browser/common/decoder_buffer_factory.h"
#include "components/cast_streaming/common/public/features.h"
#include "media/base/media_util.h"
#include "media/mojo/common/media_type_converters.h"
#include "third_party/openscreen/src/platform/base/span.h"

namespace cast_streaming {

StreamConsumer::BufferDataWrapper::~BufferDataWrapper() = default;

base::span<uint8_t> StreamConsumer::BufferDataWrapper::Get() {}

base::span<uint8_t> StreamConsumer::BufferDataWrapper::Consume(
    uint32_t max_size) {}

bool StreamConsumer::BufferDataWrapper::Reset(uint32_t new_size) {}

void StreamConsumer::BufferDataWrapper::Clear() {}

uint32_t StreamConsumer::BufferDataWrapper::Size() const {}

StreamConsumer::StreamConsumer(
    openscreen::cast::Receiver* receiver,
    mojo::ScopedDataPipeProducerHandle data_pipe,
    FrameReceivedCB frame_received_cb,
    base::RepeatingClosure on_new_frame,
    std::unique_ptr<DecoderBufferFactory> decoder_buffer_factory)
    :{}

// NOTE: Do NOT call into |receiver_| methods here, as the object may no longer
// be valid at time of this object's destruction.
StreamConsumer::~StreamConsumer() = default;

void StreamConsumer::ReadFrame(base::OnceClosure no_frames_available_cb) {}

void StreamConsumer::CloseDataPipeOnError() {}

void StreamConsumer::OnPipeWritable(MojoResult result) {}

void StreamConsumer::OnFramesReady(int next_frame_buffer_size) {}

void StreamConsumer::FlushUntil(uint32_t frame_id) {}

void StreamConsumer::MaybeSendNextFrame() {}

}  // namespace cast_streaming