QtGStreamer  0.10.2
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator
plugin.cpp
00001 /*
00002     Copyright (C) 2012 Collabora Ltd. <info@collabora.com>
00003       @author George Kiagiadakis <george.kiagiadakis@collabora.com>
00004 
00005     This library is free software; you can redistribute it and/or modify
00006     it under the terms of the GNU Lesser General Public License as published
00007     by the Free Software Foundation; either version 2.1 of the License, or
00008     (at your option) any later version.
00009 
00010     This program is distributed in the hope that it will be useful,
00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013     GNU Lesser General Public License for more details.
00014 
00015     You should have received a copy of the GNU Lesser General Public License
00016     along with this program.  If not, see <http://www.gnu.org/licenses/>.
00017 */
00018 #include "videoitem.h"
00019 #include <QtDeclarative/QDeclarativeExtensionPlugin>
00020 
00021 class QtGStreamerPlugin : public QDeclarativeExtensionPlugin
00022 {
00023     Q_OBJECT
00024 public:
00025     void registerTypes(const char *uri);
00026 };
00027 
00028 void QtGStreamerPlugin::registerTypes(const char *uri)
00029 {
00030     qmlRegisterType<VideoItem>(uri, 0, 10, "VideoItem");
00031     qmlRegisterUncreatableType<QGst::Ui::GraphicsVideoSurface>(uri, 0, 10, "GraphicsVideoSurface",
00032         QLatin1String("Creating a QGst::Ui::GraphicsVideoSurface from QML is not supported"));
00033 }
00034 
00035 Q_EXPORT_PLUGIN2(qtgstPlugin, QtGStreamerPlugin)
00036 
00037 #include "plugin.moc"