Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qplatformmediacapture.cpp
Go to the documentation of this file.
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
5
6#include <QtMultimedia/private/qmediacapturesession_p.h>
7#include <QtMultimedia/private/qplatformcamera_p.h>
8#include <QtMultimedia/private/qplatformsurfacecapture_p.h>
9#include <QtMultimedia/private/qplatformvideoframeinput_p.h>
10#include <QtMultimedia/private/qtmultimediaglobal_p.h>
11#include <QtMultimedia/qaudiodevice.h>
12#include <QtMultimedia/qaudioinput.h>
13#include <QtMultimedia/qmediacapturesession.h>
14
16
17QPlatformMediaCaptureSession::~QPlatformMediaCaptureSession() = default;
18
19std::vector<QPlatformVideoSource *> QPlatformMediaCaptureSession::activeVideoSources()
20{
21 std::vector<QPlatformVideoSource *> result;
22
23 auto checkSource = [&result](QPlatformVideoSource *source) {
24 if (source && source->isActive())
25 result.push_back(source);
26 };
27
28 checkSource(videoFrameInput());
29 checkSource(camera());
30 checkSource(screenCapture());
31 checkSource(windowCapture());
32
33 return result;
34}
35
36QT_END_NAMESPACE
37
38#include "moc_qplatformmediacapture_p.cpp"
Combined button and popup list for selecting options.