diff options
author | George Kiagiadakis <george.kiagiadakis@collabora.co.uk> | 2011-01-08 19:11:43 +0200 |
---|---|---|
committer | George Kiagiadakis <george.kiagiadakis@collabora.co.uk> | 2011-01-08 19:11:43 +0200 |
commit | e324fb1b604a9c7f8440644205dac651a4b07264 (patch) | |
tree | 75321a17f30f7d7ce26e7ae7845358bffd4d366a | |
parent | e641f9d118f36249dfdcd7932effb6f363a6a926 (diff) |
Declare the exported and non-exported symbols of the libraries.
48 files changed, 256 insertions, 172 deletions
diff --git a/codegen/analyzer.l b/codegen/analyzer.l index 2a06b40..3ea81cb 100644 --- a/codegen/analyzer.l +++ b/codegen/analyzer.l @@ -46,7 +46,7 @@ id [a-zA-Z][a-zA-Z_0-9]* <REGISTER_TYPE,REGISTER_WRAPPER,ENUM,INSTRUCTION>{id} { yylval.Id = new QByteArray(yytext); return IDENTIFIER; } -QGLIB_REGISTER_TYPE\( { yy_push_state(REGISTER_TYPE); return REGISTER_TYPE_BEGIN; } +Q[A-Z]+_REGISTER_TYPE\( { yy_push_state(REGISTER_TYPE); return REGISTER_TYPE_BEGIN; } <REGISTER_TYPE>{ :: { return SCOPE_RESOLUTION_OPERATOR; } \) { yy_pop_state(); return REGISTER_TYPE_END; } @@ -113,6 +113,7 @@ Q[A-Z]+_WRAPPER_FAKE_SUBCLASS\( { yy_push_state(REGISTER_WRAPPER); return R [[:space:]]class { yy_push_state(CLASS); return CLASS_KEYWORD; } <CLASS>{ + [A-Z]+_EXPORT {id} { yylval.Id = new QByteArray(yytext); yy_pop_state(); return IDENTIFIER; } [[:space:]]* . { yyerror(codegen, "Expected identifier after class keyword"); } diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 6a81f3e..d804693 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -7,6 +7,9 @@ if (QTGSTREAMER_STATIC) set(SHARED_OR_STATIC "STATIC") else() set(SHARED_OR_STATIC "SHARED") + if (CMAKE_COMPILER_IS_GNUCXX) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden -fvisibility-inlines-hidden") + endif () endif() # Macro to run codegen from the subdirs diff --git a/src/QGlib/connect.h b/src/QGlib/connect.h index 5147cac..a04037c 100644 --- a/src/QGlib/connect.h +++ b/src/QGlib/connect.h @@ -197,7 +197,7 @@ namespace Private { //BEGIN ******** ClosureDataBase ******** -class ClosureDataBase +class QTGLIB_EXPORT ClosureDataBase { public: inline virtual ~ClosureDataBase() {} @@ -217,7 +217,7 @@ protected: * signal receiver to/from a slot that should be called when the receiver is destroyed. * This notification is used to disconnect the signal automatically. */ -class DestroyNotifierIface +class QTGLIB_EXPORT DestroyNotifierIface { public: virtual ~DestroyNotifierIface() {} @@ -228,7 +228,7 @@ public: typedef QSharedPointer<DestroyNotifierIface> DestroyNotifierIfacePtr; /* This is DestroyNotifierIface that works for signal receivers that inherit QObject. */ -class QObjectDestroyNotifier : public DestroyNotifierIface +class QTGLIB_EXPORT QObjectDestroyNotifier : public DestroyNotifierIface { public: static DestroyNotifierIfacePtr instance(); @@ -256,13 +256,13 @@ struct GetDestroyNotifier<T, typename boost::enable_if< boost::is_base_of<QObjec /* This method is used internally from QGlib::connect(). */ -ulong connect(void *instance, const char *signal, Quark detail, - void *receiver, const DestroyNotifierIfacePtr & notifier, - uint slotHash, ClosureDataBase *closureData, ConnectFlags flags); +QTGLIB_EXPORT ulong connect(void *instance, const char *signal, Quark detail, + void *receiver, const DestroyNotifierIfacePtr & notifier, + uint slotHash, ClosureDataBase *closureData, ConnectFlags flags); /* This method is used internally from QGlib::disconnect(). */ -bool disconnect(void *instance, const char *signal, Quark detail, - void *receiver, uint slotHash, ulong handlerId); +QTGLIB_EXPORT bool disconnect(void *instance, const char *signal, Quark detail, + void *receiver, uint slotHash, ulong handlerId); /* This is a helper that returns a hash value for a member function pointer. diff --git a/src/QGlib/emitimpl.h b/src/QGlib/emitimpl.h index 6de84da..188e7e9 100644 --- a/src/QGlib/emitimpl.h +++ b/src/QGlib/emitimpl.h @@ -33,7 +33,7 @@ namespace QGlib { namespace Private { /*! This method is used internally from the templated emit() method. */ -Value emit(void *instance, const char *signal, Quark detail, const QList<Value> & args); +QTGLIB_EXPORT Value emit(void *instance, const char *signal, Quark detail, const QList<Value> & args); template <typename Signature> struct EmitImpl {}; diff --git a/src/QGlib/error.h b/src/QGlib/error.h index d805ea6..2fb01f5 100644 --- a/src/QGlib/error.h +++ b/src/QGlib/error.h @@ -26,7 +26,7 @@ namespace QGlib { /*! \headerfile error.h <QGlib/Error> * \brief Wrapper class for GError */ -class Error : public std::exception +class QTGLIB_EXPORT Error : public std::exception { public: /*! Wraps an existing GError into an Error. @@ -67,7 +67,7 @@ private: }; /*! \relates QGlib::Error */ -QDebug operator<<(QDebug dbg, const Error & error); +QTGLIB_EXPORT QDebug operator<<(QDebug dbg, const Error & error); } //namespace QGlib diff --git a/src/QGlib/global.h b/src/QGlib/global.h index 8912b23..dacf421 100644 --- a/src/QGlib/global.h +++ b/src/QGlib/global.h @@ -20,6 +20,20 @@ #include <QtCore/QtGlobal> #include <boost/config.hpp> +/* defined by cmake when building this library */ +#if defined(QtGLib_EXPORTS) +# define QTGLIB_EXPORT Q_DECL_EXPORT +#else +# define QTGLIB_EXPORT Q_DECL_IMPORT +#endif + +#if !defined(Q_OS_WIN) && !defined(Q_CC_NOKIAX86) && \ + !defined(Q_CC_RVCT) && defined(QT_VISIBILITY_AVAILABLE) +# define QTGLIB_NO_EXPORT __attribute__((visibility("hidden"))) +#else +# define QTGLIB_NO_EXPORT +#endif + typedef struct _GValue GValue; typedef struct _GParamSpec GParamSpec; typedef struct _GClosure GClosure; @@ -42,7 +56,7 @@ typedef RefPointer<Object> ObjectPtr; /*! Initializes the type system. You must call * this function before using any QtGLib API. */ -void init(); +QTGLIB_EXPORT void init(); } //namespace QGlib diff --git a/src/QGlib/init.cpp b/src/QGlib/init.cpp index 5dfc1fa..016a82e 100644 --- a/src/QGlib/init.cpp +++ b/src/QGlib/init.cpp @@ -15,6 +15,7 @@ You should have received a copy of the GNU Lesser General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ +#include "global.h" #include <glib-object.h> namespace QGlib { diff --git a/src/QGlib/object.h b/src/QGlib/object.h index 9d1d14d..673cb2b 100644 --- a/src/QGlib/object.h +++ b/src/QGlib/object.h @@ -35,7 +35,7 @@ namespace QGlib { * the Object and Interface classes. You should not use this class directly at all. * Use Object or Interface instead. */ -class ObjectBase : public RefCountedObject +class QTGLIB_EXPORT ObjectBase : public RefCountedObject { public: ParamSpecPtr findProperty(const char *name) const; @@ -67,7 +67,7 @@ protected: * * The methods of this class can be found in ObjectBase. */ -class Object : virtual public ObjectBase +class QTGLIB_EXPORT Object : virtual public ObjectBase { QGLIB_WRAPPER(Object) }; @@ -77,7 +77,7 @@ class Object : virtual public ObjectBase * * The methods of this class can be found in ObjectBase. */ -class Interface : virtual public ObjectBase +class QTGLIB_EXPORT Interface : virtual public ObjectBase { QGLIB_WRAPPER_DIFFERENT_C_CLASS(Interface, Object) }; diff --git a/src/QGlib/paramspec.h b/src/QGlib/paramspec.h index 11bb567..bdf18a8 100644 --- a/src/QGlib/paramspec.h +++ b/src/QGlib/paramspec.h @@ -31,7 +31,7 @@ namespace QGlib { * GParamSpec is an object structure that encapsulates the metadata * required to specify parameters, such as e.g. GObject properties. */ -class ParamSpec : public RefCountedObject +class QTGLIB_EXPORT ParamSpec : public RefCountedObject { QGLIB_WRAPPER(ParamSpec) public: diff --git a/src/QGlib/quark.h b/src/QGlib/quark.h index e7c4902..67db2da 100644 --- a/src/QGlib/quark.h +++ b/src/QGlib/quark.h @@ -19,6 +19,7 @@ #ifndef QGLIB_QUARK_H #define QGLIB_QUARK_H +#include "global.h" #include <QtCore/QString> namespace QGlib { @@ -38,7 +39,7 @@ namespace QGlib { * \note This class is a thin wrapper around a quint32. There is no overhead in copying * it around, since it is just an integer. */ -class Quark +class QTGLIB_EXPORT Quark { public: inline Quark(quint32 gquark = 0) : m_quark(gquark) {} diff --git a/src/QGlib/refpointer.h b/src/QGlib/refpointer.h index 25bf606..9af41de 100644 --- a/src/QGlib/refpointer.h +++ b/src/QGlib/refpointer.h @@ -158,7 +158,7 @@ private: /*! \headerfile refpointer.h <QGlib/RefPointer> * \brief Base class for all the reference-counted object wrappers. */ -class RefCountedObject +class QTGLIB_EXPORT RefCountedObject { public: virtual ~RefCountedObject() {} diff --git a/src/QGlib/signal.cpp b/src/QGlib/signal.cpp index 87addc3..7719655 100644 --- a/src/QGlib/signal.cpp +++ b/src/QGlib/signal.cpp @@ -29,7 +29,7 @@ namespace QGlib { //BEGIN ******** Signal ******** -struct Signal::Private : public QSharedData +struct QTGLIB_NO_EXPORT Signal::Private : public QSharedData { Private(uint i) : id(i), m_queryInitialized(false) {} diff --git a/src/QGlib/signal.h b/src/QGlib/signal.h index 782e195..5cdd655 100644 --- a/src/QGlib/signal.h +++ b/src/QGlib/signal.h @@ -61,7 +61,7 @@ namespace QGlib { * * \sa connect(), emit() */ -class Signal +class QTGLIB_EXPORT Signal { public: enum SignalFlag { diff --git a/src/QGlib/type.h b/src/QGlib/type.h index c4f4599..4c56852 100644 --- a/src/QGlib/type.h +++ b/src/QGlib/type.h @@ -60,7 +60,7 @@ namespace QGlib { //closing and re-opening namespace QGlib is required to trick * \note This class is a thin wrapper around an unsigned long. There is no overhead * in copying it around, since it is just an integer. */ -class Type +class QTGLIB_EXPORT Type { public: enum FundamentalType { @@ -188,6 +188,12 @@ inline Type GetType() /*! \addtogroup macros Internal macros */ //@{ +#define QGLIB_REGISTER_TYPE_WITH_EXPORT_MACRO(T, EXPORT_MACRO) \ + namespace QGlib { \ + template <> \ + struct EXPORT_MACRO GetTypeImpl<T> { operator Type(); }; \ + } + /*! \internal * This macro is used to register a class with the QGlib type system. It forward-declares * a specialization for struct GetTypeImpl and serves as a keyword for codegen, our code generator, @@ -195,10 +201,7 @@ inline Type GetType() * \note this macro must be used outside of any namespace scope */ #define QGLIB_REGISTER_TYPE(T) \ - namespace QGlib { \ - template <> \ - struct GetTypeImpl<T> { operator Type(); }; \ - } + QGLIB_REGISTER_TYPE_WITH_EXPORT_MACRO(T, QTGLIB_EXPORT) /*! \internal Used by codegen only */ #define QGLIB_REGISTER_TYPE_IMPLEMENTATION(T, GTYPE) \ diff --git a/src/QGlib/value.cpp b/src/QGlib/value.cpp index b65626e..d8cbf04 100644 --- a/src/QGlib/value.cpp +++ b/src/QGlib/value.cpp @@ -129,7 +129,7 @@ Q_GLOBAL_STATIC(Private::Dispatcher, s_dispatcher); // -- Value::Data -- -struct Value::Data : public QSharedData +struct QTGLIB_NO_EXPORT Value::Data : public QSharedData { Data(); Data(const Data & other); diff --git a/src/QGlib/value.h b/src/QGlib/value.h index 13c773e..8c0c640 100644 --- a/src/QGlib/value.h +++ b/src/QGlib/value.h @@ -38,7 +38,7 @@ namespace QGlib { * using Value::registerValueVTable(). * \sa \ref value_design */ -struct ValueVTable +struct QTGLIB_EXPORT ValueVTable { typedef void (*SetFunction)(Value & value, const void *data); typedef void (*GetFunction)(const Value & value, void *data); @@ -70,7 +70,7 @@ struct ValueVTable * * \note This class is implicitly shared. */ -class Value +class QTGLIB_EXPORT Value { public: /*! Creates a new invalid Value \sa isValid() */ @@ -460,14 +460,14 @@ struct ValueImpl<Value> namespace Private { -class InvalidValueException : public std::logic_error +class QTGLIB_EXPORT InvalidValueException : public std::logic_error { public: inline InvalidValueException() : std::logic_error("This Value instance has not been initialized") {} }; -class InvalidTypeException : public std::logic_error +class QTGLIB_EXPORT InvalidTypeException : public std::logic_error { public: inline InvalidTypeException(const std::string & dataType, const std::string & valueType) @@ -476,14 +476,14 @@ public: + valueType + "\" and no conversion is possible") {} }; -class UnregisteredTypeException : public std::logic_error +class QTGLIB_EXPORT UnregisteredTypeException : public std::logic_error { public: inline UnregisteredTypeException(const std::string & typeName) : std::logic_error("Unable to handle unregistered type \"" + typeName + "\"") {} }; -class TransformationFailedException : public std::runtime_error +class QTGLIB_EXPORT TransformationFailedException : public std::runtime_error { public: inline TransformationFailedException(const std::string & srcTypeName, @@ -497,7 +497,7 @@ public: // -- QDebug operator -- /*! \relates QGlib::Value */ -QDebug operator<<(QDebug debug, const Value & value); +QTGLIB_EXPORT QDebug operator<<(QDebug debug, const Value & value); } //namespace QGlib diff --git a/src/QGlib/wrap.h b/src/QGlib/wrap.h index 8f2ce4b..7247db5 100644 --- a/src/QGlib/wrap.h +++ b/src/QGlib/wrap.h @@ -18,6 +18,8 @@ #ifndef QGLIB_WRAP_H #define QGLIB_WRAP_H +#include "global.h" + namespace QGlib { class RefCountedObject; @@ -32,7 +34,7 @@ class Type; * an Object or Interface or ParamSpec (like QGst::MiniObject and QGst::Caps). * You should \em not otherwise call this function directly. */ -RefCountedObject *constructWrapper(Type instanceType, void *instance); +QTGLIB_EXPORT RefCountedObject *constructWrapper(Type instanceType, void *instance); template <typename T, typename Enable = void> struct WrapImpl {}; @@ -63,9 +65,9 @@ struct WrapImpl {}; namespace Private { -RefCountedObject *wrapObject(void *gobject); -RefCountedObject *wrapParamSpec(void *param); -RefCountedObject *wrapInterface(Type interfaceType, void *gobject); +QTGLIB_EXPORT RefCountedObject *wrapObject(void *gobject); +QTGLIB_EXPORT RefCountedObject *wrapParamSpec(void *param); +QTGLIB_EXPORT RefCountedObject *wrapInterface(Type interfaceType, void *gobject); } //namespace Private } //namespace QGlib diff --git a/src/QGst/CMakeLists.txt b/src/QGst/CMakeLists.txt index 5e5f693..9e0822b 100644 --- a/src/QGst/CMakeLists.txt +++ b/src/QGst/CMakeLists.txt @@ -68,6 +68,7 @@ set(QtGStreamer_INSTALLED_HEADERS buffer.h Buffer event.h Event + Ui/global.h Ui/videowidget.h Ui/VideoWidget ) diff --git a/src/QGst/Ui/global.h b/src/QGst/Ui/global.h new file mode 100644 index 0000000..cba1806 --- /dev/null +++ b/src/QGst/Ui/global.h @@ -0,0 +1,37 @@ +/* + Copyright (C) 2011 Collabora Ltd. + @author George Kiagiadakis <george.kiagiadakis@collabora.co.uk> + + 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 program 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 General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ +#ifndef QTGSTREAMERUI_EXPORT_H +#define QTGSTREAMERUI_EXPORT_H + +#include <QtCore/QtGlobal> + +/* defined by cmake when building this library */ +#if defined(QtGStreamerUi_EXPORTS) +# define QTGSTREAMERUI_EXPORT Q_DECL_EXPORT +#else +# define QTGSTREAMERUI_EXPORT Q_DECL_IMPORT +#endif + +#if !defined(Q_OS_WIN) && !defined(Q_CC_NOKIAX86) && \ + !defined(Q_CC_RVCT) && defined(QT_VISIBILITY_AVAILABLE) +# define QTGSTREAMERUI_NO_EXPORT __attribute__((visibility("hidden"))) +#else +# define QTGSTREAMERUI_NO_EXPORT +#endif + +#endif diff --git a/src/QGst/Ui/videowidget.h b/src/QGst/Ui/videowidget.h index 63f36b1..1709800 100644 --- a/src/QGst/Ui/videowidget.h +++ b/src/QGst/Ui/videowidget.h @@ -17,6 +17,7 @@ #ifndef QGST_UI_VIDEOWIDGET_H #define QGST_UI_VIDEOWIDGET_H +#include "global.h" #include "../element.h" #include <QtGui/QWidget> @@ -38,7 +39,7 @@ class AbstractRenderer; * completely sure that there can be no child bins and there can be only * one video sink element in this bin. */ -class VideoWidget : public QWidget +class QTGSTREAMERUI_EXPORT VideoWidget : public QWidget { Q_OBJECT public: diff --git a/src/QGst/bin.h b/src/QGst/bin.h index 74ac6e1..d115311 100644 --- a/src/QGst/bin.h +++ b/src/QGst/bin.h @@ -25,7 +25,7 @@ namespace QGst { /*! \headerfile bin.h <QGst/Bin> * \brief Wrapper class for GstBin */ -class Bin : public Element, public ChildProxy +class QTGSTREAMER_EXPORT Bin : public Element, public ChildProxy { QGST_WRAPPER(Bin) public: @@ -73,6 +73,6 @@ QGlib::RefPointer<T> Bin::getElementByInterface() const } -QGLIB_REGISTER_TYPE(QGst::Bin) +QGST_REGISTER_TYPE(QGst::Bin) #endif diff --git a/src/QGst/buffer.h b/src/QGst/buffer.h index 248c05a..253c3c0 100644 --- a/src/QGst/buffer.h +++ b/src/QGst/buffer.h @@ -30,7 +30,7 @@ namespace QGst { * CapsPtr in caps() that indicates the format of the buffer data. * */ -class Buffer : public MiniObject +class QTGSTREAMER_EXPORT Buffer : public MiniObject { QGST_WRAPPER(Buffer) public: @@ -57,6 +57,6 @@ public: } //namespace QGst -QGLIB_REGISTER_TYPE(QGst::Buffer) +QGST_REGISTER_TYPE(QGst::Buffer) #endif diff --git a/src/QGst/bus.h b/src/QGst/bus.h index 61fd59b..375a348 100644 --- a/src/QGst/bus.h +++ b/src/QGst/bus.h @@ -47,7 +47,7 @@ namespace QGst { * even if you are not running a Glib event loop. However, this requires a running * Qt event loop. */ -class Bus : public Object +class QTGSTREAMER_EXPORT Bus : public Object { QGST_WRAPPER(Bus) public: @@ -133,6 +133,6 @@ public: } //namespace QGst -QGLIB_REGISTER_TYPE(QGst::Bus) +QGST_REGISTER_TYPE(QGst::Bus) #endif //QGST_BUS_H diff --git a/src/QGst/caps.h b/src/QGst/caps.h index 4a11f38..2020e95 100644 --- a/src/QGst/caps.h +++ b/src/QGst/caps.h @@ -27,7 +27,7 @@ namespace QGst { /*! \headerfile caps.h <QGst/Caps> * \brief Wrapper class for GstCaps */ -class Caps : public QGlib::RefCountedObject +class QTGSTREAMER_EXPORT Caps : public QGlib::RefCountedObject { QGST_WRAPPER(Caps) public: @@ -77,17 +77,17 @@ protected: }; /*! \relates QGst::Caps */ -QDebug operator<<(QDebug debug, const CapsPtr & caps); +QTGSTREAMER_EXPORT QDebug operator<<(QDebug debug, const CapsPtr & caps); namespace Private { -QGlib::RefCountedObject *wrapCaps(void *caps); +QTGSTREAMER_EXPORT QGlib::RefCountedObject *wrapCaps(void *caps); } //namespace Private } //namespace QGst -QGLIB_REGISTER_TYPE(QGst::Caps) +QGST_REGISTER_TYPE(QGst::Caps) QGLIB_REGISTER_WRAPIMPL_FOR_SUBCLASSES_OF(QGst::Caps, QGst::Private::wrapCaps) #endif diff --git a/src/QGst/childproxy.h b/src/QGst/childproxy.h index 91d43b3..2128f32 100644 --- a/src/QGst/childproxy.h +++ b/src/QGst/childproxy.h @@ -24,7 +24,7 @@ namespace QGst { /*! \interface ChildProxy childproxy.h <QGst/ChildProxy> * \brief Wrapper class for GstChildProxy */ -class ChildProxy : public QGlib::Interface +class QTGSTREAMER_EXPORT ChildProxy : public QGlib::Interface { QGST_WRAPPER(ChildProxy) public: @@ -52,7 +52,7 @@ void ChildProxy::setChildProperty(const char *name, const T & value) } -QGLIB_REGISTER_TYPE(QGst::ChildProxy) +QGST_REGISTER_TYPE(QGst::ChildProxy) QGLIB_REGISTER_INTERFACE(QGst::ChildProxy) #endif // QGST_CHILDPROXY_H diff --git a/src/QGst/clock.h b/src/QGst/clock.h index b4e364f..f530d24 100644 --- a/src/QGst/clock.h +++ b/src/QGst/clock.h @@ -27,7 +27,7 @@ namespace QGst { /*! \headerfile clock.h <QGst/Clock> * \brief Wrapper class for GstClock */ -class Clock : public Object +class QTGSTREAMER_EXPORT Clock : public Object { QGST_WRAPPER(Clock) public: @@ -43,6 +43,6 @@ public: } -QGLIB_REGISTER_TYPE(QGst::Clock) +QGST_REGISTER_TYPE(QGst::Clock) #endif // QGST_CLOCK_H diff --git a/src/QGst/colorbalance.h b/src/QGst/colorbalance.h index 7e54099..bece181 100644 --- a/src/QGst/colorbalance.h +++ b/src/QGst/colorbalance.h @@ -25,7 +25,7 @@ namespace QGst { /*! \headerfile colorbalance.h <QGst/ColorBalance> * \brief Wrapper class for GstColorBalanceChannel */ -class ColorBalanceChannel : public QGlib::Object +class QTGSTREAMER_EXPORT ColorBalanceChannel : public QGlib::Object { QGST_WRAPPER(ColorBalanceChannel) public: @@ -37,7 +37,7 @@ public: /*! \headerfile colorbalance.h <QGst/ColorBalance> * \brief Wrapper class for GstColorBalance */ -class ColorBalance : public QGlib::Interface +class QTGSTREAMER_EXPORT ColorBalance : public QGlib::Interface { QGST_WRAPPER(ColorBalance) public: @@ -49,8 +49,8 @@ public: } //namespace QGst -QGLIB_REGISTER_TYPE(QGst::ColorBalanceChannel) -QGLIB_REGISTER_TYPE(QGst::ColorBalance) +QGST_REGISTER_TYPE(QGst::ColorBalanceChannel) +QGST_REGISTER_TYPE(QGst::ColorBalance) QGLIB_REGISTER_INTERFACE(QGst::ColorBalance) #endif // QGST_COLORBALANCE_H diff --git a/src/QGst/element.h b/src/QGst/element.h index 371d622..0b6a9fc 100644 --- a/src/QGst/element.h +++ b/src/QGst/element.h @@ -25,7 +25,7 @@ namespace QGst { /*! \headerfile element.h <QGst/Element> * \brief Wrapper class for GstElement */ -class Element : public Object +class QTGSTREAMER_EXPORT Element : public Object { QGST_WRAPPER(Element) public: @@ -63,6 +63,6 @@ public: } -QGLIB_REGISTER_TYPE(QGst::Element) +QGST_REGISTER_TYPE(QGst::Element) #endif // QGST_ELEMENT_H diff --git a/src/QGst/elementfactory.h b/src/QGst/elementfactory.h index 996376f..3b10b3a 100644 --- a/src/QGst/elementfactory.h +++ b/src/QGst/elementfactory.h @@ -24,7 +24,7 @@ namespace QGst { /*! \headerfile elementfactory.h <QGst/ElementFactory> * \brief Wrapper class for GstElementFactory */ -class ElementFactory : public PluginFeature +class QTGSTREAMER_EXPORT ElementFactory : public PluginFeature { QGST_WRAPPER(ElementFactory) public: @@ -48,6 +48,6 @@ public: } -QGLIB_REGISTER_TYPE(QGst::ElementFactory) +QGST_REGISTER_TYPE(QGst::ElementFactory) #endif diff --git a/src/QGst/enums.h b/src/QGst/enums.h index 7d0fa6c..4b7dc8e 100644 --- a/src/QGst/enums.h +++ b/src/QGst/enums.h @@ -19,7 +19,7 @@ #ifndef QGST_ENUMS_H #define QGST_ENUMS_H -#include "../QGlib/type.h" +#include "global.h" #include <QtCore/QFlags> namespace QGst { @@ -31,7 +31,7 @@ namespace QGst { Q_DECLARE_FLAGS(MiniObjectFlags, MiniObjectFlag); Q_DECLARE_OPERATORS_FOR_FLAGS(MiniObjectFlags); } -QGLIB_REGISTER_TYPE(QGst::MiniObjectFlags); +QGST_REGISTER_TYPE(QGst::MiniObjectFlags); namespace QGst { @@ -44,7 +44,7 @@ namespace QGst { Q_DECLARE_FLAGS(ObjectFlags, ObjectFlag); Q_DECLARE_OPERATORS_FOR_FLAGS(ObjectFlags); } -QGLIB_REGISTER_TYPE(QGst::ObjectFlags); +QGST_REGISTER_TYPE(QGst::ObjectFlags); namespace QGst { @@ -56,7 +56,7 @@ namespace QGst { StatePlaying = 4 }; } -QGLIB_REGISTER_TYPE(QGst::State) +QGST_REGISTER_TYPE(QGst::State) namespace QGst { enum StateChange { @@ -68,7 +68,7 @@ namespace QGst { StateChangeReadyToNull = (StateReady<<3) | StateNull }; } -QGLIB_REGISTER_TYPE(QGst::StateChange) +QGST_REGISTER_TYPE(QGst::StateChange) namespace QGst { enum StateChangeReturn { @@ -78,7 +78,7 @@ namespace QGst { StateChangeNoPreroll = 3 }; } -QGLIB_REGISTER_TYPE(QGst::StateChangeReturn) +QGST_REGISTER_TYPE(QGst::StateChangeReturn) namespace QGst { @@ -88,7 +88,7 @@ namespace QGst { PadSink }; } -QGLIB_REGISTER_TYPE(QGst::PadDirection) +QGST_REGISTER_TYPE(QGst::PadDirection) namespace QGst { enum PadFlag { @@ -104,7 +104,7 @@ namespace QGst { Q_DECLARE_FLAGS(PadFlags, PadFlag); Q_DECLARE_OPERATORS_FOR_FLAGS(PadFlags); } -QGLIB_REGISTER_TYPE(QGst::PadFlags); +QGST_REGISTER_TYPE(QGst::PadFlags); namespace QGst { enum PadLinkReturn { @@ -118,7 +118,7 @@ namespace QGst { PadLinkRefused = -6 }; } -QGLIB_REGISTER_TYPE(QGst::PadLinkReturn) +QGST_REGISTER_TYPE(QGst::PadLinkReturn) namespace QGst { enum FlowReturn { @@ -134,7 +134,7 @@ namespace QGst { FlowCustomError = -100 }; } -QGLIB_REGISTER_TYPE(QGst::FlowReturn) +QGST_REGISTER_TYPE(QGst::FlowReturn) namespace QGst { enum ActivateMode { @@ -143,7 +143,7 @@ namespace QGst { ActivatePull }; } -QGLIB_REGISTER_TYPE(QGst::ActivateMode) +QGST_REGISTER_TYPE(QGst::ActivateMode) namespace QGst { @@ -154,7 +154,7 @@ namespace QGst { RankPrimary = 256 }; } -QGLIB_REGISTER_TYPE(QGst::Rank) +QGST_REGISTER_TYPE(QGst::Rank) namespace QGst { @@ -188,7 +188,7 @@ namespace QGst { MessageAny = ~0 }; } -QGLIB_REGISTER_TYPE(QGst::MessageType) +QGST_REGISTER_TYPE(QGst::MessageType) namespace QGst { @@ -202,7 +202,7 @@ namespace QGst { ParseErrorEmpty }; } -QGLIB_REGISTER_TYPE(QGst::ParseError) +QGST_REGISTER_TYPE(QGst::ParseError) namespace QGst { @@ -212,7 +212,7 @@ namespace QGst { UriSrc }; } -QGLIB_REGISTER_TYPE(QGst::UriType) +QGST_REGISTER_TYPE(QGst::UriType) namespace QGst { enum BufferingMode { @@ -222,7 +222,7 @@ namespace QGst { BufferingLive }; } -QGLIB_REGISTER_TYPE(QGst::BufferingMode) +QGST_REGISTER_TYPE(QGst::BufferingMode) namespace QGst { enum Format { @@ -234,7 +234,7 @@ namespace QGst { FormatPercent }; } -QGLIB_REGISTER_TYPE(QGst::Format) +QGST_REGISTER_TYPE(QGst::Format) namespace QGst { enum StreamStatusType { @@ -247,7 +247,7 @@ namespace QGst { StreamStatusTypeStop = 10 }; } -QGLIB_REGISTER_TYPE(QGst::StreamStatusType) +QGST_REGISTER_TYPE(QGst::StreamStatusType) namespace QGst { enum StreamVolumeFormat { @@ -256,7 +256,7 @@ namespace QGst { StreamVolumeFormatDb }; } -QGLIB_REGISTER_TYPE(QGst::StreamVolumeFormat) +QGST_REGISTER_TYPE(QGst::StreamVolumeFormat) namespace QGst { enum ColorBalanceType { @@ -264,7 +264,7 @@ namespace QGst { ColorBalanceSoftware }; } -QGLIB_REGISTER_TYPE(QGst::ColorBalanceType) +QGST_REGISTER_TYPE(QGst::ColorBalanceType) namespace QGst { enum QueryType { @@ -283,7 +283,7 @@ namespace QGst { QueryUri }; } -QGLIB_REGISTER_TYPE(QGst::QueryType) +QGST_REGISTER_TYPE(QGst::QueryType) namespace QGst { enum BufferFlag { @@ -302,7 +302,7 @@ namespace QGst { Q_DECLARE_FLAGS(BufferFlags, BufferFlag); Q_DECLARE_OPERATORS_FOR_FLAGS(BufferFlags) } -QGLIB_REGISTER_TYPE(QGst::BufferFlags) //codegen: GType=GST_TYPE_BUFFER_FLAG +QGST_REGISTER_TYPE(QGst::BufferFlags) //codegen: GType=GST_TYPE_BUFFER_FLAG namespace QGst { @@ -315,7 +315,7 @@ namespace QGst { Q_DECLARE_FLAGS(EventTypeFlags, EventTypeFlag); Q_DECLARE_OPERATORS_FOR_FLAGS(EventTypeFlags) } -QGLIB_REGISTER_TYPE(QGst::EventTypeFlags) +QGST_REGISTER_TYPE(QGst::EventTypeFlags) namespace QGst { enum EventType { @@ -340,7 +340,7 @@ namespace QGst { EventCustomBothOob = (32 << 4) | EventTypeBoth }; } -QGLIB_REGISTER_TYPE(QGst::EventType) +QGST_REGISTER_TYPE(QGst::EventType) namespace QGst { enum SeekFlag { @@ -354,7 +354,7 @@ namespace QGst { Q_DECLARE_FLAGS(SeekFlags, SeekFlag); Q_DECLARE_OPERATORS_FOR_FLAGS(SeekFlags) } -QGLIB_REGISTER_TYPE(QGst::SeekFlags) +QGST_REGISTER_TYPE(QGst::SeekFlags) namespace QGst { enum SeekType { @@ -364,6 +364,6 @@ namespace QGst { SeekTypeEnd = 3 }; } -QGLIB_REGISTER_TYPE(QGst::SeekType) +QGST_REGISTER_TYPE(QGst::SeekType) #endif diff --git a/src/QGst/event.h b/src/QGst/event.h index 34c84e0..3896f4d 100644 --- a/src/QGst/event.h +++ b/src/QGst/event.h @@ -50,7 +50,7 @@ namespace QGst { * used as arguments in slots connected to GObject signals, even though you may know that your * slot will only be called with that type of event. */ -class Event : public MiniObject +class QTGSTREAMER_EXPORT Event : public MiniObject { QGST_WRAPPER(Event) public: @@ -72,7 +72,7 @@ public: /*! \headerfile event.h <QGst/Event> * \brief Wrapper class for events of type QGst::FlushStartEvent */ -class FlushStartEvent : public Event +class QTGSTREAMER_EXPORT FlushStartEvent : public Event { QGST_WRAPPER_FAKE_SUBCLASS(FlushStart, Event) public: @@ -82,7 +82,7 @@ public: /*! \headerfile event.h <QGst/Event> * \brief Wrapper class for events of type QGst::FlushStopEvent */ -class FlushStopEvent : public Event +class QTGSTREAMER_EXPORT FlushStopEvent : public Event { QGST_WRAPPER_FAKE_SUBCLASS(FlushStop, Event) public: @@ -92,7 +92,7 @@ public: /*! \headerfile event.h <QGst/Event> * \brief Wrapper class for events of type QGst::EosEvent */ -class EosEvent : public Event +class QTGSTREAMER_EXPORT EosEvent : public Event { QGST_WRAPPER_FAKE_SUBCLASS(Eos, Event) public: @@ -102,7 +102,7 @@ public: /*! \headerfile event.h <QGst/Event> * \brief Wrapper class for events of type QGst::NewSegmentEvent */ -class NewSegmentEvent : public Event +class QTGSTREAMER_EXPORT NewSegmentEvent : public Event { QGST_WRAPPER_FAKE_SUBCLASS(NewSegment, Event) public: @@ -123,7 +123,7 @@ public: /*! \headerfile event.h <QGst/Event> * \brief Wrapper class for events of type QGst::BufferSizeEvent */ -class BufferSizeEvent : public Event +class QTGSTREAMER_EXPORT BufferSizeEvent : public Event { QGST_WRAPPER_FAKE_SUBCLASS(BufferSize, Event) public: @@ -138,7 +138,7 @@ public: /*! \headerfile event.h <QGst/Event> * \brief Wrapper class for events of type QGst::BufferSizeEvent */ -class SinkMessageEvent : public Event +class QTGSTREAMER_EXPORT SinkMessageEvent : public Event { QGST_WRAPPER_FAKE_SUBCLASS(SinkMessage, Event) public: @@ -150,7 +150,7 @@ public: /*! \headerfile event.h <QGst/Event> * \brief Wrapper class for events of type QGst::QosEvent */ -class QosEvent : public Event +class QTGSTREAMER_EXPORT QosEvent : public Event { QGST_WRAPPER_FAKE_SUBCLASS(Qos, Event) public: @@ -164,7 +164,7 @@ public: /*! \headerfile event.h <QGst/Event> * \brief Wrapper class for events of type QGst::SeekEvent */ -class SeekEvent : public Event +class QTGSTREAMER_EXPORT SeekEvent : public Event { QGST_WRAPPER_FAKE_SUBCLASS(Seek, Event) public: @@ -183,7 +183,7 @@ public: /*! \headerfile event.h <QGst/Event> * \brief Wrapper class for events of type QGst::NavigationEvent */ -class NavigationEvent : public Event +class QTGSTREAMER_EXPORT NavigationEvent : public Event { QGST_WRAPPER_FAKE_SUBCLASS(Navigation, Event) public: @@ -193,7 +193,7 @@ public: /*! \headerfile event.h <QGst/Event> * \brief Wrapper class for events of type QGst::LatencyEvent */ -class LatencyEvent : public Event +class QTGSTREAMER_EXPORT LatencyEvent : public Event { QGST_WRAPPER_FAKE_SUBCLASS(Latency, Event) public: @@ -205,7 +205,7 @@ public: /*! \headerfile event.h <QGst/Event> * \brief Wrapper class for events of type QGst::StepEvent */ -class StepEvent : public Event +class QTGSTREAMER_EXPORT StepEvent : public Event { QGST_WRAPPER_FAKE_SUBCLASS(Step, Event) public: @@ -221,7 +221,7 @@ public: } //namespace QGst -QGLIB_REGISTER_TYPE(QGst::Event) +QGST_REGISTER_TYPE(QGst::Event) QGST_REGISTER_SUBCLASS(Event, FlushStart) QGST_REGISTER_SUBCLASS(Event, FlushStop) QGST_REGISTER_SUBCLASS(Event, Eos) diff --git a/src/QGst/ghostpad.h b/src/QGst/ghostpad.h index 08fa956..0a80146 100644 --- a/src/QGst/ghostpad.h +++ b/src/QGst/ghostpad.h @@ -24,7 +24,7 @@ namespace QGst { /*! \headerfile ghostpad.h <QGst/GhostPad> * \brief Wrapper class for GstGhostPad */ -class GhostPad : public Pad +class QTGSTREAMER_EXPORT GhostPad : public Pad { QGST_WRAPPER(GhostPad) public: @@ -37,6 +37,6 @@ public: } -QGLIB_REGISTER_TYPE(QGst::GhostPad) +QGST_REGISTER_TYPE(QGst::GhostPad) #endif diff --git a/src/QGst/global.h b/src/QGst/global.h index 5c74c35..a1437cf 100644 --- a/src/QGst/global.h +++ b/src/QGst/global.h @@ -17,10 +17,30 @@ #ifndef QGST_GLOBAL_H #define QGST_GLOBAL_H -#include "enums.h" +#include "../QGlib/type.h" #include <QtCore/QtGlobal> #include <QtCore/QSharedPointer> +/* defined by cmake when building this library */ +#if defined(QtGStreamer_EXPORTS) +# define QTGSTREAMER_EXPORT Q_DECL_EXPORT +#else +# define QTGSTREAMER_EXPORT Q_DECL_IMPORT +#endif + +#if !defined(Q_OS_WIN) && !defined(Q_CC_NOKIAX86) && \ + !defined(Q_CC_RVCT) && defined(QT_VISIBILITY_AVAILABLE) +# define QTGSTREAMER_NO_EXPORT __attribute__((visibility("hidden"))) +#else +# define QTGSTREAMER_NO_EXPORT +#endif + +#define QGST_REGISTER_TYPE(T) \ + QGLIB_REGISTER_TYPE_WITH_EXPORT_MACRO(T, QTGSTREAMER_EXPORT) + +//cyclic dependency, must include after defining the above +#include "enums.h" + #define QGST_WRAPPER_GSTCLASS_DECLARATION(Class) \ typedef struct _Gst##Class Gst##Class; @@ -160,7 +180,7 @@ namespace QGst { namespace QGst { /*! \overload */ - void init(); + QTGSTREAMER_EXPORT void init(); /*! Initializes the GStreamer library, setting up internal path lists, * registering built-in elements, and loading standard plugins. @@ -170,7 +190,7 @@ namespace QGst { * \param argv pointer to the application's argv * \throws QGlib::Error when initialization fails */ - void init(int *argc, char **argv[]); + QTGSTREAMER_EXPORT void init(int *argc, char **argv[]); /*! Clean up any resources created by GStreamer in init(). * @@ -180,7 +200,7 @@ namespace QGst { * * After this call GStreamer (including this method) should not be used anymore. */ - void cleanup(); + QTGSTREAMER_EXPORT void cleanup(); } #endif diff --git a/src/QGst/message.h b/src/QGst/message.h index 6308974..a9b2d96 100644 --- a/src/QGst/message.h +++ b/src/QGst/message.h @@ -43,7 +43,7 @@ namespace QGst { * used as arguments in slots connected to GObject signals, even though you may know that your * slot will only be called with that type of message. */ -class Message : public MiniObject +class QTGSTREAMER_EXPORT Message : public MiniObject { QGST_WRAPPER(Message) public: @@ -62,7 +62,7 @@ public: /*! \headerfile message.h <QGst/Message> * \brief Wrapper class for messages of type QGst::MessageEos */ -class EosMessage : public Message +class QTGSTREAMER_EXPORT EosMessage : public Message { QGST_WRAPPER_FAKE_SUBCLASS(Eos, Message) public: @@ -72,7 +72,7 @@ public: /*! \headerfile message.h <QGst/Message> * \brief Wrapper class for messages of type QGst::MessageError */ -class ErrorMessage : public Message +class QTGSTREAMER_EXPORT ErrorMessage : public Message { QGST_WRAPPER_FAKE_SUBCLASS(Error, Message) public: @@ -86,7 +86,7 @@ public: /*! \headerfile message.h <QGst/Message> * \brief Wrapper class for messages of type QGst::MessageWarning */ -class WarningMessage : public Message +class QTGSTREAMER_EXPORT WarningMessage : public Message { QGST_WRAPPER_FAKE_SUBCLASS(Warning, Message) public: @@ -100,7 +100,7 @@ public: /*! \headerfile message.h <QGst/Message> * \brief Wrapper class for messages of type QGst::MessageInfo */ -class InfoMessage : public Message +class QTGSTREAMER_EXPORT InfoMessage : public Message { QGST_WRAPPER_FAKE_SUBCLASS(Info, Message) public: @@ -116,7 +116,7 @@ public: /*! \headerfile message.h <QGst/Message> * \brief Wrapper class for messages of type QGst::MessageBuffering */ -class BufferingMessage : public Message +class QTGSTREAMER_EXPORT BufferingMessage : public Message { QGST_WRAPPER_FAKE_SUBCLASS(Buffering, Message) public: @@ -134,7 +134,7 @@ public: /*! \headerfile message.h <QGst/Message> * \brief Wrapper class for messages of type QGst::MessageStateChanged */ -class StateChangedMessage : public Message +class QTGSTREAMER_EXPORT StateChangedMessage : public Message { QGST_WRAPPER_FAKE_SUBCLASS(StateChanged, Message) public: @@ -151,7 +151,7 @@ public: /*! \headerfile message.h <QGst/Message> * \brief Wrapper class for messages of type QGst::MessageStepDone */ -class StepDoneMessage : public Message +class QTGSTREAMER_EXPORT StepDoneMessage : public Message { QGST_WRAPPER_FAKE_SUBCLASS(StepDone, Message) public: @@ -173,7 +173,7 @@ public: /*! \headerfile message.h <QGst/Message> * \brief Wrapper class for messages of type QGst::MessageStreamStatus */ -class StreamStatusMessage : public Message +class QTGSTREAMER_EXPORT StreamStatusMessage : public Message { QGST_WRAPPER_FAKE_SUBCLASS(StreamStatus, Message) public: @@ -189,7 +189,7 @@ public: /*! \headerfile message.h <QGst/Message> * \brief Wrapper class for messages of type QGst::MessageApplication */ -class ApplicationMessage : public Message +class QTGSTREAMER_EXPORT ApplicationMessage : public Message { QGST_WRAPPER_FAKE_SUBCLASS(Application, Message) public: @@ -200,7 +200,7 @@ public: /*! \headerfile message.h <QGst/Message> * \brief Wrapper class for messages of type QGst::MessageElement */ -class ElementMessage : public Message +class QTGSTREAMER_EXPORT ElementMessage : public Message { QGST_WRAPPER_FAKE_SUBCLASS(Element, Message) public: @@ -213,7 +213,7 @@ public: /*! \headerfile message.h <QGst/Message> * \brief Wrapper class for messages of type QGst::MessageSegmentDone */ -class SegmentDoneMessage : public Message +class QTGSTREAMER_EXPORT SegmentDoneMessage : public Message { QGST_WRAPPER_FAKE_SUBCLASS(SegmentDone, Message) public: @@ -226,7 +226,7 @@ public: /*! \headerfile message.h <QGst/Message> * \brief Wrapper class for messages of type QGst::MessageDuration */ -class DurationMessage : public Message +class QTGSTREAMER_EXPORT DurationMessage : public Message { QGST_WRAPPER_FAKE_SUBCLASS(Duration, Message) public: @@ -239,7 +239,7 @@ public: /*! \headerfile message.h <QGst/Message> * \brief Wrapper class for messages of type QGst::MessageLatency */ -class LatencyMessage : public Message +class QTGSTREAMER_EXPORT LatencyMessage : public Message { QGST_WRAPPER_FAKE_SUBCLASS(Latency, Message) public: @@ -251,7 +251,7 @@ public: /*! \headerfile message.h <QGst/Message> * \brief Wrapper class for messages of type QGst::MessageAsyncDone */ -class AsyncDoneMessage : public Message +class QTGSTREAMER_EXPORT AsyncDoneMessage : public Message { QGST_WRAPPER_FAKE_SUBCLASS(AsyncDone, Message) public: @@ -261,7 +261,7 @@ public: /*! \headerfile message.h <QGst/Message> * \brief Wrapper class for messages of type QGst::MessageRequestState */ -class RequestStateMessage : public Message +class QTGSTREAMER_EXPORT RequestStateMessage : public Message { QGST_WRAPPER_FAKE_SUBCLASS(RequestState, Message) public: @@ -273,7 +273,7 @@ public: /*! \headerfile message.h <QGst/Message> * \brief Wrapper class for messages of type QGst::MessageStepStart */ -class StepStartMessage : public Message +class QTGSTREAMER_EXPORT StepStartMessage : public Message { QGST_WRAPPER_FAKE_SUBCLASS(StepStart, Message) public: @@ -290,7 +290,7 @@ public: /*! \headerfile message.h <QGst/Message> * \brief Wrapper class for messages of type QGst::MessageQos */ -class QosMessage : public Message +class QTGSTREAMER_EXPORT QosMessage : public Message { QGST_WRAPPER_FAKE_SUBCLASS(Qos, Message) public: @@ -316,7 +316,7 @@ public: } //namespace QGst -QGLIB_REGISTER_TYPE(QGst::Message) +QGST_REGISTER_TYPE(QGst::Message) QGST_REGISTER_SUBCLASS(Message, Eos) QGST_REGISTER_SUBCLASS(Message, Error) QGST_REGISTER_SUBCLASS(Message, Warning) diff --git a/src/QGst/miniobject.h b/src/QGst/miniobject.h index 61690c7..7746aa9 100644 --- a/src/QGst/miniobject.h +++ b/src/QGst/miniobject.h @@ -26,7 +26,7 @@ namespace QGst { /*! \headerfile miniobject.h <QGst/MiniObject> * \brief Wrapper class for GstMiniObject */ -class MiniObject : public QGlib::RefCountedObject +class QTGSTREAMER_EXPORT MiniObject : public QGlib::RefCountedObject { QGST_WRAPPER(MiniObject) public: @@ -47,12 +47,12 @@ protected: namespace Private { -QGlib::RefCountedObject *wrapMiniObject(void *miniObject); +QTGSTREAMER_EXPORT QGlib::RefCountedObject *wrapMiniObject(void *miniObject); } //namespace Private } //namespace QGst -QGLIB_REGISTER_TYPE(QGst::MiniObject) +QGST_REGISTER_TYPE(QGst::MiniObject) QGLIB_REGISTER_WRAPIMPL_FOR_SUBCLASSES_OF(QGst::MiniObject, QGst::Private::wrapMiniObject) #endif diff --git a/src/QGst/object.h b/src/QGst/object.h index 015efac..ca0684f 100644 --- a/src/QGst/object.h +++ b/src/QGst/object.h @@ -25,7 +25,7 @@ namespace QGst { /*! \headerfile QGst/object.h <QGst/Object> * \brief Wrapper class for GstObject */ -class Object : public QGlib::Object +class QTGSTREAMER_EXPORT Object : public QGlib::Object { QGST_WRAPPER(Object) public: @@ -45,6 +45,6 @@ protected: } -QGLIB_REGISTER_TYPE(QGst::Object) +QGST_REGISTER_TYPE(QGst::Object) #endif // QGST_OBJECT_H diff --git a/src/QGst/pad.h b/src/QGst/pad.h index df117da..41ba8a1 100644 --- a/src/QGst/pad.h +++ b/src/QGst/pad.h @@ -24,7 +24,7 @@ namespace QGst { /*! \headerfile pad.h <QGst/Pad> * \brief Wrapper class for GstPad */ -class Pad : public Object +class QTGSTREAMER_EXPORT Pad : public Object { QGST_WRAPPER(Pad) public: @@ -65,6 +65,6 @@ public: } -QGLIB_REGISTER_TYPE(QGst::Pad) +QGST_REGISTER_TYPE(QGst::Pad) #endif diff --git a/src/QGst/parse.h b/src/QGst/parse.h index 652a1e8..517531d 100644 --- a/src/QGst/parse.h +++ b/src/QGst/parse.h @@ -31,14 +31,14 @@ namespace Parse { * The syntax is the same as the one used in the gst-launch tool. * \throws QGlib::Error when there was a problem creating the pipeline */ -ElementPtr launch(const char *description); +QTGSTREAMER_EXPORT ElementPtr launch(const char *description); /*! \overload * This function takes an array of strings, which are joined before they are * parsed as a description. This is the function used by the gst-launch tool. * \throws QGlib::Error when there was a problem creating the pipeline */ -ElementPtr launch(const char *argv[]); +QTGSTREAMER_EXPORT ElementPtr launch(const char *argv[]); } //namespace Parse } //namespace QGst diff --git a/src/QGst/pipeline.h b/src/QGst/pipeline.h index 18f2323..a6d5eee 100644 --- a/src/QGst/pipeline.h +++ b/src/QGst/pipeline.h @@ -24,7 +24,7 @@ namespace QGst { /*! \headerfile pipeline.h <QGst/Pipeline> * \brief Wrapper class for GstPipeline */ -class Pipeline : public Bin +class QTGSTREAMER_EXPORT Pipeline : public Bin { QGST_WRAPPER(Pipeline) public: @@ -38,6 +38,6 @@ public: } -QGLIB_REGISTER_TYPE(QGst::Pipeline) +QGST_REGISTER_TYPE(QGst::Pipeline) #endif diff --git a/src/QGst/pluginfeature.h b/src/QGst/pluginfeature.h index 89bf356..c363e7a 100644 --- a/src/QGst/pluginfeature.h +++ b/src/QGst/pluginfeature.h @@ -24,7 +24,7 @@ namespace QGst { /*! \headerfile pluginfeature.h <QGst/PluginFeature> * \brief Wrapper class for GstPluginFeature */ -class PluginFeature : public Object +class QTGSTREAMER_EXPORT PluginFeature : public Object { QGST_WRAPPER(PluginFeature) public: @@ -41,6 +41,6 @@ public: } -QGLIB_REGISTER_TYPE(QGst::PluginFeature) +QGST_REGISTER_TYPE(QGst::PluginFeature) #endif // QGST_PLUGINFEATURE_H diff --git a/src/QGst/propertyprobe.h b/src/QGst/propertyprobe.h index 1385add..31082d1 100644 --- a/src/QGst/propertyprobe.h +++ b/src/QGst/propertyprobe.h @@ -25,7 +25,7 @@ namespace QGst { /*! \interface PropertyProbe propertyprobe.h <QGst/PropertyProbe> * \brief Wrapper class for GstPropertyProbe */ -class PropertyProbe : public QGlib::Interface +class QTGSTREAMER_EXPORT PropertyProbe : public QGlib::Interface { QGST_WRAPPER(PropertyProbe) public: @@ -49,7 +49,7 @@ public: } -QGLIB_REGISTER_TYPE(QGst::PropertyProbe) +QGST_REGISTER_TYPE(QGst::PropertyProbe) QGLIB_REGISTER_INTERFACE(QGst::PropertyProbe) #endif // QGST_PROPERTYPROBE_H diff --git a/src/QGst/query.h b/src/QGst/query.h index 1033825..5569975 100644 --- a/src/QGst/query.h +++ b/src/QGst/query.h @@ -49,7 +49,7 @@ namespace QGst { * used as arguments in slots connected to GObject signals, even though you may know that your * slot will only be called with that type of queries. */ -class Query : public MiniObject +class QTGSTREAMER_EXPORT Query : public MiniObject { QGST_WRAPPER(Query) public: @@ -64,7 +64,7 @@ public: /*! \headerfile query.h <QGst/Query> * \brief Wrapper class for queries of type QGst::PositionQuery */ -class PositionQuery : public Query +class QTGSTREAMER_EXPORT PositionQuery : public Query { QGST_WRAPPER_FAKE_SUBCLASS(Position, Query) public: @@ -78,7 +78,7 @@ public: /*! \headerfile query.h <QGst/Query> * \brief Wrapper class for queries of type QGst::DurationQuery */ -class DurationQuery : public Query +class QTGSTREAMER_EXPORT DurationQuery : public Query { QGST_WRAPPER_FAKE_SUBCLASS(Duration, Query) public: @@ -92,7 +92,7 @@ public: /*! \headerfile query.h <QGst/Query> * \brief Wrapper class for queries of type QGst::LatencyQuery */ -class LatencyQuery : public Query +class QTGSTREAMER_EXPORT LatencyQuery : public Query { QGST_WRAPPER_FAKE_SUBCLASS(Latency, Query) public: @@ -108,7 +108,7 @@ public: /*! \headerfile query.h <QGst/Query> * \brief Wrapper class for queries of type QGst::SeekingQuery */ -class SeekingQuery : public Query +class QTGSTREAMER_EXPORT SeekingQuery : public Query { QGST_WRAPPER_FAKE_SUBCLASS(Seeking, Query) public: @@ -125,7 +125,7 @@ public: /*! \headerfile query.h <QGst/Query> * \brief Wrapper class for queries of type QGst::SegmentQuery */ -class SegmentQuery : public Query +class QTGSTREAMER_EXPORT SegmentQuery : public Query { QGST_WRAPPER_FAKE_SUBCLASS(Segment, Query) public: @@ -142,7 +142,7 @@ public: /*! \headerfile query.h <QGst/Query> * \brief Wrapper class for queries of type QGst::ConvertQuery */ -class ConvertQuery : public Query +class QTGSTREAMER_EXPORT ConvertQuery : public Query { QGST_WRAPPER_FAKE_SUBCLASS(Convert, Query) public: @@ -160,7 +160,7 @@ public: /*! \headerfile query.h <QGst/Query> * \brief Wrapper class for queries of type QGst::FormatsQuery */ -class FormatsQuery : public Query +class QTGSTREAMER_EXPORT FormatsQuery : public Query { QGST_WRAPPER_FAKE_SUBCLASS(Formats, Query) public: @@ -174,7 +174,7 @@ public: /*! \headerfile query.h <QGst/Query> * \brief Wrapper class for queries of type QGst::BufferingQuery */ -class BufferingQuery : public Query +class QTGSTREAMER_EXPORT BufferingQuery : public Query { QGST_WRAPPER_FAKE_SUBCLASS(Buffering, Query) public: @@ -203,7 +203,7 @@ public: /*! \headerfile query.h <QGst/Query> * \brief Wrapper class for queries of type QGst::UriQuery */ -class UriQuery : public Query +class QTGSTREAMER_EXPORT UriQuery : public Query { QGST_WRAPPER_FAKE_SUBCLASS(Uri, Query) public: @@ -216,7 +216,7 @@ public: } //namespace QGst -QGLIB_REGISTER_TYPE(QGst::Query) +QGST_REGISTER_TYPE(QGst::Query) QGST_REGISTER_SUBCLASS(Query, Position) QGST_REGISTER_SUBCLASS(Query, Duration) QGST_REGISTER_SUBCLASS(Query, Latency) diff --git a/src/QGst/streamvolume.h b/src/QGst/streamvolume.h index e646eca..099534e 100644 --- a/src/QGst/streamvolume.h +++ b/src/QGst/streamvolume.h @@ -25,7 +25,7 @@ namespace QGst { /*! \headerfile streamvolume.h <QGst/StreamVolume> * \brief Wrapper class for GstStreamVolume */ -class StreamVolume : public QGlib::Interface +class QTGSTREAMER_EXPORT StreamVolume : public QGlib::Interface { QGST_WRAPPER(StreamVolume) public: @@ -40,7 +40,7 @@ public: } //namespace QGst -QGLIB_REGISTER_TYPE(QGst::StreamVolume) +QGST_REGISTER_TYPE(QGst::StreamVolume) QGLIB_REGISTER_INTERFACE(QGst::StreamVolume) #endif // QGST_STREAMVOLUME_H diff --git a/src/QGst/structs.h b/src/QGst/structs.h index 5be935d..aef86da 100644 --- a/src/QGst/structs.h +++ b/src/QGst/structs.h @@ -17,14 +17,14 @@ #ifndef QGST_STRUCTS_H #define QGST_STRUCTS_H -#include "../QGlib/type.h" +#include "global.h" namespace QGst { /*! \headerfile structs.h <QGst/Fourcc> * \brief Helper structure for accessing Fourcc values */ - struct Fourcc + struct QTGSTREAMER_EXPORT Fourcc { inline Fourcc() { value.as_integer = 0; } @@ -65,13 +65,13 @@ namespace QGst { } value; }; } -QGLIB_REGISTER_TYPE(QGst::Fourcc) +QGST_REGISTER_TYPE(QGst::Fourcc) namespace QGst { /*! \headerfile structs.h <QGst/Fraction> * \brief Helper structure for accessing Fraction values */ - struct Fraction + struct QTGSTREAMER_EXPORT Fraction { inline Fraction() {} inline Fraction(int numerator, int denominator) @@ -81,7 +81,7 @@ namespace QGst { int denominator; }; } -QGLIB_REGISTER_TYPE(QGst::Fraction) +QGST_REGISTER_TYPE(QGst::Fraction) namespace QGst { namespace Private { @@ -117,8 +117,8 @@ namespace QGst { */ typedef Private::Range<Fraction> FractionRange; } -QGLIB_REGISTER_TYPE(QGst::IntRange) -QGLIB_REGISTER_TYPE(QGst::DoubleRange) -QGLIB_REGISTER_TYPE(QGst::FractionRange) +QGST_REGISTER_TYPE(QGst::IntRange) +QGST_REGISTER_TYPE(QGst::DoubleRange) +QGST_REGISTER_TYPE(QGst::FractionRange) #endif // QGST_STRUCTS_H diff --git a/src/QGst/structure.h b/src/QGst/structure.h index 6d3f111..ef0b730 100644 --- a/src/QGst/structure.h +++ b/src/QGst/structure.h @@ -34,7 +34,7 @@ namespace QGst { * \sa SharedStructure */ -class Structure +class QTGSTREAMER_EXPORT Structure { public: Structure(); @@ -88,7 +88,7 @@ protected: * unlike Structure, which always keeps a GstStructure instance for itself. * \sa Structure */ -class SharedStructure : public Structure +class QTGSTREAMER_EXPORT SharedStructure : public Structure { public: virtual ~SharedStructure(); @@ -107,11 +107,11 @@ private: }; /*! \relates QGst::StructureBase */ -QDebug operator<<(QDebug debug, const Structure & structure); +QTGSTREAMER_EXPORT QDebug operator<<(QDebug debug, const Structure & structure); } //namespace QGst -QGLIB_REGISTER_TYPE(QGst::Structure) -QGLIB_REGISTER_TYPE(QGst::SharedStructure) //codegen: GType=GST_TYPE_STRUCTURE +QGST_REGISTER_TYPE(QGst::Structure) +QGST_REGISTER_TYPE(QGst::SharedStructure) //codegen: GType=GST_TYPE_STRUCTURE #endif diff --git a/src/QGst/urihandler.h b/src/QGst/urihandler.h index eafd3a5..4cb8a30 100644 --- a/src/QGst/urihandler.h +++ b/src/QGst/urihandler.h @@ -26,7 +26,7 @@ namespace QGst { /*! \interface UriHandler urihandler.h <QGst/UriHandler> * \brief Wrapper class for GstURIHandler */ -class UriHandler : public QGlib::Interface +class QTGSTREAMER_EXPORT UriHandler : public QGlib::Interface { QGST_WRAPPER_DIFFERENT_C_CLASS(UriHandler, URIHandler) public: @@ -41,7 +41,7 @@ public: } //namespace QGst -QGLIB_REGISTER_TYPE(QGst::UriHandler) +QGST_REGISTER_TYPE(QGst::UriHandler) QGLIB_REGISTER_INTERFACE(QGst::UriHandler) #endif // QGST_URIHANDLER_H diff --git a/src/QGst/videoorientation.h b/src/QGst/videoorientation.h index 60c5ff1..7b7a29b 100644 --- a/src/QGst/videoorientation.h +++ b/src/QGst/videoorientation.h @@ -27,7 +27,7 @@ namespace QGst { /*! \interface VideoOrientation videoorientation.h <QGst/VideoOrientation> * \brief Wrapper class for GstVideoOrientation */ -class VideoOrientation : public QGlib::Interface +class QTGSTREAMER_EXPORT VideoOrientation : public QGlib::Interface { QGST_WRAPPER(VideoOrientation) public: @@ -43,7 +43,7 @@ public: } //namespace QGst -QGLIB_REGISTER_TYPE(QGst::VideoOrientation) +QGST_REGISTER_TYPE(QGst::VideoOrientation) QGLIB_REGISTER_INTERFACE(QGst::VideoOrientation) #endif // QGST_VIDEOORIENTATION_H diff --git a/src/QGst/xoverlay.h b/src/QGst/xoverlay.h index 2db89f9..608ab9f 100644 --- a/src/QGst/xoverlay.h +++ b/src/QGst/xoverlay.h @@ -28,7 +28,7 @@ namespace QGst { /*! \interface XOverlay xoverlay.h <QGst/XOverlay> * \brief Wrapper class for GstXOverlay */ -class XOverlay : public QGlib::Interface +class QTGSTREAMER_EXPORT XOverlay : public QGlib::Interface { QGST_WRAPPER(XOverlay) public: @@ -41,7 +41,7 @@ public: } //namespace QGst -QGLIB_REGISTER_TYPE(QGst::XOverlay) +QGST_REGISTER_TYPE(QGst::XOverlay) QGLIB_REGISTER_INTERFACE(QGst::XOverlay) #endif // QGST_XOVERLAY_H |