Trying to bring nack my old modifications.Next is merging with new Tango branch.
[gtkD.git] / gtkD / srcgstreamer / gstreamer / Element.d
blobee9845a7a2e42f81483b9ca8ac2c54c9e19819b1
1 /*
2 * This file is part of gtkD.
4 * gtkD 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 * gtkD 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 gtkD; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 // generated automatically - do not change
20 // find conversion definition on APILookup.txt
21 // implement new conversion functionalities on the wrap.utils pakage
24 * Conversion parameters:
25 * inFile = GstElement.html
26 * outPack = gstreamer
27 * outFile = Element
28 * strct = GstElement
29 * realStrct=
30 * ctorStrct=
31 * clss = Element
32 * interf =
33 * class Code: Yes
34 * interface Code: No
35 * template for:
36 * extend =
37 * implements:
38 * prefixes:
39 * - gst_element_
40 * - gst_
41 * omit structs:
42 * omit prefixes:
43 * omit code:
44 * imports:
45 * - glib.Str
46 * - gtkc.gobject
47 * - gstreamer.Pad
48 * - gstreamer.Clock
49 * - gstreamer.Caps
50 * - gstreamer.Iterator
51 * - gstreamer.Index
52 * - gstreamer.TagList
53 * - gstreamer.Message
54 * - gstreamer.Query
55 * - gstreamer.Event
56 * - gstreamer.Bus
57 * structWrap:
58 * - GObject* -> Pad
59 * - GstBus* -> Bus
60 * - GstCaps* -> Caps
61 * - GstClock* -> Clock
62 * - GstElement* -> Element
63 * - GstEvent* -> Event
64 * - GstIndex* -> Index
65 * - GstIterator* -> Iterator
66 * - GstMessage* -> Message
67 * - GstPad* -> Pad
68 * - GstQuery* -> Query
69 * - GstTagList* -> TagList
70 * module aliases:
71 * local aliases:
74 module gstreamer.Element;
76 private import gstreamerc.gstreamertypes;
78 private import gstreamerc.gstreamer;
80 private import glib.Str;
81 private import gtkc.gobject;
82 private import gstreamer.Pad;
83 private import gstreamer.Clock;
84 private import gstreamer.Caps;
85 private import gstreamer.Iterator;
86 private import gstreamer.Index;
87 private import gstreamer.TagList;
88 private import gstreamer.Message;
89 private import gstreamer.Query;
90 private import gstreamer.Event;
91 private import gstreamer.Bus;
95 /**
96 * Description
97 * GstElement is the abstract base class needed to construct an element that
98 * can be used in a GStreamer pipeline. Please refer to the plugin writers
99 * guide for more information on creating GstElement subclasses.
100 * The name of a GstElement can be get with gst_element_get_name() and set with
101 * gst_element_set_name(). For speed, GST_ELEMENT_NAME() can be used in the
102 * core when using the appropriate locking. Do not use this in plug-ins or
103 * applications in order to retain ABI compatibility.
104 * All elements have pads (of the type GstPad). These pads link to pads on
105 * other elements. GstBuffer flow between these linked pads.
106 * A GstElement has a GList of GstPad structures for all their input (or sink)
107 * and output (or source) pads.
108 * Core and plug-in writers can add and remove pads with gst_element_add_pad()
109 * and gst_element_remove_pad().
110 * A pad of an element can be retrieved by name with gst_element_get_pad().
111 * An iterator of all pads can be retrieved with gst_element_iterate_pads().
112 * Elements can be linked through their pads.
113 * If the link is straightforward, use the gst_element_link()
114 * convenience function to link two elements, or gst_element_link_many()
115 * for more elements in a row.
116 * Use gst_element_link_filtered() to link two elements constrained by
117 * a specified set of GstCaps.
118 * For finer control, use gst_element_link_pads() and
119 * gst_element_link_pads_filtered() to specify the pads to link on
120 * each element by name.
121 * Each element has a state (see GstState). You can get and set the state
122 * of an element with gst_element_get_state() and gst_element_set_state().
123 * To get a string representation of a GstState, use
124 * gst_element_state_get_name().
125 * You can get and set a GstClock on an element using gst_element_get_clock()
126 * and gst_element_set_clock().
127 * Some elements can provide a clock for the pipeline if
128 * gst_element_provides_clock() returns TRUE. With the
129 * gst_element_provide_clock() method one can retrieve the clock provided by
130 * such an element.
131 * Not all elements require a clock to operate correctly. If
132 * gst_element_requires_clock() returns TRUE, a clock should be set on the
133 * element with gst_element_set_clock().
134 * Note that clock slection and distribution is normally handled by the
135 * toplevel GstPipeline so the clock functions are only to be used in very
136 * specific situations.
137 * Last reviewed on 2006-03-12 (0.10.5)
139 private import gstreamer.ObjectGst;
140 public class Element : ObjectGst
143 /** the main Gtk struct */
144 protected GstElement* gstElement;
147 public GstElement* getElementStruct()
149 return gstElement;
153 /** the main Gtk struct as a void* */
154 protected void* getStruct()
156 return cast(void*)gstElement;
160 * Sets our main struct and passes it to the parent class
162 public this (GstElement* gstElement)
164 super(cast(GstObject*)gstElement);
165 this.gstElement = gstElement;
169 * Queries an element for the stream position.
170 * This is a convenience function for gstreamerD.
171 * Returns:
172 * The current position in nanoseconds - GstFormat.TIME.
174 public long queryPosition()
176 GstFormat form = GstFormat.TIME;
177 long cur_pos;
178 queryPosition( &form, &cur_pos );
179 return cur_pos;
183 * Queries an element for the stream duration.
184 * This is a convenience function for gstreamerD.
185 * Returns:
186 * The duration in nanoseconds - GstFormat.TIME.
188 public long queryDuration()
190 GstFormat form = GstFormat.TIME;
191 long cur_dur;
192 queryDuration( &form, &cur_dur );
193 return cur_dur;
197 * This set's the filename for a filesrc element.
199 public void location( char[] set )
201 //g_object_set( G_OBJECT(getElementStruct()), "location", set, NULL);
202 setProperty("location", set);
206 * Set the caps property of an Element.
208 void caps( Caps cp )
210 g_object_set( getElementStruct(), Str.toStringz("caps"), cp.getCapsStruct(), null );
214 * For your convenience in gstreamerD: you can seek to the
215 * position of the pipeline measured in time_nanoseconds.
217 public int seek( ulong time_nanoseconds ) //gint64
219 return seek( 1.0, GstFormat.TIME, GstSeekFlags.FLUSH,
220 GstSeekType.SET, time_nanoseconds,
221 GstSeekType.NONE, GST_CLOCK_TIME_NONE);
225 * Get's all the pads from an element in a Pad[]. FIXME: This a hackish mess.
227 public Pad[] pads()
229 Pad[] result = new Pad[0];
231 Iterator iter = iteratePads();
232 GstPad* obu_c = null;
233 iter.next( cast(void**) &obu_c );
234 while( obu_c !is null )
236 Pad tmpobu = new Pad( obu_c );
237 //writefln( "iterating Padname: ", tmpobu.getName() );
238 result.length = result.length + 1;
239 result[result.length-1] = tmpobu;
241 obu_c = null;
242 iter.next( cast(void**) &obu_c );
244 //writefln("no more pads.");
245 return result;
248 //HANDEDIT: This is a way to add disconnectOnPadAdded
249 //There still doesn't seem to be a way to put it
250 //there automatically...
252 protected uint padAddedHandlerId;
253 void delegate(Pad, Element)[] onPadAddedListeners;
254 void addOnPadAdded(void delegate(Pad, Element) dlg)
256 if ( !("pad-added" in connectedSignals) )
258 padAddedHandlerId = Signals.connectData(
259 getStruct(),
260 "pad-added",
261 cast(GCallback)&callBackPadAdded,
262 cast(void*)this,
263 null,
264 cast(ConnectFlags)0);
265 connectedSignals["pad-added"] = 1;
267 onPadAddedListeners ~= dlg;
269 extern(C) static void callBackPadAdded(GstElement* gstelementStruct, GObject* newPad, Element element)
271 bit consumed = false;
273 foreach ( void delegate(Pad, Element) dlg ; element.onPadAddedListeners )
275 dlg(new Pad(newPad), element);
278 return consumed;
280 void disconnectOnPadAdded()
282 if( "pad-added" in connectedSignals )
284 Signals.handlerDisconnect( getStruct(), padAddedHandlerId );
285 padAddedHandlerId = 0;
286 connectedSignals["pad-added"] = 0;
287 onPadAddedListeners = null;
295 // imports for the signal processing
296 private import gobject.Signals;
297 private import gtkc.gdktypes;
298 int[char[]] connectedSignals;
300 void delegate(Element)[] onNoMorePadsListeners;
301 void addOnNoMorePads(void delegate(Element) dlg)
303 if ( !("no-more-pads" in connectedSignals) )
305 Signals.connectData(
306 getStruct(),
307 "no-more-pads",
308 cast(GCallback)&callBackNoMorePads,
309 cast(void*)this,
310 null,
311 cast(ConnectFlags)0);
312 connectedSignals["no-more-pads"] = 1;
314 onNoMorePadsListeners ~= dlg;
316 extern(C) static void callBackNoMorePads(GstElement* gstelementStruct, Element element)
318 bit consumed = false;
320 foreach ( void delegate(Element) dlg ; element.onNoMorePadsListeners )
322 dlg(element);
325 return consumed;
328 protected uint padAddedHandlerId;
329 void delegate(Pad, Element)[] onPadAddedListeners;
330 void addOnPadAdded(void delegate(Pad, Element) dlg)
332 if ( !("pad-added" in connectedSignals) )
334 padAddedHandlerId = Signals.connectData(
335 getStruct(),
336 "pad-added",
337 cast(GCallback)&callBackPadAdded,
338 cast(void*)this,
339 null,
340 cast(ConnectFlags)0);
341 connectedSignals["pad-added"] = 1;
343 onPadAddedListeners ~= dlg;
345 extern(C) static void callBackPadAdded(GstElement* gstelementStruct, GObject* newPad, Element element)
347 bit consumed = false;
349 foreach ( void delegate(Pad, Element) dlg ; element.onPadAddedListeners )
351 dlg(new Pad(newPad), element);
354 return consumed;
356 //Hand edited here:
357 void disconnectOnPadAdded()
359 if( "pad-added" in connectedSignals )
361 Signals.handlerDisconnect( getStruct(), padAddedHandlerId );
362 padAddedHandlerId = 0;
363 connectedSignals["pad-added"] = 0;
364 onPadAddedListeners = null;
368 void delegate(Pad, Element)[] onPadRemovedListeners;
369 void addOnPadRemoved(void delegate(Pad, Element) dlg)
371 if ( !("pad-removed" in connectedSignals) )
373 Signals.connectData(
374 getStruct(),
375 "pad-removed",
376 cast(GCallback)&callBackPadRemoved,
377 cast(void*)this,
378 null,
379 cast(ConnectFlags)0);
380 connectedSignals["pad-removed"] = 1;
382 onPadRemovedListeners ~= dlg;
384 extern(C) static void callBackPadRemoved(GstElement* gstelementStruct, GObject* oldPad, Element element)
386 bit consumed = false;
388 foreach ( void delegate(Pad, Element) dlg ; element.onPadRemovedListeners )
390 dlg(new Pad(oldPad), element);
393 return consumed;
423 * Adds a padtemplate to an element class. This is mainly used in the _base_init
424 * functions of classes.
425 * klass:
426 * the GstElementClass to add the pad template to.
427 * templ:
428 * a GstPadTemplate to add to the element class.
430 public static void classAddPadTemplate(GstElementClass* klass, GstPadTemplate* templ)
432 // void gst_element_class_add_pad_template (GstElementClass *klass, GstPadTemplate *templ);
433 gst_element_class_add_pad_template(klass, templ);
437 * Retrieves a padtemplate from element_class with the given name.
438 * Note
439 * If you use this function in the GInstanceInitFunc of an object class
440 * that has subclasses, make sure to pass the g_class parameter of the
441 * GInstanceInitFunc here.
442 * element_class:
443 * a GstElementClass to get the pad template of.
444 * name:
445 * the name of the GstPadTemplate to get.
446 * Returns:
447 * the GstPadTemplate with the given name, or NULL if none was found.
448 * No unreferencing is necessary.
450 public static GstPadTemplate* classGetPadTemplate(GstElementClass* elementClass, char[] name)
452 // GstPadTemplate* gst_element_class_get_pad_template (GstElementClass *element_class, const gchar *name);
453 return gst_element_class_get_pad_template(elementClass, Str.toStringz(name));
457 * Retrieves a list of the pad templates associated with element_class. The
458 * list must not be modified by the calling code.
459 * Note
460 * If you use this function in the GInstanceInitFunc of an object class
461 * that has subclasses, make sure to pass the g_class parameter of the
462 * GInstanceInitFunc here.
463 * element_class:
464 * a GstElementClass to get pad templates of.
465 * Returns:
466 * the GList of padtemplates.
468 public static GList* classGetPadTemplateList(GstElementClass* elementClass)
470 // GList* gst_element_class_get_pad_template_list (GstElementClass *element_class);
471 return gst_element_class_get_pad_template_list(elementClass);
475 * Adds a list of standardized properties with types to the klass.
476 * the id is for the property switch in your get_prop method, and
477 * the flags determine readability / writeability.
478 * klass:
479 * the GstElementClass to add the properties to.
480 * first_name:
481 * the name of the first property.
482 * in a NULL terminated
483 * ...:
484 * the id and flags of the first property, followed by
485 * further 'name', 'id', 'flags' triplets and terminated by NULL.
487 public static void classInstallStdProps(GstElementClass* klass, char[] firstName, ... )
489 // void gst_element_class_install_std_props (GstElementClass *klass, const gchar *first_name, ...);
490 gst_element_class_install_std_props(klass, Str.toStringz(firstName));
494 * Sets the detailed information for a GstElementClass.
495 * Note
496 * This function is for use in _base_init functions only.
497 * The details are copied.
498 * klass:
499 * class to set details for
500 * details:
501 * details to set
503 public static void classSetDetails(GstElementClass* klass, GstElementDetails* details)
505 // void gst_element_class_set_details (GstElementClass *klass, const GstElementDetails *details);
506 gst_element_class_set_details(klass, details);
510 * Adds a pad (link point) to element. pad's parent will be set to element;
511 * see gst_object_set_parent() for refcounting information.
512 * Pads are not automatically activated so elements should perform the needed
513 * steps to activate the pad in case this pad is added in the PAUSED or PLAYING
514 * state. See gst_pad_set_active() for more information about activating pads.
515 * The pad and the element should be unlocked when calling this function.
516 * This function will emit the GstElement::pad-added signal on the element.
517 * element:
518 * a GstElement to add the pad to.
519 * pad:
520 * the GstPad to add to the element.
521 * Returns:
522 * TRUE if the pad could be added. This function can fail when
523 * a pad with the same name already existed or the pad already had another
524 * parent.
525 * MT safe.
527 public int addPad(Pad pad)
529 // gboolean gst_element_add_pad (GstElement *element, GstPad *pad);
530 return gst_element_add_pad(gstElement, (pad is null) ? null : pad.getPadStruct());
534 * Retrieves a pad from element by name. Tries gst_element_get_static_pad()
535 * first, then gst_element_get_request_pad().
536 * Note
537 * Usage of this function is not recommended as it is unclear if the reference
538 * to the result pad should be released with gst_object_unref() in case of a static pad
539 * or gst_element_release_request_pad() in case of a request pad.
540 * element:
541 * a GstElement.
542 * name:
543 * the name of the pad to retrieve.
544 * Returns:
545 * the GstPad if found, otherwise NULL. Unref or Release after usage,
546 * depending on the type of the pad.
548 public Pad getPad(char[] name)
550 // GstPad* gst_element_get_pad (GstElement *element, const gchar *name);
551 return new Pad( gst_element_get_pad(gstElement, Str.toStringz(name)) );
555 * Creates a pad for each pad template that is always available.
556 * This function is only useful during object intialization of
557 * subclasses of GstElement.
558 * element:
559 * a GstElement to create pads for
561 public void createAllPads()
563 // void gst_element_create_all_pads (GstElement *element);
564 gst_element_create_all_pads(gstElement);
568 * Looks for an unlinked pad to which the given pad can link. It is not
569 * guaranteed that linking the pads will work, though it should work in most
570 * cases.
571 * element:
572 * a GstElement in which the pad should be found.
573 * pad:
574 * the GstPad to find a compatible one for.
575 * caps:
576 * the GstCaps to use as a filter.
577 * Returns:
578 * the GstPad to which a link can be made, or NULL if one cannot be
579 * found.
581 public Pad getCompatiblePad(Pad pad, Caps caps)
583 // GstPad* gst_element_get_compatible_pad (GstElement *element, GstPad *pad, const GstCaps *caps);
584 return new Pad( gst_element_get_compatible_pad(gstElement, (pad is null) ? null : pad.getPadStruct(), (caps is null) ? null : caps.getCapsStruct()) );
588 * Retrieves a pad template from element that is compatible with compattempl.
589 * Pads from compatible templates can be linked together.
590 * element:
591 * a GstElement to get a compatible pad template for.
592 * compattempl:
593 * the GstPadTemplate to find a compatible template for.
594 * Returns:
595 * a compatible GstPadTemplate, or NULL if none was found. No
596 * unreferencing is necessary.
598 public GstPadTemplate* getCompatiblePadTemplate(GstPadTemplate* compattempl)
600 // GstPadTemplate* gst_element_get_compatible_pad_template (GstElement *element, GstPadTemplate *compattempl);
601 return gst_element_get_compatible_pad_template(gstElement, compattempl);
605 * Retrieves a pad from the element by name. This version only retrieves
606 * request pads. The pad should be released with
607 * gst_element_release_request_pad().
608 * element:
609 * a GstElement to find a request pad of.
610 * name:
611 * the name of the request GstPad to retrieve.
612 * Returns:
613 * requested GstPad if found, otherwise NULL. Release after usage.
615 public Pad getRequestPad(char[] name)
617 // GstPad* gst_element_get_request_pad (GstElement *element, const gchar *name);
618 return new Pad( gst_element_get_request_pad(gstElement, Str.toStringz(name)) );
622 * Retrieves a pad from element by name. This version only retrieves
623 * already-existing (i.e. 'static') pads.
624 * element:
625 * a GstElement to find a static pad of.
626 * name:
627 * the name of the static GstPad to retrieve.
628 * Returns:
629 * the requested GstPad if found, otherwise NULL. unref after
630 * usage.
631 * MT safe.
633 public Pad getStaticPad(char[] name)
635 // GstPad* gst_element_get_static_pad (GstElement *element, const gchar *name);
636 return new Pad( gst_element_get_static_pad(gstElement, Str.toStringz(name)) );
640 * Use this function to signal that the element does not expect any more pads
641 * to show up in the current pipeline. This function should be called whenever
642 * pads have been added by the element itself. Elements with GST_PAD_SOMETIMES
643 * pad templates use this in combination with autopluggers to figure out that
644 * the element is done initializing its pads.
645 * This function emits the GstElement::no-more-pads signal.
646 * MT safe.
647 * element:
648 * a GstElement
650 public void noMorePads()
652 // void gst_element_no_more_pads (GstElement *element);
653 gst_element_no_more_pads(gstElement);
657 * Makes the element free the previously requested pad as obtained
658 * with gst_element_get_request_pad().
659 * MT safe.
660 * element:
661 * a GstElement to release the request pad of.
662 * pad:
663 * the GstPad to release.
665 public void releaseRequestPad(Pad pad)
667 // void gst_element_release_request_pad (GstElement *element, GstPad *pad);
668 gst_element_release_request_pad(gstElement, (pad is null) ? null : pad.getPadStruct());
672 * Removes pad from element. pad will be destroyed if it has not been
673 * referenced elsewhere using gst_object_unparent().
674 * This function is used by plugin developers and should not be used
675 * by applications. Pads that were dynamically requested from elements
676 * with gst_element_get_request_pad() should be released with the
677 * gst_element_release_request_pad() function instead.
678 * Pads are not automatically deactivated so elements should perform the needed
679 * steps to deactivate the pad in case this pad is removed in the PAUSED or
680 * PLAYING state. See gst_pad_set_active() for more information about
681 * deactivating pads.
682 * The pad and the element should be unlocked when calling this function.
683 * This function will emit the GstElement::pad-removed signal on the element.
684 * element:
685 * a GstElement to remove pad from.
686 * pad:
687 * the GstPad to remove from the element.
688 * Returns:
689 * TRUE if the pad could be removed. Can return FALSE if the
690 * pad does not belong to the provided element.
691 * MT safe.
693 public int removePad(Pad pad)
695 // gboolean gst_element_remove_pad (GstElement *element, GstPad *pad);
696 return gst_element_remove_pad(gstElement, (pad is null) ? null : pad.getPadStruct());
700 * Retrieves an iterattor of element's pads. The iterator should
701 * be freed after usage.
702 * element:
703 * a GstElement to iterate pads of.
704 * Returns:
705 * the GstIterator of GstPad. Unref each pad after use.
706 * MT safe.
708 public Iterator iteratePads()
710 // GstIterator* gst_element_iterate_pads (GstElement *element);
711 return new Iterator( gst_element_iterate_pads(gstElement) );
715 * Retrieves an iterator of element's sink pads.
716 * element:
717 * a GstElement.
718 * Returns:
719 * the GstIterator of GstPad. Unref each pad after use.
720 * MT safe.
722 public Iterator iterateSinkPads()
724 // GstIterator* gst_element_iterate_sink_pads (GstElement *element);
725 return new Iterator( gst_element_iterate_sink_pads(gstElement) );
729 * Retrieves an iterator of element's source pads.
730 * element:
731 * a GstElement.
732 * Returns:
733 * the GstIterator of GstPad. Unref each pad after use.
734 * MT safe.
736 public Iterator iterateSrcPads()
738 // GstIterator* gst_element_iterate_src_pads (GstElement *element);
739 return new Iterator( gst_element_iterate_src_pads(gstElement) );
743 * Links src to dest. The link must be from source to
744 * destination; the other direction will not be tried. The function looks for
745 * existing pads that aren't linked yet. It will request new pads if necessary.
746 * If multiple links are possible, only one is established.
747 * Make sure you have added your elements to a bin or pipeline with
748 * gst_bin_add() before trying to link them.
749 * src:
750 * a GstElement containing the source pad.
751 * dest:
752 * the GstElement containing the destination pad.
753 * Returns:
754 * TRUE if the elements could be linked, FALSE otherwise.
756 public int link(Element dest)
758 // gboolean gst_element_link (GstElement *src, GstElement *dest);
759 return gst_element_link(gstElement, (dest is null) ? null : dest.getElementStruct());
763 * Unlinks all source pads of the source element with all sink pads
764 * of the sink element to which they are linked.
765 * src:
766 * the source GstElement to unlink.
767 * dest:
768 * the sink GstElement to unlink.
770 public void unlink(Element dest)
772 // void gst_element_unlink (GstElement *src, GstElement *dest);
773 gst_element_unlink(gstElement, (dest is null) ? null : dest.getElementStruct());
777 * Chain together a series of elements. Uses gst_element_link().
778 * Make sure you have added your elements to a bin or pipeline with
779 * gst_bin_add() before trying to link them.
780 * element_1:
781 * the first GstElement in the link chain.
782 * element_2:
783 * the second GstElement in the link chain.
784 * ...:
785 * the NULL-terminated list of elements to link in order.
786 * Returns:
787 * TRUE on success, FALSE otherwise.
789 public int linkMany(Element element2, ... )
791 // gboolean gst_element_link_many (GstElement *element_1, GstElement *element_2, ...);
792 return gst_element_link_many(gstElement, (element2 is null) ? null : element2.getElementStruct());
796 * Unlinks a series of elements. Uses gst_element_unlink().
797 * element_1:
798 * the first GstElement in the link chain.
799 * element_2:
800 * the second GstElement in the link chain.
801 * ...:
802 * the NULL-terminated list of elements to unlink in order.
804 public void unlinkMany(Element element2, ... )
806 // void gst_element_unlink_many (GstElement *element_1, GstElement *element_2, ...);
807 gst_element_unlink_many(gstElement, (element2 is null) ? null : element2.getElementStruct());
811 * Links the two named pads of the source and destination elements.
812 * Side effect is that if one of the pads has no parent, it becomes a
813 * child of the parent of the other element. If they have different
814 * parents, the link fails.
815 * src:
816 * a GstElement containing the source pad.
817 * srcpadname:
818 * the name of the GstPad in source element or NULL for any pad.
819 * dest:
820 * the GstElement containing the destination pad.
821 * destpadname:
822 * the name of the GstPad in destination element,
823 * or NULL for any pad.
824 * Returns:
825 * TRUE if the pads could be linked, FALSE otherwise.
827 public int linkPads(char[] srcpadname, Element dest, char[] destpadname)
829 // gboolean gst_element_link_pads (GstElement *src, const gchar *srcpadname, GstElement *dest, const gchar *destpadname);
830 return gst_element_link_pads(gstElement, Str.toStringz(srcpadname), (dest is null) ? null : dest.getElementStruct(), Str.toStringz(destpadname));
834 * Unlinks the two named pads of the source and destination elements.
835 * src:
836 * a GstElement containing the source pad.
837 * srcpadname:
838 * the name of the GstPad in source element.
839 * dest:
840 * a GstElement containing the destination pad.
841 * destpadname:
842 * the name of the GstPad in destination element.
844 public void unlinkPads(char[] srcpadname, Element dest, char[] destpadname)
846 // void gst_element_unlink_pads (GstElement *src, const gchar *srcpadname, GstElement *dest, const gchar *destpadname);
847 gst_element_unlink_pads(gstElement, Str.toStringz(srcpadname), (dest is null) ? null : dest.getElementStruct(), Str.toStringz(destpadname));
851 * Links the two named pads of the source and destination elements. Side effect
852 * is that if one of the pads has no parent, it becomes a child of the parent of
853 * the other element. If they have different parents, the link fails. If caps
854 * is not NULL, makes sure that the caps of the link is a subset of caps.
855 * src:
856 * a GstElement containing the source pad.
857 * srcpadname:
858 * the name of the GstPad in source element or NULL for any pad.
859 * dest:
860 * the GstElement containing the destination pad.
861 * destpadname:
862 * the name of the GstPad in destination element or NULL for any pad.
863 * filter:
864 * the GstCaps to filter the link, or NULL for no filter.
865 * Returns:
866 * TRUE if the pads could be linked, FALSE otherwise.
868 public int linkPadsFiltered(char[] srcpadname, Element dest, char[] destpadname, Caps filter)
870 // gboolean gst_element_link_pads_filtered (GstElement *src, const gchar *srcpadname, GstElement *dest, const gchar *destpadname, GstCaps *filter);
871 return gst_element_link_pads_filtered(gstElement, Str.toStringz(srcpadname), (dest is null) ? null : dest.getElementStruct(), Str.toStringz(destpadname), (filter is null) ? null : filter.getCapsStruct());
875 * Links src to dest using the given caps as filtercaps.
876 * The link must be from source to
877 * destination; the other direction will not be tried. The function looks for
878 * existing pads that aren't linked yet. It will request new pads if necessary.
879 * If multiple links are possible, only one is established.
880 * Make sure you have added your elements to a bin or pipeline with
881 * gst_bin_add() before trying to link them.
882 * src:
883 * a GstElement containing the source pad.
884 * dest:
885 * the GstElement containing the destination pad.
886 * filter:
887 * the GstCaps to filter the link, or NULL for no filter.
888 * Returns:
889 * TRUE if the pads could be linked, FALSE otherwise.
891 public int linkFiltered(Element dest, Caps filter)
893 // gboolean gst_element_link_filtered (GstElement *src, GstElement *dest, GstCaps *filter);
894 return gst_element_link_filtered(gstElement, (dest is null) ? null : dest.getElementStruct(), (filter is null) ? null : filter.getCapsStruct());
898 * Set the base time of an element. See gst_element_get_base_time().
899 * MT safe.
900 * element:
901 * a GstElement.
902 * time:
903 * the base time to set.
905 public void setBaseTime(GstClockTime time)
907 // void gst_element_set_base_time (GstElement *element, GstClockTime time);
908 gst_element_set_base_time(gstElement, time);
912 * Returns the base time of the element. The base time is the
913 * absolute time of the clock when this element was last put to
914 * PLAYING. Subtracting the base time from the clock time gives
915 * the stream time of the element.
916 * element:
917 * a GstElement.
918 * Returns:
919 * the base time of the element.
920 * MT safe.
922 public GstClockTime getBaseTime()
924 // GstClockTime gst_element_get_base_time (GstElement *element);
925 return gst_element_get_base_time(gstElement);
929 * Sets the bus of the element. Increases the refcount on the bus.
930 * For internal use only, unless you're testing elements.
931 * MT safe.
932 * element:
933 * a GstElement to set the bus of.
934 * bus:
935 * the GstBus to set.
937 public void setBus(Bus bus)
939 // void gst_element_set_bus (GstElement *element, GstBus *bus);
940 gst_element_set_bus(gstElement, (bus is null) ? null : bus.getBusStruct());
944 * Returns the bus of the element.
945 * element:
946 * a GstElement to get the bus of.
947 * Returns:
948 * the element's GstBus. unref after usage.
949 * MT safe.
951 public Bus getBus()
953 // GstBus* gst_element_get_bus (GstElement *element);
954 return new Bus( gst_element_get_bus(gstElement) );
958 * Retrieves the factory that was used to create this element.
959 * element:
960 * a GstElement to request the element factory of.
961 * Returns:
962 * the GstElementFactory used for creating this element.
963 * no refcounting is needed.
965 public GstElementFactory* getFactory()
967 // GstElementFactory* gst_element_get_factory (GstElement *element);
968 return gst_element_get_factory(gstElement);
972 * Set index on the element. The refcount of the index
973 * will be increased, any previously set index is unreffed.
974 * MT safe.
975 * element:
976 * a GstElement.
977 * index:
978 * a GstIndex.
980 public void setIndex(Index index)
982 // void gst_element_set_index (GstElement *element, GstIndex *index);
983 gst_element_set_index(gstElement, (index is null) ? null : index.getIndexStruct());
987 * Gets the index from the element.
988 * element:
989 * a GstElement.
990 * Returns:
991 * a GstIndex or NULL when no index was set on the
992 * element. unref after usage.
993 * MT safe.
995 public Index getIndex()
997 // GstIndex* gst_element_get_index (GstElement *element);
998 return new Index( gst_element_get_index(gstElement) );
1002 * Queries if the element can be indexed.
1003 * element:
1004 * a GstElement.
1005 * Returns:
1006 * TRUE if the element can be indexed.
1007 * MT safe.
1009 public int isIndexable()
1011 // gboolean gst_element_is_indexable (GstElement *element);
1012 return gst_element_is_indexable(gstElement);
1020 * Query if the element requires a clock.
1021 * element:
1022 * a GstElement to query
1023 * Returns:
1024 * TRUE if the element requires a clock
1025 * MT safe.
1027 public int requiresClock()
1029 // gboolean gst_element_requires_clock (GstElement *element);
1030 return gst_element_requires_clock(gstElement);
1034 * Sets the clock for the element. This function increases the
1035 * refcount on the clock. Any previously set clock on the object
1036 * is unreffed.
1037 * element:
1038 * a GstElement to set the clock for.
1039 * clock:
1040 * the GstClock to set for the element.
1041 * Returns:
1042 * TRUE if the element accepted the clock. An element can refuse a
1043 * clock when it, for example, is not able to slave its internal clock to the
1044 * clock or when it requires a specific clock to operate.
1045 * MT safe.
1047 public int setClock(Clock clock)
1049 // gboolean gst_element_set_clock (GstElement *element, GstClock *clock);
1050 return gst_element_set_clock(gstElement, (clock is null) ? null : clock.getClockStruct());
1054 * Gets the currently configured clock of the element. This is the clock as was
1055 * last set with gst_element_set_clock().
1056 * element:
1057 * a GstElement to get the clock of.
1058 * Returns:
1059 * the GstClock of the element. unref after usage.
1060 * MT safe.
1062 public Clock getClock()
1064 // GstClock* gst_element_get_clock (GstElement *element);
1065 return new Clock( gst_element_get_clock(gstElement) );
1069 * Query if the element provides a clock. A GstClock provided by an
1070 * element can be used as the global GstClock for the pipeline.
1071 * An element that can provide a clock is only required to do so in the PAUSED
1072 * state, this means when it is fully negotiated and has allocated the resources
1073 * to operate the clock.
1074 * element:
1075 * a GstElement to query
1076 * Returns:
1077 * TRUE if the element provides a clock
1078 * MT safe.
1080 public int providesClock()
1082 // gboolean gst_element_provides_clock (GstElement *element);
1083 return gst_element_provides_clock(gstElement);
1087 * Get the clock provided by the given element.
1088 * Note
1089 * An element is only required to provide a clock in the PAUSED
1090 * state. Some elements can provide a clock in other states.
1091 * element:
1092 * a GstElement to query
1093 * Returns:
1094 * the GstClock provided by the element or NULL
1095 * if no clock could be provided. Unref after usage.
1096 * MT safe.
1098 public Clock provideClock()
1100 // GstClock* gst_element_provide_clock (GstElement *element);
1101 return new Clock( gst_element_provide_clock(gstElement) );
1105 * Sets the state of the element. This function will try to set the
1106 * requested state by going through all the intermediary states and calling
1107 * the class's state change function for each.
1108 * This function can return GST_STATE_CHANGE_ASYNC, in which case the
1109 * element will perform the remainder of the state change asynchronously in
1110 * another thread.
1111 * An application can use gst_element_get_state() to wait for the completion
1112 * of the state change or it can wait for a state change message on the bus.
1113 * element:
1114 * a GstElement to change state of.
1115 * state:
1116 * the element's new GstState.
1117 * Returns:
1118 * Result of the state change using GstStateChangeReturn.
1119 * MT safe.
1121 public GstStateChangeReturn setState(GstState state)
1123 // GstStateChangeReturn gst_element_set_state (GstElement *element, GstState state);
1124 return gst_element_set_state(gstElement, state);
1128 * Gets the state of the element.
1129 * For elements that performed an ASYNC state change, as reported by
1130 * gst_element_set_state(), this function will block up to the
1131 * specified timeout value for the state change to complete.
1132 * If the element completes the state change or goes into
1133 * an error, this function returns immediately with a return value of
1134 * GST_STATE_CHANGE_SUCCESS or GST_STATE_CHANGE_FAILURE respectively.
1135 * For elements that did not return GST_STATE_CHANGE_ASYNC, this function
1136 * returns the current and pending state immediately.
1137 * This function returns GST_STATE_CHANGE_NO_PREROLL if the element
1138 * successfully changed its state but is not able to provide data yet.
1139 * This mostly happens for live sources that only produce data in the PLAYING
1140 * state. While the state change return is equivalent to
1141 * GST_STATE_CHANGE_SUCCESS, it is returned to the application to signal that
1142 * some sink elements might not be able to complete their state change because
1143 * an element is not producing data to complete the preroll. When setting the
1144 * element to playing, the preroll will complete and playback will start.
1145 * element:
1146 * a GstElement to get the state of.
1147 * state:
1148 * a pointer to GstState to hold the state. Can be NULL.
1149 * pending:
1150 * a pointer to GstState to hold the pending state.
1151 * Can be NULL.
1152 * timeout:
1153 * a GstClockTime to specify the timeout for an async
1154 * state change or GST_CLOCK_TIME_NONE for infinite timeout.
1155 * Returns:
1156 * GST_STATE_CHANGE_SUCCESS if the element has no more pending state
1157 * and the last state change succeeded, GST_STATE_CHANGE_ASYNC if the
1158 * element is still performing a state change or
1159 * GST_STATE_CHANGE_FAILURE if the last state change failed.
1160 * MT safe.
1162 public GstStateChangeReturn getState(GstState* state, GstState* pending, GstClockTime timeout)
1164 // GstStateChangeReturn gst_element_get_state (GstElement *element, GstState *state, GstState *pending, GstClockTime timeout);
1165 return gst_element_get_state(gstElement, state, pending, timeout);
1169 * Locks the state of an element, so state changes of the parent don't affect
1170 * this element anymore.
1171 * MT safe.
1172 * element:
1173 * a GstElement
1174 * locked_state:
1175 * TRUE to lock the element's state
1176 * Returns:
1177 * TRUE if the state was changed, FALSE if bad parameters were given
1178 * or the elements state-locking needed no change.
1180 public int setLockedState(int lockedState)
1182 // gboolean gst_element_set_locked_state (GstElement *element, gboolean locked_state);
1183 return gst_element_set_locked_state(gstElement, lockedState);
1187 * Checks if the state of an element is locked.
1188 * If the state of an element is locked, state changes of the parent don't
1189 * affect the element.
1190 * This way you can leave currently unused elements inside bins. Just lock their
1191 * state before changing the state from GST_STATE_NULL.
1192 * MT safe.
1193 * element:
1194 * a GstElement.
1195 * Returns:
1196 * TRUE, if the element's state is locked.
1198 public int isLockedState()
1200 // gboolean gst_element_is_locked_state (GstElement *element);
1201 return gst_element_is_locked_state(gstElement);
1205 * Abort the state change of the element. This function is used
1206 * by elements that do asynchronous state changes and find out
1207 * something is wrong.
1208 * This function should be called with the STATE_LOCK held.
1209 * MT safe.
1210 * element:
1211 * a GstElement to abort the state of.
1213 public void abortState()
1215 // void gst_element_abort_state (GstElement *element);
1216 gst_element_abort_state(gstElement);
1220 * Commit the state change of the element and proceed to the next
1221 * pending state if any. This function is used
1222 * by elements that do asynchronous state changes.
1223 * The core will normally call this method automatically when an
1224 * element returned GST_STATE_CHANGE_SUCCESS from the state change function.
1225 * If after calling this method the element still has not reached
1226 * the pending state, the next state change is performed.
1227 * This method is used internally and should normally not be called by plugins
1228 * or applications.
1229 * element:
1230 * a GstElement to continue the state change of.
1231 * ret:
1232 * The previous state return value
1233 * Returns:
1234 * The result of the commit state change.
1235 * MT safe.
1237 public GstStateChangeReturn continueState(GstStateChangeReturn ret)
1239 // GstStateChangeReturn gst_element_continue_state (GstElement *element, GstStateChangeReturn ret);
1240 return gst_element_continue_state(gstElement, ret);
1244 * Brings the element to the lost state. The current state of the
1245 * element is copied to the pending state so that any call to
1246 * gst_element_get_state() will return GST_STATE_CHANGE_ASYNC.
1247 * This is mostly used for elements that lost their preroll buffer
1248 * in the GST_STATE_PAUSED state after a flush, they become GST_STATE_PAUSED
1249 * again if a new preroll buffer is queued.
1250 * This function can only be called when the element is currently
1251 * not in error or an async state change.
1252 * This function is used internally and should normally not be called from
1253 * plugins or applications.
1254 * MT safe.
1255 * element:
1256 * a GstElement the state is lost of
1258 public void lostState()
1260 // void gst_element_lost_state (GstElement *element);
1261 gst_element_lost_state(gstElement);
1265 * Gets a string representing the given state.
1266 * state:
1267 * a GstState to get the name of.
1268 * Returns:
1269 * a string with the name of the state.
1271 public static char[] stateGetName(GstState state)
1273 // const gchar* gst_element_state_get_name (GstState state);
1274 return Str.toString(gst_element_state_get_name(state) );
1278 * Gets a string representing the given state change result.
1279 * state_ret:
1280 * a GstStateChangeReturn to get the name of.
1281 * Returns:
1282 * a string with the name of the state change result.
1284 public static char[] stateChangeReturnGetName(GstStateChangeReturn stateRet)
1286 // const gchar* gst_element_state_change_return_get_name (GstStateChangeReturn state_ret);
1287 return Str.toString(gst_element_state_change_return_get_name(stateRet) );
1291 * Tries to change the state of the element to the same as its parent.
1292 * If this function returns FALSE, the state of element is undefined.
1293 * element:
1294 * a GstElement.
1295 * Returns:
1296 * TRUE, if the element's state could be synced to the parent's state.
1297 * MT safe.
1299 public int syncStateWithParent()
1301 // gboolean gst_element_sync_state_with_parent (GstElement *element);
1302 return gst_element_sync_state_with_parent(gstElement);
1306 * Posts a message to the bus that new tags were found, and pushes an event
1307 * to all sourcepads. Takes ownership of the list.
1308 * This is a utility method for elements. Applications should use the
1309 * GstTagSetter interface.
1310 * element:
1311 * element for which we found the tags.
1312 * list:
1313 * list of tags.
1315 public void foundTags(TagList list)
1317 // void gst_element_found_tags (GstElement *element, GstTagList *list);
1318 gst_element_found_tags(gstElement, (list is null) ? null : list.getTagListStruct());
1322 * Posts a message to the bus that new tags were found and pushes the
1323 * tags as event. Takes ownership of the list.
1324 * This is a utility method for elements. Applications should use the
1325 * GstTagSetter interface.
1326 * element:
1327 * element for which to post taglist to bus.
1328 * pad:
1329 * pad on which to push tag-event.
1330 * list:
1331 * the taglist to post on the bus and create event from.
1333 public void foundTagsForPad(Pad pad, TagList list)
1335 // void gst_element_found_tags_for_pad (GstElement *element, GstPad *pad, GstTagList *list);
1336 gst_element_found_tags_for_pad(gstElement, (pad is null) ? null : pad.getPadStruct(), (list is null) ? null : list.getTagListStruct());
1340 * Post an error, warning or info message on the bus from inside an element.
1341 * type must be of GST_MESSAGE_ERROR, GST_MESSAGE_WARNING or
1342 * GST_MESSAGE_INFO.
1343 * MT safe.
1344 * element:
1345 * a GstElement to send message from
1346 * type:
1347 * the GstMessageType
1348 * domain:
1349 * the GStreamer GError domain this message belongs to
1350 * code:
1351 * the GError code belonging to the domain
1352 * text:
1353 * an allocated text string to be used as a replacement for the
1354 * default message connected to code, or NULL
1355 * debug:
1356 * an allocated debug message to be used as a replacement for the
1357 * default debugging information, or NULL
1358 * file:
1359 * the source code file where the error was generated
1360 * function:
1361 * the source code function where the error was generated
1362 * line:
1363 * the source code line where the error was generated
1365 public void messageFull(GstMessageType type, GQuark domain, int code, char[] text, char[] dbug, char[] file, char[] funct, int line)
1367 // void gst_element_message_full (GstElement *element, GstMessageType type, GQuark domain, gint code, gchar *text, gchar *debug, const gchar *file, const gchar *function, gint line);
1368 gst_element_message_full(gstElement, type, domain, code, Str.toStringz(text), Str.toStringz(dbug), Str.toStringz(file), Str.toStringz(funct), line);
1372 * Post a message on the element's GstBus. This function takes ownership of the
1373 * message; if you want to access the message after this call, you should add an
1374 * additional reference before calling.
1375 * element:
1376 * a GstElement posting the message
1377 * message:
1378 * a GstMessage to post
1379 * Returns:
1380 * TRUE if the message was successfully posted. The function returns
1381 * FALSE if the element did not have a bus.
1382 * MT safe.
1384 public int postMessage(Message message)
1386 // gboolean gst_element_post_message (GstElement *element, GstMessage *message);
1387 return gst_element_post_message(gstElement, (message is null) ? null : message.getMessageStruct());
1391 * Get an array of query types from the element.
1392 * If the element doesn't implement a query types function,
1393 * the query will be forwarded to the peer of a random linked sink pad.
1394 * element:
1395 * a GstElement to query
1396 * Returns:
1397 * An array of GstQueryType elements that should not
1398 * be freed or modified.
1399 * MT safe.
1401 public GstQueryType* getQueryTypes()
1403 // const GstQueryType* gst_element_get_query_types (GstElement *element);
1404 return gst_element_get_query_types(gstElement);
1408 * Performs a query on the given element.
1409 * For elements that don't implement a query handler, this function
1410 * forwards the query to a random srcpad or to the peer of a
1411 * random linked sinkpad of this element.
1412 * element:
1413 * a GstElement to perform the query on.
1414 * query:
1415 * the GstQuery.
1416 * Returns:
1417 * TRUE if the query could be performed.
1418 * MT safe.
1420 public int query(Query query)
1422 // gboolean gst_element_query (GstElement *element, GstQuery *query);
1423 return gst_element_query(gstElement, (query is null) ? null : query.getQueryStruct());
1427 * Queries an element to convert src_val in src_format to dest_format.
1428 * element:
1429 * a GstElement to invoke the convert query on.
1430 * src_format:
1431 * a GstFormat to convert from.
1432 * src_val:
1433 * a value to convert.
1434 * dest_format:
1435 * a pointer to the GstFormat to convert to.
1436 * dest_val:
1437 * a pointer to the result.
1438 * Returns:
1439 * TRUE if the query could be performed.
1441 public int queryConvert(GstFormat srcFormat, long srcVal, GstFormat* destFormat, long* destVal)
1443 // gboolean gst_element_query_convert (GstElement *element, GstFormat src_format, gint64 src_val, GstFormat *dest_format, gint64 *dest_val);
1444 return gst_element_query_convert(gstElement, srcFormat, srcVal, destFormat, destVal);
1448 * Queries an element for the stream position.
1449 * element:
1450 * a GstElement to invoke the position query on.
1451 * format:
1452 * a pointer to the GstFormat asked for.
1453 * On return contains the GstFormat used.
1454 * cur:
1455 * A location in which to store the current position, or NULL.
1456 * Returns:
1457 * TRUE if the query could be performed.
1459 public int queryPosition(GstFormat* format, long* cur)
1461 // gboolean gst_element_query_position (GstElement *element, GstFormat *format, gint64 *cur);
1462 return gst_element_query_position(gstElement, format, cur);
1466 * Queries an element for the total stream duration.
1467 * element:
1468 * a GstElement to invoke the duration query on.
1469 * format:
1470 * a pointer to the GstFormat asked for.
1471 * On return contains the GstFormat used.
1472 * duration:
1473 * A location in which to store the total duration, or NULL.
1474 * Returns:
1475 * TRUE if the query could be performed.
1477 public int queryDuration(GstFormat* format, long* duration)
1479 // gboolean gst_element_query_duration (GstElement *element, GstFormat *format, gint64 *duration);
1480 return gst_element_query_duration(gstElement, format, duration);
1484 * Sends an event to an element. If the element doesn't implement an
1485 * event handler, the event will be pushed on a random linked sink pad for
1486 * upstream events or a random linked source pad for downstream events.
1487 * This function takes owership of the provided event so you should
1488 * gst_event_ref() it if you want to reuse the event after this call.
1489 * element:
1490 * a GstElement to send the event to.
1491 * event:
1492 * the GstEvent to send to the element.
1493 * Returns:
1494 * TRUE if the event was handled.
1495 * MT safe.
1497 public int sendEvent(Event event)
1499 // gboolean gst_element_send_event (GstElement *element, GstEvent *event);
1500 return gst_element_send_event(gstElement, (event is null) ? null : event.getEventStruct());
1504 * Simple API to perform a seek on the given element, meaning it just seeks
1505 * to the given position relative to the start of the stream. For more complex
1506 * operations like segment seeks (e.g. for looping) or changing the playback
1507 * rate or seeking relative to the last configured playback segment you should
1508 * use gst_element_seek().
1509 * In a completely prerolled PAUSED or PLAYING pipeline, seeking is always
1510 * guaranteed to return TRUE on a seekable media type or FALSE when the media
1511 * type is certainly not seekable (such as a live stream).
1512 * Some elements allow for seeking in the READY state, in this
1513 * case they will store the seek event and execute it when they are put to
1514 * PAUSED. If the element supports seek in READY, it will always return TRUE when
1515 * it receives the event in the READY state.
1516 * element:
1517 * a GstElement to seek on
1518 * format:
1519 * a GstFormat to execute the seek in, such as GST_FORMAT_TIME
1520 * seek_flags:
1521 * seek options
1522 * seek_pos:
1523 * position to seek to (relative to the start); if you are doing
1524 * a seek in GST_FORMAT_TIME this value is in nanoseconds -
1525 * multiply with GST_SECOND to convert seconds to nanoseconds or
1526 * with GST_MSECOND to convert milliseconds to nanoseconds.
1527 * Returns:
1528 * TRUE if the seek operation succeeded (the seek might not always be
1529 * executed instantly though)
1530 * Since 0.10.7
1532 public int seekSimple(GstFormat format, GstSeekFlags seekFlags, long seekPos)
1534 // gboolean gst_element_seek_simple (GstElement *element, GstFormat format, GstSeekFlags seek_flags, gint64 seek_pos);
1535 return gst_element_seek_simple(gstElement, format, seekFlags, seekPos);
1539 * Sends a seek event to an element. See gst_event_new_seek() for the details of
1540 * the parameters. The seek event is sent to the element using
1541 * gst_element_send_event().
1542 * element:
1543 * a GstElement to send the event to.
1544 * rate:
1545 * The new playback rate
1546 * format:
1547 * The format of the seek values
1548 * flags:
1549 * The optional seek flags.
1550 * cur_type:
1551 * The type and flags for the new current position
1552 * cur:
1553 * The value of the new current position
1554 * stop_type:
1555 * The type and flags for the new stop position
1556 * stop:
1557 * The value of the new stop position
1558 * Returns:
1559 * TRUE if the event was handled.
1560 * MT safe.
1561 * Signal Details
1562 * The "no-more-pads" signal
1563 * void user_function (GstElement *gstelement,
1564 * gpointer user_data) : Run last
1565 * This signals that the element will not generate more dynamic pads.
1566 * gstelement:
1567 * the object which received the signal
1568 * user_data:
1569 * user data set when the signal handler was connected.
1571 public int seek(double rate, GstFormat format, GstSeekFlags flags, GstSeekType curType, long cur, GstSeekType stopType, long stop)
1573 // gboolean gst_element_seek (GstElement *element, gdouble rate, GstFormat format, GstSeekFlags flags, GstSeekType cur_type, gint64 cur, GstSeekType stop_type, gint64 stop);
1574 return gst_element_seek(gstElement, rate, format, flags, curType, cur, stopType, stop);