chromium/third_party/blink/renderer/platform/exported/video_capture/web_video_capture_impl_manager.cc

// Copyright 2012 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// Implementation notes about interactions with VideoCaptureImpl.
//
// How is VideoCaptureImpl used:
//
// VideoCaptureImpl is an IO thread object while WebVideoCaptureImplManager
// lives only on the render thread. It is only possible to access an
// object of VideoCaptureImpl via a task on the IO thread.
//
// How is VideoCaptureImpl deleted:
//
// A task is posted to the IO thread to delete a VideoCaptureImpl.
// Immediately after that the pointer to it is dropped. This means no
// access to this VideoCaptureImpl object is possible on the render
// thread. Also note that VideoCaptureImpl does not post task to itself.
//

#include "third_party/blink/public/platform/modules/video_capture/web_video_capture_impl_manager.h"

#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "base/functional/callback_helpers.h"
#include "base/location.h"
#include "base/logging.h"
#include "base/ranges/algorithm.h"
#include "base/task/bind_post_task.h"
#include "base/task/single_thread_task_runner.h"
#include "base/token.h"
#include "media/capture/mojom/video_capture_types.mojom-blink.h"
#include "third_party/blink/public/platform/platform.h"
#include "third_party/blink/public/platform/web_string.h"
#include "third_party/blink/renderer/platform/scheduler/public/post_cross_thread_task.h"
#include "third_party/blink/renderer/platform/video_capture/video_capture_impl.h"
#include "third_party/blink/renderer/platform/wtf/cross_thread_copier_media.h"
#include "third_party/blink/renderer/platform/wtf/cross_thread_functional.h"
#include "third_party/blink/renderer/platform/wtf/text/wtf_string.h"

namespace blink {

media::VideoCaptureFormats ToVideoCaptureFormats(
    const Vector<media::VideoCaptureFormat>& format_vector) {}

void MediaCallbackCaller(VideoCaptureDeviceFormatsCB media_callback,
                         const Vector<media::VideoCaptureFormat>& formats) {}

struct WebVideoCaptureImplManager::DeviceEntry {};

WebVideoCaptureImplManager::WebVideoCaptureImplManager()
    :{}

WebVideoCaptureImplManager::~WebVideoCaptureImplManager() {}

base::OnceClosure WebVideoCaptureImplManager::UseDevice(
    const media::VideoCaptureSessionId& id,
    const BrowserInterfaceBrokerProxy& browser_interface_broker) {}

base::OnceClosure WebVideoCaptureImplManager::StartCapture(
    const media::VideoCaptureSessionId& id,
    const media::VideoCaptureParams& params,
    const VideoCaptureStateUpdateCB& state_update_cb,
    const VideoCaptureDeliverFrameCB& deliver_frame_cb,
    const VideoCaptureSubCaptureTargetVersionCB& sub_capture_target_version_cb,
    const VideoCaptureNotifyFrameDroppedCB& frame_dropped_cb) {}

void WebVideoCaptureImplManager::RequestRefreshFrame(
    const media::VideoCaptureSessionId& id) {}

void WebVideoCaptureImplManager::Suspend(
    const media::VideoCaptureSessionId& id) {}

void WebVideoCaptureImplManager::Resume(
    const media::VideoCaptureSessionId& id) {}

void WebVideoCaptureImplManager::GetDeviceSupportedFormats(
    const media::VideoCaptureSessionId& id,
    VideoCaptureDeviceFormatsCB callback) {}

void WebVideoCaptureImplManager::GetDeviceFormatsInUse(
    const media::VideoCaptureSessionId& id,
    VideoCaptureDeviceFormatsCB callback) {}

std::unique_ptr<VideoCaptureImpl>
WebVideoCaptureImplManager::CreateVideoCaptureImpl(
    const media::VideoCaptureSessionId& session_id,
    const BrowserInterfaceBrokerProxy& browser_interface_broker) const {}

void WebVideoCaptureImplManager::StopCapture(
    int client_id,
    const media::VideoCaptureSessionId& id) {}

void WebVideoCaptureImplManager::UnrefDevice(
    const media::VideoCaptureSessionId& id) {}

void WebVideoCaptureImplManager::SuspendDevices(
    const MediaStreamDevices& video_devices,
    bool suspend) {}

void WebVideoCaptureImplManager::OnLog(const media::VideoCaptureSessionId& id,
                                       const WebString& message) {}

VideoCaptureFeedbackCB WebVideoCaptureImplManager::GetFeedbackCallback(
    const media::VideoCaptureSessionId& id) const {}

// static
void WebVideoCaptureImplManager::ProcessFeedback(
    VideoCaptureFeedbackCB callback_to_io_thread,
    const media::VideoCaptureFeedback& feedback) {}

void WebVideoCaptureImplManager::ProcessFeedbackInternal(
    const media::VideoCaptureSessionId& id,
    const media::VideoCaptureFeedback& feedback) {}

}  // namespace blink