QtGStreamer  1.2.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
enums.h
1 /*
2  Copyright (C) 2010 George Kiagiadakis <kiagiadakis.george@gmail.com>
3  Copyright (C) 2010 Collabora Multimedia.
4  @author Mauricio Piacentini <mauricio.piacentini@collabora.co.uk>
5 
6  This library is free software; you can redistribute it and/or modify
7  it under the terms of the GNU Lesser General Public License as published
8  by the Free Software Foundation; either version 2.1 of the License, or
9  (at your option) any later version.
10 
11  This program is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU Lesser General Public License for more details.
15 
16  You should have received a copy of the GNU Lesser General Public License
17  along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19 #ifndef QGST_ENUMS_H
20 #define QGST_ENUMS_H
21 
22 #include "global.h"
23 #include <QtCore/QFlags>
24 
25 namespace QGst {
26  enum MiniObjectFlag {
27  MiniObjectFlagLockable = (1<<0),
28  MiniObjectFlagLockReadonly = (1<<1),
29  /*padding*/
30  MiniObjectFlagLast = (1<<4)
31  };
32  Q_DECLARE_FLAGS(MiniObjectFlags, MiniObjectFlag);
33  Q_DECLARE_OPERATORS_FOR_FLAGS(MiniObjectFlags);
34 }
35 QGST_REGISTER_TYPE(QGst::MiniObjectFlags);
36 
37 
38 namespace QGst {
39  enum ObjectFlag {
40  /*padding*/
41  ObjectFlagLast = (1<<4)
42  };
43  Q_DECLARE_FLAGS(ObjectFlags, ObjectFlag);
44  Q_DECLARE_OPERATORS_FOR_FLAGS(ObjectFlags);
45 }
46 QGST_REGISTER_TYPE(QGst::ObjectFlags);
47 
48 
49 namespace QGst {
50  enum State {
51  StateVoidPending = 0,
52  StateNull = 1,
53  StateReady = 2,
54  StatePaused = 3,
55  StatePlaying = 4
56  };
57 }
58 QGST_REGISTER_TYPE(QGst::State)
59 
60 namespace QGst {
61  enum StateChange {
62  StateChangeNullToReady = (StateNull<<3) | StateReady,
63  StateChangeReadyToPaused = (StateReady<<3) | StatePaused,
64  StateChangePausedToPlaying = (StatePaused<<3) | StatePlaying,
65  StateChangePlayingToPaused = (StatePlaying<<3) | StatePaused,
66  StateChangePausedToReady = (StatePaused<<3) | StateReady,
67  StateChangeReadyToNull = (StateReady<<3) | StateNull
68  };
69 }
70 QGST_REGISTER_TYPE(QGst::StateChange)
71 
72 namespace QGst {
73  enum StateChangeReturn {
74  StateChangeFailure = 0,
75  StateChangeSuccess = 1,
76  StateChangeAsync = 2,
77  StateChangeNoPreroll = 3
78  };
79 }
80 QGST_REGISTER_TYPE(QGst::StateChangeReturn)
81 
82 
83 namespace QGst {
84  enum PadDirection {
85  PadUnknown,
86  PadSrc,
87  PadSink
88  };
89 }
90 QGST_REGISTER_TYPE(QGst::PadDirection)
91 
92 namespace QGst {
93  enum PadFlag {
94  PadFlagBlocked = (ObjectFlagLast << 0),
95  PadFlagFlushing = (ObjectFlagLast << 1),
96  PadFlagEos = (ObjectFlagLast << 2),
97  PadFlagBlocking = (ObjectFlagLast << 3),
98  PadFlagNeedParent = (ObjectFlagLast << 4),
99  PadFlagNeedReconfigure = (ObjectFlagLast << 5),
100  PadFlagPendingEvents = (ObjectFlagLast << 6),
101  PadFlagFixedCaps = (ObjectFlagLast << 7),
102  PadFlagProxyCaps = (ObjectFlagLast << 8),
103  PadFlagProxyAllocation = (ObjectFlagLast << 9),
104  PadFlagProxyScheduling = (ObjectFlagLast << 10),
105  /*padding*/
106  PadFlagLast = (ObjectFlagLast << 16)
107  };
108  Q_DECLARE_FLAGS(PadFlags, PadFlag);
109  Q_DECLARE_OPERATORS_FOR_FLAGS(PadFlags);
110 }
111 QGST_REGISTER_TYPE(QGst::PadFlags);
112 
113 namespace QGst {
114  enum PadLinkReturn {
115  //codegen: PadLinkNoFormat=PAD_LINK_NOFORMAT, PadLinkNoSched=PAD_LINK_NOSCHED
116  PadLinkOk = 0,
117  PadLinkWrongHierarchy = -1,
118  PadLinkWasLinked = -2,
119  PadLinkWrongDirection = -3,
120  PadLinkNoFormat = -4,
121  PadLinkNoSched = -5,
122  PadLinkRefused = -6
123  };
124 }
125 QGST_REGISTER_TYPE(QGst::PadLinkReturn)
126 
127 namespace QGst {
128  enum FlowReturn {
129  //codegen: FlowCustomSuccess2=FLOW_CUSTOM_SUCCESS_2, FlowCustomSuccess1=FLOW_CUSTOM_SUCCESS_1, FlowCustomError1=FLOW_CUSTOM_ERROR_1, FlowCustomError2=FLOW_CUSTOM_ERROR_2
130  FlowCustomSuccess2 = 102,
131  FlowCustomSuccess1 = 101,
132  FlowCustomSuccess = 100,
133  FlowOk = 0,
134  FlowNotLinked = -1,
135  FlowFlushing = -2,
136  FlowEos = -3,
137  FlowNotNegotiated = -4,
138  FlowError = -5,
139  FlowNotSupported = -6,
140  FlowCustomError = -100,
141  FlowCustomError1 = -101,
142  FlowCustomError2 = -102
143  };
144 }
145 QGST_REGISTER_TYPE(QGst::FlowReturn)
146 
147 namespace QGst {
148  enum PadMode {
149  PadModeNone,
150  PadModePush,
151  PadModePull
152  };
153 }
154 QGST_REGISTER_TYPE(QGst::PadMode)
155 
156 
157 namespace QGst {
158  enum Rank {
159  RankNone = 0,
160  RankMarginal = 64,
161  RankSecondary = 128,
162  RankPrimary = 256
163  };
164 }
165 QGST_REGISTER_TYPE(QGst::Rank)
166 
167 
168 namespace QGst {
169  enum MessageType {
170  MessageUnknown = 0,
171  MessageEos = (1 << 0),
172  MessageError = (1 << 1),
173  MessageWarning = (1 << 2),
174  MessageInfo = (1 << 3),
175  MessageTag = (1 << 4),
176  MessageBuffering = (1 << 5),
177  MessageStateChanged = (1 << 6),
178  MessageStateDirty = (1 << 7),
179  MessageStepDone = (1 << 8),
180  MessageClockProvide = (1 << 9),
181  MessageClockLost = (1 << 10),
182  MessageNewClock = (1 << 11),
183  MessageStructureChange = (1 << 12),
184  MessageStreamStatus = (1 << 13),
185  MessageApplication = (1 << 14),
186  MessageElement = (1 << 15),
187  MessageSegmentStart = (1 << 16),
188  MessageSegmentDone = (1 << 17),
189  MessageDurationChanged = (1 << 18),
190  MessageLatency = (1 << 19),
191  MessageAsyncStart = (1 << 20),
192  MessageAsyncDone = (1 << 21),
193  MessageRequestState = (1 << 22),
194  MessageStepStart = (1 << 23),
195  MessageQos = (1 << 24),
196  MessageAny = ~0
197  };
198 }
199 QGST_REGISTER_TYPE(QGst::MessageType)
200 
201 
202 namespace QGst {
203  enum ParseError {
204  ParseErrorSyntax,
205  ParseErrorNoSuchElement,
206  ParseErrorNoSuchProperty,
207  ParseErrorLink,
208  ParseErrorCouldNotSetProperty,
209  ParseErrorEmptyBin,
210  ParseErrorEmpty
211  };
212 }
213 QGST_REGISTER_TYPE(QGst::ParseError)
214 
215 
216 namespace QGst {
217  enum UriType {
218  UriUnknown,
219  UriSink,
220  UriSrc
221  };
222 }
223 QGST_REGISTER_TYPE(QGst::UriType)
224 
225 namespace QGst {
226  enum BufferingMode {
227  BufferingStream,
228  BufferingDownload,
229  BufferingTimeshift,
230  BufferingLive
231  };
232 }
233 QGST_REGISTER_TYPE(QGst::BufferingMode)
234 
235 namespace QGst {
236  enum Format {
237  FormatUndefined,
238  FormatDefault,
239  FormatBytes,
240  FormatTime,
241  FormatBuffers,
242  FormatPercent
243  };
244 }
245 QGST_REGISTER_TYPE(QGst::Format)
246 
247 namespace QGst {
248  enum StreamStatusType {
249  StreamStatusTypeCreate = 0,
250  StreamStatusTypeEnter = 1,
251  StreamStatusTypeLeave = 2,
252  StreamStatusTypeDestroy = 3,
253  StreamStatusTypeStart = 8,
254  StreamStatusTypePause = 9,
255  StreamStatusTypeStop = 10
256  };
257 }
258 QGST_REGISTER_TYPE(QGst::StreamStatusType)
259 
260 namespace QGst {
261  enum StreamVolumeFormat {
262  StreamVolumeFormatLinear,
263  StreamVolumeFormatCubic,
264  StreamVolumeFormatDb
265  };
266 }
267 //QGST_REGISTER_TYPE(QGst::StreamVolumeFormat)
268 
269 namespace QGst {
270  enum ColorBalanceType {
271  ColorBalanceHardware,
272  ColorBalanceSoftware
273  };
274 }
275 QGST_REGISTER_TYPE(QGst::ColorBalanceType)
276 
277 namespace QGst {
278  enum QueryTypeFlag {
279  QueryTypeUpstream = 1 << 0,
280  QueryTypeDownstream = 1 << 1,
281  QueryTypeSerialized = 1 << 2,
282  QueryTypeBoth = (QueryTypeUpstream | QueryTypeDownstream)
283  };
284  Q_DECLARE_FLAGS(QueryTypeFlags, QueryTypeFlag);
285  Q_DECLARE_OPERATORS_FOR_FLAGS(QueryTypeFlags)
286 }
287 QGST_REGISTER_TYPE(QGst::QueryTypeFlags)
288 
289 namespace QGst {
290  enum QueryType {
291  QueryUnknown = 0,
292  QueryPosition = (10 << 8) | QueryTypeBoth,
293  QueryDuration = (20 << 8) | QueryTypeBoth,
294  QueryLatency = (30 << 8) | QueryTypeBoth,
295  QueryJitter = (40 << 8) | QueryTypeBoth,
296  QueryRate = (50 << 8) | QueryTypeBoth,
297  QuerySeeking = (60 << 8) | QueryTypeBoth,
298  QuerySegment = (70 << 8) | QueryTypeBoth,
299  QueryConvert = (80 << 8) | QueryTypeBoth,
300  QueryFormats = (90 << 8) | QueryTypeBoth,
301  QueryBuffering = (110 << 8) | QueryTypeBoth,
302  QueryCustom = (120 << 8) | QueryTypeBoth,
303  QueryUri = (130 << 8) | QueryTypeBoth,
304  QueryAllocation = (140 << 8) | QueryTypeDownstream | QueryTypeSerialized,
305  QueryScheduling = (150 << 8) | QueryTypeUpstream,
306  QueryAcceptCaps = (160 << 8) | QueryTypeBoth,
307  QueryCaps = (170 << 8) | QueryTypeBoth,
308  QueryDrain = (180 << 8) | QueryTypeDownstream | QueryTypeSerialized,
309  QueryContext = (190 << 8) | QueryTypeBoth
310  };
311 }
312 QGST_REGISTER_TYPE(QGst::QueryType)
313 
314 namespace QGst {
315  enum BufferFlag {
316  BufferFlagLive = (MiniObjectFlagLast << 0),
317  BufferFlagDecodeOnly = (MiniObjectFlagLast << 1),
318  BufferFlagDiscont = (MiniObjectFlagLast << 2),
319  BufferFlagResync = (MiniObjectFlagLast << 3),
320  BufferFlagCorrupted = (MiniObjectFlagLast << 4),
321  BufferFlagMarker = (MiniObjectFlagLast << 5),
322  BufferFlagHeader = (MiniObjectFlagLast << 6),
323  BufferFlagGap = (MiniObjectFlagLast << 7),
324  BufferFlagDroppable = (MiniObjectFlagLast << 8),
325  BufferFlagDeltaUnit = (MiniObjectFlagLast << 9),
326  BufferFlagLast = (MiniObjectFlagLast << 16)
327  };
328  Q_DECLARE_FLAGS(BufferFlags, BufferFlag);
329  Q_DECLARE_OPERATORS_FOR_FLAGS(BufferFlags)
330 }
331 QGST_REGISTER_TYPE(QGst::BufferFlags)
332 
333 
334 namespace QGst {
335  enum EventTypeFlag {
336  EventTypeUpstream = 1 << 0,
337  EventTypeDownstream = 1 << 1,
338  EventTypeSerialized = 1 << 2,
339  EventTypeSticky = 1 << 3,
340  EventTypeStickyMulti = 1 << 4,
341  EventTypeBoth = (EventTypeUpstream | EventTypeDownstream)
342  };
343  Q_DECLARE_FLAGS(EventTypeFlags, EventTypeFlag);
344  Q_DECLARE_OPERATORS_FOR_FLAGS(EventTypeFlags)
345 }
346 QGST_REGISTER_TYPE(QGst::EventTypeFlags)
347 
348 namespace QGst {
349  enum EventType {
350  //codegen: EventBufferSize=EVENT_BUFFERSIZE
351  EventUnknown = (0 << 8),
352  EventFlushStart = (10 << 8) | EventTypeBoth,
353  EventFlushStop = (20 << 8) | EventTypeBoth | EventTypeSerialized,
354 
355  /* downstream */
356  EventStreamStart = (40 << 8) | EventTypeDownstream | EventTypeSerialized | EventTypeSticky,
357  EventCaps = (50 << 8) | EventTypeDownstream | EventTypeSerialized | EventTypeSticky,
358  EventSegment = (70 << 8) | EventTypeDownstream | EventTypeSerialized | EventTypeSticky,
359  EventTag = (80 << 8) | EventTypeDownstream | EventTypeSerialized | EventTypeSticky | EventTypeStickyMulti,
360  EventBufferSize = (90 << 8) | EventTypeDownstream | EventTypeSerialized | EventTypeSticky,
361  EventSinkMessage = (100 << 8) | EventTypeDownstream | EventTypeSerialized | EventTypeSticky | EventTypeStickyMulti,
362  EventEos = (110 << 8) | EventTypeDownstream | EventTypeSerialized | EventTypeSticky,
363  EventToc = (120 << 8) | EventTypeDownstream | EventTypeSerialized | EventTypeSticky | EventTypeStickyMulti,
364 
365  /* non sticky downstream */
366  EventSegmentDone = (150 << 8) | EventTypeDownstream | EventTypeSerialized,
367  EventGap = (160 << 8) | EventTypeDownstream | EventTypeSerialized,
368 
369  /* upstream events */
370  EventQos = (190 << 8) | EventTypeUpstream,
371  EventSeek = (200 << 8) | EventTypeUpstream,
372  EventNavigation = (210 << 8) | EventTypeUpstream,
373  EventLatency = (220 << 8) | EventTypeUpstream,
374  EventStep = (230 << 8) | EventTypeUpstream,
375  EventReconfigure = (240 << 8 ) | EventTypeUpstream,
376  EventTocSelect = (250 << 8) | EventTypeUpstream,
377 
378  /* custom events */
379  EventCustomUpstream = (270 << 8) | EventTypeUpstream,
380  EventCustomDownstream = (280 << 8) | EventTypeDownstream | EventTypeSerialized,
381  EventCustomDownstreamOob = (290 << 8) | EventTypeDownstream,
382  EventCustomDownstreamSticky = (300 << 8) | EventTypeDownstream | EventTypeSerialized | EventTypeSticky | EventTypeStickyMulti,
383  EventCustomBoth = (310 << 8) | EventTypeBoth | EventTypeSerialized,
384  EventCustomBothOob = (320 << 8) | EventTypeBoth
385  };
386 }
387 QGST_REGISTER_TYPE(QGst::EventType)
388 
389 namespace QGst {
390  enum SeekFlag {
391  SeekFlagNone = 0,
392  SeekFlagFlush = (1 << 0),
393  SeekFlagAccurate = (1 << 1),
394  SeekFlagKeyUnit = (1 << 2),
395  SeekFlagSegment = (1 << 3),
396  SeekFlagSkip = (1 << 4)
397  };
398  Q_DECLARE_FLAGS(SeekFlags, SeekFlag);
399  Q_DECLARE_OPERATORS_FOR_FLAGS(SeekFlags)
400 }
401 QGST_REGISTER_TYPE(QGst::SeekFlags)
402 
403 namespace QGst {
404  enum SeekType {
405  SeekTypeNone = 0,
406  SeekTypeSet = 1,
407  SeekTypeEnd = 2
408  };
409 }
410 QGST_REGISTER_TYPE(QGst::SeekType)
411 
412 namespace QGst {
413  enum SegmentFlag {
414  SegmentFlagNone = SeekFlagNone,
415  SegmentFlagReset = SeekFlagFlush,
416  SegmentFlagSkip = SeekFlagSkip,
417  SegmentFlagSegment = SeekFlagSegment
418  };
419  Q_DECLARE_FLAGS(SegmentFlags, SegmentFlag);
420  Q_DECLARE_OPERATORS_FOR_FLAGS(SegmentFlags);
421 }
422 QGST_REGISTER_TYPE(QGst::SegmentFlags);
423 
424 namespace QGst {
425  enum QosType {
426  QosTypeOverflow = 0,
427  QosTypeUnderflow = 1,
428  QosTypeThrottle = 2
429  };
430 }
431 QGST_REGISTER_TYPE(QGst::QosType);
432 
433 namespace QGst {
434  enum TagMergeMode {
435  TagMergeUndefined,
436  TagMergeReplaceAll,
437  TagMergeReplace,
438  TagMergeAppend,
439  TagMergePrepend,
440  TagMergeKeep,
441  TagMergeKeepAll,
442  // add more
443  TagMergeCount
444  };
445 }
446 QGST_REGISTER_TYPE(QGst::TagMergeMode)
447 
448 namespace QGst {
449  enum TagFlag {
450  TagFlagUndefined,
451  TagFlagMeta,
452  TagFlagEncoded,
453  TagFlagDecoded,
454  TagFlagCount
455  };
456  Q_DECLARE_FLAGS(TagFlags, TagFlag);
457 }
458 Q_DECLARE_OPERATORS_FOR_FLAGS(QGst::TagFlags)
459 QGST_REGISTER_TYPE(QGst::TagFlags) //codegen: GType=GST_TYPE_TAG_FLAG
460 
461 namespace QGst {
462  enum AppStreamType {
464  AppStreamTypeStream,
467  AppStreamTypeSeekable,
469  AppStreamTypeRandomAccess
470  };
471 }
472 //FIXME: GST_TYPE_APP_STREAM_TYPE is not exported from libgstapp,
473 //so we have to reside in this method...
474 namespace QGlib {
475  template <>
476  struct GetTypeImpl<QGst::AppStreamType>
477  {
478  inline operator Type() { return Type::fromName("GstAppStreamType"); }
479  };
480 }
481 
482 namespace QGst {
483  enum DiscovererResult {
484  DiscovererOk,
485  DiscovererUriInvalid,
486  DiscovererError,
487  DiscovererTimeout,
488  DiscovererBusy,
489  DiscovererMissingPlugins
490  };
491 }
492 QGST_REGISTER_TYPE(QGst::DiscovererResult)
493 
494 namespace QGst {
495  enum MapFlag {
496  MapRead = (1 << 0),
497  MapWrite = (1 << 1),
498  MapFlagLast = (1 << 16)
499  };
500  Q_DECLARE_FLAGS(MapFlags, MapFlag);
501 }
502 Q_DECLARE_OPERATORS_FOR_FLAGS(QGst::MapFlags)
503 QGST_REGISTER_TYPE(QGst::MapFlags)
504 
505 namespace QGst {
506  enum MemoryFlag {
507  MemoryFlagReadonly = MiniObjectFlagLockReadonly,
508  MemoryFlagNoShare = (MiniObjectFlagLast << 0),
509  MemoryFlagZeroPrefixed = (MiniObjectFlagLast << 1),
510  MemoryFlagZeroPadded = (MiniObjectFlagLast << 2),
511  MemoryFlagPhysicallyContiguous = (MiniObjectFlagLast << 3),
512  MemoryFlagNotMappable = (MiniObjectFlagLast << 4),
513  MemoryFlagLast = (MiniObjectFlagLast << 16)
514  };
515  Q_DECLARE_FLAGS(MemoryFlags, MemoryFlag);
516 }
517 Q_DECLARE_OPERATORS_FOR_FLAGS(QGst::MemoryFlags)
518 QGST_REGISTER_TYPE(QGst::MemoryFlags)
519 #endif