QtGStreamer  0.10.2
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator
enums.h
00001 /*
00002     Copyright (C) 2010  George Kiagiadakis <kiagiadakis.george@gmail.com>
00003     Copyright (C) 2010  Collabora Multimedia.
00004       @author Mauricio Piacentini <mauricio.piacentini@collabora.co.uk>
00005 
00006     This library is free software; you can redistribute it and/or modify
00007     it under the terms of the GNU Lesser General Public License as published
00008     by the Free Software Foundation; either version 2.1 of the License, or
00009     (at your option) any later version.
00010 
00011     This program is distributed in the hope that it will be useful,
00012     but WITHOUT ANY WARRANTY; without even the implied warranty of
00013     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014     GNU Lesser General Public License for more details.
00015 
00016     You should have received a copy of the GNU Lesser General Public License
00017     along with this program.  If not, see <http://www.gnu.org/licenses/>.
00018 */
00019 #ifndef QGST_ENUMS_H
00020 #define QGST_ENUMS_H
00021 
00022 #include "global.h"
00023 #include <QtCore/QFlags>
00024 
00025 namespace QGst {
00026     enum MiniObjectFlag {
00027         MiniObjectFlagReadonly = (1<<0),
00028         /*padding*/
00029         MiniObjectFlagLast = (1<<4)
00030     };
00031     Q_DECLARE_FLAGS(MiniObjectFlags, MiniObjectFlag);
00032     Q_DECLARE_OPERATORS_FOR_FLAGS(MiniObjectFlags);
00033 }
00034 QGST_REGISTER_TYPE(QGst::MiniObjectFlags);
00035 
00036 
00037 namespace QGst {
00038     enum ObjectFlag {
00039         ObjectDisposing = (1<<0),
00040         ObjectFloating = (1<<1),
00041         /*padding*/
00042         ObjectFlagLast = (1<<4)
00043     };
00044     Q_DECLARE_FLAGS(ObjectFlags, ObjectFlag);
00045     Q_DECLARE_OPERATORS_FOR_FLAGS(ObjectFlags);
00046 }
00047 QGST_REGISTER_TYPE(QGst::ObjectFlags);
00048 
00049 
00050 namespace QGst {
00051     enum State {
00052         StateVoidPending = 0,
00053         StateNull = 1,
00054         StateReady = 2,
00055         StatePaused = 3,
00056         StatePlaying = 4
00057     };
00058 }
00059 QGST_REGISTER_TYPE(QGst::State)
00060 
00061 namespace QGst {
00062     enum StateChange {
00063         StateChangeNullToReady = (StateNull<<3) | StateReady,
00064         StateChangeReadyToPaused = (StateReady<<3) | StatePaused,
00065         StateChangePausedToPlaying = (StatePaused<<3) | StatePlaying,
00066         StateChangePlayingToPaused = (StatePlaying<<3) | StatePaused,
00067         StateChangePausedToReady = (StatePaused<<3) | StateReady,
00068         StateChangeReadyToNull = (StateReady<<3) | StateNull
00069     };
00070 }
00071 QGST_REGISTER_TYPE(QGst::StateChange)
00072 
00073 namespace QGst {
00074     enum StateChangeReturn {
00075         StateChangeFailure = 0,
00076         StateChangeSuccess = 1,
00077         StateChangeAsync = 2,
00078         StateChangeNoPreroll = 3
00079     };
00080 }
00081 QGST_REGISTER_TYPE(QGst::StateChangeReturn)
00082 
00083 
00084 namespace QGst {
00085     enum PadDirection {
00086         PadUnknown,
00087         PadSrc,
00088         PadSink
00089     };
00090 }
00091 QGST_REGISTER_TYPE(QGst::PadDirection)
00092 
00093 namespace QGst {
00094     enum PadFlag {
00095         //codegen: PadInGetCaps=PAD_IN_GETCAPS, PadInSetCaps=PAD_IN_SETCAPS
00096         PadBlocked = (ObjectFlagLast << 0),
00097         PadFlushing = (ObjectFlagLast << 1),
00098         PadInGetCaps = (ObjectFlagLast << 2),
00099         PadInSetCaps = (ObjectFlagLast << 3),
00100         PadBlocking = (ObjectFlagLast << 4),
00101         /*padding*/
00102         PadFlagLast = (ObjectFlagLast << 8)
00103     };
00104     Q_DECLARE_FLAGS(PadFlags, PadFlag);
00105     Q_DECLARE_OPERATORS_FOR_FLAGS(PadFlags);
00106 }
00107 QGST_REGISTER_TYPE(QGst::PadFlags);
00108 
00109 namespace QGst {
00110     enum PadLinkReturn {
00111         //codegen: PadLinkNoFormat=PAD_LINK_NOFORMAT, PadLinkNoSched=PAD_LINK_NOSCHED
00112         PadLinkOk = 0,
00113         PadLinkWrongHierarchy = -1,
00114         PadLinkWasLinked = -2,
00115         PadLinkWrongDirection = -3,
00116         PadLinkNoFormat = -4,
00117         PadLinkNoSched = -5,
00118         PadLinkRefused = -6
00119     };
00120 }
00121 QGST_REGISTER_TYPE(QGst::PadLinkReturn)
00122 
00123 namespace QGst {
00124     enum FlowReturn {
00125         FlowCustomSuccess = 100,
00126         FlowResend = 1,
00127         FlowOk = 0,
00128         FlowNotLinked = -1,
00129         FlowWrongState = -2,
00130         FlowUnexpected = -3,
00131         FlowNotNegotiated = -4,
00132         FlowError = -5,
00133         FlowNotSupported = -6,
00134         FlowCustomError = -100
00135     };
00136 }
00137 QGST_REGISTER_TYPE(QGst::FlowReturn)
00138 
00139 namespace QGst {
00140     enum ActivateMode {
00141         ActivateNone,
00142         ActivatePush,
00143         ActivatePull
00144     };
00145 }
00146 QGST_REGISTER_TYPE(QGst::ActivateMode)
00147 
00148 
00149 namespace QGst {
00150     enum Rank {
00151         RankNone = 0,
00152         RankMarginal = 64,
00153         RankSecondary = 128,
00154         RankPrimary = 256
00155     };
00156 }
00157 QGST_REGISTER_TYPE(QGst::Rank)
00158 
00159 
00160 namespace QGst {
00161     enum MessageType {
00162         MessageUnknown         = 0,
00163         MessageEos             = (1 << 0),
00164         MessageError           = (1 << 1),
00165         MessageWarning         = (1 << 2),
00166         MessageInfo            = (1 << 3),
00167         MessageTag             = (1 << 4),
00168         MessageBuffering       = (1 << 5),
00169         MessageStateChanged    = (1 << 6),
00170         MessageStateDirty      = (1 << 7),
00171         MessageStepDone        = (1 << 8),
00172         MessageClockProvide    = (1 << 9),
00173         MessageClockLost       = (1 << 10),
00174         MessageNewClock        = (1 << 11),
00175         MessageStructureChange = (1 << 12),
00176         MessageStreamStatus    = (1 << 13),
00177         MessageApplication     = (1 << 14),
00178         MessageElement         = (1 << 15),
00179         MessageSegmentStart    = (1 << 16),
00180         MessageSegmentDone     = (1 << 17),
00181         MessageDuration        = (1 << 18),
00182         MessageLatency         = (1 << 19),
00183         MessageAsyncStart      = (1 << 20),
00184         MessageAsyncDone       = (1 << 21),
00185         MessageRequestState    = (1 << 22),
00186         MessageStepStart       = (1 << 23),
00187         MessageQos             = (1 << 24),
00188         MessageAny             = ~0
00189     };
00190 }
00191 QGST_REGISTER_TYPE(QGst::MessageType)
00192 
00193 
00194 namespace QGst {
00195     enum ParseError {
00196         ParseErrorSyntax,
00197         ParseErrorNoSuchElement,
00198         ParseErrorNoSuchProperty,
00199         ParseErrorLink,
00200         ParseErrorCouldNotSetProperty,
00201         ParseErrorEmptyBin,
00202         ParseErrorEmpty
00203     };
00204 }
00205 QGST_REGISTER_TYPE(QGst::ParseError)
00206 
00207 
00208 namespace QGst {
00209     enum UriType {
00210         UriUnknown,
00211         UriSink,
00212         UriSrc
00213     };
00214 }
00215 QGST_REGISTER_TYPE(QGst::UriType)
00216 
00217 namespace QGst {
00218     enum BufferingMode {
00219         BufferingStream,
00220         BufferingDownload,
00221         BufferingTimeshift,
00222         BufferingLive
00223     };
00224 }
00225 QGST_REGISTER_TYPE(QGst::BufferingMode)
00226 
00227 namespace QGst {
00228     enum Format {
00229         FormatUndefined,
00230         FormatDefault,
00231         FormatBytes,
00232         FormatTime,
00233         FormatBuffers,
00234         FormatPercent
00235     };
00236 }
00237 QGST_REGISTER_TYPE(QGst::Format)
00238 
00239 namespace QGst {
00240     enum StreamStatusType {
00241         StreamStatusTypeCreate = 0,
00242         StreamStatusTypeEnter = 1,
00243         StreamStatusTypeLeave = 2,
00244         StreamStatusTypeDestroy = 3,
00245         StreamStatusTypeStart = 8,
00246         StreamStatusTypePause = 9,
00247         StreamStatusTypeStop = 10
00248     };
00249 }
00250 QGST_REGISTER_TYPE(QGst::StreamStatusType)
00251 
00252 namespace QGst {
00253     enum StreamVolumeFormat {
00254         StreamVolumeFormatLinear,
00255         StreamVolumeFormatCubic,
00256         StreamVolumeFormatDb
00257     };
00258 }
00259 QGST_REGISTER_TYPE(QGst::StreamVolumeFormat)
00260 
00261 namespace QGst {
00262     enum ColorBalanceType {
00263         ColorBalanceHardware,
00264         ColorBalanceSoftware
00265     };
00266 }
00267 QGST_REGISTER_TYPE(QGst::ColorBalanceType)
00268 
00269 namespace QGst {
00270     enum QueryType {
00271         QueryNone = 0,
00272         QueryPosition,
00273         QueryDuration,
00274         QueryLatency,
00275         QueryJitter,
00276         QueryRate,
00277         QuerySeeking,
00278         QuerySegment,
00279         QueryConvert,
00280         QueryFormats,
00281         QueryBuffering,
00282         QueryCustom,
00283         QueryUri
00284     };
00285 }
00286 QGST_REGISTER_TYPE(QGst::QueryType)
00287 
00288 namespace QGst {
00289     enum BufferFlag {
00290         //codegen: BufferFlagReadOnly=BUFFER_FLAG_READONLY
00291         BufferFlagReadOnly = MiniObjectFlagReadonly,
00292         BufferFlagPreroll  = (MiniObjectFlagLast << 0),
00293         BufferFlagDiscont = (MiniObjectFlagLast << 1),
00294         BufferFlagInCaps = (MiniObjectFlagLast << 2),
00295         BufferFlagGap = (MiniObjectFlagLast << 3),
00296         BufferFlagDeltaUnit = (MiniObjectFlagLast << 4),
00297         BufferFlagMedia1 = (MiniObjectFlagLast << 5),
00298         BufferFlagMedia2 = (MiniObjectFlagLast << 6),
00299         BufferFlagMedia3 = (MiniObjectFlagLast << 7),
00300         BufferFlagLast = (MiniObjectFlagLast << 8)
00301     };
00302     Q_DECLARE_FLAGS(BufferFlags, BufferFlag);
00303     Q_DECLARE_OPERATORS_FOR_FLAGS(BufferFlags)
00304 }
00305 QGST_REGISTER_TYPE(QGst::BufferFlags) //codegen: GType=GST_TYPE_BUFFER_FLAG
00306 
00307 
00308 namespace QGst {
00309     enum EventTypeFlag {
00310         EventTypeUpstream = 1 << 0,
00311         EventTypeDownstream = 1 << 1,
00312         EventTypeSerialized = 1 << 2,
00313         EventTypeBoth = (EventTypeUpstream | EventTypeDownstream)
00314     };
00315     Q_DECLARE_FLAGS(EventTypeFlags, EventTypeFlag);
00316     Q_DECLARE_OPERATORS_FOR_FLAGS(EventTypeFlags)
00317 }
00318 QGST_REGISTER_TYPE(QGst::EventTypeFlags)
00319 
00320 namespace QGst {
00321     enum EventType {
00322         //codegen: EventNewSegment=EVENT_NEWSEGMENT, EventBufferSize=EVENT_BUFFERSIZE
00323         EventUnknown = (0 << 4),
00324         EventFlushStart = (1 << 4) | EventTypeBoth,
00325         EventFlushStop = (2 << 4) | EventTypeBoth | EventTypeSerialized,
00326         EventEos = (5 << 4) | EventTypeDownstream | EventTypeSerialized,
00327         EventNewSegment = (6 << 4) | EventTypeDownstream | EventTypeSerialized,
00328         EventTag = (7 << 4) | EventTypeDownstream | EventTypeSerialized,
00329         EventBufferSize = (8 << 4) | EventTypeDownstream | EventTypeSerialized,
00330         EventSinkMessage = (9 << 4) | EventTypeDownstream | EventTypeSerialized,
00331         EventQos = (15 << 4) | EventTypeUpstream,
00332         EventSeek = (16 << 4) | EventTypeUpstream,
00333         EventNavigation = (17 << 4) | EventTypeUpstream,
00334         EventLatency = (18 << 4) | EventTypeUpstream,
00335         EventStep = (19 << 4) | EventTypeUpstream,
00336         EventCustomUpstream = (32 << 4) | EventTypeUpstream,
00337         EventCustomDownstream = (32 << 4) | EventTypeDownstream | EventTypeSerialized,
00338         EventCustomDownstreamOob = (32 << 4) | EventTypeDownstream,
00339         EventCustomBoth = (32 << 4) | EventTypeBoth | EventTypeSerialized,
00340         EventCustomBothOob = (32 << 4) | EventTypeBoth
00341     };
00342 }
00343 QGST_REGISTER_TYPE(QGst::EventType)
00344 
00345 namespace QGst {
00346     enum SeekFlag {
00347         SeekFlagNone = 0,
00348         SeekFlagFlush = (1 << 0),
00349         SeekFlagAccurate = (1 << 1),
00350         SeekFlagKeyUnit = (1 << 2),
00351         SeekFlagSegment = (1 << 3),
00352         SeekFlagSkip = (1 << 4)
00353     };
00354     Q_DECLARE_FLAGS(SeekFlags, SeekFlag);
00355     Q_DECLARE_OPERATORS_FOR_FLAGS(SeekFlags)
00356 }
00357 QGST_REGISTER_TYPE(QGst::SeekFlags)
00358 
00359 namespace QGst {
00360     enum SeekType {
00361         SeekTypeNone = 0,
00362         SeekTypeCur = 1,
00363         SeekTypeSet = 2,
00364         SeekTypeEnd = 3
00365     };
00366 }
00367 QGST_REGISTER_TYPE(QGst::SeekType)
00368 
00369 namespace QGst {
00370     enum TagMergeMode {
00371         TagMergeUndefined,
00372         TagMergeReplaceAll,
00373         TagMergeReplace,
00374         TagMergeAppend,
00375         TagMergePrepend,
00376         TagMergeKeep,
00377         TagMergeKeepAll,
00378         // add more
00379         TagMergeCount
00380     };
00381 }
00382 QGST_REGISTER_TYPE(QGst::TagMergeMode)
00383 
00384 namespace QGst {
00385     enum TagFlag {
00386         TagFlagUndefined,
00387         TagFlagMeta,
00388         TagFlagEncoded,
00389         TagFlagDecoded,
00390         TagFlagCount
00391     };
00392     Q_DECLARE_FLAGS(TagFlags, TagFlag);
00393 }
00394 Q_DECLARE_OPERATORS_FOR_FLAGS(QGst::TagFlags)
00395 QGST_REGISTER_TYPE(QGst::TagFlags) //codegen: GType=GST_TYPE_TAG_FLAG
00396 
00397 namespace QGst {
00398     enum AppStreamType {
00400         AppStreamTypeStream,
00403         AppStreamTypeSeekable,
00405         AppStreamTypeRandomAccess
00406     };
00407 }
00408 //FIXME: GST_TYPE_APP_STREAM_TYPE is not exported from libgstapp,
00409 //so we have to reside in this method...
00410 namespace QGlib {
00411     template <>
00412     struct GetTypeImpl<QGst::AppStreamType>
00413     {
00414         inline operator Type() { return Type::fromName("GstAppStreamType"); }
00415     };
00416 }
00417 
00418 #endif