Phonon

experimental/objectdescription.cpp
1/* This file is part of the KDE project
2 * Copyright © 2010 Casian Andrei <skeletk13@gmail.com>
3 * Copyright © 2010 Harald Sitter <apachelogger@ubuntu.com>
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) version 3, or any
9 * later version accepted by the membership of KDE e.V. (or its
10 * successor approved by the membership of KDE e.V.), Nokia Corporation
11 * (or its successors, if any) and the KDE Free Qt Foundation, which shall
12 * act as a proxy defined in Section 6 of version 3 of the license.
13 *
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
18 *
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
21 *
22 */
23
24#include "objectdescription.h"
25
26namespace Phonon
27{
28
29namespace Experimental
30{
31
32#ifndef PHONON_NO_VIDEOCAPTURE
33
34VideoCaptureDevice phononVcdToExperimentalVcd(const Phonon::VideoCaptureDevice &vcd)
35{
37 const QList<QByteArray> &propertyNames = vcd.propertyNames();
38 int pi, pn = propertyNames.count();
39 for (pi = 0; pi < pn; ++ pi)
40 properties[propertyNames[pi]] = vcd.property(propertyNames[pi].constData());
41
42 return VideoCaptureDevice(vcd.index(), properties);
43}
44
46{
48 const QList<QByteArray> &propertyNames = vcd.propertyNames();
49 int pi, pn = propertyNames.count();
50 for (pi = 0; pi < pn; ++ pi)
51 properties[propertyNames[pi]] = vcd.property(propertyNames[pi].constData());
52
53 return Phonon::VideoCaptureDevice(vcd.index(), properties);
54}
55
56#endif // PHONON_NO_VIDEOCAPTURE
57
58} // Experimental namespace
59} // Phonon namespace
Provides a tuple of enduser visible name and description.
QList< QByteArray > propertyNames() const
Returns all names that return valid data when property() is called.
QVariant property(const char *name) const
Returns a named property.
int index() const
A unique identifier for this device/.
KGuiItem properties()
qsizetype count() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:58:26 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.