2 # This file is part of gstreamerD.
4 # gstreamerD is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU Lesser General Public License as published by
6 # the Free Software Foundation; either version 2.1 of the License, or
7 # (at your option) any later version.
9 # gstreamerD is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU Lesser General Public License for more details.
14 # You should have received a copy of the GNU Lesser General Public License
15 # along with gstreamerD; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 # Definitions for wrapping GStreamer
28 #Notes for the gstreamerD developer:
29 #The work on wrapping gstreamerD automatically isn't complete yet.
30 #At the moment gstreamerc/gstreamer.d and gstreamerc/gstreamertypes.d
31 #have to be copied from hand edited versions from wrap/.
32 #The copying is done automatically in APILookup.txt
33 #Also GstGhostPad.d has to have it's constructor adjusted by hand,
34 #and this isn't done automatically. You should replace Pad* with GstPad*.
35 #I have no idea why GtkWrapper is doing that.
36 #Also it creates two unnecessary files gstreamerc/lib.d gstreamerc/libtypes.d
37 #which have to be removed by hand.
41 # These are enums for gstreamer. There should be a way for these to be moved to APILookupGStreamer.txt.
42 # currently it just hangs up. These don't work for the moment.
43 #enumType: GST_ELEMENT_FLAG_LAST GstElementFlags.FLAG_LAST
47 private import gtkc.glibtypes;
48 private import gtkc.gobjecttypes;
49 private import gtkc.gthreadtypes;
50 private import glib.Str;
54 #private import gstreamerc.gstreamertypes;
55 #private import gstreamerc.gstreamer;
66 # * Base class for refcounted lightweight objects.
67 # * GTypeInstance instance;
69 # public struct GstMiniObject
71 # GTypeInstance instanc;
72 # //< public >// with COW
73 # int refcount;//gint refcount;
74 # uint flags;//guint flags;
77 # gpointer _gst_reserved;
82 # GstMiniObject mini_object;
84 # /*< private > *//* with MESSAGE_LOCK */
85 # GMutex* lock; /* lock and cond for async delivery */
88 # /*< public > *//* with COW */
89 # GstMessageType type;
90 # ulong timestamp;//guint64 timestamp;
93 # GstStructure* structure;
96 # gpointer _gst_reserved[GST_PADDING];
111 /***** default padding of structures *****/
112 const long GST_PADDING = 4;
113 //#define GST_PADDING_INIT {0}
115 /***** padding for very extensible base classes *****/
116 const long GST_PADDING_LARGE = 20;
118 //These times might be clean to define as GstClockTimes instead of long (maybe):
120 //#define G_USEC_PER_SEC 1000000 //This should be in glib...
121 const ulong G_USEC_PER_SEC = 1000000uL;
122 //#define GST_SECOND (G_USEC_PER_SEC * G_GINT64_CONSTANT (1000))
123 const ulong GST_SECOND = (G_USEC_PER_SEC * 1000uL);
125 public alias GST_SECOND SECOND;
127 //This one is an undefined GstClockTime. How can this be ulong???
128 //I guess it should be long...???
129 //#define GST_CLOCK_TIME_NONE ((GstClockTime) -1)
130 const long GST_CLOCK_TIME_NONE = -1L;
131 public alias GST_CLOCK_TIME_NONE CLOCK_TIME_NONE;
136 # must start with wrap
141 ###########################################################
142 ### GStreamer #############################################
143 ###########################################################
145 file: gstreamer-Gst.html
154 * Call this function before using any other GStreamer functions in your applications.
156 public static void init(char[][] args) //public static void init(int* argc, char**[] argv)
158 char** argv = cast(char**) new char*[args.length];
160 foreach (char[] p; args)
162 argv[argc++] = cast(char*)p;
165 gst_init(&argc, null);//cast(char**[])&argv);
177 import: gstreamer.Element
178 import: gstreamer.Iterator
182 * Creates a new bin with the given name.
184 * the name of the new bin
188 public this(char[] name)
190 // GstElement* gst_bin_new (const gchar *name);
191 this( cast(GstBin*) gst_bin_new(Str.toStringz(name)) );
194 public this(Element elem)
196 super( elem.getElementStruct() );
197 this.gstBin = cast(GstBin*)elem.getElementStruct();
200 structWrap: GstBin* Bin
201 structWrap: GstElement* Element
202 structWrap: GstIterator* Iterator
203 #... addMany and removeMany
206 file: gstreamer-GstBuffer.html
212 import: gstreamer.Caps
213 structWrap: GstBuffer* Buffer
214 structWrap: GstCaps* Caps
223 import: gstreamer.Message
225 structWrap: GstBus* Bus
226 structWrap: GstMessage* Message
227 structWrap: GSource* Source
228 nocode: gst_bus_add_watch
231 * Adds a bus watch to the default main context with the default priority.
232 * This function is used to receive asynchronous messages in the main loop.
233 * The watch can be removed using g_source_remove() or by returning FALSE
236 * a GstBus to create the watch for
238 * A function to call when a message is received.
240 * user data passed to func.
242 * The event source id.
245 public uint addWatch( bool delegate(Message) dlg )
247 onWatchListener = dlg;
248 return gst_bus_add_watch(gstBus, cast(GstBusFunc)&watchCallBack, this);
251 bool delegate(Message) onWatchListener;
253 extern(C) static gboolean watchCallBack(GstBus* bus, GstMessage* msg, Bus bus_d )//gpointer data)
255 Message msg_d = new Message( msg );
257 return bus_d.onWatchListener( msg_d );
262 file: gstreamer-GstCaps.html
268 import: gstreamer.Structure
270 nocode: gst_caps_save_thyself
271 nocode: gst_caps_load_thyself
272 nocode: gst_caps_new_any
275 * Creates a new GstCaps that indicates that it is compatible with
280 public static Caps newAny()
282 // GstCaps* gst_caps_new_any (void);
283 return new Caps(cast(GstCaps*)gst_caps_new_any() );
286 structWrap: GstCaps* Caps
287 structWrap: GstStructure* Structure
288 #TODO: take a look at replace and it's GstCaps**
291 #file: gstreamer-GstChildProxy.html
292 #class: GstChildProxy
293 #prefix: gst_child_proxy_
294 #import: gstreamer.ObjectGst;
295 #structWrap: GstObject* ObjectGst
304 structWrap: GstClock* Clock
307 file: GstElement.html
314 #prefix: GST_STATE_CHANGE_
315 #prefix: GST_STATE_ GstState.
319 import: gstreamer.Pad
320 import: gstreamer.Clock
321 import: gstreamer.Caps
322 import: gstreamer.Iterator
323 import: gstreamer.Index
324 import: gstreamer.TagList
325 import: gstreamer.Message
326 import: gstreamer.Query
327 #import: gstreamer.Format
328 import: gstreamer.Event
329 import: gstreamer.Bus
330 structWrap: GstBus* Bus
331 #import: gstreamer.QueryType
333 #import: gobject.ObjectG
334 #structWrap: GObject* ObjectG
335 #I tried this instead:
336 structWrap: GObject* Pad
337 structWrap: GstElement* Element
338 structWrap: GstPad* Pad
339 structWrap: GstClock* Clock
340 structWrap: GstCaps* Caps
341 structWrap: GstIterator* Iterator
342 structWrap: GstIndex* Index
343 structWrap: GstTagList* TagList
344 structWrap: GstMessage* Message
345 structWrap: GstQuery* Query
346 #structWrap: GstFormat* Format
347 #structWrap: GstFormat Format
348 structWrap: GstEvent* Event
349 #structWrap: GstQueryType* QueryType
351 #where's GList: structWrap: GList
353 #structWrap: GdkCursor* Cursor
354 #nocode: pad-added #this doesn't seem to work.
357 * Queries an element for the stream position.
358 * This is a convenience function for gstreamerD.
360 * The current position in nanoseconds - GstFormat.TIME.
362 public long queryPosition()
364 GstFormat form = GstFormat.TIME;
366 queryPosition( &form, &cur_pos );
371 * Queries an element for the stream duration.
372 * This is a convenience function for gstreamerD.
374 * The duration in nanoseconds - GstFormat.TIME.
376 public long queryDuration()
378 GstFormat form = GstFormat.TIME;
380 queryDuration( &form, &cur_dur );
385 * This set's the filename for a filesrc element.
387 public void location( char[] set )
389 //g_object_set( G_OBJECT(getElementStruct()), "location", set, NULL);
390 setProperty("location", set);
394 * Set the caps property of an Element.
398 g_object_set( getElementStruct(), Str.toStringz("caps"), cp.getCapsStruct(), null );
402 * For your convenience in gstreamerD: you can seek to the
403 * position of the pipeline measured in time_nanoseconds.
405 public int seek( ulong time_nanoseconds ) //gint64
407 return seek( 1.0, GstFormat.TIME, GstSeekFlags.FLUSH,
408 GstSeekType.SET, time_nanoseconds,
409 GstSeekType.NONE, GST_CLOCK_TIME_NONE);
413 * Get's all the pads from an element in a Pad[]. FIXME: This a hackish mess.
417 Pad[] result = new Pad[0];
419 Iterator iter = iteratePads();
420 GstPad* obu_c = null;
421 iter.next( cast(void**) &obu_c );
422 while( obu_c !is null )
424 Pad tmpobu = new Pad( obu_c );
425 //writefln( "iterating Padname: ", tmpobu.getName() );
426 result.length = result.length + 1;
427 result[result.length-1] = tmpobu;
430 iter.next( cast(void**) &obu_c );
432 //writefln("no more pads.");
436 //HANDEDIT: This is a way to add disconnectOnPadAdded
437 //There still doesn't seem to be a way to put it
438 //there automatically...
440 protected uint padAddedHandlerId;
441 void delegate(Pad, Element)[] onPadAddedListeners;
442 void addOnPadAdded(void delegate(Pad, Element) dlg)
444 if ( !("pad-added" in connectedSignals) )
446 padAddedHandlerId = Signals.connectData(
449 cast(GCallback)&callBackPadAdded,
452 cast(ConnectFlags)0);
453 connectedSignals["pad-added"] = 1;
455 onPadAddedListeners ~= dlg;
457 extern(C) static void callBackPadAdded(GstElement* gstelementStruct, GObject* newPad, Element element)
459 bool consumed = false;
461 foreach ( void delegate(Pad, Element) dlg ; element.onPadAddedListeners )
463 dlg(new Pad(newPad), element);
468 void disconnectOnPadAdded()
470 if( "pad-added" in connectedSignals )
472 Signals.handlerDisconnect( getStruct(), padAddedHandlerId );
473 padAddedHandlerId = 0;
474 connectedSignals["pad-added"] = 0;
475 onPadAddedListeners = null;
482 file: GstElementFactory.html
483 struct: GstElementFactory
484 class: ElementFactory
485 prefix: gst_element_factory_
489 import: gstreamer.Element
490 import: gstreamer.Plugin
491 import: gstreamer.Caps
495 * Create a new element of the type defined by the given element factory.
496 * The element will receive a guaranteed unique name,
497 * consisting of the element factory name and a number.
499 * a named factory to instantiate
501 * new GstElement or NULL if unable to create element
503 public static Element make( char[] factoryname )
505 // GstElement* gst_element_factory_make (const gchar *factoryname, const gchar *name);
506 return new Element( gst_element_factory_make(Str.toStringz(factoryname), null ) );
509 structWrap: GstElementFactory* ElementFactory
510 structWrap: GstElement* Element
511 structWrap: GstPlugin* Plugin
512 structWrap: GstCaps* Caps
513 structWrap: GList* ListG
514 outFile: ElementFactory
516 file: gstreamer-GstEvent.html
521 #This might not be necessary:
522 nocode: gst_event_new_buffer_size
525 * Create a new buffersize event. The event is sent downstream and notifies
526 * elements that they should provide a buffer of the specified dimensions.
527 * When the async flag is set, a thread boundary is prefered.
531 * minimum buffer size
533 * maximum buffer size
539 public static Event newBufferSize(GstFormat format, long minsize, long maxsize, int async)
541 // GstEvent* gst_event_new_buffer_size (GstFormat format, gint64 minsize, gint64 maxsize, gboolean async);
542 return new Event(cast(GstEvent*)gst_event_new_buffer_size(format, minsize, maxsize, async) );
545 nocode: gst_event_new_eos
548 * Create a new EOS event. The eos event can only travel downstream
549 * synchronized with the buffer flow. Elements that receive the EOS
550 * event on a pad can return UNEXPECTED as a GstFlowReturn when data
551 * after the EOS event arrives.
552 * The EOS event will travel down to the sink elements in the pipeline
553 * which will then post the GST_MESSAGE_EOS on the bus after they have
554 * finished playing any buffered data.
555 * When all sinks have posted an EOS message, the EOS message is
556 * forwarded to the application.
560 public static Event newEOS()
562 // GstEvent* gst_event_new_eos (void);
563 return new Event(cast(GstEvent*)gst_event_new_eos() );
566 nocode: gst_event_new_flush_start
569 * Allocate a new flush start event. The flush start event can be send
570 * upstream and downstream and travels out-of-bounds with the dataflow.
571 * It marks pads as being in a WRONG_STATE to process more data.
572 * Elements unlock and blocking functions and exit their streaming functions
573 * as fast as possible.
574 * This event is typically generated after a seek to minimize the latency
577 * A new flush start event.
579 public static Event newFlushStart()
581 // GstEvent* gst_event_new_flush_start (void);
582 return new Event(cast(GstEvent*)gst_event_new_flush_start() );
585 nocode: gst_event_new_flush_stop
588 * Allocate a new flush stop event. The flush start event can be send
589 * upstream and downstream and travels out-of-bounds with the dataflow.
590 * It is typically send after sending a FLUSH_START event to make the
591 * pads accept data again.
592 * Elements can process this event synchronized with the dataflow since
593 * the preceeding FLUSH_START event stopped the dataflow.
594 * This event is typically generated to complete a seek and to resume
597 * A new flush stop event.
599 public static Event newFlushStop()
601 // GstEvent* gst_event_new_flush_stop (void);
602 return new Event(cast(GstEvent*)gst_event_new_flush_stop() );
605 nocode: gst_event_new_navigation
608 * Create a new navigation event from the given description.
610 * description of the event
614 public static Event newNavigation(Structure structure)
616 // GstEvent* gst_event_new_navigation (GstStructure *structure);
617 return new Event(cast(GstEvent*)gst_event_new_navigation((structure is null) ? null : structure.getStructureStruct()) );
621 import: gstreamer.Structure
622 #import: gstreamer.Format
623 import: gstreamer.TagList
624 import: gstreamer.MiniObject
625 structWrap: GstEvent* Event
626 structWrap: GstStructure* Structure
627 #structWrap: GstFormat* Format
628 structWrap: GstTagList* TagList
629 structWrap: GstMiniObject* MiniObject
630 structWrap: GstMiniObject MiniObject
633 file: gstreamer-GstFormat.html
637 import: gstreamer.Iterator
640 #structWrap: GstFormat* Format
641 structWrap: GstIterator* Iterator
644 file: gstreamer-GstGError.html
649 #HANDEDIT: For some reason GtkWrapper does the constructor wrong
650 #with GstGhostPad. You have to hand edit it to look like this:
652 # * Sets our main struct and passes it to the parent class
654 # public this (GstGhostPad* gstGhostPad)
656 # super(cast(GstPad*)gstGhostPad);
657 # this.gstGhostPad = gstGhostPad;
659 file: GstGhostPad.html
663 prefix: gst_ghost_pad_
666 import: gstreamer.Pad
667 structWrap: GstGhostPad* GhostPad
668 #structWrap: GstProxyPad* ProxyPad
669 structWrap: GstPad* Pad
670 nocode: gst_ghost_pad_new
673 * Create a new ghostpad with target as the target. The direction and
674 * padtemplate will be taken from the target pad.
675 * Will ref the target.
677 * the name of the new pad, or NULL to assign a default name.
681 * a new GstPad, or NULL in case of an error.
683 public this(char[] name, Pad target)
685 // GstPad* gst_ghost_pad_new (const gchar *name, GstPad *target);
686 this( cast(GstGhostPad*) gst_ghost_pad_new(Str.toStringz(name), (target is null) ? null : target.getPadStruct()) );
698 import: gstreamer.ObjectGst
699 #import: gstreamer.Format
700 structWrap: GstIndex* Index
701 structWrap: GstObject* ObjectGst
702 #structWrap: GstFormat Format
705 file: GstIndexFactory.html
706 struct: GstIndexFactory
708 prefix: gst_index_factory_
711 import: gstreamer.Index
712 structWrap: GstIndexFactory* IndexFactory
713 structWrap: GstIndex* Index
714 outFile: IndexFactory
716 file: gstreamer-GstIterator.html
719 prefix: gst_iterator_
724 structWrap: GstIterator* Iterator
735 nocode: gst_pad_load_and_link
737 import: gstreamer.Element
738 import: gstreamer.MiniObject
739 import: gstreamer.PadTemplate
740 import: gstreamer.Caps
741 import: gstreamer.Buffer
742 import: gstreamer.Event
743 import: gstreamer.Query
744 #import: gstreamer.Format
746 structWrap: GstPad* Pad
747 structWrap: GstElement* Element
748 structWrap: GstMiniObject* MiniObject
749 structWrap: GstPadTemplate* PadTemplate
750 structWrap: GstCaps* Caps
751 structWrap: GstBuffer* Buffer
752 structWrap: GstEvent* Event
753 structWrap: GstQuery* Query
754 #structWrap: GstFormat* Format
755 #structWrap: GstFormat Format
756 structWrap: GList* ListG
757 #import: gtkc.gobject
760 * Sets our main struct and passes it to the parent class.
761 * This one is additional to make gstreamer.Element addOnPadAdded()
762 * working without changes.
764 public this (GObject* gstPad)
766 super(cast(GstObject*)gstPad);
767 this.gstPad = cast(GstPad*) gstPad;
771 * Queries a pad for the stream position.
772 * This is a convenience function for gstreamerD.
774 * The current position in nanoseconds - GstFormat.TIME.
776 public long queryPosition()
778 GstFormat form = GstFormat.TIME;
780 queryPosition( &form, &cur_pos );
785 * Queries a pad for the stream duration.
786 * This is a convenience function for gstreamerD.
788 * The duration in nanoseconds - GstFormat.TIME.
790 public long queryDuration()
792 GstFormat form = GstFormat.TIME;
794 queryDuration( &form, &cur_dur );
801 file: gstreamer-GstMessage.html
806 nocode: gst_message_parse_tag
807 #I'm not so sure about the following:
808 nocode: gst_message_type_to_quark
809 nocode: gst_message_new_element
810 nocode: gst_message_new_new_clock
811 nocode: gst_message_new_segment_done
812 nocode: gst_message_new_segment_start
813 nocode: gst_message_new_warning
814 nocode: gst_message_new_state_dirty
815 nocode: gst_message_new_eos
816 nocode: gst_message_new_error
817 nocode: gst_message_new_info
818 #This is a way to get the type of the message:
821 * Get the type of the message.
823 public GstMessageType type()
825 return getMessageStruct().type;
829 * Get the src (the element that originated the message) of the message.
831 public ObjectGst src()
833 return new ObjectGst( cast(GstObject*)getMessageStruct().src );
839 public Structure structure()
841 return new Structure( getMessageStruct().structure );
845 * Extracts the tag list from the GstMessage. The tag list returned in the
846 * output argument is a copy; the caller must free it when done.
849 * A valid GstMessage of type GST_MESSAGE_TAG.
851 * Return location for the tag-list.
853 /*public void parseTag(GstTagList** tagList)
855 // void gst_message_parse_tag (GstMessage *message, GstTagList **tag_list);
856 gst_message_parse_tag(gstMessage, tagList);
858 public TagList parseTag()
860 // void gst_message_parse_tag (GstMessage *message, GstTagList **tag_list);
861 GstTagList* tag_list_c;
862 gst_message_parse_tag(gstMessage, &tag_list_c);
863 return new TagList(tag_list_c);
866 //I'm not so sure about the following:
868 * Get the unique quark for the given message type.
872 * the quark associated with the message type
874 public static Quark typeToQuark(GstMessageType type)
876 // GQuark gst_message_type_to_quark (GstMessageType type);
877 return new Quark( cast(uint*)gst_message_type_to_quark(type) );
881 * Create a new element-specific message. This is meant as a generic way of
882 * allowing one-way communication from an element to an application, for example
883 * "the firewire cable was unplugged". The format of the message should be
884 * documented in the element's documentation. The structure field can be NULL.
886 * The object originating the message.
888 * The structure for the message. The message will take ownership of
891 * The new element message.
894 public static Message newElement(ObjectGst src, Structure structure)
896 // GstMessage* gst_message_new_element (GstObject *src, GstStructure *structure);
897 return new Message(cast(GstMessage*)gst_message_new_element((src is null) ? null : src.getObjectGstStruct(), (structure is null) ? null : structure.getStructureStruct()) );
901 * Create a new clock message. This message is posted whenever the
902 * pipeline selectes a new clock for the pipeline.
904 * The object originating the message.
906 * the new selected clock
908 * The new new clock message.
911 public static Message newNewClock(ObjectGst src, Clock clock)
913 // GstMessage* gst_message_new_new_clock (GstObject *src, GstClock *clock);
914 return new Message(cast(GstMessage*)gst_message_new_new_clock((src is null) ? null : src.getObjectGstStruct(), (clock is null) ? null : clock.getClockStruct()) );
918 * Create a new segment done message. This message is posted by elements that
919 * finish playback of a segment as a result of a segment seek. This message
920 * is received by the application after all elements that posted a segment_start
921 * have posted the segment_done.
923 * The object originating the message.
925 * The format of the position being done
927 * The position of the segment being done
929 * The new segment done message.
932 public static Message newSegmentDone(ObjectGst src, GstFormat format, long position)
934 // GstMessage* gst_message_new_segment_done (GstObject *src, GstFormat format, gint64 position);
935 return new Message(cast(GstMessage*)gst_message_new_segment_done((src is null) ? null : src.getObjectGstStruct(), format, position) );
939 * Create a new segment message. This message is posted by elements that
940 * start playback of a segment as a result of a segment seek. This message
941 * is not received by the application but is used for maintenance reasons in
942 * container elements.
944 * The object originating the message.
946 * The format of the position being played
948 * The position of the segment being played
950 * The new segment start message.
953 public static Message newSegmentStart(ObjectGst src, GstFormat format, long position)
955 // GstMessage* gst_message_new_segment_start (GstObject *src, GstFormat format, gint64 position);
956 return new Message(cast(GstMessage*)gst_message_new_segment_start((src is null) ? null : src.getObjectGstStruct(), format, position) );
960 * Create a new warning message. The message will make copies of error and
963 * The object originating the message.
965 * The GError for this message.
967 * A debugging string for something or other.
969 * The new warning message.
972 public static Message newWarning(ObjectGst src, ErrorG error, char[] dbug)
974 // GstMessage* gst_message_new_warning (GstObject *src, GError *error, gchar *debug);
975 return new Message(cast(GstMessage*)gst_message_new_warning((src is null) ? null : src.getObjectGstStruct(), (error is null) ? null : error.getErrorGStruct(), Str.toStringz(dbug)) );
979 * Create a state dirty message. This message is posted whenever an element
980 * changed its state asynchronously and is used internally to update the
981 * states of container objects.
983 * the object originating the message
985 * The new state dirty message.
988 public static Message newStateDirty(ObjectGst src)
990 // GstMessage* gst_message_new_state_dirty (GstObject *src);
991 return new Message(cast(GstMessage*)gst_message_new_state_dirty((src is null) ? null : src.getObjectGstStruct()) );
995 * Create a new eos message. This message is generated and posted in
996 * the sink elements of a GstBin. The bin will only forward the EOS
997 * message to the application if all sinks have posted an EOS message.
999 * The object originating the message.
1001 * The new eos message.
1004 public static Message newEOS(ObjectGst src)
1006 // GstMessage* gst_message_new_eos (GstObject *src);
1007 return new Message(cast(GstMessage*)gst_message_new_eos((src is null) ? null : src.getObjectGstStruct()) );
1011 * Create a new error message. The message will copy error and
1012 * debug. This message is posted by element when a fatal event
1013 * occured. The pipeline will probably (partially) stop. The application
1014 * receiving this message should stop the pipeline.
1016 * The object originating the message.
1018 * The GError for this message.
1020 * A debugging string for something or other.
1022 * The new error message.
1025 public static Message newError(ObjectGst src, ErrorG error, char[] dbug)
1027 // GstMessage* gst_message_new_error (GstObject *src, GError *error, gchar *debug);
1028 return new Message(cast(GstMessage*)gst_message_new_error((src is null) ? null : src.getObjectGstStruct(), (error is null) ? null : error.getErrorGStruct(), Str.toStringz(dbug)) );
1032 * Create a new info message. The message will make copies of error and
1035 * The object originating the message.
1037 * The GError for this message.
1039 * A debugging string for something or other.
1041 * The new info message.
1045 public static Message newInfo(ObjectGst src, ErrorG error, char[] dbug)
1047 // GstMessage* gst_message_new_info (GstObject *src, GError *error, gchar *debug);
1048 return new Message(cast(GstMessage*)gst_message_new_info((src is null) ? null : src.getObjectGstStruct(), (error is null) ? null : error.getErrorGStruct(), Str.toStringz(dbug)) );
1053 import: gstreamer.Structure
1054 import: gstreamer.ObjectGst
1055 import: gstreamer.Clock
1057 #import: gstreamer.Format
1058 import: gstreamer.TagList
1059 structWrap: GstMessage* Message
1060 structWrap: GQuark Quark
1061 structWrap: GstStructure* Structure
1062 structWrap: GstObject* ObjectGst
1063 structWrap: GstClock* Clock
1065 structWrap: GError* ErrorG
1066 #structWrap: GFormat Format
1067 #structWrap: GFormat* Format
1068 structWrap: GstTagList* TagList
1071 file: gstreamer-GstMiniObject.html
1072 struct: GstMiniObject
1074 prefix: gst_mini_object_
1076 #import: gobject.Type
1077 #structWrap: GType Type
1078 import: gobject.Value
1079 structWrap: GstMiniObject* MiniObject
1080 structWrap: GstMiniObject MiniObject
1081 structWrap: GValue* Value
1084 file: GstObject.html
1090 nocode: gst_object_save_thyself
1091 nocode: gst_object_restore_thyself
1092 nocode: gst_class_signal_emit_by_name
1093 #this is removed because of GstObjectClass* not working yet
1094 nocode: gst_class_signal_connect
1096 import: gobject.ObjectG
1099 structWrap: GstObject* ObjectGst
1100 structWrap: GObject* ObjectG
1101 structWrap: GError* ErrorG
1102 structWrap: GList* ListG
1105 file: GstPadTemplate.html
1106 struct: GstPadTemplate
1108 prefix: gst_pad_template_
1111 import: gstreamer.Pad
1112 import: gstreamer.Caps
1113 structWrap: GstPadTemplate* PadTemplate
1114 structWrap: GstPad* Pad
1115 structWrap: GstCaps* Caps
1116 outFile: PadTemplate
1118 file: gstreamer-GstParse.html
1121 #I'm not so sure about the following:
1122 nocode: gst_parse_error_quark
1125 * Get the error quark used by the parsing subsystem.
1127 * the quark of the parse errors.
1129 public static Quark errorQuark()
1131 // GQuark gst_parse_error_quark (void);
1132 return new Quark( cast(uint*)gst_parse_error_quark() );
1138 import: gstreamer.Element
1139 structWrap: GQuark Quark
1140 structWrap: GError* ErrorG
1141 structWrap: GstElement* Element
1144 file: GstPipeline.html
1147 prefix: gst_pipeline_
1150 public this (char[] name)
1152 this.gstPipeline = cast(GstPipeline*) gst_pipeline_new(Str.toStringz(name));
1153 super(cast(GstBin*)this.gstPipeline);
1157 import: gstreamer.Element
1158 import: gstreamer.Clock
1159 import: gstreamer.Bus
1160 structWrap: GstPipeline* Pipeline
1161 structWrap: GstElement* Element
1162 structWrap: GstBus* Bus
1163 structWrap: GstClock* Clock
1166 file: GstPlugin.html
1173 #structWrap: GQuark Quark
1177 structWrap: GstPlugin* Plugin
1178 structWrap: GModule* Module
1179 structWrap: GList* ListG
1182 file: GstPluginFeature.html
1183 struct: GstPluginFeature
1184 class: PluginFeature
1185 prefix: gst_plugin_feature_
1189 structWrap: GstPluginFeature* PluginFeature
1190 structWrap: GList* ListG
1191 nocode: gst_plugin_feature_set_name
1194 * Sets the name of a plugin feature. The name uniquely identifies a feature
1195 * within all features of the same type. Renaming a plugin feature is not
1196 * allowed. A copy is made of the name so you should free the supplied name
1197 * after calling this function.
1203 public void setFeatureName(char[] name)
1205 // void gst_plugin_feature_set_name (GstPluginFeature *feature, const gchar *name);
1206 gst_plugin_feature_set_name(gstPluginFeature, Str.toStringz(name));
1209 outFile: PluginFeature
1211 file: gstreamer-GstQuery.html
1216 nocode: gst_query_new_position
1219 * Constructs a new query stream position query object. Use gst_query_unref()
1220 * when done with it. A position query is used to query the current position
1221 * of playback in the streams, in some format.
1223 * the default GstFormat for the new query
1227 public static Query newPosition(GstFormat format)
1229 // GstQuery* gst_query_new_position (GstFormat format);
1230 return new Query( cast(GstQuery*)gst_query_new_position(format) );
1233 nocode: gst_query_new_duration
1236 * Constructs a new stream duration query object to query in the given format.
1237 * Use gst_query_unref() when done with it. A duration query will give the
1238 * total length of the stream.
1240 * the GstFormat for this duration query
1244 public static Query newDuration(GstFormat format)
1246 // GstQuery* gst_query_new_duration (GstFormat format);
1247 return new Query( cast(GstQuery*)gst_query_new_duration(format) );
1250 nocode: gst_query_new_seeking
1253 * Constructs a new query object for querying seeking properties of
1256 * the default GstFormat for the new query
1260 public static Query newSeeking(GstFormat format)
1262 // GstQuery* gst_query_new_seeking (GstFormat format);
1263 return new Query(cast(GstQuery*)gst_query_new_seeking(format) );
1266 nocode: gst_query_new_formats
1269 * Constructs a new query object for querying formats of
1275 public static Query newFormats()
1277 // GstQuery* gst_query_new_formats (void);
1278 return new Query(cast(GstQuery*)gst_query_new_formats() );
1281 nocode: gst_query_new_segment
1284 * Constructs a new segment query object. Use gst_query_unref()
1285 * when done with it. A segment query is used to discover information about the
1286 * currently configured segment for playback.
1288 * the GstFormat for the new query
1292 public static Query newSegment(GstFormat format)
1294 // GstQuery* gst_query_new_segment (GstFormat format);
1295 return new Query(cast(GstQuery*)gst_query_new_segment(format) );
1299 import: gstreamer.Structure
1300 #import: gstreamer.Format
1301 structWrap: GstQuery* Query
1302 structWrap: GstStructure* Structure
1303 #structWrap: GstFormat Format
1304 #structWrap: GstFormat* Format
1307 file: GstRegistry.html
1310 prefix: gst_registry_
1314 import: gstreamer.Plugin
1315 import: gstreamer.PluginFeature
1316 #import: gobject.Type
1317 #structWrap: GType Type
1318 structWrap: GstRegistry* Registry
1319 structWrap: GList* ListG
1320 structWrap: GstPlugin* Plugin
1321 structWrap: GstPluginFeature* PluginFeature
1324 file: gstreamer-GstSegment.html
1327 prefix: gst_segment_
1330 #import: gstreamer.Format
1331 structWrap: GstSegment* Segment
1332 #structWrap: GstFormat Format
1335 file: gstreamer-GstStructure.html
1336 struct: GstStructure
1338 prefix: gst_structure_
1342 #structWrap: GQuark Quark
1343 import: gobject.Value
1344 #import: gobject.Type
1345 #structWrap: GType Type
1346 structWrap: GstStructure* Structure
1347 structWrap: GValue* Value
1351 file: GstSystemClock.html
1352 struct: GstSystemClock
1354 prefix: gst_system_clock_
1356 import: gstreamer.Clock
1357 structWrap: GstSystemClock* SystemClock
1358 structWrap: GstClock* Clock
1359 outFile: SystemClock
1361 file: gstreamer-GstTagList.html
1364 prefix: gst_tag_list_
1367 #import: gobject.Type
1368 #structWrap: GType Type
1369 #structWrap: GType* Type
1370 import: gobject.Value
1371 structWrap: GstTagList* TagList
1372 structWrap: GValue* Value
1376 file: GstTagSetter.html
1377 struct: GstTagSetter
1379 prefix: gst_tag_setter_
1382 import: gstreamer.TagList
1383 structWrap: GstTagSetter* TagSetter
1384 structWrap: GstTagList* TagList
1393 structWrap: GstTask* Task
1397 file: gstreamer-GstTypeFind.html
1400 prefix: gst_type_find_
1403 import: gstreamer.Caps
1404 import: gstreamer.Plugin
1405 structWrap: GstTypeFind* TypeFind
1406 structWrap: GstCaps* Caps
1407 structWrap: GstPlugin* Plugin
1410 file: GstTypeFindFactory.html
1411 struct: GstTypeFindFactory
1412 class: TypeFindFactory
1413 prefix: gst_type_find_factory_
1417 import: gstreamer.TypeFind
1418 import: gstreamer.Caps
1419 structWrap: GstTypeFindFactory* TypeFindFactory
1420 structWrap: GList* ListG
1421 structWrap: GstTypeFind* TypeFind
1422 structWrap: GstCaps* Caps
1423 outFile: TypeFindFactory
1431 #structWrap: GstXML* XML
1432 #structWrap: GstElement* Element
1435 # ProxyPad doesn't seem to exist anywhere. Atleast we don't seem to need it.
1439 #import: gstreamer.Pad
1441 #//public class ProxyPad : Pad
1443 # /** the main Gtk struct */
1444 # //protected GstProxyPad* gstProxyPad;
1445 # protected GstPad* gstProxyPad;
1448 # public GstPad* getProxyPadStruct()
1450 # return gstProxyPad;
1454 # /** the main Gtk struct as a void* */
1455 # protected void* getStruct()
1457 # return cast(void*)gstProxyPad;
1461 # * Sets our main struct and passes it to the parent class
1463 # public this (GstPad* gstProxyPad)
1465 # super(cast(GstObject*)gstProxyPad);
1466 # this.gstProxyPad = gstProxyPad;