1// Copyright (C) 2021 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#include <qtmultimediaglobal_p.h>
5#include "qplatformmediacapture_p.h"
6#include "qaudiodevice.h"
7#include "qaudioinput.h"
8#include "qplatformcamera_p.h"
9#include "qplatformsurfacecapture_p.h"
10
11QT_BEGIN_NAMESPACE
12
13QPlatformMediaCaptureSession::~QPlatformMediaCaptureSession() = default;
14
15std::vector<QPlatformVideoSource *> QPlatformMediaCaptureSession::activeVideoSources()
16{
17 std::vector<QPlatformVideoSource *> result;
18
19 auto checkSource = [&result](QPlatformVideoSource *source) {
20 if (source && source->isActive())
21 result.push_back(x: source);
22 };
23
24 checkSource(camera());
25 checkSource(screenCapture());
26 checkSource(windowCapture());
27
28 return result;
29}
30
31QT_END_NAMESPACE
32
33#include "moc_qplatformmediacapture_p.cpp"
34

source code of qtmultimedia/src/multimedia/platform/qplatformmediacapture.cpp