QtGStreamer  0.10.2
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator
global.h
00001 /*
00002     Copyright (C) 2010  George Kiagiadakis <kiagiadakis.george@gmail.com>
00003 
00004     This library is free software; you can redistribute it and/or modify
00005     it under the terms of the GNU Lesser General Public License as published
00006     by the Free Software Foundation; either version 2.1 of the License, or
00007     (at your option) any later version.
00008 
00009     This program is distributed in the hope that it will be useful,
00010     but WITHOUT ANY WARRANTY; without even the implied warranty of
00011     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012     GNU Lesser General Public License for more details.
00013 
00014     You should have received a copy of the GNU Lesser General Public License
00015     along with this program.  If not, see <http://www.gnu.org/licenses/>.
00016 */
00017 #ifndef QGST_GLOBAL_H
00018 #define QGST_GLOBAL_H
00019 
00020 // workaround for https://bugreports.qt-project.org/browse/QTBUG-22829
00021 #if defined(Q_MOC_RUN) && !defined(BOOST_TT_HAS_OPERATOR_HPP_INCLUDED)
00022 #define BOOST_TT_HAS_OPERATOR_HPP_INCLUDED
00023 #endif
00024 
00025 #include "../QGlib/type.h"
00026 #include <QtCore/QtGlobal>
00027 #include <QtCore/QDate>
00028 #include <QtCore/QSharedPointer>
00029 
00030 /* defined by cmake when building this library */
00031 #if defined(QtGStreamer_EXPORTS)
00032 # define QTGSTREAMER_EXPORT Q_DECL_EXPORT
00033 #else
00034 # define QTGSTREAMER_EXPORT Q_DECL_IMPORT
00035 #endif
00036 
00037 #if !defined(Q_OS_WIN) && !defined(Q_CC_NOKIAX86) && \
00038     !defined(Q_CC_RVCT) && defined(QT_VISIBILITY_AVAILABLE)
00039 # define QTGSTREAMER_NO_EXPORT __attribute__((visibility("hidden")))
00040 #else
00041 # define QTGSTREAMER_NO_EXPORT
00042 #endif
00043 
00044 #define QGST_REGISTER_TYPE(T) \
00045     QGLIB_REGISTER_TYPE_WITH_EXPORT_MACRO(T, QTGSTREAMER_EXPORT)
00046 
00047 //cyclic dependency, must include after defining the above
00048 #include "enums.h"
00049 
00050 //registered in value.cpp
00051 QGST_REGISTER_TYPE(QDate) //codegen: skip=true
00052 QGST_REGISTER_TYPE(QDateTime) //codegen: skip=true
00053 
00054 
00055 #define QGST_WRAPPER_GSTCLASS_DECLARATION(Class) \
00056     typedef struct _Gst##Class Gst##Class;
00057 
00058 #define QGST_WRAPPER_DIFFERENT_GSTCLASS_DECLARATION(Class, CClass) \
00059     typedef struct _Gst##CClass Gst##Class;
00060 
00061 #define QGST_WRAPPER_REFPOINTER_DECLARATION(Class) \
00062     namespace QGst { \
00063         class Class; \
00064         typedef QGlib::RefPointer<Class> Class##Ptr; \
00065     }
00066 
00067 #define QGST_WRAPPER_DECLARATION(Class) \
00068     QGST_WRAPPER_GSTCLASS_DECLARATION(Class) \
00069     QGST_WRAPPER_REFPOINTER_DECLARATION(Class)
00070 
00071 QGST_WRAPPER_DECLARATION(Bin)
00072 QGST_WRAPPER_DECLARATION(Bus)
00073 QGST_WRAPPER_DECLARATION(Caps)
00074 QGST_WRAPPER_DECLARATION(ChildProxy)
00075 QGST_WRAPPER_DECLARATION(Clock)
00076 QGST_WRAPPER_DECLARATION(ColorBalanceChannel)
00077 QGST_WRAPPER_DECLARATION(ColorBalance)
00078 QGST_WRAPPER_DECLARATION(Element)
00079 QGST_WRAPPER_DECLARATION(ElementFactory)
00080 QGST_WRAPPER_DECLARATION(GhostPad)
00081 QGST_WRAPPER_DECLARATION(Message)
00082 QGST_WRAPPER_REFPOINTER_DECLARATION(EosMessage)
00083 QGST_WRAPPER_REFPOINTER_DECLARATION(ErrorMessage)
00084 QGST_WRAPPER_REFPOINTER_DECLARATION(WarningMessage)
00085 QGST_WRAPPER_REFPOINTER_DECLARATION(InfoMessage)
00086 QGST_WRAPPER_REFPOINTER_DECLARATION(TagMessage)
00087 QGST_WRAPPER_REFPOINTER_DECLARATION(BufferingMessage)
00088 QGST_WRAPPER_REFPOINTER_DECLARATION(StateChangedMessage)
00089 QGST_WRAPPER_REFPOINTER_DECLARATION(StepDoneMessage)
00090 QGST_WRAPPER_REFPOINTER_DECLARATION(StreamStatusMessage)
00091 QGST_WRAPPER_REFPOINTER_DECLARATION(ApplicationMessage)
00092 QGST_WRAPPER_REFPOINTER_DECLARATION(ElementMessage)
00093 QGST_WRAPPER_REFPOINTER_DECLARATION(SegmentDoneMessage)
00094 QGST_WRAPPER_REFPOINTER_DECLARATION(DurationMessage)
00095 QGST_WRAPPER_REFPOINTER_DECLARATION(LatencyMessage)
00096 QGST_WRAPPER_REFPOINTER_DECLARATION(AsyncDoneMessage)
00097 QGST_WRAPPER_REFPOINTER_DECLARATION(RequestStateMessage)
00098 QGST_WRAPPER_REFPOINTER_DECLARATION(StepStartMessage)
00099 QGST_WRAPPER_REFPOINTER_DECLARATION(QosMessage)
00100 QGST_WRAPPER_DECLARATION(MiniObject)
00101 QGST_WRAPPER_DECLARATION(Object)
00102 QGST_WRAPPER_DECLARATION(Pad)
00103 QGST_WRAPPER_DECLARATION(Pipeline)
00104 QGST_WRAPPER_DECLARATION(PluginFeature)
00105 QGST_WRAPPER_DECLARATION(PropertyProbe)
00106 QGST_WRAPPER_DECLARATION(Query)
00107 QGST_WRAPPER_REFPOINTER_DECLARATION(PositionQuery)
00108 QGST_WRAPPER_REFPOINTER_DECLARATION(DurationQuery)
00109 QGST_WRAPPER_REFPOINTER_DECLARATION(LatencyQuery)
00110 QGST_WRAPPER_REFPOINTER_DECLARATION(SeekingQuery)
00111 QGST_WRAPPER_REFPOINTER_DECLARATION(SegmentQuery)
00112 QGST_WRAPPER_REFPOINTER_DECLARATION(ConvertQuery)
00113 QGST_WRAPPER_REFPOINTER_DECLARATION(FormatsQuery)
00114 QGST_WRAPPER_REFPOINTER_DECLARATION(BufferingQuery)
00115 QGST_WRAPPER_REFPOINTER_DECLARATION(UriQuery)
00116 QGST_WRAPPER_DECLARATION(Buffer)
00117 QGST_WRAPPER_DECLARATION(BufferList)
00118 QGST_WRAPPER_GSTCLASS_DECLARATION(BufferListIterator)
00119 QGST_WRAPPER_DECLARATION(Event)
00120 QGST_WRAPPER_REFPOINTER_DECLARATION(FlushStartEvent)
00121 QGST_WRAPPER_REFPOINTER_DECLARATION(FlushStopEvent)
00122 QGST_WRAPPER_REFPOINTER_DECLARATION(EosEvent)
00123 QGST_WRAPPER_REFPOINTER_DECLARATION(NewSegmentEvent)
00124 QGST_WRAPPER_REFPOINTER_DECLARATION(TagEvent)
00125 QGST_WRAPPER_REFPOINTER_DECLARATION(BufferSizeEvent)
00126 QGST_WRAPPER_REFPOINTER_DECLARATION(SinkMessageEvent)
00127 QGST_WRAPPER_REFPOINTER_DECLARATION(QosEvent)
00128 QGST_WRAPPER_REFPOINTER_DECLARATION(SeekEvent)
00129 QGST_WRAPPER_REFPOINTER_DECLARATION(NavigationEvent)
00130 QGST_WRAPPER_REFPOINTER_DECLARATION(LatencyEvent)
00131 QGST_WRAPPER_REFPOINTER_DECLARATION(StepEvent)
00132 QGST_WRAPPER_DECLARATION(StreamVolume)
00133 QGST_WRAPPER_GSTCLASS_DECLARATION(Structure)
00134 QGST_WRAPPER_DIFFERENT_GSTCLASS_DECLARATION(TagList,Structure)
00135 
00136 namespace QGst {
00137     class Structure;
00138     class SharedStructure;
00139     typedef QSharedPointer<SharedStructure> StructurePtr;
00140 }
00141 QGST_WRAPPER_GSTCLASS_DECLARATION(URIHandler)
00142 QGST_WRAPPER_REFPOINTER_DECLARATION(UriHandler)
00143 QGST_WRAPPER_DECLARATION(VideoOrientation)
00144 QGST_WRAPPER_DECLARATION(XOverlay)
00145 
00146 #undef QGST_WRAPPER_DECLARATION
00147 #undef QGST_WRAPPER_REFPOINTER_DECLARATION
00148 #undef QGST_WRAPPER_GSTCLASS_DECLARATION
00149 
00150 
00151 #define QGST_WRAPPER(Class) \
00152     QGLIB_WRAPPER_DECLARATION_MACRO(Class, Class, Gst, Class)
00153 
00154 #define QGST_WRAPPER_DIFFERENT_C_CLASS(Class, CClass) \
00155     QGLIB_WRAPPER_DECLARATION_MACRO(Class, CClass, Gst, Class)
00156 
00157 #define QGST_WRAPPER_FAKE_SUBCLASS(Sub, Class) \
00158     QGLIB_WRAPPER_DECLARATION_MACRO(Sub##Class, Class, Gst, Class)
00159 
00160 #define QGST_REGISTER_SUBCLASS(BASECLASS, TYPE) \
00161     namespace QGlib { \
00162         template <> \
00163         struct GetTypeImpl<QGst::TYPE##BASECLASS> { \
00164             inline operator Type() { return GetType<QGst::BASECLASS>(); }; \
00165         }; \
00166     }
00167 
00168 #endif