diff options
author | Christian Strømme <christian.stromme@qt.io> | 2016-11-09 14:46:41 +0100 |
---|---|---|
committer | Christian Stromme <christian.stromme@qt.io> | 2016-11-15 11:11:01 +0000 |
commit | afaeb309ec801b13bc960a44cfb7f8e054366238 (patch) | |
tree | b3a6195b9421eb1d90719fba732ab88739d78134 | |
parent | 6de666a5b623aa5fe950fc10fb3db62453346ba8 (diff) |
DirectShow: Add generic logging category for the DirectShow plugin
Change-Id: I38cee48cc85baa5ad5e42e03f8cb05eab1287566
Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
-rw-r--r-- | src/plugins/directshow/dsserviceplugin.cpp | 3 | ||||
-rw-r--r-- | src/plugins/directshow/helpers/directshowglobal.h | 7 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/plugins/directshow/dsserviceplugin.cpp b/src/plugins/directshow/dsserviceplugin.cpp index 6f31ce7e2..1c9d0eee1 100644 --- a/src/plugins/directshow/dsserviceplugin.cpp +++ b/src/plugins/directshow/dsserviceplugin.cpp @@ -43,6 +43,7 @@ #include <QtCore/qdebug.h> #include <QtCore/QFile> +#include "directshowglobal.h" #include "dsserviceplugin.h" #ifdef QMEDIA_DIRECTSHOW_CAMERA @@ -79,6 +80,8 @@ extern const CLSID CLSID_VideoInputDeviceCategory; QT_USE_NAMESPACE +Q_LOGGING_CATEGORY(qtDirectShowPlugin, "qt.multimedia.plugins.directshow") + static int g_refCount = 0; void addRefCount() { diff --git a/src/plugins/directshow/helpers/directshowglobal.h b/src/plugins/directshow/helpers/directshowglobal.h index f7890c52b..1447bff16 100644 --- a/src/plugins/directshow/helpers/directshowglobal.h +++ b/src/plugins/directshow/helpers/directshowglobal.h @@ -43,6 +43,13 @@ #include <dshow.h> #include <QtCore/qglobal.h> +#include <QtCore/qloggingcategory.h> + +QT_BEGIN_NAMESPACE + +Q_DECLARE_LOGGING_CATEGORY(qtDirectShowPlugin) + +QT_END_NAMESPACE template <typename T> T *com_cast(IUnknown *unknown, const IID &iid) { |