/****************************************************************************** QtAV: Media play library based on Qt and FFmpeg Copyright (C) 2012-2016 Wang Bin * This file is part of QtAV (from 2013) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ******************************************************************************/ #include #include #include "QmlAV/QQuickItemRenderer.h" #include "QmlAV/QmlAVPlayer.h" #include "QmlAV/QuickSubtitle.h" #include "QmlAV/QuickSubtitleItem.h" #include "QmlAV/MediaMetaData.h" #include "QmlAV/QuickVideoPreview.h" #if QT_VERSION >= QT_VERSION_CHECK(5, 2, 0) #include "QmlAV/QuickFBORenderer.h" #endif namespace QtAV { class QtAVQmlPlugin : public QQmlExtensionPlugin { Q_OBJECT Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface") public: void registerTypes(const char *uri) { Q_ASSERT(QLatin1String(uri) == QLatin1String("QtAV")); qmlRegisterType(uri, 1, 3, "VideoOutput"); qmlRegisterType(uri, 1, 3, "AVPlayer"); qmlRegisterType(uri, 1, 3, "MediaPlayer"); qmlRegisterType(uri, 1, 4, "Subtitle"); qmlRegisterType(uri, 1, 4, "SubtitleItem"); qmlRegisterType(uri, 1, 4, "VideoPreview"); #if QT_VERSION >= QT_VERSION_CHECK(5, 2, 0) qmlRegisterType(uri, 1, 5, "VideoOutput2"); #endif qmlRegisterUncreatableType(uri, 1, 6, "VideoCapture", trUtf8("VideoCapture is provided by MediaPlayer")); qmlRegisterType(); } }; } //namespace QtAV #include "plugin.moc"