## GstElement

GstElement — Abstract base class for all pipeline elements

## Synopsis

    struct      GstElement;
    #define     GST_TYPE_ELEMENT
    #define     GST_NUM_STATES
    #define     GST_STATE                       (obj)
    #define     GST_STATE_PENDING               (obj)
    #define     GST_STATE_TRANSITION            (obj)
    #define     GST_STATE_NULL_TO_READY
    #define     GST_STATE_READY_TO_PAUSED
    #define     GST_STATE_PAUSED_TO_PLAYING
    #define     GST_STATE_PLAYING_TO_PAUSED
    #define     GST_STATE_PAUSED_TO_READY
    #define     GST_STATE_READY_TO_NULL
    #define     GST_ELEMENT_QUERY_TYPE_FUNCTION (functionname, ...)
    #define     GST_ELEMENT_FORMATS_FUNCTION    (functionname, ...)
    #define     GST_ELEMENT_EVENT_MASK_FUNCTION (functionname, ...)
    enum        GstElementFlags;
    #define     GST_ELEMENT_IS_THREAD_SUGGESTED (obj)
    #define     GST_ELEMENT_IS_EVENT_AWARE      (obj)
    #define     GST_ELEMENT_IS_DECOUPLED        (obj)
    #define     GST_ELEMENT_NAME                (obj)
    #define     GST_ELEMENT_PARENT              (obj)
    #define     GST_ELEMENT_SCHED               (obj)
    #define     GST_ELEMENT_CLOCK               (obj)
    #define     GST_ELEMENT_PADS                (obj)
    #define     GST_ELEMENT_ERROR               (el, domain, code, message, debug)
    void        (*GstElementLoopFunction)       (GstElement *element);
    void        (*GstElementPreRunFunction)     (GstElement *element);
    void        (*GstElementPostRunFunction)    (GstElement *element);
    void        gst_element_class_add_pad_template
                                                (GstElementClass *klass,
                                                 GstPadTemplate *templ);
    void        gst_element_class_install_std_props
                                                (GstElementClass *klass,
                                                 const gchar *first_name,
                                                 ...);
    void        gst_element_class_set_details   (GstElementClass *klass,
                                                 const GstElementDetails *details);
    #define     gst_element_default_deep_notify
    void        gst_element_default_error       (GObject *object,
                                                 GstObject *orig,
                                                 GError *error,
                                                 gchar *debug);
    void        gst_element_set_loop_function   (GstElement *element,
                                                 GstElementLoopFunction loop);
    #define     gst_element_get_name            (elem)
    #define     gst_element_set_name            (elem,name)
    #define     gst_element_get_parent          (elem)
    #define     gst_element_set_parent          (elem,parent)
    void        gst_element_set                 (GstElement *element,
                                                 const gchar *first_property_name,
                                                 ...);
    void        gst_element_get                 (GstElement *element,
                                                 const gchar *first_property_name,
                                                 ...);
    void        gst_element_set_valist          (GstElement *element,
                                                 const gchar *first_property_name,
                                                 va_list var_args);
    void        gst_element_get_valist          (GstElement *element,
                                                 const gchar *first_property_name,
                                                 va_list var_args);
    void        gst_element_set_property        (GstElement *element,
                                                 const gchar *property_name,
                                                 const GValue *value);
    void        gst_element_get_property        (GstElement *element,
                                                 const gchar *property_name,
                                                 GValue *value);
    void        gst_element_enable_threadsafe_properties
                                                (GstElement *element);
    void        gst_element_disable_threadsafe_properties
                                                (GstElement *element);
    void        gst_element_set_pending_properties
                                                (GstElement *element);
    gboolean    gst_element_requires_clock      (GstElement *element);
    gboolean    gst_element_provides_clock      (GstElement *element);
    GstClock*   gst_element_get_clock           (GstElement *element);
    void        gst_element_set_clock           (GstElement *element,
                                                 GstClock *clock);
    GstClockReturn gst_element_clock_wait       (GstElement *element,
                                                 GstClockID id,
                                                 GstClockTimeDiff *jitter);
    GstClockTime gst_element_get_time           (GstElement *element);
    gboolean    gst_element_wait                (GstElement *element,
                                                 GstClockTime timestamp);
    void        gst_element_set_time            (GstElement *element,
                                                 GstClockTime time);
    void        gst_element_set_time_delay      (GstElement *element,
                                                 GstClockTime time,
                                                 GstClockTime delay);
    void        gst_element_adjust_time         (GstElement *element,
                                                 GstClockTimeDiff diff);
    gboolean    gst_element_is_indexable        (GstElement *element);
    void        gst_element_set_index           (GstElement *element,
                                                 GstIndex *index);
    GstIndex*   gst_element_get_index           (GstElement *element);
    gboolean    gst_element_release_locks       (GstElement *element);
    void        gst_element_yield               (GstElement *element);
    gboolean    gst_element_interrupt           (GstElement *element);
    void        gst_element_set_scheduler       (GstElement *element,
                                                 GstScheduler *sched);
    GstScheduler* gst_element_get_scheduler     (GstElement *element);
    void        gst_element_add_pad             (GstElement *element,
                                                 GstPad *pad);
    void        gst_element_remove_pad          (GstElement *element,
                                                 GstPad *pad);
    GstPad*     gst_element_add_ghost_pad       (GstElement *element,
                                                 GstPad *pad,
                                                 const gchar *name);
    void        gst_element_remove_ghost_pad    (GstElement *element,
                                                 GstPad *pad);
    GstPad*     gst_element_get_pad             (GstElement *element,
                                                 const gchar *name);
    GstPad*     gst_element_get_static_pad      (GstElement *element,
                                                 const gchar *name);
    GstPad*     gst_element_get_request_pad     (GstElement *element,
                                                 const gchar *name);
    void        gst_element_release_request_pad (GstElement *element,
                                                 GstPad *pad);
    G_CONST_RETURN GList* gst_element_get_pad_list
                                                (GstElement *element);
    GstPad*     gst_element_get_compatible_pad  (GstElement *element,
                                                 GstPad *pad);
    GstPad*     gst_element_get_compatible_pad_filtered
                                                (GstElement *element,
                                                 GstPad *pad,
                                                 const GstCaps *filtercaps);
    GstPadTemplate* gst_element_class_get_pad_template
                                                (GstElementClass *element_class,
                                                 const gchar *name);
    GList*      gst_element_class_get_pad_template_list
                                                (GstElementClass *element_class);
    GstPadTemplate* gst_element_get_pad_template
                                                (GstElement *element,
                                                 const gchar *name);
    GList*      gst_element_get_pad_template_list
                                                (GstElement *element);
    GstPadTemplate* gst_element_get_compatible_pad_template
                                                (GstElement *element,
                                                 GstPadTemplate *compattempl);
    gboolean    gst_element_link                (GstElement *src,
                                                 GstElement *dest);
    gboolean    gst_element_link_many           (GstElement *element_1,
                                                 GstElement *element_2,
                                                 ...);
    gboolean    gst_element_link_filtered       (GstElement *src,
                                                 GstElement *dest,
                                                 const GstCaps *filtercaps);
    void        gst_element_unlink              (GstElement *src,
                                                 GstElement *dest);
    void        gst_element_unlink_many         (GstElement *element_1,
                                                 GstElement *element_2,
                                                 ...);
    gboolean    gst_element_link_pads           (GstElement *src,
                                                 const gchar *srcpadname,
                                                 GstElement *dest,
                                                 const gchar *destpadname);
    gboolean    gst_element_link_pads_filtered  (GstElement *src,
                                                 const gchar *srcpadname,
                                                 GstElement *dest,
                                                 const gchar *destpadname,
                                                 const GstCaps *filtercaps);
    void        gst_element_unlink_pads         (GstElement *src,
                                                 const gchar *srcpadname,
                                                 GstElement *dest,
                                                 const gchar *destpadname);
    G_CONST_RETURN GstEventMask* gst_element_get_event_masks
                                                (GstElement *element);
    gboolean    gst_element_send_event          (GstElement *element,
                                                 GstEvent *event);
    gboolean    gst_element_seek                (GstElement *element,
                                                 GstSeekType seek_type,
                                                 guint64 offset);
    G_CONST_RETURN GstQueryType* gst_element_get_query_types
                                                (GstElement *element);
    gboolean    gst_element_query               (GstElement *element,
                                                 GstQueryType type,
                                                 GstFormat *format,
                                                 gint64 *value);
    G_CONST_RETURN GstFormat* gst_element_get_formats
                                                (GstElement *element);
    gboolean    gst_element_convert             (GstElement *element,
                                                 GstFormat src_format,
                                                 gint64 src_value,
                                                 GstFormat *dest_format,
                                                 gint64 *dest_value);
    void        gst_element_found_tags          (GstElement *element,
                                                 const GstTagList *tag_list);
    void        gst_element_found_tags_for_pad  (GstElement *element,
                                                 GstPad *pad,
                                                 GstClockTime timestamp,
                                                 GstTagList *list);
    void        gst_element_set_eos             (GstElement *element);
    void        gst_element_error_full          (GstElement *element,
                                                 GQuark domain,
                                                 gint code,
                                                 gchar *message,
                                                 gchar *debug,
                                                 const gchar *file,
                                                 const gchar *function,
                                                 gint line);
    gboolean    gst_element_is_locked_state     (GstElement *element);
    void        gst_element_set_locked_state    (GstElement *element,
                                                 gboolean locked_state);
    gboolean    gst_element_sync_state_with_parent
                                                (GstElement *element);
    GstElementState gst_element_get_state       (GstElement *element);
    GstElementStateReturn gst_element_set_state (GstElement *element,
                                                 GstElementState state);
    void        gst_element_wait_state_change   (GstElement *element);
    G_CONST_RETURN gchar* gst_element_state_get_name
                                                (GstElementState state);
    GstElementFactory* gst_element_get_factory  (GstElement *element);
    GstBin*     gst_element_get_managing_bin    (GstElement *element);
    void        gst_element_no_more_pads        (GstElement *element);

## Object Hierarchy

      GObject
       +----GstObject
             +----GstElement
                   +----GstBin
                   +----GstQueue
                   +----GstAudioDec
                   +----GstPluginTemplate
                   +----VCDSrc
                   +----GstQCamSrc
                   +----GstMultiFileSink
                   +----GstVideorate
                   +----GstVideoMixer
                   +----GstVideoBox
                   +----GstMultipartDemux
                   +----GstMultipartMux
                   +----GstFFMpegColorspace
                   +----GstY4mEncode
                   +----GstWavEnc
                   +----GstVolume
                   +----GstVolEnv
                   +----GstVideotestsrc
                   +----GstVideoscale
                   +----GstVideoflip
                   +----GstVideodrop
                   +----GstVideoCrop
                   +----GstVBIDec
                   +----GstUDPSink
                   +----GstUDPSrc
                   +----GstVorbisTag
                   +----GstSynaesthesia
                   +----GstSwitch
                   +----GstAudiorate
                   +----GstStereo
                   +----GstSpeed
                   +----GstSpectrum
                   +----GstSMPTE
                   +----GstAlphaColor
                   +----GstAlpha
                   +----GstSmooth
                   +----GstSineSrc
                   +----GstSilence
                   +----GstRtpL16Enc
                   +----GstRtpL16Parse
                   +----GstRtpGSMEnc
                   +----GstRtpGSMParse
                   +----GstRTJpegEnc
                   +----GstRTJpegDec
                   +----GstPlayOnDemand
                   +----GstPassthrough
                   +----GstOverlay
                   +----GstInterleave
                   +----GstDeinterleave
                   +----GstMPEGAudioParse
                   +----GstMpegAudio
                   +----GstMpeg2Subt
                   +----Mp1VideoParse
                   +----GstMonoscope
                   +----GstMedian
                   +----GstLevel
                   +----GstMuLawEnc
                   +----GstMuLawDec
                   +----GstALawEnc
                   +----GstALawDec
                   +----GstGOOM
                   +----GstIIR
                   +----GstLPWSinc
                   +----GstBPWSinc
                   +----GstFestival
                   +----GstVideofilter
                   +----GstQuarkTV
                   +----GstDeInterlace
                   +----GstBreakMyData
                   +----GstNegotiation
                   +----GstNavSeek
                   +----GstProgressReport
                   +----GstTest
                   +----GstEFence
                   +----GstCutter
                   +----GstColorspace
                   +----GstChart
                   +----GstAuParse
                   +----Audioscale
                   +----GstAudioConvert
                   +----GstBufferFramesConvert
                   +----GstAc3Parse
                   +----GstXvidEnc
                   +----GstXvidDec
                   +----GstTheoraDec
                   +----GstTheoraEnc
                   +----GstSwfdec
                   +----GstSpeexEnc
                   +----GstSpeexDec
                   +----GstSF
                   +----GstSnapshot
                   +----GstSmoothWave
                   +----GstSidDec
                   +----GstIcecastSend
                   +----GstVideoSink
                   +----DV1394Src
                   +----GstTextOverlay
                   +----GstMusicBrainz
                   +----GstMpeg2dec
                   +----GstMikmod
                   +----GstMad
                   +----GstID3TagBase
                   +----GstPngDec
                   +----GstPngEnc
                   +----GstFameEnc
                   +----GstLame
                   +----ladspa-delay-5s
                   +----ladspa-amp-mono
                   +----ladspa-amp-stereo
                   +----ladspa-alias
                   +----ladspa-lpf
                   +----ladspa-hpf
                   +----ladspa-noise-white
                   +----ladspa-sine-faaa
                   +----ladspa-sine-faac
                   +----ladspa-sine-fcaa
                   +----ladspa-sine-fcac
                   +----ladspa-amPitchshift
                   +----ladspa-allpass-n
                   +----ladspa-allpass-l
                   +----ladspa-allpass-c
                   +----ladspa-analogueOsc
                   +----ladspa-amp
                   +----ladspa-fastLookaheadLimiter
                   +----ladspa-bandpass-a-iir
                   +----ladspa-bandpass-iir
                   +----ladspa-bodeShifter
                   +----ladspa-bodeShifterCV
                   +----ladspa-bwxover-iir
                   +----ladspa-buttlow-iir
                   +----ladspa-butthigh-iir
                   +----ladspa-chebstortion
                   +----ladspa-comb
                   +----ladspa-comb-n
                   +----ladspa-comb-l
                   +----ladspa-comb-c
                   +----ladspa-combSplitter
                   +----ladspa-const
                   +----ladspa-crossoverDist
                   +----ladspa-dcRemove
                   +----ladspa-decay
                   +----ladspa-decimator
                   +----ladspa-declip
                   +----ladspa-delay-n
                   +----ladspa-delay-l
                   +----ladspa-delay-c
                   +----ladspa-delayorama
                   +----ladspa-diode
                   +----ladspa-divider
                   +----ladspa-dj-eq-mono
                   +----ladspa-dj-eq
                   +----ladspa-djFlanger
                   +----ladspa-dysonCompress
                   +----ladspa-fadDelay
                   +----ladspa-foldover
                   +----ladspa-flanger
                   +----ladspa-fmOsc
                   +----ladspa-freqTracker
                   +----ladspa-foverdrive
                   +----ladspa-giantFlange
                   +----ladspa-gate
                   +----ladspa-gongBeater
                   +----ladspa-gong
                   +----ladspa-gverb
                   +----ladspa-gsm
                   +----ladspa-matrixSpatialiser
                   +----ladspa-hardLimiter
                   +----ladspa-harmonicGen
                   +----ladspa-hermesFilter
                   +----ladspa-highpass-iir
                   +----ladspa-hilbert
                   +----ladspa-imp
                   +----ladspa-impulse-fc
                   +----ladspa-inv
                   +----ladspa-karaoke
                   +----ladspa-lcrDelay
                   +----ladspa-lowpass-iir
                   +----ladspa-lsFilter
                   +----ladspa-matrixMSSt
                   +----ladspa-multivoiceChorus
                   +----ladspa-matrixStMS
                   +----ladspa-mbeq
                   +----ladspa-modDelay
                   +----ladspa-pointerCastDistortion
                   +----ladspa-notch-iir
                   +----ladspa-lfoPhaser
                   +----ladspa-fourByFourPole
                   +----ladspa-autoPhaser
                   +----ladspa-pitchScale
                   +----ladspa-pitchScaleHQ
                   +----ladspa-plate
                   +----ladspa-sinusWavewrapper
                   +----ladspa-rateShifter
                   +----ladspa-retroFlange
                   +----ladspa-revdelay
                   +----ladspa-ringmod-2i1o
                   +----ladspa-ringmod-1i1o1l
                   +----ladspa-satanMaximiser
                   +----ladspa-sc1
                   +----ladspa-sc2
                   +----ladspa-sc3
                   +----ladspa-sc4
                   +----ladspa-se4
                   +----ladspa-shaper
                   +----ladspa-sifter
                   +----ladspa-sinCos
                   +----ladspa-singlePara
                   +----ladspa-surroundEncoder
                   +----ladspa-smoothDecimate
                   +----ladspa-split
                   +----ladspa-stepMuxer
                   +----ladspa-tapeDelay
                   +----ladspa-svf
                   +----ladspa-waveTerrain
                   +----ladspa-transient
                   +----ladspa-triplePara
                   +----ladspa-valve
                   +----ladspa-valveRect
                   +----ladspa-vynil
                   +----ladspa-adsr
                   +----ladspa-zm1
                   +----ladspa-adsr-g+t
                   +----ladspa-amp-gaia-oa
                   +----ladspa-amp-gcia-oa
                   +----ladspa-difference-iama-oa
                   +----ladspa-difference-iamc-oa
                   +----ladspa-difference-icma-oa
                   +----ladspa-difference-icmc-oc
                   +----ladspa-branch-ia-oaoa
                   +----ladspa-branch-ic-ococ
                   +----ladspa-dahdsr-g+t-audio
                   +----ladspa-dahdsr-g+t-control
                   +----ladspa-dahdsr-cg+t-control
                   +----ladspa-interpolator
                   +----ladspa-fmod-fama-oa
                   +----ladspa-fmod-famc-oa
                   +----ladspa-fmod-fcma-oa
                   +----ladspa-fmod-fcmc-oc
                   +----ladspa-quantiser100
                   +----ladspa-lp4pole-faraia-oa
                   +----ladspa-lp4pole-fcrcia-oa
                   +----ladspa-product-iaia-oa
                   +----ladspa-product-iaic-oa
                   +----ladspa-product-icic-oc
                   +----ladspa-pulse-fapa-oa
                   +----ladspa-pulse-fapc-oa
                   +----ladspa-pulse-fcpa-oa
                   +----ladspa-pulse-fcpc-oa
                   +----ladspa-quantiser20
                   +----ladspa-quantiser50
                   +----ladspa-random-fasa-oa
                   +----ladspa-random-fasc-oa
                   +----ladspa-random-fcsa-oa
                   +----ladspa-random-fcsc-oa
                   +----ladspa-ratio-nada-oa
                   +----ladspa-ratio-nadc-oa
                   +----ladspa-ratio-ncda-oa
                   +----ladspa-ratio-ncdc-oc
                   +----ladspa-sawtooth-fa-oa
                   +----ladspa-sawtooth-fc-oa
                   +----ladspa-sequencer16
                   +----ladspa-sequencer32
                   +----ladspa-sequencer64
                   +----ladspa-square-fa-oa
                   +----ladspa-square-fc-oa
                   +----ladspa-sum-iaia-oa
                   +----ladspa-sum-iaic-oa
                   +----ladspa-sum-icic-oc
                   +----ladspa-syncpulse-fapaga-oa
                   +----ladspa-syncpulse-fcpcga-oa
                   +----ladspa-syncsquare-faga-oa
                   +----ladspa-syncsquare-fcga-oa
                   +----ladspa-tracker-gaaadaia-oa
                   +----ladspa-tracker-gaacdcia-oa
                   +----ladspa-triangle-fasa-oa
                   +----ladspa-triangle-fasc-oa
                   +----ladspa-triangle-fcsa-oa
                   +----ladspa-triangle-fcsc-oa
                   +----GstJpegEnc
                   +----GstJpegDec
                   +----GstSmokeEnc
                   +----GstSmokeDec
                   +----GstHermesColorspace
                   +----GstGSMEnc
                   +----GstGSMDec
                   +----GstGnomeVFSSrc
                   +----GstGnomeVFSSink
                   +----GstGdkPixbuf
                   +----GstPixbufScale
                   +----GstFaad
                   +----GstEsdsink
                   +----GstEsdmon
                   +----DVDReadSrc
                   +----DVDNavSrc
                   +----GstDivxDec
                   +----GstDivxEnc
                   +----CDParanoia
                   +----GstArtsdsink
                   +----GstArts
                   +----GstAASink
                   +----GstAlsa
                   +----GstAggregator
                   +----GstFakeSrc
                   +----GstFakeSink
                   +----GstFdSink
                   +----GstFdSrc
                   +----GstFileSrc
                   +----GstFileSink
                   +----GstIdentity
                   +----GstMD5Sink
                   +----GstMultiFileSrc
                   +----GstPipefilter
                   +----GstShaper
                   +----GstStatistics
                   +----GstTee
                   +----GstTypeFindElement
                   +----GstSpiderIdentity
                   +----GstExample
                   +----GstMonkeysDec
                   +----ffenc_ac3
                   +----ffenc_mp2
                   +----ffenc_mpeg1video
                   +----ffenc_mpeg2video
                   +----ffenc_h263
                   +----ffenc_h263p
                   +----ffenc_flv
                   +----ffenc_rv10
                   +----ffenc_mpeg4
                   +----ffenc_msmpeg4v1
                   +----ffenc_msmpeg4v2
                   +----ffenc_msmpeg4
                   +----ffenc_wmv1
                   +----ffenc_wmv2
                   +----ffenc_mjpeg
                   +----ffenc_ljpeg
                   +----ffenc_huffyuv
                   +----ffenc_asv1
                   +----ffenc_asv2
                   +----ffenc_ffv1
                   +----ffenc_zlib
                   +----ffenc_dvvideo
                   +----ffenc_adpcm_ima_qt
                   +----ffenc_adpcm_ima_wav
                   +----ffenc_adpcm_ima_dk3
                   +----ffenc_adpcm_ima_dk4
                   +----ffenc_adpcm_ima_ws
                   +----ffenc_adpcm_ima_smjpeg
                   +----ffenc_adpcm_ms
                   +----ffenc_adpcm_4xm
                   +----ffenc_adpcm_xa
                   +----ffenc_adpcm_adx
                   +----ffenc_adpcm_ea
                   +----ffenc_g726
                   +----ffdec_h263
                   +----ffdec_mpeg4
                   +----ffdec_msmpeg4v1
                   +----ffdec_msmpeg4v2
                   +----ffdec_msmpeg4
                   +----ffdec_wmv1
                   +----ffdec_wmv2
                   +----ffdec_h263i
                   +----ffdec_flv
                   +----ffdec_rv10
                   +----ffdec_rv20
                   +----ffdec_svq1
                   +----ffdec_svq3
                   +----ffdec_wmav1
                   +----ffdec_wmav2
                   +----ffdec_indeo3
                   +----ffdec_mpeg2video
                   +----ffdec_mpegvideo
                   +----ffdec_dvvideo
                   +----ffdec_mjpeg
                   +----ffdec_mjpegb
                   +----ffdec_sp5x
                   +----ffdec_mp3
                   +----ffdec_mace3
                   +----ffdec_mace6
                   +----ffdec_huffyuv
                   +----ffdec_ffv1
                   +----ffdec_cyuv
                   +----ffdec_h264
                   +----ffdec_vp3
                   +----ffdec_theora
                   +----ffdec_asv1
                   +----ffdec_asv2
                   +----ffdec_vcr1
                   +----ffdec_cljr
                   +----ffdec_4xm
                   +----ffdec_mdec
                   +----ffdec_roqvideo
                   +----ffdec_interplayvideo
                   +----ffdec_xan_wc3
                   +----ffdec_rpza
                   +----ffdec_cinepak
                   +----ffdec_msrle
                   +----ffdec_msvideo1
                   +----ffdec_vqavideo
                   +----ffdec_idcinvideo
                   +----ffdec_8bps
                   +----ffdec_smc
                   +----ffdec_flic
                   +----ffdec_truemotion1
                   +----ffdec_vmdvideo
                   +----ffdec_vmdaudio
                   +----ffdec_mszh
                   +----ffdec_zlib
                   +----ffdec_real_144
                   +----ffdec_real_288
                   +----ffdec_roq_dpcm
                   +----ffdec_interplay_dpcm
                   +----ffdec_xan_dpcm
                   +----ffdec_qtrle
                   +----ffdec_flac
                   +----ffdec_adpcm_ima_qt
                   +----ffdec_adpcm_ima_wav
                   +----ffdec_adpcm_ima_dk3
                   +----ffdec_adpcm_ima_dk4
                   +----ffdec_adpcm_ima_ws
                   +----ffdec_adpcm_ima_smjpeg
                   +----ffdec_adpcm_ms
                   +----ffdec_adpcm_4xm
                   +----ffdec_adpcm_xa
                   +----ffdec_adpcm_adx
                   +----ffdec_adpcm_ea
                   +----ffdec_g726
                   +----ffdemux_mpeg
                   +----ffdemux_mpegts
                   +----ffdemux_mp3
                   +----ffdemux_rm
                   +----ffdemux_asf
                   +----ffdemux_avi
                   +----ffdemux_wav
                   +----ffdemux_swf
                   +----ffdemux_au
                   +----ffdemux_gif
                   +----ffdemux_mov_mp4_m4a_3gp
                   +----ffdemux_dv
                   +----ffdemux_4xm
                   +----ffdemux_flv
                   +----ffdemux_psxstr
                   +----ffdemux_RoQ
                   +----ffdemux_ipmovie
                   +----ffdemux_wc3movie
                   +----ffdemux_wsaud
                   +----ffdemux_wsvqa
                   +----ffdemux_film_cpk
                   +----ffdemux_idcin
                   +----ffdemux_flic
                   +----ffdemux_vmd
                   +----ffdemux_yuv4mpegpipe
                   +----ffdemux_ffm
                   +----ffdemux_nut
                   +----ffdemux_matroska
                   +----ffdemux_rtsp
                   +----ffdemux_redir
                   +----ffdemux_sdp
                   +----GstFFMpegCsp
                   +----GstV4lElement
                   +----GstOssElement
                   +----GstRiffRead
                   +----GstTCPSink
                   +----GstTCPSrc
                   +----GstTCPClientSink
                   +----GstTCPClientSrc
                   +----GstMultiFdSink
                   +----GstTCPServerSrc
                   +----GstRMDemux
                   +----GstQTDemux
                   +----GstMPEGParse
                   +----GstRFC2250Enc
                   +----GstMPEG1SystemEncode
                   +----GstModPlug
                   +----GstMixMatrix
                   +----GstEbmlRead
                   +----GstEbmlWrite
                   +----GstFlxDec
                   +----GstAviMux
                   +----GstASFDemux
                   +----GstAsfMux
                   +----GstAdder
                   +----OggVorbisEnc
                   +----VorbisEnc
                   +----GstVorbisDec
                   +----GstVorbisParse
                   +----GstOggDemux
                   +----GstOggMux
                   +----FlacEnc
                   +----FlacDec
                   +----GstFlacTag
                   +----GstDVDec
                   +----GstAFSink
                   +----GstAFSrc
                   +----GstAFParse
                   +----GstA52Dec

## Known Derived Interfaces

GstElement is required by GstColorBalance, GstTuner, GstMixer, GstImplementsInterface, GstXOverlay and GstTagSetter.

## Signal Prototypes

    "eos"       void        user_function      (GstElement *gstelement,
                                                gpointer user_data);
    "error"     void        user_function      (GstElement *gstelement,
                                                GstElement *arg1,
                                                GstGError *arg2,
                                                gchar *arg3,
                                                gpointer user_data);
    "found-tag" void        user_function      (GstElement *gstelement,
                                                GstElement *arg1,
                                                GstTagList *arg2,
                                                gpointer user_data);
    "new-pad"   void        user_function      (GstElement *gstelement,
                                                GObject *arg1,
                                                gpointer user_data);
    "no-more-pads"
                void        user_function      (GstElement *gstelement,
                                                gpointer user_data);
    "pad-removed"
                void        user_function      (GstElement *gstelement,
                                                GObject *arg1,
                                                gpointer user_data);
    "state-change"
                void        user_function      (GstElement *gstelement,
                                                gint arg1,
                                                gint arg2,
                                                gpointer user_data);

## Description

GstElement is the base class needed to construct an element that can be used in a GStreamer pipeline. As such, it is not a functional entity, and cannot do anything when placed in a pipeline.

The name of a GstElement can be get with `gst_element_get_name()` and set with `gst_element_set_name()`. For speed, `GST_ELEMENT_NAME()` can be used in the core. Do not use this in plug-ins or applications in order to retain ABI compatibility.

All elements have pads (of the type GstPad). These pads link to pads on other elements. Buffers flow between these linked pads. A GstElement has a GList of GstPad structures for all their input (or sink) and output (or source) pads. Core and plug-in writers can add and remove pads with `gst_element_add_pad()` and `gst_element_remove_pad()`. Application writers can manipulate ghost pads (copies of real pads inside a bin) with `gst_element_add_ghost_pad()` and `gst_element_remove_ghost_pad()`. A pad of an element can be retrieved by name with `gst_element_get_pad()`. A GList of all pads can be retrieved with `gst_element_get_pad_list()`.

Elements can be linked through their pads. If the link is straightforward, use the `gst_element_link()` convenience function to link two elements, or `gst_element_link_many()` for more elements in a row. Use `gst_element_link_filtered()` to link two elements constrained by a specified set of GstCaps. For finer control, use `gst_element_link_pads()` and `gst_element_link_pads_filtered()` to specify the pads to link on each element by name.

Each element has a state (see GstElementState). You can get and set the state of an element with `gst_element_get_state()` and `gst_element_set_state()`. You can wait for an element to change it's state with `gst_element_wait_state_change()`. To get a string representation of a GstElementState, use `gst_element_state_get_name()`.

You can get and set a GstClock on an element using `gst_element_get_clock()` and `gst_element_set_clock()`. You can wait for the clock to reach a given GstClockTime using `gst_element_clock_wait()`.

## Details

### struct GstElement

    struct GstElement;

### GST_TYPE_ELEMENT

    #define GST_TYPE_ELEMENT		(_gst_element_type)

### GST_NUM_STATES

    #define GST_NUM_STATES 4

The maximun number of states.

### GST_STATE()

    #define GST_STATE(obj)			(GST_ELEMENT(obj)->current_state)

This macro returns the current state of the element.

`obj` : | Element to return state for.

### GST_STATE_PENDING()

    #define GST_STATE_PENDING(obj)		(GST_ELEMENT(obj)->pending_state)

This macro returns the currently pending state of the element.

`obj` : | Element to return the pending state for.

### GST_STATE_TRANSITION()

    #define GST_STATE_TRANSITION(obj)	((GST_STATE(obj)<<8) | GST_STATE_PENDING(obj))

Returns the state transition this object is going through.

`obj` : | the Element to return the state transition for

### GST_STATE_NULL_TO_READY

    #define GST_STATE_NULL_TO_READY		((GST_STATE_NULL<<8) | GST_STATE_READY)

The Element is going from the NULL state to the READY state.

### GST_STATE_READY_TO_PAUSED

    #define GST_STATE_READY_TO_PAUSED	((GST_STATE_READY<<8) | GST_STATE_PAUSED)

The Element is going from the READY state to the PAUSED state.

### GST_STATE_PAUSED_TO_PLAYING

    #define GST_STATE_PAUSED_TO_PLAYING	((GST_STATE_PAUSED<<8) | GST_STATE_PLAYING)

The Element is going from the PAUSED state to the PLAYING state.

### GST_STATE_PLAYING_TO_PAUSED

    #define GST_STATE_PLAYING_TO_PAUSED	((GST_STATE_PLAYING<<8) | GST_STATE_PAUSED)

The Element is going from the PLAYING state to the PAUSED state.

### GST_STATE_PAUSED_TO_READY

    #define GST_STATE_PAUSED_TO_READY	((GST_STATE_PAUSED<<8) | GST_STATE_READY)

The Element is going from the PAUSED state to the READY state.

### GST_STATE_READY_TO_NULL

    #define GST_STATE_READY_TO_NULL		((GST_STATE_READY<<8) | GST_STATE_NULL)

The Element is going from the READY state to the NULL state.

### GST_ELEMENT_QUERY_TYPE_FUNCTION()

    #define     GST_ELEMENT_QUERY_TYPE_FUNCTION(functionname, ...)

Helper macro to create query type functions

`functionname` : | The function name
`...` : | list of query types.

### GST_ELEMENT_FORMATS_FUNCTION()

    #define     GST_ELEMENT_FORMATS_FUNCTION(functionname, ...)

Halper macro to create element format functions

`functionname` : | The function name
`...` : | formats

### GST_ELEMENT_EVENT_MASK_FUNCTION()

    #define     GST_ELEMENT_EVENT_MASK_FUNCTION(functionname, ...)

A helper macro to create a mask function

`functionname` : | the name of the mask function
`...` : | Masks

### enum GstElementFlags

    typedef enum {
      /* element is complex (for some def.) and generally require a cothread */
      GST_ELEMENT_COMPLEX		= GST_OBJECT_FLAG_LAST,
      /* input and output pads aren't directly coupled to each other
         examples: queues, multi-output async readers, etc. */
      GST_ELEMENT_DECOUPLED,
      /* this element should be placed in a thread if at all possible */
      GST_ELEMENT_THREAD_SUGGESTED,
      /* this element, for some reason, has a loop function that performs
       * an infinite loop without calls to gst_element_yield () */
      GST_ELEMENT_INFINITE_LOOP,
      /* there is a new loopfunction ready for placement */
      GST_ELEMENT_NEW_LOOPFUNC,
      /* if this element can handle events */
      GST_ELEMENT_EVENT_AWARE,
      /* use threadsafe property get/set implementation */
      GST_ELEMENT_USE_THREADSAFE_PROPERTIES,

      /* private flags that can be used by the scheduler */
      GST_ELEMENT_SCHEDULER_PRIVATE1,
      GST_ELEMENT_SCHEDULER_PRIVATE2,

      /* ignore state changes from parent */
      GST_ELEMENT_LOCKED_STATE,

      /* element is in error */
      GST_ELEMENT_IN_ERROR,

      /* use some padding for future expansion */
      GST_ELEMENT_FLAG_LAST		= GST_OBJECT_FLAG_LAST + 16
    } GstElementFlags;

This enum defines the standard flags that an element may have.

### GST_ELEMENT_IS_THREAD_SUGGESTED()

    #define GST_ELEMENT_IS_THREAD_SUGGESTED(obj)	(GST_FLAG_IS_SET(obj,GST_ELEMENT_THREAD_SUGGESTED))

Queries whether the Element should be placed in a thread.

`obj` : | a GstElement to query

### GST_ELEMENT_IS_EVENT_AWARE()

    #define GST_ELEMENT_IS_EVENT_AWARE(obj)		(GST_FLAG_IS_SET(obj,GST_ELEMENT_EVENT_AWARE))

Query wether this element can handle events.

`obj` : | a GstElement to query

### GST_ELEMENT_IS_DECOUPLED()

    #define GST_ELEMENT_IS_DECOUPLED(obj)		(GST_FLAG_IS_SET(obj,GST_ELEMENT_DECOUPLED))

Queries if the Element is decoupled.

`obj` : | a GstElement to query

### GST_ELEMENT_NAME()

    #define GST_ELEMENT_NAME(obj)			(GST_OBJECT_NAME(obj))

Gets the name of this element. Used in the core. Not ABI-compatible.

`obj` : | A GstElement to query

### GST_ELEMENT_PARENT()

    #define GST_ELEMENT_PARENT(obj)			(GST_OBJECT_PARENT(obj))

Get the parent object of this element.

`obj` : | a GstElement to query

### GST_ELEMENT_SCHED()

    #define GST_ELEMENT_SCHED(obj)			(((GstElement*)(obj))->sched)

Get the scheduler of this element.

`obj` : | a GstElement to query

### GST_ELEMENT_CLOCK()

    #define GST_ELEMENT_CLOCK(obj)			(((GstElement*)(obj))->clock)

Get the clock of this element

`obj` : | a GstElement to query

### GST_ELEMENT_PADS()

    #define GST_ELEMENT_PADS(obj)			((obj)->pads)

Get the pads of this elements.

`obj` : | a GstElement to query

### GST_ELEMENT_ERROR()

    #define     GST_ELEMENT_ERROR(el, domain, code, message, debug)

`el` : |
`domain` : |
`code` : |
`message` : |
`debug` : |

### GstElementLoopFunction ()

    void        (*GstElementLoopFunction)       (GstElement *element);

This function type is used to specify a loop function for the element. It is passed the element in question, and is expect to return only in error circumstances.

`element` : | The element in question.

### GstElementPreRunFunction ()

    void        (*GstElementPreRunFunction)     (GstElement *element);

The signature of the function to execute after this element is scheduled.

`element` : | The element

### GstElementPostRunFunction ()

    void        (*GstElementPostRunFunction)    (GstElement *element);

The signature of the function to execute before this element is scheduled.

`element` : | The element

### gst_element_class_add_pad_template ()

    void        gst_element_class_add_pad_template
                                                (GstElementClass *klass,
                                                 GstPadTemplate *templ);

Adds a padtemplate to an element class. This is mainly used in the _base_init functions of classes.

`klass` : | the GstElementClass to add the pad template to.
`templ` : | a GstPadTemplate to add to the element class.

### gst_element_class_install_std_props ()

    void        gst_element_class_install_std_props
                                                (GstElementClass *klass,
                                                 const gchar *first_name,
                                                 ...);

Adds a list of standardized properties with types to the `klass`. the id is for the property switch in your get_prop method, and the flags determine readability / writeability.

`klass` : | the GstElementClass to add the properties to.
`first_name` : | the name of the first property. in a NULL terminated
`...` : | the id and flags of the first property, followed by further 'name', 'id', 'flags' triplets and terminated by NULL.

### gst_element_class_set_details ()

    void        gst_element_class_set_details   (GstElementClass *klass,
                                                 const GstElementDetails *details);

Sets the detailed information for a GstElementClass.

### Note

This function is for use in _base_init functions only.

`klass` : | class to set details for
`details` : | details to set

### gst_element_default_deep_notify

    #define 		gst_element_default_deep_notify 	gst_object_default_deep_notify

The default deep notify handler that prints out the property change notifications to stdout.

### gst_element_default_error ()

    void        gst_element_default_error       (GObject *object,
                                                 GstObject *orig,
                                                 GError *error,
                                                 gchar *debug);

A default error signal callback to attach to an element. The user data passed to the g_signal_connect is ignored.

The default handler will simply print the error string using g_print.

`object` : | a GObject that signalled the error.
`orig` : | the GstObject that initiated the error.
`error` : | the GError.
`debug` : | an additional debug information string, or NULL.

### gst_element_set_loop_function ()

    void        gst_element_set_loop_function   (GstElement *element,
                                                 GstElementLoopFunction loop);

This sets the loop function for the element. The function pointed to can deviate from the GstElementLoopFunction definition in type of pointer only.

NOTE: in order for this to take effect, the current loop function *must* exit. Assuming the loop function itself is the only one who will cause a new loopfunc to be assigned, this should be no problem.

`element` : | a GstElement to set the loop function of.
`loop` : | Pointer to GstElementLoopFunction.

### gst_element_get_name()

    #define			gst_element_get_name(elem)	gst_object_get_name(GST_OBJECT(elem))

Gets the name of the element.

`elem` : |
Returns : | the name of the element.

### gst_element_set_name()

    #define			gst_element_set_name(elem,name)	gst_object_set_name(GST_OBJECT(elem),name)

Sets the name of the element, getting rid of the old name if there was one.

`elem` : | a GstElement to set the name of.
`name` : | the new name of the element.

### gst_element_get_parent()

    #define			gst_element_get_parent(elem)	gst_object_get_parent(GST_OBJECT(elem))

Gets the parent of an element.

`elem` : | a GstElement to get the parent of.
Returns : | the GstObject parent of the element.

### gst_element_set_parent()

    #define			gst_element_set_parent(elem,parent)	gst_object_set_parent(GST_OBJECT(elem),parent)

Sets the parent of an element.

`elem` : | a GstElement to set the parent of.
`parent` : | the new GstObject parent of the object.

### gst_element_set ()

    void        gst_element_set                 (GstElement *element,
                                                 const gchar *first_property_name,
                                                 ...);

Sets properties on an element. If the element uses threadsafe properties, they will be queued and set on the object when it is scheduled again.

`element` : | a GstElement to set properties on.
`first_property_name` : | the first property to set.
`...` : | value of the first property, and more properties to set, ending with NULL.

### gst_element_get ()

    void        gst_element_get                 (GstElement *element,
                                                 const gchar *first_property_name,
                                                 ...);

Gets properties from an element. If the element uses threadsafe properties, the element will be locked before getting the given properties.

`element` : | a GstElement to get properties of.
`first_property_name` : | the first property to get.
`...` : | pointer to a variable to store the first property in, as well as more properties to get, ending with NULL.

### gst_element_set_valist ()

    void        gst_element_set_valist          (GstElement *element,
                                                 const gchar *first_property_name,
                                                 va_list var_args);

Sets properties on an element. If the element uses threadsafe properties, the property change will be put on the async queue.

`element` : | a GstElement to set properties on.
`first_property_name` : | the first property to set.
`var_args` : | the var_args list of other properties to get.

### gst_element_get_valist ()

    void        gst_element_get_valist          (GstElement *element,
                                                 const gchar *first_property_name,
                                                 va_list var_args);

Gets properties from an element. If the element uses threadsafe properties, the element will be locked before getting the given properties.

`element` : | a GstElement to get properties of.
`first_property_name` : | the first property to get.
`var_args` : | the var_args list of other properties to get.

### gst_element_set_property ()

    void        gst_element_set_property        (GstElement *element,
                                                 const gchar *property_name,
                                                 const GValue *value);

Sets a property on an element. If the element uses threadsafe properties, the property will be put on the async queue.

`element` : | a GstElement to set properties on.
`property_name` : | the first property to get.
`value` : | the GValue that holds the value to set.

### gst_element_get_property ()

    void        gst_element_get_property        (GstElement *element,
                                                 const gchar *property_name,
                                                 GValue *value);

Gets a property from an element. If the element uses threadsafe properties, the element will be locked before getting the given property.

`element` : | a GstElement to get properties of.
`property_name` : | the first property to get.
`value` : | the GValue to store the property value in.

### gst_element_enable_threadsafe_properties ()

    void        gst_element_enable_threadsafe_properties
                                                (GstElement *element);

Installs an asynchronous queue, a mutex and pre- and post-run functions on this element so that properties on the element can be set in a threadsafe way.

`element` : | a GstElement to enable threadsafe properties on.

### gst_element_disable_threadsafe_properties ()

    void        gst_element_disable_threadsafe_properties
                                                (GstElement *element);

Removes the threadsafe properties, post- and pre-run locks from this element.

`element` : | a GstElement to disable threadsafe properties on.

### gst_element_set_pending_properties ()

    void        gst_element_set_pending_properties
                                                (GstElement *element);

Sets all pending properties on the threadsafe properties enabled element.

`element` : | a GstElement to set the pending properties on.

### gst_element_requires_clock ()

    gboolean    gst_element_requires_clock      (GstElement *element);

Query if the element requiresd a clock

`element` : | a GstElement to query
Returns : | TRUE if the element requires a clock

### gst_element_provides_clock ()

    gboolean    gst_element_provides_clock      (GstElement *element);

Query if the element provides a clock

`element` : | a GstElement to query
Returns : | TRUE if the element provides a clock

### gst_element_get_clock ()

    GstClock*   gst_element_get_clock           (GstElement *element);

Gets the clock of the element.

`element` : | a GstElement to get the clock of.
Returns : | the GstClock of the element.

### gst_element_set_clock ()

    void        gst_element_set_clock           (GstElement *element,
                                                 GstClock *clock);

Sets the clock for the element.

`element` : | a GstElement to set the clock for.
`clock` : | the GstClock to set for the element.

### gst_element_clock_wait ()

    GstClockReturn gst_element_clock_wait       (GstElement *element,
                                                 GstClockID id,
                                                 GstClockTimeDiff *jitter);

Waits for a specific time on the clock.

`element` : | a GstElement.
`id` : | the GstClock to use.
`jitter` : | the difference between requested time and actual time.
Returns : | the GstClockReturn result of the wait operation.

### gst_element_get_time ()

    GstClockTime gst_element_get_time           (GstElement *element);

Query the element's time. FIXME: The element must use

`element` : | element to query
Returns : | the current stream time in GST_STATE_PLAYING, the element base time in GST_STATE_PAUSED, or GST_CLOCK_TIME_NONE otherwise.

### gst_element_wait ()

    gboolean    gst_element_wait                (GstElement *element,
                                                 GstClockTime timestamp);

Waits until the given relative time stamp for the element has arrived. When this function returns successfully, the relative time point specified in the timestamp has passed for this element.

### Note

This function can only be called on elements in GST_STATE_PLAYING

`element` : | element that should wait
`timestamp` : | what timestamp to wait on
Returns : | TRUE on success.

### gst_element_set_time ()

    void        gst_element_set_time            (GstElement *element,
                                                 GstClockTime time);

Sets the current time of the element. This function can be used when handling discont events. You can only call this function on an element with a clock in GST_STATE_PAUSED or GST_STATE_PLAYING. You might want to have a look at `gst_element_adjust_time()`, if you want to adjust by a difference as that is more accurate.

`element` : | element to set time on
`time` : | time to set

### gst_element_set_time_delay ()

    void        gst_element_set_time_delay      (GstElement *element,
                                                 GstClockTime time,
                                                 GstClockTime delay);

Sets the current time of the element to time - delay. This function can be used when handling discont events in elements writing to an external buffer, i. e., an audio sink that writes to a sound card that buffers the sound before playing it. The delay should be the current buffering delay.

You can only call this function on an element with a clock in GST_STATE_PAUSED or GST_STATE_PLAYING. You might want to have a look at `gst_element_adjust_time()`, if you want to adjust by a difference as that is more accurate.

`element` : | element to set time on
`time` : | time to set
`delay` : | a delay to discount from the given time

### gst_element_adjust_time ()

    void        gst_element_adjust_time         (GstElement *element,
                                                 GstClockTimeDiff diff);

Adjusts the current time of the element by the specified difference. This function can be used when handling discont events. You can only call this function on an element with a clock in GST_STATE_PAUSED or GST_STATE_PLAYING. It is more accurate than `gst_element_set_time()`.

`element` : | element to adjust time on
`diff` : | difference to adjust

### gst_element_is_indexable ()

    gboolean    gst_element_is_indexable        (GstElement *element);

Queries if the element can be indexed.

`element` : | a GstElement.
Returns : | TRUE if the element can be indexed.

### gst_element_set_index ()

    void        gst_element_set_index           (GstElement *element,
                                                 GstIndex *index);

Set the specified GstIndex on the element.

`element` : | a GstElement.
`index` : | a GstIndex.

### gst_element_get_index ()

    GstIndex*   gst_element_get_index           (GstElement *element);

Gets the index from the element.

`element` : | a GstElement.
Returns : | a GstIndex or NULL when no index was set on the element.

### gst_element_release_locks ()

    gboolean    gst_element_release_locks       (GstElement *element);

Instruct the element to release all the locks it is holding, such as blocking reads, waiting for the clock, ...

`element` : | a GstElement to release all locks on.
Returns : | TRUE if the locks could be released.

### gst_element_yield ()

    void        gst_element_yield               (GstElement *element);

Requests a yield operation for the element. The scheduler will typically give control to another element.

`element` : | a GstElement to yield.

### gst_element_interrupt ()

    gboolean    gst_element_interrupt           (GstElement *element);

Requests the scheduler of this element to interrupt the execution of this element and scheduler another one.

`element` : | a GstElement to interrupt.
Returns : | TRUE if the element should exit its chain/loop/get function ASAP, depending on the scheduler implementation.

### gst_element_set_scheduler ()

    void        gst_element_set_scheduler       (GstElement *element,
                                                 GstScheduler *sched);

Sets the scheduler of the element. For internal use only, unless you're writing a new bin subclass.

`element` : | a GstElement to set the scheduler of.
`sched` : | the GstScheduler to set.

### gst_element_get_scheduler ()

    GstScheduler* gst_element_get_scheduler     (GstElement *element);

Returns the scheduler of the element.

`element` : | a GstElement to get the scheduler of.
Returns : | the element's GstScheduler.

### gst_element_add_pad ()

    void        gst_element_add_pad             (GstElement *element,
                                                 GstPad *pad);

Adds a pad (link point) to `element`. `pad`'s parent will be set to `element`; see `gst_object_set_parent()` for refcounting information.

Pads are automatically activated when the element is in state PLAYING.

`element` : | a GstElement to add the pad to.
`pad` : | the GstPad to add to the element.

### gst_element_remove_pad ()

    void        gst_element_remove_pad          (GstElement *element,
                                                 GstPad *pad);

Removes `pad` from `element`. `pad` will be destroyed if it has not been referenced elsewhere.

`element` : | a GstElement to remove pad from.
`pad` : | the GstPad to remove from the element.

### gst_element_add_ghost_pad ()

    GstPad*     gst_element_add_ghost_pad       (GstElement *element,
                                                 GstPad *pad,
                                                 const gchar *name);

Creates a ghost pad from `pad`, and adds it to `element` via `gst_element_add_pad()`.

`element` : | a GstElement to add the ghost pad to.
`pad` : | the GstPad from which the new ghost pad will be created.
`name` : | the name of the new ghost pad, or NULL to assign a unique name automatically.
Returns : | the added ghost GstPad, or NULL on error.

### gst_element_remove_ghost_pad ()

    void        gst_element_remove_ghost_pad    (GstElement *element,
                                                 GstPad *pad);

Removes a ghost pad from an element. Deprecated, use `gst_element_remove_pad()` instead.

`element` : | a GstElement to remove the ghost pad from.
`pad` : | ghost GstPad to remove.

### gst_element_get_pad ()

    GstPad*     gst_element_get_pad             (GstElement *element,
                                                 const gchar *name);

Retrieves a pad from `element` by name. Tries `gst_element_get_static_pad()` first, then `gst_element_get_request_pad()`.

`element` : | a GstElement.
`name` : | the name of the pad to retrieve.
Returns : | the GstPad if found, otherwise `NULL`.

### gst_element_get_static_pad ()

    GstPad*     gst_element_get_static_pad      (GstElement *element,
                                                 const gchar *name);

Retrieves a pad from `element` by name. This version only retrieves already-existing (i.e. 'static') pads.

`element` : | a GstElement to find a static pad of.
`name` : | the name of the static GstPad to retrieve.
Returns : | the requested GstPad if found, otherwise NULL.

### gst_element_get_request_pad ()

    GstPad*     gst_element_get_request_pad     (GstElement *element,
                                                 const gchar *name);

Retrieves a pad from the element by name. This version only retrieves request pads.

`element` : | a GstElement to find a request pad of.
`name` : | the name of the request GstPad to retrieve.
Returns : | requested GstPad if found, otherwise NULL.

### gst_element_release_request_pad ()

    void        gst_element_release_request_pad (GstElement *element,
                                                 GstPad *pad);

Makes the element free the previously requested pad as obtained with `gst_element_get_request_pad()`.

`element` : | a GstElement to release the request pad of.
`pad` : | the GstPad to release.

### gst_element_get_pad_list ()

    G_CONST_RETURN GList* gst_element_get_pad_list
                                                (GstElement *element);

Retrieves a list of `element`'s pads. The list must not be modified by the calling code.

`element` : | a GstElement to get pads of.
Returns : | the GList of pads.

### gst_element_get_compatible_pad ()

    GstPad*     gst_element_get_compatible_pad  (GstElement *element,
                                                 GstPad *pad);

Looks for an unlinked pad to which the given pad can link to. It is not guaranteed that linking the pads will work, though it should work in most cases.

`element` : | a GstElement in which the pad should be found.
`pad` : | the GstPad to find a compatible one for.
Returns : | the GstPad to which a link can be made, or `NULL` if one could not be found.

### gst_element_get_compatible_pad_filtered ()

    GstPad*     gst_element_get_compatible_pad_filtered
                                                (GstElement *element,
                                                 GstPad *pad,
                                                 const GstCaps *filtercaps);

Looks for an unlinked pad to which the given pad can link. It is not guaranteed that linking the pads will work, though it should work in most cases.

`element` : | a GstElement in which the pad should be found.
`pad` : | the GstPad to find a compatible one for.
`filtercaps` : | the GstCaps to use as a filter.
Returns : | the GstPad to which a link can be made, or `NULL` if one cannot be found.

### gst_element_class_get_pad_template ()

    GstPadTemplate* gst_element_class_get_pad_template
                                                (GstElementClass *element_class,
                                                 const gchar *name);

Retrieves a padtemplate from `element_class` with the given name.

### Note

If you use this function in the GInstanceInitFunc of an object class that has subclasses, make sure to pass the g_class parameter of the GInstanceInitFunc here.

`element_class` : | a GstElementClass to get the pad template of.
`name` : | the name of the GstPadTemplate to get.
Returns : | the GstPadTemplate with the given name, or NULL if none was found. No unreferencing is necessary.

### gst_element_class_get_pad_template_list ()

    GList*      gst_element_class_get_pad_template_list
                                                (GstElementClass *element_class);

Retrieves a list of the pad templates associated with `element_class`. The list must not be modified by the calling code.

### Note

If you use this function in the GInstanceInitFunc of an object class that has subclasses, make sure to pass the g_class parameter of the GInstanceInitFunc here.

`element_class` : | a GstElementClass to get pad templates of.
Returns : | the GList of padtemplates.

### gst_element_get_pad_template ()

    GstPadTemplate* gst_element_get_pad_template
                                                (GstElement *element,
                                                 const gchar *name);

Retrieves a padtemplate from this element with the given name. (FIXME: Should be deprecated in favor of gst_element_class_get_pad_template).

`element` : | a GstElement to get the pad template of.
`name` : | the name of the GstPadTemplate to get.
Returns : | the GstPadTemplate with the given name, or NULL if none was found. No unreferencing is necessary.

### gst_element_get_pad_template_list ()

    GList*      gst_element_get_pad_template_list
                                                (GstElement *element);

Retrieves a list of the pad templates associated with the element. (FIXME: Should be deprecated in favor of gst_element_class_get_pad_template_list).

`element` : | a GstElement to get pad templates of.
Returns : | the GList of padtemplates.

### gst_element_get_compatible_pad_template ()

    GstPadTemplate* gst_element_get_compatible_pad_template
                                                (GstElement *element,
                                                 GstPadTemplate *compattempl);

Retrieves a pad template from `element` that is compatible with `compattempl`. Pads from compatible templates can be linked together.

`element` : | a GstElement to get a compatible pad template for.
`compattempl` : | the GstPadTemplate to find a compatible template for.
Returns : | a compatible GstPadTemplate, or NULL if none was found. No unreferencing is necessary.

### gst_element_link ()

    gboolean    gst_element_link                (GstElement *src,
                                                 GstElement *dest);

Links `src` to `dest` with no filter caps. See `gst_element_link_filtered()` for more information.

`src` : | a GstElement containing the source pad.
`dest` : | the GstElement containing the destination pad.
Returns : | TRUE if the elements could be linked, FALSE otherwise.

### gst_element_link_many ()

    gboolean    gst_element_link_many           (GstElement *element_1,
                                                 GstElement *element_2,
                                                 ...);

Chain together a series of elements. Uses `gst_element_link()`.

`element_1` : | the first GstElement in the link chain.
`element_2` : | the second GstElement in the link chain.
`...` : | the NULL-terminated list of elements to link in order.
Returns : | TRUE on success, FALSE otherwise.

### gst_element_link_filtered ()

    gboolean    gst_element_link_filtered       (GstElement *src,
                                                 GstElement *dest,
                                                 const GstCaps *filtercaps);

Links `src` to `dest`, filtered by `filtercaps`. The link must be from source to destination; the other direction will not be tried. The function looks for existing pads that aren't linked yet. It will request new pads if necessary. If multiple links are possible, only one is established.

`src` : | a GstElement containing the source pad.
`dest` : | the GstElement containing the destination pad.
`filtercaps` : | the GstCaps to use as a filter.
Returns : | TRUE if the elements could be linked, FALSE otherwise.

### gst_element_unlink ()

    void        gst_element_unlink              (GstElement *src,
                                                 GstElement *dest);

Unlinks all source pads of the source element with all sink pads of the sink element to which they are linked.

`src` : | the source GstElement to unlink.
`dest` : | the sink GstElement to unlink.

### gst_element_unlink_many ()

    void        gst_element_unlink_many         (GstElement *element_1,
                                                 GstElement *element_2,
                                                 ...);

Unlinks a series of elements. Uses `gst_element_unlink()`.

`element_1` : | the first GstElement in the link chain.
`element_2` : | the second GstElement in the link chain.
`...` : | the NULL-terminated list of elements to unlink in order.

### gst_element_link_pads ()

    gboolean    gst_element_link_pads           (GstElement *src,
                                                 const gchar *srcpadname,
                                                 GstElement *dest,
                                                 const gchar *destpadname);

Links the two named pads of the source and destination elements. Side effect is that if one of the pads has no parent, it becomes a child of the parent of the other element. If they have different parents, the link fails.

`src` : | a GstElement containing the source pad.
`srcpadname` : | the name of the GstPad in the source element.
`dest` : | the GstElement containing the destination pad.
`destpadname` : | the name of the GstPad in destination element.
Returns : | TRUE if the pads could be linked, FALSE otherwise.

### gst_element_link_pads_filtered ()

    gboolean    gst_element_link_pads_filtered  (GstElement *src,
                                                 const gchar *srcpadname,
                                                 GstElement *dest,
                                                 const gchar *destpadname,
                                                 const GstCaps *filtercaps);

Links the two named pads of the source and destination elements. Side effect is that if one of the pads has no parent, it becomes a child of the parent of the other element. If they have different parents, the link fails.

`src` : | a GstElement containing the source pad.
`srcpadname` : | the name of the GstPad in source element or NULL for any pad.
`dest` : | the GstElement containing the destination pad.
`destpadname` : | the name of the GstPad in destination element or NULL for any pad.
`filtercaps` : | the GstCaps to use as a filter.
Returns : | TRUE if the pads could be linked, FALSE otherwise.

### gst_element_unlink_pads ()

    void        gst_element_unlink_pads         (GstElement *src,
                                                 const gchar *srcpadname,
                                                 GstElement *dest,
                                                 const gchar *destpadname);

Unlinks the two named pads of the source and destination elements.

`src` : | a GstElement containing the source pad.
`srcpadname` : | the name of the GstPad in source element.
`dest` : | a GstElement containing the destination pad.
`destpadname` : | the name of the GstPad in destination element.

### gst_element_get_event_masks ()

    G_CONST_RETURN GstEventMask* gst_element_get_event_masks
                                                (GstElement *element);

Get an array of event masks from the element. If the element doesn't implement an event masks function, the query will be forwarded to a random linked sink pad.

`element` : | a GstElement to query
Returns : | An array of GstEventMask elements.

### gst_element_send_event ()

    gboolean    gst_element_send_event          (GstElement *element,
                                                 GstEvent *event);

Sends an event to an element. If the element doesn't implement an event handler, the event will be forwarded to a random sink pad.

`element` : | a GstElement to send the event to.
`event` : | the GstEvent to send to the element.
Returns : | TRUE if the event was handled.

### gst_element_seek ()

    gboolean    gst_element_seek                (GstElement *element,
                                                 GstSeekType seek_type,
                                                 guint64 offset);

Sends a seek event to an element.

`element` : | a GstElement to send the event to.
`seek_type` : | the method to use for seeking.
`offset` : | the offset to seek to.
Returns : | TRUE if the event was handled.

### gst_element_get_query_types ()

    G_CONST_RETURN GstQueryType* gst_element_get_query_types
                                                (GstElement *element);

Get an array of query types from the element. If the element doesn't implement a query types function, the query will be forwarded to a random sink pad.

`element` : | a GstElement to query
Returns : | An array of GstQueryType elements.

### gst_element_query ()

    gboolean    gst_element_query               (GstElement *element,
                                                 GstQueryType type,
                                                 GstFormat *format,
                                                 gint64 *value);

Performs a query on the given element. If the format is set to GST_FORMAT_DEFAULT and this function returns TRUE, the format pointer will hold the default format. For element that don't implement a query handler, this function forwards the query to a random usable sinkpad of this element.

`element` : | a GstElement to perform the query on.
`type` : | the GstQueryType.
`format` : | the GstFormat pointer to hold the format of the result.
`value` : | the pointer to the value of the result.
Returns : | TRUE if the query could be performed.

### gst_element_get_formats ()

    G_CONST_RETURN GstFormat* gst_element_get_formats
                                                (GstElement *element);

Get an array of formats from the element. If the element doesn't implement a formats function, the query will be forwarded to a random sink pad.

`element` : | a GstElement to query
Returns : | An array of GstFormat elements.

### gst_element_convert ()

    gboolean    gst_element_convert             (GstElement *element,
                                                 GstFormat src_format,
                                                 gint64 src_value,
                                                 GstFormat *dest_format,
                                                 gint64 *dest_value);

Invokes a conversion on the element. If the element doesn't implement a convert function, the query will be forwarded to a random sink pad.

`element` : | a GstElement to invoke the converter on.
`src_format` : | the source GstFormat.
`src_value` : | the source value.
`dest_format` : | a pointer to the destination GstFormat.
`dest_value` : | a pointer to the destination value.
Returns : | TRUE if the conversion could be performed.

### gst_element_found_tags ()

    void        gst_element_found_tags          (GstElement *element,
                                                 const GstTagList *tag_list);

This function emits the found_tags signal. This is a recursive signal, so every parent will emit that signal, too, before this function returns. Only emit this signal, when you extracted these tags out of the data stream, not when you handle an event.

`element` : | the element that found the tags
`tag_list` : | the found tags

### gst_element_found_tags_for_pad ()

    void        gst_element_found_tags_for_pad  (GstElement *element,
                                                 GstPad *pad,
                                                 GstClockTime timestamp,
                                                 GstTagList *list);

This is a convenience routine for tag finding. Most of the time you only want to push the found tags down one pad, in that case this function is for you. It takes ownership of the taglist, emits the found-tag signal and pushes a tag event down the pad.

### Note

This function may not be used in a GstPadGetFunction, because it calls `gst_pad_push()`. In those functions, call `gst_element_found_tags()`, create a tag event with `gst_event_new_tag()` and return that from your GstPadGetFunction.

`element` : | element that found the tag
`pad` : | src pad the tags correspond to
`timestamp` : | time the tags were found
`list` : | the taglist

### gst_element_set_eos ()

    void        gst_element_set_eos             (GstElement *element);

Perform the actions needed to bring the element in the EOS state.

`element` : | a GstElement to set to the EOS state.

### gst_element_error_full ()

    void        gst_element_error_full          (GstElement *element,
                                                 GQuark domain,
                                                 gint code,
                                                 gchar *message,
                                                 gchar *debug,
                                                 const gchar *file,
                                                 const gchar *function,
                                                 gint line);

Signals an error condition on an element. This function is used internally by elements. It results in the "error" signal.

`element` : | a GstElement with the error.
`domain` : | the GStreamer error domain this error belongs to.
`code` : | the error code belonging to the domain
`message` : | an allocated message to be used as a replacement for the default message connected to code, or NULL
`debug` : | an allocated debug message to be used as a replacement for the default debugging information, or NULL
`file` : | the source code file where the error was generated
`function` : | the source code function where the error was generated
`line` : | the source code line where the error was generated

### gst_element_is_locked_state ()

    gboolean    gst_element_is_locked_state     (GstElement *element);

Checks if the state of an element is locked. If the state of an element is locked, state changes of the parent don't affect the element. This way you can leave currently unused elements inside bins. Just lock their state before changing the state from GST_STATE_NULL.

`element` : | a GstElement.
Returns : | TRUE, if the element's state is locked.

### gst_element_set_locked_state ()

    void        gst_element_set_locked_state    (GstElement *element,
                                                 gboolean locked_state);

Locks the state of an element, so state changes of the parent don't affect this element anymore.

`element` : | a GstElement
`locked_state` : | TRUE to lock the element's state

### gst_element_sync_state_with_parent ()

    gboolean    gst_element_sync_state_with_parent
                                                (GstElement *element);

Tries to change the state of the element to the same as its parent. If this function returns FALSE, the state of element is undefined.

`element` : | a GstElement.
Returns : | TRUE, if the element's state could be synced to the parent's state.

### gst_element_get_state ()

    GstElementState gst_element_get_state       (GstElement *element);

Gets the state of the element.

`element` : | a GstElement to get the state of.
Returns : | the GstElementState of the element.

### gst_element_set_state ()

    GstElementStateReturn gst_element_set_state (GstElement *element,
                                                 GstElementState state);

Sets the state of the element. This function will try to set the requested state by going through all the intermediary states and calling the class's state change function for each.

`element` : | a GstElement to change state of.
`state` : | the element's new GstElementState.
Returns : | TRUE if the state was successfully set. (using GstElementStateReturn).

### gst_element_wait_state_change ()

    void        gst_element_wait_state_change   (GstElement *element);

Waits and blocks until the element changed its state.

`element` : | a GstElement to wait for a state change on.

### gst_element_state_get_name ()

    G_CONST_RETURN gchar* gst_element_state_get_name
                                                (GstElementState state);

Gets a string representing the given state.

`state` : | a GstElementState to get the name of.
Returns : | a string with the name of the state.

### gst_element_get_factory ()

    GstElementFactory* gst_element_get_factory  (GstElement *element);

Retrieves the factory that was used to create this element.

`element` : | a GstElement to request the element factory of.
Returns : | the GstElementFactory used for creating this element.

### gst_element_get_managing_bin ()

    GstBin*     gst_element_get_managing_bin    (GstElement *element);

Gets the managing bin (a pipeline or a thread, for example) of an element.

`element` : | a GstElement to get the managing bin of.
Returns : | the GstBin, or NULL on failure.

### gst_element_no_more_pads ()

    void        gst_element_no_more_pads        (GstElement *element);

Use this function to signal that the element does not expect any more pads to show up in the current pipeline. This function should be called whenever pads have been added by the element itself. Elements with GST_PAD_SOMETIMES pad templates use this in combination with autopluggers to figure out that the element is done initializing its pads.

`element` : | a GstElement

## Signals

### The "eos" signal

    void        user_function                  (GstElement *gstelement,
                                                gpointer user_data);

@:

`gstelement` : | the object which received the signal.
`user_data` : | user data set when the signal handler was connected.

### The "error" signal

    void        user_function                  (GstElement *gstelement,
                                                GstElement *arg1,
                                                GstGError *arg2,
                                                gchar *arg3,
                                                gpointer user_data);

@: @: @: @:

`gstelement` : | the object which received the signal.
`arg1` : |
`arg2` : |
`arg3` : |
`user_data` : | user data set when the signal handler was connected.

### The "found-tag" signal

    void        user_function                  (GstElement *gstelement,
                                                GstElement *arg1,
                                                GstTagList *arg2,
                                                gpointer user_data);

@: @: @:

`gstelement` : | the object which received the signal.
`arg1` : |
`arg2` : |
`user_data` : | user data set when the signal handler was connected.

### The "new-pad" signal

    void        user_function                  (GstElement *gstelement,
                                                GObject *arg1,
                                                gpointer user_data);

@: @:

`gstelement` : | the object which received the signal.
`arg1` : |
`user_data` : | user data set when the signal handler was connected.

### The "no-more-pads" signal

    void        user_function                  (GstElement *gstelement,
                                                gpointer user_data);

@:

`gstelement` : | the object which received the signal.
`user_data` : | user data set when the signal handler was connected.

### The "pad-removed" signal

    void        user_function                  (GstElement *gstelement,
                                                GObject *arg1,
                                                gpointer user_data);

@: @:

`gstelement` : | the object which received the signal.
`arg1` : |
`user_data` : | user data set when the signal handler was connected.

### The "state-change" signal

    void        user_function                  (GstElement *gstelement,
                                                gint arg1,
                                                gint arg2,
                                                gpointer user_data);

@: @: @:

`gstelement` : | the object which received the signal.
`arg1` : |
`arg2` : |
`user_data` : | user data set when the signal handler was connected.

## See Also

GstElementFactory, GstPad