File indexing completed on 2024-05-05 04:44:41
0001 /* This file is part of the KDE project 0002 * Copyright © 2010 Casian Andrei <skeletk13@gmail.com> 0003 * Copyright © 2010 Harald Sitter <apachelogger@ubuntu.com> 0004 * 0005 * This library is free software; you can redistribute it and/or 0006 * modify it under the terms of the GNU Lesser General Public 0007 * License as published by the Free Software Foundation; either 0008 * version 2.1 of the License, or (at your option) version 3, or any 0009 * later version accepted by the membership of KDE e.V. (or its 0010 * successor approved by the membership of KDE e.V.), Nokia Corporation 0011 * (or its successors, if any) and the KDE Free Qt Foundation, which shall 0012 * act as a proxy defined in Section 6 of version 3 of the license. 0013 * 0014 * This library is distributed in the hope that it will be useful, 0015 * but WITHOUT ANY WARRANTY; without even the implied warranty of 0016 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0017 * Lesser General Public License for more details. 0018 * 0019 * You should have received a copy of the GNU Lesser General Public 0020 * License along with this library. If not, see <http://www.gnu.org/licenses/>. 0021 * 0022 */ 0023 0024 #include "objectdescription.h" 0025 0026 namespace Phonon 0027 { 0028 0029 namespace Experimental 0030 { 0031 0032 #ifndef PHONON_NO_VIDEOCAPTURE 0033 0034 VideoCaptureDevice phononVcdToExperimentalVcd(const Phonon::VideoCaptureDevice &vcd) 0035 { 0036 QHash<QByteArray, QVariant> properties; 0037 const QList<QByteArray> &propertyNames = vcd.propertyNames(); 0038 int pi, pn = propertyNames.count(); 0039 for (pi = 0; pi < pn; ++ pi) 0040 properties[propertyNames[pi]] = vcd.property(propertyNames[pi].constData()); 0041 0042 return VideoCaptureDevice(vcd.index(), properties); 0043 } 0044 0045 Phonon::VideoCaptureDevice phononExperimentalVcdToVcd(const Phonon::Experimental::VideoCaptureDevice &vcd) 0046 { 0047 QHash<QByteArray, QVariant> properties; 0048 const QList<QByteArray> &propertyNames = vcd.propertyNames(); 0049 int pi, pn = propertyNames.count(); 0050 for (pi = 0; pi < pn; ++ pi) 0051 properties[propertyNames[pi]] = vcd.property(propertyNames[pi].constData()); 0052 0053 return Phonon::VideoCaptureDevice(vcd.index(), properties); 0054 } 0055 0056 #endif // PHONON_NO_VIDEOCAPTURE 0057 0058 } // Experimental namespace 0059 } // Phonon namespace