;; -*- scheme -*-
; virtual function definitions
; define-vfunc is g*mm-specific
; These are hand-written.

; GstBin

(define-vfunc add_element
  (of-object "GstBin")
  (return-type "gboolean")
  (parameters
   '("GstElement*" "element")
  )
)

(define-vfunc remove_element
  (of-object "GstBin")
  (return-type "gboolean")
  (parameters
   '("GstElement*" "element")
  )
)

(define-vfunc handle_message
  (of-object "GstBin")
  (return-type "void")
  (parameters
   '("GstMessage*" "message")
  )
)

; GstChildProxy

(define-vfunc get_child_by_index
  (of-object "GstChildProxy")
  (return-type "GstObject*")
  (parameters
   '("guint" "index")
  )
)

(define-vfunc get_children_count
  (of-object "GstChildProxy")
  (return-type "guint")
)

; GstClock

(define-vfunc change_resolution
  (of-object "GstClock")
  (return-type "GstClockTime")
  (parameters
   '("GstClockTime" "old_resolution")
   '("GstClockTime" "new_resolution")
  )
)

(define-vfunc get_resolution
  (of-object "GstClock")
  (return-type "GstClockTime")
)

(define-vfunc get_internal_time
  (of-object "GstClock")
  (return-type "GstClockTime")
)

(define-vfunc wait_async
  (of-object "GstClock")
  (return-type "GstClockReturn")
  (parameters
   '("GstClockEntry*" "entry")
  )
)

(define-vfunc unschedule
  (of-object "GstClock")
  (return-type "void")
  (parameters
   '("GstClockEntry*" "entry")
  )
)

(define-vfunc wait_jitter
  (of-object "GstClock")
  (return-type "GstClockReturn")
  (parameters
   '("GstClockEntry*" "entry")
   '("GstClockTimeDiff*" "jitter")
  )
)

; GstElement

(define-vfunc request_new_pad
  (of-object "GstElement")
  (return-type "GstPad*")
  (parameters
   '("GstPadTemplate*" "templ")
   '("const-gchar*" "name")
  )
)

(define-vfunc release_pad
  (of-object "GstElement")
  (return-type "void")
  (parameters
   '("GstPad*" "pad")
  )
)

(define-vfunc get_state
  (of-object "GstElement")
  (return-type "GstStateChangeReturn")
  (parameters
   '("GstState*" "state")
   '("GstState*" "pending")
   '("GstClockTime" "timeout")
  )
)

(define-vfunc set_state
  (of-object "GstElement")
  (return-type "GstStateChangeReturn")
  (parameters
   '("GstState" "state")
  )
)

(define-vfunc change_state
  (of-object "GstElement")
  (return-type "GstStateChangeReturn")
  (parameters
   '("GstStateChange" "transition")
  )
)

(define-vfunc set_bus
  (of-object "GstElement")
  (return-type "void")
  (parameters
   '("GstBus*" "bus")
  )
)

(define-vfunc provide_clock
  (of-object "GstElement")
  (return-type "GstClock*")
)

(define-vfunc set_clock
  (of-object "GstElement")
  (return-type "gboolean")
  (parameters
   '("GstClock*" "clock")
  )
)

(define-vfunc get_index
  (of-object "GstElement")
  (return-type "GstIndex*")
)

(define-vfunc set_index
  (of-object "GstElement")
  (return-type "void")
  (parameters
   '("GstIndex*" "index")
  )
)

(define-vfunc send_event
  (of-object "GstElement")
  (return-type "gboolean")
  (parameters
   '("GstEvent*" "event")
  )
)

(define-vfunc get_query_types
  (of-object "GstElement")
  (return-type "const-GstQueryType*")
)

(define-vfunc query
  (of-object "GstElement")
  (return-type "gboolean")
  (parameters
   '("GstQuery*" "query")
  )
)

; GstBaseSrc

(define-vfunc get_caps
  (of-object "GstBaseSrc")
  (return-type "GstCaps*")
)

(define-vfunc set_caps
  (of-object "GstBaseSrc")
  (return-type "gboolean")
  (parameters
   '("GstCaps*" "caps")
  )
)

(define-vfunc negotiate
  (of-object "GstBaseSrc")
  (return-type "gboolean")
)

(define-vfunc newsegment
  (of-object "GstBaseSrc")
  (return-type "gboolean")
)

(define-vfunc start
  (of-object "GstBaseSrc")
  (return-type "gboolean")
)

(define-vfunc stop
  (of-object "GstBaseSrc")
  (return-type "gboolean")
)

(define-vfunc get_times
  (of-object "GstBaseSrc")
  (return-type "void")
  (parameters
   '("GstBuffer*" "buffer")
   '("GstClockTime*" "start")
   '("GstClockTime*" "end")
  )
)

(define-vfunc get_size
  (of-object "GstBaseSrc")
  (return-type "gboolean")
  (parameters
   '("guint64*" "size")
  )
)

(define-vfunc is_seekable
  (of-object "GstBaseSrc")
  (return-type "gboolean")
)

(define-vfunc unlock
  (of-object "GstBaseSrc")
  (return-type "gboolean")
)

(define-vfunc event
  (of-object "GstBaseSrc")
  (return-type "gboolean")
  (parameters
   '("GstEvent*" "event")
  )
)

(define-vfunc create
  (of-object "GstBaseSrc")
  (return-type "GstFlowReturn")
  (parameters
   '("guint64" "offset")
   '("guint" "size")
   '("GstBuffer**" "buf")
  )
)

(define-vfunc do_seek
  (of-object "GstBaseSrc")
  (return-type "gboolean")
  (parameters
   '("GstSegment*" "segment")
  )
)

(define-vfunc query
  (of-object "GstBaseSrc")
  (return-type "gboolean")
  (parameters
   '("GstQuery*" "query")
  )
)

(define-vfunc check_get_range
  (of-object "GstBaseSrc")
  (return-type "gboolean")
)

(define-vfunc fixate
  (of-object "GstBaseSrc")
  (return-type "void")
  (parameters
   '("GstCaps*" "caps")
  )
)

(define-vfunc unlock_stop
  (of-object "GstBaseSrc")
  (return-type "gboolean")
)

(define-vfunc prepare_seek_segment
  (of-object "GstBaseSrc")
  (return-type "gboolean")
  (parameters
   '("GstEvent*" "seek")
   '("GstSegment*" "segment")
  )
)

; GstBaseSink

(define-vfunc get_caps
  (of-object "GstBaseSink")
  (return-type "GstCaps*")
)

(define-vfunc set_caps
  (of-object "GstBaseSink")
  (return-type "gboolean")
  (parameters
   '("GstCaps*" "caps")
  )
)

(define-vfunc buffer_alloc
  (of-object "GstBaseSink")
  (return-type "GstFlowReturn")
  (parameters
   '("guint64" "offset")
   '("guint" "size")
   '("GstCaps*" "caps")
   '("GstBuffer**" "buf")
  )
)

(define-vfunc get_times
  (of-object "GstBaseSink")
  (return-type "void")
  (parameters
   '("GstBuffer*" "buffer")
   '("GstClockTime*" "start")
   '("GstClockTime*" "end")
  )
)

(define-vfunc start
  (of-object "GstBaseSink")
  (return-type "gboolean")
)

(define-vfunc stop
  (of-object "GstBaseSink")
  (return-type "gboolean")
)

(define-vfunc unlock
  (of-object "GstBaseSink")
  (return-type "gboolean")
)

(define-vfunc event
  (of-object "GstBaseSink")
  (return-type "gboolean")
  (parameters
   '("GstEvent*" "event")
  )
)

(define-vfunc preroll
  (of-object "GstBaseSink")
  (return-type "GstFlowReturn")
  (parameters
   '("GstBuffer*" "buffer")
  )
)

(define-vfunc render
  (of-object "GstBaseSink")
  (return-type "GstFlowReturn")
  (parameters
   '("GstBuffer*" "buffer")
  )
)

(define-vfunc async_play
  (of-object "GstBaseSink")
  (return-type "GstStateChangeReturn")
)

(define-vfunc activate_pull
  (of-object "GstBaseSink")
  (return-type "gboolean")
  (parameters
   '("gboolean" "active")
  )
)

(define-vfunc fixate
  (of-object "GstBaseSink")
  (return-type "void")
  (parameters
   '("GstCaps*" "caps")
  )
)

(define-vfunc unlock_stop
  (of-object "GstBaseSink")
  (return-type "gboolean")
)

; GstBaseTransform

(define-vfunc transform_caps
  (of-object "GstBaseTransform")
  (return-type "GstCaps*")
  (parameters
   '("GstPadDirection" "direction")
   '("GstCaps*" "caps")
  )
)

(define-vfunc fixate_caps
  (of-object "GstBaseTransform")
  (return-type "void")
  (parameters
   '("GstPadDirection" "direction")
   '("GstCaps*" "caps")
   '("GstCaps*" "othercaps")
  )
)

(define-vfunc transform_size
  (of-object "GstBaseTransform")
  (return-type "gboolean")
  (parameters
   '("GstPadDirection" "direction")
   '("GstCaps*" "caps")
   '("guint" "size")
   '("GstCaps*" "othercaps")
   '("guint*" "othersize")
  )
)

(define-vfunc get_unit_size
  (of-object "GstBaseTransform")
  (return-type "gboolean")
  (parameters
   '("GstCaps*" "caps")
   '("guint*" "size")
  )
)

(define-vfunc set_caps
  (of-object "GstBaseTransform")
  (return-type "gboolean")
  (parameters
   '("GstCaps*" "incaps")
   '("GstCaps*" "outcaps")
  )
)

(define-vfunc start
  (of-object "GstBaseTransform")
  (return-type "gboolean")
)

(define-vfunc stop
  (of-object "GstBaseTransform")
  (return-type "gboolean")
)

(define-vfunc event
  (of-object "GstBaseTransform")
  (return-type "gboolean")
  (parameters
   '("GstEvent*" "event")
  )
)

(define-vfunc transform
  (of-object "GstBaseTransform")
  (return-type "GstFlowReturn")
  (parameters
   '("GstBuffer*" "inbuf")
   '("GstBuffer*" "outbuf")
  )
)
(define-vfunc transform_ip
  (of-object "GstBaseTransform")
  (return-type "GstFlowReturn")
  (parameters
   '("GstBuffer*" "buf")
  )
)

(define-vfunc prepare_output_buffer
  (of-object "GstBaseTransform")
  (return-type "GstFlowReturn")
  (parameters
   '("GstBuffer*" "input")
   '("gint" "size")
   '("GstCaps*" "caps")
   '("GstBuffer**" "buf")
  )
)

(define-vfunc src_event
  (of-object "GstBaseTransform")
  (return-type "gboolean")
  (parameters
   '("GstEvent*" "event")
  )
)

; GstColorBalance

(define-vfunc list_channels
  (of-object "GstColorBalance")
  (return-type "const-GList*")
)

(define-vfunc set_value
  (of-object "GstColorBalance")
  (return-type "void")
  (parameters
   '("GstColorBalanceChannel*" "balance")
   '("gint" "value")
  )
)

(define-vfunc get_value
  (of-object "GstColorBalance")
  (return-type "gint")
  (parameters
   '("GstColorBalanceChannel*" "balance")
  )
)

; GstMixer

(define-vfunc list_tracks
  (of-object "GstMixer")
  (return-type "const-GList*")
)

(define-vfunc get_volume
  (of-object "GstMixer")
  (return-type "void")
  (parameters
   '("GstMixerTrack*" "track")
   '("gint*" "volumes")
  )
)

(define-vfunc set_volume
  (of-object "GstMixer")
  (return-type "void")
  (parameters
   '("GstMixerTrack*" "track")
   '("gint*" "volumes")
  )
)

(define-vfunc set_mute
  (of-object "GstMixer")
  (return-type "void")
  (parameters
   '("GstMixerTrack*" "track")
   '("gboolean" "mute")
  )
)

(define-vfunc set_record
  (of-object "GstMixer")
  (return-type "void")
  (parameters
   '("GstMixerTrack*" "track")
   '("gboolean" "record")
  )
)

(define-vfunc set_option
  (of-object "GstMixer")
  (return-type "void")
  (parameters
   '("GstMixerOptions*" "opts")
   '("gchar*" "value")
  )
)

(define-vfunc get_option
  (of-object "GstMixer")
  (return-type "const-gchar*")
  (parameters
   '("GstMixerOptions*" "opts")
  )
)

; GstNavigation

(define-vfunc send_event
  (of-object "GstNavigation")
  (return-type "void")
  (parameters
   '("GstStructure*" "structure")
  )
)
