1 /* 2 * This file is part of gtkD. 3 * 4 * gtkD is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU Lesser General Public License 6 * as published by the Free Software Foundation; either version 3 7 * of the License, or (at your option) any later version, with 8 * some exceptions, please read the COPYING file. 9 * 10 * gtkD is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU Lesser General Public License for more details. 14 * 15 * You should have received a copy of the GNU Lesser General Public License 16 * along with gtkD; if not, write to the Free Software 17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA 18 */ 19 20 // generated automatically - do not change 21 // find conversion definition on APILookup.txt 22 // implement new conversion functionalities on the wrap.utils pakage 23 24 module gstreamerc.gstreamertypes; 25 26 public import gtkc.glibtypes; 27 public import gtkc.gthreadtypes; 28 public import gtkc.gobjecttypes; 29 /***** default padding of structures *****/ 30 const long GST_PADDING = 4; 31 32 /***** padding for very extensible base classes *****/ 33 const long GST_PADDING_LARGE = 20; 34 35 //These times might be clean to define as GstClockTimes instead of long (maybe): 36 37 //#define G_USEC_PER_SEC 1000000 //This should be in glib... 38 const ulong G_USEC_PER_SEC = 1000000uL; 39 //#define GST_SECOND (G_USEC_PER_SEC * G_GINT64_CONSTANT (1000)) 40 const ulong GST_SECOND = (G_USEC_PER_SEC * 1000uL); 41 42 public alias GST_SECOND SECOND; 43 44 //This one is an undefined GstClockTime. How can this be ulong??? 45 //I guess it should be long...??? 46 //#define GST_CLOCK_TIME_NONE ((GstClockTime) -1) 47 const long GST_CLOCK_TIME_NONE = -1L; 48 public alias GST_CLOCK_TIME_NONE CLOCK_TIME_NONE; 49 alias void GStaticRecMutex; 50 alias void* GstXmlNodePtr; 51 alias void* xmlNodePtr; 52 53 /** 54 * typedef guint64 GstClockTime; 55 * A datatype to hold a time, measured in nanoseconds. 56 */ 57 public alias ulong GstClockTime; 58 59 /** 60 * typedef gint64 GstClockTimeDiff; 61 * A datatype to hold a time difference, measured in nanoseconds. 62 */ 63 public alias long GstClockTimeDiff; 64 65 /** 66 * typedef gpointer GstClockID; 67 * A datatype to hold the handle to an outstanding sync or async clock callback. 68 */ 69 public alias void* GstClockID; 70 71 /** 72 * typedef guint64 GstElementFactoryListType; 73 */ 74 public alias ulong GstElementFactoryListType; 75 /** 76 * GstEventTypeFlags indicate the aspects of the different GstEventType 77 * values. You can get the type flags of a GstEventType with the 78 * gst_event_type_get_flags() function. 79 * GST_EVENT_TYPE_UPSTREAM 80 */ 81 public enum GstEventTypeFlags 82 { 83 UPSTREAM = 1 << 0, 84 DOWNSTREAM = 1 << 1, 85 SERIALIZED = 1 << 2, 86 STICKY = 1 << 3, 87 STICKY_MULTI = 1 << 4, 88 } 89 alias GstEventTypeFlags EventTypeFlags; 90 91 /** 92 * GstEventType lists the standard event types that can be sent in a pipeline. 93 * The custom event types can be used for private messages between elements 94 * that can't be expressed using normal 95 * GStreamer buffer passing semantics. Custom events carry an arbitrary 96 * GstStructure. 97 * Specific custom events are distinguished by the name of the structure. 98 * GST_EVENT_UNKNOWN 99 */ 100 public enum GstEventType 101 { 102 UNKNOWN = 0, 103 104 /+* bidirectional events +/ 105 FLUSH_START = (10 << 8) | GstEventTypeFlags.UPSTREAM | GstEventTypeFlags.DOWNSTREAM, 106 FLUSH_STOP = (20 << 8) | GstEventTypeFlags.UPSTREAM | GstEventTypeFlags.DOWNSTREAM | GstEventTypeFlags.SERIALIZED, 107 108 /+* downstream serialized events +/ 109 STREAM_START = ( 40 << 8 ) | GstEventTypeFlags.DOWNSTREAM | GstEventTypeFlags.SERIALIZED | GstEventTypeFlags.STICKY, 110 CAPS = ( 50 << 8 ) | GstEventTypeFlags.DOWNSTREAM | GstEventTypeFlags.SERIALIZED | GstEventTypeFlags.STICKY, 111 SEGMENT = ( 70 << 8 ) | GstEventTypeFlags.DOWNSTREAM | GstEventTypeFlags.SERIALIZED | GstEventTypeFlags.STICKY, 112 TAG = ( 80 << 8 ) | GstEventTypeFlags.DOWNSTREAM | GstEventTypeFlags.SERIALIZED | GstEventTypeFlags.STICKY | GstEventTypeFlags.STICKY_MULTI, 113 BUFFERSIZE = ( 90 << 8 ) | GstEventTypeFlags.DOWNSTREAM | GstEventTypeFlags.SERIALIZED | GstEventTypeFlags.STICKY, 114 SINK_MESSAGE = ( 100 << 8 ) | GstEventTypeFlags.DOWNSTREAM | GstEventTypeFlags.SERIALIZED | GstEventTypeFlags.STICKY | GstEventTypeFlags.STICKY_MULTI, 115 EOS = ( 110 << 8 ) | GstEventTypeFlags.DOWNSTREAM | GstEventTypeFlags.SERIALIZED | GstEventTypeFlags.STICKY, 116 TOC = ( 120 << 8 ) | GstEventTypeFlags.DOWNSTREAM | GstEventTypeFlags.SERIALIZED | GstEventTypeFlags.STICKY | GstEventTypeFlags.STICKY_MULTI, 117 118 /* non-sticky downstream serialized */ 119 SEGMENT_DONE = ( 150 << 8 ) | GstEventTypeFlags.DOWNSTREAM | GstEventTypeFlags.SERIALIZED, 120 GAP = ( 160 << 8 ) | GstEventTypeFlags.DOWNSTREAM | GstEventTypeFlags.SERIALIZED, 121 122 /+* upstream events +/ 123 QOS = ( 190 << 8 ) | GstEventTypeFlags.UPSTREAM, 124 SEEK = ( 200 << 8 ) | GstEventTypeFlags.UPSTREAM, 125 NAVIGATION = ( 210 << 8 ) | GstEventTypeFlags.UPSTREAM, 126 LATENCY = ( 220 << 8 ) | GstEventTypeFlags.UPSTREAM, 127 STEP = ( 230 << 8 ) | GstEventTypeFlags.UPSTREAM, 128 RECONFIGURE = ( 240 << 8 ) | GstEventTypeFlags.UPSTREAM, 129 TOC_SELECT = ( 250 << 8 ) | GstEventTypeFlags.UPSTREAM, 130 131 /+* custom events start here +/ 132 CUSTOM_UPSTREAM = ( 270 << 8 ) | GstEventTypeFlags.UPSTREAM, 133 CUSTOM_DOWNSTREAM = ( 280 << 8 ) | GstEventTypeFlags.DOWNSTREAM | GstEventTypeFlags.SERIALIZED, 134 CUSTOM_DOWNSTREAM_OOB = ( 290 << 8 ) | GstEventTypeFlags.DOWNSTREAM, 135 CUSTOM_DOWNSTREAM_STICKY = ( 300 << 8 ) | GstEventTypeFlags.DOWNSTREAM | GstEventTypeFlags.SERIALIZED | GstEventTypeFlags.STICKY | GstEventTypeFlags.STICKY_MULTI, 136 CUSTOM_BOTH = ( 310 << 8 ) | GstEventTypeFlags.UPSTREAM | GstEventTypeFlags.DOWNSTREAM | GstEventTypeFlags.SERIALIZED, 137 CUSTOM_BOTH_OOB = ( 320 << 8 ) | GstEventTypeFlags.UPSTREAM | GstEventTypeFlags.DOWNSTREAM 138 } 139 alias GstEventType EventType; 140 141 public enum GstQueryType 142 { 143 UNKNOWN = (0 << 8) | 0, 144 POSITION = (10 << 8) | (GstQueryTypeFlags.UPSTREAM | GstQueryTypeFlags.DOWNSTREAM), 145 DURATION = (20 << 8) | (GstQueryTypeFlags.UPSTREAM | GstQueryTypeFlags.DOWNSTREAM), 146 LATENCY = (30 << 8) | (GstQueryTypeFlags.UPSTREAM | GstQueryTypeFlags.DOWNSTREAM), 147 JITTER = (40 << 8) | (GstQueryTypeFlags.UPSTREAM | GstQueryTypeFlags.DOWNSTREAM), 148 RATE = (50 << 8) | (GstQueryTypeFlags.UPSTREAM | GstQueryTypeFlags.DOWNSTREAM), 149 SEEKING = (60 << 8) | (GstQueryTypeFlags.UPSTREAM | GstQueryTypeFlags.DOWNSTREAM), 150 SEGMENT = (70 << 8) | (GstQueryTypeFlags.UPSTREAM | GstQueryTypeFlags.DOWNSTREAM), 151 CONVERT = (80 << 8) | (GstQueryTypeFlags.UPSTREAM | GstQueryTypeFlags.DOWNSTREAM), 152 FORMATS = (90 << 8) | (GstQueryTypeFlags.UPSTREAM | GstQueryTypeFlags.DOWNSTREAM), 153 BUFFERING = (110 << 8) | (GstQueryTypeFlags.UPSTREAM | GstQueryTypeFlags.DOWNSTREAM), 154 CUSTOM = (120 << 8) | (GstQueryTypeFlags.UPSTREAM | GstQueryTypeFlags.DOWNSTREAM), 155 URI = (130 << 8) | (GstQueryTypeFlags.UPSTREAM | GstQueryTypeFlags.DOWNSTREAM), 156 ALLOCATION = (140 << 8) | GstQueryTypeFlags.DOWNSTREAM | GstQueryTypeFlags.SERIALIZED, 157 SCHEDULING = (150 << 8) | GstQueryTypeFlags.UPSTREAM, 158 ACCEPT_CAPS = (160 << 8) | (GstQueryTypeFlags.UPSTREAM | GstQueryTypeFlags.DOWNSTREAM), 159 CAPS = (170 << 8) | (GstQueryTypeFlags.UPSTREAM | GstQueryTypeFlags.DOWNSTREAM), 160 DRAIN = (180 << 8) | GstQueryTypeFlags.DOWNSTREAM | GstQueryTypeFlags.SERIALIZED, 161 } 162 alias GstQueryType QueryType; 163 164 enum GstStreamFlags 165 { 166 NONE, 167 SPARSE = (1 << 0), 168 SELECT = (1 << 1), 169 UNSELECT = (1 << 2) 170 } 171 alias GstStreamFlags StreamFlags; 172 /** 173 * Flags for allocators. 174 * GST_ALLOCATOR_FLAG_CUSTOM_ALLOC 175 * The allocator has a custom alloc function. 176 * GST_ALLOCATOR_FLAG_LAST 177 * first flag that can be used for custom purposes 178 */ 179 public enum GstAllocatorFlags 180 { 181 CUSTOM_ALLOC = (GstObjectFlags.LAST << 0), 182 LAST = (GstObjectFlags.LAST << 16) 183 } 184 alias GstAllocatorFlags AllocatorFlags; 185 186 /** 187 * GstBinFlags are a set of flags specific to bins. Most are set/used 188 * internally. They can be checked using the GST_OBJECT_FLAG_IS_SET() macro, 189 * and (un)set using GST_OBJECT_FLAG_SET() and GST_OBJECT_FLAG_UNSET(). 190 * GST_BIN_FLAG_NO_RESYNC 191 * don't resync a state change when elements are 192 * added or linked in the bin. 193 * GST_BIN_FLAG_LAST 194 * the last enum in the series of flags for bins. 195 * Derived classes can use this as first value in a list of flags. 196 */ 197 public enum GstBinFlags 198 { 199 NO_RESYNC = (GstElementFlags.LAST << 0), 200 /+* padding +/ 201 FLAG_LAST = (GstElementFlags.LAST << 5) 202 } 203 alias GstBinFlags BinFlags; 204 205 /** 206 * A set of buffer flags used to describe properties of a GstBuffer. 207 * GST_BUFFER_FLAG_LIVE 208 * the buffer is live data and should be discarded in 209 * the PAUSED state. 210 * GST_BUFFER_FLAG_DECODE_ONLY 211 * the buffer contains data that should be dropped 212 * because it will be clipped against the segment 213 * boundaries or because it does not contain data 214 * that should be shown to the user. 215 * GST_BUFFER_FLAG_DISCONT 216 * the buffer marks a data discontinuity in the stream. 217 * This typically occurs after a seek or a dropped buffer 218 * from a live or network source. 219 * GST_BUFFER_FLAG_RESYNC 220 * the buffer timestamps might have a discontinuity 221 * and this buffer is a good point to resynchronize. 222 * GST_BUFFER_FLAG_CORRUPTED 223 * the buffer data is corrupted. 224 * GST_BUFFER_FLAG_MARKER 225 * the buffer contains a media specific marker. for 226 * video this is typically the end of a frame boundary, for audio 227 * this is usually the start of a talkspurt. 228 * GST_BUFFER_FLAG_HEADER 229 * the buffer contains header information that is 230 * needed to decode the following data. 231 * GST_BUFFER_FLAG_GAP 232 * the buffer has been created to fill a gap in the 233 * stream and contains media neutral data (elements can 234 * switch to optimized code path that ignores the buffer 235 * content). 236 * GST_BUFFER_FLAG_DROPPABLE 237 * the buffer can be dropped without breaking the 238 * stream, for example to reduce bandwidth. 239 * GST_BUFFER_FLAG_DELTA_UNIT 240 * this unit cannot be decoded independently. 241 * GST_BUFFER_FLAG_LAST 242 * additional media specific flags can be added starting from 243 * this flag. 244 */ 245 public enum GstBufferFlags 246 { 247 LIVE = (GstMiniObjectFlags.LAST << 0), 248 DECODE_ONLY = (GstMiniObjectFlags.LAST << 1), 249 DISCONT = (GstMiniObjectFlags.LAST << 2), 250 RESYNC = (GstMiniObjectFlags.LAST << 3), 251 CORRUPTED = (GstMiniObjectFlags.LAST << 4), 252 MARKER = (GstMiniObjectFlags.LAST << 5), 253 HEADER = (GstMiniObjectFlags.LAST << 6), 254 GAP = (GstMiniObjectFlags.LAST << 7), 255 DROPPABLE = (GstMiniObjectFlags.LAST << 8), 256 DELTA_UNIT = (GstMiniObjectFlags.LAST << 9), 257 LAST = (GstMiniObjectFlags.LAST << 16) 258 } 259 alias GstBufferFlags BufferFlags; 260 261 /** 262 * A set of flags that can be provided to the gst_buffer_copy_into() 263 * function to specify which items should be copied. 264 * GST_BUFFER_COPY_NONE 265 * copy nothing 266 * GST_BUFFER_COPY_FLAGS 267 * flag indicating that buffer flags should be copied 268 * GST_BUFFER_COPY_TIMESTAMPS 269 * flag indicating that buffer pts, dts, 270 * duration, offset and offset_end should be copied 271 * GST_BUFFER_COPY_META 272 * flag indicating that buffer meta should be 273 * copied 274 * GST_BUFFER_COPY_MEMORY 275 * flag indicating that buffer memory should be reffed 276 * and appended to already existing memory. Unless the memory is marked as 277 * NO_SHARE, no actual copy of the memory is made but it is simply reffed. 278 * Add GST_BUFFER_COPY_DEEP to force a real copy. 279 * GST_BUFFER_COPY_MERGE 280 * flag indicating that buffer memory should be 281 * merged 282 * GST_BUFFER_COPY_DEEP 283 * flag indicating that memory should always be 284 * copied instead of reffed (Since 1.2) 285 */ 286 public enum GstBufferCopyFlags 287 { 288 NONE = 0, 289 FLAGS = (1 << 0), 290 TIMESTAMPS = (1 << 1), 291 META = (1 << 2), 292 MEMORY = (1 << 3), 293 MERGE = (1 << 4), 294 DEEP = (1 << 5) 295 } 296 alias GstBufferCopyFlags BufferCopyFlags; 297 298 /** 299 * Additional flags to control the allocation of a buffer 300 * GST_BUFFER_POOL_ACQUIRE_FLAG_NONE 301 * no flags 302 * GST_BUFFER_POOL_ACQUIRE_FLAG_KEY_UNIT 303 * buffer is keyframe 304 * GST_BUFFER_POOL_ACQUIRE_FLAG_DONTWAIT 305 * when the bufferpool is empty, acquire_buffer 306 * will by default block until a buffer is released into the pool again. Setting 307 * this flag makes acquire_buffer return GST_FLOW_EOS instead of blocking. 308 * GST_BUFFER_POOL_ACQUIRE_FLAG_DISCONT 309 * buffer is discont 310 * GST_BUFFER_POOL_ACQUIRE_FLAG_LAST 311 * last flag, subclasses can use private flags 312 * starting from this value. 313 */ 314 public enum GstBufferPoolAcquireFlags 315 { 316 NONE = 0, 317 KEY_UNIT = (1 << 0), 318 DONTWAIT = (1 << 1), 319 DISCONT = (1 << 2), 320 LAST = (1 << 16), 321 } 322 alias GstBufferPoolAcquireFlags BufferPoolAcquireFlags; 323 324 /** 325 * The standard flags that a bus may have. 326 * GST_BUS_FLUSHING 327 * The bus is currently dropping all messages 328 * GST_BUS_FLAG_LAST 329 * offset to define more flags 330 */ 331 public enum GstBusFlags 332 { 333 FLUSHING = (GstObjectFlags.LAST << 0), 334 /+* padding +/ 335 FLAG_LAST = (GstObjectFlags.LAST << 1) 336 } 337 alias GstBusFlags BusFlags; 338 339 /** 340 * The result values for a GstBusSyncHandler. 341 * GST_BUS_DROP 342 * drop the message 343 * GST_BUS_PASS 344 * pass the message to the async queue 345 * GST_BUS_ASYNC 346 * pass message to async queue, continue if message is handled 347 */ 348 public enum GstBusSyncReply 349 { 350 DROP = 0, 351 PASS = 1, 352 ASYNC = 2 353 } 354 alias GstBusSyncReply BusSyncReply; 355 356 /** 357 * Modes of caps intersection 358 * GST_CAPS_INTERSECT_ZIG_ZAG tries to preserve overall order of both caps 359 * by iterating on the caps' structures as the following matrix shows: 360 * $(DDOC_COMMENT example) 361 * Used when there is no explicit precedence of one caps over the other. e.g. 362 * tee's sink pad getcaps function, it will probe its src pad peers' for their 363 * caps and intersect them with this mode. 364 * GST_CAPS_INTERSECT_FIRST is useful when an element wants to preserve 365 * another element's caps priority order when intersecting with its own caps. 366 * Example: If caps1 is [A, B, C] and caps2 is [E, B, D, A], the result 367 * would be [A, B], maintaining the first caps priority on the intersection. 368 * GST_CAPS_INTERSECT_ZIG_ZAG 369 * Zig-zags over both caps. 370 * GST_CAPS_INTERSECT_FIRST 371 * Keeps the first caps order. 372 */ 373 public enum GstCapsIntersectMode 374 { 375 ZIG_ZAG = 0, 376 FIRST = 1 377 } 378 alias GstCapsIntersectMode CapsIntersectMode; 379 380 /** 381 * Extra flags for a caps. 382 * GST_CAPS_FLAG_ANY 383 * Caps has no specific content, but can contain 384 * anything. 385 */ 386 public enum GstCapsFlags 387 { 388 ANY = (GstMiniObjectFlags.LAST << 0) 389 } 390 alias GstCapsFlags CapsFlags; 391 392 /** 393 * The type of the clock entry 394 * GST_CLOCK_ENTRY_SINGLE 395 * a single shot timeout 396 * GST_CLOCK_ENTRY_PERIODIC 397 * a periodic timeout request 398 */ 399 public enum GstClockEntryType 400 { 401 SINGLE, 402 PERIODIC 403 } 404 alias GstClockEntryType ClockEntryType; 405 406 /** 407 * The return value of a clock operation. 408 * GST_CLOCK_OK 409 * The operation succeeded. 410 * GST_CLOCK_EARLY 411 * The operation was scheduled too late. 412 * GST_CLOCK_UNSCHEDULED 413 * The clockID was unscheduled 414 * GST_CLOCK_BUSY 415 * The ClockID is busy 416 * GST_CLOCK_BADTIME 417 * A bad time was provided to a function. 418 * GST_CLOCK_ERROR 419 * An error occurred 420 * GST_CLOCK_UNSUPPORTED 421 * Operation is not supported 422 * GST_CLOCK_DONE 423 * The ClockID is done waiting 424 */ 425 public enum GstClockReturn 426 { 427 OK = 0, 428 EARLY = 1, 429 UNSCHEDULED = 2, 430 BUSY = 3, 431 BADTIME = 4, 432 ERROR = 5, 433 UNSUPPORTED = 6, 434 DONE = 7 435 } 436 alias GstClockReturn ClockReturn; 437 438 /** 439 * The capabilities of this clock 440 * GST_CLOCK_FLAG_CAN_DO_SINGLE_SYNC 441 * clock can do a single sync timeout request 442 * GST_CLOCK_FLAG_CAN_DO_SINGLE_ASYNC 443 * clock can do a single async timeout request 444 * GST_CLOCK_FLAG_CAN_DO_PERIODIC_SYNC 445 * clock can do sync periodic timeout requests 446 * GST_CLOCK_FLAG_CAN_DO_PERIODIC_ASYNC 447 * clock can do async periodic timeout callbacks 448 * GST_CLOCK_FLAG_CAN_SET_RESOLUTION 449 * clock's resolution can be changed 450 * GST_CLOCK_FLAG_CAN_SET_MASTER 451 * clock can be slaved to a master clock 452 * GST_CLOCK_FLAG_LAST 453 * subclasses can add additional flags starting from this flag 454 */ 455 public enum GstClockFlags 456 { 457 CAN_DO_SINGLE_SYNC = (GstObjectFlags.LAST << 0), 458 CAN_DO_SINGLE_ASYNC = (GstObjectFlags.LAST << 1), 459 CAN_DO_PERIODIC_SYNC = (GstObjectFlags.LAST << 2), 460 CAN_DO_PERIODIC_ASYNC = (GstObjectFlags.LAST << 3), 461 CAN_SET_RESOLUTION = (GstObjectFlags.LAST << 4), 462 CAN_SET_MASTER = (GstObjectFlags.LAST << 5), 463 /+* padding +/ 464 LAST = (GstObjectFlags.LAST << 8) 465 } 466 alias GstClockFlags ClockFlags; 467 468 /** 469 * The standard flags that an element may have. 470 * GST_ELEMENT_FLAG_LOCKED_STATE 471 * ignore state changes from parent 472 * GST_ELEMENT_FLAG_SINK 473 * the element is a sink 474 * GST_ELEMENT_FLAG_SOURCE 475 * the element is a source. 476 * GST_ELEMENT_FLAG_PROVIDE_CLOCK 477 * the element can provide a clock 478 * GST_ELEMENT_FLAG_REQUIRE_CLOCK 479 * the element requires a clock 480 * GST_ELEMENT_FLAG_INDEXABLE 481 * the element can use an index 482 * GST_ELEMENT_FLAG_LAST 483 * offset to define more flags 484 */ 485 public enum GstElementFlags 486 { 487 LOCKED_STATE = (GstObjectFlags.LAST << 0), 488 SINK = (GstObjectFlags.LAST << 1), 489 SOURCE = (GstObjectFlags.LAST << 2), 490 PROVIDE_CLOCK = (GstObjectFlags.LAST << 3), 491 REQUIRE_CLOCK = (GstObjectFlags.LAST << 4), 492 INDEXABLE = (GstObjectFlags.LAST << 5), 493 /+* padding +/ 494 LAST = (GstObjectFlags.LAST << 10) 495 } 496 alias GstElementFlags ElementFlags; 497 498 /** 499 * The possible states an element can be in. States can be changed using 500 * gst_element_set_state() and checked using gst_element_get_state(). 501 * GST_STATE_VOID_PENDING 502 * no pending state. 503 * GST_STATE_NULL 504 * the NULL state or initial state of an element. 505 * GST_STATE_READY 506 * the element is ready to go to PAUSED. 507 * GST_STATE_PAUSED 508 * the element is PAUSED, it is ready to accept and 509 * process data. Sink elements however only accept one 510 * buffer and then block. 511 * GST_STATE_PLAYING 512 * the element is PLAYING, the GstClock is running and 513 * the data is flowing. 514 */ 515 public enum GstState 516 { 517 VOID_PENDING = 0, 518 NULL = 1, 519 READY = 2, 520 PAUSED = 3, 521 PLAYING = 4 522 } 523 alias GstState State; 524 525 /** 526 * These are the different state changes an element goes through. 527 * GST_STATE_NULL ⇒ GST_STATE_PLAYING is called an upwards state change 528 * and GST_STATE_PLAYING ⇒ GST_STATE_NULL a downwards state change. 529 * GST_STATE_CHANGE_NULL_TO_READY 530 * state change from NULL to READY. 531 * The element must check if the resources it needs are available. Device 532 * sinks and -sources typically try to probe the device to constrain their 533 * caps. 534 * The element opens the device (in case feature need to be probed). 535 * GST_STATE_CHANGE_READY_TO_PAUSED 536 * state change from READY to PAUSED. 537 * The element pads are activated in order to receive data in PAUSED. 538 * Streaming threads are started. 539 * Some elements might need to return GST_STATE_CHANGE_ASYNC and complete 540 * the state change when they have enough information. It is a requirement 541 * for sinks to return GST_STATE_CHANGE_ASYNC and complete the state change 542 * when they receive the first buffer or GST_EVENT_EOS (preroll). 543 * Sinks also block the dataflow when in PAUSED. 544 * A pipeline resets the running_time to 0. 545 * Live sources return GST_STATE_CHANGE_NO_PREROLL and don't generate data. 546 * GST_STATE_CHANGE_PAUSED_TO_PLAYING 547 * state change from PAUSED to PLAYING. 548 * Most elements ignore this state change. 549 * The pipeline selects a GstClock and distributes this to all the children 550 * before setting them to PLAYING. This means that it is only alowed to 551 * synchronize on the GstClock in the PLAYING state. 552 * The pipeline uses the GstClock and the running_time to calculate the 553 * base_time. The base_time is distributed to all children when performing 554 * the state change. 555 * Sink elements stop blocking on the preroll buffer or event and start 556 * rendering the data. 557 * Sinks can post GST_MESSAGE_EOS in the PLAYING state. It is not allowed 558 * to post GST_MESSAGE_EOS when not in the PLAYING state. 559 * While streaming in PAUSED or PLAYING elements can create and remove 560 * sometimes pads. 561 * Live sources start generating data and return GST_STATE_CHANGE_SUCCESS. 562 * GST_STATE_CHANGE_PLAYING_TO_PAUSED 563 * state change from PLAYING to PAUSED. 564 * Most elements ignore this state change. 565 * The pipeline calculates the running_time based on the last selected 566 * GstClock and the base_time. It stores this information to continue 567 * playback when going back to the PLAYING state. 568 * Sinks unblock any GstClock wait calls. 569 * When a sink does not have a pending buffer to play, it returns 570 * GST_STATE_CHANGE_ASYNC from this state change and completes the state 571 * change when it receives a new buffer or an GST_EVENT_EOS. 572 * Any queued GST_MESSAGE_EOS items are removed since they will be reposted 573 * when going back to the PLAYING state. The EOS messages are queued in 574 * GstBin containers. 575 * Live sources stop generating data and return GST_STATE_CHANGE_NO_PREROLL. 576 * GST_STATE_CHANGE_PAUSED_TO_READY 577 * state change from PAUSED to READY. 578 * Sinks unblock any waits in the preroll. 579 * Elements unblock any waits on devices 580 * Chain or get_range functions return GST_FLOW_FLUSHING. 581 * The element pads are deactivated so that streaming becomes impossible and 582 * all streaming threads are stopped. 583 * The sink forgets all negotiated formats 584 * Elements remove all sometimes pads 585 * GST_STATE_CHANGE_READY_TO_NULL 586 * state change from READY to NULL. 587 * Elements close devices 588 * Elements reset any internal state. 589 */ 590 public enum GstStateChange 591 { 592 NULL_TO_READY = (GstState.NULL << 3) | GstState.READY, 593 READY_TO_PAUSED = (GstState.READY << 3) | GstState.PAUSED, 594 PAUSED_TO_PLAYING = (GstState.PAUSED << 3) | GstState.PLAYING, 595 PLAYING_TO_PAUSED = (GstState.PLAYING << 3) | GstState.PAUSED, 596 PAUSED_TO_READY = (GstState.PAUSED << 3) | GstState.READY, 597 READY_TO_NULL = (GstState.READY << 3) | GstState.NULL 598 } 599 alias GstStateChange StateChange; 600 601 /** 602 * The possible return values from a state change function such as 603 * gst_element_set_state(). Only GST_STATE_CHANGE_FAILURE is a real failure. 604 * GST_STATE_CHANGE_FAILURE 605 * the state change failed 606 * GST_STATE_CHANGE_SUCCESS 607 * the state change succeeded 608 * GST_STATE_CHANGE_ASYNC 609 * the state change will happen asynchronously 610 * GST_STATE_CHANGE_NO_PREROLL 611 * the state change succeeded but the element 612 * cannot produce data in GST_STATE_PAUSED. 613 * This typically happens with live sources. 614 */ 615 public enum GstStateChangeReturn 616 { 617 FAILURE = 0, 618 SUCCESS = 1, 619 ASYNC = 2, 620 NO_PREROLL = 3 621 } 622 alias GstStateChangeReturn StateChangeReturn; 623 624 /** 625 * Core errors are errors inside the core GStreamer library. 626 * GST_CORE_ERROR_FAILED 627 * a general error which doesn't fit in any other 628 * category. Make sure you add a custom message to the error call. 629 * GST_CORE_ERROR_TOO_LAZY 630 * do not use this except as a placeholder for 631 * deciding where to go while developing code. 632 * GST_CORE_ERROR_NOT_IMPLEMENTED 633 * use this when you do not want to implement 634 * this functionality yet. 635 * GST_CORE_ERROR_STATE_CHANGE 636 * used for state change errors. 637 * GST_CORE_ERROR_PAD 638 * used for pad-related errors. 639 * GST_CORE_ERROR_THREAD 640 * used for thread-related errors. 641 * GST_CORE_ERROR_NEGOTIATION 642 * used for negotiation-related errors. 643 * GST_CORE_ERROR_EVENT 644 * used for event-related errors. 645 * GST_CORE_ERROR_SEEK 646 * used for seek-related errors. 647 * GST_CORE_ERROR_CAPS 648 * used for caps-related errors. 649 * GST_CORE_ERROR_TAG 650 * used for negotiation-related errors. 651 * GST_CORE_ERROR_MISSING_PLUGIN 652 * used if a plugin is missing. 653 * GST_CORE_ERROR_CLOCK 654 * used for clock related errors. 655 * GST_CORE_ERROR_DISABLED 656 * used if functionality has been disabled at 657 * compile time. 658 * GST_CORE_ERROR_NUM_ERRORS 659 * the number of core error types. 660 */ 661 public enum GstCoreError 662 { 663 FAILED = 1, 664 TOO_LAZY, 665 NOT_IMPLEMENTED, 666 STATE_CHANGE, 667 PAD, 668 THREAD, 669 NEGOTIATION, 670 EVENT, 671 SEEK, 672 CAPS, 673 TAG, 674 MISSING_PLUGIN, 675 CLOCK, 676 DISABLED, 677 NUM_ERRORS 678 } 679 alias GstCoreError CoreError; 680 681 /** 682 * Library errors are for errors from the library being used by elements 683 * (initializing, finalizing, settings, ...) 684 * GST_LIBRARY_ERROR_FAILED 685 * a general error which doesn't fit in any other 686 * category. Make sure you add a custom message to the error call. 687 * GST_LIBRARY_ERROR_TOO_LAZY 688 * do not use this except as a placeholder for 689 * deciding where to go while developing code. 690 * GST_LIBRARY_ERROR_INIT 691 * used when the library could not be opened. 692 * GST_LIBRARY_ERROR_SHUTDOWN 693 * used when the library could not be closed. 694 * GST_LIBRARY_ERROR_SETTINGS 695 * used when the library doesn't accept settings. 696 * GST_LIBRARY_ERROR_ENCODE 697 * used when the library generated an encoding error. 698 * GST_LIBRARY_ERROR_NUM_ERRORS 699 * the number of library error types. 700 */ 701 public enum GstLibraryError 702 { 703 FAILED = 1, 704 TOO_LAZY, 705 INIT, 706 SHUTDOWN, 707 SETTINGS, 708 ENCODE, 709 NUM_ERRORS 710 } 711 alias GstLibraryError LibraryError; 712 713 /** 714 * Resource errors are for any resource used by an element: 715 * memory, files, network connections, process space, ... 716 * They're typically used by source and sink elements. 717 * GST_RESOURCE_ERROR_FAILED 718 * a general error which doesn't fit in any other 719 * category. Make sure you add a custom message to the error call. 720 * GST_RESOURCE_ERROR_TOO_LAZY 721 * do not use this except as a placeholder for 722 * deciding where to go while developing code. 723 * GST_RESOURCE_ERROR_NOT_FOUND 724 * used when the resource could not be found. 725 * GST_RESOURCE_ERROR_BUSY 726 * used when resource is busy. 727 * GST_RESOURCE_ERROR_OPEN_READ 728 * used when resource fails to open for reading. 729 * GST_RESOURCE_ERROR_OPEN_WRITE 730 * used when resource fails to open for writing. 731 * GST_RESOURCE_ERROR_OPEN_READ_WRITE 732 * used when resource cannot be opened for 733 * both reading and writing, or either (but unspecified which). 734 * GST_RESOURCE_ERROR_CLOSE 735 * used when the resource can't be closed. 736 * GST_RESOURCE_ERROR_READ 737 * used when the resource can't be read from. 738 * GST_RESOURCE_ERROR_WRITE 739 * used when the resource can't be written to. 740 * GST_RESOURCE_ERROR_SEEK 741 * used when a seek on the resource fails. 742 * GST_RESOURCE_ERROR_SYNC 743 * used when a synchronize on the resource fails. 744 * GST_RESOURCE_ERROR_SETTINGS 745 * used when settings can't be manipulated on. 746 * GST_RESOURCE_ERROR_NO_SPACE_LEFT 747 * used when the resource has no space left. 748 * GST_RESOURCE_ERROR_NUM_ERRORS 749 * the number of resource error types. 750 */ 751 public enum GstResourceError 752 { 753 FAILED = 1, 754 TOO_LAZY, 755 NOT_FOUND, 756 BUSY, 757 OPEN_READ, 758 OPEN_WRITE, 759 OPEN_READ_WRITE, 760 CLOSE, 761 READ, 762 WRITE, 763 SEEK, 764 SYNC, 765 SETTINGS, 766 NO_SPACE_LEFT, 767 NUM_ERRORS 768 } 769 alias GstResourceError ResourceError; 770 771 /** 772 * Stream errors are for anything related to the stream being processed: 773 * format errors, media type errors, ... 774 * They're typically used by decoders, demuxers, converters, ... 775 * GST_STREAM_ERROR_FAILED 776 * a general error which doesn't fit in any other 777 * category. Make sure you add a custom message to the error call. 778 * GST_STREAM_ERROR_TOO_LAZY 779 * do not use this except as a placeholder for 780 * deciding where to go while developing code. 781 * GST_STREAM_ERROR_NOT_IMPLEMENTED 782 * use this when you do not want to implement 783 * this functionality yet. 784 * GST_STREAM_ERROR_TYPE_NOT_FOUND 785 * used when the element doesn't know the 786 * stream's type. 787 * GST_STREAM_ERROR_WRONG_TYPE 788 * used when the element doesn't handle this type 789 * of stream. 790 * GST_STREAM_ERROR_CODEC_NOT_FOUND 791 * used when there's no codec to handle the 792 * stream's type. 793 * GST_STREAM_ERROR_DECODE 794 * used when decoding fails. 795 * GST_STREAM_ERROR_ENCODE 796 * used when encoding fails. 797 * GST_STREAM_ERROR_DEMUX 798 * used when demuxing fails. 799 * GST_STREAM_ERROR_MUX 800 * used when muxing fails. 801 * GST_STREAM_ERROR_FORMAT 802 * used when the stream is of the wrong format 803 * (for example, wrong caps). 804 * GST_STREAM_ERROR_DECRYPT 805 * used when the stream is encrypted and can't be 806 * decrypted because this is not supported by the element. 807 * GST_STREAM_ERROR_DECRYPT_NOKEY 808 * used when the stream is encrypted and 809 * can't be decrypted because no suitable key is available. 810 * GST_STREAM_ERROR_NUM_ERRORS 811 * the number of stream error types. 812 */ 813 public enum GstStreamError 814 { 815 FAILED = 1, 816 TOO_LAZY, 817 NOT_IMPLEMENTED, 818 TYPE_NOT_FOUND, 819 WRONG_TYPE, 820 CODEC_NOT_FOUND, 821 DECODE, 822 ENCODE, 823 DEMUX, 824 MUX, 825 FORMAT, 826 DECRYPT, 827 DECRYPT_NOKEY, 828 NUM_ERRORS 829 } 830 alias GstStreamError StreamError; 831 832 /** 833 * The different types of QoS events that can be given to the 834 * gst_event_new_qos() method. 835 * GST_QOS_TYPE_OVERFLOW 836 * The QoS event type that is produced when downstream 837 * elements are producing data too quickly and the element can't keep up 838 * processing the data. Upstream should reduce their processing rate. This 839 * type is also used when buffers arrive early or in time. 840 * GST_QOS_TYPE_UNDERFLOW 841 * The QoS event type that is produced when downstream 842 * elements are producing data too slowly and need to speed up their processing 843 * rate. 844 * GST_QOS_TYPE_THROTTLE 845 * The QoS event type that is produced when the 846 * application enabled throttling to limit the datarate. 847 */ 848 public enum GstQOSType 849 { 850 TYPE_OVERFLOW = 0, 851 TYPE_UNDERFLOW = 1, 852 TYPE_THROTTLE = 2 853 } 854 alias GstQOSType QOSType; 855 856 /** 857 * The different types of seek events. When constructing a seek event with 858 * gst_event_new_seek() or when doing gst_segment_do_seek(). 859 * GST_SEEK_TYPE_NONE 860 * no change in position is required 861 * GST_SEEK_TYPE_SET 862 * absolute position is requested 863 * GST_SEEK_TYPE_END 864 * relative position to duration is requested 865 */ 866 public enum GstSeekType 867 { 868 NONE = 0, 869 SET = 1, 870 END = 2 871 } 872 alias GstSeekType SeekType; 873 874 /** 875 * Flags to be used with gst_element_seek() or gst_event_new_seek(). All flags 876 * can be used together. 877 * A non flushing seek might take some time to perform as the currently 878 * playing data in the pipeline will not be cleared. 879 * An accurate seek might be slower for formats that don't have any indexes 880 * or timestamp markers in the stream. Specifying this flag might require a 881 * complete scan of the file in those cases. 882 * When performing a segment seek: after the playback of the segment completes, 883 * no EOS will be emmited by the element that performed the seek, but a 884 * GST_MESSAGE_SEGMENT_DONE message will be posted on the bus by the element. 885 * When this message is posted, it is possible to send a new seek event to 886 * continue playback. With this seek method it is possible to perform seamless 887 * looping or simple linear editing. 888 * When doing fast forward (rate > 1.0) or fast reverse (rate < -1.0) trickmode 889 * playback, the GST_SEEK_FLAG_SKIP flag can be used to instruct decoders 890 * and demuxers to adjust the playback rate by skipping frames. This can improve 891 * performance and decrease CPU usage because not all frames need to be decoded. 892 * The GST_SEEK_FLAG_SNAP_BEFORE flag can be used to snap to the previous 893 * relevant location, and the GST_SEEK_FLAG_SNAP_AFTER flag can be used to 894 * select the next relevant location. If KEY_UNIT is specified, the relevant 895 * location is a keyframe. If both flags are specified, the nearest of these 896 * locations will be selected. If none are specified, the implementation is 897 * free to select whichever it wants. 898 * The before and after here are in running time, so when playing backwards, 899 * the next location refers to the one that will played in next, and not the 900 * one that is located after in the actual source stream. 901 * Also see part-seeking.txt in the GStreamer design documentation for more 902 * details on the meaning of these flags and the behaviour expected of 903 * elements that handle them. 904 * GST_SEEK_FLAG_NONE 905 * no flag 906 * GST_SEEK_FLAG_FLUSH 907 * flush pipeline 908 * GST_SEEK_FLAG_ACCURATE 909 * accurate position is requested, this might 910 * be considerably slower for some formats. 911 * GST_SEEK_FLAG_KEY_UNIT 912 * seek to the nearest keyframe. This might be 913 * faster but less accurate. 914 * GST_SEEK_FLAG_SEGMENT 915 * perform a segment seek. 916 * GST_SEEK_FLAG_SKIP 917 * when doing fast foward or fast reverse playback, allow 918 * elements to skip frames instead of generating all 919 * frames. 920 * GST_SEEK_FLAG_SNAP_BEFORE 921 * go to a location before the requested position, 922 * if KEY_UNIT this means the keyframe at or before the 923 * requested position the one at or before the seek target. 924 * GST_SEEK_FLAG_SNAP_AFTER 925 * go to a location after the requested position, 926 * if KEY_UNIT this means the keyframe at of after the 927 * requested position. 928 * GST_SEEK_FLAG_SNAP_NEAREST 929 * go to a position near the requested position, 930 * if KEY_UNIT this means the keyframe closest to the 931 * requested position, if both keyframes are at an equal 932 * distance, behaves like SNAP_BEFORE. 933 */ 934 public enum GstSeekFlags 935 { 936 NONE = 0, 937 FLUSH = (1 << 0), 938 ACCURATE = (1 << 1), 939 KEY_UNIT = (1 << 2), 940 SEGMENT = (1 << 3), 941 SKIP = (1 << 4), 942 SNAP_BEFORE = (1 << 5), 943 SNAP_AFTER = (1 << 6), 944 SNAP_NEAREST = SNAP_BEFORE | SNAP_AFTER, 945 /+* Careful to restart next flag with 1<<7 here +/ 946 } 947 alias GstSeekFlags SeekFlags; 948 949 /** 950 * Standard predefined formats 951 * GST_FORMAT_UNDEFINED 952 * undefined format 953 * GST_FORMAT_DEFAULT 954 * the default format of the pad/element. This can be 955 * samples for raw audio, frames/fields for raw video (some, but not all, 956 * elements support this; use GST_FORMAT_TIME if you don't have a good 957 * reason to query for samples/frames) 958 * GST_FORMAT_BYTES 959 * bytes 960 * GST_FORMAT_TIME 961 * time in nanoseconds 962 * GST_FORMAT_BUFFERS 963 * buffers (few, if any, elements implement this as of 964 * May 2009) 965 * GST_FORMAT_PERCENT 966 * percentage of stream (few, if any, elements implement 967 * this as of May 2009) 968 */ 969 public enum GstFormat 970 { 971 UNDEFINED = 0, /+* must be first inn list +/ 972 DEFAULT = 1, 973 BYTES = 2, 974 TIME = 3, 975 BUFFERS = 4, 976 PERCENT = 5 977 } 978 alias GstFormat Format; 979 980 /** 981 * The result of a GstIteratorItemFunction. 982 * GST_ITERATOR_ITEM_SKIP 983 * Skip this item 984 * GST_ITERATOR_ITEM_PASS 985 * Return item 986 * GST_ITERATOR_ITEM_END 987 * Stop after this item. 988 */ 989 public enum GstIteratorItem 990 { 991 SKIP = 0, 992 PASS = 1, 993 END = 2 994 } 995 alias GstIteratorItem IteratorItem; 996 997 /** 998 * The result of gst_iterator_next(). 999 * GST_ITERATOR_DONE 1000 * No more items in the iterator 1001 * GST_ITERATOR_OK 1002 * An item was retrieved 1003 * GST_ITERATOR_RESYNC 1004 * Datastructure changed while iterating 1005 * GST_ITERATOR_ERROR 1006 * An error happened 1007 */ 1008 public enum GstIteratorResult 1009 { 1010 DONE = 0, 1011 OK = 1, 1012 RESYNC = 2, 1013 ERROR = 3 1014 } 1015 alias GstIteratorResult IteratorResult; 1016 1017 /** 1018 * Flags for wrapped memory. 1019 * GST_MEMORY_FLAG_READONLY 1020 * memory is readonly. It is not allowed to map the 1021 * memory with GST_MAP_WRITE. 1022 * GST_MEMORY_FLAG_NO_SHARE 1023 * memory must not be shared. Copies will have to be 1024 * made when this memory needs to be shared between buffers. 1025 * GST_MEMORY_FLAG_ZERO_PREFIXED 1026 * the memory prefix is filled with 0 bytes 1027 * GST_MEMORY_FLAG_ZERO_PADDED 1028 * the memory padding is filled with 0 bytes 1029 * GST_MEMORY_FLAG_PHYSICALLY_CONTIGUOUS 1030 * the memory is physically contiguous. Since 1.2 1031 * GST_MEMORY_FLAG_NOT_MAPPABLE 1032 * the memory can't be mapped via gst_memory_map() without any preconditions. Since 1.2 1033 * GST_MEMORY_FLAG_LAST 1034 * first flag that can be used for custom purposes 1035 */ 1036 public enum GstMemoryFlags 1037 { 1038 READONLY = GstMiniObjectFlags.LOCK_READONLY, 1039 NO_SHARE = (GstMiniObjectFlags.LAST << 0), 1040 ZERO_PREFIXED = (GstMiniObjectFlags.LAST << 1), 1041 ZERO_PADDED = (GstMiniObjectFlags.LAST << 2), 1042 PHYSICALLY_CONTIGUOUS = (GstMiniObjectFlags.LAST << 3), 1043 NOT_MAPPABLE = (GstMiniObjectFlags.LAST << 4), 1044 LAST = (GstMiniObjectFlags.LAST << 16) 1045 } 1046 alias GstMemoryFlags MemoryFlags; 1047 1048 /** 1049 * Flags used when mapping memory 1050 * GST_MAP_READ 1051 * map for read access 1052 * GST_MAP_WRITE 1053 * map for write access 1054 * GST_MAP_FLAG_LAST 1055 * first flag that can be used for custom purposes 1056 */ 1057 public enum GstMapFlags 1058 { 1059 READ = cast(int)GstLockFlags.READ, 1060 WRITE = cast(int)GstLockFlags.WRITE, 1061 FLAG_LAST = (1 << 16) 1062 } 1063 alias GstMapFlags MapFlags; 1064 1065 /** 1066 * The different message types that are available. 1067 * GST_MESSAGE_UNKNOWN 1068 * an undefined message 1069 * GST_MESSAGE_EOS 1070 * end-of-stream reached in a pipeline. The application will 1071 * only receive this message in the PLAYING state and every time it sets a 1072 * pipeline to PLAYING that is in the EOS state. The application can perform a 1073 * flushing seek in the pipeline, which will undo the EOS state again. 1074 * GST_MESSAGE_ERROR 1075 * an error occured. When the application receives an error 1076 * message it should stop playback of the pipeline and not assume that more 1077 * data will be played. 1078 * GST_MESSAGE_WARNING 1079 * a warning occured. 1080 * GST_MESSAGE_INFO 1081 * an info message occured 1082 * GST_MESSAGE_TAG 1083 * a tag was found. 1084 * GST_MESSAGE_BUFFERING 1085 * the pipeline is buffering. When the application 1086 * receives a buffering message in the PLAYING state for a non-live pipeline it 1087 * must PAUSE the pipeline until the buffering completes, when the percentage 1088 * field in the message is 100%. For live pipelines, no action must be 1089 * performed and the buffering percentage can be used to inform the user about 1090 * the progress. 1091 * GST_MESSAGE_STATE_CHANGED 1092 * a state change happened 1093 * GST_MESSAGE_STATE_DIRTY 1094 * an element changed state in a streaming thread. 1095 * This message is deprecated. 1096 * GST_MESSAGE_STEP_DONE 1097 * a stepping operation finished. 1098 * GST_MESSAGE_CLOCK_PROVIDE 1099 * an element notifies its capability of providing 1100 * a clock. This message is used internally and 1101 * never forwarded to the application. 1102 * GST_MESSAGE_CLOCK_LOST 1103 * The current clock as selected by the pipeline became 1104 * unusable. The pipeline will select a new clock on 1105 * the next PLAYING state change. The application 1106 * should set the pipeline to PAUSED and back to 1107 * PLAYING when this message is received. 1108 * GST_MESSAGE_NEW_CLOCK 1109 * a new clock was selected in the pipeline. 1110 * GST_MESSAGE_STRUCTURE_CHANGE 1111 * the structure of the pipeline changed. This 1112 * message is used internally and never forwarded to the application. 1113 * GST_MESSAGE_STREAM_STATUS 1114 * status about a stream, emitted when it starts, 1115 * stops, errors, etc.. 1116 * GST_MESSAGE_APPLICATION 1117 * message posted by the application, possibly 1118 * via an application-specific element. 1119 * GST_MESSAGE_ELEMENT 1120 * element-specific message, see the specific element's 1121 * documentation 1122 * GST_MESSAGE_SEGMENT_START 1123 * pipeline started playback of a segment. This 1124 * message is used internally and never forwarded to the application. 1125 * GST_MESSAGE_SEGMENT_DONE 1126 * pipeline completed playback of a segment. This 1127 * message is forwarded to the application after all elements that posted 1128 * GST_MESSAGE_SEGMENT_START posted a GST_MESSAGE_SEGMENT_DONE message. 1129 * GST_MESSAGE_DURATION_CHANGED 1130 * The duration of a pipeline changed. The 1131 * application can get the new duration with a duration query. 1132 * GST_MESSAGE_LATENCY 1133 * Posted by elements when their latency changes. The 1134 * application should recalculate and distribute a new latency. 1135 * GST_MESSAGE_ASYNC_START 1136 * Posted by elements when they start an ASYNC 1137 * GstStateChange. This message is not forwarded to the application but is used 1138 * internally. 1139 * GST_MESSAGE_ASYNC_DONE 1140 * Posted by elements when they complete an ASYNC 1141 * GstStateChange. The application will only receive this message from the toplevel 1142 * pipeline. 1143 * GST_MESSAGE_REQUEST_STATE 1144 * Posted by elements when they want the pipeline to 1145 * change state. This message is a suggestion to the application which can 1146 * decide to perform the state change on (part of) the pipeline. 1147 * GST_MESSAGE_STEP_START 1148 * A stepping operation was started. 1149 * GST_MESSAGE_QOS 1150 * A buffer was dropped or an element changed its processing 1151 * strategy for Quality of Service reasons. 1152 * GST_MESSAGE_PROGRESS 1153 * A progress message. 1154 * GST_MESSAGE_TOC 1155 * A new table of contents (TOC) was found or previously found TOC 1156 * was updated. 1157 * GST_MESSAGE_RESET_TIME 1158 * Message to request resetting the pipeline's 1159 * running time from the pipeline. This is an internal message which 1160 * applications will likely never receive. 1161 * GST_MESSAGE_STREAM_START 1162 * Message indicating start of a new stream. Useful 1163 * e.g. when using playbin in gapless playback mode, to get notified when 1164 * the next title actually starts playing (which will be some time after 1165 * the URI for the next title has been set). 1166 * GST_MESSAGE_NEED_CONTEXT 1167 * Message indicating that an element wants a specific context (Since 1.2) 1168 * GST_MESSAGE_HAVE_CONTEXT 1169 * Message indicating that an element created a context (Since 1.2) 1170 * GST_MESSAGE_ANY 1171 * mask for all of the above messages. 1172 */ 1173 public enum GstMessageType 1174 { 1175 UNKNOWN = 0, 1176 EOS = (1 << 0), 1177 ERROR = (1 << 1), 1178 WARNING = (1 << 2), 1179 INFO = (1 << 3), 1180 TAG = (1 << 4), 1181 BUFFERING = (1 << 5), 1182 STATE_CHANGED = (1 << 6), 1183 STATE_DIRTY = (1 << 7), 1184 STEP_DONE = (1 << 8), 1185 CLOCK_PROVIDE = (1 << 9), 1186 CLOCK_LOST = (1 << 10), 1187 NEW_CLOCK = (1 << 11), 1188 STRUCTURE_CHANGE = (1 << 12), 1189 STREAM_STATUS = (1 << 13), 1190 APPLICATION = (1 << 14), 1191 ELEMENT = (1 << 15), 1192 SEGMENT_START = (1 << 16), 1193 SEGMENT_DONE = (1 << 17), 1194 DURATION_CHANGED = (1 << 18), 1195 LATENCY = (1 << 19), 1196 ASYNC_START = (1 << 20), 1197 ASYNC_DONE = (1 << 21), 1198 REQUEST_STATE = (1 << 22), 1199 STEP_START = (1 << 23), 1200 QOS = (1 << 24), 1201 PROGRESS = (1 << 25), 1202 TOC = (1 << 26), 1203 RESET_TIME = (1 << 27), 1204 STREAM_START = (1 << 28), 1205 NEED_CONTEXT = (1 << 29), 1206 HAVE_CONTEXT = (1 << 30), 1207 ANY = ~0 1208 } 1209 alias GstMessageType MessageType; 1210 1211 /** 1212 * The type of a GST_MESSAGE_STRUCTURE_CHANGE. 1213 * GST_STRUCTURE_CHANGE_TYPE_PAD_LINK 1214 * Pad linking is starting or done. 1215 * GST_STRUCTURE_CHANGE_TYPE_PAD_UNLINK 1216 * Pad unlinking is starting or done. 1217 */ 1218 public enum GstStructureChangeType 1219 { 1220 TYPE_PAD_LINK = 0, 1221 TYPE_PAD_UNLINK = 1 1222 } 1223 alias GstStructureChangeType StructureChangeType; 1224 1225 /** 1226 * The type of a GST_MESSAGE_STREAM_STATUS. The stream status messages inform the 1227 * application of new streaming threads and their status. 1228 * GST_STREAM_STATUS_TYPE_CREATE 1229 * A new thread need to be created. 1230 * GST_STREAM_STATUS_TYPE_ENTER 1231 * a thread entered its loop function 1232 * GST_STREAM_STATUS_TYPE_LEAVE 1233 * a thread left its loop function 1234 * GST_STREAM_STATUS_TYPE_DESTROY 1235 * a thread is destroyed 1236 * GST_STREAM_STATUS_TYPE_START 1237 * a thread is started 1238 * GST_STREAM_STATUS_TYPE_PAUSE 1239 * a thread is paused 1240 * GST_STREAM_STATUS_TYPE_STOP 1241 * a thread is stopped 1242 */ 1243 public enum GstStreamStatusType 1244 { 1245 TYPE_CREATE = 0, 1246 TYPE_ENTER = 1, 1247 TYPE_LEAVE = 2, 1248 TYPE_DESTROY = 3, 1249 TYPE_START = 8, 1250 TYPE_PAUSE = 9, 1251 TYPE_STOP = 10 1252 } 1253 alias GstStreamStatusType StreamStatusType; 1254 1255 /** 1256 * The type of a GST_MESSAGE_PROGRESS. The progress messages inform the 1257 * application of the status of assynchronous tasks. 1258 * GST_PROGRESS_TYPE_START 1259 * A new task started. 1260 * GST_PROGRESS_TYPE_CONTINUE 1261 * A task completed and a new one continues. 1262 * GST_PROGRESS_TYPE_COMPLETE 1263 * A task completed. 1264 * GST_PROGRESS_TYPE_CANCELED 1265 * A task was canceled. 1266 * GST_PROGRESS_TYPE_ERROR 1267 * A task caused an error. An error message is also 1268 * posted on the bus. 1269 */ 1270 public enum GstProgressType 1271 { 1272 TYPE_START = 0, 1273 TYPE_CONTINUE = 1, 1274 TYPE_COMPLETE = 2, 1275 TYPE_CANCELED = 3, 1276 TYPE_ERROR = 4 1277 } 1278 alias GstProgressType ProgressType; 1279 1280 /** 1281 * Extra metadata flags. 1282 * GST_META_FLAG_NONE 1283 * no flags 1284 * GST_META_FLAG_READONLY 1285 * metadata should not be modified 1286 * GST_META_FLAG_POOLED 1287 * metadata is managed by a bufferpool 1288 * GST_META_FLAG_LOCKED 1289 * metadata should not be removed 1290 * GST_META_FLAG_LAST 1291 * additional flags can be added starting from this flag. 1292 */ 1293 public enum GstMetaFlags 1294 { 1295 NONE = 0, 1296 READONLY = (1 << 0), 1297 POOLED = (1 << 1), 1298 LOCKED = (1 << 2), 1299 LAST = (1 << 16) 1300 } 1301 alias GstMetaFlags MetaFlags; 1302 1303 /** 1304 * Flags for the mini object 1305 * GST_MINI_OBJECT_FLAG_LOCKABLE 1306 * the object can be locked and unlocked with 1307 * gst_mini_object_lock() and gst_mini_object_unlock(). 1308 * GST_MINI_OBJECT_FLAG_LOCK_READONLY 1309 * the object is permanently locked in 1310 * READONLY mode. Only read locks can be performed on the object. 1311 * GST_MINI_OBJECT_FLAG_LAST 1312 * first flag that can be used by subclasses. 1313 */ 1314 public enum GstMiniObjectFlags 1315 { 1316 LOCKABLE = (1 << 0), 1317 LOCK_READONLY = (1 << 1), 1318 /+* padding +/ 1319 LAST = (1 << 4) 1320 } 1321 alias GstMiniObjectFlags MiniObjectFlags; 1322 1323 /** 1324 * Flags used when locking miniobjects 1325 * GST_LOCK_FLAG_READ 1326 * lock for read access 1327 * GST_LOCK_FLAG_WRITE 1328 * lock for write access 1329 * GST_LOCK_FLAG_EXCLUSIVE 1330 * lock for exclusive access 1331 * GST_LOCK_FLAG_LAST 1332 * first flag that can be used for custom purposes 1333 */ 1334 public enum GstLockFlags 1335 { 1336 READ = (1 << 0), 1337 WRITE = (1 << 1), 1338 EXCLUSIVE = (1 << 2), 1339 LAST = (1 << 8) 1340 } 1341 alias GstLockFlags LockFlags; 1342 1343 /** 1344 * The standard flags that an gstobject may have. 1345 * GST_OBJECT_FLAG_LAST 1346 * subclasses can add additional flags starting from this flag 1347 */ 1348 public enum GstObjectFlags 1349 { 1350 LAST = (1<<4) 1351 } 1352 alias GstObjectFlags ObjectFlags; 1353 1354 /** 1355 * The direction of a pad. 1356 * GST_PAD_UNKNOWN 1357 * direction is unknown. 1358 * GST_PAD_SRC 1359 * the pad is a source pad. 1360 * GST_PAD_SINK 1361 * the pad is a sink pad. 1362 */ 1363 public enum GstPadDirection 1364 { 1365 UNKNOWN, 1366 SRC, 1367 SINK 1368 } 1369 alias GstPadDirection PadDirection; 1370 1371 /** 1372 * GST_PAD_FLAG_BLOCKED 1373 * is dataflow on a pad blocked 1374 * GST_PAD_FLAG_FLUSHING 1375 * is pad flushing 1376 * GST_PAD_FLAG_EOS 1377 * is pad in EOS state 1378 * GST_PAD_FLAG_BLOCKING 1379 * is pad currently blocking on a buffer or event 1380 * GST_PAD_FLAG_NEED_PARENT 1381 * ensure that there is a parent object before calling 1382 * into the pad callbacks. 1383 * GST_PAD_FLAG_NEED_RECONFIGURE 1384 * the pad should be reconfigured/renegotiated. 1385 * The flag has to be unset manually after 1386 * reconfiguration happened. 1387 * GST_PAD_FLAG_PENDING_EVENTS 1388 * the pad has pending events 1389 * GST_PAD_FLAG_FIXED_CAPS 1390 * the pad is using fixed caps this means that once the 1391 * caps are set on the pad, the caps query function only 1392 * GST_PAD_FLAG_PROXY_CAPS 1393 * GST_PAD_FLAG_PROXY_ALLOCATION 1394 * GST_PAD_FLAG_PROXY_SCHEDULING 1395 * GST_PAD_FLAG_LAST 1396 */ 1397 public enum GstPadFlags 1398 { 1399 BLOCKED = (GstObjectFlags.LAST << 0), 1400 FLUSHING = (GstObjectFlags.LAST << 1), 1401 EOS = (GstObjectFlags.LAST << 2), 1402 BLOCKING = (GstObjectFlags.LAST << 3), 1403 NEED_PARENT = (GstObjectFlags.LAST << 4), 1404 NEED_RECONFIGURE = (GstObjectFlags.LAST << 5), 1405 PENDING_EVENTS = (GstObjectFlags.LAST << 6), 1406 FIXED_CAPS = (GstObjectFlags.LAST << 7), 1407 PROXY_CAPS = (GstObjectFlags.LAST << 8), 1408 PROXY_ALLOCATION = (GstObjectFlags.LAST << 9), 1409 PROXY_SCHEDULING = (GstObjectFlags.LAST << 10), 1410 /+* padding +/ 1411 LAST = (GstObjectFlags.LAST << 16) 1412 } 1413 alias GstPadFlags PadFlags; 1414 1415 /** 1416 * Result values from gst_pad_link and friends. 1417 * GST_PAD_LINK_OK 1418 * link succeeded 1419 * GST_PAD_LINK_WRONG_HIERARCHY 1420 * pads have no common grandparent 1421 * GST_PAD_LINK_WAS_LINKED 1422 * pad was already linked 1423 * GST_PAD_LINK_WRONG_DIRECTION 1424 * pads have wrong direction 1425 * GST_PAD_LINK_NOFORMAT 1426 * pads do not have common format 1427 * GST_PAD_LINK_NOSCHED 1428 * pads cannot cooperate in scheduling 1429 * GST_PAD_LINK_REFUSED 1430 * refused for some reason 1431 */ 1432 public enum GstPadLinkReturn 1433 { 1434 OK = 0, 1435 WRONG_HIERARCHY = -1, 1436 WAS_LINKED = -2, 1437 WRONG_DIRECTION = -3, 1438 NOFORMAT = -4, 1439 NOSCHED = -5, 1440 REFUSED = -6 1441 } 1442 alias GstPadLinkReturn PadLinkReturn; 1443 1444 /** 1445 * The amount of checking to be done when linking pads. GST_PAD_LINK_CHECK_CAPS 1446 * and GST_PAD_LINK_CHECK_TEMPLATE_CAPS are mutually exclusive. If both are 1447 * specified, expensive but safe GST_PAD_LINK_CHECK_CAPS are performed. 1448 * Warning 1449 * Only disable some of the checks if you are 100% certain you know the link 1450 * will not fail because of hierarchy/caps compatibility failures. If uncertain, 1451 * use the default checks (GST_PAD_LINK_CHECK_DEFAULT) or the regular methods 1452 * for linking the pads. 1453 * GST_PAD_LINK_CHECK_NOTHING 1454 * Don't check hierarchy or caps compatibility. 1455 * GST_PAD_LINK_CHECK_HIERARCHY 1456 * Check the pads have same parents/grandparents. 1457 * Could be omitted if it is already known that the two elements that own the 1458 * pads are in the same bin. 1459 * GST_PAD_LINK_CHECK_TEMPLATE_CAPS 1460 * Check if the pads are compatible by using 1461 * their template caps. This is much faster than GST_PAD_LINK_CHECK_CAPS, but 1462 * would be unsafe e.g. if one pad has GST_CAPS_ANY. 1463 * GST_PAD_LINK_CHECK_CAPS 1464 * Check if the pads are compatible by comparing the 1465 * caps returned by gst_pad_query_caps(). 1466 * GST_PAD_LINK_CHECK_DEFAULT 1467 * The default checks done when linking 1468 * pads (i.e. the ones used by gst_pad_link()). 1469 */ 1470 public enum GstPadLinkCheck 1471 { 1472 NOTHING = 0, 1473 HIERARCHY = 1 << 0, 1474 TEMPLATE_CAPS = 1 << 1, 1475 CAPS = 1 << 2, 1476 DEFAULT = HIERARCHY | CAPS 1477 } 1478 alias GstPadLinkCheck PadLinkCheck; 1479 1480 /** 1481 * The result of passing data to a pad. 1482 * Note that the custom return values should not be exposed outside of the 1483 * element scope. 1484 * GST_FLOW_CUSTOM_SUCCESS_2 1485 * Pre-defined custom success code. 1486 * GST_FLOW_CUSTOM_SUCCESS_1 1487 * Pre-defined custom success code (define your 1488 * custom success code to this to avoid compiler 1489 * warnings). 1490 * GST_FLOW_CUSTOM_SUCCESS 1491 * Elements can use values starting from 1492 * this (and higher) to define custom success 1493 * codes. 1494 * GST_FLOW_OK 1495 * Data passing was ok. 1496 * GST_FLOW_NOT_LINKED 1497 * Pad is not linked. 1498 * GST_FLOW_FLUSHING 1499 * Pad is flushing. 1500 * GST_FLOW_EOS 1501 * Pad is EOS. 1502 * GST_FLOW_NOT_NEGOTIATED 1503 * Pad is not negotiated. 1504 * GST_FLOW_ERROR 1505 * Some (fatal) error occured. Element generating 1506 * this error should post an error message with more 1507 * details. 1508 * GST_FLOW_NOT_SUPPORTED 1509 * This operation is not supported. 1510 * GST_FLOW_CUSTOM_ERROR 1511 * Elements can use values starting from 1512 * this (and lower) to define custom error codes. 1513 * GST_FLOW_CUSTOM_ERROR_1 1514 * Pre-defined custom error code (define your 1515 * custom error code to this to avoid compiler 1516 * warnings). 1517 * GST_FLOW_CUSTOM_ERROR_2 1518 * Pre-defined custom error code. 1519 */ 1520 public enum GstFlowReturn 1521 { 1522 CUSTOM_SUCCESS_2 = 102, 1523 CUSTOM_SUCCESS_1 = 101, 1524 CUSTOM_SUCCESS = 100, 1525 /+* core predefined +/ 1526 OK = 0, 1527 /+* expected failures +/ 1528 NOT_LINKED = -1, 1529 FLUSHING = -2, 1530 /+* error cases +/ 1531 EOS = -3, 1532 NOT_NEGOTIATED = -4, 1533 ERROR = -5, 1534 NOT_SUPPORTED = -6, 1535 /+* custom error starts here +/ 1536 CUSTOM_ERROR = -100, 1537 CUSTOM_ERROR_1 = -101, 1538 CUSTOM_ERROR_2 = -102 1539 } 1540 alias GstFlowReturn FlowReturn; 1541 1542 /** 1543 * The status of a GstPad. After activating a pad, which usually happens when the 1544 * parent element goes from READY to PAUSED, the GstPadMode defines if the 1545 * pad operates in push or pull mode. 1546 * GST_PAD_MODE_NONE 1547 * Pad will not handle dataflow 1548 * GST_PAD_MODE_PUSH 1549 * Pad handles dataflow in downstream push mode 1550 * GST_PAD_MODE_PULL 1551 * Pad handles dataflow in upstream pull mode 1552 */ 1553 public enum GstPadMode 1554 { 1555 MODE_NONE, 1556 MODE_PUSH, 1557 MODE_PULL 1558 } 1559 alias GstPadMode PadMode; 1560 1561 /** 1562 * GST_PAD_PROBE_DROP 1563 * drop data in data probes. For push mode this means that 1564 * the data item is not sent downstream. For pull mode, it means that the 1565 * data item is not passed upstream. In both cases, this result code 1566 * GST_PAD_PROBE_OK 1567 * normal probe return value 1568 * GST_PAD_PROBE_REMOVE 1569 * GST_PAD_PROBE_PASS 1570 */ 1571 public enum GstPadProbeReturn 1572 { 1573 DROP, 1574 OK, 1575 REMOVE, 1576 PASS, 1577 } 1578 alias GstPadProbeReturn PadProbeReturn; 1579 1580 /** 1581 * The different probing types that can occur. When either one of 1582 * GST_PAD_PROBE_TYPE_IDLE or GST_PAD_PROBE_TYPE_BLOCK is used, the probe will be a 1583 * blocking probe. 1584 * GST_PAD_PROBE_TYPE_INVALID 1585 * invalid probe type 1586 * GST_PAD_PROBE_TYPE_IDLE 1587 * probe idle pads and block 1588 * GST_PAD_PROBE_TYPE_BLOCK 1589 * probe and block pads 1590 * GST_PAD_PROBE_TYPE_BUFFER 1591 * probe buffers 1592 * GST_PAD_PROBE_TYPE_BUFFER_LIST 1593 * probe buffer lists 1594 * GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM 1595 * probe downstream events 1596 * GST_PAD_PROBE_TYPE_EVENT_UPSTREAM 1597 * probe upstream events 1598 * GST_PAD_PROBE_TYPE_EVENT_FLUSH 1599 * probe flush events. This probe has to be 1600 * explicitly enabled and is not included in the 1601 * @GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM or 1602 * @GST_PAD_PROBE_TYPE_EVENT_UPSTREAM probe types. 1603 * GST_PAD_PROBE_TYPE_QUERY_DOWNSTREAM 1604 * probe downstream queries 1605 * GST_PAD_PROBE_TYPE_QUERY_UPSTREAM 1606 * probe upstream queries 1607 * GST_PAD_PROBE_TYPE_PUSH 1608 * probe push 1609 * GST_PAD_PROBE_TYPE_PULL 1610 * probe pull 1611 * GST_PAD_PROBE_TYPE_BLOCKING 1612 * probe and block at the next opportunity, at data flow or when idle 1613 * GST_PAD_PROBE_TYPE_DATA_DOWNSTREAM 1614 * probe downstream data (buffers, buffer lists, and events) 1615 * GST_PAD_PROBE_TYPE_DATA_UPSTREAM 1616 * probe upstream data (events) 1617 * GST_PAD_PROBE_TYPE_DATA_BOTH 1618 * probe upstream and downstream data (buffers, buffer lists, and events) 1619 * GST_PAD_PROBE_TYPE_BLOCK_DOWNSTREAM 1620 * probe and block downstream data (buffers, buffer lists, and events) 1621 * GST_PAD_PROBE_TYPE_BLOCK_UPSTREAM 1622 * probe and block upstream data (events) 1623 * GST_PAD_PROBE_TYPE_EVENT_BOTH 1624 * probe upstream and downstream events 1625 * GST_PAD_PROBE_TYPE_QUERY_BOTH 1626 * probe upstream and downstream queries 1627 * GST_PAD_PROBE_TYPE_ALL_BOTH 1628 * probe upstream events and queries and downstream buffers, buffer lists, events and queries 1629 * GST_PAD_PROBE_TYPE_SCHEDULING 1630 * probe push and pull 1631 */ 1632 public enum GstPadProbeType 1633 { 1634 TYPE_INVALID = 0, 1635 /+* flags to control blocking +/ 1636 TYPE_IDLE = (1 << 0), 1637 TYPE_BLOCK = (1 << 1), 1638 /+* flags to select datatypes +/ 1639 TYPE_BUFFER = (1 << 4), 1640 TYPE_BUFFER_LIST = (1 << 5), 1641 TYPE_EVENT_DOWNSTREAM = (1 << 6), 1642 TYPE_EVENT_UPSTREAM = (1 << 7), 1643 TYPE_EVENT_FLUSH = (1 << 8), 1644 TYPE_QUERY_DOWNSTREAM = (1 << 9), 1645 TYPE_QUERY_UPSTREAM = (1 << 10), 1646 /+* flags to select scheduling mode +/ 1647 TYPE_PUSH = (1 << 12), 1648 TYPE_PULL = (1 << 13), 1649 /+* flag combinations +/ 1650 TYPE_BLOCKING = TYPE_IDLE | TYPE_BLOCK, 1651 TYPE_DATA_DOWNSTREAM = TYPE_BUFFER | TYPE_BUFFER_LIST | TYPE_EVENT_DOWNSTREAM, 1652 TYPE_DATA_UPSTREAM = TYPE_EVENT_UPSTREAM, 1653 TYPE_DATA_BOTH = TYPE_DATA_DOWNSTREAM | TYPE_DATA_UPSTREAM, 1654 TYPE_BLOCK_DOWNSTREAM = TYPE_BLOCK | TYPE_DATA_DOWNSTREAM, 1655 TYPE_BLOCK_UPSTREAM = TYPE_BLOCK | TYPE_DATA_UPSTREAM, 1656 TYPE_EVENT_BOTH = TYPE_EVENT_DOWNSTREAM | TYPE_EVENT_UPSTREAM, 1657 TYPE_QUERY_BOTH = TYPE_QUERY_DOWNSTREAM | TYPE_QUERY_UPSTREAM, 1658 TYPE_ALL_BOTH = TYPE_DATA_BOTH | TYPE_QUERY_BOTH, 1659 TYPE_SCHEDULING = TYPE_PUSH | TYPE_PULL 1660 } 1661 alias GstPadProbeType PadProbeType; 1662 1663 /** 1664 * Flags for the padtemplate 1665 * GST_PAD_TEMPLATE_FLAG_LAST 1666 * first flag that can be used by subclasses. 1667 */ 1668 public enum GstPadTemplateFlags 1669 { 1670 LAST = (GstObjectFlags.LAST << 4) 1671 } 1672 alias GstPadTemplateFlags PadTemplateFlags; 1673 1674 /** 1675 * Indicates when this pad will become available. 1676 * GST_PAD_ALWAYS 1677 * the pad is always available 1678 * GST_PAD_SOMETIMES 1679 * the pad will become available depending on the media stream 1680 * GST_PAD_REQUEST 1681 * the pad is only available on request with 1682 * gst_element_get_request_pad(). 1683 */ 1684 public enum GstPadPresence 1685 { 1686 ALWAYS, 1687 SOMETIMES, 1688 REQUEST 1689 } 1690 alias GstPadPresence PadPresence; 1691 1692 /** 1693 * The different parsing errors that can occur. 1694 * GST_PARSE_ERROR_SYNTAX 1695 * A syntax error occured. 1696 * GST_PARSE_ERROR_NO_SUCH_ELEMENT 1697 * The description contained an unknown element 1698 * GST_PARSE_ERROR_NO_SUCH_PROPERTY 1699 * An element did not have a specified property 1700 * GST_PARSE_ERROR_LINK 1701 * There was an error linking two pads. 1702 * GST_PARSE_ERROR_COULD_NOT_SET_PROPERTY 1703 * There was an error setting a property 1704 * GST_PARSE_ERROR_EMPTY_BIN 1705 * An empty bin was specified. 1706 * GST_PARSE_ERROR_EMPTY 1707 * An empty description was specified 1708 */ 1709 public enum GstParseError 1710 { 1711 SYNTAX, 1712 NO_SUCH_ELEMENT, 1713 NO_SUCH_PROPERTY, 1714 LINK, 1715 COULD_NOT_SET_PROPERTY, 1716 EMPTY_BIN, 1717 EMPTY 1718 } 1719 alias GstParseError ParseError; 1720 1721 /** 1722 * Parsing options. 1723 * GST_PARSE_FLAG_NONE 1724 * Do not use any special parsing options. 1725 * GST_PARSE_FLAG_FATAL_ERRORS 1726 * Always return NULL when an error occurs 1727 * (default behaviour is to return partially constructed bins or elements 1728 * in some cases) 1729 * GST_PARSE_FLAG_NO_SINGLE_ELEMENT_BINS 1730 * If a bin only has a single element, 1731 * just return the element. 1732 */ 1733 public enum GstParseFlags 1734 { 1735 NONE = 0, 1736 FATAL_ERRORS = (1 << 0), 1737 NO_SINGLE_ELEMENT_BINS = (1 << 1) 1738 } 1739 alias GstParseFlags ParseFlags; 1740 1741 /** 1742 * Pipeline flags 1743 * GST_PIPELINE_FLAG_FIXED_CLOCK 1744 * this pipeline works with a fixed clock 1745 * GST_PIPELINE_FLAG_LAST 1746 * offset to define more flags 1747 */ 1748 public enum GstPipelineFlags 1749 { 1750 FIXED_CLOCK = (GstBinFlags.FLAG_LAST << 0), 1751 /+* padding +/ 1752 LAST = (GstBinFlags.FLAG_LAST << 4) 1753 } 1754 alias GstPipelineFlags PipelineFlags; 1755 1756 /** 1757 * The plugin loading errors 1758 * GST_PLUGIN_ERROR_MODULE 1759 * The plugin could not be loaded 1760 * GST_PLUGIN_ERROR_DEPENDENCIES 1761 * The plugin has unresolved dependencies 1762 * GST_PLUGIN_ERROR_NAME_MISMATCH 1763 * The plugin has already be loaded from a different file 1764 */ 1765 public enum GstPluginError 1766 { 1767 MODULE, 1768 DEPENDENCIES, 1769 NAME_MISMATCH 1770 } 1771 alias GstPluginError PluginError; 1772 1773 /** 1774 * The plugin loading state 1775 * GST_PLUGIN_FLAG_CACHED 1776 * Temporarily loaded plugins 1777 * GST_PLUGIN_FLAG_BLACKLISTED 1778 * The plugin won't be scanned (again) 1779 */ 1780 public enum GstPluginFlags 1781 { 1782 CACHED = (GstObjectFlags.LAST << 0), 1783 BLACKLISTED = (GstObjectFlags.LAST << 1) 1784 } 1785 alias GstPluginFlags PluginFlags; 1786 1787 /** 1788 * Flags used in connection with gst_plugin_add_dependency(). 1789 * GST_PLUGIN_DEPENDENCY_FLAG_NONE 1790 * no special flags 1791 * GST_PLUGIN_DEPENDENCY_FLAG_RECURSE 1792 * recurse into subdirectories 1793 * GST_PLUGIN_DEPENDENCY_FLAG_PATHS_ARE_DEFAULT_ONLY 1794 * use paths 1795 * argument only if none of the environment variables is set 1796 * GST_PLUGIN_DEPENDENCY_FLAG_FILE_NAME_IS_SUFFIX 1797 * interpret 1798 * filename argument as filter suffix and check all matching files in 1799 * the directory 1800 */ 1801 public enum GstPluginDependencyFlags 1802 { 1803 NONE = 0, 1804 RECURSE = (1 << 0), 1805 PATHS_ARE_DEFAULT_ONLY = (1 << 1), 1806 FILE_NAME_IS_SUFFIX = (1 << 2) 1807 } 1808 alias GstPluginDependencyFlags PluginDependencyFlags; 1809 1810 /** 1811 * Element priority ranks. Defines the order in which the autoplugger (or 1812 * similar rank-picking mechanisms, such as e.g. gst_element_make_from_uri()) 1813 * will choose this element over an alternative one with the same function. 1814 * These constants serve as a rough guidance for defining the rank of a 1815 * GstPluginFeature. Any value is valid, including values bigger than 1816 * GST_RANK_PRIMARY. 1817 * GST_RANK_NONE 1818 * will be chosen last or not at all 1819 * GST_RANK_MARGINAL 1820 * unlikely to be chosen 1821 * GST_RANK_SECONDARY 1822 * likely to be chosen 1823 * GST_RANK_PRIMARY 1824 * will be chosen first 1825 */ 1826 public enum GstRank 1827 { 1828 NONE = 0, 1829 MARGINAL = 64, 1830 SECONDARY = 128, 1831 PRIMARY = 256 1832 } 1833 alias GstRank Rank; 1834 1835 /** 1836 * GstQueryTypeFlags indicate the aspects of the different GstQueryType 1837 * values. You can get the type flags of a GstQueryType with the 1838 * gst_query_type_get_flags() function. 1839 * GST_QUERY_TYPE_UPSTREAM 1840 * Set if the query can travel upstream. 1841 * GST_QUERY_TYPE_DOWNSTREAM 1842 * Set if the query can travel downstream. 1843 * GST_QUERY_TYPE_SERIALIZED 1844 * Set if the query should be serialized with data 1845 * flow. 1846 */ 1847 public enum GstQueryTypeFlags 1848 { 1849 UPSTREAM = 1 << 0, 1850 DOWNSTREAM = 1 << 1, 1851 SERIALIZED = 1 << 2 1852 } 1853 alias GstQueryTypeFlags QueryTypeFlags; 1854 1855 /** 1856 * The different types of buffering methods. 1857 * GST_BUFFERING_STREAM 1858 * a small amount of data is buffered 1859 * GST_BUFFERING_DOWNLOAD 1860 * the stream is being downloaded 1861 * GST_BUFFERING_TIMESHIFT 1862 * the stream is being downloaded in a ringbuffer 1863 * GST_BUFFERING_LIVE 1864 * the stream is a live stream 1865 */ 1866 public enum GstBufferingMode 1867 { 1868 STREAM, 1869 DOWNLOAD, 1870 TIMESHIFT, 1871 LIVE 1872 } 1873 alias GstBufferingMode BufferingMode; 1874 1875 /** 1876 * The different scheduling flags. 1877 * GST_SCHEDULING_FLAG_SEEKABLE 1878 * if seeking is possible 1879 * GST_SCHEDULING_FLAG_SEQUENTIAL 1880 * if sequential access is recommended 1881 * GST_SCHEDULING_FLAG_BANDWIDTH_LIMITED 1882 * if bandwidth is limited and buffering possible (since 1.2) 1883 */ 1884 public enum GstSchedulingFlags 1885 { 1886 SEEKABLE = (1 << 0), 1887 SEQUENTIAL = (1 << 1), 1888 BANDWIDTH_LIMITED = (1 << 2) 1889 } 1890 alias GstSchedulingFlags SchedulingFlags; 1891 1892 /** 1893 * Flags for the GstSegment structure. Currently mapped to the corresponding 1894 * values of the seek flags. 1895 * GST_SEGMENT_FLAG_NONE 1896 * no flags 1897 * GST_SEGMENT_FLAG_RESET 1898 * reset the pipeline running_time to the segment 1899 * running_time 1900 * GST_SEGMENT_FLAG_SKIP 1901 * perform skip playback 1902 * GST_SEGMENT_FLAG_SEGMENT 1903 * send SEGMENT_DONE instead of EOS 1904 */ 1905 public enum GstSegmentFlags 1906 { 1907 NONE = GstSeekFlags.NONE, 1908 RESET = GstSeekFlags.FLUSH, 1909 SKIP = GstSeekFlags.SKIP, 1910 SEGMENT = GstSeekFlags.SEGMENT 1911 } 1912 alias GstSegmentFlags SegmentFlags; 1913 1914 /** 1915 * The different kind of clocks. 1916 * GST_CLOCK_TYPE_REALTIME 1917 * time since Epoch 1918 * GST_CLOCK_TYPE_MONOTONIC 1919 * monotonic time since some unspecified starting 1920 * point 1921 * GST_CLOCK_TYPE_OTHER 1922 * some other time source is used (Since: 1.0.5) 1923 */ 1924 public enum GstClockType 1925 { 1926 TYPE_REALTIME = 0, 1927 TYPE_MONOTONIC = 1, 1928 TYPE_OTHER = 2 1929 } 1930 alias GstClockType ClockType; 1931 1932 /** 1933 * The different tag merging modes are basically replace, overwrite and append, 1934 * but they can be seen from two directions. Given two taglists: (A) the tags 1935 * already in the element and (B) the ones that are supplied to the element ( 1936 * e.g. via gst_tag_setter_merge_tags() / gst_tag_setter_add_tags() or a 1937 * GST_EVENT_TAG), how are these tags merged? 1938 * In the table below this is shown for the cases that a tag exists in the list 1939 * (A) or does not exists (!A) and combinations thereof. 1940 * Table 1. merge mode 1941 * merge mode 1942 * A + B 1943 * A + !B 1944 * !A + B 1945 * !A + !B 1946 * REPLACE_ALL 1947 * B 1948 * - 1949 * B 1950 * - 1951 * REPLACE 1952 * B 1953 * A 1954 * B 1955 * - 1956 * APPEND 1957 * A, B 1958 * A 1959 * B 1960 * - 1961 * PREPEND 1962 * B, A 1963 * A 1964 * B 1965 * - 1966 * KEEP 1967 * A 1968 * A 1969 * B 1970 * - 1971 * KEEP_ALL 1972 * A 1973 * A 1974 * - 1975 * - 1976 * GST_TAG_MERGE_UNDEFINED 1977 * undefined merge mode 1978 * GST_TAG_MERGE_REPLACE_ALL 1979 * replace all tags (clear list and append) 1980 * GST_TAG_MERGE_REPLACE 1981 * replace tags 1982 * GST_TAG_MERGE_APPEND 1983 * append tags 1984 * GST_TAG_MERGE_PREPEND 1985 * prepend tags 1986 * GST_TAG_MERGE_KEEP 1987 * keep existing tags 1988 * GST_TAG_MERGE_KEEP_ALL 1989 * keep all existing tags 1990 * GST_TAG_MERGE_COUNT 1991 * the number of merge modes 1992 */ 1993 public enum GstTagMergeMode 1994 { 1995 UNDEFINED, 1996 REPLACE_ALL, 1997 REPLACE, 1998 APPEND, 1999 PREPEND, 2000 KEEP, 2001 KEEP_ALL, 2002 /+* add more +/ 2003 COUNT 2004 } 2005 alias GstTagMergeMode TagMergeMode; 2006 2007 /** 2008 * Extra tag flags used when registering tags. 2009 * GST_TAG_FLAG_UNDEFINED 2010 * undefined flag 2011 * GST_TAG_FLAG_META 2012 * tag is meta data 2013 * GST_TAG_FLAG_ENCODED 2014 * tag is encoded 2015 * GST_TAG_FLAG_DECODED 2016 * tag is decoded 2017 * GST_TAG_FLAG_COUNT 2018 * number of tag flags 2019 */ 2020 public enum GstTagFlag 2021 { 2022 FLAG_UNDEFINED, 2023 FLAG_META, 2024 FLAG_ENCODED, 2025 FLAG_DECODED, 2026 FLAG_COUNT 2027 } 2028 alias GstTagFlag TagFlag; 2029 2030 /** 2031 * GstTagScope specifies if a taglist applies to the complete 2032 * medium or only to one single stream. 2033 * GST_TAG_SCOPE_STREAM 2034 * tags specific to this single stream 2035 * GST_TAG_SCOPE_GLOBAL 2036 * global tags for the complete medium 2037 */ 2038 public enum GstTagScope 2039 { 2040 STREAM, 2041 GLOBAL 2042 } 2043 alias GstTagScope TagScope; 2044 2045 /** 2046 * The different states a task can be in 2047 * GST_TASK_STARTED 2048 * the task is started and running 2049 * GST_TASK_STOPPED 2050 * the task is stopped 2051 * GST_TASK_PAUSED 2052 * the task is paused 2053 */ 2054 public enum GstTaskState 2055 { 2056 STARTED, 2057 STOPPED, 2058 PAUSED 2059 } 2060 alias GstTaskState TaskState; 2061 2062 /** 2063 * The scope of a TOC. 2064 * GST_TOC_SCOPE_GLOBAL 2065 * global TOC representing all selectable options 2066 * (this is what applications are usually interested in) 2067 * GST_TOC_SCOPE_CURRENT 2068 * TOC for the currently active/selected stream 2069 * (this is a TOC representing the current stream from start to EOS, 2070 * and is what a TOC writer / muxer is usually interested in; it will 2071 * usually be a subset of the global TOC, e.g. just the chapters of 2072 * the current title, or the chapters selected for playback from the 2073 * current title) 2074 */ 2075 public enum GstTocScope 2076 { 2077 GLOBAL = 1, 2078 CURRENT = 2 2079 } 2080 alias GstTocScope TocScope; 2081 2082 /** 2083 * The different types of TOC entries (see GstTocEntry). 2084 * There are two types of TOC entries: alternatives or parts in a sequence. 2085 * GST_TOC_ENTRY_TYPE_ANGLE 2086 * entry is an angle (i.e. an alternative) 2087 * GST_TOC_ENTRY_TYPE_VERSION 2088 * entry is a version (i.e. alternative) 2089 * GST_TOC_ENTRY_TYPE_EDITION 2090 * entry is an edition (i.e. alternative) 2091 * GST_TOC_ENTRY_TYPE_INVALID 2092 * invalid entry type value 2093 * GST_TOC_ENTRY_TYPE_TITLE 2094 * entry is a title (i.e. a part of a sequence) 2095 * GST_TOC_ENTRY_TYPE_TRACK 2096 * entry is a track (i.e. a part of a sequence) 2097 * GST_TOC_ENTRY_TYPE_CHAPTER 2098 * entry is a chapter (i.e. a part of a sequence) 2099 */ 2100 public enum GstTocEntryType 2101 { 2102 TYPE_ANGLE = -3, 2103 TYPE_VERSION = -2, 2104 TYPE_EDITION = -1, 2105 TYPE_INVALID = 0, 2106 TYPE_TITLE = 1, 2107 TYPE_TRACK = 2, 2108 TYPE_CHAPTER = 3, 2109 } 2110 alias GstTocEntryType TocEntryType; 2111 2112 /** 2113 * The probability of the typefind function. Higher values have more certainty 2114 * in doing a reliable typefind. 2115 * GST_TYPE_FIND_NONE 2116 * type undetected. 2117 * GST_TYPE_FIND_MINIMUM 2118 * unlikely typefind. 2119 * GST_TYPE_FIND_POSSIBLE 2120 * possible type detected. 2121 * GST_TYPE_FIND_LIKELY 2122 * likely a type was detected. 2123 * GST_TYPE_FIND_NEARLY_CERTAIN 2124 * nearly certain that a type was detected. 2125 * GST_TYPE_FIND_MAXIMUM 2126 * very certain a type was detected. 2127 */ 2128 public enum GstTypeFindProbability 2129 { 2130 NONE = 0, 2131 MINIMUM = 1, 2132 POSSIBLE = 50, 2133 LIKELY = 80, 2134 NEARLY_CERTAIN = 99, 2135 MAXIMUM = 100 2136 } 2137 alias GstTypeFindProbability TypeFindProbability; 2138 2139 /** 2140 * The different types of URI direction. 2141 * GST_URI_UNKNOWN 2142 * The URI direction is unknown 2143 * GST_URI_SINK 2144 * The URI is a consumer. 2145 * GST_URI_SRC 2146 * The URI is a producer. 2147 */ 2148 public enum GstURIType 2149 { 2150 UNKNOWN, 2151 SINK, 2152 SRC 2153 } 2154 alias GstURIType URIType; 2155 2156 /** 2157 * Different URI-related errors that can occur. 2158 * GST_URI_ERROR_UNSUPPORTED_PROTOCOL 2159 * The protocol is not supported 2160 * GST_URI_ERROR_BAD_URI 2161 * There was a problem with the URI 2162 * GST_URI_ERROR_BAD_STATE 2163 * Could not set or change the URI because the 2164 * URI handler was in a state where that is not possible or not permitted 2165 * GST_URI_ERROR_BAD_REFERENCE 2166 * There was a problem with the entity that 2167 * the URI references 2168 */ 2169 public enum GstURIError 2170 { 2171 UNSUPPORTED_PROTOCOL, 2172 BAD_URI, 2173 BAD_STATE, 2174 BAD_REFERENCE 2175 } 2176 alias GstURIError URIError; 2177 2178 /** 2179 * The different search modes. 2180 * GST_SEARCH_MODE_EXACT 2181 * Only search for exact matches. 2182 * GST_SEARCH_MODE_BEFORE 2183 * Search for an exact match or the element just before. 2184 * GST_SEARCH_MODE_AFTER 2185 * Search for an exact match or the element just after. 2186 */ 2187 public enum GstSearchMode 2188 { 2189 MODE_EXACT = 0, 2190 MODE_BEFORE, 2191 MODE_AFTER 2192 } 2193 alias GstSearchMode SearchMode; 2194 2195 struct GstBinPrivate{} 2196 2197 public struct GstBuffer 2198 { 2199 GstMiniObject mini_object; 2200 2201 /*< public >*/ /* with COW */ 2202 GstBufferPool* pool; 2203 2204 /* timestamp */ 2205 GstClockTime pts; 2206 GstClockTime dts; 2207 GstClockTime duration; 2208 2209 /* media specific offset */ 2210 guint64 offset; 2211 guint64 offset_end; 2212 } 2213 2214 public struct GstObjectClass 2215 { 2216 GInitiallyUnownedClass parent_class; 2217 2218 const gchar* path_string_separator; 2219 2220 /* signals */ 2221 extern(C) void function(GstObject* object, GstObject* orig, GParamSpec* pspec) deep_notify; 2222 2223 /*< public >*/ 2224 /* virtual methods for subclasses */ 2225 2226 /*< private >*/ 2227 gpointer _gst_reserved[GST_PADDING]; 2228 } 2229 2230 struct GstMessage 2231 { 2232 GstMiniObject mini_object; 2233 2234 /*< public > *//* with COW */ 2235 GstMessageType type; 2236 guint64 timestamp; 2237 GstObject* src; 2238 guint32 seqnum; 2239 2240 /*< private >*//* with MESSAGE_LOCK */ 2241 GMutex lock; /* lock and cond for async delivery */ 2242 GCond cond; 2243 } 2244 2245 public struct GstMiniObject 2246 { 2247 GType type; 2248 2249 /*< public >*/ /* with COW */ 2250 gint refcount; 2251 gint lockstate; 2252 guint flags; 2253 2254 extern(C) GstMiniObject* function(GstMiniObject* obj) copy; 2255 extern(C) gboolean function(GstMiniObject* obj) dispose; 2256 extern(C) void function(GstMiniObject* obj) free; 2257 2258 /* < private > */ 2259 /* Used to keep track of weak ref notifies and qdata */ 2260 guint n_qdata; 2261 gpointer qdata; 2262 } 2263 2264 /** 2265 * Main Gtk struct. 2266 * The GstAllocator is used to create new memory. 2267 */ 2268 public struct GstAllocator{} 2269 2270 2271 /** 2272 * Parameters to control the allocation of memory 2273 * GstMemoryFlags flags; 2274 * flags to control allocation 2275 * gsize align; 2276 * the desired alignment of the memory 2277 * gsize prefix; 2278 * the desired prefix 2279 * gsize padding; 2280 * the desired padding 2281 */ 2282 public struct GstAllocationParams 2283 { 2284 GstMemoryFlags flags; 2285 gsize alig; 2286 gsize prefix; 2287 gsize padding; 2288 } 2289 2290 2291 /** 2292 * Main Gtk struct. 2293 * Opaque atomic data queue. 2294 * Use the acessor functions to get the stored values. 2295 */ 2296 public struct GstAtomicQueue{} 2297 2298 2299 /** 2300 * Main Gtk struct. 2301 * The GstBin base class. Subclasses can access these fields provided 2302 * the LOCK is taken. 2303 * gint numchildren; 2304 * the number of children in this bin 2305 * GList *children; 2306 * the list of children in this bin. [element-type Gst.Element] 2307 * guint32 children_cookie; 2308 * updated whenever children changes 2309 * GstBus *child_bus; 2310 * internal bus for handling child messages 2311 * GList *messages; 2312 * queued and cached messages. [element-type Gst.Message] 2313 * gboolean polling; 2314 * the bin is currently calculating its state 2315 * gboolean state_dirty; 2316 * the bin needs to recalculate its state (deprecated) 2317 * gboolean clock_dirty; 2318 * the bin needs to select a new clock 2319 * GstClock *provided_clock; 2320 * the last clock selected 2321 * GstElement *clock_provider; 2322 * the element that provided provided_clock 2323 */ 2324 public struct GstBin 2325 { 2326 /+* our children, subclass are supposed to update these 2327 * fields to reflect their state with _Iterate*() +/ 2328 int numchildren; 2329 GList *children; 2330 uint childrenCookie; 2331 GstBus *childBus; 2332 GList *messages; 2333 int polling; 2334 int stateDirty; 2335 int clockDirty; 2336 GstClock *providedClock; 2337 GstElement *clockProvider; 2338 } 2339 2340 2341 /** 2342 * Subclasses can override the add_element and remove_element to 2343 * update the list of children in the bin. 2344 * The handle_message method can be overridden to implement custom 2345 * message handling. handle_message takes ownership of the message, just like 2346 * gst_element_post_message. 2347 * GstElementClass parent_class; 2348 * bin parent class 2349 * add_element () 2350 * method to add an element to a bin 2351 * remove_element () 2352 * method to remove an element from a bin 2353 * handle_message () 2354 * method to handle a message from the children 2355 */ 2356 public struct GstBinClass 2357 { 2358 GstElementClass parentClass; 2359 /+* virtua methods for subclasses +/ 2360 extern(C) int function(GstBin* bin, GstElement* element) addElement; 2361 extern(C) int function(GstBin* bin, GstElement* element) removeElement; 2362 extern(C) void function(GstBin* bin, GstMessage* message) handleMessage; 2363 } 2364 2365 2366 /** 2367 * Main Gtk struct. 2368 * Opaque list of grouped buffers. 2369 */ 2370 public struct GstBufferList{} 2371 2372 2373 /** 2374 * Main Gtk struct. 2375 * The structure of a GstBufferPool. Use the associated macros to access the public 2376 * variables. 2377 * GstObject object; 2378 * the parent structure 2379 */ 2380 public struct GstBufferPool 2381 { 2382 GstObject object; 2383 } 2384 2385 2386 /** 2387 * The GstBufferPool class. 2388 * GstObjectClass object_class; 2389 * Object parent class 2390 * get_options () 2391 * get a list of options supported by this pool 2392 * set_config () 2393 * apply the bufferpool configuration. The default configuration 2394 * will parse the default config parameters 2395 * start () 2396 * start the bufferpool. The default implementation will preallocate 2397 * min-buffers buffers and put them in the queue 2398 * stop () 2399 * stop the bufferpool. the default implementation will free the 2400 * preallocated buffers. This function is called when all the buffers are 2401 * returned to the pool. 2402 * acquire_buffer () 2403 * get a new buffer from the pool. The default implementation 2404 * will take a buffer from the queue and optionally wait for a buffer to 2405 * be released when there are no buffers available. 2406 * alloc_buffer () 2407 * allocate a buffer. the default implementation allocates 2408 * buffers from the configured memory allocator and with the configured 2409 * parameters. All metadata that is present on the allocated buffer will 2410 * be marked as GST_META_FLAG_POOLED and GST_META_FLAG_LOCKED and will 2411 * not be removed from the buffer in reset_buffer. 2412 * reset_buffer () 2413 * reset the buffer to its state when it was freshly allocated. 2414 * The default implementation will clear the flags, timestamps and 2415 * will remove the metadata without the GST_META_FLAG_POOLED flag (even 2416 * the metadata with GST_META_FLAG_LOCKED). 2417 * release_buffer () 2418 * release a buffer back in the pool. The default 2419 * implementation will put the buffer back in the queue and notify any 2420 * blocking acquire_buffer calls. 2421 * free_buffer () 2422 * free a buffer. The default implementation unrefs the buffer. 2423 */ 2424 public struct GstBufferPoolClass 2425 { 2426 GstObjectClass objectClass; 2427 /+* vmethods +/ 2428 extern(C) char ** function(GstBufferPool* pool) getOptions; 2429 extern(C) int function(GstBufferPool* pool, GstStructure* config) setConfig; 2430 extern(C) int function(GstBufferPool* pool) start; 2431 extern(C) int function(GstBufferPool* pool) stop; 2432 extern(C) GstFlowReturn function(GstBufferPool* pool, GstBuffer** buffer, GstBufferPoolAcquireParams* params) acquireBuffer; 2433 extern(C) GstFlowReturn function(GstBufferPool* pool, GstBuffer** buffer, GstBufferPoolAcquireParams* params) allocBuffer; 2434 extern(C) void function(GstBufferPool* pool, GstBuffer* buffer) resetBuffer; 2435 extern(C) void function(GstBufferPool* pool, GstBuffer* buffer) releaseBuffer; 2436 extern(C) void function(GstBufferPool* pool, GstBuffer* buffer) freeBuffer; 2437 } 2438 2439 2440 /** 2441 * Parameters passed to the gst_buffer_pool_acquire_buffer() function to control the 2442 * allocation of the buffer. 2443 * The default implementation ignores the start and stop members but other 2444 * implementations can use this extra information to decide what buffer to 2445 * return. 2446 * GstFormat format; 2447 * the format of start and stop 2448 * gint64 start; 2449 * the start position 2450 * gint64 stop; 2451 * the stop position 2452 * GstBufferPoolAcquireFlags flags; 2453 * additional flags 2454 */ 2455 public struct GstBufferPoolAcquireParams 2456 { 2457 GstFormat format; 2458 long start; 2459 long stop; 2460 GstBufferPoolAcquireFlags flags; 2461 } 2462 2463 2464 /** 2465 * Main Gtk struct. 2466 * The opaque GstBus data structure. 2467 */ 2468 public struct GstBus{} 2469 2470 2471 /** 2472 * Main Gtk struct. 2473 * Object describing media types. 2474 * GstMiniObject mini_object; 2475 * the parent type 2476 */ 2477 public struct GstCaps 2478 { 2479 GstMiniObject miniObject; 2480 } 2481 2482 2483 /** 2484 * Datastructure to initialize GstCaps from a string description usually 2485 * used in conjunction with GST_STATIC_CAPS() and gst_static_caps_get() to 2486 * instantiate a GstCaps. 2487 * GstCaps *caps; 2488 * the cached GstCaps 2489 * const char *string; 2490 * a string describing a caps 2491 */ 2492 public struct GstStaticCaps 2493 { 2494 GstCaps *caps; 2495 char *string; 2496 } 2497 2498 2499 /** 2500 * Main Gtk struct. 2501 */ 2502 public struct GstCapsFeatures{} 2503 2504 2505 /** 2506 * Main Gtk struct. 2507 * The opaque structure of a GstSample. A sample contains a typed memory 2508 * block and the associated timing information. It is mainly used to 2509 * exchange buffers with an application. 2510 */ 2511 public struct GstSample{} 2512 2513 2514 /** 2515 * Main Gtk struct. 2516 * Opaque GstChildProxy data structure. 2517 */ 2518 public struct GstChildProxy{} 2519 2520 2521 /** 2522 * GstChildProxy interface. 2523 * GTypeInterface parent; 2524 * parent interface type. 2525 * get_child_by_name () 2526 * virtual method to fetch the child by name 2527 * get_child_by_index () 2528 * virtual method to fetch the child by index 2529 * get_children_count () 2530 * virtual method to get the children count 2531 */ 2532 public struct GstChildProxyInterface 2533 { 2534 GTypeInterface parent; 2535 /+* methods +/ 2536 extern(C) GObject * function(GstChildProxy* parent, char* name) getChildByName; 2537 extern(C) GObject * function(GstChildProxy* parent, uint index) getChildByIndex; 2538 extern(C) uint function(GstChildProxy* parent) getChildrenCount; 2539 } 2540 2541 2542 /** 2543 * Main Gtk struct. 2544 * GstClock base structure. The values of this structure are 2545 * protected for subclasses, use the methods to use the GstClock. 2546 */ 2547 public struct GstClock{} 2548 2549 2550 /** 2551 * GStreamer clock class. Override the vmethods to implement the clock 2552 * functionality. 2553 * GstObjectClass parent_class; 2554 * the parent class structure 2555 * change_resolution () 2556 * change the resolution of the clock. Not all values might 2557 * be acceptable. The new resolution should be returned. 2558 * get_resolution () 2559 * get the resolution of the clock. 2560 * get_internal_time () 2561 * get the internal unadjusted time of the clock. 2562 * implement wait_jitter instead. 2563 * wait () 2564 * perform a blocking wait on the given GstClockEntry and return 2565 * the jitter. 2566 * wait_async () 2567 * perform an asynchronous wait for the given GstClockEntry. 2568 * unschedule () 2569 * unblock a blocking or async wait operation. 2570 */ 2571 public struct GstClockClass 2572 { 2573 GstObjectClass parentClass; 2574 /+* vtable +/ 2575 extern(C) GstClockTime function(GstClock* clock, GstClockTime oldResolution, GstClockTime newResolution) changeResolution; 2576 extern(C) GstClockTime function(GstClock* clock) getResolution; 2577 extern(C) GstClockTime function(GstClock* clock) getInternalTime; 2578 /+* waiting on an ID +/ 2579 extern(C) GstClockReturn function(GstClock* clock, GstClockEntry* entry, GstClockTimeDiff* jitter) wait; 2580 extern(C) GstClockReturn function(GstClock* clock, GstClockEntry* entry) waitAsync; 2581 extern(C) void function(GstClock* clock, GstClockEntry* entry) unschedule; 2582 } 2583 2584 2585 /** 2586 * All pending timeouts or periodic notifies are converted into 2587 * an entry. 2588 * Note that GstClockEntry should be treated as an opaque structure. It must 2589 * not be extended or allocated using a custom allocator. 2590 * gint refcount; 2591 * reference counter (read-only) 2592 */ 2593 public struct GstClockEntry 2594 { 2595 int refcount; 2596 } 2597 2598 2599 /** 2600 * Main Gtk struct. 2601 */ 2602 public struct GstContext{} 2603 2604 2605 /** 2606 * Main Gtk struct. 2607 * The instance structure of GstControlBinding. 2608 * gchar *name; 2609 * name of the property of this binding 2610 * GParamSpec *pspec; 2611 * GParamSpec for this property 2612 */ 2613 public struct GstControlBinding 2614 { 2615 char *name; 2616 GParamSpec *pspec; 2617 } 2618 2619 2620 /** 2621 * The class structure of GstControlBinding. 2622 * GstObjectClass parent_class; 2623 * Parent class 2624 * sync_values () 2625 * get_value () 2626 * get_value_array () 2627 * get_g_value_array () 2628 */ 2629 public struct GstControlBindingClass 2630 { 2631 GstObjectClass parentClass; 2632 /+* virtua methods +/ 2633 extern(C) int function(GstControlBinding* binding, GstObject* object, GstClockTime timestamp, GstClockTime lastSync) syncValues; 2634 extern(C) GValue * function(GstControlBinding* binding, GstClockTime timestamp) getValue; 2635 extern(C) int function(GstControlBinding* binding, GstClockTime timestamp, GstClockTime interval, uint nValues, void* values) getValueArray; 2636 extern(C) int function(GstControlBinding* binding, GstClockTime timestamp, GstClockTime interval, uint nValues, GValue* values) getGValueArray; 2637 } 2638 2639 2640 public struct GstValueArray{} 2641 2642 2643 /** 2644 * Main Gtk struct. 2645 * The instance structure of GstControlSource. 2646 * GstControlSourceGetValue get_value; 2647 * Function for returning a value for a given timestamp 2648 * GstControlSourceGetValueArray get_value_array; 2649 * Function for returning a GstValueArray for a given timestamp 2650 */ 2651 public struct GstControlSource 2652 { 2653 GstControlSourceGetValue getValue; /+* Returns the value for a property at a given timestamp +/ 2654 GstControlSourceGetValueArray getValueArray; /+* Returns values for a property inn a given timespan +/ 2655 } 2656 2657 2658 /** 2659 * The class structure of GstControlSource. 2660 * GstObjectClass parent_class; 2661 * Parent class 2662 */ 2663 public struct GstControlSourceClass 2664 { 2665 GstObjectClass parentClass; 2666 } 2667 2668 2669 /** 2670 * Structure for saving a timestamp and a value. 2671 * GstClockTime timestamp; 2672 * timestamp of the value change 2673 * gdouble value; 2674 * the corresponding value 2675 */ 2676 public struct GstTimedValue 2677 { 2678 GstClockTime timestamp; 2679 double value; 2680 } 2681 2682 2683 /** 2684 * Main Gtk struct. 2685 * Opaque, immutable, refcounted struct that stores date, time and timezone 2686 * information. It currently supports ranges from 0001-01-01 to 2687 * 9999-12-31 in the Gregorian proleptic calendar. 2688 * Use the acessor functions to get the stored values. 2689 */ 2690 public struct GstDateTime{} 2691 2692 2693 /** 2694 * Main Gtk struct. 2695 * GStreamer element abstract base class. 2696 * GRecMutex state_lock; 2697 * Used to serialize execution of gst_element_set_state() 2698 * GCond state_cond; 2699 * Used to signal completion of a state change 2700 * guint32 state_cookie; 2701 * Used to detect concurrent execution of 2702 * gst_element_set_state() and gst_element_get_state() 2703 * GstState target_state; 2704 * the target state of an element as set by the application 2705 * GstState current_state; 2706 * the current state of an element 2707 * GstState next_state; 2708 * the next state of an element, can be GST_STATE_VOID_PENDING if 2709 * the element is in the correct state. 2710 * GstState pending_state; 2711 * the final state the element should go to, can be 2712 * GST_STATE_VOID_PENDING if the element is in the correct state 2713 * GstStateChangeReturn last_return; 2714 * the last return value of an element state change 2715 * GstBus *bus; 2716 * the bus of the element. This bus is provided to the element by the 2717 * parent element or the application. A GstPipeline has a bus of its own. 2718 * GstClock *clock; 2719 * the clock of the element. This clock is usually provided to the 2720 * element by the toplevel GstPipeline. 2721 * GstClockTimeDiff base_time; 2722 * the time of the clock right before the element is set to 2723 * PLAYING. Subtracting base_time from the current clock time in the PLAYING 2724 * state will yield the running_time against the clock. 2725 * GstClockTime start_time; 2726 * the running_time of the last PAUSED state 2727 * guint16 numpads; 2728 * number of pads of the element, includes both source and sink pads. 2729 * GList *pads; 2730 * list of pads. [element-type Gst.Pad] 2731 * guint16 numsrcpads; 2732 * number of source pads of the element. 2733 * GList *srcpads; 2734 * list of source pads. [element-type Gst.Pad] 2735 * guint16 numsinkpads; 2736 * number of sink pads of the element. 2737 * GList *sinkpads; 2738 * list of sink pads. [element-type Gst.Pad] 2739 * guint32 pads_cookie; 2740 * updated whenever the a pad is added or removed 2741 */ 2742 public struct GstElement 2743 { 2744 GRecMutex stateLock; 2745 /+* element state +/ 2746 GCond stateCond; 2747 uint stateCookie; 2748 GstState targetState; 2749 GstState currentState; 2750 GstState nextState; 2751 GstState pendingState; 2752 GstStateChangeReturn lastReturn; 2753 GstBus *bus; 2754 /+* allocated clock +/ 2755 GstClock *clock; 2756 GstClockTimeDiff baseTime; /+* NULL/READY: 0 - PAUSED: current time - PLAYING: difference to clock +/ 2757 GstClockTime startTime; 2758 /+* element pads, these lists can only be iterated while holding 2759 * the LOCK or checking the cookie after each LOCK. +/ 2760 ushort numpads; 2761 GList *pads; 2762 ushort numsrcpads; 2763 GList *srcpads; 2764 ushort numsinkpads; 2765 GList *sinkpads; 2766 uint padsCookie; 2767 } 2768 2769 2770 /** 2771 * GStreamer element class. Override the vmethods to implement the element 2772 * functionality. 2773 * GstObjectClass parent_class; 2774 * the parent class structure 2775 * gpointer metadata; 2776 * metadata for elements of this class 2777 * GstElementFactory *elementfactory; 2778 * the GstElementFactory that creates these elements 2779 * GList *padtemplates; 2780 * a GList of GstPadTemplate 2781 * gint numpadtemplates; 2782 * the number of padtemplates 2783 * guint32 pad_templ_cookie; 2784 * changed whenever the padtemplates change 2785 * request_new_pad () 2786 * called when a new pad is requested 2787 * release_pad () 2788 * called when a request pad is to be released 2789 * get_state () 2790 * get the state of the element 2791 * set_state () 2792 * set a new state on the element 2793 * change_state () 2794 * called by set_state to perform an incremental state change 2795 * state_changed () 2796 * called immediately after a new state was set. 2797 * set_bus () 2798 * set a GstBus on the element 2799 * provide_clock () 2800 * gets the GstClock provided by the element 2801 * set_clock () 2802 * set the GstClock on the element 2803 * send_event () 2804 * send a GstEvent to the element 2805 * query () 2806 * perform a GstQuery on the element 2807 * post_message () 2808 * called when a message is posted on the element. Chain up to 2809 * the parent class' handler to have it posted on the bus. 2810 * set_context () 2811 * set a GstContext on the element 2812 */ 2813 public struct GstElementClass 2814 { 2815 GstObjectClass parentClass; 2816 /+* the element metadata +/ 2817 void* metadata; 2818 /+* factory that the element was created from +/ 2819 GstElementFactory *elementfactory; 2820 /+* templates for our pads +/ 2821 GList *padtemplates; 2822 int numpadtemplates; 2823 uint padTemplCookie; 2824 /+* virtua methods for subclasses +/ 2825 /+* request/release pads +/ 2826 extern(C) GstPad* function(GstElement* element, GstPadTemplate* templ, char* name, GstCaps* caps) requestNewPad; 2827 extern(C) void function(GstElement* element, GstPad* pad) releasePad; 2828 /+* state changes +/ 2829 extern(C) GstStateChangeReturn function(GstElement* element, GstState* state, GstState* pending, GstClockTime timeout) getState; 2830 extern(C) GstStateChangeReturn function(GstElement* element, GstState state) setState; 2831 extern(C) GstStateChangeReturn function(GstElement* element, GstStateChange transition) changeState; 2832 extern(C) void function(GstElement* element, GstState oldstate, GstState newstate, GstState pending) stateChanged; 2833 /+* bus +/ 2834 extern(C) void function(GstElement* element, GstBus* bus) setBus; 2835 /+* set/get clocks +/ 2836 extern(C) GstClock* function(GstElement* element) provideClock; 2837 extern(C) int function(GstElement* element, GstClock* clock) setClock; 2838 /+* query functions +/ 2839 extern(C) int function(GstElement* element, GstEvent* event) sendEvent; 2840 extern(C) int function(GstElement* element, GstQuery* query) query; 2841 extern(C) int function(GstElement* element, GstMessage* message) postMessage; 2842 extern(C) void function(GstElement* element, GstContext* context) setContext; 2843 } 2844 2845 2846 /** 2847 * Main Gtk struct. 2848 * The opaque GstElementFactory data structure. 2849 */ 2850 public struct GstElementFactory{} 2851 2852 2853 /** 2854 * Main Gtk struct. 2855 * A GstEvent. 2856 * GstMiniObject mini_object; 2857 * the parent structure 2858 * GstEventType type; 2859 * the GstEventType of the event 2860 * guint64 timestamp; 2861 * the timestamp of the event 2862 * guint32 seqnum; 2863 * the sequence number of the event 2864 */ 2865 public struct GstEvent 2866 { 2867 GstMiniObject miniObject; 2868 GstEventType type; 2869 ulong timestamp; 2870 uint seqnum; 2871 } 2872 2873 2874 /** 2875 * A format definition 2876 * GstFormat value; 2877 * The unique id of this format 2878 * const gchar *nick; 2879 * A short nick of the format 2880 * const gchar *description; 2881 * A longer description of the format 2882 * GQuark quark; 2883 * A quark for the nick 2884 */ 2885 public struct GstFormatDefinition 2886 { 2887 GstFormat value; 2888 char *nick; 2889 char *description; 2890 GQuark quark; 2891 } 2892 2893 2894 public struct GstProxyPad{} 2895 2896 2897 /** 2898 * Main Gtk struct. 2899 * Opaque GstGhostPad structure. 2900 */ 2901 public struct GstGhostPad{} 2902 2903 2904 /** 2905 * Main Gtk struct. 2906 * GstIterator base structure. The values of this structure are 2907 * protected for subclasses, use the methods to use the GstIterator. 2908 */ 2909 public struct GstIterator{} 2910 2911 2912 /** 2913 * Main Gtk struct. 2914 * Base structure for memory implementations. Custom memory will put this structure 2915 * as the first member of their structure. 2916 * GstMiniObject mini_object; 2917 * parent structure 2918 * GstAllocator *allocator; 2919 * pointer to the GstAllocator 2920 * GstMemory *parent; 2921 * parent memory block 2922 * gsize maxsize; 2923 * the maximum size allocated 2924 * gsize align; 2925 * the alignment of the memory 2926 * gsize offset; 2927 * the offset where valid data starts 2928 * gsize size; 2929 * the size of valid data 2930 */ 2931 public struct GstMemory 2932 { 2933 GstMiniObject miniObject; 2934 GstAllocator *allocator; 2935 GstMemory *parent; 2936 gsize maxsize; 2937 gsize alig; 2938 gsize offset; 2939 gsize size; 2940 } 2941 2942 2943 /** 2944 * A structure containing the result of a map operation such as 2945 * gst_memory_map(). It contains the data and size. 2946 * GstMemory *memory; 2947 * a pointer to the mapped memory 2948 * GstMapFlags flags; 2949 * flags used when mapping the memory 2950 * guint8 *data; 2951 * a pointer to the mapped data. [array length=size] 2952 * gsize size; 2953 * the valid size in data 2954 * gsize maxsize; 2955 * the maximum bytes in data 2956 */ 2957 public struct GstMapInfo 2958 { 2959 GstMemory *memory; 2960 GstMapFlags flags; 2961 ubyte *data; 2962 gsize size; 2963 gsize maxsize; 2964 } 2965 2966 2967 /** 2968 * Base structure for metadata. Custom metadata will put this structure 2969 * as the first member of their structure. 2970 * GstMetaFlags flags; 2971 * extra flags for the metadata 2972 * const GstMetaInfo *info; 2973 * pointer to the GstMetaInfo 2974 */ 2975 public struct GstMeta 2976 { 2977 GstMetaFlags flags; 2978 GstMetaInfo *info; 2979 } 2980 2981 2982 /** 2983 * The GstMetaInfo provides information about a specific metadata 2984 * structure. 2985 * GType api; 2986 * tag indentifying the metadata structure and api 2987 * GType type; 2988 * type indentifying the implementor of the api 2989 * gsize size; 2990 * size of the metadata 2991 * GstMetaInitFunction init_func; 2992 * function for initializing the metadata 2993 * GstMetaFreeFunction free_func; 2994 * function for freeing the metadata 2995 * GstMetaTransformFunction transform_func; 2996 * function for transforming the metadata 2997 */ 2998 public struct GstMetaInfo 2999 { 3000 GType api; 3001 GType type; 3002 gsize size; 3003 GstMetaInitFunction initFunc; 3004 GstMetaFreeFunction freeFunc; 3005 GstMetaTransformFunction transformFunc; 3006 } 3007 3008 3009 /** 3010 * Extra data passed to a "gst-copy" transform GstMetaTransformFunction. 3011 * gboolean region; 3012 * TRUE if only region is copied 3013 * gsize offset; 3014 * the offset to copy, 0 if region is FALSE, otherwise > 0 3015 * gsize size; 3016 * the size to copy, -1 or the buffer size when region is FALSE 3017 */ 3018 public struct GstMetaTransformCopy 3019 { 3020 int region; 3021 gsize offset; 3022 gsize size; 3023 } 3024 3025 3026 /** 3027 * Main Gtk struct. 3028 * GStreamer base object class. 3029 * GMutex lock; 3030 * object LOCK 3031 * gchar *name; 3032 * The name of the object 3033 * GstObject *parent; 3034 * this object's parent, weak ref 3035 * guint32 flags; 3036 * flags for this object 3037 */ 3038 public struct GstObject 3039 { 3040 GMutex lock; /+* object LOCK +/ 3041 char *name; /+* object name +/ 3042 GstObject *parent; /+* this object's parent, weak ref +/ 3043 uint flags; 3044 } 3045 3046 3047 /** 3048 * Main Gtk struct. 3049 * The GstPad structure. Use the functions to update the variables. 3050 * gpointer element_private; 3051 * private data owned by the parent element 3052 * GstPadTemplate *padtemplate; 3053 * padtemplate for this pad 3054 * GstPadDirection direction; 3055 * the direction of the pad, cannot change after creating 3056 * the pad. 3057 */ 3058 public struct GstPad 3059 { 3060 void* elementPrivate; 3061 GstPadTemplate *padtemplate; 3062 GstPadDirection direction; 3063 } 3064 3065 3066 /** 3067 * Info passed in the GstPadProbeCallback. 3068 * GstPadProbeType type; 3069 * the current probe type 3070 * gulong id; 3071 * the id of the probe 3072 * gpointer data; 3073 * type specific data, check the type field to know the datatype. 3074 * This field can be NULL. 3075 * guint64 offset; 3076 * offset of pull probe, this field is valid when type contains 3077 * GST_PAD_PROBE_TYPE_PULL 3078 * guint size; 3079 * size of pull probe, this field is valid when type contains 3080 * GST_PAD_PROBE_TYPE_PULL 3081 */ 3082 public struct GstPadProbeInfo 3083 { 3084 GstPadProbeType type; 3085 gulong id; 3086 void* data; 3087 ulong offset; 3088 uint size; 3089 } 3090 3091 3092 /** 3093 * Structure describing the GstStaticPadTemplate. 3094 * const gchar *name_template; 3095 * the name of the template 3096 * GstPadDirection direction; 3097 * the direction of the template 3098 * GstPadPresence presence; 3099 * the presence of the template 3100 * GstStaticCaps static_caps; 3101 * the caps of the template. 3102 */ 3103 public struct GstStaticPadTemplate 3104 { 3105 char *nameTemplate; 3106 GstPadDirection direction; 3107 GstPadPresence presence; 3108 GstStaticCaps staticCaps; 3109 } 3110 3111 3112 /** 3113 * Main Gtk struct. 3114 * The padtemplate object. 3115 */ 3116 public struct GstPadTemplate{} 3117 3118 3119 /** 3120 * Main Gtk struct. 3121 * A GParamSpec derived structure that contains the meta data for fractional 3122 * properties. 3123 * GParamSpec parent_instance; 3124 * super class 3125 * gint min_num; 3126 * minimal numerator 3127 * gint min_den; 3128 * minimal denominator 3129 * gint max_num; 3130 * maximal numerator 3131 * gint max_den; 3132 * maximal denominator 3133 * gint def_num; 3134 * default numerator 3135 * gint def_den; 3136 * default denominator 3137 */ 3138 public struct GstParamSpecFraction 3139 { 3140 GParamSpec parentInstance; 3141 int minNum, minDen; 3142 int maxNum, maxDen; 3143 int defNum, defDen; 3144 } 3145 3146 3147 /** 3148 * Opaque structure. 3149 */ 3150 public struct GstParseContext{} 3151 3152 3153 /** 3154 * Main Gtk struct. 3155 * The GstPipeline structure. 3156 * GstClock *fixed_clock; 3157 * The fixed clock of the pipeline, used when 3158 * GST_PIPELINE_FLAG_FIXED_CLOCK is set. 3159 * GstClockTime stream_time; 3160 * The stream time of the pipeline. A better name for this 3161 * property would be the running_time, the total time spent in the 3162 * PLAYING state without being flushed. (deprecated, use the start_time 3163 * on GstElement). 3164 * GstClockTime delay; 3165 * Extra delay added to base_time to compensate for computing delays 3166 * when setting elements to PLAYING. 3167 */ 3168 public struct GstPipeline 3169 { 3170 GstClock *fixedClock; 3171 GstClockTime streamTime; 3172 GstClockTime delay; 3173 } 3174 3175 3176 /** 3177 * Main Gtk struct. 3178 * The opaque plugin object 3179 */ 3180 public struct GstPlugin{} 3181 3182 3183 /** 3184 * A plugin should export a variable of this type called plugin_desc. The plugin 3185 * loader will use the data provided there to initialize the plugin. 3186 * The licence parameter must be one of: LGPL, GPL, QPL, GPL/QPL, MPL, 3187 * BSD, MIT/X11, Proprietary, unknown. 3188 * gint major_version; 3189 * the major version number of core that plugin was compiled for 3190 * gint minor_version; 3191 * the minor version number of core that plugin was compiled for 3192 * const gchar *name; 3193 * a unique name of the plugin 3194 * const gchar *description; 3195 * description of plugin 3196 * GstPluginInitFunc plugin_init; 3197 * pointer to the init function of this plugin. 3198 * const gchar *version; 3199 * version of the plugin 3200 * const gchar *license; 3201 * effective license of plugin 3202 * const gchar *source; 3203 * source module plugin belongs to 3204 * const gchar *package; 3205 * shipped package plugin belongs to 3206 * const gchar *origin; 3207 * URL to provider of plugin 3208 * const gchar *release_datetime; 3209 * date time string in ISO 8601 format (or rather, a 3210 * subset thereof), or NULL. Allowed are the following formats: 3211 * "YYYY-MM-DD" and "YYY-MM-DDTHH:MMZ" (with 'T' a separator and 'Z' 3212 * indicating UTC/Zulu time). This field should be set via the 3213 * GST_PACKAGE_RELEASE_DATETIME preprocessor macro. 3214 */ 3215 public struct GstPluginDesc 3216 { 3217 int majorVersion; 3218 int minorVersion; 3219 char *name; 3220 char *description; 3221 GstPluginInitFunc pluginInit; 3222 char *versio; 3223 char *license; 3224 char *source; 3225 char *p; 3226 char *origin; 3227 char *releaseDatetime; 3228 } 3229 3230 3231 /** 3232 * Main Gtk struct. 3233 * Opaque GstPluginFeature structure. 3234 */ 3235 public struct GstPluginFeature{} 3236 3237 3238 /** 3239 * Main Gtk struct. 3240 * A set of file/network descriptors. 3241 */ 3242 public struct GstPoll{} 3243 3244 3245 /** 3246 * A file descriptor object. 3247 * int fd; 3248 * a file descriptor 3249 */ 3250 public struct GstPollFD 3251 { 3252 int fd; 3253 } 3254 3255 3256 /** 3257 * Main Gtk struct. 3258 * Opaque GstPreset data structure. 3259 */ 3260 public struct GstPreset{} 3261 3262 3263 /** 3264 * GstPreset interface. 3265 * GTypeInterface parent; 3266 * parent interface type. 3267 * get_preset_names () 3268 * virtual method to get list of presets 3269 * get_property_names () 3270 * virtual methods to get properties that are persistent 3271 * load_preset () 3272 * virtual methods to load a preset into properties 3273 * save_preset () 3274 * virtual methods to save properties into a preset 3275 * rename_preset () 3276 * virtual methods to rename a preset 3277 * delete_preset () 3278 * virtual methods to remove a preset 3279 * set_meta () 3280 * virtual methods to set textual meta data to a preset 3281 * get_meta () 3282 * virtual methods to get textual meta data from a preset 3283 */ 3284 public struct GstPresetInterface 3285 { 3286 GTypeInterface parent; 3287 /+* methods +/ 3288 extern(C) char** function(GstPreset* preset) getPresetNames; 3289 extern(C) char** function(GstPreset* preset) getPropertyNames; 3290 extern(C) int function(GstPreset* preset, char* name) loadPreset; 3291 extern(C) int function(GstPreset* preset, char* name) savePreset; 3292 extern(C) int function(GstPreset* preset, char* oldName, char* newName) renamePreset; 3293 extern(C) int function(GstPreset* preset, char* name) deletePreset; 3294 extern(C) int function(GstPreset* preset, char* name, char* tag, char* value) setMeta; 3295 extern(C) int function(GstPreset* preset, char* name, char* tag, char** value) getMeta; 3296 } 3297 3298 3299 /** 3300 * Main Gtk struct. 3301 * The GstQuery structure. 3302 * GstMiniObject mini_object; 3303 * The parent GstMiniObject type 3304 * GstQueryType type; 3305 * the GstQueryType 3306 */ 3307 public struct GstQuery 3308 { 3309 GstMiniObject miniObject; 3310 GstQueryType type; 3311 } 3312 3313 3314 /** 3315 * Main Gtk struct. 3316 * Opaque GstRegistry structure. 3317 */ 3318 public struct GstRegistry{} 3319 3320 3321 /** 3322 * Main Gtk struct. 3323 * A helper structure that holds the configured region of 3324 * interest in a media file. 3325 * GstSegmentFlags flags; 3326 * flags for this segment 3327 * gdouble rate; 3328 * the rate of the segment 3329 * gdouble applied_rate; 3330 * the already applied rate to the segment 3331 * GstFormat format; 3332 * the format of the segment values 3333 * guint64 base; 3334 * the base of the segment 3335 * guint64 offset; 3336 * the offset to apply to start or stop 3337 * guint64 start; 3338 * the start of the segment 3339 * guint64 stop; 3340 * the stop of the segment 3341 * guint64 time; 3342 * the stream time of the segment 3343 * guint64 position; 3344 * the position in the segment 3345 * guint64 duration; 3346 * the duration of the segment 3347 */ 3348 public struct GstSegment 3349 { 3350 GstSegmentFlags flags; 3351 double rate; 3352 double appliedRate; 3353 GstFormat format; 3354 ulong base; 3355 ulong offset; 3356 ulong start; 3357 ulong stop; 3358 ulong time; 3359 ulong position; 3360 ulong duration; 3361 } 3362 3363 3364 /** 3365 * Main Gtk struct. 3366 * The GstStructure object. Most fields are private. 3367 * GType type; 3368 * the GType of a structure 3369 */ 3370 public struct GstStructure 3371 { 3372 GType type; 3373 } 3374 3375 3376 /** 3377 * Main Gtk struct. 3378 * The default implementation of a GstClock that uses the system time. 3379 */ 3380 public struct GstSystemClock{} 3381 3382 3383 /** 3384 * Main Gtk struct. 3385 * Object describing tags / metadata. 3386 * GstMiniObject mini_object; 3387 * the parent type 3388 */ 3389 public struct GstTagList 3390 { 3391 GstMiniObject miniObject; 3392 } 3393 3394 3395 /** 3396 * Main Gtk struct. 3397 * Opaque GstTagSetter data structure. 3398 */ 3399 public struct GstTagSetter{} 3400 3401 3402 /** 3403 * GstTagSetterInterface interface. 3404 * GTypeInterface g_iface; 3405 * parent interface type. 3406 */ 3407 public struct GstTagSetterInterface 3408 { 3409 GTypeInterface gIface; 3410 /+* signals +/ 3411 /+* virtua table +/ 3412 } 3413 3414 3415 /** 3416 * Main Gtk struct. 3417 * The GstTask object. 3418 * GstTaskState state; 3419 * the state of the task 3420 * GCond cond; 3421 * used to pause/resume the task 3422 * GRecMutex *lock; 3423 * The lock taken when iterating the task function 3424 * GstTaskFunction func; 3425 * the function executed by this task 3426 * gpointer user_data; 3427 * user_data passed to the task function 3428 * GDestroyNotify notify; 3429 * GDestroyNotify for user_data 3430 * gboolean running; 3431 * a flag indicating that the task is running 3432 */ 3433 public struct GstTask 3434 { 3435 GstTaskState state; 3436 GCond cond; 3437 GRecMutex *lock; 3438 GstTaskFunction func; 3439 void* userData; 3440 GDestroyNotify notify; 3441 int running; 3442 } 3443 3444 3445 /** 3446 * Main Gtk struct. 3447 * The GstTaskPool object. 3448 */ 3449 public struct GstTaskPool{} 3450 3451 3452 /** 3453 * The GstTaskPoolClass object. 3454 * GstObjectClass parent_class; 3455 * the parent class structure 3456 * prepare () 3457 * prepare the threadpool 3458 * cleanup () 3459 * make sure all threads are stopped 3460 * push () 3461 * start a new thread 3462 * join () 3463 * join a thread 3464 */ 3465 public struct GstTaskPoolClass 3466 { 3467 GstObjectClass parentClass; 3468 extern(C) void function(GstTaskPool* pool, GError** error) prepare; 3469 extern(C) void function(GstTaskPool* pool) cleanup; 3470 extern(C) void* function(GstTaskPool* pool, GstTaskPoolFunction func, void* userData, GError** error) push; 3471 extern(C) void function(GstTaskPool* pool, void* id) join; 3472 } 3473 3474 3475 /** 3476 * Main Gtk struct. 3477 */ 3478 public struct GstToc{} 3479 3480 3481 public struct GstTocEntry{} 3482 3483 3484 /** 3485 * Main Gtk struct. 3486 * Opaque GstTocSetter data structure. 3487 */ 3488 public struct GstTocSetter{} 3489 3490 3491 /** 3492 * GstTocSetterInterface interface. 3493 * GTypeInterface g_iface; 3494 * parent interface type. 3495 */ 3496 public struct GstTocSetterInterface 3497 { 3498 GTypeInterface gIface; 3499 /+* signals +/ 3500 /+* virtua table +/ 3501 } 3502 3503 3504 /** 3505 * Main Gtk struct. 3506 * Object that stores typefind callbacks. To use with GstTypeFindFactory. 3507 * peek () 3508 * Method to peek data. 3509 * suggest () 3510 * Method to suggest GstCaps with a given probability. 3511 * gpointer data; 3512 * The data used by the caller of the typefinding function. 3513 * get_length () 3514 * Returns the length of current data. 3515 */ 3516 public struct GstTypeFind 3517 { 3518 /+* private to the caller of the typefind funct +/ 3519 extern(C) ubyte * function(void* data, long offset, uint size) peek; 3520 extern(C) void function(void* data, uint probability, GstCaps* caps) suggest; 3521 void* data; 3522 /+* optional +/ 3523 extern(C) ulong function(void* data) getLength; 3524 } 3525 3526 3527 /** 3528 * Main Gtk struct. 3529 * Opaque object that stores information about a typefind function. 3530 */ 3531 public struct GstTypeFindFactory{} 3532 3533 3534 /** 3535 * Main Gtk struct. 3536 * Opaque GstURIHandler structure. 3537 */ 3538 public struct GstURIHandler{} 3539 3540 3541 /** 3542 * Any GstElement using this interface should implement these methods. 3543 * GTypeInterface parent; 3544 * The parent interface type 3545 * get_type () 3546 * Method to tell whether the element handles source or sink URI. 3547 * get_protocols () 3548 * Method to return the list of protocols handled by the element. 3549 * get_uri () 3550 * Method to return the URI currently handled by the element. 3551 * set_uri () 3552 * Method to set a new URI. 3553 */ 3554 public struct GstURIHandlerInterface 3555 { 3556 GTypeInterface parent; 3557 /+* vtable +/ 3558 /+* querying capabilities +/ 3559 extern(C) GstURIType function(GType type) getType; 3560 extern(C) char * * function(GType type) getProtocols; 3561 /+* using the iface +/ 3562 extern(C) char * function(GstURIHandler* handler) getUri; 3563 extern(C) int function(GstURIHandler* handler, char* uri, GError** error) setUri; 3564 } 3565 3566 3567 /** 3568 * VTable for the GValue type. 3569 * GType type; 3570 * a GType 3571 * GstValueCompareFunc compare; 3572 * a GstValueCompareFunc 3573 * GstValueSerializeFunc serialize; 3574 * a GstValueSerializeFunc 3575 * GstValueDeserializeFunc deserialize; 3576 * a GstValueDeserializeFunc 3577 */ 3578 public struct GstValueTable 3579 { 3580 GType type; 3581 GstValueCompareFunc compare; 3582 GstValueSerializeFunc serialize; 3583 GstValueDeserializeFunc deserialize; 3584 } 3585 3586 3587 /* 3588 * Check if bin will resync its state change when elements are added and 3589 * removed. 3590 * bin : 3591 * A GstBin 3592 * Since 1.1.1 3593 */ 3594 // TODO 3595 // #define GST_BIN_IS_NO_RESYNC(bin) (GST_OBJECT_FLAG_IS_SET(bin,GST_BIN_FLAG_NO_RESYNC)) 3596 3597 /* 3598 * Gets the list with children in a bin. 3599 * bin : 3600 * a GstBin 3601 */ 3602 // TODO 3603 // #define GST_BIN_CHILDREN(bin) (GST_BIN_CAST(bin)->children) 3604 3605 /* 3606 * Gets the children cookie that watches the children list. 3607 * bin : 3608 * a GstBin 3609 */ 3610 // TODO 3611 // #define GST_BIN_CHILDREN_COOKIE(bin) (GST_BIN_CAST(bin)->children_cookie) 3612 3613 /* 3614 * Gets the number of children in a bin. 3615 * bin : 3616 * a GstBin 3617 * Property Details 3618 * The "async-handling" property 3619 * "async-handling" gboolean : Read / Write 3620 * If set to TRUE, the bin will handle asynchronous state changes. 3621 * This should be used only if the bin subclass is modifying the state 3622 * of its children on its own. 3623 * Default value: FALSE 3624 */ 3625 // TODO 3626 // #define GST_BIN_NUMCHILDREN(bin) (GST_BIN_CAST(bin)->numchildren) 3627 3628 /* 3629 * A flags word containing GstBufferFlag flags set on this buffer. 3630 * buf : 3631 * a GstBuffer. 3632 */ 3633 // TODO 3634 // #define GST_BUFFER_FLAGS(buf) GST_MINI_OBJECT_FLAGS(buf) 3635 3636 /* 3637 * Gives the status of a specific flag on a buffer. 3638 * buf : 3639 * a GstBuffer. 3640 * flag : 3641 * the GstBufferFlag to check. 3642 */ 3643 // TODO 3644 // #define GST_BUFFER_FLAG_IS_SET(buf,flag) GST_MINI_OBJECT_FLAG_IS_SET (buf, flag) 3645 3646 /* 3647 * Sets a buffer flag on a buffer. 3648 * buf : 3649 * a GstBuffer. 3650 * flag : 3651 * the GstBufferFlag to set. 3652 */ 3653 // TODO 3654 // #define GST_BUFFER_FLAG_SET(buf,flag) GST_MINI_OBJECT_FLAG_SET (buf, flag) 3655 3656 /* 3657 * Clears a buffer flag. 3658 * buf : 3659 * a GstBuffer. 3660 * flag : 3661 * the GstBufferFlag to clear. 3662 */ 3663 // TODO 3664 // #define GST_BUFFER_FLAG_UNSET(buf,flag) GST_MINI_OBJECT_FLAG_UNSET (buf, flag) 3665 3666 /* 3667 * The presentation timestamp (pts) in nanoseconds (as a GstClockTime) 3668 * of the data in the buffer. This is the timestamp when the media should be 3669 * presented to the user. 3670 * Value will be GST_CLOCK_TIME_NONE if the pts is unknown. 3671 * buf : 3672 * a GstBuffer.: 3673 */ 3674 // TODO 3675 // #define GST_BUFFER_PTS(buf) (GST_BUFFER_CAST(buf)->pts) 3676 3677 /* 3678 * The decoding timestamp (dts) in nanoseconds (as a GstClockTime) 3679 * of the data in the buffer. This is the timestamp when the media should be 3680 * decoded or processed otherwise. 3681 * Value will be GST_CLOCK_TIME_NONE if the dts is unknown. 3682 * buf : 3683 * a GstBuffer.: 3684 */ 3685 // TODO 3686 // #define GST_BUFFER_DTS(buf) (GST_BUFFER_CAST(buf)->dts) 3687 3688 /* 3689 * The duration in nanoseconds (as a GstClockTime) of the data in the buffer. 3690 * Value will be GST_CLOCK_TIME_NONE if the duration is unknown. 3691 * buf : 3692 * a GstBuffer. 3693 */ 3694 // TODO 3695 // #define GST_BUFFER_DURATION(buf) (GST_BUFFER_CAST(buf)->duration) 3696 3697 /* 3698 * The offset in the source file of the beginning of this buffer. 3699 * buf : 3700 * a GstBuffer. 3701 */ 3702 // TODO 3703 // #define GST_BUFFER_OFFSET(buf) (GST_BUFFER_CAST(buf)->offset) 3704 3705 /* 3706 * The offset in the source file of the end of this buffer. 3707 * buf : 3708 * a GstBuffer. 3709 */ 3710 // TODO 3711 // #define GST_BUFFER_OFFSET_END(buf) (GST_BUFFER_CAST(buf)->offset_end) 3712 3713 /* 3714 * Tests if the duration is known. 3715 * buffer : 3716 * a GstBuffer 3717 */ 3718 // TODO 3719 // #define GST_BUFFER_DURATION_IS_VALID(buffer) (GST_CLOCK_TIME_IS_VALID (GST_BUFFER_DURATION (buffer))) 3720 3721 /* 3722 * Tests if the pts is known. 3723 * buffer : 3724 * a GstBuffer 3725 */ 3726 // TODO 3727 // #define GST_BUFFER_PTS_IS_VALID(buffer) (GST_CLOCK_TIME_IS_VALID (GST_BUFFER_PTS (buffer))) 3728 3729 /* 3730 * Tests if the dts is known. 3731 * buffer : 3732 * a GstBuffer 3733 */ 3734 // TODO 3735 // #define GST_BUFFER_DTS_IS_VALID(buffer) (GST_CLOCK_TIME_IS_VALID (GST_BUFFER_DTS (buffer))) 3736 3737 /* 3738 * Tests if the start offset is known. 3739 * buffer : 3740 * a GstBuffer 3741 */ 3742 // TODO 3743 // #define GST_BUFFER_OFFSET_IS_VALID(buffer) (GST_BUFFER_OFFSET (buffer) != GST_BUFFER_OFFSET_NONE) 3744 3745 /* 3746 * Tests if the end offset is known. 3747 * buffer : 3748 * a GstBuffer 3749 */ 3750 // TODO 3751 // #define GST_BUFFER_OFFSET_END_IS_VALID(buffer) (GST_BUFFER_OFFSET_END (buffer) != GST_BUFFER_OFFSET_NONE) 3752 3753 /* 3754 * Tests if the buffer marks a discontinuity in the stream. 3755 * buffer : 3756 * a GstBuffer 3757 */ 3758 // TODO 3759 // #define GST_BUFFER_IS_DISCONT(buffer) (GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_FLAG_DISCONT)) 3760 3761 /* 3762 * Tests if you can safely write to a buffer's metadata or its memory array. 3763 * It is only safe to change buffer metadata when the current reference is 3764 * writable, i.e. nobody can see the modifications you will make. 3765 * buf : 3766 * a GstBuffer 3767 */ 3768 // TODO 3769 // #define gst_buffer_is_writable(buf) gst_mini_object_is_writable (GST_MINI_OBJECT_CAST (buf)) 3770 3771 /* 3772 * Makes a writable buffer from the given buffer. If the source buffer is 3773 * already writable, this will simply return the same buffer. A copy will 3774 * otherwise be made using gst_buffer_copy(). 3775 * buf : 3776 * a GstBuffer. [transfer full] 3777 * Returns : 3778 * a writable buffer which may or may not be the 3779 * same as buf. [transfer full] 3780 */ 3781 // TODO 3782 // #define gst_buffer_make_writable(buf) GST_BUFFER_CAST (gst_mini_object_make_writable (GST_MINI_OBJECT_CAST (buf))) 3783 3784 /* 3785 * Append b at the end of l. 3786 * l : 3787 * a GstBufferList 3788 * b : 3789 * a GstBuffer 3790 */ 3791 // TODO 3792 // #define gst_buffer_list_add(l,b) gst_buffer_list_insert((l),-1,(b)); 3793 3794 /* 3795 * Tests if you can safely add buffers and groups into a buffer list. 3796 * list : 3797 * a GstBufferList 3798 */ 3799 // TODO 3800 // #define gst_buffer_list_is_writable(list) gst_mini_object_is_writable (GST_MINI_OBJECT_CAST (list)) 3801 3802 /* 3803 * Makes a writable buffer list from the given buffer list. If the source buffer 3804 * list is already writable, this will simply return the same buffer list. A 3805 * copy will otherwise be made using gst_buffer_list_copy(). 3806 * list : 3807 * a GstBufferList. [transfer full] 3808 * Returns : 3809 * a writable list, which may or may not be the 3810 * same as list. [transfer full] 3811 */ 3812 // TODO 3813 // #define gst_buffer_list_make_writable(list) GST_BUFFER_LIST_CAST (gst_mini_object_make_writable (GST_MINI_OBJECT_CAST (list))) 3814 3815 /* 3816 * Check if the bufferpool is flushing. Subclasses might want to check the 3817 * state of the pool in the acquire function. 3818 * pool : 3819 * a GstBufferPool 3820 */ 3821 // TODO 3822 // #define GST_BUFFER_POOL_IS_FLUSHING(pool) (g_atomic_int_get (pool->flushing)) 3823 3824 /* 3825 * Get access to the reference count field of the caps 3826 * caps : 3827 * a GstCaps 3828 */ 3829 // TODO 3830 // #define GST_CAPS_REFCOUNT(caps) GST_MINI_OBJECT_REFCOUNT(caps) 3831 3832 /* 3833 * Get the reference count value of the caps. 3834 * caps : 3835 * a GstCaps 3836 */ 3837 // TODO 3838 // #define GST_CAPS_REFCOUNT_VALUE(caps) GST_MINI_OBJECT_REFCOUNT_VALUE(caps) 3839 3840 /* 3841 * Convenience macro that checks if the number of structures in the given caps 3842 * is exactly one. 3843 * caps : 3844 * the GstCaps instance to check 3845 */ 3846 // TODO 3847 // #define GST_CAPS_IS_SIMPLE(caps) (gst_caps_get_size(caps) == 1) 3848 3849 /* 3850 * Creates a new GstCaps static caps from an input string. 3851 * This can be used in pad templates. 3852 * string : 3853 * the string describing the caps 3854 */ 3855 // TODO 3856 // #define GST_STATIC_CAPS(string) 3857 3858 /* 3859 * A flags word containing GstCapsFlags flags set on this caps. 3860 * caps : 3861 * a GstCaps. 3862 */ 3863 // TODO 3864 // #define GST_CAPS_FLAGS(caps) GST_MINI_OBJECT_FLAGS(caps) 3865 3866 /* 3867 * Gives the status of a specific flag on a caps. 3868 * caps : 3869 * a GstCaps. 3870 * flag : 3871 * the GstCapsFlags to check. 3872 */ 3873 // TODO 3874 // #define GST_CAPS_FLAG_IS_SET(caps,flag) GST_MINI_OBJECT_FLAG_IS_SET (caps, flag) 3875 3876 /* 3877 * Sets a caps flag on a caps. 3878 * caps : 3879 * a GstCaps. 3880 * flag : 3881 * the GstCapsFlags to set. 3882 */ 3883 // TODO 3884 // #define GST_CAPS_FLAG_SET(caps,flag) GST_MINI_OBJECT_FLAG_SET (caps, flag) 3885 3886 /* 3887 * Clears a caps flag. 3888 * caps : 3889 * a GstCaps. 3890 * flag : 3891 * the GstCapsFlags to clear. 3892 */ 3893 // TODO 3894 // #define GST_CAPS_FLAG_UNSET(caps,flag) GST_MINI_OBJECT_FLAG_UNSET (caps, flag) 3895 3896 /* 3897 * Tests if you can safely modify caps. It is only safe to modify caps when 3898 * there is only one owner of the caps - ie, the object is writable. 3899 * caps : 3900 * a GstCaps 3901 */ 3902 // TODO 3903 // #define gst_caps_is_writable(caps) gst_mini_object_is_writable (GST_MINI_OBJECT_CAST (caps)) 3904 3905 /* 3906 * Returns a writable copy of caps. 3907 * If there is only one reference count on caps, the caller must be the owner, 3908 * and so this function will return the caps object unchanged. If on the other 3909 * hand there is more than one reference on the object, a new caps object will 3910 * be returned. The caller's reference on caps will be removed, and instead the 3911 * caller will own a reference to the returned object. 3912 * In short, this function unrefs the caps in the argument and refs the caps 3913 * that it returns. Don't access the argument after calling this function. See 3914 * also: gst_caps_ref(). 3915 * caps : 3916 * a GstCaps. [transfer full] 3917 * Returns : 3918 * a writable caps which may or may not be the 3919 * same as caps. [transfer full] 3920 */ 3921 // TODO 3922 // #define gst_caps_make_writable(caps) GST_CAPS_CAST (gst_mini_object_make_writable (GST_MINI_OBJECT_CAST (caps))) 3923 3924 /* 3925 * Tests if a given GstClockTime represents a valid defined time. 3926 * time : 3927 * clock time to validate 3928 */ 3929 // TODO 3930 // #define GST_CLOCK_TIME_IS_VALID(time) (((GstClockTime)(time)) != GST_CLOCK_TIME_NONE) 3931 3932 /* 3933 * Convert a GstClockTime to seconds. 3934 * time : 3935 * the time 3936 */ 3937 // TODO 3938 // #define GST_TIME_AS_SECONDS(time) ((time) / GST_SECOND) 3939 3940 /* 3941 * Convert a GstClockTime to milliseconds (1/1000 of a second). 3942 * time : 3943 * the time 3944 */ 3945 // TODO 3946 // #define GST_TIME_AS_MSECONDS(time) ((time) / G_GINT64_CONSTANT (1000000)) 3947 3948 /* 3949 * Convert a GstClockTime to microseconds (1/1000000 of a second). 3950 * time : 3951 * the time 3952 */ 3953 // TODO 3954 // #define GST_TIME_AS_USECONDS(time) ((time) / G_GINT64_CONSTANT (1000)) 3955 3956 /* 3957 * Convert a GstClockTime to nanoseconds (1/1000000000 of a second). 3958 * time : 3959 * the time 3960 */ 3961 // TODO 3962 // #define GST_TIME_AS_NSECONDS(time) (time) 3963 3964 /* 3965 * Calculate a difference between two clock times as a GstClockTimeDiff. 3966 * The difference is calculated as e - s. 3967 * s : 3968 * the first time 3969 * e : 3970 * the second time 3971 */ 3972 // TODO 3973 // #define GST_CLOCK_DIFF(s, e) (GstClockTimeDiff)((e) - (s)) 3974 3975 /* 3976 * Convert a GTimeVal to a GstClockTime. 3977 * tv : 3978 * the timeval to convert 3979 */ 3980 // TODO 3981 // #define GST_TIMEVAL_TO_TIME(tv) (GstClockTime)((tv).tv_sec * GST_SECOND + (tv).tv_usec * GST_USECOND) 3982 3983 /* 3984 * Convert a GstClockTime to a GTimeVal 3985 * Note 3986 * on 32-bit systems, a timeval has a range of only 2^32 - 1 seconds, 3987 * which is about 68 years. Expect trouble if you want to schedule stuff 3988 * in your pipeline for 2038. 3989 * t : 3990 * The GstClockTime to convert 3991 * tv : 3992 * The target timeval 3993 */ 3994 // TODO 3995 // #define GST_TIME_TO_TIMEVAL(t,tv) 3996 3997 /* 3998 * Convert a struct timespec (see man pselect) to a GstClockTime. 3999 * ts : 4000 * the timespec to convert 4001 */ 4002 // TODO 4003 // #define GST_TIMESPEC_TO_TIME(ts) (GstClockTime)((ts).tv_sec * GST_SECOND + (ts).tv_nsec * GST_NSECOND) 4004 4005 /* 4006 * Convert a GstClockTime to a struct timespec (see man pselect) 4007 * t : 4008 * The GstClockTime to convert 4009 * ts : 4010 * The target timespec 4011 */ 4012 // TODO 4013 // #define GST_TIME_TO_TIMESPEC(t,ts) 4014 4015 /* 4016 * Cast to a clock entry 4017 * entry : 4018 * the entry to cast 4019 */ 4020 // TODO 4021 // #define GST_CLOCK_ENTRY(entry) ((GstClockEntry *)(entry)) 4022 4023 /* 4024 * Get the owner clock of the entry 4025 * entry : 4026 * the entry to query 4027 */ 4028 // TODO 4029 // #define GST_CLOCK_ENTRY_CLOCK(entry) ((entry)->clock) 4030 4031 /* 4032 * Get the type of the clock entry 4033 * entry : 4034 * the entry to query 4035 */ 4036 // TODO 4037 // #define GST_CLOCK_ENTRY_TYPE(entry) ((entry)->type) 4038 4039 /* 4040 * Get the requested time of this entry 4041 * entry : 4042 * the entry to query 4043 */ 4044 // TODO 4045 // #define GST_CLOCK_ENTRY_TIME(entry) ((entry)->time) 4046 4047 /* 4048 * Get the interval of this periodic entry 4049 * entry : 4050 * the entry to query 4051 */ 4052 // TODO 4053 // #define GST_CLOCK_ENTRY_INTERVAL(entry) ((entry)->interval) 4054 4055 /* 4056 * The status of the entry 4057 * entry : 4058 * the entry to query 4059 */ 4060 // TODO 4061 // #define GST_CLOCK_ENTRY_STATUS(entry) ((entry)->status) 4062 4063 /* 4064 * Gets the GstClockFlags clock flags. 4065 * clock : 4066 * the clock to query 4067 */ 4068 // TODO 4069 // #define GST_CLOCK_FLAGS(clock) GST_OBJECT_FLAGS(clock) 4070 4071 /* 4072 * Checks if a context is writable. If not, a writable copy is made and 4073 * returned. 4074 * context : 4075 * the context to make writable. [transfer full] 4076 * Returns : 4077 * a context (possibly a duplicate) that is writable. 4078 * MT safe. [transfer full] 4079 */ 4080 // TODO 4081 // #define gst_context_make_writable(context) GST_CONTEXT_CAST (gst_mini_object_make_writable (GST_MINI_OBJECT_CAST (context))) 4082 4083 /* 4084 * Tests if you can safely write into a context's structure or validly 4085 * modify the seqnum and timestamp fields. 4086 * context : 4087 * a GstContext 4088 */ 4089 // TODO 4090 // #define gst_context_is_writable(context) gst_mini_object_is_writable (GST_MINI_OBJECT_CAST (context)) 4091 4092 /* 4093 * This macro returns the current GstState of the element. 4094 * elem : 4095 * a GstElement to return state for. 4096 */ 4097 // TODO 4098 // #define GST_STATE(elem) (GST_ELEMENT_CAST(elem)->current_state) 4099 4100 /* 4101 * Given a current state cur and a target state pending, calculate the next (intermediate) 4102 * GstState. 4103 * cur : 4104 * A starting GstState 4105 * pending : 4106 * A target GstState 4107 */ 4108 // TODO 4109 // #define GST_STATE_GET_NEXT(cur,pending) ((GstState)((cur) + __GST_SIGN ((gint)(pending) - (gint)(cur)))) 4110 4111 /* 4112 * This macro returns the next GstState of the element. 4113 * elem : 4114 * a GstElement to return the next state for. 4115 */ 4116 // TODO 4117 // #define GST_STATE_NEXT(elem) (GST_ELEMENT_CAST(elem)->next_state) 4118 4119 /* 4120 * This macro returns the currently pending GstState of the element. 4121 * elem : 4122 * a GstElement to return the pending state for. 4123 */ 4124 // TODO 4125 // #define GST_STATE_PENDING(elem) (GST_ELEMENT_CAST(elem)->pending_state) 4126 4127 /* 4128 * This macro returns the last GstStateChangeReturn value. 4129 * elem : 4130 * a GstElement to return the last state result for. 4131 */ 4132 // TODO 4133 // #define GST_STATE_RETURN(elem) (GST_ELEMENT_CAST(elem)->last_return) 4134 4135 /* 4136 * This macro returns the target GstState of the element. 4137 * elem : 4138 * a GstElement to return the target state for. 4139 */ 4140 // TODO 4141 // #define GST_STATE_TARGET(elem) (GST_ELEMENT_CAST(elem)->target_state) 4142 4143 /* 4144 * Given a current state cur and a next state next, calculate the associated 4145 * GstStateChange transition. 4146 * cur : 4147 * A current state 4148 * next : 4149 * A next state 4150 */ 4151 // TODO 4152 // #define GST_STATE_TRANSITION(cur,next) ((GstStateChange)(((cur)<<3)|(next))) 4153 4154 /* 4155 * Given a state transition trans, extract the current GstState. 4156 * trans : 4157 * A GstStateChange 4158 */ 4159 // TODO 4160 // #define GST_STATE_TRANSITION_CURRENT(trans) ((GstState)((trans)>>3)) 4161 4162 /* 4163 * Given a state transition trans, extract the next GstState. 4164 * trans : 4165 * A GstStateChange 4166 */ 4167 // TODO 4168 // #define GST_STATE_TRANSITION_NEXT(trans) ((GstState)((trans)0x7)) 4169 4170 /* 4171 * Get a reference to the state lock of elem. 4172 * This lock is used by the core. It is taken while getting or setting 4173 * the state, during state changes, and while finalizing. 4174 * elem : 4175 * a GstElement 4176 */ 4177 // TODO 4178 // #define GST_STATE_GET_LOCK(elem) ((GST_ELEMENT_CAST(elem)->state_lock)) 4179 4180 /* 4181 * Get the conditional used to signal the completion of a state change. 4182 * elem : 4183 * a GstElement 4184 */ 4185 // TODO 4186 // #define GST_STATE_GET_COND(elem) (GST_ELEMENT_CAST(elem)->state_cond) 4187 4188 /* 4189 * Gets the name of this element. Use only in core as this is not 4190 * ABI-compatible. Others use gst_element_get_name() 4191 * elem : 4192 * A GstElement to query 4193 */ 4194 // TODO 4195 // #define GST_ELEMENT_NAME(elem) (GST_OBJECT_NAME(elem)) 4196 4197 /* 4198 * Get the parent object of this element. 4199 * elem : 4200 * A GstElement to query 4201 */ 4202 // TODO 4203 // #define GST_ELEMENT_PARENT(elem) (GST_ELEMENT_CAST(GST_OBJECT_PARENT(elem))) 4204 4205 /* 4206 * Get the message bus of this element. 4207 * elem : 4208 * A GstElement to query 4209 */ 4210 // TODO 4211 // #define GST_ELEMENT_BUS(elem) (GST_ELEMENT_CAST(elem)->bus) 4212 4213 /* 4214 * Get the clock of this element 4215 * elem : 4216 * A GstElement to query 4217 */ 4218 // TODO 4219 // #define GST_ELEMENT_CLOCK(elem) (GST_ELEMENT_CAST(elem)->clock) 4220 4221 /* 4222 * Get the pads of this elements. 4223 * elem : 4224 * A GstElement to query 4225 */ 4226 // TODO 4227 // #define GST_ELEMENT_PADS(elem) (GST_ELEMENT_CAST(elem)->pads) 4228 4229 /* 4230 * This macro returns the start_time of the elem. The start_time is the 4231 * running_time of the pipeline when the element went to PAUSED. 4232 * elem : 4233 * a GstElement to return the start time for. 4234 */ 4235 // TODO 4236 // #define GST_ELEMENT_START_TIME(elem) (GST_ELEMENT_CAST(elem)->start_time) 4237 4238 /* 4239 * Utility function that elements can use in case they encountered a fatal 4240 * data processing error. The pipeline will post an error message and the 4241 * application will be requested to stop further media processing. 4242 * el : 4243 * the element that generates the error 4244 * domain : 4245 * like CORE, LIBRARY, RESOURCE or STREAM (see gstreamer-GstGError) 4246 * code : 4247 * error code defined for that domain (see gstreamer-GstGError) 4248 * text : 4249 * the message to display (format string and args enclosed in 4250 * parentheses) 4251 * debug : 4252 * debugging information for the message (format string and args 4253 * enclosed in parentheses) 4254 */ 4255 // TODO 4256 // #define GST_ELEMENT_ERROR(el, domain, code, text, debug) 4257 4258 /* 4259 * Utility function that elements can use in case they encountered a non-fatal 4260 * data processing problem. The pipeline will post a warning message and the 4261 * application will be informed. 4262 * el : 4263 * the element that generates the warning 4264 * domain : 4265 * like CORE, LIBRARY, RESOURCE or STREAM (see gstreamer-GstGError) 4266 * code : 4267 * error code defined for that domain (see gstreamer-GstGError) 4268 * text : 4269 * the message to display (format string and args enclosed in 4270 * parentheses) 4271 * debug : 4272 * debugging information for the message (format string and args 4273 * enclosed in parentheses) 4274 */ 4275 // TODO 4276 // #define GST_ELEMENT_WARNING(el, domain, code, text, debug) 4277 4278 /* 4279 * Utility function that elements can use in case they want to inform 4280 * the application of something noteworthy that is not an error. 4281 * The pipeline will post a info message and the 4282 * application will be informed. 4283 * el : 4284 * the element that generates the information 4285 * domain : 4286 * like CORE, LIBRARY, RESOURCE or STREAM (see gstreamer-GstGError) 4287 * code : 4288 * error code defined for that domain (see gstreamer-GstGError) 4289 * text : 4290 * the message to display (format string and args enclosed in 4291 * parentheses) 4292 * debug : 4293 * debugging information for the message (format string and args 4294 * enclosed in parentheses) 4295 */ 4296 // TODO 4297 // #define GST_ELEMENT_INFO(el, domain, code, text, debug) 4298 4299 /* 4300 * Check if the element is in the locked state and therefore will ignore state 4301 * changes from its parent object. 4302 * elem : 4303 * A GstElement to query 4304 */ 4305 // TODO 4306 // #define GST_ELEMENT_IS_LOCKED_STATE(elem) (GST_OBJECT_FLAG_IS_SET(elem,GST_ELEMENT_FLAG_LOCKED_STATE)) 4307 4308 /* 4309 * Sets the name of the element, getting rid of the old name if there was one. 4310 * elem : 4311 * a GstElement to set the name of. 4312 * name : 4313 * the new name 4314 */ 4315 // TODO 4316 // #define gst_element_set_name(elem,name) gst_object_set_name(GST_OBJECT_CAST(elem),name) 4317 4318 /* 4319 * Returns a copy of the name of elem. 4320 * Caller should g_free() the return value after usage. 4321 * For a nameless element, this returns NULL, which you can safely g_free() 4322 * as well. 4323 * elem : 4324 * a GstElement to get the name of elem. 4325 * Returns : 4326 * the name of elem. g_free() after usage. MT safe. [transfer full] 4327 */ 4328 // TODO 4329 // #define gst_element_get_name(elem) gst_object_get_name(GST_OBJECT_CAST(elem)) 4330 4331 /* 4332 * Sets the parent of an element. 4333 * elem : 4334 * a GstElement to set the parent of. 4335 * parent : 4336 * the new parent GstObject of the element. 4337 */ 4338 // TODO 4339 // #define gst_element_set_parent(elem,parent) gst_object_set_parent(GST_OBJECT_CAST(elem),parent) 4340 4341 /* 4342 * Get the parent of an element. 4343 * elem : 4344 * a GstElement to get the parent of. 4345 * Returns : 4346 * the parent of an element. [transfer full] 4347 */ 4348 // TODO 4349 // #define gst_element_get_parent(elem) gst_object_get_parent(GST_OBJECT_CAST(elem)) 4350 4351 /* 4352 * when making custom event types, use this macro with the num and 4353 * the given flags 4354 * num : 4355 * the event number to create 4356 * flags : 4357 * the event flags 4358 */ 4359 // TODO 4360 // #define GST_EVENT_MAKE_TYPE(num,flags) 4361 4362 /* 4363 * Get the GstEventType of the event. 4364 * event : 4365 * the event to query 4366 */ 4367 // TODO 4368 // #define GST_EVENT_TYPE(event) (GST_EVENT_CAST(event)->type) 4369 4370 /* 4371 * Get a constant string representation of the GstEventType of the event. 4372 * event : 4373 * the event to query 4374 */ 4375 // TODO 4376 // #define GST_EVENT_TYPE_NAME(event) (gst_event_type_get_name(GST_EVENT_TYPE(event))) 4377 4378 /* 4379 * Get the GstClockTime timestamp of the event. This is the time when the event 4380 * was created. 4381 * event : 4382 * the event to query 4383 */ 4384 // TODO 4385 // #define GST_EVENT_TIMESTAMP(event) (GST_EVENT_CAST(event)->timestamp) 4386 4387 /* 4388 * The sequence number of event. 4389 * event : 4390 * the event to query 4391 */ 4392 // TODO 4393 // #define GST_EVENT_SEQNUM(event) (GST_EVENT_CAST(event)->seqnum) 4394 4395 /* 4396 * Check if an event can travel upstream. 4397 * ev : 4398 * the event to query 4399 */ 4400 // TODO 4401 // #define GST_EVENT_IS_UPSTREAM(ev) !!(GST_EVENT_TYPE (ev) GST_EVENT_TYPE_UPSTREAM) 4402 4403 /* 4404 * Check if an event can travel downstream. 4405 * ev : 4406 * the event to query 4407 */ 4408 // TODO 4409 // #define GST_EVENT_IS_DOWNSTREAM(ev) !!(GST_EVENT_TYPE (ev) GST_EVENT_TYPE_DOWNSTREAM) 4410 4411 /* 4412 * Check if an event is serialized with the data stream. 4413 * ev : 4414 * the event to query 4415 */ 4416 // TODO 4417 // #define GST_EVENT_IS_SERIALIZED(ev) !!(GST_EVENT_TYPE (ev) GST_EVENT_TYPE_SERIALIZED) 4418 4419 /* 4420 * Check if an event is sticky on the pads. 4421 * ev : 4422 * the event to query 4423 */ 4424 // TODO 4425 // #define GST_EVENT_IS_STICKY(ev) !!(GST_EVENT_TYPE (ev) GST_EVENT_TYPE_STICKY) 4426 4427 /* 4428 * Tests if you can safely write data into a event's structure or validly 4429 * modify the seqnum and timestamp field. 4430 * ev : 4431 * a GstEvent 4432 */ 4433 // TODO 4434 // #define gst_event_is_writable(ev) gst_mini_object_is_writable (GST_MINI_OBJECT_CAST (ev)) 4435 4436 /* 4437 * Makes a writable event from the given event. If the source event is 4438 * already writable, this will simply return the same event. A copy will 4439 * otherwise be made using gst_event_copy(). 4440 * ev : 4441 * a GstEvent. [transfer full] 4442 * Returns : 4443 * a writable event which may or may not be the 4444 * same as ev. [transfer full] 4445 */ 4446 // TODO 4447 // #define gst_event_make_writable(ev) GST_EVENT_CAST (gst_mini_object_make_writable (GST_MINI_OBJECT_CAST (ev))) 4448 4449 /* 4450 * Macro to cast to a GstIterator 4451 * it : 4452 * the GstIterator value 4453 */ 4454 // TODO 4455 // #define GST_ITERATOR(it) ((GstIterator*)(it)) 4456 4457 /* 4458 * Macro to get the lock protecting the datastructure being iterated. 4459 * it : 4460 * the GstIterator to get the lock of 4461 */ 4462 // TODO 4463 // #define GST_ITERATOR_LOCK(it) (GST_ITERATOR(it)->lock) 4464 4465 /* 4466 * Macro to get the cookie of a GstIterator. The cookie of the 4467 * iterator is the value of the master cookie when the iterator 4468 * was created. 4469 * Whenever the iterator is iterated, the value is compared to the 4470 * value of the master cookie. If they are different, a concurrent 4471 * modification happened to the iterator and a resync is needed. 4472 * it : 4473 * the GstIterator to get the cookie of 4474 */ 4475 // TODO 4476 // #define GST_ITERATOR_COOKIE(it) (GST_ITERATOR(it)->cookie) 4477 4478 /* 4479 * Macro to get a pointer to where the master cookie is stored. The 4480 * master cookie protects the structure being iterated and gets updated 4481 * whenever the datastructure changes. 4482 * it : 4483 * the GstIterator to get the master cookie of 4484 */ 4485 // TODO 4486 // #define GST_ITERATOR_ORIG_COOKIE(it) (GST_ITERATOR(it)->master_cookie) 4487 4488 /* 4489 * A flags word containing GstMemoryFlags flags set on mem 4490 * mem : 4491 * a GstMemory. 4492 */ 4493 // TODO 4494 // #define GST_MEMORY_FLAGS(mem) GST_MINI_OBJECT_FLAGS (mem) 4495 4496 /* 4497 * Gives the status of a specific flag on a mem. 4498 * mem : 4499 * a GstMemory. 4500 * flag : 4501 * the GstMemoryFlags to check. 4502 */ 4503 // TODO 4504 // #define GST_MEMORY_FLAG_IS_SET(mem,flag) GST_MINI_OBJECT_FLAG_IS_SET (mem,flag) 4505 4506 /* 4507 * Clear a specific flag on a mem. 4508 * mem : 4509 * a GstMemory. 4510 * flag : 4511 * the GstMemoryFlags to clear. 4512 */ 4513 // TODO 4514 // #define GST_MEMORY_FLAG_UNSET(mem,flag) GST_MINI_OBJECT_FLAG_UNSET (mem, flag) 4515 4516 /* 4517 * Check if mem is readonly. 4518 * mem : 4519 * a GstMemory. 4520 */ 4521 // TODO 4522 // #define GST_MEMORY_IS_READONLY(mem) GST_MEMORY_FLAG_IS_SET(mem,GST_MEMORY_FLAG_READONLY) 4523 4524 /* 4525 * Check if mem cannot be shared between buffers 4526 * mem : 4527 * a GstMemory. 4528 */ 4529 // TODO 4530 // #define GST_MEMORY_IS_NO_SHARE(mem) GST_MEMORY_FLAG_IS_SET(mem,GST_MEMORY_FLAG_NO_SHARE) 4531 4532 /* 4533 * Check if the padding in mem is 0 filled. 4534 * mem : 4535 * a GstMemory. 4536 */ 4537 // TODO 4538 // #define GST_MEMORY_IS_ZERO_PADDED(mem) GST_MEMORY_FLAG_IS_SET(mem,GST_MEMORY_FLAG_ZERO_PADDED) 4539 4540 /* 4541 * Check if the prefix in mem is 0 filled. 4542 * mem : 4543 * a GstMemory. 4544 */ 4545 // TODO 4546 // #define GST_MEMORY_IS_ZERO_PREFIXED(mem) GST_MEMORY_FLAG_IS_SET(mem,GST_MEMORY_FLAG_ZERO_PREFIXED) 4547 4548 /* 4549 * Check if mem is physically contiguous. 4550 * mem : 4551 * a GstMemory. 4552 * Since 1.2 4553 */ 4554 // TODO 4555 // #define GST_MEMORY_IS_PHYSICALLY_CONTIGUOUS(mem) GST_MEMORY_FLAG_IS_SET(mem,GST_MEMORY_FLAG_PHYSICALLY_CONTIGUOUS) 4556 4557 /* 4558 * Check if mem can't be mapped via gst_memory_map() without any preconditions 4559 * mem : 4560 * a GstMemory. 4561 * Since 1.2 4562 */ 4563 // TODO 4564 // #define GST_MEMORY_IS_NOT_MAPPABLE(mem) GST_MEMORY_FLAG_IS_SET(mem,GST_MEMORY_FLAG_NOT_MAPPABLE) 4565 4566 /* 4567 */ 4568 // TODO 4569 // #define gst_memory_lock(m,f) gst_mini_object_lock (GST_MINI_OBJECT_CAST (m), (f)) 4570 4571 /* 4572 */ 4573 // TODO 4574 // #define gst_memory_unlock(m,f) gst_mini_object_unlock (GST_MINI_OBJECT_CAST (m), (f)) 4575 4576 /* 4577 */ 4578 // TODO 4579 // #define gst_memory_is_writable(m) gst_mini_object_is_writable (GST_MINI_OBJECT_CAST (m)) 4580 4581 /* 4582 */ 4583 // TODO 4584 // #define gst_memory_make_writable(m) GST_MEMORY_CAST (gst_mini_object_make_writable (GST_MINI_OBJECT_CAST (m))) 4585 4586 /* 4587 * Get the object that posted message. 4588 * message : 4589 * a GstMessage 4590 */ 4591 // TODO 4592 // #define GST_MESSAGE_SRC(message) (GST_MESSAGE_CAST(message)->src) 4593 4594 /* 4595 * Get the name of the object that posted message. Returns "(NULL)" if 4596 * the message has no source object set. 4597 * message : 4598 * a GstMessage 4599 */ 4600 // TODO 4601 // #define GST_MESSAGE_SRC_NAME(message) 4602 4603 /* 4604 * Get the timestamp of message. This is the timestamp when the message 4605 * was created. 4606 * message : 4607 * a GstMessage 4608 */ 4609 // TODO 4610 // #define GST_MESSAGE_TIMESTAMP(message) (GST_MESSAGE_CAST(message)->timestamp) 4611 4612 /* 4613 * Get the sequence number of message. 4614 * message : 4615 * a GstMessage 4616 */ 4617 // TODO 4618 // #define GST_MESSAGE_SEQNUM(message) (GST_MESSAGE_CAST(message)->seqnum) 4619 4620 /* 4621 * Get the GstMessageType of message. 4622 * message : 4623 * a GstMessage 4624 */ 4625 // TODO 4626 // #define GST_MESSAGE_TYPE(message) (GST_MESSAGE_CAST(message)->type) 4627 4628 /* 4629 * Get a constant string representation of the GstMessageType of message. 4630 * message : 4631 * a GstMessage 4632 */ 4633 // TODO 4634 // #define GST_MESSAGE_TYPE_NAME(message) gst_message_type_get_name(GST_MESSAGE_TYPE(message)) 4635 4636 /* 4637 * Checks if a message is writable. If not, a writable copy is made and 4638 * returned. 4639 * msg : 4640 * the message to make writable. [transfer full] 4641 * Returns : 4642 * a message (possibly a duplicate) that is writable. 4643 * MT safe. [transfer full] 4644 */ 4645 // TODO 4646 // #define gst_message_make_writable(msg) GST_MESSAGE_CAST (gst_mini_object_make_writable (GST_MINI_OBJECT_CAST (msg))) 4647 4648 /* 4649 * Tests if you can safely write into a message's structure or validly 4650 * modify the seqnum and timestamp fields. 4651 * msg : 4652 * a GstMessage 4653 */ 4654 // TODO 4655 // #define gst_message_is_writable(msg) gst_mini_object_is_writable (GST_MINI_OBJECT_CAST (msg)) 4656 4657 /* 4658 * A flags word containing GstMetaFlags flags set on meta 4659 * meta : 4660 * a GstMeta. 4661 */ 4662 // TODO 4663 // #define GST_META_FLAGS(meta) (GST_META_CAST (meta)->flags) 4664 4665 /* 4666 * Gives the status of a specific flag on a metadata. 4667 * meta : 4668 * a GstMeta. 4669 * flag : 4670 * the GstMetaFlags to check. 4671 */ 4672 // TODO 4673 // #define GST_META_FLAG_IS_SET(meta,flag) !!(GST_META_FLAGS (meta) (flag)) 4674 4675 /* 4676 * Sets a metadata flag on a metadata. 4677 * meta : 4678 * a GstMeta. 4679 * flag : 4680 * the GstMetaFlags to set. 4681 */ 4682 // TODO 4683 // #define GST_META_FLAG_SET(meta,flag) (GST_META_FLAGS (meta) |= (flag)) 4684 4685 /* 4686 * Clears a metadata flag. 4687 * meta : 4688 * a GstMeta. 4689 * flag : 4690 * the GstMetaFlags to clear. 4691 */ 4692 // TODO 4693 // #define GST_META_FLAG_UNSET(meta,flag) (GST_META_FLAGS (meta) = ~(flag)) 4694 4695 /* 4696 * Check if the transform type is a copy transform 4697 * type : 4698 * a transform type 4699 */ 4700 // TODO 4701 // #define GST_META_TRANSFORM_IS_COPY(type) ((type) == _gst_meta_transform_copy) 4702 4703 /* 4704 * This macro returns the type of the mini-object. 4705 * obj : 4706 * MiniObject to return type for. 4707 */ 4708 // TODO 4709 // #define GST_MINI_OBJECT_TYPE(obj) (GST_MINI_OBJECT_CAST(obj)->type) 4710 4711 /* 4712 * This macro returns the entire set of flags for the mini-object. 4713 * obj : 4714 * MiniObject to return flags for. 4715 */ 4716 // TODO 4717 // #define GST_MINI_OBJECT_FLAGS(obj) (GST_MINI_OBJECT_CAST(obj)->flags) 4718 4719 /* 4720 * This macro checks to see if the given flag is set. 4721 * obj : 4722 * MiniObject to check for flags. 4723 * flag : 4724 * Flag to check for 4725 */ 4726 // TODO 4727 // #define GST_MINI_OBJECT_FLAG_IS_SET(obj,flag) !!(GST_MINI_OBJECT_FLAGS (obj) (flag)) 4728 4729 /* 4730 * This macro sets the given bits. 4731 * obj : 4732 * MiniObject to set flag in. 4733 * flag : 4734 * Flag to set, can by any number of bits in guint32. 4735 */ 4736 // TODO 4737 // #define GST_MINI_OBJECT_FLAG_SET(obj,flag) (GST_MINI_OBJECT_FLAGS (obj) |= (flag)) 4738 4739 /* 4740 * This macro usets the given bits. 4741 * obj : 4742 * MiniObject to unset flag in. 4743 * flag : 4744 * Flag to set, must be a single bit in guint32. 4745 */ 4746 // TODO 4747 // #define GST_MINI_OBJECT_FLAG_UNSET(obj,flag) (GST_MINI_OBJECT_FLAGS (obj) = ~(flag)) 4748 4749 /* 4750 * Check if obj is lockable. A lockable object can be locked and unlocked with 4751 * gst_mini_object_lock() and gst_mini_object_unlock(). 4752 * obj : 4753 * a GstMiniObject 4754 */ 4755 // TODO 4756 // #define GST_MINI_OBJECT_IS_LOCKABLE(obj) GST_MINI_OBJECT_FLAG_IS_SET(obj, GST_MINI_OBJECT_FLAG_LOCKABLE) 4757 4758 /* 4759 * Get access to the reference count field of the mini-object. 4760 * obj : 4761 * a GstMiniObject 4762 */ 4763 // TODO 4764 // #define GST_MINI_OBJECT_REFCOUNT(obj) ((GST_MINI_OBJECT_CAST(obj))->refcount) 4765 4766 /* 4767 * Get the reference count value of the mini-object. 4768 * obj : 4769 * a GstMiniObject 4770 */ 4771 // TODO 4772 // #define GST_MINI_OBJECT_REFCOUNT_VALUE(obj) (g_atomic_int_get ((GST_MINI_OBJECT_CAST(obj))->refcount)) 4773 4774 /* 4775 * Define a new mini-object type with the given name 4776 * TypeName : 4777 * name of the new type in CamelCase 4778 * type_name : 4779 * name of the new type 4780 */ 4781 // TODO 4782 // #define GST_DEFINE_MINI_OBJECT_TYPE(TypeName,type_name) 4783 4784 /* 4785 * This macro returns the entire set of flags for the object. 4786 * obj : 4787 * a GstObject 4788 */ 4789 // TODO 4790 // #define GST_OBJECT_FLAGS(obj) (GST_OBJECT_CAST (obj)->flags) 4791 4792 /* 4793 * This macro checks to see if the given flag is set. 4794 * obj : 4795 * a GstObject 4796 * flag : 4797 * Flag to check for 4798 */ 4799 // TODO 4800 // #define GST_OBJECT_FLAG_IS_SET(obj,flag) ((GST_OBJECT_FLAGS (obj) (flag)) == (flag)) 4801 4802 /* 4803 * This macro sets the given bits. 4804 * obj : 4805 * a GstObject 4806 * flag : 4807 * Flag to set 4808 */ 4809 // TODO 4810 // #define GST_OBJECT_FLAG_SET(obj,flag) (GST_OBJECT_FLAGS (obj) |= (flag)) 4811 4812 /* 4813 * This macro usets the given bits. 4814 * obj : 4815 * a GstObject 4816 * flag : 4817 * Flag to set 4818 */ 4819 // TODO 4820 // #define GST_OBJECT_FLAG_UNSET(obj,flag) (GST_OBJECT_FLAGS (obj) = ~(flag)) 4821 4822 /* 4823 * Get the name of this object 4824 * obj : 4825 * a GstObject 4826 */ 4827 // TODO 4828 // #define GST_OBJECT_NAME(obj) (GST_OBJECT_CAST(obj)->name) 4829 4830 /* 4831 * Get the parent of this object 4832 * obj : 4833 * a GstObject 4834 */ 4835 // TODO 4836 // #define GST_OBJECT_PARENT(obj) (GST_OBJECT_CAST(obj)->parent) 4837 4838 /* 4839 * Get access to the reference count field of the object. 4840 * obj : 4841 * a GstObject 4842 */ 4843 // TODO 4844 // #define GST_OBJECT_REFCOUNT(obj) (((GObject*)(obj))->ref_count) 4845 4846 /* 4847 * Get the reference count value of the object. 4848 * obj : 4849 * a GstObject 4850 */ 4851 // TODO 4852 // #define GST_OBJECT_REFCOUNT_VALUE(obj) g_atomic_int_get ((gint *) GST_OBJECT_REFCOUNT(obj)) 4853 4854 /* 4855 * This macro will obtain a lock on the object, making serialization possible. 4856 * It blocks until the lock can be obtained. 4857 * obj : 4858 * a GstObject to lock 4859 */ 4860 // TODO 4861 // #define GST_OBJECT_LOCK(obj) g_mutex_lock(GST_OBJECT_GET_LOCK(obj)) 4862 4863 /* 4864 * This macro will try to obtain a lock on the object, but will return with 4865 * FALSE if it can't get it immediately. 4866 * obj : 4867 * a GstObject. 4868 */ 4869 // TODO 4870 // #define GST_OBJECT_TRYLOCK(obj) g_mutex_trylock(GST_OBJECT_GET_LOCK(obj)) 4871 4872 /* 4873 * This macro releases a lock on the object. 4874 * obj : 4875 * a GstObject to unlock. 4876 */ 4877 // TODO 4878 // #define GST_OBJECT_UNLOCK(obj) g_mutex_unlock(GST_OBJECT_GET_LOCK(obj)) 4879 4880 /* 4881 * Acquire a reference to the mutex of this object. 4882 * obj : 4883 * a GstObject 4884 */ 4885 // TODO 4886 // #define GST_OBJECT_GET_LOCK(obj) (GST_OBJECT_CAST(obj)->lock) 4887 4888 /* 4889 * Macro to test if the given GstPadLinkReturn value indicates a failed 4890 * link step. 4891 * ret : 4892 * the GstPadLinkReturn value 4893 */ 4894 // TODO 4895 // #define GST_PAD_LINK_FAILED(ret) ((ret) < GST_PAD_LINK_OK) 4896 4897 /* 4898 * Macro to test if the given GstPadLinkReturn value indicates a successful 4899 * link step. 4900 * ret : 4901 * the GstPadLinkReturn value 4902 */ 4903 // TODO 4904 // #define GST_PAD_LINK_SUCCESSFUL(ret) ((ret) >= GST_PAD_LINK_OK) 4905 4906 /* 4907 * Get a copy of the name of the pad. g_free() after usage. 4908 * MT safe. 4909 * pad : 4910 * the pad to get the name from 4911 */ 4912 // TODO 4913 // #define gst_pad_get_name(pad) gst_object_get_name (GST_OBJECT_CAST (pad)) 4914 4915 /* 4916 * Get the parent of pad. This function increases the refcount 4917 * of the parent object so you should gst_object_unref() it after usage. 4918 * Can return NULL if the pad did not have a parent. 4919 * MT safe. 4920 * pad : 4921 * the pad to get the parent of 4922 */ 4923 // TODO 4924 // #define gst_pad_get_parent(pad) gst_object_get_parent (GST_OBJECT_CAST (pad)) 4925 4926 /* 4927 */ 4928 // TODO 4929 // #define GST_PAD_PROBE_INFO_TYPE(d) ((d)->type) 4930 4931 /* 4932 */ 4933 // TODO 4934 // #define GST_PAD_PROBE_INFO_ID(d) ((d)->id) 4935 4936 /* 4937 */ 4938 // TODO 4939 // #define GST_PAD_PROBE_INFO_DATA(d) ((d)->data) 4940 4941 /* 4942 */ 4943 // TODO 4944 // #define GST_PAD_PROBE_INFO_BUFFER(d) GST_BUFFER_CAST(GST_PAD_PROBE_INFO_DATA(d)) 4945 4946 /* 4947 */ 4948 // TODO 4949 // #define GST_PAD_PROBE_INFO_BUFFER_LIST(d) GST_BUFFER_LIST_CAST(GST_PAD_PROBE_INFO_DATA(d)) 4950 4951 /* 4952 */ 4953 // TODO 4954 // #define GST_PAD_PROBE_INFO_EVENT(d) GST_EVENT_CAST(GST_PAD_PROBE_INFO_DATA(d)) 4955 4956 /* 4957 */ 4958 // TODO 4959 // #define GST_PAD_PROBE_INFO_QUERY(d) GST_QUERY_CAST(GST_PAD_PROBE_INFO_DATA(d)) 4960 4961 /* 4962 */ 4963 // TODO 4964 // #define GST_PAD_PROBE_INFO_OFFSET(d) ((d)->offset) 4965 4966 /* 4967 */ 4968 // TODO 4969 // #define GST_PAD_PROBE_INFO_SIZE(d) ((d)->size) 4970 4971 /* 4972 * Calls gst_pad_set_chain_function_full() with NULL for the user_data and 4973 * notify. 4974 * p : 4975 * a sink GstPad. 4976 * f : 4977 * the GstPadChainFunction to set. 4978 */ 4979 // TODO 4980 // #define gst_pad_set_chain_function(p,f) gst_pad_set_chain_function_full((p),(f),NULL,NULL) 4981 4982 /* 4983 * Calls gst_pad_set_chain_list_function_full() with NULL for the user_data and 4984 * notify. 4985 * p : 4986 * a sink GstPad. 4987 * f : 4988 * the GstPadChainListFunction to set. 4989 */ 4990 // TODO 4991 // #define gst_pad_set_chain_list_function(p,f) gst_pad_set_chain_list_function_full((p),(f),NULL,NULL) 4992 4993 /* 4994 * Calls gst_pad_set_getrange_function_full() with NULL for the user_data and 4995 * notify. 4996 * p : 4997 * a source GstPad. 4998 * f : 4999 * the GstPadGetRangeFunction to set. 5000 */ 5001 // TODO 5002 // #define gst_pad_set_getrange_function(p,f) gst_pad_set_getrange_function_full((p),(f),NULL,NULL) 5003 5004 /* 5005 * Calls gst_pad_set_event_function_full() with NULL for the user_data and 5006 * notify. 5007 * p : 5008 * a GstPad of either direction. 5009 * f : 5010 * the GstPadEventFunction to set. 5011 */ 5012 // TODO 5013 // #define gst_pad_set_event_function(p,f) gst_pad_set_event_function_full((p),(f),NULL,NULL) 5014 5015 /* 5016 * Calls gst_pad_set_link_function_full() with NULL 5017 * for the user_data and notify. 5018 * p : 5019 * a GstPad. 5020 * f : 5021 * the GstPadLinkFunction to set. 5022 */ 5023 // TODO 5024 // #define gst_pad_set_link_function(p,f) gst_pad_set_link_function_full((p),(f),NULL,NULL) 5025 5026 /* 5027 * Calls gst_pad_set_unlink_function_full() with NULL 5028 * for the user_data and notify. 5029 * p : 5030 * a GstPad. 5031 * f : 5032 * the GstPadUnlinkFunction to set. 5033 */ 5034 // TODO 5035 // #define gst_pad_set_unlink_function(p,f) gst_pad_set_unlink_function_full((p),(f),NULL,NULL) 5036 5037 /* 5038 * Calls gst_pad_set_activate_function_full() with NULL for the user_data and 5039 * notify. 5040 * p : 5041 * a GstPad. 5042 * f : 5043 * the GstPadActivateFunction to set. 5044 */ 5045 // TODO 5046 // #define gst_pad_set_activate_function(p,f) gst_pad_set_activate_function_full((p),(f),NULL,NULL) 5047 5048 /* 5049 * Calls gst_pad_set_activatemode_function_full() with NULL for the user_data and 5050 * notify. 5051 * p : 5052 * a GstPad. 5053 * f : 5054 * the GstPadActivateModeFunction to set. 5055 */ 5056 // TODO 5057 // #define gst_pad_set_activatemode_function(p,f) gst_pad_set_activatemode_function_full((p),(f),NULL,NULL) 5058 5059 /* 5060 * Calls gst_pad_set_query_function_full() with NULL for the user_data and 5061 * notify. 5062 * p : 5063 * a GstPad of either direction. 5064 * f : 5065 * the GstPadQueryFunction to set. 5066 */ 5067 // TODO 5068 // #define gst_pad_set_query_function(p,f) gst_pad_set_query_function_full((p),(f),NULL,NULL) 5069 5070 /* 5071 * Calls gst_pad_set_iterate_internal_links_function_full() with NULL 5072 * for the user_data and notify. 5073 * p : 5074 * a GstPad of either direction. 5075 * f : 5076 * the GstPadIterIntLinkFunction to set. 5077 */ 5078 // TODO 5079 // #define gst_pad_set_iterate_internal_links_function(p,f) gst_pad_set_iterate_internal_links_function_full((p),(f),NULL,NULL) 5080 5081 /* 5082 * Get the stream lock of pad. The stream lock is protecting the 5083 * resources used in the data processing functions of pad. 5084 * pad : 5085 * a GstPad 5086 */ 5087 // TODO 5088 // #define GST_PAD_GET_STREAM_LOCK(pad) ((GST_PAD_CAST(pad)->stream_rec_lock)) 5089 5090 /* 5091 * Lock the stream lock of pad. 5092 * pad : 5093 * a GstPad 5094 */ 5095 // TODO 5096 // #define GST_PAD_STREAM_LOCK(pad) g_rec_mutex_lock(GST_PAD_GET_STREAM_LOCK(pad)) 5097 5098 /* 5099 * Try to Lock the stream lock of the pad, return TRUE if the lock could be 5100 * taken. 5101 * pad : 5102 * a GstPad 5103 */ 5104 // TODO 5105 // #define GST_PAD_STREAM_TRYLOCK(pad) g_rec_mutex_trylock(GST_PAD_GET_STREAM_LOCK(pad)) 5106 5107 /* 5108 * Unlock the stream lock of pad. 5109 * pad : 5110 * a GstPad 5111 * Property Details 5112 * The "caps" property 5113 * "caps" GstCaps* : Read 5114 * The capabilities of the pad. 5115 */ 5116 // TODO 5117 // #define GST_PAD_STREAM_UNLOCK(pad) g_rec_mutex_unlock(GST_PAD_GET_STREAM_LOCK(pad)) 5118 5119 /* 5120 * Convenience macro to fill the values of a GstStaticPadTemplate 5121 * structure. 5122 * padname : 5123 * the name template of the pad 5124 * dir : 5125 * the GstPadDirection of the pad 5126 * pres : 5127 * the GstPadPresence of the pad 5128 * caps : 5129 * the GstStaticCaps of the pad 5130 */ 5131 // TODO 5132 // #define GST_STATIC_PAD_TEMPLATE(padname, dir, pres, caps) 5133 5134 /* 5135 * Get the nametemplate of the padtemplate. 5136 * templ : 5137 * the template to query 5138 */ 5139 // TODO 5140 // #define GST_PAD_TEMPLATE_NAME_TEMPLATE(templ) (((GstPadTemplate *)(templ))->name_template) 5141 5142 /* 5143 * Get the GstPadDirection of the padtemplate. 5144 * templ : 5145 * the template to query 5146 */ 5147 // TODO 5148 // #define GST_PAD_TEMPLATE_DIRECTION(templ) (((GstPadTemplate *)(templ))->direction) 5149 5150 /* 5151 * Get the GstPadPresence of the padtemplate. 5152 * templ : 5153 * the template to query 5154 */ 5155 // TODO 5156 // #define GST_PAD_TEMPLATE_PRESENCE(templ) (((GstPadTemplate *)(templ))->presence) 5157 5158 /* 5159 * Get a handle to the padtemplate GstCaps 5160 * templ : 5161 * the template to query 5162 */ 5163 // TODO 5164 // #define GST_PAD_TEMPLATE_CAPS(templ) (((GstPadTemplate *)(templ))->caps) 5165 5166 /* 5167 * Check if the properties of the padtemplate are fixed 5168 * templ : 5169 * the template to query 5170 */ 5171 // TODO 5172 // #define GST_PAD_TEMPLATE_IS_FIXED(templ) (GST_OBJECT_FLAG_IS_SET(templ, GST_PAD_TEMPLATE_FIXED)) 5173 5174 /* 5175 * This macro needs to be used to define the entry point and meta data of a 5176 * plugin. One would use this macro to export a plugin, so that it can be used 5177 * by other applications. 5178 * The macro uses a define named PACKAGE for the GstPluginDesc,source field. 5179 * When using autoconf, this is usually set automatically via the AC_INIT 5180 * macro, and set in config.h. If you are not using autoconf, you will need to 5181 * define PACKAGE yourself and set it to a short mnemonic string identifying 5182 * your application/package, e.g. 'someapp' or 'my-plugins-foo. 5183 * If defined, the GST_PACKAGE_RELEASE_DATETIME will also be used for the 5184 * GstPluginDesc,release_datetime field. 5185 * major : 5186 * major version number of the gstreamer-core that plugin was compiled for 5187 * minor : 5188 * minor version number of the gstreamer-core that plugin was compiled for 5189 * name : 5190 * short, but unique name of the plugin 5191 * description : 5192 * information about the purpose of the plugin 5193 * init : 5194 * function pointer to the plugin_init method with the signature of static gboolean plugin_init (GstPlugin * plugin). 5195 * version : 5196 * full version string (e.g. VERSION from config.h) 5197 * license : 5198 * under which licence the package has been released, e.g. GPL, LGPL. 5199 * package : 5200 * the package-name (e.g. PACKAGE_NAME from config.h) 5201 * origin : 5202 * a description from where the package comes from (e.g. the homepage URL) 5203 */ 5204 // TODO 5205 // #define GST_PLUGIN_DEFINE(major,minor,name,description,init,version,license,package,origin) 5206 5207 /* 5208 * Sets the name of the plugin feature, getting rid of the old name if there was one. 5209 * feature : 5210 * a GstPluginFeature to set the name of. 5211 * name : 5212 * the new name 5213 */ 5214 // TODO 5215 // #define gst_plugin_feature_set_name(feature,name) gst_object_set_name(GST_OBJECT_CAST(feature),name) 5216 5217 /* 5218 * Returns the name of feature. 5219 * For a nameless plugin feature, this returns NULL. 5220 * feature : 5221 * a GstPluginFeature to get the name of feature. 5222 * Returns : 5223 * the name of feature. MT safe. [transfer none] 5224 */ 5225 // TODO 5226 // #define gst_plugin_feature_get_name(feature) GST_OBJECT_NAME(feature) 5227 5228 /* 5229 * Debug the plugin feature names in list. 5230 * list : 5231 * a GList of 5232 * plugin features. [transfer none][element-type Gst.PluginFeature] 5233 */ 5234 // TODO 5235 // #define GST_PLUGIN_FEATURE_LIST_DEBUG(list) gst_plugin_feature_list_debug(list) 5236 5237 /* 5238 * when making custom query types, use this macro with the num and 5239 * the given flags 5240 * num : 5241 * the query number to create 5242 * flags : 5243 * the query flags 5244 */ 5245 // TODO 5246 // #define GST_QUERY_MAKE_TYPE(num,flags) 5247 5248 /* 5249 * Get the GstQueryType of the query. 5250 * query : 5251 * the query to query 5252 */ 5253 // TODO 5254 // #define GST_QUERY_TYPE(query) (((GstQuery*)(query))->type) 5255 5256 /* 5257 * Get a constant string representation of the GstQueryType of the query. 5258 * query : 5259 * the query to query 5260 */ 5261 // TODO 5262 // #define GST_QUERY_TYPE_NAME(query) (gst_query_type_get_name(GST_QUERY_TYPE(query))) 5263 5264 /* 5265 * Check if an query can travel upstream. 5266 * ev : 5267 * the query to query 5268 */ 5269 // TODO 5270 // #define GST_QUERY_IS_UPSTREAM(ev) !!(GST_QUERY_TYPE (ev) GST_QUERY_TYPE_UPSTREAM) 5271 5272 /* 5273 * Check if an query can travel downstream. 5274 * ev : 5275 * the query to query 5276 */ 5277 // TODO 5278 // #define GST_QUERY_IS_DOWNSTREAM(ev) !!(GST_QUERY_TYPE (ev) GST_QUERY_TYPE_DOWNSTREAM) 5279 5280 /* 5281 * Check if an query is serialized with the data stream. 5282 * ev : 5283 * the query to query 5284 */ 5285 // TODO 5286 // #define GST_QUERY_IS_SERIALIZED(ev) !!(GST_QUERY_TYPE (ev) GST_QUERY_TYPE_SERIALIZED) 5287 5288 /* 5289 * Makes a writable query from the given query. 5290 * q : 5291 * a GstQuery to make writable. [transfer full] 5292 * Returns : 5293 * a new writable query (possibly same as q). [transfer full] 5294 */ 5295 // TODO 5296 // #define gst_query_make_writable(q) GST_QUERY_CAST (gst_mini_object_make_writable (GST_MINI_OBJECT_CAST (q))) 5297 5298 /* 5299 * Tests if you can safely write data into a query's structure. 5300 * q : 5301 * a GstQuery 5302 */ 5303 // TODO 5304 // #define gst_query_is_writable(q) gst_mini_object_is_writable (GST_MINI_OBJECT_CAST (q)) 5305 5306 /* 5307 * Warning 5308 * gst_tag_list_free is deprecated and should not be used in newly-written code. 5309 */ 5310 // TODO 5311 // #define gst_tag_list_free(taglist) gst_tag_list_unref(taglist) 5312 5313 /* 5314 * Tests if you can safely modify taglist. It is only safe to modify taglist 5315 * when there is only one owner of the taglist - ie, the refcount is 1. 5316 * taglist : 5317 * a GstTagList 5318 */ 5319 // TODO 5320 // #define gst_tag_list_is_writable(taglist) gst_mini_object_is_writable (GST_MINI_OBJECT_CAST (taglist)) 5321 5322 /* 5323 * Returns a writable copy of taglist. 5324 * If there is only one reference count on taglist, the caller must be the 5325 * owner, and so this function will return the taglist object unchanged. If on 5326 * the other hand there is more than one reference on the object, a new taglist 5327 * object will be returned (which will be a copy of taglist). The caller's 5328 * reference on taglist will be removed, and instead the caller will own a 5329 * reference to the returned object. 5330 * In short, this function unrefs the taglist in the argument and refs the 5331 * taglist that it returns. Don't access the argument after calling this 5332 * function. See also: gst_tag_list_ref(). 5333 * taglist : 5334 * a GstTagList. [transfer full] 5335 * Returns : 5336 * a writable taglist which may or may not be the 5337 * same as taglist. [transfer full] 5338 */ 5339 // TODO 5340 // #define gst_tag_list_make_writable(taglist) GST_TAG_LIST (gst_mini_object_make_writable (GST_MINI_OBJECT_CAST (taglist))) 5341 5342 /* 5343 * Send a broadcast signal to all waiting task conds 5344 * task : 5345 * Task to broadcast 5346 */ 5347 // TODO 5348 // #define GST_TASK_BROADCAST(task) g_cond_broadcast(GST_TASK_GET_COND (task)) 5349 5350 /* 5351 * Get access to the cond of the task. 5352 * task : 5353 * Task to get the cond of 5354 */ 5355 // TODO 5356 // #define GST_TASK_GET_COND(task) (GST_TASK_CAST(task)->cond) 5357 5358 /* 5359 * Get access to the task lock. 5360 * task : 5361 * Task to get the lock of 5362 */ 5363 // TODO 5364 // #define GST_TASK_GET_LOCK(task) (GST_TASK_CAST(task)->lock) 5365 5366 /* 5367 * Signal the task cond 5368 * task : 5369 * Task to signal 5370 */ 5371 // TODO 5372 // #define GST_TASK_SIGNAL(task) g_cond_signal(GST_TASK_GET_COND (task)) 5373 5374 /* 5375 * Get access to the state of the task. 5376 * task : 5377 * Task to get the state of 5378 */ 5379 // TODO 5380 // #define GST_TASK_STATE(task) (GST_TASK_CAST(task)->state) 5381 5382 /* 5383 * Wait for the task cond to be signalled 5384 * task : 5385 * Task to wait for 5386 */ 5387 // TODO 5388 // #define GST_TASK_WAIT(task) g_cond_wait(GST_TASK_GET_COND (task), GST_OBJECT_GET_LOCK (task)) 5389 5390 /* 5391 */ 5392 // TODO 5393 // #define gst_toc_ref(toc) (GstToc*)gst_mini_object_ref(GST_MINI_OBJECT_CAST(toc)) 5394 5395 /* 5396 */ 5397 // TODO 5398 // #define gst_toc_unref(toc) gst_mini_object_unref(GST_MINI_OBJECT_CAST(toc)) 5399 5400 /* 5401 * Copy GstToc with all subentries (deep copy). 5402 * toc : 5403 * GstToc to copy. 5404 * Returns : 5405 * newly allocated GstToc in case of success, NULL otherwise; 5406 * free it when done with gst_toc_unref(). 5407 */ 5408 // TODO 5409 // #define gst_toc_copy(toc) (GstToc*)gst_mini_object_copy(GST_MINI_OBJECT_CAST(toc)) 5410 5411 /* 5412 */ 5413 // TODO 5414 // #define gst_toc_make_writable(toc) (GstToc*)gst_mini_object_make_writable(GST_MINI_OBJECT_CAST(toc)) 5415 5416 /* 5417 */ 5418 // TODO 5419 // #define GST_TOC_ENTRY_TYPE_IS_ALTERNATIVE(entry_type) (entry_type < 0) 5420 5421 /* 5422 * See Also 5423 * GstStructure, GstEvent, GstMessage, GstQuery 5424 */ 5425 // TODO 5426 // #define GST_TOC_ENTRY_TYPE_IS_SEQUENCE(entry_type) (entry_type > 0) 5427 5428 /* 5429 * Tests if the type direction is valid. 5430 * type : 5431 * A GstURIType 5432 */ 5433 // TODO 5434 // #define GST_URI_TYPE_IS_VALID(type) ((type) == GST_URI_SRC || (type) == GST_URI_SINK) 5435 5436 /* 5437 * Tests if the type direction is valid. 5438 * type : 5439 * A GstURIType 5440 */ 5441 // TODO 5442 // #define GST_URI_TYPE_IS_VALID(type) ((type) == GST_URI_SRC || (type) == GST_URI_SINK) 5443 5444 /* 5445 * Just call the parent handler. This assumes that there is a variable 5446 * named parent_class that points to the (duh!) parent class. Note that 5447 * this macro is not to be used with things that return something, use 5448 * the _WITH_DEFAULT version for that 5449 * parent_class_cast : 5450 * the name of the class cast macro for the parent type 5451 * name : 5452 * name of the function to call 5453 * args : 5454 * arguments enclosed in '( )' 5455 */ 5456 // TODO 5457 // #define GST_CALL_PARENT(parent_class_cast, name, args) 5458 5459 /* 5460 * Same as GST_CALL_PARENT(), but in case there is no implementation, it 5461 * evaluates to def_return. 5462 * parent_class_cast : 5463 * the name of the class cast macro for the parent type 5464 * name : 5465 * name of the function to call 5466 * args : 5467 * arguments enclosed in '( )' 5468 * def_return : 5469 * default result 5470 */ 5471 // TODO 5472 // #define GST_CALL_PARENT_WITH_DEFAULT(parent_class_cast, name, args, def_return) 5473 5474 /* 5475 * Read an 8 bit unsigned integer value from the memory buffer. 5476 * data : 5477 * memory location 5478 */ 5479 // TODO 5480 // #define GST_READ_UINT8(data) (_GST_GET (data, 0, 8, 0)) 5481 5482 /* 5483 */ 5484 // TODO 5485 // # define GST_READ_UINT16_LE(data) _GST_FAST_READ_SWAP (16, data) Read a 16 bit unsigned integer value in little endian format from the memory buffer. data : memory location 5486 5487 /* 5488 */ 5489 // TODO 5490 // # define GST_READ_UINT16_BE(data) _GST_FAST_READ (16, data) Read a 16 bit unsigned integer value in big endian format from the memory buffer. data : memory location 5491 5492 /* 5493 * Read a 24 bit unsigned integer value in little endian format from the memory buffer. 5494 * data : 5495 * memory location 5496 */ 5497 // TODO 5498 // #define GST_READ_UINT24_LE(data) __gst_slow_read24_le((const guint8 *)(data)) 5499 5500 /* 5501 * Read a 24 bit unsigned integer value in big endian format from the memory buffer. 5502 * data : 5503 * memory location 5504 */ 5505 // TODO 5506 // #define GST_READ_UINT24_BE(data) __gst_slow_read24_be((const guint8 *)(data)) 5507 5508 /* 5509 */ 5510 // TODO 5511 // # define GST_READ_UINT32_LE(data) _GST_FAST_READ_SWAP (32, data) Read a 32 bit unsigned integer value in little endian format from the memory buffer. data : memory location 5512 5513 /* 5514 */ 5515 // TODO 5516 // # define GST_READ_UINT32_BE(data) _GST_FAST_READ (32, data) Read a 32 bit unsigned integer value in big endian format from the memory buffer. data : memory location 5517 5518 /* 5519 */ 5520 // TODO 5521 // # define GST_READ_UINT64_LE(data) _GST_FAST_READ_SWAP (64, data) Read a 64 bit unsigned integer value in little endian format from the memory buffer. data : memory location 5522 5523 /* 5524 */ 5525 // TODO 5526 // # define GST_READ_UINT64_BE(data) _GST_FAST_READ (64, data) Read a 64 bit unsigned integer value in big endian format from the memory buffer. data : memory location 5527 5528 /* 5529 * Store an 8 bit unsigned integer value into the memory buffer. 5530 * data : 5531 * memory location 5532 * num : 5533 * value to store 5534 */ 5535 // TODO 5536 // #define GST_WRITE_UINT8(data, num) 5537 5538 /* 5539 * Store a 16 bit unsigned integer value in little endian format into the memory buffer. 5540 * data : 5541 * memory location 5542 * num : 5543 * value to store 5544 */ 5545 // TODO 5546 // #define GST_WRITE_UINT16_LE(data, num) 5547 5548 /* 5549 * Store a 16 bit unsigned integer value in big endian format into the memory buffer. 5550 * data : 5551 * memory location 5552 * num : 5553 * value to store 5554 */ 5555 // TODO 5556 // #define GST_WRITE_UINT16_BE(data, num) 5557 5558 /* 5559 * Store a 24 bit unsigned integer value in little endian format into the memory buffer. 5560 * data : 5561 * memory location 5562 * num : 5563 * value to store 5564 */ 5565 // TODO 5566 // #define GST_WRITE_UINT24_LE(data, num) 5567 5568 /* 5569 * Store a 24 bit unsigned integer value in big endian format into the memory buffer. 5570 * data : 5571 * memory location 5572 * num : 5573 * value to store 5574 */ 5575 // TODO 5576 // #define GST_WRITE_UINT24_BE(data, num) 5577 5578 /* 5579 * Store a 32 bit unsigned integer value in little endian format into the memory buffer. 5580 * data : 5581 * memory location 5582 * num : 5583 * value to store 5584 */ 5585 // TODO 5586 // #define GST_WRITE_UINT32_LE(data, num) 5587 5588 /* 5589 * Store a 32 bit unsigned integer value in big endian format into the memory buffer. 5590 * data : 5591 * memory location 5592 * num : 5593 * value to store 5594 */ 5595 // TODO 5596 // #define GST_WRITE_UINT32_BE(data, num) 5597 5598 /* 5599 * Store a 64 bit unsigned integer value in little endian format into the memory buffer. 5600 * data : 5601 * memory location 5602 * num : 5603 * value to store 5604 */ 5605 // TODO 5606 // #define GST_WRITE_UINT64_LE(data, num) 5607 5608 /* 5609 * Store a 64 bit unsigned integer value in big endian format into the memory buffer. 5610 * data : 5611 * memory location 5612 * num : 5613 * value to store 5614 */ 5615 // TODO 5616 // #define GST_WRITE_UINT64_BE(data, num) 5617 5618 /* 5619 * Rounds an integer value up to the next multiple of 2. 5620 * num : 5621 * integer value to round up 5622 */ 5623 // TODO 5624 // #define GST_ROUND_UP_2(num) (((num)+1)~1) 5625 5626 /* 5627 * Rounds an integer value up to the next multiple of 4. 5628 * num : 5629 * integer value to round up 5630 */ 5631 // TODO 5632 // #define GST_ROUND_UP_4(num) (((num)+3)~3) 5633 5634 /* 5635 * Rounds an integer value up to the next multiple of 8. 5636 * num : 5637 * integer value to round up 5638 */ 5639 // TODO 5640 // #define GST_ROUND_UP_8(num) (((num)+7)~7) 5641 5642 /* 5643 * Rounds an integer value up to the next multiple of 16. 5644 * num : 5645 * integer value to round up 5646 */ 5647 // TODO 5648 // #define GST_ROUND_UP_16(num) (((num)+15)~15) 5649 5650 /* 5651 * Rounds an integer value up to the next multiple of 32. 5652 * num : 5653 * integer value to round up 5654 */ 5655 // TODO 5656 // #define GST_ROUND_UP_32(num) (((num)+31)~31) 5657 5658 /* 5659 * Rounds an integer value up to the next multiple of 64. 5660 * num : 5661 * integer value to round up 5662 */ 5663 // TODO 5664 // #define GST_ROUND_UP_64(num) (((num)+63)~63) 5665 5666 /* 5667 * Rounds an integer value down to the next multiple of 2. 5668 * num : 5669 * integer value to round down 5670 */ 5671 // TODO 5672 // #define GST_ROUND_DOWN_2(num) ((num)(~1)) 5673 5674 /* 5675 * Rounds an integer value down to the next multiple of 4. 5676 * num : 5677 * integer value to round down 5678 */ 5679 // TODO 5680 // #define GST_ROUND_DOWN_4(num) ((num)(~3)) 5681 5682 /* 5683 * Rounds an integer value down to the next multiple of 8. 5684 * num : 5685 * integer value to round down 5686 */ 5687 // TODO 5688 // #define GST_ROUND_DOWN_8(num) ((num)(~7)) 5689 5690 /* 5691 * Rounds an integer value down to the next multiple of 16. 5692 * num : 5693 * integer value to round down 5694 */ 5695 // TODO 5696 // #define GST_ROUND_DOWN_16(num) ((num)(~15)) 5697 5698 /* 5699 * Rounds an integer value down to the next multiple of 32. 5700 * num : 5701 * integer value to round down 5702 */ 5703 // TODO 5704 // #define GST_ROUND_DOWN_32(num) ((num)(~31)) 5705 5706 /* 5707 * Rounds an integer value down to the next multiple of 64. 5708 * num : 5709 * integer value to round down 5710 */ 5711 // TODO 5712 // #define GST_ROUND_DOWN_64(num) ((num)(~63)) 5713 5714 /* 5715 * Convert 64-bit floating point value (double) from big endian byte order 5716 * into native byte order. 5717 * val : 5718 * value 5719 */ 5720 // TODO 5721 // #define GDOUBLE_FROM_BE(val) (GDOUBLE_TO_BE (val)) 5722 5723 /* 5724 * Convert 64-bit floating point value (double) from little endian byte order 5725 * into native byte order. 5726 * val : 5727 * value 5728 */ 5729 // TODO 5730 // #define GDOUBLE_FROM_LE(val) (GDOUBLE_TO_LE (val)) 5731 5732 /* 5733 * Convert 64-bit floating point value (double) from native byte order into 5734 * big endian byte order. 5735 * val : 5736 * value 5737 */ 5738 // TODO 5739 // #define GDOUBLE_TO_BE(val) (GDOUBLE_SWAP_LE_BE (val)) 5740 5741 /* 5742 * Convert 64-bit floating point value (double) from native byte order into 5743 * little endian byte order. 5744 * val : 5745 * value 5746 */ 5747 // TODO 5748 // #define GDOUBLE_TO_LE(val) ((gdouble) (val)) 5749 5750 /* 5751 * Convert 32-bit floating point value (float) from big endian byte order 5752 * into native byte order. 5753 * val : 5754 * value 5755 */ 5756 // TODO 5757 // #define GFLOAT_FROM_BE(val) (GFLOAT_TO_BE (val)) 5758 5759 /* 5760 * Convert 32-bit floating point value (float) from little endian byte order 5761 * into native byte order. 5762 * val : 5763 * value 5764 */ 5765 // TODO 5766 // #define GFLOAT_FROM_LE(val) (GFLOAT_TO_LE (val)) 5767 5768 /* 5769 * Convert 32-bit floating point value (float) from native byte order into 5770 * big endian byte order. 5771 * val : 5772 * value 5773 */ 5774 // TODO 5775 // #define GFLOAT_TO_BE(val) (GFLOAT_SWAP_LE_BE (val)) 5776 5777 /* 5778 * Convert 32-bit floating point value (float) from native byte order into 5779 * little endian byte order. 5780 * val : 5781 * value 5782 */ 5783 // TODO 5784 // #define GFLOAT_TO_LE(val) ((gfloat) (val)) 5785 5786 /* 5787 * Convert value to a gdouble. 5788 * value : 5789 * the guint64 value to convert 5790 * Returns : 5791 * value converted to a gdouble. 5792 */ 5793 // TODO 5794 // #define gst_guint64_to_gdouble(value) gst_util_guint64_to_gdouble(value) 5795 5796 /* 5797 * Convert value to a guint64. 5798 * value : 5799 * the gdouble value to convert 5800 * Returns : 5801 * value converted to a guint64. 5802 */ 5803 // TODO 5804 // #define gst_gdouble_to_guint64(value) gst_util_gdouble_to_guint64(value) 5805 5806 /* 5807 * Transform four characters into a guint32 fourcc value with host 5808 * endianness. 5809 * $(DDOC_COMMENT example) 5810 * a : 5811 * the first character 5812 * b : 5813 * the second character 5814 * c : 5815 * the third character 5816 * d : 5817 * the fourth character 5818 */ 5819 // TODO 5820 // #define GST_MAKE_FOURCC(a,b,c,d) ((guint32)((a)|(b)<<8|(c)<<16|(d)<<24)) 5821 5822 /* 5823 * Transform an input string into a guint32 fourcc value with host 5824 * endianness. 5825 * Caller is responsible for ensuring the input string consists of at least 5826 * four characters. 5827 * $(DDOC_COMMENT example) 5828 * f : 5829 * a string with at least four characters 5830 */ 5831 // TODO 5832 // #define GST_STR_FOURCC(f) ((guint32)(((f)[0])|((f)[1]<<8)|((f)[2]<<16)|((f)[3]<<24))) 5833 5834 /* 5835 * Can be used together with GST_FOURCC_FORMAT to properly output a 5836 * guint32 fourcc value in a printf()-style text message. 5837 * fourcc : 5838 * a guint32 fourcc value to output 5839 */ 5840 // TODO 5841 // #define GST_FOURCC_ARGS(fourcc) 5842 5843 /* 5844 * Checks if the given GValue contains a GST_TYPE_INT_RANGE value. 5845 * x : 5846 * the GValue to check 5847 */ 5848 // TODO 5849 // #define GST_VALUE_HOLDS_INT_RANGE(x) (G_VALUE_HOLDS((x), gst_int_range_get_type ())) 5850 5851 /* 5852 * Checks if the given GValue contains a GST_TYPE_BITMASK value. 5853 * x : 5854 * the GValue to check 5855 */ 5856 // TODO 5857 // #define GST_VALUE_HOLDS_BITMASK(x) (G_VALUE_HOLDS((x), gst_bitmask_get_type ())) 5858 5859 /* 5860 * Checks if the given GValue contains a GST_TYPE_INT64_RANGE value. 5861 * x : 5862 * the GValue to check 5863 */ 5864 // TODO 5865 // #define GST_VALUE_HOLDS_INT64_RANGE(x) (G_VALUE_HOLDS((x), gst_int64_range_get_type ())) 5866 5867 /* 5868 * Checks if the given GValue contains a GST_TYPE_DOUBLE_RANGE value. 5869 * x : 5870 * the GValue to check 5871 */ 5872 // TODO 5873 // #define GST_VALUE_HOLDS_DOUBLE_RANGE(x) (G_VALUE_HOLDS((x), gst_double_range_get_type ())) 5874 5875 /* 5876 * Checks if the given GValue contains a GST_TYPE_LIST value. 5877 * x : 5878 * the GValue to check 5879 */ 5880 // TODO 5881 // #define GST_VALUE_HOLDS_LIST(x) (G_VALUE_HOLDS((x), gst_value_list_get_type ())) 5882 5883 /* 5884 * Checks if the given GValue contains a GST_TYPE_ARRAY value. 5885 * x : 5886 * the GValue to check 5887 */ 5888 // TODO 5889 // #define GST_VALUE_HOLDS_ARRAY(x) (G_VALUE_HOLDS((x), gst_value_array_get_type ())) 5890 5891 /* 5892 * Checks if the given GValue contains a GST_TYPE_FRACTION value. 5893 * x : 5894 * the GValue to check 5895 */ 5896 // TODO 5897 // #define GST_VALUE_HOLDS_FRACTION(x) (G_VALUE_HOLDS((x), gst_fraction_get_type ())) 5898 5899 /* 5900 * Checks if the given GValue contains a GST_TYPE_FRACTION_RANGE value. 5901 * x : 5902 * the GValue to check 5903 */ 5904 // TODO 5905 // #define GST_VALUE_HOLDS_FRACTION_RANGE(x) (G_VALUE_HOLDS((x), gst_fraction_range_get_type ())) 5906 5907 /* 5908 * Checks if the given GValue contains a GST_TYPE_DATE_TIME value. 5909 * x : 5910 * the GValue to check 5911 */ 5912 // TODO 5913 // #define GST_VALUE_HOLDS_DATE_TIME(x) (G_VALUE_HOLDS((x), gst_date_time_get_type ())) 5914 5915 /* 5916 * Checks if the given GValue contains a GST_TYPE_CAPS value. 5917 * x : 5918 * the GValue to check 5919 */ 5920 // TODO 5921 // #define GST_VALUE_HOLDS_CAPS(x) (G_VALUE_HOLDS((x), GST_TYPE_CAPS)) 5922 5923 /* 5924 * Checks if the given GValue contains a GST_TYPE_CAPS_FEATURES value. 5925 * x : 5926 * the GValue to check 5927 */ 5928 // TODO 5929 // #define GST_VALUE_HOLDS_CAPS_FEATURES(x) (G_VALUE_HOLDS((x), GST_TYPE_CAPS_FEATURES)) 5930 5931 /* 5932 * Checks if the given GValue contains a GST_TYPE_STRUCTURE value. 5933 * x : 5934 * the GValue to check 5935 */ 5936 // TODO 5937 // #define GST_VALUE_HOLDS_STRUCTURE(x) (G_VALUE_HOLDS((x), GST_TYPE_STRUCTURE)) 5938 5939 /* 5940 * Checks if the given GValue contains a GST_TYPE_BUFFER value. 5941 * x : 5942 * the GValue to check 5943 */ 5944 // TODO 5945 // #define GST_VALUE_HOLDS_BUFFER(x) (G_VALUE_HOLDS((x), GST_TYPE_BUFFER)) 5946 5947 /* 5948 * Receives a GstBuffer as the value of v. Does not return a reference to 5949 * the buffer, so the pointer is only valid for as long as the caller owns 5950 * a reference to v. 5951 * v : 5952 * a GValue to query 5953 * Returns : 5954 * buffer. [transfer none] 5955 */ 5956 // TODO 5957 // #define gst_value_get_buffer(v) GST_BUFFER_CAST (g_value_get_boxed(v)) 5958 5959 /* 5960 * Sets b as the value of v. Caller retains reference to buffer. 5961 * v : 5962 * a GValue to receive the data 5963 * b : 5964 * a GstBuffer to assign to the GstValue. [transfer none] 5965 */ 5966 // TODO 5967 // #define gst_value_set_buffer(v,b) g_value_set_boxed((v),(b)) 5968 5969 /* 5970 * Sets b as the value of v. Caller gives away reference to buffer. 5971 * v : 5972 * a GValue to receive the data 5973 * b : 5974 * a GstBuffer to assign to the GstValue. [transfer full] 5975 */ 5976 // TODO 5977 // #define gst_value_take_buffer(v,b) g_value_take_boxed(v,(b)) 5978 5979 /* 5980 * Checks if the given GValue contains a GST_TYPE_SAMPLE value. 5981 * x : 5982 * the GValue to check 5983 */ 5984 // TODO 5985 // #define GST_VALUE_HOLDS_SAMPLE(x) (G_VALUE_HOLDS((x), GST_TYPE_SAMPLE)) 5986 5987 /* 5988 * Receives a GstSample as the value of v. Does not return a reference to 5989 * the sample, so the pointer is only valid for as long as the caller owns 5990 * a reference to v. 5991 * v : 5992 * a GValue to query 5993 * Returns : 5994 * sample. [transfer none] 5995 */ 5996 // TODO 5997 // #define gst_value_get_sample(v) GST_SAMPLE_CAST (g_value_get_boxed(v)) 5998 5999 /* 6000 * Sets b as the value of v. Caller retains reference to sample. 6001 * v : 6002 * a GValue to receive the data 6003 * b : 6004 * a GstSample to assign to the GstValue. [transfer none] 6005 */ 6006 // TODO 6007 // #define gst_value_set_sample(v,b) g_value_set_boxed((v),(b)) 6008 6009 /* 6010 * Sets b as the value of v. Caller gives away reference to sample. 6011 * v : 6012 * a GValue to receive the data 6013 * b : 6014 * a GstSample to assign to the GstValue. [transfer full] 6015 */ 6016 // TODO 6017 // #define gst_value_take_sample(v,b) g_value_take_boxed(v,(b)) 6018 6019 /* 6020 * A function that will be called from gst_buffer_foreach_meta(). The meta 6021 * field will point to a the reference of the meta. 6022 * buffer should not be modified from this callback. 6023 * When this function returns TRUE, the next meta will be 6024 * returned. When FALSE is returned, gst_buffer_foreach_meta() will return. 6025 * When meta is set to NULL, the item will be removed from the buffer. 6026 * buffer : 6027 * a GstBuffer 6028 * meta : 6029 * a pointer to a GstMeta 6030 * user_data : 6031 * user data passed to gst_buffer_foreach_meta() 6032 * Returns : 6033 * FALSE when gst_buffer_foreach_meta() should stop 6034 */ 6035 // gboolean (*GstBufferForeachMetaFunc) (GstBuffer *buffer, GstMeta **meta, gpointer user_data); 6036 public alias extern(C) int function(GstBuffer* buffer, GstMeta** meta, void* userData) GstBufferForeachMetaFunc; 6037 6038 /* 6039 * A function that will be called from gst_buffer_list_foreach(). The buffer 6040 * field will point to a the reference of the buffer at idx. 6041 * When this function returns TRUE, the next buffer will be 6042 * returned. When FALSE is returned, gst_buffer_list_foreach() will return. 6043 * When buffer is set to NULL, the item will be removed from the bufferlist. 6044 * When buffer has been made writable, the new buffer reference can be assigned 6045 * to buffer. This function is responsible for unreffing the old buffer when 6046 * removing or modifying. 6047 * buffer : 6048 * pointer the buffer 6049 * idx : 6050 * the index of buffer 6051 * user_data : 6052 * user data passed to gst_buffer_list_foreach() 6053 * Returns : 6054 * FALSE when gst_buffer_list_foreach() should stop 6055 */ 6056 // gboolean (*GstBufferListFunc) (GstBuffer **buffer, guint idx, gpointer user_data); 6057 public alias extern(C) int function(GstBuffer** buffer, uint idx, void* userData) GstBufferListFunc; 6058 6059 /* 6060 * Specifies the type of function passed to gst_bus_add_watch() or 6061 * gst_bus_add_watch_full(), which is called from the mainloop when a message 6062 * is available on the bus. 6063 * The message passed to the function will be unreffed after execution of this 6064 * function so it should not be freed in the function. 6065 * Note that this function is used as a GSourceFunc which means that returning 6066 * FALSE will remove the GSource from the mainloop. 6067 * bus : 6068 * the GstBus that sent the message 6069 * message : 6070 * the GstMessage 6071 * user_data : 6072 * user data that has been given, when registering the handler 6073 * Returns : 6074 * FALSE if the event source should be removed. 6075 */ 6076 // gboolean (*GstBusFunc) (GstBus *bus, GstMessage *message, gpointer user_data); 6077 public alias extern(C) int function(GstBus* bus, GstMessage* message, void* userData) GstBusFunc; 6078 6079 /* 6080 * Handler will be invoked synchronously, when a new message has been injected 6081 * into the bus. This function is mostly used internally. Only one sync handler 6082 * can be attached to a given bus. 6083 * If the handler returns GST_BUS_DROP, it should unref the message, else the 6084 * message should not be unreffed by the sync handler. 6085 * bus : 6086 * the GstBus that sent the message 6087 * message : 6088 * the GstMessage 6089 * user_data : 6090 * user data that has been given, when registering the handler 6091 * Returns : 6092 * GstBusSyncReply stating what to do with the message 6093 */ 6094 // GstBusSyncReply (*GstBusSyncHandler) (GstBus *bus, GstMessage *message, gpointer user_data); 6095 public alias extern(C) GstBusSyncReply function(GstBus* bus, GstMessage* message, void* userData) GstBusSyncHandler; 6096 6097 /* 6098 * The function prototype of the callback. 6099 * clock : 6100 * The clock that triggered the callback 6101 * time : 6102 * The time it was triggered 6103 * id : 6104 * The GstClockID that expired 6105 * user_data : 6106 * user data passed in the gst_clock_id_wait_async() function 6107 * Returns : 6108 * TRUE or FALSE (currently unused) 6109 */ 6110 // gboolean (*GstClockCallback) (GstClock *clock, GstClockTime time, GstClockID id, gpointer user_data); 6111 public alias extern(C) int function(GstClock* clock, GstClockTime time, GstClockID id, void* userData) GstClockCallback; 6112 6113 /* 6114 * Function for returning a value for a given timestamp. 6115 * self : 6116 * the GstControlSource instance 6117 * timestamp : 6118 * timestamp for which a value should be calculated 6119 * value : 6120 * a GValue which will be set to the result. It must be initialized to the correct type. 6121 * Returns : 6122 * TRUE if the value was successfully calculated. 6123 */ 6124 // gboolean (*GstControlSourceGetValue) (GstControlSource *self, GstClockTime timestamp, gdouble *value); 6125 public alias extern(C) int function(GstControlSource* self, GstClockTime timestamp, gdouble* value) GstControlSourceGetValue; 6126 6127 /* 6128 * Function for returning an array of values for starting at a given timestamp. 6129 * self : 6130 * the GstControlSource instance 6131 * timestamp : 6132 * timestamp for which a value should be calculated 6133 * interval : 6134 * the time spacing between subsequent values 6135 * n_values : 6136 * the number of values 6137 * values : 6138 * array to put control-values in 6139 * Returns : 6140 * TRUE if the values were successfully calculated. 6141 */ 6142 // gboolean (*GstControlSourceGetValueArray) (GstControlSource *self, GstClockTime timestamp, GstClockTime interval, guint n_values, gdouble *values); 6143 public alias extern(C) int function(GstControlSource* self, GstClockTime timestamp, GstClockTime interval, uint nValues, gdouble* values) GstControlSourceGetValueArray; 6144 6145 /* 6146 * This function will be called when creating a copy of it and should 6147 * create a copy of all custom iterator fields or increase their 6148 * reference counts. 6149 * it : 6150 * The original iterator 6151 * copy : 6152 * The copied iterator 6153 */ 6154 // void (*GstIteratorCopyFunction) (const GstIterator *it, GstIterator *copy); 6155 public alias extern(C) void function(GstIterator* it, GstIterator* copy) GstIteratorCopyFunction; 6156 6157 /* 6158 * The function that will be called when the next element of the iterator 6159 * should be retrieved. 6160 * Implementors of a GstIterator should implement this 6161 * function and pass it to the constructor of the custom iterator. 6162 * The function will be called with the iterator lock held. 6163 * it : 6164 * the iterator 6165 * result : 6166 * a pointer to hold the next item 6167 * Returns : 6168 * the result of the operation. 6169 */ 6170 // GstIteratorResult (*GstIteratorNextFunction) (GstIterator *it, GValue *result); 6171 public alias extern(C) GstIteratorResult function(GstIterator* it, GValue* result) GstIteratorNextFunction; 6172 6173 /* 6174 * The function that will be called after the next item of the iterator 6175 * has been retrieved. This function can be used to skip items or stop 6176 * the iterator. 6177 * The function will be called with the iterator lock held. 6178 * it : 6179 * the iterator 6180 * item : 6181 * the item being retrieved. 6182 * Returns : 6183 * the result of the operation. 6184 */ 6185 // GstIteratorItem (*GstIteratorItemFunction) (GstIterator *it, const GValue *item); 6186 public alias extern(C) GstIteratorItem function(GstIterator* it, GValue* item) GstIteratorItemFunction; 6187 6188 /* 6189 * This function will be called whenever a concurrent update happened 6190 * to the iterated datastructure. The implementor of the iterator should 6191 * restart the iterator from the beginning and clean up any state it might 6192 * have. 6193 * Implementors of a GstIterator should implement this 6194 * function and pass it to the constructor of the custom iterator. 6195 * The function will be called with the iterator lock held. 6196 * it : 6197 * the iterator 6198 */ 6199 // void (*GstIteratorResyncFunction) (GstIterator *it); 6200 public alias extern(C) void function(GstIterator* it) GstIteratorResyncFunction; 6201 6202 /* 6203 * This function will be called when the iterator is freed. 6204 * Implementors of a GstIterator should implement this 6205 * function and pass it to the constructor of the custom iterator. 6206 * The function will be called with the iterator lock held. 6207 * it : 6208 * the iterator 6209 */ 6210 // void (*GstIteratorFreeFunction) (GstIterator *it); 6211 public alias extern(C) void function(GstIterator* it) GstIteratorFreeFunction; 6212 6213 /* 6214 * A function that is called by gst_iterator_foreach() for every element. 6215 * item : 6216 * The item 6217 * user_data : 6218 * User data 6219 */ 6220 // void (*GstIteratorForeachFunction) (const GValue *item, gpointer user_data); 6221 public alias extern(C) void function(GValue* item, void* userData) GstIteratorForeachFunction; 6222 6223 /* 6224 * A function to be passed to gst_iterator_fold(). 6225 * item : 6226 * the item to fold 6227 * ret : 6228 * a GValue collecting the result 6229 * user_data : 6230 * data passed to gst_iterator_fold() 6231 * Returns : 6232 * TRUE if the fold should continue, FALSE if it should stop. 6233 */ 6234 // gboolean (*GstIteratorFoldFunction) (const GValue *item, GValue *ret, gpointer user_data); 6235 public alias extern(C) int function(GValue* item, GValue* ret, void* userData) GstIteratorFoldFunction; 6236 6237 /* 6238 * Get the memory of mem that can be accessed according to the mode specified 6239 * in flags. The function should return a pointer that contains at least 6240 * maxsize bytes. 6241 * mem : 6242 * a GstMemory 6243 * maxsize : 6244 * size to map 6245 * flags : 6246 * access mode for the memory 6247 * Returns : 6248 * a pointer to memory of which at least maxsize bytes can be 6249 * accessed according to the access pattern in flags. 6250 */ 6251 // gpointer (*GstMemoryMapFunction) (GstMemory *mem, gsize maxsize, GstMapFlags flags); 6252 public alias extern(C) void* function(GstMemory* mem, gsize maxsize, GstMapFlags flags) GstMemoryMapFunction; 6253 6254 /* 6255 * Return the pointer previously retrieved with gst_memory_map(). 6256 * mem : 6257 * a GstMemory 6258 * Returns : 6259 * TRUE on success. 6260 */ 6261 // void (*GstMemoryUnmapFunction) (GstMemory *mem); 6262 public alias extern(C) void function(GstMemory* mem) GstMemoryUnmapFunction; 6263 6264 /* 6265 * Copy size bytes from mem starting at offset and return them wrapped in a 6266 * new GstMemory object. 6267 * If size is set to -1, all bytes starting at offset are copied. 6268 * mem : 6269 * a GstMemory 6270 * offset : 6271 * an offset 6272 * size : 6273 * a size or -1 6274 * Returns : 6275 * a new GstMemory object wrapping a copy of the requested region in 6276 * mem. 6277 */ 6278 // GstMemory * (*GstMemoryCopyFunction) (GstMemory *mem, gssize offset, gssize size); 6279 public alias extern(C) GstMemory * function(GstMemory* mem, gssize offset, gssize size) GstMemoryCopyFunction; 6280 6281 /* 6282 * Share size bytes from mem starting at offset and return them wrapped in a 6283 * new GstMemory object. If size is set to -1, all bytes starting at offset are 6284 * shared. This function does not make a copy of the bytes in mem. 6285 * mem : 6286 * a GstMemory 6287 * offset : 6288 * an offset 6289 * size : 6290 * a size or -1 6291 * Returns : 6292 * a new GstMemory object sharing the requested region in mem. 6293 */ 6294 // GstMemory * (*GstMemoryShareFunction) (GstMemory *mem, gssize offset, gssize size); 6295 public alias extern(C) GstMemory * function(GstMemory* mem, gssize offset, gssize size) GstMemoryShareFunction; 6296 6297 /* 6298 * Check if mem1 and mem2 occupy contiguous memory and return the offset of 6299 * mem1 in the parent buffer in offset. 6300 * mem1 : 6301 * a GstMemory 6302 * mem2 : 6303 * a GstMemory 6304 * offset : 6305 * a result offset 6306 * Returns : 6307 * TRUE if mem1 and mem2 are in contiguous memory. 6308 */ 6309 // gboolean (*GstMemoryIsSpanFunction) (GstMemory *mem1, GstMemory *mem2, gsize *offset); 6310 public alias extern(C) int function(GstMemory* mem1, GstMemory* mem2, gsize* offset) GstMemoryIsSpanFunction; 6311 6312 /* 6313 * Function called when meta is initialized in buffer. 6314 * meta : 6315 * a GstMeta 6316 * params : 6317 * parameters passed to the init function 6318 * buffer : 6319 * a GstBuffer 6320 */ 6321 // gboolean (*GstMetaInitFunction) (GstMeta *meta, gpointer params, GstBuffer *buffer); 6322 public alias extern(C) int function(GstMeta* meta, void* params, GstBuffer* buffer) GstMetaInitFunction; 6323 6324 /* 6325 * Function called when meta is freed in buffer. 6326 * meta : 6327 * a GstMeta 6328 * buffer : 6329 * a GstBuffer 6330 */ 6331 // void (*GstMetaFreeFunction) (GstMeta *meta, GstBuffer *buffer); 6332 public alias extern(C) void function(GstMeta* meta, GstBuffer* buffer) GstMetaFreeFunction; 6333 6334 /* 6335 * Function called for each meta in buffer as a result of performing a 6336 * transformation on transbuf. Additional type specific transform data 6337 * is passed to the function as data. 6338 * Implementations should check the type of the transform and parse 6339 * additional type specific fields in data that should be used to update 6340 * the metadata on transbuf. 6341 * transbuf : 6342 * a GstBuffer 6343 * meta : 6344 * a GstMeta 6345 * buffer : 6346 * a GstBuffer 6347 * type : 6348 * the transform type 6349 * data : 6350 * transform specific data. 6351 * Returns : 6352 * TRUE if the transform could be performed 6353 */ 6354 // gboolean (*GstMetaTransformFunction) (GstBuffer *transbuf, GstMeta *meta, GstBuffer *buffer, GQuark type, gpointer data); 6355 public alias extern(C) int function(GstBuffer* transbuf, GstMeta* meta, GstBuffer* buffer, GQuark type, void* data) GstMetaTransformFunction; 6356 6357 /* 6358 * Function prototype for methods to create copies of instances. 6359 * obj : 6360 * MiniObject to copy 6361 * Returns : 6362 * reference to cloned instance. 6363 */ 6364 // GstMiniObject * (*GstMiniObjectCopyFunction) (const GstMiniObject *obj); 6365 public alias extern(C) GstMiniObject * function(GstMiniObject* obj) GstMiniObjectCopyFunction; 6366 6367 /* 6368 * Function prototype for when a miniobject has lost its last refcount. 6369 * Implementation of the mini object are allowed to revive the 6370 * passed object by doing a gst_mini_object_ref(). If the object is not 6371 * revived after the dispose function, the function should return TRUE 6372 * and the memory associated with the object is freed. 6373 * obj : 6374 * MiniObject to dispose 6375 * Returns : 6376 * TRUE if the object should be cleaned up. 6377 */ 6378 // gboolean (*GstMiniObjectDisposeFunction) (GstMiniObject *obj); 6379 public alias extern(C) int function(GstMiniObject* obj) GstMiniObjectDisposeFunction; 6380 6381 /* 6382 * Virtual function prototype for methods to free ressources used by 6383 * mini-objects. 6384 * obj : 6385 * MiniObject to free 6386 */ 6387 // void (*GstMiniObjectFreeFunction) (GstMiniObject *obj); 6388 public alias extern(C) void function(GstMiniObject* obj) GstMiniObjectFreeFunction; 6389 6390 /* 6391 * A GstMiniObjectNotify function can be added to a mini object as a 6392 * callback that gets triggered when gst_mini_object_unref() drops the 6393 * last ref and obj is about to be freed. 6394 * user_data : 6395 * data that was provided when the notify was added 6396 * obj : 6397 * the mini object 6398 */ 6399 // void (*GstMiniObjectNotify) (gpointer user_data, GstMiniObject *obj); 6400 public alias extern(C) void function(void* userData, GstMiniObject* obj) GstMiniObjectNotify; 6401 6402 /* 6403 * Callback used by gst_pad_sticky_events_foreach(). 6404 * When this function returns TRUE, the next event will be 6405 * returned. When FALSE is returned, gst_pad_sticky_events_foreach() will return. 6406 * When event is set to NULL, the item will be removed from the list of sticky events. 6407 * event can be replaced by assigning a new reference to it. 6408 * This function is responsible for unreffing the old event when 6409 * removing or modifying. 6410 * pad : 6411 * the GstPad. 6412 * event : 6413 * a sticky GstEvent. 6414 * user_data : 6415 * the gpointer to optional user data. 6416 * Returns : 6417 * TRUE if the iteration should continue 6418 */ 6419 // gboolean (*GstPadStickyEventsForeachFunction) (GstPad *pad, GstEvent **event, gpointer user_data); 6420 public alias extern(C) int function(GstPad* pad, GstEvent** event, void* userData) GstPadStickyEventsForeachFunction; 6421 6422 /* 6423 * Callback used by gst_pad_add_probe(). Gets called to notify about the current 6424 * blocking type. 6425 * The callback is allowed to modify the data pointer in info. 6426 * pad : 6427 * the GstPad that is blocked 6428 * info : 6429 * GstPadProbeInfo 6430 * user_data : 6431 * the gpointer to optional user data. 6432 * Returns : 6433 * a GstPadProbeReturn 6434 */ 6435 // GstPadProbeReturn (*GstPadProbeCallback) (GstPad *pad, GstPadProbeInfo *info, gpointer user_data); 6436 public alias extern(C) GstPadProbeReturn function(GstPad* pad, GstPadProbeInfo* info, void* userData) GstPadProbeCallback; 6437 6438 /* 6439 * A function that will be called on sinkpads when chaining buffers. 6440 * The function typically processes the data contained in the buffer and 6441 * either consumes the data or passes it on to the internally linked pad(s). 6442 * The implementer of this function receives a refcount to buffer and should 6443 * gst_buffer_unref() when the buffer is no longer needed. 6444 * When a chain function detects an error in the data stream, it must post an 6445 * error on the bus and return an appropriate GstFlowReturn value. 6446 * pad : 6447 * the sink GstPad that performed the chain. 6448 * parent : 6449 * the parent of pad. If the GST_PAD_FLAG_NEED_PARENT flag is set, 6450 * parent is guaranteed to be not-NULL and remain valid during the 6451 * execution of this function. 6452 * buffer : 6453 * the GstBuffer that is chained, not NULL. 6454 * Returns : 6455 * GST_FLOW_OK for success 6456 */ 6457 // GstFlowReturn (*GstPadChainFunction) (GstPad *pad, GstObject *parent, GstBuffer *buffer); 6458 public alias extern(C) GstFlowReturn function(GstPad* pad, GstObject* parent, GstBuffer* buffer) GstPadChainFunction; 6459 6460 /* 6461 * A function that will be called on sinkpads when chaining buffer lists. 6462 * The function typically processes the data contained in the buffer list and 6463 * either consumes the data or passes it on to the internally linked pad(s). 6464 * The implementer of this function receives a refcount to list and 6465 * should gst_buffer_list_unref() when the list is no longer needed. 6466 * When a chainlist function detects an error in the data stream, it must 6467 * post an error on the bus and return an appropriate GstFlowReturn value. 6468 * pad : 6469 * the sink GstPad that performed the chain. 6470 * parent : 6471 * the parent of pad. If the GST_PAD_FLAG_NEED_PARENT flag is set, 6472 * parent is guaranteed to be not-NULL and remain valid during the 6473 * execution of this function. 6474 * list : 6475 * the GstBufferList that is chained, not NULL. 6476 * Returns : 6477 * GST_FLOW_OK for success 6478 */ 6479 // GstFlowReturn (*GstPadChainListFunction) (GstPad *pad, GstObject *parent, GstBufferList *list); 6480 public alias extern(C) GstFlowReturn function(GstPad* pad, GstObject* parent, GstBufferList* list) GstPadChainListFunction; 6481 6482 /* 6483 * This function will be called on source pads when a peer element 6484 * request a buffer at the specified offset and length. If this function 6485 * returns GST_FLOW_OK, the result buffer will be stored in buffer. The 6486 * contents of buffer is invalid for any other return value. 6487 * This function is installed on a source pad with 6488 * gst_pad_set_getrange_function() and can only be called on source pads after 6489 * they are successfully activated with gst_pad_activate_mode() with the 6490 * GST_PAD_MODE_PULL. 6491 * offset and length are always given in byte units. offset must normally be a value 6492 * between 0 and the length in bytes of the data available on pad. The 6493 * length (duration in bytes) can be retrieved with a GST_QUERY_DURATION or with a 6494 * GST_QUERY_SEEKING. 6495 * Any offset larger or equal than the length will make the function return 6496 * GST_FLOW_EOS, which corresponds to EOS. In this case buffer does not 6497 * contain a valid buffer. 6498 * The buffer size of buffer will only be smaller than length when offset is 6499 * near the end of the stream. In all other cases, the size of buffer must be 6500 * exactly the requested size. 6501 * It is allowed to call this function with a 0 length and valid offset, in 6502 * which case buffer will contain a 0-sized buffer and the function returns 6503 * GST_FLOW_OK. 6504 * When this function is called with a -1 offset, the sequentially next buffer 6505 * of length length in the stream is returned. 6506 * When this function is called with a -1 length, a buffer with a default 6507 * optimal length is returned in buffer. The length might depend on the value 6508 * of offset. 6509 * pad : 6510 * the src GstPad to perform the getrange on. 6511 * parent : 6512 * the parent of pad. If the GST_PAD_FLAG_NEED_PARENT flag is set, 6513 * parent is guaranteed to be not-NULL and remain valid during the 6514 * execution of this function. 6515 * offset : 6516 * the offset of the range 6517 * length : 6518 * the length of the range 6519 * buffer : 6520 * a memory location to hold the result buffer, cannot be NULL. 6521 * Returns : 6522 * GST_FLOW_OK for success and a valid buffer in buffer. Any other 6523 * return value leaves buffer undefined. 6524 */ 6525 // GstFlowReturn (*GstPadGetRangeFunction) (GstPad *pad, GstObject *parent, guint64 offset, guint length, GstBuffer **buffer); 6526 public alias extern(C) GstFlowReturn function(GstPad* pad, GstObject* parent, ulong offset, uint length, GstBuffer** buffer) GstPadGetRangeFunction; 6527 6528 /* 6529 * Function signature to handle an event for the pad. 6530 * pad : 6531 * the GstPad to handle the event. 6532 * parent : 6533 * the parent of pad. If the GST_PAD_FLAG_NEED_PARENT flag is set, 6534 * parent is guaranteed to be not-NULL and remain valid during the 6535 * execution of this function. 6536 * event : 6537 * the GstEvent to handle. 6538 * Returns : 6539 * TRUE if the pad could handle the event. 6540 */ 6541 // gboolean (*GstPadEventFunction) (GstPad *pad, GstObject *parent, GstEvent *event); 6542 public alias extern(C) int function(GstPad* pad, GstObject* parent, GstEvent* event) GstPadEventFunction; 6543 6544 /* 6545 * Function signature to handle a new link on the pad. 6546 * pad : 6547 * the GstPad that is linked. 6548 * parent : 6549 * the parent of pad. If the GST_PAD_FLAG_NEED_PARENT flag is set, 6550 * parent is guaranteed to be not-NULL and remain valid during the 6551 * execution of this function. 6552 * peer : 6553 * the peer GstPad of the link 6554 * Returns : 6555 * the result of the link with the specified peer. 6556 */ 6557 // GstPadLinkReturn (*GstPadLinkFunction) (GstPad *pad, GstObject *parent, GstPad *peer); 6558 public alias extern(C) GstPadLinkReturn function(GstPad* pad, GstObject* parent, GstPad* peer) GstPadLinkFunction; 6559 6560 /* 6561 * Function signature to handle a unlinking the pad prom its peer. 6562 * pad : 6563 * the GstPad that is linked. 6564 * parent : 6565 * the parent of pad. If the GST_PAD_FLAG_NEED_PARENT flag is set, 6566 * parent is guaranteed to be not-NULL and remain valid during the 6567 * execution of this function. 6568 */ 6569 // void (*GstPadUnlinkFunction) (GstPad *pad, GstObject *parent); 6570 public alias extern(C) void function(GstPad* pad, GstObject* parent) GstPadUnlinkFunction; 6571 6572 /* 6573 * This function is called when the pad is activated during the element 6574 * READY to PAUSED state change. By default this function will call the 6575 * activate function that puts the pad in push mode but elements can 6576 * override this function to activate the pad in pull mode if they wish. 6577 * pad : 6578 * a GstPad 6579 * parent : 6580 * the parent of pad 6581 * Returns : 6582 * TRUE if the pad could be activated. 6583 */ 6584 // gboolean (*GstPadActivateFunction) (GstPad *pad, GstObject *parent); 6585 public alias extern(C) int function(GstPad* pad, GstObject* parent) GstPadActivateFunction; 6586 6587 /* 6588 * The prototype of the push and pull activate functions. 6589 * pad : 6590 * a GstPad 6591 * parent : 6592 * the parent of pad 6593 * mode : 6594 * the requested activation mode of pad 6595 * active : 6596 * activate or deactivate the pad. 6597 * Returns : 6598 * TRUE if the pad could be activated or deactivated. 6599 */ 6600 // gboolean (*GstPadActivateModeFunction) (GstPad *pad, GstObject *parent, GstPadMode mode, gboolean active); 6601 public alias extern(C) int function(GstPad* pad, GstObject* parent, GstPadMode mode, int active) GstPadActivateModeFunction; 6602 6603 /* 6604 * The signature of the query function. 6605 * pad : 6606 * the GstPad to query. 6607 * parent : 6608 * the parent of pad. If the GST_PAD_FLAG_NEED_PARENT flag is set, 6609 * parent is guaranteed to be not-NULL and remain valid during the 6610 * execution of this function. 6611 * query : 6612 * the GstQuery object to execute 6613 * Returns : 6614 * TRUE if the query could be performed. 6615 */ 6616 // gboolean (*GstPadQueryFunction) (GstPad *pad, GstObject *parent, GstQuery *query); 6617 public alias extern(C) int function(GstPad* pad, GstObject* parent, GstQuery* query) GstPadQueryFunction; 6618 6619 /* 6620 * The signature of the internal pad link iterator function. 6621 * pad : 6622 * The GstPad to query. 6623 * parent : 6624 * the parent of pad. If the GST_PAD_FLAG_NEED_PARENT flag is set, 6625 * parent is guaranteed to be not-NULL and remain valid during the 6626 * execution of this function. 6627 * Returns : 6628 * a new GstIterator that will iterate over all pads that are 6629 * linked to the given pad on the inside of the parent element. 6630 * the caller must call gst_iterator_free() after usage. 6631 */ 6632 // GstIterator * (*GstPadIterIntLinkFunction) (GstPad *pad, GstObject *parent); 6633 public alias extern(C) GstIterator * function(GstPad* pad, GstObject* parent) GstPadIterIntLinkFunction; 6634 6635 /* 6636 * A forward function is called for all internally linked pads, see 6637 * gst_pad_forward(). 6638 * pad : 6639 * the GstPad that is forwarded. 6640 * user_data : 6641 * the gpointer to optional user data. 6642 * Returns : 6643 * TRUE if the dispatching procedure has to be stopped. 6644 */ 6645 // gboolean (*GstPadForwardFunction) (GstPad *pad, gpointer user_data); 6646 public alias extern(C) int function(GstPad* pad, void* userData) GstPadForwardFunction; 6647 6648 /* 6649 * A plugin should provide a pointer to a function of this type in the 6650 * plugin_desc struct. 6651 * This function will be called by the loader at startup. One would then 6652 * register each GstPluginFeature. 6653 * plugin : 6654 * The plugin object 6655 * Returns : 6656 * TRUE if plugin initialised successfully 6657 */ 6658 // gboolean (*GstPluginInitFunc) (GstPlugin *plugin); 6659 public alias extern(C) int function(GstPlugin* plugin) GstPluginInitFunc; 6660 6661 /* 6662 * A plugin should provide a pointer to a function of either GstPluginInitFunc 6663 * or this type in the plugin_desc struct. 6664 * The function will be called by the loader at startup. One would then 6665 * register each GstPluginFeature. This version allows 6666 * user data to be passed to init function (useful for bindings). 6667 * plugin : 6668 * The plugin object 6669 * user_data : 6670 * extra data 6671 * Returns : 6672 * TRUE if plugin initialised successfully 6673 */ 6674 // gboolean (*GstPluginInitFullFunc) (GstPlugin *plugin, gpointer user_data); 6675 public alias extern(C) int function(GstPlugin* plugin, void* userData) GstPluginInitFullFunc; 6676 6677 /* 6678 * A function that can be used with e.g. gst_registry_plugin_filter() 6679 * to get a list of plugins that match certain criteria. 6680 * plugin : 6681 * the plugin to check 6682 * user_data : 6683 * the user_data that has been passed on e.g. gst_registry_plugin_filter() 6684 * Returns : 6685 * TRUE for a positive match, FALSE otherwise 6686 */ 6687 // gboolean (*GstPluginFilter) (GstPlugin *plugin, gpointer user_data); 6688 public alias extern(C) int function(GstPlugin* plugin, void* userData) GstPluginFilter; 6689 6690 /* 6691 * A function that can be used with e.g. gst_registry_feature_filter() 6692 * to get a list of pluginfeature that match certain criteria. 6693 * feature : 6694 * the pluginfeature to check 6695 * user_data : 6696 * the user_data that has been passed on e.g. 6697 * gst_registry_feature_filter() 6698 * Returns : 6699 * TRUE for a positive match, FALSE otherwise 6700 */ 6701 // gboolean (*GstPluginFeatureFilter) (GstPluginFeature *feature, gpointer user_data); 6702 public alias extern(C) int function(GstPluginFeature* feature, void* userData) GstPluginFeatureFilter; 6703 6704 /* 6705 * A function that will be called in gst_structure_foreach(). The function may 6706 * not modify value. 6707 * field_id : 6708 * the GQuark of the field name 6709 * value : 6710 * the GValue of the field 6711 * user_data : 6712 * user data 6713 * Returns : 6714 * TRUE if the foreach operation should continue, FALSE if 6715 * the foreach operation should stop with FALSE. 6716 */ 6717 // gboolean (*GstStructureForeachFunc) (GQuark field_id, const GValue *value, gpointer user_data); 6718 public alias extern(C) int function(GQuark fieldId, GValue* value, void* userData) GstStructureForeachFunc; 6719 6720 /* 6721 * A function that will be called in gst_structure_map_in_place(). The function 6722 * may modify value. 6723 * field_id : 6724 * the GQuark of the field name 6725 * value : 6726 * the GValue of the field 6727 * user_data : 6728 * user data 6729 * Returns : 6730 * TRUE if the map operation should continue, FALSE if 6731 * the map operation should stop with FALSE. 6732 */ 6733 // gboolean (*GstStructureMapFunc) (GQuark field_id, GValue *value, gpointer user_data); 6734 public alias extern(C) int function(GQuark fieldId, GValue* value, void* userData) GstStructureMapFunc; 6735 6736 /* 6737 * A function that will be called in gst_tag_list_foreach(). The function may 6738 * not modify the tag list. 6739 * list : 6740 * the GstTagList 6741 * tag : 6742 * a name of a tag in list 6743 * user_data : 6744 * user data 6745 */ 6746 // void (*GstTagForeachFunc) (const GstTagList *list, const gchar *tag, gpointer user_data); 6747 public alias extern(C) void function(GstTagList* list, char* tag, void* userData) GstTagForeachFunc; 6748 6749 /* 6750 * A function for merging multiple values of a tag used when registering 6751 * tags. 6752 * dest : 6753 * the destination GValue 6754 * src : 6755 * the source GValue 6756 */ 6757 // void (*GstTagMergeFunc) (GValue *dest, const GValue *src); 6758 public alias extern(C) void function(GValue* dest, GValue* src) GstTagMergeFunc; 6759 6760 /* 6761 * A function that will repeatedly be called in the thread created by 6762 * a GstTask. 6763 * user_data : 6764 * user data passed to the function 6765 */ 6766 // void (*GstTaskFunction) (gpointer user_data); 6767 public alias extern(C) void function(void* userData) GstTaskFunction; 6768 6769 /* 6770 * Custom GstTask thread callback functions that can be installed. 6771 * task : 6772 * The GstTask 6773 * thread : 6774 * The GThread 6775 * user_data : 6776 * user data 6777 */ 6778 // void (*GstTaskThreadFunc) (GstTask *task, GThread *thread, gpointer user_data); 6779 public alias extern(C) void function(GstTask* task, GThread* thread, void* userData) GstTaskThreadFunc; 6780 6781 /* 6782 * Task function, see gst_task_pool_push(). 6783 * user_data : 6784 * user data for the task function 6785 */ 6786 // void (*GstTaskPoolFunction) (void *user_data); 6787 public alias extern(C) void function(void* userData) GstTaskPoolFunction; 6788 6789 /* 6790 * A function that will be called by typefinding. 6791 * find : 6792 * A GstTypeFind structure 6793 * user_data : 6794 * optionnal data to pass to the function 6795 */ 6796 // void (*GstTypeFindFunction) (GstTypeFind *find, gpointer user_data); 6797 public alias extern(C) void function(GstTypeFind* find, void* userData) GstTypeFindFunction; 6798 6799 /* 6800 * Used together with gst_value_compare() to compare GValue items. 6801 * value1 : 6802 * first value for comparison 6803 * value2 : 6804 * second value for comparison 6805 * Returns : 6806 * one of GST_VALUE_LESS_THAN, GST_VALUE_EQUAL, GST_VALUE_GREATER_THAN 6807 * or GST_VALUE_UNORDERED 6808 */ 6809 // gint (*GstValueCompareFunc) (const GValue *value1, const GValue *value2); 6810 public alias extern(C) int function(GValue* value1, GValue* value2) GstValueCompareFunc; 6811 6812 /* 6813 * Used by gst_value_serialize() to obtain a non-binary form of the GValue. 6814 * Free-function: g_free 6815 * value1 : 6816 * a GValue 6817 * Returns : 6818 * the string representation of the value. [transfer full] 6819 */ 6820 // gchar * (*GstValueSerializeFunc) (const GValue *value1); 6821 public alias extern(C) char * function(GValue* value1) GstValueSerializeFunc; 6822 6823 /* 6824 * Used by gst_value_deserialize() to parse a non-binary form into the GValue. 6825 * dest : 6826 * a GValue 6827 * s : 6828 * a string 6829 * Returns : 6830 * TRUE for success 6831 */ 6832 // gboolean (*GstValueDeserializeFunc) (GValue *dest, const gchar *s); 6833 public alias extern(C) int function(GValue* dest, char* s) GstValueDeserializeFunc;