chromium/media/capture/video/mock_device_factory.cc

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

#include "media/capture/video/mock_device_factory.h"

#include <utility>

#include "base/memory/raw_ptr.h"

namespace {

// Report a single hard-coded supported format to clients.
media::VideoCaptureFormat kSupportedFormat(gfx::Size(640, 480),
                                           25.0f,
                                           media::PIXEL_FORMAT_I420);

// Wraps a raw pointer to a media::VideoCaptureDevice and allows us to
// create a std::unique_ptr<media::VideoCaptureDevice> that delegates to it.
class RawPointerVideoCaptureDevice : public media::VideoCaptureDevice {};

}  // anonymous namespace

namespace media {

MockDeviceFactory::MockDeviceFactory() = default;

MockDeviceFactory::~MockDeviceFactory() = default;

void MockDeviceFactory::AddMockDevice(
    media::VideoCaptureDevice* device,
    const media::VideoCaptureDeviceDescriptor& descriptor) {}

void MockDeviceFactory::RemoveAllDevices() {}

VideoCaptureErrorOrDevice MockDeviceFactory::CreateDevice(
    const media::VideoCaptureDeviceDescriptor& device_descriptor) {}

void MockDeviceFactory::GetDevicesInfo(GetDevicesInfoCallback callback) {}

}  // namespace media