gst

package module
v0.0.0-...-3d2545f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 14, 2018 License: BSD-3-Clause Imports: 7 Imported by: 0

README

gst

based on ziutek's Go bindings for GStreamer and make some fixes

Go bindings for GStreamer at a very early stage of maturity.

This package is based on GLib bindings<it's also based on ziutek's glib binding and make some fixes>. It should be goinstalable. Try

$ go get github.com/lidouf/gst
Documentation

See examples directory and http://gopkgdoc.appspot.com/pkg/github.com/ziutek/gst

To run examples use go run command:

$ cd examples
$ go run simple.go

To run live WebM example use go run live_webm.go and open http://127.0.0.1:8080 with your browser. You probably need to wait a long time for video because of small bitrate of this stream and big buffer in you browser.

PROGRESS
GStreamer
Gst                 11/12
GstBin              21/21
GstBuffer           0/71
GstBufferList       0/15
GstBus              16/24
GstCaps             14/65
GstClock            1/49
GstContext          0/12
GstControlBinding   3/6
GstElement          82/90
GstElementFactory   7/19
GstEvent            66/69
GstFormat           0/7
GstGError           1/1
GstInfo             0/86
GstIterator         0/23
GstMessage          9/88
GstObject           29/41
GstPad              120/180
GstPadTemplate      10/10
GstPipeline         13/13
GstQuery            3/96
GstSegment          0/19
GstStructure        3/69
GstTagList          2/66
GstToc              0/36
GstValue            11/89
gst-plugins-base-libs
GstDiscoverer       20/54
GstVideoOverlay     1/7

Documentation

Overview

GstBin — Base class and element that can contain other elements

GstBuffer — Data-passing buffer type

GstBufferList — Lists of buffers for data-passing

Bindings for GStreamer API

GstContext — Lightweight objects to represent element contexts

GstEvent — Structure describing events that are passed up and down a pipeline

GstGError — Categorized error messages

Bindings for GStreamer API

GstIterator — Object to retrieve multiple elements in a threadsafe way.

GstQuery — Provide functions to create queries, and to set and parse values in them.

GstBuffer — Data-passing buffer type

type converter

GstValue — GValue implementations specific to GStreamer

Index

Constants

View Source
const (
	BIN_FLAG_NO_RESYNC = BinFlags(C.GST_BIN_FLAG_NO_RESYNC)
	/* padding */
	BIN_FLAG_LAST = BinFlags(C.GST_BIN_FLAG_LAST)
)
View Source
const (
	STATE_VOID_PENDING = State(C.GST_STATE_VOID_PENDING)
	STATE_NULL         = State(C.GST_STATE_NULL)
	STATE_READY        = State(C.GST_STATE_READY)
	STATE_PAUSED       = State(C.GST_STATE_PAUSED)
	STATE_PLAYING      = State(C.GST_STATE_PLAYING)
)
View Source
const (
	STATE_CHANGE_FAILURE    = StateChangeReturn(C.GST_STATE_CHANGE_FAILURE)
	STATE_CHANGE_SUCCESS    = StateChangeReturn(C.GST_STATE_CHANGE_SUCCESS)
	STATE_CHANGE_ASYNC      = StateChangeReturn(C.GST_STATE_CHANGE_ASYNC)
	STATE_CHANGE_NO_PREROLL = StateChangeReturn(C.GST_STATE_CHANGE_NO_PREROLL)
)
View Source
const (
	STATE_CHANGE_NULL_TO_READY     = StateChange(C.GST_STATE_CHANGE_NULL_TO_READY)
	STATE_CHANGE_READY_TO_PAUSED   = StateChange(C.GST_STATE_CHANGE_READY_TO_PAUSED)
	STATE_CHANGE_PAUSED_TO_PLAYING = StateChange(C.GST_STATE_CHANGE_PAUSED_TO_PLAYING)
	STATE_CHANGE_PLAYING_TO_PAUSED = StateChange(C.GST_STATE_CHANGE_PLAYING_TO_PAUSED)
	STATE_CHANGE_PAUSED_TO_READY   = StateChange(C.GST_STATE_CHANGE_PAUSED_TO_READY)
	STATE_CHANGE_READY_TO_NULL     = StateChange(C.GST_STATE_CHANGE_READY_TO_NULL)
)
View Source
const (
	ELEMENT_FLAG_LOCKED_STATE  = ElementFlags(C.GST_ELEMENT_FLAG_LOCKED_STATE)
	ELEMENT_FLAG_SINK          = ElementFlags(C.GST_ELEMENT_FLAG_SINK)
	ELEMENT_FLAG_SOURCE        = ElementFlags(C.GST_ELEMENT_FLAG_SOURCE)
	ELEMENT_FLAG_PROVIDE_CLOCK = ElementFlags(C.GST_ELEMENT_FLAG_PROVIDE_CLOCK)
	ELEMENT_FLAG_REQUIRE_CLOCK = ElementFlags(C.GST_ELEMENT_FLAG_REQUIRE_CLOCK)
	ELEMENT_FLAG_INDEXABLE     = ElementFlags(C.GST_ELEMENT_FLAG_INDEXABLE)
	/* padding */
	ELEMENT_FLAG_LAST = ElementFlags(C.GST_ELEMENT_FLAG_LAST)
)
View Source
const (
	ELEMENT_METADATA_LONGNAME    = "long-name"
	ELEMENT_METADATA_KLASS       = "klass"
	ELEMENT_METADATA_DESCRIPTION = "description"
	ELEMENT_METADATA_AUTHOR      = "author"
	ELEMENT_METADATA_DOC_URI     = "doc-uri"
	ELEMENT_METADATA_ICON_NAME   = "icon-name"
)
View Source
const (
	EVENT_TYPE_UPSTREAM     = EventTypeFlags(C.GST_EVENT_TYPE_UPSTREAM)
	EVENT_TYPE_DOWNSTREAM   = EventTypeFlags(C.GST_EVENT_TYPE_DOWNSTREAM)
	EVENT_TYPE_SERIALIZED   = EventTypeFlags(C.GST_EVENT_TYPE_SERIALIZED)
	EVENT_TYPE_STICKY       = EventTypeFlags(C.GST_EVENT_TYPE_STICKY)
	EVENT_TYPE_STICKY_MULTI = EventTypeFlags(C.GST_EVENT_TYPE_STICKY_MULTI)
)
View Source
const (
	EVENT_UNKNOWN = EventType(C.GST_EVENT_UNKNOWN)
	/* bidirectional events */
	EVENT_FLUSH_START = EventType(C.GST_EVENT_FLUSH_START)
	EVENT_FLUSH_STOP  = EventType(C.GST_EVENT_FLUSH_STOP)
	/* downstream serialized events */
	EVENT_STREAM_START = EventType(C.GST_EVENT_STREAM_START)
	EVENT_CAPS         = EventType(C.GST_EVENT_CAPS)
	EVENT_SEGMENT      = EventType(C.GST_EVENT_SEGMENT)
	EVENT_TAG          = EventType(C.GST_EVENT_TAG)
	EVENT_BUFFERSIZE   = EventType(C.GST_EVENT_BUFFERSIZE)
	EVENT_SINK_MESSAGE = EventType(C.GST_EVENT_SINK_MESSAGE)
	EVENT_EOS          = EventType(C.GST_EVENT_EOS)
	EVENT_TOC          = EventType(C.GST_EVENT_TOC)
	EVENT_PROTECTION   = EventType(C.GST_EVENT_PROTECTION)
	/* non-sticky downstream serialized */
	EVENT_SEGMENT_DONE = EventType(C.GST_EVENT_SEGMENT_DONE)
	EVENT_GAP          = EventType(C.GST_EVENT_GAP)
	/* upstream events */
	EVENT_QOS         = EventType(C.GST_EVENT_QOS)
	EVENT_SEEK        = EventType(C.GST_EVENT_SEEK)
	EVENT_NAVIGATION  = EventType(C.GST_EVENT_NAVIGATION)
	EVENT_LATENCY     = EventType(C.GST_EVENT_LATENCY)
	EVENT_STEP        = EventType(C.GST_EVENT_STEP)
	EVENT_RECONFIGURE = EventType(C.GST_EVENT_RECONFIGURE)
	EVENT_TOC_SELECT  = EventType(C.GST_EVENT_TOC_SELECT)
	/* custom events start here */
	EVENT_CUSTOM_UPSTREAM          = EventType(C.GST_EVENT_CUSTOM_UPSTREAM)
	EVENT_CUSTOM_DOWNSTREAM        = EventType(C.GST_EVENT_CUSTOM_DOWNSTREAM)
	EVENT_CUSTOM_DOWNSTREAM_OOB    = EventType(C.GST_EVENT_CUSTOM_DOWNSTREAM_OOB)
	EVENT_CUSTOM_DOWNSTREAM_STICKY = EventType(C.GST_EVENT_CUSTOM_DOWNSTREAM_STICKY)
	EVENT_CUSTOM_BOTH              = EventType(C.GST_EVENT_CUSTOM_BOTH)
	EVENT_CUSTOM_BOTH_OOB          = EventType(C.GST_EVENT_CUSTOM_BOTH_OOB)
)
View Source
const (
	QOS_TYPE_OVERFLOW  = QOSType(C.GST_QOS_TYPE_OVERFLOW)
	QOS_TYPE_UNDERFLOW = QOSType(C.GST_QOS_TYPE_UNDERFLOW)
	QOS_TYPE_THROTTLE  = QOSType(C.GST_QOS_TYPE_THROTTLE)
)
View Source
const (
	STREAM_FLAG_NONE     = StreamFlags(C.GST_STREAM_FLAG_NONE)
	STREAM_FLAG_SPARSE   = StreamFlags(C.GST_STREAM_FLAG_SPARSE)
	STREAM_FLAG_SELECT   = StreamFlags(C.GST_STREAM_FLAG_SELECT)
	STREAM_FLAG_UNSELECT = StreamFlags(C.GST_STREAM_FLAG_UNSELECT)
)
View Source
const (
	FORMAT_UNDEFINED = Format(C.GST_FORMAT_UNDEFINED)
	FORMAT_DEFAULT   = Format(C.GST_FORMAT_DEFAULT)
	FORMAT_BYTES     = Format(C.GST_FORMAT_BYTES)
	FORMAT_TIME      = Format(C.GST_FORMAT_TIME)
	FORMAT_BUFFERS   = Format(C.GST_FORMAT_BUFFERS)
	FORMAT_PERCENT   = Format(C.GST_FORMAT_PERCENT)
)
View Source
const (
	CORE_ERROR_FAILED          = CoreError(C.GST_CORE_ERROR_FAILED)
	CORE_ERROR_TOO_LAZY        = CoreError(C.GST_CORE_ERROR_TOO_LAZY)
	CORE_ERROR_NOT_IMPLEMENTED = CoreError(C.GST_CORE_ERROR_NOT_IMPLEMENTED)
	CORE_ERROR_STATE_CHANGE    = CoreError(C.GST_CORE_ERROR_STATE_CHANGE)
	CORE_ERROR_PAD             = CoreError(C.GST_CORE_ERROR_PAD)
	CORE_ERROR_THREAD          = CoreError(C.GST_CORE_ERROR_THREAD)
	CORE_ERROR_NEGOTIATION     = CoreError(C.GST_CORE_ERROR_NEGOTIATION)
	CORE_ERROR_EVENT           = CoreError(C.GST_CORE_ERROR_EVENT)
	CORE_ERROR_SEEK            = CoreError(C.GST_CORE_ERROR_SEEK)
	CORE_ERROR_CAPS            = CoreError(C.GST_CORE_ERROR_CAPS)
	CORE_ERROR_TAG             = CoreError(C.GST_CORE_ERROR_TAG)
	CORE_ERROR_MISSING_PLUGIN  = CoreError(C.GST_CORE_ERROR_MISSING_PLUGIN)
	CORE_ERROR_CLOCK           = CoreError(C.GST_CORE_ERROR_CLOCK)
	CORE_ERROR_DISABLED        = CoreError(C.GST_CORE_ERROR_DISABLED)
	CORE_ERROR_NUM_ERRORS      = CoreError(C.GST_CORE_ERROR_NUM_ERRORS)
)
View Source
const (
	LIBRARY_ERROR_FAILED     = LibraryError(C.GST_LIBRARY_ERROR_FAILED)
	LIBRARY_ERROR_TOO_LAZY   = LibraryError(C.GST_LIBRARY_ERROR_TOO_LAZY)
	LIBRARY_ERROR_INIT       = LibraryError(C.GST_LIBRARY_ERROR_INIT)
	LIBRARY_ERROR_SHUTDOWN   = LibraryError(C.GST_LIBRARY_ERROR_SHUTDOWN)
	LIBRARY_ERROR_SETTINGS   = LibraryError(C.GST_LIBRARY_ERROR_SETTINGS)
	LIBRARY_ERROR_ENCODE     = LibraryError(C.GST_LIBRARY_ERROR_ENCODE)
	LIBRARY_ERROR_NUM_ERRORS = LibraryError(C.GST_LIBRARY_ERROR_NUM_ERRORS)
)
View Source
const (
	RESOURCE_ERROR_FAILED          = StreamError(C.GST_RESOURCE_ERROR_FAILED)
	RESOURCE_ERROR_TOO_LAZY        = StreamError(C.GST_RESOURCE_ERROR_TOO_LAZY)
	RESOURCE_ERROR_NOT_FOUND       = StreamError(C.GST_RESOURCE_ERROR_NOT_FOUND)
	RESOURCE_ERROR_BUSY            = StreamError(C.GST_RESOURCE_ERROR_BUSY)
	RESOURCE_ERROR_OPEN_READ       = StreamError(C.GST_RESOURCE_ERROR_OPEN_READ)
	RESOURCE_ERROR_OPEN_WRITE      = StreamError(C.GST_RESOURCE_ERROR_OPEN_WRITE)
	RESOURCE_ERROR_OPEN_READ_WRITE = StreamError(C.GST_RESOURCE_ERROR_OPEN_READ_WRITE)
	RESOURCE_ERROR_CLOSE           = StreamError(C.GST_RESOURCE_ERROR_CLOSE)
	RESOURCE_ERROR_READ            = StreamError(C.GST_RESOURCE_ERROR_READ)
	RESOURCE_ERROR_WRITE           = StreamError(C.GST_RESOURCE_ERROR_WRITE)
	RESOURCE_ERROR_SEEK            = StreamError(C.GST_RESOURCE_ERROR_SEEK)
	RESOURCE_ERROR_SYNC            = StreamError(C.GST_RESOURCE_ERROR_SYNC)
	RESOURCE_ERROR_SETTINGS        = StreamError(C.GST_RESOURCE_ERROR_SETTINGS)
	RESOURCE_ERROR_NO_SPACE_LEFT   = StreamError(C.GST_RESOURCE_ERROR_NO_SPACE_LEFT)
	RESOURCE_ERROR_NOT_AUTHORIZED  = StreamError(C.GST_RESOURCE_ERROR_NOT_AUTHORIZED)
	RESOURCE_ERROR_NUM_ERRORS      = StreamError(C.GST_RESOURCE_ERROR_NUM_ERRORS)
)
View Source
const (
	STREAM_ERROR_FAILED          = StreamError(C.GST_STREAM_ERROR_FAILED)
	STREAM_ERROR_TOO_LAZY        = StreamError(C.GST_STREAM_ERROR_TOO_LAZY)
	STREAM_ERROR_NOT_IMPLEMENTED = StreamError(C.GST_STREAM_ERROR_NOT_IMPLEMENTED)
	STREAM_ERROR_TYPE_NOT_FOUND  = StreamError(C.GST_STREAM_ERROR_TYPE_NOT_FOUND)
	STREAM_ERROR_WRONG_TYPE      = StreamError(C.GST_STREAM_ERROR_WRONG_TYPE)
	STREAM_ERROR_CODEC_NOT_FOUND = StreamError(C.GST_STREAM_ERROR_CODEC_NOT_FOUND)
	STREAM_ERROR_DECODE          = StreamError(C.GST_STREAM_ERROR_DECODE)
	STREAM_ERROR_ENCODE          = StreamError(C.GST_STREAM_ERROR_ENCODE)
	STREAM_ERROR_DEMUX           = StreamError(C.GST_STREAM_ERROR_DEMUX)
	STREAM_ERROR_MUX             = StreamError(C.GST_STREAM_ERROR_MUX)
	STREAM_ERROR_FORMAT          = StreamError(C.GST_STREAM_ERROR_FORMAT)
	STREAM_ERROR_DECRYPT         = StreamError(C.GST_STREAM_ERROR_DECRYPT)
	STREAM_ERROR_DECRYPT_NOKEY   = StreamError(C.GST_STREAM_ERROR_DECRYPT_NOKEY)
	STREAM_ERROR_NUM_ERRORS      = StreamError(C.GST_STREAM_ERROR_NUM_ERRORS)
)
View Source
const (
	DEBUG_GRAPH_SHOW_MEDIA_TYPE         = DebugGraphDetails(C.GST_DEBUG_GRAPH_SHOW_MEDIA_TYPE)
	DEBUG_GRAPH_SHOW_CAPS_DETAILS       = DebugGraphDetails(C.GST_DEBUG_GRAPH_SHOW_CAPS_DETAILS)
	DEBUG_GRAPH_SHOW_NON_DEFAULT_PARAMS = DebugGraphDetails(C.GST_DEBUG_GRAPH_SHOW_NON_DEFAULT_PARAMS)
	DEBUG_GRAPH_SHOW_STATES             = DebugGraphDetails(C.GST_DEBUG_GRAPH_SHOW_STATES)
	DEBUG_GRAPH_SHOW_FULL_PARAMS        = DebugGraphDetails(C.GST_DEBUG_GRAPH_SHOW_FULL_PARAMS)
	DEBUG_GRAPH_SHOW_ALL                = DebugGraphDetails(C.GST_DEBUG_GRAPH_SHOW_ALL)
	DEBUG_GRAPH_SHOW_VERBOSE            = DebugGraphDetails(C.GST_DEBUG_GRAPH_SHOW_VERBOSE)
)
View Source
const (
	ITERATOR_ITEM_SKIP = IteratorItem(C.GST_ITERATOR_ITEM_SKIP)
	ITERATOR_ITEM_PASS = IteratorItem(C.GST_ITERATOR_ITEM_PASS)
	ITERATOR_ITEM_END  = IteratorItem(C.GST_ITERATOR_ITEM_END)
)
View Source
const (
	MESSAGE_UNKNOWN          = MessageType(C.GST_MESSAGE_UNKNOWN)
	MESSAGE_EOS              = MessageType(C.GST_MESSAGE_EOS)
	MESSAGE_ERROR            = MessageType(C.GST_MESSAGE_ERROR)
	MESSAGE_WARNING          = MessageType(C.GST_MESSAGE_WARNING)
	MESSAGE_INFO             = MessageType(C.GST_MESSAGE_INFO)
	MESSAGE_TAG              = MessageType(C.GST_MESSAGE_TAG)
	MESSAGE_BUFFERING        = MessageType(C.GST_MESSAGE_BUFFERING)
	MESSAGE_STATE_CHANGED    = MessageType(C.GST_MESSAGE_STATE_CHANGED)
	MESSAGE_STATE_DIRTY      = MessageType(C.GST_MESSAGE_STATE_DIRTY)
	MESSAGE_STEP_DONE        = MessageType(C.GST_MESSAGE_STEP_DONE)
	MESSAGE_CLOCK_PROVIDE    = MessageType(C.GST_MESSAGE_CLOCK_PROVIDE)
	MESSAGE_CLOCK_LOST       = MessageType(C.GST_MESSAGE_CLOCK_LOST)
	MESSAGE_NEW_CLOCK        = MessageType(C.GST_MESSAGE_NEW_CLOCK)
	MESSAGE_STRUCTURE_CHANGE = MessageType(C.GST_MESSAGE_STRUCTURE_CHANGE)
	MESSAGE_STREAM_STATUS    = MessageType(C.GST_MESSAGE_STREAM_STATUS)
	MESSAGE_APPLICATION      = MessageType(C.GST_MESSAGE_APPLICATION)
	MESSAGE_ELEMENT          = MessageType(C.GST_MESSAGE_ELEMENT)
	MESSAGE_SEGMENT_START    = MessageType(C.GST_MESSAGE_SEGMENT_START)
	MESSAGE_SEGMENT_DONE     = MessageType(C.GST_MESSAGE_SEGMENT_DONE)
	MESSAGE_DURATION         = MessageType(C.GST_MESSAGE_DURATION)
	MESSAGE_LATENCY          = MessageType(C.GST_MESSAGE_LATENCY)
	MESSAGE_ASYNC_START      = MessageType(C.GST_MESSAGE_ASYNC_START)
	MESSAGE_ASYNC_DONE       = MessageType(C.GST_MESSAGE_ASYNC_DONE)
	MESSAGE_REQUEST_STATE    = MessageType(C.GST_MESSAGE_REQUEST_STATE)
	MESSAGE_STEP_START       = MessageType(C.GST_MESSAGE_STEP_START)
	MESSAGE_QOS              = MessageType(C.GST_MESSAGE_QOS)
	//MESSAGE_PROGRESS         = MessageType(C.GST_MESSAGE_PROGRESS)
	MESSAGE_ANY = MessageType(C.GST_MESSAGE_ANY)
)
View Source
const (
	PAD_LINK_OK              = PadLinkReturn(C.GST_PAD_LINK_OK)
	PAD_LINK_WRONG_HIERARCHY = PadLinkReturn(C.GST_PAD_LINK_WRONG_HIERARCHY)
	PAD_LINK_WAS_LINKED      = PadLinkReturn(C.GST_PAD_LINK_WAS_LINKED)
	PAD_LINK_WRONG_DIRECTION = PadLinkReturn(C.GST_PAD_LINK_WRONG_DIRECTION)
	PAD_LINK_NOFORMAT        = PadLinkReturn(C.GST_PAD_LINK_NOFORMAT)
	PAD_LINK_NOSCHED         = PadLinkReturn(C.GST_PAD_LINK_NOSCHED)
	PAD_LINK_REFUSED         = PadLinkReturn(C.GST_PAD_LINK_REFUSED)
)
View Source
const (
	PAD_UNKNOWN = PadDirection(C.GST_PAD_UNKNOWN)
	PAD_SRC     = PadDirection(C.GST_PAD_SRC)
	PAD_SINK    = PadDirection(C.GST_PAD_SINK)
)
View Source
const (
	PAD_ALWAYS    = PadPresence(C.GST_PAD_ALWAYS)
	PAD_SOMETIMES = PadPresence(C.GST_PAD_SOMETIMES)
	PAD_REQUEST   = PadPresence(C.GST_PAD_REQUEST)
)
View Source
const (
	PAD_FLAG_BLOCKED          = PadFlags(C.GST_PAD_FLAG_BLOCKED)
	PAD_FLAG_FLUSHING         = PadFlags(C.GST_PAD_FLAG_FLUSHING)
	PAD_FLAG_EOS              = PadFlags(C.GST_PAD_FLAG_EOS)
	PAD_FLAG_BLOCKING         = PadFlags(C.GST_PAD_FLAG_BLOCKING)
	PAD_FLAG_NEED_PARENT      = PadFlags(C.GST_PAD_FLAG_NEED_PARENT)
	PAD_FLAG_NEED_RECONFIGURE = PadFlags(C.GST_PAD_FLAG_NEED_RECONFIGURE)
	PAD_FLAG_PENDING_EVENTS   = PadFlags(C.GST_PAD_FLAG_PENDING_EVENTS)
	PAD_FLAG_FIXED_CAPS       = PadFlags(C.GST_PAD_FLAG_FIXED_CAPS)
	PAD_FLAG_PROXY_CAPS       = PadFlags(C.GST_PAD_FLAG_PROXY_CAPS)
	PAD_FLAG_PROXY_ALLOCATION = PadFlags(C.GST_PAD_FLAG_PROXY_ALLOCATION)
	PAD_FLAG_PROXY_SCHEDULING = PadFlags(C.GST_PAD_FLAG_PROXY_SCHEDULING)
	PAD_FLAG_ACCEPT_INTERSECT = PadFlags(C.GST_PAD_FLAG_ACCEPT_INTERSECT)
	PAD_FLAG_ACCEPT_TEMPLATE  = PadFlags(C.GST_PAD_FLAG_ACCEPT_TEMPLATE)
	/* padding */
	PAD_FLAG_LAST = PadFlags(C.GST_PAD_FLAG_LAST)
)
View Source
const (
	PAD_LINK_CHECK_NOTHING       = PadLinkCheck(C.GST_PAD_LINK_CHECK_NOTHING)
	PAD_LINK_CHECK_HIERARCHY     = PadLinkCheck(C.GST_PAD_LINK_CHECK_HIERARCHY)
	PAD_LINK_CHECK_TEMPLATE_CAPS = PadLinkCheck(C.GST_PAD_LINK_CHECK_TEMPLATE_CAPS)
	PAD_LINK_CHECK_CAPS          = PadLinkCheck(C.GST_PAD_LINK_CHECK_CAPS)
	PAD_LINK_CHECK_DEFAULT       = PadLinkCheck(C.GST_PAD_LINK_CHECK_DEFAULT)
)
View Source
const (
	FLOW_CUSTOM_SUCCESS_2 = FlowReturn(C.GST_FLOW_CUSTOM_SUCCESS_2)
	FLOW_CUSTOM_SUCCESS_1 = FlowReturn(C.GST_FLOW_CUSTOM_SUCCESS_1)
	FLOW_CUSTOM_SUCCESS   = FlowReturn(C.GST_FLOW_CUSTOM_SUCCESS)
	FLOW_OK               = FlowReturn(C.GST_FLOW_OK)
	FLOW_NOT_LINKED       = FlowReturn(C.GST_FLOW_NOT_LINKED)
	FLOW_FLUSHING         = FlowReturn(C.GST_FLOW_FLUSHING)
	FLOW_EOS              = FlowReturn(C.GST_FLOW_EOS)
	FLOW_NOT_NEGOTIATED   = FlowReturn(C.GST_FLOW_NOT_NEGOTIATED)
	FLOW_ERROR            = FlowReturn(C.GST_FLOW_ERROR)
	FLOW_NOT_SUPPORTED    = FlowReturn(C.GST_FLOW_NOT_SUPPORTED)
	FLOW_CUSTOM_ERROR     = FlowReturn(C.GST_FLOW_CUSTOM_ERROR)
	FLOW_CUSTOM_ERROR_1   = FlowReturn(C.GST_FLOW_CUSTOM_ERROR_1)
	FLOW_CUSTOM_ERROR_2   = FlowReturn(C.GST_FLOW_CUSTOM_ERROR_2)
)
View Source
const (
	GST_PAD_MODE_NONE = PadMode(C.GST_PAD_MODE_NONE)
	GST_PAD_MODE_PUSH = PadMode(C.GST_PAD_MODE_PUSH)
	GST_PAD_MODE_PULL = PadMode(C.GST_PAD_MODE_PULL)
)
View Source
const (
	PAD_PROBE_TYPE_INVALID = PadProbeType(C.GST_PAD_PROBE_TYPE_INVALID)
	/* flags to control blocking */
	PAD_PROBE_TYPE_IDLE  = PadProbeType(C.GST_PAD_PROBE_TYPE_IDLE)
	PAD_PROBE_TYPE_BLOCK = PadProbeType(C.GST_PAD_PROBE_TYPE_BLOCK)
	/* flags to select datatypes */
	PAD_PROBE_TYPE_BUFFER           = PadProbeType(C.GST_PAD_PROBE_TYPE_BUFFER)
	PAD_PROBE_TYPE_BUFFER_LIST      = PadProbeType(C.GST_PAD_PROBE_TYPE_BUFFER_LIST)
	PAD_PROBE_TYPE_EVENT_DOWNSTREAM = PadProbeType(C.GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM)
	PAD_PROBE_TYPE_EVENT_UPSTREAM   = PadProbeType(C.GST_PAD_PROBE_TYPE_EVENT_UPSTREAM)
	PAD_PROBE_TYPE_EVENT_FLUSH      = PadProbeType(C.GST_PAD_PROBE_TYPE_EVENT_FLUSH)
	PAD_PROBE_TYPE_QUERY_DOWNSTREAM = PadProbeType(C.GST_PAD_PROBE_TYPE_QUERY_DOWNSTREAM)
	PAD_PROBE_TYPE_QUERY_UPSTREAM   = PadProbeType(C.GST_PAD_PROBE_TYPE_QUERY_UPSTREAM)
	/* flags to select scheduling mode */
	PAD_PROBE_TYPE_PUSH = PadProbeType(C.GST_PAD_PROBE_TYPE_PUSH)
	PAD_PROBE_TYPE_PULL = PadProbeType(C.GST_PAD_PROBE_TYPE_PULL)
	/* flag combinations */
	PAD_PROBE_TYPE_BLOCKING         = PadProbeType(C.GST_PAD_PROBE_TYPE_BLOCKING)
	PAD_PROBE_TYPE_DATA_DOWNSTREAM  = PadProbeType(C.GST_PAD_PROBE_TYPE_DATA_DOWNSTREAM)
	PAD_PROBE_TYPE_DATA_UPSTREAM    = PadProbeType(C.GST_PAD_PROBE_TYPE_DATA_UPSTREAM)
	PAD_PROBE_TYPE_DATA_BOTH        = PadProbeType(C.GST_PAD_PROBE_TYPE_DATA_BOTH)
	PAD_PROBE_TYPE_BLOCK_DOWNSTREAM = PadProbeType(C.GST_PAD_PROBE_TYPE_BLOCK_DOWNSTREAM)
	PAD_PROBE_TYPE_BLOCK_UPSTREAM   = PadProbeType(C.GST_PAD_PROBE_TYPE_BLOCK_UPSTREAM)
	PAD_PROBE_TYPE_EVENT_BOTH       = PadProbeType(C.GST_PAD_PROBE_TYPE_EVENT_BOTH)
	PAD_PROBE_TYPE_QUERY_BOTH       = PadProbeType(C.GST_PAD_PROBE_TYPE_QUERY_BOTH)
	PAD_PROBE_TYPE_ALL_BOTH         = PadProbeType(C.GST_PAD_PROBE_TYPE_ALL_BOTH)
	PAD_PROBE_TYPE_SCHEDULING       = PadProbeType(C.GST_PAD_PROBE_TYPE_SCHEDULING)
)
View Source
const (
	GST_PAD_PROBE_DROP    = PadProbeReturn(C.GST_PAD_PROBE_DROP)
	GST_PAD_PROBE_OK      = PadProbeReturn(C.GST_PAD_PROBE_OK)
	GST_PAD_PROBE_REMOVE  = PadProbeReturn(C.GST_PAD_PROBE_REMOVE)
	GST_PAD_PROBE_PASS    = PadProbeReturn(C.GST_PAD_PROBE_PASS)
	GST_PAD_PROBE_HANDLED = PadProbeReturn(C.GST_PAD_PROBE_HANDLED)
)
View Source
const (
	QUERY_TYPE_UPSTREAM = 1 << iota
	QUERY_TYPE_DOWNSTREAM
	QUERY_TYPE_SERIALIZED
)
View Source
const (
	SEEK_FLAG_NONE      = SeekFlags(C.GST_SEEK_FLAG_NONE)
	SEEK_FLAG_FLUSH     = SeekFlags(C.GST_SEEK_FLAG_FLUSH)
	SEEK_FLAG_ACCURATE  = SeekFlags(C.GST_SEEK_FLAG_ACCURATE)
	SEEK_FLAG_KEY_UNIT  = SeekFlags(C.GST_SEEK_FLAG_KEY_UNIT)
	SEEK_FLAG_SEGMENT   = SeekFlags(C.GST_SEEK_FLAG_SEGMENT)
	SEEK_FLAG_TRICKMODE = SeekFlags(C.GST_SEEK_FLAG_TRICKMODE)
	/* FIXME 2.0: Remove _SKIP flag,
	 * which was kept for backward compat when _TRICKMODE was added */
	SEEK_FLAG_SKIP         = SeekFlags(C.GST_SEEK_FLAG_SKIP)
	SEEK_FLAG_SNAP_BEFORE  = SeekFlags(C.GST_SEEK_FLAG_SNAP_BEFORE)
	SEEK_FLAG_SNAP_AFTER   = SeekFlags(C.GST_SEEK_FLAG_SNAP_AFTER)
	SEEK_FLAG_SNAP_NEAREST = SeekFlags(C.GST_SEEK_FLAG_SNAP_NEAREST)
	/* Careful to restart next flag with 1<<7 here */
	SEEK_FLAG_TRICKMODE_KEY_UNITS = SeekFlags(C.GST_SEEK_FLAG_TRICKMODE_KEY_UNITS)
	SEEK_FLAG_TRICKMODE_NO_AUDIO  = SeekFlags(C.GST_SEEK_FLAG_TRICKMODE_NO_AUDIO)
)
View Source
const (
	SEEK_TYPE_NONE = SeekType(C.GST_SEEK_TYPE_NONE)
	SEEK_TYPE_SET  = SeekType(C.GST_SEEK_TYPE_SET)
	SEEK_TYPE_END  = SeekType(C.GST_SEEK_TYPE_END)
)
View Source
const (
	TAG_MERGE_UNDEFINED   = TagMergeMode(C.GST_TAG_MERGE_UNDEFINED)
	TAG_MERGE_REPLACE_ALL = TagMergeMode(C.GST_TAG_MERGE_REPLACE_ALL)
	TAG_MERGE_REPLACE     = TagMergeMode(C.GST_TAG_MERGE_REPLACE)
	TAG_MERGE_APPEND      = TagMergeMode(C.GST_TAG_MERGE_APPEND)
	TAG_MERGE_PREPEND     = TagMergeMode(C.GST_TAG_MERGE_PREPEND)
	TAG_MERGE_KEEP        = TagMergeMode(C.GST_TAG_MERGE_KEEP)
	TAG_MERGE_KEEP_ALL    = TagMergeMode(C.GST_TAG_MERGE_KEEP_ALL)
	/* add more */
	TAG_MERGE_COUNT = TagMergeMode(C.GST_TAG_MERGE_COUNT)
)
View Source
const (
	TAG_FLAG_UNDEFINED = TagFlag(C.GST_TAG_FLAG_UNDEFINED)
	TAG_FLAG_META      = TagFlag(C.GST_TAG_FLAG_META)
	TAG_FLAG_ENCODED   = TagFlag(C.GST_TAG_FLAG_ENCODED)
	TAG_FLAG_DECODED   = TagFlag(C.GST_TAG_FLAG_DECODED)
	TAG_FLAG_COUNT     = TagFlag(C.GST_TAG_FLAG_COUNT)
)
View Source
const (
	TAG_SCOPE_STREAM = TagScope(C.GST_TAG_SCOPE_GLOBAL)
	TAG_SCOPE_GLOBAL = TagScope(C.GST_TAG_SCOPE_GLOBAL)
)
View Source
const EVENT_NUM_SHIFT = 8

Variables

View Source
var CLOCK_TIME_NONE int64 = -1
View Source
var TYPE_FOURCC, TYPE_INT_RANGE, TYPE_FRACTION glib.Type

Functions

func CheckUniqueness

func CheckUniqueness(list *glib.List, name string) bool

* Checks to see if there is any object named name in list . This function does not do any locking of any kind. You might want to protect the provided list with the lock of the owner of the list. This function will lock each GstObject in the list to compare the name, so be careful when passing a list with a locked object. Returns TRUE if a GstObject named name does not appear in list , FALSE if it does. MT safe. Grabs and releases the LOCK of each object in the list.

func ClockTimeIsValid

func ClockTimeIsValid(t int64) bool

func CoreErrorQuark

func CoreErrorQuark() glib.Quark

func Deinit

func Deinit()

func DisCovererContainerInfoGetType

func DisCovererContainerInfoGetType() glib.Type

func GetIntRangeMax

func GetIntRangeMax(value *glib.Value) int

Gets the maximum of the range specified by value . Parameters value a GValue initialized to GST_TYPE_INT_RANGE Returns the maximum of the range

func GetIntRangeMin

func GetIntRangeMin(value *glib.Value) int

Gets the minimum of the range specified by value . Parameters value a GValue initialized to GST_TYPE_INT_RANGE Returns the minimum of the range

func GetIntRangeStep

func GetIntRangeStep(value *glib.Value) int

Gets the step of the range specified by value . Parameters value a GValue initialized to GST_TYPE_INT_RANGE Returns the step of the range

func GetMessage

func GetMessage(domain glib.Quark, code int) string

func GetTagNick

func GetTagNick(tag string) string

func HoldsIntRange

func HoldsIntRange(x *glib.Value) bool

#define GST_VALUE_HOLDS_INT_RANGE(x) ((x) != NULL && G_VALUE_TYPE(x) == _gst_int_range_type)

Checks if the given GValue contains a GST_TYPE_INT_RANGE value. Parameters x the GValue to check

func Init

func Init()

func InitCheck

func InitCheck() error

func IsInitialized

func IsInitialized() bool

func LibraryErrorQuark

func LibraryErrorQuark() glib.Quark

func RegistryForkIsEnabled

func RegistryForkIsEnabled() bool

func RegistryForkSetEnabled

func RegistryForkSetEnabled(enabled bool)

func ResourceErrorQuark

func ResourceErrorQuark() glib.Quark

func SegtrapIsEnabled

func SegtrapIsEnabled() bool

func SegtrapSetEnabled

func SegtrapSetEnabled(enabled bool)

func SetIntRange

func SetIntRange(value *glib.Value, start, end int)

Sets value to the range specified by start and end . Parameters value a GValue initialized to GST_TYPE_INT_RANGE start the start of the range end the end of the range

func SetIntRangeStep

func SetIntRangeStep(value *glib.Value, start, end, step int)

Sets value to the range specified by start , end and step . Parameters value a GValue initialized to GST_TYPE_INT_RANGE start the start of the range end the end of the range step the step of the range

func StreamErrorQuark

func StreamErrorQuark() glib.Quark

func UpdateRegistry

func UpdateRegistry() bool

func Version

func Version() (uint, uint, uint, uint)

func VersionString

func VersionString() string

Types

type Bin

type Bin struct {
	Element
}

func NewBin

func NewBin(name string) *Bin

Creates a new bin with the given name. Parameters name the name of the new bin. Returns a new GstBin.

func (*Bin) Add

func (b *Bin) Add(els ...*Element) bool

Adds the given element to the bin. Sets the element's parent, and thus takes ownership of the element. An element can only be added to one bin.

If the element's pads are linked to other pads, the pads will be unlinked before the element is added to the bin. When you add an element to an already-running pipeline, you will have to take care to set the state of the newly-added element to the desired state (usually PLAYING or PAUSED, same you set the pipeline to originally) with gst_element_set_state(), or use gst_element_sync_state_with_parent(). The bin or pipeline will not take care of this for you.

MT safe. Parameters bin a GstBin element the GstElement to add. Returns TRUE if the element could be added, FALSE if the bin does not want to accept the element.

func (*Bin) AsBin

func (b *Bin) AsBin() *Bin

func (*Bin) Children

func (b *Bin) Children() *glib.List

#define GST_BIN_CHILDREN(bin) (GST_BIN_CAST(bin)->children) Gets the list with children in a bin. Parameters bin a GstBin

func (*Bin) ChildrenCookie

func (b *Bin) ChildrenCookie() uint32

#define GST_BIN_CHILDREN_COOKIE(bin) (GST_BIN_CAST(bin)->children_cookie) Gets the children cookie that watches the children list. Parameters bin a GstBin

func (*Bin) DebugToDotData

func (b *Bin) DebugToDotData(details DebugGraphDetails) string

func (*Bin) DebugToDotFile

func (b *Bin) DebugToDotFile(filename string, details DebugGraphDetails)

func (*Bin) DebugToDotFileWithTs

func (b *Bin) DebugToDotFileWithTs(filename string, details DebugGraphDetails)

func (*Bin) FindUnlinkedPad

func (b *Bin) FindUnlinkedPad(direction PadDirection) *Pad

Recursively looks for elements with an unlinked pad of the given direction within the specified bin and returns an unlinked pad if one is found, or NULL otherwise. If a pad is found, the caller owns a reference to it and should use gst_object_unref() on the pad when it is not needed any longer. Parameters bin bin in which to look for elements with unlinked pads direction whether to look for an unlinked source or sink pad Returns unlinked pad of the given direction, NULL.

func (*Bin) GetByInterface

func (b *Bin) GetByInterface(tp glib.Type) *Element

Looks for an element inside the bin that implements the given interface. If such an element is found, it returns the element. You can cast this element to the given interface afterwards. If you want all elements that implement the interface, use gst_bin_iterate_all_by_interface(). This function recurses into child bins.

MT safe. Caller owns returned reference. Parameters bin a GstBin iface the GType of an interface Returns A GstElement inside the bin implementing the interface.

func (*Bin) GetByName

func (b *Bin) GetByName(name string) *Element

GetByName returns the element with the given name from a bin. Returns nil if no element with the given name is found in the bin. MT safe. Caller owns returned reference. Parameters bin a GstBin name the element name to search for Returns the GstElement with the given name, or NULL.

func (*Bin) GetByNameRecurseUp

func (b *Bin) GetByNameRecurseUp(name string) *Element

Gets the element with the given name from this bin. If the element is not found, a recursion is performed on the parent bin.

Returns NULL if:

no element with the given name is found in the bin

MT safe. Caller owns returned reference. Parameters bin a GstBin name the element name to search for Returns the GstElement with the given name, or NULL.

func (*Bin) IsNoResync

func (b *Bin) IsNoResync() bool

#define GST_BIN_IS_NO_RESYNC(bin) (GST_OBJECT_FLAG_IS_SET(bin,GST_BIN_FLAG_NO_RESYNC)) Check if bin will resync its state change when elements are added and removed. Parameters bin A GstBin Since: 1.0.5

func (*Bin) IterateAllByInterface

func (b *Bin) IterateAllByInterface(tp glib.Type) *Iterator

Looks for all elements inside the bin that implements the given interface. You can safely cast all returned elements to the given interface. The function recurses inside child bins. The iterator will yield a series of GstElement that should be unreffed after use.

MT safe. Caller owns returned value. Parameters bin a GstBin iface the GType of an interface Returns a GstIterator of GstElement for all elements in the bin implementing the given interface, or NULL.

func (*Bin) IterateElements

func (b *Bin) IterateElements() *Iterator

Gets an iterator for the elements in this bin.

MT safe. Caller owns returned value. Parameters bin a GstBin Returns a GstIterator of GstElement, or NULL.

func (*Bin) IterateRecurse

func (b *Bin) IterateRecurse() *Iterator

Gets an iterator for the elements in this bin. This iterator recurses into GstBin children.

MT safe. Caller owns returned value. Parameters bin a GstBin Returns a GstIterator of GstElement, or NULL.

func (*Bin) IterateSinks

func (b *Bin) IterateSinks() *Iterator

Gets an iterator for all elements in the bin that have the GST_ELEMENT_FLAG_SINK flag set.

MT safe. Caller owns returned value. Parameters bin a GstBin Returns a GstIterator of GstElement, or NULL.

func (*Bin) IterateSorted

func (b *Bin) IterateSorted() *Iterator

Gets an iterator for the elements in this bin in topologically sorted order. This means that the elements are returned from the most downstream elements (sinks) to the sources.

This function is used internally to perform the state changes of the bin elements and for clock selection.

MT safe. Caller owns returned value. Parameters bin a GstBin Returns a GstIterator of GstElement, or NULL.

func (*Bin) IterateSources

func (b *Bin) IterateSources() *Iterator

Gets an iterator for all elements in the bin that have the GST_ELEMENT_FLAG_SOURCE flag set.

MT safe. Caller owns returned value. Parameters bin a GstBin Returns a GstIterator of GstElement, or NULL.

func (*Bin) NumChildren

func (b *Bin) NumChildren() int

#define GST_BIN_NUMCHILDREN(bin) (GST_BIN_CAST(bin)->numchildren) Gets the number of children in a bin. Parameters bin a GstBin

func (*Bin) RecalculateLatency

func (b *Bin) RecalculateLatency() bool

Query bin for the current latency using and reconfigures this latency to all the elements with a LATENCY event.

This method is typically called on the pipeline when a GST_MESSAGE_LATENCY is posted on the bus.

This function simply emits the 'do-latency' signal so any custom latency calculations will be performed. Parameters bin a GstBin Returns TRUE if the latency could be queried and reconfigured.

func (*Bin) Remove

func (b *Bin) Remove(els ...*Element) bool

Removes the element from the bin, unparenting it as well. Unparenting the element means that the element will be dereferenced, so if the bin holds the only reference to the element, the element will be freed in the process of removing it from the bin. If you want the element to still exist after removing, you need to call gst_object_ref() before removing it from the bin.

If the element's pads are linked to other pads, the pads will be unlinked before the element is removed from the bin.

MT safe. Parameters bin a GstBin element the GstElement to remove. Returns TRUE if the element could be removed, FALSE if the bin does not want to remove the element.

func (*Bin) SyncChildrenStates

func (b *Bin) SyncChildrenStates() bool

Synchronizes the state of every child of bin with the state of bin . See also gst_element_sync_state_with_parent(). Parameters bin a GstBin Returns TRUE if syncing the state was successful for all children, otherwise FALSE. Since: 1.6

type BinFlags

type BinFlags C.GstBinFlags

type Buffer

type Buffer struct {
	glib.Object
}

func (*Buffer) AsBuffer

func (b *Buffer) AsBuffer() *Buffer

type BufferList

type BufferList struct {
	glib.Object
}

func (*BufferList) AsBuffer

func (b *BufferList) AsBuffer() *BufferList

type Bus

type Bus struct {
	GstObj
}

func NewBus

func NewBus() *Bus

func (*Bus) AddSignalWatch

func (b *Bus) AddSignalWatch()

func (*Bus) AddSignalWatchFull

func (b *Bus) AddSignalWatchFull(priority int)

func (*Bus) AsBus

func (b *Bus) AsBus() *Bus

func (*Bus) DisableSyncMessageEmission

func (b *Bus) DisableSyncMessageEmission()

func (*Bus) EnableSyncMessageEmission

func (b *Bus) EnableSyncMessageEmission()

func (*Bus) HavePending

func (b *Bus) HavePending() bool

func (*Bus) Peek

func (b *Bus) Peek() *Message

func (*Bus) Poll

func (b *Bus) Poll(events MessageType, timeout int64) *Message

func (*Bus) Pop

func (b *Bus) Pop() *Message

func (*Bus) PopFiltered

func (b *Bus) PopFiltered(types MessageType) *Message

func (*Bus) Post

func (b *Bus) Post(msg *Message) bool

func (*Bus) RemoveSignalWatch

func (b *Bus) RemoveSignalWatch()

func (*Bus) SetFlushing

func (b *Bus) SetFlushing(flushing bool)

func (*Bus) TimedPop

func (b *Bus) TimedPop(timeout uint64) *Message

func (*Bus) TimedPopFiltered

func (b *Bus) TimedPopFiltered(timeout uint64, types MessageType) *Message

type Caps

type Caps struct {
	glib.Object
}

type Caps C.GstCaps

func CapsFromString

func CapsFromString(s string) *Caps

func NewCapsAny

func NewCapsAny() *Caps

func NewCapsEmpty

func NewCapsEmpty() *Caps

func NewCapsSimple

func NewCapsSimple(media_type string, fields glib.Params) *Caps

func (*Caps) AppendStructure

func (c *Caps) AppendStructure(media_type string, fields glib.Params)

func (*Caps) GetCodecDescription

func (c *Caps) GetCodecDescription() string

func (*Caps) GetSize

func (c *Caps) GetSize() int

func (*Caps) GetStructure

func (c *Caps) GetStructure(index uint) *Structure

func (*Caps) IsAny

func (c *Caps) IsAny() bool

func (*Caps) IsEmpty

func (c *Caps) IsEmpty() bool

func (*Caps) IsFixed

func (c *Caps) IsFixed() bool

func (*Caps) Ref

func (c *Caps) Ref() *Caps

func (*Caps) RefCount

func (c *Caps) RefCount() int

func (*Caps) String

func (c *Caps) String() string

func (*Caps) Type

func (c *Caps) Type() glib.Type

func (*Caps) Unref

func (c *Caps) Unref()

func (*Caps) Value

func (c *Caps) Value() *glib.Value

type Clock

type Clock struct {
	GstObj
}

func (*Clock) AsClock

func (c *Clock) AsClock() *Clock

type ClockTime

type ClockTime C.GstClockTime

func (ClockTime) AsUint64

func (t ClockTime) AsUint64() uint64

func (ClockTime) DurationOutput

func (t ClockTime) DurationOutput() string

type Context

type Context struct {
	glib.Object
}

func (*Context) AsContext

func (o *Context) AsContext() *Context

type ControlBinding

type ControlBinding struct {
	GstObj
}

func (*ControlBinding) AsControlBinding

func (c *ControlBinding) AsControlBinding() *ControlBinding

func (*ControlBinding) IsDisabled

func (o *ControlBinding) IsDisabled() bool

Check if the control binding is disabled. Returns TRUE if the binding is inactive

func (*ControlBinding) SetDisabled

func (c *ControlBinding) SetDisabled(disabled bool)

This function is used to disable a control binding for some time, i.e. gst_object_sync_values() will do nothing.

func (*ControlBinding) SyncValues

func (c *ControlBinding) SyncValues(o *GstObj, timestamp, lastSync ClockTime) bool

Sets the property of the object , according to the GstControlSources that handle them and for the given timestamp. If this function fails, it is most likely the application developers fault. Most probably the control sources are not setup correctly. Returns TRUE if the controller value could be applied to the object property, FALSE otherwise

func (*ControlBinding) Type

func (d *ControlBinding) Type() glib.Type

type CoreError

type CoreError C.GstCoreError

type DebugGraphDetails

type DebugGraphDetails C.GstDebugGraphDetails

type Discoverer

type Discoverer struct {
	GstObj
}

func NewDiscoverer

func NewDiscoverer(timeout time.Duration) (discoverer *Discoverer, err error)

func (*Discoverer) DiscoverUri

func (d *Discoverer) DiscoverUri(uri string) (*DiscovererInfo, error)

Synchronous API

func (*Discoverer) DiscoverUriAsync

func (d *Discoverer) DiscoverUriAsync(uri string) bool

func (*Discoverer) Start

func (d *Discoverer) Start()

Asynchronous API

func (*Discoverer) Stop

func (d *Discoverer) Stop()

type DiscovererContainerInfo

type DiscovererContainerInfo C.GstDiscovererContainerInfo

func (*DiscovererContainerInfo) GetStreams

func (d *DiscovererContainerInfo) GetStreams() *glib.List

type DiscovererInfo

type DiscovererInfo C.GstDiscovererInfo

func (*DiscovererInfo) GetDuration

func (d *DiscovererInfo) GetDuration() ClockTime

func (*DiscovererInfo) GetMisc

func (d *DiscovererInfo) GetMisc() *Structure

func (*DiscovererInfo) GetResult

func (d *DiscovererInfo) GetResult() DiscovererResult

func (*DiscovererInfo) GetSeekable

func (d *DiscovererInfo) GetSeekable() bool

func (*DiscovererInfo) GetStreamInfo

func (d *DiscovererInfo) GetStreamInfo() *DiscovererStreamInfo

func (*DiscovererInfo) GetStreamList

func (d *DiscovererInfo) GetStreamList() *glib.List

func (*DiscovererInfo) GetTags

func (d *DiscovererInfo) GetTags() *TagList

func (*DiscovererInfo) GetUri

func (d *DiscovererInfo) GetUri() string

func (*DiscovererInfo) Type

func (d *DiscovererInfo) Type() glib.Type

type DiscovererResult

type DiscovererResult C.GstDiscovererResult

func (*DiscovererResult) Type

func (d *DiscovererResult) Type() glib.Type

type DiscovererStreamInfo

type DiscovererStreamInfo C.GstDiscovererStreamInfo

func (*DiscovererStreamInfo) AsContainerInfo

func (d *DiscovererStreamInfo) AsContainerInfo() *DiscovererContainerInfo

func (*DiscovererStreamInfo) GetCaps

func (d *DiscovererStreamInfo) GetCaps() *Caps

func (*DiscovererStreamInfo) GetNext

func (*DiscovererStreamInfo) GetPrevious

func (d *DiscovererStreamInfo) GetPrevious() *DiscovererStreamInfo

func (*DiscovererStreamInfo) GetStreamId

func (d *DiscovererStreamInfo) GetStreamId() string

func (*DiscovererStreamInfo) GetStreamTypeNick

func (d *DiscovererStreamInfo) GetStreamTypeNick() string

func (*DiscovererStreamInfo) GetTags

func (d *DiscovererStreamInfo) GetTags() *TagList

func (*DiscovererStreamInfo) IsContainerInfo

func (d *DiscovererStreamInfo) IsContainerInfo() bool

func (*DiscovererStreamInfo) Type

func (d *DiscovererStreamInfo) Type() glib.Type

type Element

type Element struct {
	GstObj
}

func ElementFactoryMake

func ElementFactoryMake(factory_name, name string) *Element

func (*Element) AbortState

func (e *Element) AbortState()

Abort the state change of the element. This function is used by elements that do asynchronous state changes and find out something is wrong. This function should be called with the STATE_LOCK held. MT safe.

func (*Element) AddPad

func (e *Element) AddPad(p *Pad) bool

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 not automatically activated so elements should perform the needed steps to activate the pad in case this pad is added in the PAUSED or PLAYING state. See gst_pad_set_active() for more information about activating pads. The pad and the element should be unlocked when calling this function. This function will emit the “pad-added” signal on the element. Parameters pad the GstPad to add to the element. Returns TRUE if the pad could be added. This function can fail when a pad with the same name already existed or the pad already had another parent. MT safe.

func (*Element) AsElement

func (e *Element) AsElement() *Element

func (*Element) AsVideoOverlay

func (e *Element) AsVideoOverlay() *VideoOverlay

func (*Element) ChangeState

func (e *Element) ChangeState(transition StateChange) StateChangeReturn

Perform transition on element . This function must be called with STATE_LOCK held and is mainly used internally. Parameters transition the requested transition Returns the GstStateChangeReturn of the state transition.

func (*Element) ContinueState

func (e *Element) ContinueState(ret StateChangeReturn) StateChangeReturn

Commit the state change of the element and proceed to the next pending state if any. This function is used by elements that do asynchronous state changes. The core will normally call this method automatically when an element returned GST_STATE_CHANGE_SUCCESS from the state change function. If after calling this method the element still has not reached the pending state, the next state change is performed. This method is used internally and should normally not be called by plugins or applications. Parameters ret The previous state return value Returns The result of the commit state change. MT safe.

func (*Element) CreateAllPads

func (e *Element) CreateAllPads()

Creates a pad for each pad template that is always available. This function is only useful during object initialization of subclasses of GstElement.

func (*Element) CurrentState

func (e *Element) CurrentState() State

This macro returns the current GstState of the element.

func (*Element) GetBaseTime

func (e *Element) GetBaseTime() ClockTime

Returns the base time of the element. The base time is the absolute time of the clock when this element was last put to PLAYING. Subtracting the base time from the clock time gives the running time of the element. Returns the base time of the element. MT safe.

func (*Element) GetBus

func (e *Element) GetBus() *Bus

Returns the bus of the element. Note that only a GstPipeline will provide a bus for the application. Parameters Returns the element's GstBus. unref after usage. MT safe.

func (*Element) GetClass

func (e *Element) GetClass() *ElementClass

func (*Element) GetClock

func (e *Element) GetClock() *Clock

Gets the currently configured clock of the element. This is the clock as was last set with gst_element_set_clock(). Elements in a pipeline will only have their clock set when the pipeline is in the PLAYING state. Returns the GstClock of the element. unref after usage. MT safe.

func (*Element) GetCompatiblePad

func (e *Element) GetCompatiblePad(p *Pad, c *Caps) *Pad

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. This function will first attempt to find a compatible unlinked ALWAYS pad, and if none can be found, it will request a compatible REQUEST pad by looking at the templates of element . Parameters pad the GstPad to find a compatible one for. caps 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_object_unref() after usage.

func (*Element) GetCompatiblePadTemplate

func (e *Element) GetCompatiblePadTemplate(t *PadTemplate) *PadTemplate

Retrieves a pad template from element that is compatible with compattempl . Pads from compatible templates can be linked together. Parameters compattempl the GstPadTemplate to find a compatible template for. Returns a compatible GstPadTemplate, or NULL if none was found. No unreferencing is necessary.

func (*Element) GetContext

func (e *Element) GetContext(name string) *Context

Gets the context with context_type set on the element or NULL. MT safe. Parameters context_type a name of a context to retrieve Returns A GstContext or NULL. Since: 1.8

func (*Element) GetContextUnlocked

func (e *Element) GetContextUnlocked(name string) *Context

Gets the context with context_type set on the element or NULL. Parameters context_type a name of a context to retrieve Returns A GstContext or NULL. Since: 1.8

func (*Element) GetContexts

func (e *Element) GetContexts() *glib.List

Gets the contexts set on the element. MT safe. Returns List of GstContext. Since: 1.8

func (*Element) GetFactory

func (e *Element) GetFactory() *ElementFactory

Retrieves the factory that was used to create this element. Returns the GstElementFactory used for creating this element. no refcounting is needed.

func (*Element) GetPads

func (e *Element) GetPads() *glib.List

Get the pads of this elements.

func (*Element) GetRequestPad

func (e *Element) GetRequestPad(name string) *Pad

Retrieves a pad from the element by name (e.g. "src_%d"). This version only retrieves request pads. The pad should be released with gst_element_release_request_pad(). This method is slower than manually getting the pad template and calling gst_element_request_pad() if the pads should have a specific name (e.g. name is "src_1" instead of "src_%u"). Parameters name the name of the request GstPad to retrieve. Returns requested GstPad if found, otherwise NULL. Release after usage.

func (*Element) GetStartTime

func (e *Element) GetStartTime() ClockTime

Returns the start time of the element. The start time is the running time of the clock when this element was last put to PAUSED. Usually the start_time is managed by a toplevel element such as GstPipeline. MT safe. Returns the start time of the element.

func (*Element) GetState

func (e *Element) GetState(timeout_ns int64) (state, pending State, ret StateChangeReturn)

Gets the state of the element. For elements that performed an ASYNC state change, as reported by gst_element_set_state(), this function will block up to the specified timeout value for the state change to complete. If the element completes the state change or goes into an error, this function returns immediately with a return value of GST_STATE_CHANGE_SUCCESS or GST_STATE_CHANGE_FAILURE respectively. For elements that did not return GST_STATE_CHANGE_ASYNC, this function returns the current and pending state immediately. This function returns GST_STATE_CHANGE_NO_PREROLL if the element successfully changed its state but is not able to provide data yet. This mostly happens for live sources that only produce data in GST_STATE_PLAYING. While the state change return is equivalent to GST_STATE_CHANGE_SUCCESS, it is returned to the application to signal that some sink elements might not be able to complete their state change because an element is not producing data to complete the preroll. When setting the element to playing, the preroll will complete and playback will start. Parameters timeout a GstClockTime to specify the timeout for an async state change or GST_CLOCK_TIME_NONE for infinite timeout. Returns state a pointer to GstState to hold the state. Can be NULL. pending a pointer to GstState to hold the pending state. Can be NULL. GST_STATE_CHANGE_SUCCESS if the element has no more pending state and the last state change succeeded, GST_STATE_CHANGE_ASYNC if the element is still performing a state change or GST_STATE_CHANGE_FAILURE if the last state change failed. MT safe.

func (*Element) GetStaticPad

func (e *Element) GetStaticPad(name string) *Pad

Retrieves a pad from element by name. This version only retrieves already-existing (i.e. 'static') pads. Parameters name the name of the static GstPad to retrieve. Returns the requested GstPad if found, otherwise NULL. unref after usage. MT safe.

func (*Element) GetSwitchActivePad

func (e *Element) GetSwitchActivePad() *Pad

LiD: add GetSwitchActivePad for input-selector active-pad property

func (*Element) IS_LOCKED_STATE

func (e *Element) IS_LOCKED_STATE() bool

#define GST_ELEMENT_IS_LOCKED_STATE(elem) (GST_OBJECT_FLAG_IS_SET(elem,GST_ELEMENT_FLAG_LOCKED_STATE)) Check if the element is in the locked state and therefore will ignore state changes from its parent object.

func (*Element) IsLockedState

func (e *Element) IsLockedState() bool

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. MT safe. Returns TRUE, if the element's state is locked.

func (*Element) LastReturn

func (e *Element) LastReturn() StateChangeReturn

This macro returns the last GstStateChangeReturn value.

func (e *Element) Link(next ...*Element) bool

Links src to dest . 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. Such pads need to be released manually when unlinking. If multiple links are possible, only one is established. Make sure you have added your elements to a bin or pipeline with gst_bin_add() before trying to link them. Parameters element_1 the first GstElement in the link chain. element_2 the second GstElement in the link chain. ... Returns TRUE if the elements could be linked, FALSE otherwise.

func (*Element) LinkFiltered

func (e *Element) LinkFiltered(dst *Element, filter *Caps) bool

Links src to dest using the given caps as 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. Make sure you have added your elements to a bin or pipeline with gst_bin_add() before trying to link them. Parameters dest the GstElement containing the destination pad. filter the GstCaps to filter the link, or NULL for no filter. Returns TRUE if the pads could be linked, FALSE otherwise.

func (*Element) LinkPads

func (e *Element) LinkPads(pad_name string, dst *Element, dst_pad_name string) bool

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. Parameters 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. Returns TRUE if the pads could be linked, FALSE otherwise.

func (*Element) LinkPadsFiltered

func (e *Element) LinkPadsFiltered(pad_name string, dst *Element, dst_pad_name string, filter *Caps) bool

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. If caps is not NULL, makes sure that the caps of the link is a subset of caps . Parameters 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. filter the GstCaps to filter the link, or NULL for no filter. Returns TRUE if the pads could be linked, FALSE otherwise.

func (*Element) LinkPadsFull

func (e *Element) LinkPadsFull(pad_name string, dst *Element, dst_pad_name string, flags PadLinkCheck) bool

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. Calling gst_element_link_pads_full() with flags == GST_PAD_LINK_CHECK_DEFAULT is the same as calling gst_element_link_pads() and the recommended way of linking pads with safety checks applied. This is a convenience function for gst_pad_link_full(). Parameters 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. flags the GstPadLinkCheck to be performed when linking pads. Returns TRUE if the pads could be linked, FALSE otherwise.

func (*Element) LostState

func (e *Element) LostState()

Brings the element to the lost state. The current state of the element is copied to the pending state so that any call to gst_element_get_state() will return GST_STATE_CHANGE_ASYNC. An ASYNC_START message is posted. If the element was PLAYING, it will go to PAUSED. The element will be restored to its PLAYING state by the parent pipeline when it prerolls again. This is mostly used for elements that lost their preroll buffer in the GST_STATE_PAUSED or GST_STATE_PLAYING state after a flush, they will go to their pending state again when a new preroll buffer is queued. This function can only be called when the element is currently not in error or an async state change. This function is used internally and should normally not be called from plugins or applications.

func (*Element) MessageFull

func (e *Element) MessageFull(tp MessageType, domain glib.Quark, code int, text, debug, file, function string, line int)

Post an error, warning or info message on the bus from inside an element. type must be of GST_MESSAGE_ERROR, GST_MESSAGE_WARNING or GST_MESSAGE_INFO. MT safe. Parameters type the GstMessageType domain the GStreamer GError domain this message belongs to code the GError code belonging to the domain text an allocated text string 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

func (*Element) NextState

func (e *Element) NextState() State

This macro returns the next GstState of the element.

func (*Element) NoMorePads

func (e *Element) NoMorePads()

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. This function emits the “no-more-pads” signal. MT safe.

func (*Element) PendingState

func (e *Element) PendingState() State

This macro returns the currently pending GstState of the element.

func (*Element) PostMessage

func (e *Element) PostMessage(msg *Message) bool

Post a message on the element's GstBus. This function takes ownership of the message; if you want to access the message after this call, you should add an additional reference before calling. Parameters message a GstMessage to post. Returns TRUE if the message was successfully posted. The function returns FALSE if the element did not have a bus. MT safe.

func (*Element) ProvideClock

func (e *Element) ProvideClock() *Clock

Get the clock provided by the given element. An element is only required to provide a clock in the PAUSED state. Some elements can provide a clock in other states. Returns the GstClock provided by the element or NULL if no clock could be provided. Unref after usage. MT safe.

func (*Element) Query

func (e *Element) Query(q *Query) bool

Performs a query on the given element. For elements that don't implement a query handler, this function forwards the query to a random srcpad or to the peer of a random linked sinkpad of this element. Please note that some queries might need a running pipeline to work. Parameters query the GstQuery. Returns TRUE if the query could be performed. MT safe.

func (*Element) QueryConvert

func (e *Element) QueryConvert(srcFormat Format, srcVal int64, destFormat Format) (int64, error)

Queries an element to convert src_val in src_format to dest_format . src_format a GstFormat to convert from. src_val a value to convert. dest_format the GstFormat to convert to. Returns dest_val a pointer to the result. error is nil if the query could be performed.

func (*Element) QueryDuration

func (e *Element) QueryDuration(format Format) (time.Duration, error)

Queries an element (usually top-level pipeline or playbin element) for the total stream duration in nanoseconds. This query will only work once the pipeline is prerolled (i.e. reached PAUSED or PLAYING state). The application will receive an ASYNC_DONE message on the pipeline bus when that is the case. If the duration changes for some reason, you will get a DURATION_CHANGED message on the pipeline bus, in which case you should re-query the duration using this function. Parameters format the GstFormat requested Returns duration A location in which to store the total duration, or NULL. error is nil if the query could be performed.

func (*Element) QueryPosition

func (e *Element) QueryPosition(format Format) (time.Duration, error)

Queries an element (usually top-level pipeline or playbin element) for the stream position in nanoseconds. This will be a value between 0 and the stream duration (if the stream duration is known). This query will usually only work once the pipeline is prerolled (i.e. reached PAUSED or PLAYING state). The application will receive an ASYNC_DONE message on the pipeline bus when that is the case. If one repeatedly calls this function one can also create a query and reuse it in gst_element_query(). Parameters format the GstFormat requested Returns a location in which to store the current position, or NULL. error is nil if the query could be performed.

func (*Element) ReleaseRequestPad

func (e *Element) ReleaseRequestPad(pad *Pad)

Makes the element free the previously requested pad as obtained with gst_element_request_pad(). This does not unref the pad. If the pad was created by using gst_element_request_pad(), gst_element_release_request_pad() needs to be followed by gst_object_unref() to free the pad . MT safe. Parameters pad the GstPad to release.

func (*Element) RemovePad

func (e *Element) RemovePad(pad *Pad) bool

Removes pad from element . pad will be destroyed if it has not been referenced elsewhere using gst_object_unparent(). This function is used by plugin developers and should not be used by applications. Pads that were dynamically requested from elements with gst_element_request_pad() should be released with the gst_element_release_request_pad() function instead. Pads are not automatically deactivated so elements should perform the needed steps to deactivate the pad in case this pad is removed in the PAUSED or PLAYING state. See gst_pad_set_active() for more information about deactivating pads. The pad and the element should be unlocked when calling this function. This function will emit the “pad-removed” signal on the element. Parameters pad the GstPad to remove from the element. Returns TRUE if the pad could be removed. Can return FALSE if the pad does not belong to the provided element. MT safe.

func (*Element) RequestPad

func (e *Element) RequestPad(templ *PadTemplate, name string, caps *Caps) *Pad

Retrieves a request pad from the element according to the provided template. Pad templates can be looked up using gst_element_factory_get_static_pad_templates(). The pad should be released with gst_element_release_request_pad(). Parameters templ a GstPadTemplate of which we want a pad of. name the name of the request GstPad to retrieve. Can be NULL. caps the caps of the pad we want to request. Can be NULL. Returns requested GstPad if found, otherwise NULL. Release after usage.

func (*Element) Seek

func (e *Element) Seek(rate float64, format Format, flags SeekFlags, startType SeekType, start int64, stopType SeekType, stop int64) bool

Sends a seek event to an element. See gst_event_new_seek() for the details of the parameters. The seek event is sent to the element using gst_element_send_event(). MT safe. Parameters rate The new playback rate format The format of the seek values flags The optional seek flags. start_type The type and flags for the new start position start The value of the new start position stop_type The type and flags for the new stop position stop The value of the new stop position Returns TRUE if the event was handled. Flushing seeks will trigger a preroll, which will emit GST_MESSAGE_ASYNC_DONE.

func (*Element) SeekSimple

func (e *Element) SeekSimple(format Format, flags SeekFlags, pos int64) bool

Simple API to perform a seek on the given element, meaning it just seeks to the given position relative to the start of the stream. For more complex operations like segment seeks (e.g. for looping) or changing the playback rate or seeking relative to the last configured playback segment you should use gst_element_seek(). In a completely prerolled PAUSED or PLAYING pipeline, seeking is always guaranteed to return TRUE on a seekable media type or FALSE when the media type is certainly not seekable (such as a live stream). Some elements allow for seeking in the READY state, in this case they will store the seek event and execute it when they are put to PAUSED. If the element supports seek in READY, it will always return TRUE when it receives the event in the READY state. Parameters format a GstFormat to execute the seek in, such as GST_FORMAT_TIME seek_flags seek options; playback applications will usually want to use GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_KEY_UNIT here seek_pos position to seek to (relative to the start); if you are doing a seek in GST_FORMAT_TIME this value is in nanoseconds - multiply with GST_SECOND to convert seconds to nanoseconds or with GST_MSECOND to convert milliseconds to nanoseconds. Returns TRUE if the seek operation succeeded. Flushing seeks will trigger a preroll, which will emit GST_MESSAGE_ASYNC_DONE.

func (*Element) SendEvent

func (e *Element) SendEvent(event *Event) bool

Sends an event to an element. If the element doesn't implement an event handler, the event will be pushed on a random linked sink pad for downstream events or a random linked source pad for upstream events. This function takes ownership of the provided event so you should gst_event_ref() it if you want to reuse the event after this call. MT safe. Parameters event the GstEvent to send to the element. Returns TRUE if the event was handled. Events that trigger a preroll (such as flushing seeks and steps) will emit GST_MESSAGE_ASYNC_DONE.

func (*Element) SetBaseTime

func (e *Element) SetBaseTime(t ClockTime)

Set the base time of an element. See gst_element_get_base_time(). MT safe. Parameters time the base time to set.

func (*Element) SetBus

func (e *Element) SetBus(bus *Bus)

Sets the bus of the element. Increases the refcount on the bus. For internal use only, unless you're testing elements. MT safe. Parameters bus the GstBus to set.

func (*Element) SetClock

func (e *Element) SetClock(t *Clock)

Sets the clock for the element. This function increases the refcount on the clock. Any previously set clock on the object is unreffed. Parameters clock the GstClock to set for the element. Returns TRUE if the element accepted the clock. An element can refuse a clock when it, for example, is not able to slave its internal clock to the clock or when it requires a specific clock to operate. MT safe.

func (*Element) SetContext

func (e *Element) SetContext(context *Context)

Sets the context of the element. Increases the refcount of the context. MT safe. Parameters context the GstContext to set.

func (*Element) SetLockedState

func (e *Element) SetLockedState(lockedState bool) bool

Locks the state of an element, so state changes of the parent don't affect this element anymore. MT safe. Parameters locked_state TRUE to lock the element's state Returns TRUE if the state was changed, FALSE if bad parameters were given or the elements state-locking needed no change.

func (*Element) SetStartTime

func (e *Element) SetStartTime(t ClockTime)

Set the start time of an element. The start time of the element is the running time of the element when it last went to the PAUSED state. In READY or after a flushing seek, it is set to 0. Toplevel elements like GstPipeline will manage the start_time and base_time on its children. Setting the start_time to GST_CLOCK_TIME_NONE on such a toplevel element will disable the distribution of the base_time to the children and can be useful if the application manages the base_time itself, for example if you want to synchronize capture from multiple pipelines, and you can also ensure that the pipelines have the same clock. MT safe. Parameters time the base time to set.

func (*Element) SetState

func (e *Element) SetState(state State) StateChangeReturn

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. This function can return GST_STATE_CHANGE_ASYNC, in which case the element will perform the remainder of the state change asynchronously in another thread. An application can use gst_element_get_state() to wait for the completion of the state change or it can wait for a GST_MESSAGE_ASYNC_DONE or GST_MESSAGE_STATE_CHANGED on the bus. State changes to GST_STATE_READY or GST_STATE_NULL never return GST_STATE_CHANGE_ASYNC. Parameters state the element's new GstState. Returns Result of the state change using GstStateChangeReturn. MT safe.

func (*Element) SyncStateWithParent

func (e *Element) SyncStateWithParent() bool

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. Returns TRUE, if the element's state could be synced to the parent's state. MT safe.

func (*Element) TargetState

func (e *Element) TargetState() State

This macro returns the target GstState of the element.

func (*Element) Type

func (e *Element) Type() glib.Type
func (e *Element) Unlink(next ...*Element)

Unlinks all source pads of the source element with all sink pads of the sink element to which they are linked. If the link has been made using gst_element_link(), it could have created an requestpad, which has to be released using gst_element_release_request_pad(). Parameters element_1 the first GstElement in the link chain. element_2 the second GstElement in the link chain. ... the sink GstElement to unlink.

func (*Element) UnlinkPads

func (e *Element) UnlinkPads(pad_name string, dst *Element, dst_pad_name string)

Unlinks the two named pads of the source and destination elements. This is a convenience function for gst_pad_unlink(). Parameters 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.

type ElementClass

type ElementClass struct {
	GstObjClass
}

func (*ElementClass) AddMetadata

func (c *ElementClass) AddMetadata(key, value string)

Set key with value as metadata in klass . Parameters key the key to set value the value to set

func (*ElementClass) AddPadTemplate

func (c *ElementClass) AddPadTemplate(pt *PadTemplate)

Adds a padtemplate to an element class. This is mainly used in the _class_init functions of classes. If a pad template with the same name as an already existing one is added the old one is replaced by the new one.

func (*ElementClass) AddStaticMetadata

func (c *ElementClass) AddStaticMetadata(key, value string)

Set key with value as metadata in klass . Same as gst_element_class_add_metadata(), but value must be a static string or an inlined string, as it will not be copied. (GStreamer plugins will be made resident once loaded, so this function can be used even from dynamically loaded plugins.) Parameters key the key to set value the value to set

func (*ElementClass) AddStaticPadTemplate

func (c *ElementClass) AddStaticPadTemplate(pt *StaticPadTemplate)

Adds a pad template to an element class based on the static pad template templ . This is mainly used in the _class_init functions of element implementations. If a pad template with the same name already exists, the old one is replaced by the new one.

func (*ElementClass) AsElementClass

func (c *ElementClass) AsElementClass() *ElementClass

func (*ElementClass) GetMetadata

func (c *ElementClass) GetMetadata(key string) string

Get metadata with key in klass . Parameters key the key to get Returns the metadata for key .

func (*ElementClass) GetPadTemplate

func (c *ElementClass) GetPadTemplate(name string) *PadTemplate

Retrieves a padtemplate from element_class with the given name. 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. Returns the GstPadTemplate with the given name, or NULL if none was found. No unreferencing is necessary.

func (*ElementClass) GetPadTemplateList

func (c *ElementClass) GetPadTemplateList() *glib.List

Retrieves a list of the pad templates associated with element_class . The list must not be modified by the calling code. 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. Returns the GList of pad templates.

func (*ElementClass) SetMetadata

func (c *ElementClass) SetMetadata(longName, classification, description, author string)

Sets the detailed information for a GstElementClass. This function is for use in _class_init functions only. Parameters longname The long English name of the element. E.g. "File Sink" classification String describing the type of element, as an unordered list separated with slashes ('/'). See draft-klass.txt of the design docs for more details and common types. E.g: "Sink/File" description Sentence describing the purpose of the element. E.g: "Write stream to a file" author Name and contact details of the author(s). Use \n to separate multiple author metadata. E.g: "Joe Bloggs <joe.blogs at foo.com>"

func (*ElementClass) SetStaticMetadata

func (c *ElementClass) SetStaticMetadata(longName, classification, description, author string)

Sets the detailed information for a GstElementClass. This function is for use in _class_init functions only. Same as gst_element_class_set_metadata(), but longname , classification , description , and author must be static strings or inlined strings, as they will not be copied. (GStreamer plugins will be made resident once loaded, so this function can be used even from dynamically loaded plugins.) Parameters longname The long English name of the element. E.g. "File Sink" classification String describing the type of element, as an unordered list separated with slashes ('/'). See draft-klass.txt of the design docs for more details and common types. E.g: "Sink/File" description Sentence describing the purpose of the element. E.g: "Write stream to a file" author Name and contact details of the author(s). Use \n to separate multiple author metadata. E.g: "Joe Bloggs <joe.blogs at foo.com>"

type ElementFactory

type ElementFactory struct {
	GstObj
}

func ElementFactoryFind

func ElementFactoryFind(name string) *ElementFactory

func (*ElementFactory) AsElementFactory

func (f *ElementFactory) AsElementFactory() *ElementFactory

func (*ElementFactory) Create

func (f *ElementFactory) Create(name string) *Element

func (*ElementFactory) GetAuthor

func (f *ElementFactory) GetAuthor() string

func (*ElementFactory) GetDescription

func (f *ElementFactory) GetDescription() string

func (*ElementFactory) GetDocumentationUri

func (f *ElementFactory) GetDocumentationUri() string

func (*ElementFactory) GetElementType

func (f *ElementFactory) GetElementType() glib.Type

Get the GType for elements managed by this factory. The type can only be retrieved if the element factory is loaded, which can be assured with gst_plugin_feature_load(). Returns the GType for elements managed by this factory or 0 if the factory is not loaded.

func (*ElementFactory) GetIconName

func (f *ElementFactory) GetIconName() string

func (*ElementFactory) GetKlass

func (f *ElementFactory) GetKlass() string

func (*ElementFactory) GetLongName

func (f *ElementFactory) GetLongName() string

func (*ElementFactory) GetMetadataKeys

func (f *ElementFactory) GetMetadataKeys() []string

* Get metadata from ElementFactory

func (*ElementFactory) GetNumPadTemplates

func (f *ElementFactory) GetNumPadTemplates() uint

func (*ElementFactory) GetStaticPadTemplates

func (f *ElementFactory) GetStaticPadTemplates() []*StaticPadTemplate

type ElementFlags

type ElementFlags C.GstElementFlags

type Event

type Event struct {
	glib.Object
}

func NewBufferSizeEvent

func NewBufferSizeEvent(format Format, minsize, maxsize int64, async bool) *Event

Create a new buffersize event. The event is sent downstream and notifies elements that they should provide a buffer of the specified dimensions. When the async flag is set, a thread boundary is preferred. Parameters format buffer format minsize minimum buffer size maxsize maximum buffer size async thread behavior Returns a new GstEvent.

func NewCapsEvent

func NewCapsEvent(caps *Caps) *Event

Create a new CAPS event for caps . The caps event can only travel downstream synchronized with the buffer flow and contains the format of the buffers that will follow after the event. Parameters caps a GstCaps. Returns the new CAPS event.

func NewCustomEvent

func NewCustomEvent(tp EventType, structure *Structure) *Event

Create a new custom-typed event. This can be used for anything not handled by other event-specific functions to pass an event to another element. Make sure to allocate an event type with the GST_EVENT_MAKE_TYPE macro, assigning a free number and filling in the correct direction and serialization flags. New custom events can also be created by subclassing the event type if needed. Parameters type The type of the new event structure the structure for the event. The event will take ownership of the structure. Returns the new custom event.

func NewEosEvent

func NewEosEvent() *Event

Create a new EOS event. The eos event can only travel downstream synchronized with the buffer flow. Elements that receive the EOS event on a pad can return GST_FLOW_EOS as a GstFlowReturn when data after the EOS event arrives.

The EOS event will travel down to the sink elements in the pipeline which will then post the GST_MESSAGE_EOS on the bus after they have finished playing any buffered data.

When all sinks have posted an EOS message, an EOS message is forwarded to the application.

The EOS event itself will not cause any state transitions of the pipeline. Returns the new EOS event.

func NewFlushStartEvent

func NewFlushStartEvent() *Event

Allocate a new flush start event. The flush start event can be sent upstream and downstream and travels out-of-bounds with the dataflow.

It marks pads as being flushing and will make them return GST_FLOW_FLUSHING when used for data flow with gst_pad_push(), gst_pad_chain(), gst_pad_get_range() and gst_pad_pull_range(). Any event (except a GST_EVENT_FLUSH_STOP) received on a flushing pad will return FALSE immediately.

Elements should unlock any blocking functions and exit their streaming functions as fast as possible when this event is received.

This event is typically generated after a seek to flush out all queued data in the pipeline so that the new media is played as soon as possible. Returns a new flush start event.

func NewFlushStopEvent

func NewFlushStopEvent(reset_time bool) *Event

Allocate a new flush stop event. The flush stop event can be sent upstream and downstream and travels serialized with the dataflow. It is typically sent after sending a FLUSH_START event to make the pads accept data again.

Elements can process this event synchronized with the dataflow since the preceding FLUSH_START event stopped the dataflow.

This event is typically generated to complete a seek and to resume dataflow. Parameters reset_time if time should be reset Returns a new flush stop event.

func NewGapEvent

func NewGapEvent(timestamp, duration ClockTime) *Event

Create a new GAP event. A gap event can be thought of as conceptually equivalent to a buffer to signal that there is no data for a certain amount of time. This is useful to signal a gap to downstream elements which may wait for data, such as muxers or mixers or overlays, especially for sparse streams such as subtitle streams. Parameters timestamp the start time (pts) of the gap duration the duration of the gap Returns the new GAP event.

func NewLatencyEvent

func NewLatencyEvent(latency ClockTime) *Event

Create a new latency event. The event is sent upstream from the sinks and notifies elements that they should add an additional latency to the running time before synchronising against the clock.

The latency is mostly used in live sinks and is always expressed in the time format. Parameters latency the new latency value Returns a new GstEvent.

func NewNavigationEvent

func NewNavigationEvent(structure *Structure) *Event

Create a new navigation event from the given description. Parameters structure description of the event. The event will take ownership of the structure.

Returns a new GstEvent.

func NewProtectionEvent

func NewProtectionEvent(system_id string, data *Buffer, origin string) *Event

Creates a new event containing information specific to a particular protection system (uniquely identified by system_id ), by which that protection system can acquire key(s) to decrypt a protected stream.

In order for a decryption element to decrypt media protected using a specific system, it first needs all the protection system specific information necessary to acquire the decryption key(s) for that stream. The functions defined here enable this information to be passed in events from elements that extract it (e.g., ISOBMFF demuxers, MPEG DASH demuxers) to protection decrypter elements that use it.

Events containing protection system specific information are created using gst_event_new_protection, and they can be parsed by downstream elements using gst_event_parse_protection.

In Common Encryption, protection system specific information may be located within ISOBMFF files, both in movie (moov) boxes and movie fragment (moof) boxes; it may also be contained in ContentProtection elements within MPEG DASH MPDs. The events created by gst_event_new_protection contain data identifying from which of these locations the encapsulated protection system specific information originated. This origin information is required as some protection systems use different encodings depending upon where the information originates.

The events returned by gst_event_new_protection() are implemented in such a way as to ensure that the most recently-pushed protection info event of a particular origin and system_id will be stuck to the output pad of the sending element. Parameters system_id a string holding a UUID that uniquely identifies a protection system. data a GstBuffer holding protection system specific information. The reference count of the buffer will be incremented by one. origin a string indicating where the protection information carried in the event was extracted from. The allowed values of this string will depend upon the protection scheme. Returns a GST_EVENT_PROTECTION event, if successful; NULL if unsuccessful. Since: 1.6

func NewQOSEvent

func NewQOSEvent(tp QOSType, proportion float64, diff int64, timestamp ClockTime) *Event

Allocate a new qos event with the given values. The QOS event is generated in an element that wants an upstream element to either reduce or increase its rate because of high/low CPU load or other resource usage such as network performance or throttling. Typically sinks generate these events for each buffer they receive.

type indicates the reason for the QoS event. GST_QOS_TYPE_OVERFLOW is used when a buffer arrived in time or when the sink cannot keep up with the upstream datarate. GST_QOS_TYPE_UNDERFLOW is when the sink is not receiving buffers fast enough and thus has to drop late buffers. GST_QOS_TYPE_THROTTLE is used when the datarate is artificially limited by the application, for example to reduce power consumption.

proportion indicates the real-time performance of the streaming in the element that generated the QoS event (usually the sink). The value is generally computed based on more long term statistics about the streams timestamps compared to the clock. A value < 1.0 indicates that the upstream element is producing data faster than real-time. A value > 1.0 indicates that the upstream element is not producing data fast enough. 1.0 is the ideal proportion value. The proportion value can safely be used to lower or increase the quality of the element.

diff is the difference against the clock in running time of the last buffer that caused the element to generate the QOS event. A negative value means that the buffer with timestamp arrived in time. A positive value indicates how late the buffer with timestamp was. When throttling is enabled, diff will be set to the requested throttling interval.

timestamp is the timestamp of the last buffer that cause the element to generate the QOS event. It is expressed in running time and thus an ever increasing value.

The upstream element can use the diff and timestamp values to decide whether to process more buffers. For positive diff , all buffers with timestamp <= timestamp + diff will certainly arrive late in the sink as well. A (negative) diff value so that timestamp + diff would yield a result smaller than 0 is not allowed.

The application can use general event probes to intercept the QoS event and implement custom application specific QoS handling. Parameters type the QoS type proportion the proportion of the qos message diff The time difference of the last Clock sync timestamp The timestamp of the buffer Returns a new QOS event.

func NewReconfigureEvent

func NewReconfigureEvent() *Event

Create a new reconfigure event. The purpose of the reconfigure event is to travel upstream and make elements renegotiate their caps or reconfigure their buffer pools. This is useful when changing properties on elements or changing the topology of the pipeline. Returns a new GstEvent.

func NewSeekEvent

func NewSeekEvent(rate float64, format Format, flags SeekFlags, start_type SeekType, start int64, stop_type SeekType, stop int64) *Event

Allocate a new seek event with the given parameters.

The seek event configures playback of the pipeline between start to stop at the speed given in rate , also called a playback segment. The start and stop values are expressed in format .

A rate of 1.0 means normal playback rate, 2.0 means double speed. Negatives values means backwards playback. A value of 0.0 for the rate is not allowed and should be accomplished instead by PAUSING the pipeline.

A pipeline has a default playback segment configured with a start position of 0, a stop position of -1 and a rate of 1.0. The currently configured playback segment can be queried with GST_QUERY_SEGMENT.

start_type and stop_type specify how to adjust the currently configured start and stop fields in playback segment. Adjustments can be made relative or absolute to the last configured values. A type of GST_SEEK_TYPE_NONE means that the position should not be updated.

When the rate is positive and start has been updated, playback will start from the newly configured start position.

For negative rates, playback will start from the newly configured stop position (if any). If the stop position is updated, it must be different from -1 (GST_CLOCK_TIME_NONE) for negative rates.

It is not possible to seek relative to the current playback position, to do this, PAUSE the pipeline, query the current playback position with GST_QUERY_POSITION and update the playback segment current position with a GST_SEEK_TYPE_SET to the desired position. Parameters rate The new playback rate format The format of the seek values flags The optional seek flags start_type The type and flags for the new start position start The value of the new start position stop_type The type and flags for the new stop position stop The value of the new stop position Returns a new seek event.

func NewSegmentDoneEvent

func NewSegmentDoneEvent(format Format, position int64) *Event

Create a new segment-done event. This event is sent by elements that finish playback of a segment as a result of a segment seek. Parameters format The format of the position being done position The position of the segment being done Returns a new GstEvent.

func NewSegmentEvent

func NewSegmentEvent(segment *Segment) *Event

Create a new SEGMENT event for segment . The segment event can only travel downstream synchronized with the buffer flow and contains timing information and playback properties for the buffers that will follow.

The segment event marks the range of buffers to be processed. All data not within the segment range is not to be processed. This can be used intelligently by plugins to apply more efficient methods of skipping unneeded data. The valid range is expressed with the start and stop values.

The time value of the segment is used in conjunction with the start value to convert the buffer timestamps into the stream time. This is usually done in sinks to report the current stream_time. time represents the stream_time of a buffer carrying a timestamp of start . time cannot be -1.

start cannot be -1, stop can be -1. If there is a valid stop given, it must be greater or equal the start , including when the indicated playback rate is < 0.

The applied_rate value provides information about any rate adjustment that has already been made to the timestamps and content on the buffers of the stream. (rate * applied_rate ) should always equal the rate that has been requested for playback. For example, if an element has an input segment with intended playback rate of 2.0 and applied_rate of 1.0, it can adjust incoming timestamps and buffer content by half and output a segment event with rate of 1.0 and applied_rate of 2.0

After a segment event, the buffer stream time is calculated with:

time + (TIMESTAMP(buf) - start) * ABS (rate * applied_rate) Parameters segment a GstSegment.

Returns the new SEGMENT event.

func NewSinkMessageEvent

func NewSinkMessageEvent(name string, msg *Message) *Event

Create a new sink-message event. The purpose of the sink-message event is to instruct a sink to post the message contained in the event synchronized with the stream.

name is used to store multiple sticky events on one pad. Parameters name a name for the event msg the GstMessage to be posted. Returns a new GstEvent.

func NewStepEvent

func NewStepEvent(format Format, amount uint64, rate float64, flush bool, intermediate bool) *Event

Create a new step event. The purpose of the step event is to instruct a sink to skip amount (expressed in format ) of media. It can be used to implement stepping through the video frame by frame or for doing fast trick modes.

A rate of <= 0.0 is not allowed. Pause the pipeline, for the effect of rate = 0.0 or first reverse the direction of playback using a seek event to get the same effect as rate < 0.0.

The flush flag will clear any pending data in the pipeline before starting the step operation.

The intermediate flag instructs the pipeline that this step operation is part of a larger step operation. Parameters format the format of amount amount the amount of data to step rate the step rate flush flushing steps intermediate intermediate steps Returns a new GstEvent.

func NewStreamStartEvent

func NewStreamStartEvent(stream_id string) *Event

Create a new STREAM_START event. The stream start event can only travel downstream synchronized with the buffer flow. It is expected to be the first event that is sent for a new stream.

Source elements, demuxers and other elements that create new streams are supposed to send this event as the first event of a new stream. It should not be sent after a flushing seek or in similar situations and is used to mark the beginning of a new logical stream. Elements combining multiple streams must ensure that this event is only forwarded downstream once and not for every single input stream.

The stream_id should be a unique string that consists of the upstream stream-id, / as separator and a unique stream-id for this specific stream. A new stream-id should only be created for a stream if the upstream stream is split into (potentially) multiple new streams, e.g. in a demuxer, but not for every single element in the pipeline. gst_pad_create_stream_id() or gst_pad_create_stream_id_printf() can be used to create a stream-id. There are no particular semantics for the stream-id, though it should be deterministic (to support stream matching) and it might be used to order streams (besides any information conveyed by stream flags).

Parameters stream_id Identifier for this stream Returns the new STREAM_START event.

func NewTOCEvent

func NewTOCEvent(toc *Toc, updated bool) *Event

Generate a TOC event from the given toc . The purpose of the TOC event is to inform elements that some kind of the TOC was found. Parameters toc GstToc structure. updated whether toc was updated or not. Returns a new GstEvent.

func NewTOCSelectEvent

func NewTOCSelectEvent(uid string) *Event

Generate a TOC select event with the given uid . T he purpose of the TOC select event is to start playback based on the TOC's entry with the given uid . Parameters uid UID in the TOC to start playback from. Returns a new GstEvent.

func NewTagEvent

func NewTagEvent(taglist *TagList) *Event

Generates a metadata tag event from the given taglist .

The scope of the taglist specifies if the taglist applies to the complete medium or only to this specific stream. As the tag event is a sticky event, elements should merge tags received from upstream with a given scope with their own tags with the same scope and create a new tag event from it. Parameters taglist metadata list. The event will take ownership of the taglist. Returns a new GstEvent.

func (*Event) AsEvent

func (e *Event) AsEvent() *Event

func (*Event) Copy

func (e *Event) Copy() *Event

Copy the event using the event specific copy function. Parameters event The event to copy Returns the new event.

func (*Event) CopySegment

func (e *Event) CopySegment() *Segment

Parses a segment event and copies the GstSegment into the location given by segment . Parameters event The event to parse Returns segment a pointer to a GstSegment

func (*Event) GetRunningTimeOffset

func (e *Event) GetRunningTimeOffset() int64

Retrieve the accumulated running time offset of the event.

Events passing through GstPads that have a running time offset set via gst_pad_set_offset() will get their offset adjusted according to the pad's offset.

If the event contains any information that related to the running time, this information will need to be updated before usage with this offset. Parameters event A GstEvent. Returns The event's running time offset MT safe. Since: 1.4

func (*Event) GetSeqNum

func (e *Event) GetSeqNum() uint32

Retrieve the sequence number of a event.

Events have ever-incrementing sequence numbers, which may also be set explicitly via gst_event_set_seqnum(). Sequence numbers are typically used to indicate that a event corresponds to some other set of events or messages, for example an EOS event corresponding to a SEEK event. It is considered good practice to make this correspondence when possible, though it is not required.

Note that events and messages share the same sequence number incrementor; two events or messages will never have the same sequence number unless that correspondence was made explicitly. Parameters event A GstEvent. Returns The event's sequence number. MT safe.

func (*Event) GetStructure

func (e *Event) GetStructure() *Structure

Access the structure of the event. Parameters event The GstEvent. Returns The structure of the event. The structure is still owned by the event, which means that you should not free it and that the pointer becomes invalid when you free the event. MT safe.

func (*Event) GetType

func (e *Event) GetType() EventType

#define GST_EVENT_TYPE(event) (GST_EVENT_CAST(event)->type) Get the GstEventType of the event. Parameters event the event to query

func (*Event) GetTypeName

func (e *Event) GetTypeName() string

#define GST_EVENT_TYPE_NAME(event) (gst_event_type_get_name(GST_EVENT_TYPE(event))) Get a constant string representation of the GstEventType of the event. Parameters event the event to query

func (*Event) HasName

func (e *Event) HasName(name string) bool

Checks if event has the given name . This function is usually used to check the name of a custom event. Parameters event The GstEvent. name name to check Returns TRUE if name matches the name of the event structure.

func (*Event) IsDownstream

func (e *Event) IsDownstream() bool

#define GST_EVENT_IS_DOWNSTREAM(ev) !!(GST_EVENT_TYPE (ev) & GST_EVENT_TYPE_DOWNSTREAM) Check if an event can travel downstream. Parameters ev the event to query

func (*Event) IsSerialized

func (e *Event) IsSerialized() bool

#define GST_EVENT_IS_SERIALIZED(ev) !!(GST_EVENT_TYPE (ev) & GST_EVENT_TYPE_SERIALIZED) Check if an event is serialized with the data stream. Parameters ev the event to query

func (*Event) IsSticky

func (e *Event) IsSticky() bool

#define GST_EVENT_IS_STICKY(ev) !!(GST_EVENT_TYPE (ev) & GST_EVENT_TYPE_STICKY) Check if an event is sticky on the pads. Parameters ev the event to query

func (*Event) IsUpstream

func (e *Event) IsUpstream() bool

#define GST_EVENT_IS_UPSTREAM(ev) !!(GST_EVENT_TYPE (ev) & GST_EVENT_TYPE_UPSTREAM) Check if an event can travel upstream. Parameters ev the event to query

func (*Event) IsWritable

func (e *Event) IsWritable() bool

#define gst_event_is_writable(ev) gst_mini_object_is_writable (GST_MINI_OBJECT_CAST (ev)) Tests if you can safely write data into a event's structure or validly modify the seqnum and timestamp field. Parameters ev a GstEvent

func (*Event) MakeWritable

func (e *Event) MakeWritable() *Event

#define gst_event_make_writable(ev) GST_EVENT_CAST (gst_mini_object_make_writable (GST_MINI_OBJECT_CAST (ev))) Makes a writable event from the given event. If the source event is already writable, this will simply return the same event. A copy will otherwise be made using gst_event_copy(). Parameters ev a GstEvent. Returns a writable event which may or may not be the same as ev .

func (*Event) ParseBufferSize

func (e *Event) ParseBufferSize() (Format, int64, int64, bool)

Get the format, minsize, maxsize and async-flag in the buffersize event. Parameters event The event to query Returns format A pointer to store the format in. minsize A pointer to store the minsize in. maxsize A pointer to store the maxsize in. async A pointer to store the async-flag in.

func (*Event) ParseCaps

func (e *Event) ParseCaps() *Caps

Get the caps from event . The caps remains valid as long as event remains valid. Parameters event The event to parse Returns caps A pointer to the caps.

func (*Event) ParseFlushStop

func (e *Event) ParseFlushStop() bool

Parse the FLUSH_STOP event and retrieve the reset_time member. Parameters event The event to parse Return reset_time if time should be reset.

func (*Event) ParseGap

func (e *Event) ParseGap() (ClockTime, ClockTime)

Extract timestamp and duration from a new GAP event. Parameters event a GstEvent of type GST_EVENT_GAP Return timestamp location where to store the start time (pts) of the gap, or NULL. duration location where to store the duration of the gap, or NULL.

func (*Event) ParseGroupId

func (e *Event) ParseGroupId() (uint, bool)

Parameters event a stream-start event Returns group_id address of variable where to store the group id. TRUE if a group id was set on the event and could be parsed, FALSE otherwise. Since: 1.2

func (*Event) ParseLatency

func (e *Event) ParseLatency() ClockTime

Get the latency in the latency event. Parameters event The event to query Returns latency A pointer to store the latency in.

func (*Event) ParseProtection

func (e *Event) ParseProtection() (string, *Buffer, string)

Parses an event containing protection system specific information and stores the results in system_id , data and origin . The data stored in system_id , origin and data are valid until event is released. Parameters event a GST_EVENT_PROTECTION event. Returns system_id pointer to store the UUID string uniquely identifying a content protection system. data pointer to store a GstBuffer holding protection system specific information. origin pointer to store a value that indicates where the protection information carried by event was extracted from. Since: 1.6

func (*Event) ParseQOS

func (e *Event) ParseQOS() (QOSType, float64, int64, ClockTime)

Get the type, proportion, diff and timestamp in the qos event. See gst_event_new_qos() for more information about the different QoS values. timestamp will be adjusted for any pad offsets of pads it was passing through. Parameters event The event to query Return type A pointer to store the QoS type in. proportion A pointer to store the proportion in. diff A pointer to store the diff in. timestamp A pointer to store the timestamp in.

func (*Event) ParseSeek

func (e *Event) ParseSeek() (float64, Format, SeekFlags, SeekType, int64, SeekType, int64)

Parses a seek event and stores the results in the given result locations. Parameters event a seek event Returns rate result location for the rate. format result location for the stream format. flags result location for the GstSeekFlags. start_type result location for the GstSeekType of the start position. start result location for the start position expressed in format . stop_type result location for the GstSeekType of the stop position. stop result location for the stop position expressed in format .

func (*Event) ParseSegment

func (e *Event) ParseSegment() *Segment

Parses a segment event and stores the result in the given segment location. segment remains valid only until the event is freed. Don't modify the segment and make a copy if you want to modify it or store it for later use. Parameters event The event to parse Returns segment a pointer to a GstSegment. Need to unref

func (*Event) ParseSegmentDone

func (e *Event) ParseSegmentDone() (Format, int64)

Extracts the position and format from the segment done message. Parameters event A valid GstEvent of type GST_EVENT_SEGMENT_DONE. Returns format Result location for the format, or NULL. position Result location for the position, or NULL.

func (*Event) ParseSinkMessage

func (e *Event) ParseSinkMessage() *Message

Parse the sink-message event. Unref msg after usage. Parameters event The event to query Returns msg a pointer to store the GstMessage in.

func (*Event) ParseStep

func (e *Event) ParseStep() (Format, uint64, float64, bool, bool)

Parse the step event. Parameters event The event to query Returns format a pointer to store the format in. amount a pointer to store the amount in. rate a pointer to store the rate in. flush a pointer to store the flush boolean in. intermediate a pointer to store the intermediate boolean in.

func (*Event) ParseStreamFlags

func (e *Event) ParseStreamFlags() StreamFlags

Parameters event a stream-start event Return flags address of variable where to store the stream flags. Since: 1.2

func (*Event) ParseStreamStart

func (e *Event) ParseStreamStart() string

Parse a stream-id event and store the result in the given stream_id location. The string stored in stream_id must not be modified and will remain valid only until event gets freed. Make a copy if you want to modify it or store it for later use. Parameters event a stream-start event. Return stream_id pointer to store the stream-id.

func (*Event) ParseTOC

func (e *Event) ParseTOC() (*Toc, bool)

Parse a TOC event and store the results in the given toc and updated locations. Parameters event a TOC event. Return toc pointer to GstToc structure. updated pointer to store TOC updated flag.

func (*Event) ParseTOCSelect

func (e *Event) ParseTOCSelect() string

Parse a TOC select event and store the results in the given uid location. Parameters event a TOC select event. Returns uid storage for the selection UID.

func (*Event) ParseTag

func (e *Event) ParseTag() *TagList

Parses a tag event and stores the results in the given taglist location. No reference to the taglist will be returned, it remains valid only until the event is freed. Don't modify or free the taglist, make a copy if you want to modify it or store it for later use. Parameters event a tag event Returns taglist pointer to metadata list.

func (*Event) Ref

func (e *Event) Ref() *Event

Increase the refcount of this event. Parameters event The event to refcount Returns event (for convenience when doing assignments).

func (*Event) SeqNum

func (e *Event) SeqNum() uint32

#define GST_EVENT_SEQNUM(event) (GST_EVENT_CAST(event)->seqnum) The sequence number of event . Parameters event the event to query

func (*Event) SetGroupId

func (e *Event) SetGroupId(group_id uint)

All streams that have the same group id are supposed to be played together, i.e. all streams inside a container file should have the same group id but different stream ids. The group id should change each time the stream is started, resulting in different group ids each time a file is played for example.

Use gst_util_group_id_next() to get a new group id. Parameters event a stream-start event group_id the group id to set Since: 1.2

func (*Event) SetRunningTimeOffset

func (e *Event) SetRunningTimeOffset(offset int64)

Set the running time offset of a event. See gst_event_get_running_time_offset() for more information. MT safe. Parameters event A GstEvent. offset A the new running time offset Since: 1.4

func (*Event) SetSeqNum

func (e *Event) SetSeqNum(seqnum uint32)

Set the sequence number of a event.

This function might be called by the creator of a event to indicate that the event relates to other events or messages. See gst_event_get_seqnum() for more information. MT safe. Parameters event A GstEvent. seqnum A sequence number.

func (*Event) SetStreamFlags

func (e *Event) SetStreamFlags(flags StreamFlags)

Parameters event a stream-start event flags the stream flags to set Since: 1.2

func (*Event) Timestamp

func (e *Event) Timestamp() uint64

#define GST_EVENT_TIMESTAMP(event) (GST_EVENT_CAST(event)->timestamp) Get the GstClockTime timestamp of the event. This is the time when the event was created. Parameters event the event to query

func (*Event) Unref

func (e *Event) Unref()

Decrease the refcount of an event, freeing it if the refcount reaches 0. Parameters event the event to refcount.

func (*Event) WritableStructure

func (e *Event) WritableStructure() *Structure

Get a writable version of the structure. Parameters event The GstEvent. Returns The structure of the event. The structure is still owned by the event, which means that you should not free it and that the pointer becomes invalid when you free the event. This function checks if event is writable and will never return NULL. MT safe.

type EventType

type EventType C.GstEventType

func MakeEventType

func MakeEventType(num int, flags EventTypeFlags) EventType

#define GST_EVENT_MAKE_TYPE(num,flags) when making custom event types, use this macro with the num and the given flags Parameters num the event number to create flags the event flags #define GST_EVENT_MAKE_TYPE(num,flags) \ (((num) << GST_EVENT_NUM_SHIFT) | (flags))

func (EventType) Flags

func (t EventType) Flags() EventTypeFlags

Gets the GstEventTypeFlags associated with type . Parameters type a GstEventType Returns a GstEventTypeFlags.

func (EventType) GetName

func (t EventType) GetName() string

Get a printable name for the given event type. Do not modify or free. Parameters type the event type Returns a reference to the static name of the event.

func (EventType) ToQuark

func (t EventType) ToQuark() glib.Quark

Get the unique quark for the given event type. Parameters type the event type Returns the quark associated with the event type

type EventTypeFlags

type EventTypeFlags C.GstEventTypeFlags

type FlowReturn

type FlowReturn C.GstFlowReturn

func (FlowReturn) GetName

func (p FlowReturn) GetName() string

Gets a string representing the given flow return. Returns a static string with the name of the flow return.

func (FlowReturn) ToQuark

func (p FlowReturn) ToQuark() glib.Quark

Get the unique quark for the given GstFlowReturn. Returns the quark associated with the flow return or 0 if an invalid return was specified.

type Format

type Format C.GstFormat

func (Format) String

func (f Format) String() string

type Fourcc

type Fourcc uint32

#define GST_FOURCC_FORMAT "c%c%c%c" Can be used together with GST_FOURCC_ARGS to properly output a guint32 fourcc value in a printf()-style text message. printf ("fourcc: %" GST_FOURCC_FORMAT "\n", GST_FOURCC_ARGS (fcc));

func MakeFourcc

func MakeFourcc(a, b, c, d byte) Fourcc

#define GST_MAKE_FOURCC(a,b,c,d) ((guint32)((a)|(b)<<8|(c)<<16|(d)<<24))

Transform four characters into a guint32 fourcc value with host endianness.

guint32 fourcc = GST_MAKE_FOURCC ('M', 'J', 'P', 'G'); Parameters a the first character b the second character c the third character d the fourth character

func StrFourcc

func StrFourcc(s string) Fourcc

#define GST_STR_FOURCC(f) ((guint32)(((f)[0])|((f)[1]<<8)|((f)[2]<<16)|((f)[3]<<24)))

Transform an input string into a guint32 fourcc value with host endianness. Caller is responsible for ensuring the input string consists of at least four characters.

guint32 fourcc = GST_STR_FOURCC ("MJPG"); Parameters f a string with at least four characters

func ValueFourcc

func ValueFourcc(v *glib.Value) Fourcc

func (Fourcc) String

func (f Fourcc) String() string

#define GST_FOURCC_ARGS(fourcc)

Can be used together with GST_FOURCC_FORMAT to properly output a guint32 fourcc value in a printf()-style text message. Parameters fourcc a guint32 fourcc value to output

func (Fourcc) Type

func (f Fourcc) Type() glib.Type

func (Fourcc) Value

func (f Fourcc) Value() *glib.Value

type Fraction

type Fraction struct {
	Numer, Denom int
}

func ValueFraction

func ValueFraction(v *glib.Value) *Fraction

func (*Fraction) String

func (r *Fraction) String() string

func (*Fraction) Type

func (f *Fraction) Type() glib.Type

func (*Fraction) Value

func (f *Fraction) Value() *glib.Value

type GhostPad

type GhostPad struct {
	Pad
}

func NewGhostPad

func NewGhostPad(name string, target *Pad) *GhostPad

func NewGhostPadNoTarget

func NewGhostPadNoTarget(name string, dir PadDirection) *GhostPad

func (*GhostPad) AsGhostPad

func (p *GhostPad) AsGhostPad() *GhostPad

func (*GhostPad) Construct

func (p *GhostPad) Construct() bool

func (*GhostPad) GetTarget

func (p *GhostPad) GetTarget() *Pad

func (*GhostPad) SetTarget

func (p *GhostPad) SetTarget(new_target *Pad) bool

type GstObj

type GstObj struct {
	glib.Object
}

func (*GstObj) AsGstObj

func (o *GstObj) AsGstObj() *GstObj

func (*GstObj) FlagIsSet

func (o *GstObj) FlagIsSet(flag uint32) bool

This macro checks to see if the given flag is set.

func (*GstObj) FlagSet

func (o *GstObj) FlagSet(flag uint32)

This macro sets the given bits.

func (*GstObj) FlagUnset

func (o *GstObj) FlagUnset(flag uint32)

This macro unsets the given bits.

func (*GstObj) Flags

func (o *GstObj) Flags() uint32

This macro returns the entire set of flags for the object.

func (*GstObj) GetControlRate

func (o *GstObj) GetControlRate() ClockTime

* Obtain the control-rate for this object . Audio processing GstElement objects will use this rate to sub-divide their processing loop and call gst_object_sync_values() inbetween. The length of the processing segment should be up to control -rate nanoseconds. If the object is not under property control, this will return GST_CLOCK_TIME_NONE. This allows the element to avoid the sub-dividing. The control-rate is not expected to change if the element is in GST_STATE_PAUSED or GST_STATE_PLAYING. Returns the control rate in nanoseconds

func (*GstObj) GetName

func (o *GstObj) GetName() string

MT safe.

func (*GstObj) GetParent

func (o *GstObj) GetParent() *GstObj

Returns the parent of o. Increases the refcount of the parent object so you should Unref it after usage.

func (*GstObj) GetPathString

func (o *GstObj) GetPathString() string

Generates a string describing the path of object in the object hierarchy. Only useful (or used) for debugging. Returns a string describing the path of object . You must g_free() the string after usage. MT safe. Grabs and releases the GstObject's LOCK for all objects in the hierarchy.

func (*GstObj) HasActiveControlBindings

func (o *GstObj) HasActiveControlBindings() bool

* Check if the object has an active controlled properties. Returns TRUE if the object has active controlled properties

func (*GstObj) HasAncestor

func (o *GstObj) HasAncestor(ancestor *GstObj) bool

* @deprecated gst_object_has_ancestor is deprecated and should not be used in newly-written code. Use gst_object_has_as_ancestor() instead. MT safe. Grabs and releases object 's locks. Check if object has an ancestor ancestor somewhere up in the hierarchy. One can e.g. check if a GstElement is inside a GstPipeline. Returns TRUE if ancestor is an ancestor of object .

func (*GstObj) HasAsAncestor

func (o *GstObj) HasAsAncestor(ancestor *GstObj) bool

* Check if object has an ancestor ancestor somewhere up in the hierarchy. One can e.g. check if a GstElement is inside a GstPipeline. Returns TRUE if ancestor is an ancestor of object . MT safe. Grabs and releases object 's locks.

func (*GstObj) HasAsParent

func (o *GstObj) HasAsParent(parent *GstObj) bool

* Check if parent is the parent of object . E.g. a GstElement can check if it owns a given GstPad. Returns FALSE if either object or parent is NULL. TRUE if parent is the parent of object . Otherwise FALSE. MT safe. Grabs and releases object 's locks. Since: 1.6

func (*GstObj) Ref

func (o *GstObj) Ref(obj *GstObj) *GstObj

* Increments the reference count on object . This function does not take the lock on object because it relies on atomic refcounting. This object returns the input parameter to ease writing constructs like : result = gst_object_ref (object->parent); Returns A pointer to object .

func (*GstObj) RefSink

func (o *GstObj) RefSink(obj *GstObj) *GstObj

* Increase the reference count of object , and possibly remove the floating reference, if object has a floating reference. In other words, if the object is floating, then this call "assumes ownership" of the floating reference, converting it to a normal reference by clearing the floating flag while leaving the reference count unchanged. If the object is not floating, then this call adds a new normal reference increasing the reference count by one.

func (*GstObj) Replace

func (o *GstObj) Replace(newObj *GstObj) bool

* Atomically modifies a pointer to point to a new object. The reference count of oldobj is decreased and the reference count of newobj is increased. Either newobj and the value pointed to by oldobj may be NULL. Returns TRUE if newobj was different from oldobj

func (*GstObj) SetControlBindingDisabled

func (o *GstObj) SetControlBindingDisabled(propertyName string, disabled bool)

* This function is used to disable the control bindings on a property for some time, i.e. gst_object_sync_values() will do nothing for the property.

func (*GstObj) SetControlBindingsDisabled

func (o *GstObj) SetControlBindingsDisabled(disabled bool)

* This function is used to disable all controlled properties of the object for some time, i.e. gst_object_sync_values() will do nothing.

func (*GstObj) SetControlRate

func (o *GstObj) SetControlRate(t ClockTime)

* Change the control-rate for this object . Audio processing GstElement objects will use this rate to sub-divide their processing loop and call gst_object_sync_values() inbetween. The length of the processing segment should be up to control -rate nanoseconds. The control-rate should not change if the element is in GST_STATE_PAUSED or GST_STATE_PLAYING.

func (*GstObj) SetName

func (o *GstObj) SetName(name string) bool

Sets the name of object. Returns true if the name could be set. MT safe.

func (*GstObj) SetParent

func (o *GstObj) SetParent(p *GstObj) bool

Sets the parent of o to p. This function causes the parent-set signal to be emitted when the parent was successfully set.

func (*GstObj) SuggestNextSync

func (o *GstObj) SuggestNextSync() ClockTime

* Returns a suggestion for timestamps where buffers should be split to get best controller results. Returns Returns the suggested timestamp or GST_CLOCK_TIME_NONE if no control-rate was set.

func (*GstObj) SyncValues

func (o *GstObj) SyncValues(t ClockTime) bool

* Sets the properties of the object, according to the GstControlSources that (maybe) handle them and for the given timestamp. If this function fails, it is most likely the application developers fault. Most probably the control sources are not setup correctly. Parameters Returns TRUE if the controller values could be applied to the object properties, FALSE otherwise

func (*GstObj) Unparent

func (o *GstObj) Unparent()

Clear the parent of object, removing the associated reference. This function decreases the refcount of o. MT safe. Grabs and releases object's lock.

func (*GstObj) Unref

func (o *GstObj) Unref()

* Decrements the reference count on object . If reference count hits zero, destroy object . This function does not take the lock on object as it relies on atomic refcounting. The unref method should never be called with the LOCK held since this might deadlock the dispose function.

type GstObjClass

type GstObjClass struct {
	glib.Object
}

func (*GstObjClass) AsGstObjClass

func (o *GstObjClass) AsGstObjClass() *GstObjClass

type IntRange

type IntRange struct {
	Start, End int
}

#define GST_TYPE_INT_RANGE (_gst_int_range_type) a GValue type that represents an integer range Returns the GType of GstIntRange

func ValueRange

func ValueRange(v *glib.Value) *IntRange

func (*IntRange) String

func (r *IntRange) String() string

func (*IntRange) Type

func (r *IntRange) Type() glib.Type

func (*IntRange) Value

func (r *IntRange) Value() *glib.Value

type Iterator

type Iterator C.GstIterator

type IteratorItem

type IteratorItem C.GstIteratorItem

type IteratorResult

type IteratorResult C.GstIteratorResult

type LibraryError

type LibraryError C.GstLibraryError

type Message

type Message struct {
	glib.Object
}

type Message C.GstMessage

func NewApplicationMessage

func NewApplicationMessage(o *GstObj, structure *Structure) *Message

func (*Message) GetSrc

func (m *Message) GetSrc() *GstObj

func (*Message) GetStructure

func (m *Message) GetStructure() (string, glib.Params)

func (*Message) GetType

func (m *Message) GetType() MessageType

func (*Message) ParseBuffering

func (m *Message) ParseBuffering() int

Extracts the buffering percent from the GstMessage. see also gst_message_new_buffering().

MT safe. Parameters message A valid GstMessage of type GST_MESSAGE_BUFFERING. percent Return location for the percent.

func (*Message) ParseError

func (m *Message) ParseError() (err *glib.Error, debug string)

func (*Message) ParseStateChanged

func (m *Message) ParseStateChanged() (oldState, newState, pendingState State)

func (*Message) Ref

func (m *Message) Ref() *Message

func (*Message) Type

func (m *Message) Type() glib.Type

func (*Message) Unref

func (m *Message) Unref()

type MessageType

type MessageType C.GstMessageType

func (MessageType) String

func (t MessageType) String() string

type Pad

type Pad struct {
	GstObj
}

func NewPad

func NewPad(name string, direction PadDirection) *Pad

Creates a new pad with the given name in the given direction. If name is NULL, a guaranteed unique name (across all pads) will be assigned. This function makes a copy of the name so you can safely free the name. Parameters name the name of the new pad. direction the GstPadDirection of the pad. Returns a new GstPad, or NULL in case of an error. MT safe.

func NewPadFromStaticTemplate

func NewPadFromStaticTemplate(templ *StaticPadTemplate, name string) *Pad

Creates a new pad with the given name from the given static template. If name is NULL, a guaranteed unique name (across all pads) will be assigned. This function makes a copy of the name so you can safely free the name. Parameters templ the GstStaticPadTemplate to use name the name of the pad Returns a new GstPad, or NULL in case of an error.

func NewPadFromTemplate

func NewPadFromTemplate(templ *PadTemplate, name string) *Pad

Creates a new pad with the given name from the given template. If name is NULL, a guaranteed unique name (across all pads) will be assigned. This function makes a copy of the name so you can safely free the name. Parameters templ the pad template to use name the name of the pad. Returns a new GstPad, or NULL in case of an error.

func (*Pad) ActiveMode

func (p *Pad) ActiveMode(mode PadMode, active bool) bool

Activates or deactivates the given pad in mode via dispatching to the pad's activatemodefunc. For use from within pad activation functions only. If you don't know what this is, you probably don't want to call it. Parameters pad the GstPad to activate or deactivate. mode the requested activation mode active whether or not the pad should be active. Returns TRUE if the operation was successful. MT safe.

func (*Pad) AsPad

func (p *Pad) AsPad() *Pad
func (p *Pad) CanLink(sinkpad *Pad) bool

Checks if the source pad and the sink pad are compatible so they can be linked. Parameters sinkpad the sink GstPad. Returns TRUE if the pads can be linked.

func (*Pad) Chain

func (p *Pad) Chain(buffer *Buffer) FlowReturn

Chain a buffer to pad .

The function returns GST_FLOW_FLUSHING if the pad was flushing.

If the buffer type is not acceptable for pad (as negotiated with a preceding GST_EVENT_CAPS event), this function returns GST_FLOW_NOT_NEGOTIATED.

The function proceeds calling the chain function installed on pad (see gst_pad_set_chain_function()) and the return value of that function is returned to the caller. GST_FLOW_NOT_SUPPORTED is returned if pad has no chain function.

In all cases, success or failure, the caller loses its reference to buffer after calling this function. Parameters pad a sink GstPad, returns GST_FLOW_ERROR if not. buffer the GstBuffer to send, return GST_FLOW_ERROR if not. Returns a GstFlowReturn from the pad. MT safe.

func (*Pad) ChainList

func (p *Pad) ChainList(list *BufferList) FlowReturn

Chain a bufferlist to pad .

The function returns GST_FLOW_FLUSHING if the pad was flushing.

If pad was not negotiated properly with a CAPS event, this function returns GST_FLOW_NOT_NEGOTIATED.

The function proceeds calling the chainlist function installed on pad (see gst_pad_set_chain_list_function()) and the return value of that function is returned to the caller. GST_FLOW_NOT_SUPPORTED is returned if pad has no chainlist function.

In all cases, success or failure, the caller loses its reference to list after calling this function.

MT safe. Parameters pad a sink GstPad, returns GST_FLOW_ERROR if not. list the GstBufferList to send, return GST_FLOW_ERROR if not. Returns a GstFlowReturn from the pad.

func (*Pad) CheckReconfigure

func (p *Pad) CheckReconfigure() bool

Check and clear the GST_PAD_FLAG_NEED_RECONFIGURE flag on pad and return TRUE if the flag was set. Parameters pad the GstPad to check Returns TRUE is the GST_PAD_FLAG_NEED_RECONFIGURE flag was set on pad .

func (*Pad) CreateStreamId

func (p *Pad) CreateStreamId(parent *Element, stream_id string) string

Creates a stream-id for the source GstPad pad by combining the upstream information with the optional stream_id of the stream of pad . pad must have a parent GstElement and which must have zero or one sinkpad. stream_id can only be NULL if the parent element of pad has only a single source pad.

This function generates an unique stream-id by getting the upstream stream-start event stream ID and appending stream_id to it. If the element has no sinkpad it will generate an upstream stream-id by doing an URI query on the element and in the worst case just uses a random number. Source elements that don't implement the URI handler interface should ideally generate a unique, deterministic stream-id manually instead.

Since stream IDs are sorted alphabetically, any numbers in the stream ID should be printed with a fixed number of characters, preceded by 0's, such as by using the format %03u instead of %u. Parameters pad A source GstPad parent Parent GstElement of pad stream_id The stream-id. Returns A stream-id for pad . g_free() after usage.

func (*Pad) EventDefault

func (p *Pad) EventDefault(parent *GstObj, event *Event) bool

Invokes the default event handler for the given pad.

The EOS event will pause the task associated with pad before it is forwarded to all internally linked pads,

The event is sent to all pads internally linked to pad . This function takes ownership of event . Parameters pad a GstPad to call the default event handler on. parent the parent of pad or NULL. event the GstEvent to handle. Returns TRUE if the event was sent successfully.

func (*Pad) GetAllowedCaps

func (p *Pad) GetAllowedCaps() *Caps

Gets the capabilities of the allowed media types that can flow through pad and its peer. The allowed capabilities is calculated as the intersection of the results of calling gst_pad_query_caps() on pad and its peer. The caller owns a reference on the resulting caps. Returns the allowed GstCaps of the pad link. Unref the caps when you no longer need it. This function returns NULL when pad has no peer. MT safe.

func (*Pad) GetCurrentCaps

func (p *Pad) GetCurrentCaps() *Caps

Gets the capabilities currently configured on pad with the last GST_EVENT_CAPS event. Returns the current caps of the pad with incremented ref-count or NULL when pad has no caps. Unref after usage.

func (*Pad) GetDirection

func (p *Pad) GetDirection() PadDirection

Gets the direction of the pad. The direction of the pad is decided at construction time so this function does not take the LOCK. Returns the GstPadDirection of the pad. MT safe.

func (*Pad) GetElementPrivate

func (p *Pad) GetElementPrivate() glib.Pointer

Gets the private data of a pad. No locking is performed in this function. Parameters pad the GstPad to get the private data of. Returns a gpointer to the private data.

func (*Pad) GetLastFlowReturn

func (p *Pad) GetLastFlowReturn(sinkpad *Pad, flags PadLinkCheck) FlowReturn

Gets the GstFlowReturn return from the last data passed by this pad. Parameters pad the GstPad Since: 1.4

func (*Pad) GetOffset

func (p *Pad) GetOffset() int64

Get the offset applied to the running time of pad . pad has to be a source pad. Parameters pad a GstPad Returns the offset.

func (*Pad) GetPadTemplate

func (p *Pad) GetPadTemplate() *PadTemplate

Gets the template for pad . Returns the GstPadTemplate from which this pad was instantiated, or NULL if this pad has no template. Unref after usage.

func (*Pad) GetPadTemplateCaps

func (p *Pad) GetPadTemplateCaps() *Caps

Gets the capabilities for pad 's template. Returns the GstCaps of this pad template. Unref after usage.

func (*Pad) GetParentElement

func (p *Pad) GetParentElement() *Element

Gets the parent of pad , cast to a GstElement. If a pad has no parent or its parent is not an element, return NULL. Returns the parent of the pad. The caller has a reference on the parent, so unref when you're finished with it. MT safe.

func (*Pad) GetPeer

func (p *Pad) GetPeer() *Pad

Gets the peer of pad . This function refs the peer pad so you need to unref it after use. Returns the peer GstPad. Unref after usage. MT safe.

func (*Pad) GetStickyEvent

func (p *Pad) GetStickyEvent(event_type EventType, idx uint) *Event

Returns a new reference of the sticky event of type event_type from the event. Parameters event_type the GstEventType that should be retrieved. idx the index of the event Returns a GstEvent of type event_type or NULL when no event of event_type was on pad . Unref after usage.

func (*Pad) GetStreamId

func (p *Pad) GetStreamId(parent *Element, stream_id string) string

Returns the current stream-id for the pad , or NULL if none has been set yet, i.e. the pad has not received a stream-start event yet.

This is a convenience wrapper around gst_pad_get_sticky_event() and gst_event_parse_stream_start().

The returned stream-id string should be treated as an opaque string, its contents should not be interpreted. Parameters pad A source GstPad Returns a newly-allocated copy of the stream-id for pad , or NULL. g_free() the returned string when no longer needed. Since: 1.2

func (*Pad) HasCurrentCaps

func (p *Pad) HasCurrentCaps() bool

Check if pad has caps set on it with a GST_EVENT_CAPS event. Returns TRUE when pad has caps associated with it.

func (*Pad) HasPendingEvents

func (p *Pad) HasPendingEvents() bool

#define GST_PAD_HAS_PENDING_EVENTS(pad) (GST_OBJECT_FLAG_IS_SET (pad, GST_PAD_FLAG_PENDING_EVENTS)) Check if the given pad has pending events. This is used internally by GStreamer. Parameters pad a GstPad

func (*Pad) IsAcceptIntersect

func (p *Pad) IsAcceptIntersect() bool

#define GST_PAD_IS_ACCEPT_INTERSECT(pad) (GST_OBJECT_FLAG_IS_SET (pad, GST_PAD_FLAG_ACCEPT_INTERSECT)) Check if the pad's accept intersect flag is set. The default accept-caps handler will check if the caps intersect the query-caps result instead of checking for a subset. This is interesting for parser elements that can accept incompletely specified caps.

func (*Pad) IsAcceptTemplate

func (p *Pad) IsAcceptTemplate() bool

#define GST_PAD_IS_ACCEPT_TEMPLATE(pad) (GST_OBJECT_FLAG_IS_SET (pad, GST_PAD_FLAG_ACCEPT_TEMPLATE)) Check if the pad's accept caps operation will use the pad template caps. The default accept-caps will do a query caps to get the caps, which might be querying downstream causing unnecessary overhead. It is recommended to implement a proper accept-caps query handler or to use this flag to prevent recursive accept-caps handling. Since: 1.6

func (*Pad) IsActive

func (p *Pad) IsActive() bool

Query if a pad is active Parameters pad the GstPad to query Returns TRUE if the pad is active. MT safe.

func (*Pad) IsBlocked

func (p *Pad) IsBlocked() bool

Checks if the pad is blocked or not. This function returns the last requested state of the pad. It is not certain that the pad is actually blocking at this point (see gst_pad_is_blocking()). Parameters pad the GstPad to query Returns TRUE if the pad is blocked. MT safe.

func (*Pad) IsBlocking

func (p *Pad) IsBlocking() bool

Checks if the pad is blocking or not. This is a guaranteed state of whether the pad is actually blocking on a GstBuffer or a GstEvent. Parameters pad the GstPad to query Returns TRUE if the pad is blocking. MT safe.

func (*Pad) IsEOS

func (p *Pad) IsEOS() bool

#define GST_PAD_IS_EOS(pad) (GST_OBJECT_FLAG_IS_SET (pad, GST_PAD_FLAG_EOS)) Check if the pad is in EOS state. Parameters pad a GstPad

func (*Pad) IsFixedCaps

func (p *Pad) IsFixedCaps() bool

#define GST_PAD_IS_FIXED_CAPS(pad) (GST_OBJECT_FLAG_IS_SET (pad, GST_PAD_FLAG_FIXED_CAPS)) Check if the given pad is using fixed caps, which means that once the caps are set on the pad , the caps query function will only return those caps. See gst_pad_use_fixed_caps().

func (*Pad) IsFlushing

func (p *Pad) IsFlushing() bool

#define GST_PAD_IS_FLUSHING(pad) (GST_OBJECT_FLAG_IS_SET (pad, GST_PAD_FLAG_FLUSHING)) Check if the given pad is flushing. Parameters pad a GstPad

func (*Pad) IsLinked

func (p *Pad) IsLinked() bool

Checks if a pad is linked to another pad or not. Returns TRUE if the pad is linked, FALSE otherwise. MT safe.

func (*Pad) IsProxyAllocation

func (p *Pad) IsProxyAllocation() bool

#define GST_PAD_IS_PROXY_ALLOCATION(pad) (GST_OBJECT_FLAG_IS_SET (pad, GST_PAD_FLAG_PROXY_ALLOCATION)) Check if the given pad is set as proxy allocation which means that the default query handler will forward allocation queries to the internally linked pads instead of discarding them. Parameters pad a GstPad

func (*Pad) IsProxyCaps

func (p *Pad) IsProxyCaps() bool

#define GST_PAD_IS_PROXY_CAPS(pad) (GST_OBJECT_FLAG_IS_SET (pad, GST_PAD_FLAG_PROXY_CAPS)) Check if the given pad is set to proxy caps. This means that the default event and query handler will forward all events and queries to the internally linked pads instead of discarding them.

func (*Pad) IsProxyScheduling

func (p *Pad) IsProxyScheduling() bool

#define GST_PAD_IS_PROXY_SCHEDULING(pad) (GST_OBJECT_FLAG_IS_SET (pad, GST_PAD_FLAG_PROXY_SCHEDULING)) Check if the given pad is set to proxy scheduling queries, which means that the default query handler will forward scheduling queries to the internally linked pads instead of discarding them.

func (*Pad) IsSink

func (p *Pad) IsSink() bool

#define GST_PAD_IS_SINK(pad) (GST_PAD_DIRECTION(pad) == GST_PAD_SINK) Parameters pad a GstPad Returns TRUE if the pad is a sink pad (i.e. consumes data).

func (*Pad) IsSrc

func (p *Pad) IsSrc() bool

#define GST_PAD_IS_SRC(pad) (GST_PAD_DIRECTION(pad) == GST_PAD_SRC) Parameters pad a GstPad Returns TRUE if the pad is a source pad (i.e. produces data).

func (p *Pad) Link(sinkpad *Pad) PadLinkReturn

Links the source pad and the sink pad. Parameters sinkpad the sink GstPad to link. Returns A result code indicating if the connection worked or what went wrong. MT Safe.

func (*Pad) LinkFull

func (p *Pad) LinkFull(sinkpad *Pad, flags PadLinkCheck) PadLinkReturn

Links the source pad and the sink pad. This variant of gst_pad_link provides a more granular control on the checks being done when linking. While providing some considerable speedups the caller of this method must be aware that wrong usage of those flags can cause severe issues. Refer to the documentation of GstPadLinkCheck for more information. MT Safe. Parameters sinkpad the sink GstPad to link. flags the checks to validate when linking Returns A result code indicating if the connection worked or what went wrong.

func (*Pad) MarkReconfigure

func (p *Pad) MarkReconfigure()

Mark a pad for needing reconfiguration. The next call to gst_pad_check_reconfigure() will return TRUE after this call. Parameters pad the GstPad to mark

func (*Pad) Mode

func (p *Pad) Mode() PadMode

Get the GstPadMode of pad, which will be GST_PAD_MODE_NONE if the pad has not been activated yet, and otherwise either GST_PAD_MODE_PUSH or GST_PAD_MODE_PULL depending on which mode the pad was activated in. Parameters pad a GstPad

func (*Pad) NeedsParent

func (p *Pad) NeedsParent() bool

#define GST_PAD_NEEDS_PARENT(pad) (GST_OBJECT_FLAG_IS_SET (pad, GST_PAD_FLAG_NEED_PARENT)) Check if there is a parent object before calling into the pad callbacks. This is used internally by GStreamer.

func (*Pad) NeedsReconfigure

func (p *Pad) NeedsReconfigure() bool

Check the GST_PAD_FLAG_NEED_RECONFIGURE flag on pad and return TRUE if the flag was set. Parameters pad the GstPad to check Returns TRUE is the GST_PAD_FLAG_NEED_RECONFIGURE flag is set on pad .

func (*Pad) PauseTask

func (p *Pad) PauseTask() bool

Pause the task of pad . This function will also wait until the function executed by the task is finished if this function is not called from the task function. Parameters pad the GstPad to pause the task of Returns a TRUE if the task could be paused or FALSE when the pad has no task.

func (*Pad) PeerQuery

func (p *Pad) PeerQuery(query *Query) bool

Performs gst_pad_query() on the peer of pad .

The caller is responsible for both the allocation and deallocation of the query structure. Parameters pad a GstPad to invoke the peer query on. query the GstQuery to perform. Returns TRUE if the query could be performed. This function returns FALSE if pad has no peer.

func (*Pad) PeerQueryAcceptCaps

func (p *Pad) PeerQueryAcceptCaps(caps *Caps) bool

Check if the peer of pad accepts caps . If pad has no peer, this function returns TRUE. Parameters pad a GstPad to check the peer of caps a GstCaps to check on the pad Returns TRUE if the peer of pad can accept the caps or pad has no peer.

func (*Pad) PeerQueryCaps

func (p *Pad) PeerQueryCaps(filter *Caps) *Caps

Gets the capabilities of the peer connected to this pad. Similar to gst_pad_query_caps().

When called on srcpads filter contains the caps that upstream could produce in the order preferred by upstream. When called on sinkpads filter contains the caps accepted by downstream in the preferred order. filter might be NULL but if it is not NULL the returned caps will be a subset of filter . Parameters pad a GstPad to get the capabilities of. filter a GstCaps filter, or NULL. Returns the caps of the peer pad with incremented ref-count. When there is no peer pad, this function returns filter or, when filter is NULL, ANY caps.

func (*Pad) PeerQueryConvert

func (p *Pad) PeerQueryConvert(src_format Format, src_val int64, dest_format Format) (bool, int64)

Queries the peer pad of a given sink pad to convert src_val in src_format to dest_format . Parameters pad a GstPad, on whose peer pad to invoke the convert query on. Must be a sink pad. src_format a GstFormat to convert from. src_val a value to convert. dest_format the GstFormat to convert to. Returns TRUE if the query could be performed. dest_val a pointer to the result.

func (*Pad) PeerQueryDuration

func (p *Pad) PeerQueryDuration(format Format) (bool, int64)

Queries the peer pad of a given sink pad for the total stream duration. Parameters pad a GstPad on whose peer pad to invoke the duration query on. Must be a sink pad. format the GstFormat requested Returns TRUE if the query could be performed. duration a location in which to store the total duration, or NULL.

func (*Pad) PeerQueryPosition

func (p *Pad) PeerQueryPosition(format Format) (bool, int64)

Queries the peer of a given sink pad for the stream position. Parameters pad a GstPad on whose peer to invoke the position query on. Must be a sink pad. format the GstFormat requested Returns TRUE if the query could be performed. cur a location in which to store the current position, or NULL.

func (*Pad) ProxyQueryAcceptCaps

func (p *Pad) ProxyQueryAcceptCaps(query *Query) bool

Checks if all internally linked pads of pad accepts the caps in query and returns the intersection of the results. This function is useful as a default accept caps query function for an element that can handle any stream format, but requires caps that are acceptable for all opposite pads. Parameters pad a GstPad to proxy. query an ACCEPT_CAPS GstQuery. Returns TRUE if query could be executed

func (*Pad) ProxyQueryCaps

func (p *Pad) ProxyQueryCaps(query *Query) bool

Calls gst_pad_query_caps() for all internally linked pads of pad and returns the intersection of the results. This function is useful as a default caps query function for an element that can handle any stream format, but requires all its pads to have the same caps. Two such elements are tee and adder. Parameters pad a GstPad to proxy. query a CAPS GstQuery. Returns TRUE if query could be executed

func (*Pad) PullRange

func (p *Pad) PullRange(offset uint64, size uint) (FlowReturn, *Buffer)

Pulls a buffer from the peer pad or fills up a provided buffer. This function will first trigger the pad block signal if it was installed. When pad is not linked GST_FLOW_NOT_LINKED is returned else this function returns the result of gst_pad_get_range() on the peer pad. See gst_pad_get_range() for a list of return values and for the semantics of the arguments of this function.

If buffer points to a variable holding NULL, a valid new GstBuffer will be placed in buffer when this function returns GST_FLOW_OK. The new buffer must be freed with gst_buffer_unref() after usage. When this function returns any other result value, buffer will still point to NULL.

When buffer points to a variable that points to a valid GstBuffer, the buffer will be filled with the result data when this function returns GST_FLOW_OK. When this function returns any other result value, buffer will be unchanged. If the provided buffer is larger than size , only size bytes will be filled in the result buffer and its size will be updated accordingly.

Note that less than size bytes can be returned in buffer when, for example, an EOS condition is near or when buffer is not large enough to hold size bytes. The caller should check the result buffer size to get the result size. Parameters pad a sink GstPad, returns GST_FLOW_ERROR if not. offset The start offset of the buffer size The length of the buffer Returns a GstFlowReturn from the peer pad. buffer a pointer to hold the GstBuffer, returns GST_FLOW_ERROR if NULL. MT safe.

func (*Pad) Push

func (p *Pad) Push(buffer *Buffer) FlowReturn

Pushes a buffer to the peer of pad . This function will call installed block probes before triggering any installed data probes. The function proceeds calling gst_pad_chain() on the peer pad and returns the value from that function. If pad has no peer, GST_FLOW_NOT_LINKED will be returned. In all cases, success or failure, the caller loses its reference to buffer after calling this function. Parameters pad a source GstPad, returns GST_FLOW_ERROR if not. buffer the GstBuffer to push returns GST_FLOW_ERROR if not. Returns a GstFlowReturn from the peer pad. MT safe.

func (*Pad) PushEvent

func (p *Pad) PushEvent(event *Event) bool

Sends the event to the peer of the given pad. This function is mainly used by elements to send events to their peer elements. This function takes ownership of the provided event so you should gst_event_ref() it if you want to reuse the event after this call. Parameters pad a GstPad to push the event to. event the GstEvent to send to the pad. Returns TRUE if the event was handled. MT safe.

func (*Pad) PushList

func (p *Pad) PushList(list *BufferList) FlowReturn

Pushes a buffer list to the peer of pad . This function will call installed block probes before triggering any installed data probes. The function proceeds calling the chain function on the peer pad and returns the value from that function. If pad has no peer, GST_FLOW_NOT_LINKED will be returned. If the peer pad does not have any installed chainlist function every group buffer of the list will be merged into a normal GstBuffer and chained via gst_pad_chain(). In all cases, success or failure, the caller loses its reference to list after calling this function. Parameters pad a source GstPad, returns GST_FLOW_ERROR if not. list the GstBufferList to push returns GST_FLOW_ERROR if not. Returns a GstFlowReturn from the peer pad. MT safe.

func (*Pad) Query

func (p *Pad) Query(query *Query) bool

Dispatches a query to a pad. The query should have been allocated by the caller via one of the type-specific allocation functions. The element that the pad belongs to is responsible for filling the query with an appropriate response, which should then be parsed with a type-specific query parsing function.

Again, the caller is responsible for both the allocation and deallocation of the query structure.

Please also note that some queries might need a running pipeline to work. Parameters pad a GstPad to invoke the default query on. query the GstQuery to perform. Returns TRUE if the query could be performed.

func (*Pad) QueryAcceptCaps

func (p *Pad) QueryAcceptCaps(caps *Caps) bool

Check if the given pad accepts the caps. Parameters pad a GstPad to check caps a GstCaps to check on the pad Returns TRUE if the pad can accept the caps.

func (*Pad) QueryCaps

func (p *Pad) QueryCaps(filter *Caps) *Caps

Gets the capabilities this pad can produce or consume. Note that this method doesn't necessarily return the caps set by sending a gst_event_new_caps() - use gst_pad_get_current_caps() for that instead. gst_pad_query_caps returns all possible caps a pad can operate with, using the pad's CAPS query function, If the query fails, this function will return filter , if not NULL, otherwise ANY.

When called on sinkpads filter contains the caps that upstream could produce in the order preferred by upstream. When called on srcpads filter contains the caps accepted by downstream in the preferred order. filter might be NULL but if it is not NULL the returned caps will be a subset of filter .

Note that this function does not return writable GstCaps, use gst_caps_make_writable() before modifying the caps. Parameters pad a GstPad to get the capabilities of. filter suggested GstCaps, or NULL. Returns the caps of the pad with incremented ref-count.

func (*Pad) QueryConvert

func (p *Pad) QueryConvert(src_format Format, src_val int64, dest_format Format) (bool, int64)

Queries a pad to convert src_val in src_format to dest_format . Parameters pad a GstPad to invoke the convert query on. src_format a GstFormat to convert from. src_val a value to convert. dest_format the GstFormat to convert to. Returns TRUE if the query could be performed. dest_val a pointer to the result.

func (*Pad) QueryDefault

func (p *Pad) QueryDefault(parent *GstObj, query *Query) bool

Invokes the default query handler for the given pad. The query is sent to all pads internally linked to pad . Note that if there are many possible sink pads that are internally linked to pad , only one will be sent the query. Multi-sinkpad elements should implement custom query handlers. Parameters pad a GstPad to call the default query handler on. parent the parent of pad or NULL. query the GstQuery to handle. Returns TRUE if the query was performed successfully.

func (*Pad) QueryDuration

func (p *Pad) QueryDuration(format Format) (bool, int64)

Queries a pad for the total stream duration. Parameters pad a GstPad to invoke the duration query on. format the GstFormat requested Returns TRUE if the query could be performed. duration a location in which to store the total duration, or NULL.

func (*Pad) QueryPosition

func (p *Pad) QueryPosition(format Format) (bool, int64)

Queries a pad for the stream position. Parameters pad a GstPad to invoke the position query on. format the GstFormat requested Returns TRUE if the query could be performed. cur A location in which to store the current position, or NULL.

func (*Pad) RemoveProbe

func (p *Pad) RemoveProbe(event_type EventType, id uint64)

Remove the probe with id from pad . MT safe. Parameters pad the GstPad with the probe id the probe id to remove

func (*Pad) SendEvent

func (p *Pad) SendEvent(event *Event) bool

Sends the event to the pad. This function can be used by applications to send events in the pipeline.

If pad is a source pad, event should be an upstream event. If pad is a sink pad, event should be a downstream event. For example, you would not send a GST_EVENT_EOS on a src pad; EOS events only propagate downstream. Furthermore, some downstream events have to be serialized with data flow, like EOS, while some can travel out-of-band, like GST_EVENT_FLUSH_START. If the event needs to be serialized with data flow, this function will take the pad's stream lock while calling its event function.

To find out whether an event type is upstream, downstream, or downstream and serialized, see GstEventTypeFlags, gst_event_type_get_flags(), GST_EVENT_IS_UPSTREAM, GST_EVENT_IS_DOWNSTREAM, and GST_EVENT_IS_SERIALIZED. Note that in practice that an application or plugin doesn't need to bother itself with this information; the core handles all necessary locks and checks.

This function takes ownership of the provided event so you should gst_event_ref() it if you want to reuse the event after this call. Parameters pad a GstPad to send the event to. event the GstEvent to send to the pad. Returns TRUE if the event was handled.

func (*Pad) SetAcceptIntersect

func (p *Pad) SetAcceptIntersect()

#define GST_PAD_SET_ACCEPT_INTERSECT(pad) (GST_OBJECT_FLAG_SET (pad, GST_PAD_FLAG_ACCEPT_INTERSECT)) Set pad to by default accept caps by intersecting the result instead of checking for a subset. This is interesting for parser elements that can accept incompletely specified caps.

func (*Pad) SetAcceptTemplate

func (p *Pad) SetAcceptTemplate()

#define GST_PAD_SET_ACCEPT_TEMPLATE(pad) (GST_OBJECT_FLAG_SET (pad, GST_PAD_FLAG_ACCEPT_TEMPLATE)) Set pad to by default use the pad template caps to compare with the accept caps instead of using a caps query result. Since: 1.6

func (*Pad) SetActive

func (p *Pad) SetActive(active bool) bool

Activates or deactivates the given pad. Normally called from within core state change functions.

If active , makes sure the pad is active. If it is already active, either in push or pull mode, just return. Otherwise dispatches to the pad's activate function to perform the actual activation.

If not active , calls gst_pad_activate_mode() with the pad's current mode and a FALSE argument. Parameters pad the GstPad to activate or deactivate. active whether or not the pad should be active. Returns TRUE if the operation was successful. MT safe.

func (*Pad) SetElementPrivate

func (p *Pad) SetElementPrivate(priv glib.Pointer)

Set the given private data gpointer on the pad. This function can only be used by the element that owns the pad. No locking is performed in this function. Parameters pad the GstPad to set the private data of. priv The private data to attach to the pad.

func (*Pad) SetFlushing

func (p *Pad) SetFlushing()

#define GST_PAD_SET_FLUSHING(pad) (GST_OBJECT_FLAG_SET (pad, GST_PAD_FLAG_FLUSHING)) Set the given pad to flushing state, which means it will not accept any more events, queries or buffers, and return GST_FLOW_FLUSHING if any buffers are pushed on it. This usually happens when the pad is shut down or when a flushing seek happens. This is used inside GStreamer when flush start/stop events pass through pads, or when an element state is changed and pads are activated or deactivated. Parameters pad a GstPad

func (*Pad) SetOffset

func (p *Pad) SetOffset(offset int64)

Set the offset that will be applied to the running time of pad . Parameters pad a GstPad offset the offset

func (*Pad) SetProxyAllocation

func (p *Pad) SetProxyAllocation()

#define GST_PAD_SET_PROXY_ALLOCATION(pad) (GST_OBJECT_FLAG_SET (pad, GST_PAD_FLAG_PROXY_ALLOCATION)) Set pad to proxy allocation queries, which means that the default query handler will forward allocation queries to the internally linked pads instead of discarding them. Set this if the element always outputs data in the exact same format as it receives as input. This is just for convenience to avoid implementing some standard query handling code in an element. Parameters pad a GstPad

func (*Pad) SetProxyCaps

func (p *Pad) SetProxyCaps()

#define GST_PAD_SET_PROXY_CAPS(pad) (GST_OBJECT_FLAG_SET (pad, GST_PAD_FLAG_PROXY_CAPS)) Set pad to proxy caps, so that all caps-related events and queries are proxied down- or upstream to the other side of the element automatically. Set this if the element always outputs data in the exact same format as it receives as input. This is just for convenience to avoid implementing some standard event and query handling code in an element.

func (*Pad) SetProxyScheduling

func (p *Pad) SetProxyScheduling()

#define GST_PAD_SET_PROXY_SCHEDULING(pad) (GST_OBJECT_FLAG_SET (pad, GST_PAD_FLAG_PROXY_SCHEDULING)) Set pad to proxy scheduling queries, which means that the default query handler will forward scheduling queries to the internally linked pads instead of discarding them. You will usually want to handle scheduling queries explicitly if your element supports multiple scheduling modes.

func (*Pad) StopTask

func (p *Pad) StopTask() bool

Stop the task of pad . This function will also make sure that the function executed by the task will effectively stop if not called from the GstTaskFunction.

This function will deadlock if called from the GstTaskFunction of the task. Use gst_task_pause() instead.

Regardless of whether the pad has a task, the stream lock is acquired and released so as to ensure that streaming through this pad has finished. Parameters pad the GstPad to stop the task of Returns a TRUE if the task could be stopped or FALSE on error.

func (*Pad) StoreStickyEvent

func (p *Pad) StoreStickyEvent(event *Event) FlowReturn

Store the sticky event on pad Parameters event a GstEvent Returns GST_FLOW_OK on success, GST_FLOW_FLUSHING when the pad was flushing or GST_FLOW_EOS when the pad was EOS. Since: 1.2

func (*Pad) Type

func (p *Pad) Type() glib.Type

LiD: add GstPad Type() interface

func (p *Pad) Unlink(sinkpad *Pad) bool

Unlinks the source pad from the sink pad. Will emit the “unlinked” signal on both pads. Parameters sinkpad the sink GstPad to unlink. Returns TRUE if the pads were unlinked. This function returns FALSE if the pads were not linked together. MT safe.

func (*Pad) UnsetAcceptIntersect

func (p *Pad) UnsetAcceptIntersect()

#define GST_PAD_UNSET_ACCEPT_INTERSECT(pad) (GST_OBJECT_FLAG_UNSET (pad, GST_PAD_FLAG_ACCEPT_INTERSECT)) Unset accept intersect flag.

func (*Pad) UnsetAcceptTemplate

func (p *Pad) UnsetAcceptTemplate()

#define GST_PAD_UNSET_ACCEPT_TEMPLATE(pad) (GST_OBJECT_FLAG_UNSET (pad, GST_PAD_FLAG_ACCEPT_TEMPLATE)) Unset accept template flag. Since: 1.6

func (*Pad) UnsetFlushing

func (p *Pad) UnsetFlushing()

#define GST_PAD_UNSET_FLUSHING(pad) (GST_OBJECT_FLAG_UNSET (pad, GST_PAD_FLAG_FLUSHING)) Unset the flushing flag. Parameters pad a GstPad

func (*Pad) UnsetProxyAllocation

func (p *Pad) UnsetProxyAllocation()

#define GST_PAD_UNSET_PROXY_ALLOCATION(pad) (GST_OBJECT_FLAG_UNSET (pad, GST_PAD_FLAG_PROXY_ALLOCATION)) Unset proxy allocation flag.

func (*Pad) UnsetProxyCaps

func (p *Pad) UnsetProxyCaps()

#define GST_PAD_UNSET_PROXY_CAPS(pad) (GST_OBJECT_FLAG_UNSET (pad, GST_PAD_FLAG_PROXY_CAPS)) Unset proxy caps flag.

func (*Pad) UnsetProxyScheduling

func (p *Pad) UnsetProxyScheduling()

#define GST_PAD_UNSET_PROXY_SCHEDULING(pad) (GST_OBJECT_FLAG_UNSET (pad, GST_PAD_FLAG_PROXY_SCHEDULING)) Unset proxy scheduling flag.

func (*Pad) UseFixedCaps

func (p *Pad) UseFixedCaps()

A helper function you can use that sets the FIXED_CAPS flag This way the default CAPS query will always return the negotiated caps or in case the pad is not negotiated, the padtemplate caps. The negotiated caps are the caps of the last CAPS event that passed on the pad. Use this function on a pad that, once it negotiated to a CAPS, cannot be renegotiated to something else.

type PadDirection

type PadDirection C.GstPadDirection

func (PadDirection) String

func (p PadDirection) String() string

type PadFlags

type PadFlags C.GstPadFlags

type PadLinkCheck

type PadLinkCheck C.GstPadLinkCheck

type PadLinkReturn

type PadLinkReturn C.GstPadLinkReturn

func (PadLinkReturn) GetName

func (p PadLinkReturn) GetName() string

Gets a string representing the given pad-link return. Returns a static string with the name of the pad-link return. Since: 1.4

func (PadLinkReturn) LinkFailed

func (p PadLinkReturn) LinkFailed() bool

#define GST_PAD_LINK_FAILED(ret) ((ret) < GST_PAD_LINK_OK) Macro to test if the given GstPadLinkReturn value indicates a failed link step.

func (PadLinkReturn) LinkSuccessful

func (p PadLinkReturn) LinkSuccessful() bool

#define GST_PAD_LINK_SUCCESSFUL(ret) ((ret) >= GST_PAD_LINK_OK) Macro to test if the given GstPadLinkReturn value indicates a successful link step.

func (PadLinkReturn) String

func (p PadLinkReturn) String() string

type PadMode

type PadMode C.GstPadMode

func (PadMode) GetName

func (p PadMode) GetName() string

Return the name of a pad mode, for use in debug messages mostly. Returns short mnemonic for pad mode mode

type PadPresence

type PadPresence C.GstPadPresence

func (PadPresence) String

func (p PadPresence) String() string

type PadProbeInfo

type PadProbeInfo C.GstPadProbeInfo

func (*PadProbeInfo) AsPadProbeInfo

func (p *PadProbeInfo) AsPadProbeInfo() *PadProbeInfo

func (*PadProbeInfo) Buffer

func (p *PadProbeInfo) Buffer() *Buffer

Returns The GstBuffer from the probe.

func (*PadProbeInfo) Data

func (p *PadProbeInfo) Data() unsafe.Pointer

func (*PadProbeInfo) FlowRet

func (p *PadProbeInfo) FlowRet() FlowReturn

func (*PadProbeInfo) GetBufferList

func (p *PadProbeInfo) GetBufferList() *BufferList

Parameters info a GstPadProbeInfo Returns The GstBufferList from the probe.

func (*PadProbeInfo) GetEvent

func (p *PadProbeInfo) GetEvent() *Event

Parameters info a GstPadProbeInfo Returns The GstEvent from the probe.

func (*PadProbeInfo) GetQuery

func (p *PadProbeInfo) GetQuery() *Query

Parameters info a GstPadProbeInfo Returns The GstQuery from the probe.

func (*PadProbeInfo) Id

func (p *PadProbeInfo) Id() uint64

func (*PadProbeInfo) Offset

func (p *PadProbeInfo) Offset() uint64

func (*PadProbeInfo) Size

func (p *PadProbeInfo) Size() uint

func (*PadProbeInfo) Type

func (p *PadProbeInfo) Type() PadProbeType

type PadProbeReturn

type PadProbeReturn C.GstPadProbeReturn

type PadProbeType

type PadProbeType C.GstPadProbeType

type PadTemplate

type PadTemplate struct {
	GstObj
}

func NewPadTemplate

func NewPadTemplate(name string, direction PadDirection, presence PadPresence, caps *Caps) *PadTemplate

func (*PadTemplate) GetCaps

func (t *PadTemplate) GetCaps() *Caps

func (*PadTemplate) Type

func (t *PadTemplate) Type() glib.Type

type Pipeline

type Pipeline struct {
	Bin
}

func NewPipeline

func NewPipeline(name string) *Pipeline

func ParseLaunch

func ParseLaunch(pipeline_description string) (*Pipeline, error)

func (*Pipeline) AsPipeline

func (p *Pipeline) AsPipeline() *Pipeline

func (*Pipeline) AutoClock

func (p *Pipeline) AutoClock()

func (*Pipeline) GetAutoFlushBus

func (p *Pipeline) GetAutoFlushBus() bool

func (*Pipeline) GetBus

func (p *Pipeline) GetBus() *Bus

func (*Pipeline) GetClock

func (p *Pipeline) GetClock() *Clock

func (*Pipeline) GetDelay

func (p *Pipeline) GetDelay() ClockTime

func (*Pipeline) GetLatency

func (p *Pipeline) GetLatency() ClockTime

func (*Pipeline) GetPipelineClock

func (p *Pipeline) GetPipelineClock() *Clock

func (*Pipeline) SetAutoFlushBus

func (p *Pipeline) SetAutoFlushBus(autoFlush bool)

func (*Pipeline) SetClock

func (p *Pipeline) SetClock(clock *Clock) bool

func (*Pipeline) SetDelay

func (p *Pipeline) SetDelay(delay ClockTime)

func (*Pipeline) SetLatency

func (p *Pipeline) SetLatency(latency ClockTime)

func (*Pipeline) UseClock

func (p *Pipeline) UseClock(clock *Clock)

type QOSType

type QOSType C.GstQOSType

type Query

type Query struct {
	glib.Object
}

type Query C.GstQuery

func NewQueryBuffering

func NewQueryBuffering(format Format) *Query

func NewQuerySeeking

func NewQuerySeeking(format Format) *Query

func (*Query) AsQuery

func (q *Query) AsQuery() *Query

func (*Query) GetNBufferingRanges

func (q *Query) GetNBufferingRanges() int

func (*Query) ParseNthBufferingRange

func (q *Query) ParseNthBufferingRange(r uint) (int64, int64)

func (*Query) ParseSeeking

func (q *Query) ParseSeeking(format *Format) (bool, time.Duration, time.Duration)

func (*Query) Unref

func (q *Query) Unref()

type QueryTypeFlags

type QueryTypeFlags C.GstQueryTypeFlags

type ResourceError

type ResourceError C.GstResourceError

type SeekFlags

type SeekFlags C.GstSeekFlags

type SeekType

type SeekType C.GstSeekType

type Segment

type Segment struct {
	glib.Object
}

func (*Segment) Type

func (s *Segment) Type() glib.Type

type State

type State C.GstState

func (State) GetName

func (s State) GetName() string

Gets a string representing the given state. Returns a string with the name of the state.

func (State) GetNext

func (s State) GetNext(pending State) State

Given a current state cur and a target state pending , calculate the next (intermediate) GstState.

func (State) String

func (s State) String() string

func (State) Transition

func (s State) Transition(next State) StateChange

Given a current state cur and a next state next , calculate the associated GstStateChange transition.

func (State) TransitionCurrent

func (s State) TransitionCurrent() State

Given a state transition trans , extract the current GstState.

func (State) TransitionNext

func (s State) TransitionNext() State

Given a state transition trans , extract the next GstState.

type StateChange

type StateChange C.GstStateChange

type StateChangeReturn

type StateChangeReturn C.GstStateChangeReturn

func (StateChangeReturn) GetName

func (s StateChangeReturn) GetName() string

Gets a string representing the given state change result. Returns a string with the name of the state result.

type StaticCaps

type StaticCaps struct {
	glib.Object
}

type StaticCaps C.GstStaticCaps

func (*StaticCaps) Caps

func (c *StaticCaps) Caps() *Caps

func (*StaticCaps) Get

func (c *StaticCaps) Get() *Caps

func (*StaticCaps) String

func (c *StaticCaps) String() string

type StaticPadTemplate

type StaticPadTemplate struct {
	GstObj
}

func (*StaticPadTemplate) Get

func (t *StaticPadTemplate) Get() *PadTemplate

func (*StaticPadTemplate) GetCaps

func (t *StaticPadTemplate) GetCaps() *Caps

func (*StaticPadTemplate) GetDirection

func (t *StaticPadTemplate) GetDirection() PadDirection

func (*StaticPadTemplate) GetNameTemplate

func (t *StaticPadTemplate) GetNameTemplate() string

func (*StaticPadTemplate) GetPresence

func (t *StaticPadTemplate) GetPresence() PadPresence

func (*StaticPadTemplate) GetStaticCaps

func (t *StaticPadTemplate) GetStaticCaps() *StaticCaps

type StreamError

type StreamError C.GstStreamError

type StreamFlags

type StreamFlags C.GstStreamFlags

type Structure

type Structure struct {
	glib.Object
}

type Structure C.GstStructure

func MakeStructure

func MakeStructure(name string, fields *glib.Params) *Structure

func (*Structure) GetName

func (s *Structure) GetName() string

func (*Structure) Serialize

func (s *Structure) Serialize() glib.Params

func (*Structure) ToString

func (s *Structure) ToString() string

type TagFlag

type TagFlag C.GstTagFlag

type TagList

type TagList struct {
	glib.Object
}

type TagList C.GstTagList

func (*TagList) Serialize

func (t *TagList) Serialize() glib.Params

func (*TagList) TagsNumber

func (t *TagList) TagsNumber() int

func (*TagList) Type

func (t *TagList) Type() glib.Type

type TagMergeMode

type TagMergeMode C.GstTagMergeMode

type TagScope

type TagScope C.GstTagScope

type Toc

type Toc struct {
	glib.Object
}

func (*Toc) AsTOC

func (t *Toc) AsTOC() *Toc

type VideoOverlay

type VideoOverlay struct {
	GstObj
}

func (*VideoOverlay) SetWindowHandle

func (o *VideoOverlay) SetWindowHandle(handle uint32)

Directories

Path Synopsis
This simple test application create live H264 (or WebM - see commented lines) content from test source, decode it and display.
This simple test application create live H264 (or WebM - see commented lines) content from test source, decode it and display.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL