mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-25 11:11:08 +00:00
Revert again, this time without post-commit reindent hooks to put back the indentation :-)
Original commit message from CVS: Revert again, this time without post-commit reindent hooks to put back the indentation :-)
This commit is contained in:
parent
2143a02a13
commit
ecd88e381d
134 changed files with 4206 additions and 3970 deletions
|
@ -174,6 +174,12 @@ pipeline</ulink> and Microsoft's DirectShow for some background.
|
||||||
@use_threads:
|
@use_threads:
|
||||||
|
|
||||||
|
|
||||||
|
<!-- ##### VARIABLE g_log_domain_gstreamer ##### -->
|
||||||
|
<para>
|
||||||
|
The variable that holds the GStreamer log domain
|
||||||
|
</para>
|
||||||
|
|
||||||
|
|
||||||
<!-- ##### MACRO GST_VERSION_MAJOR ##### -->
|
<!-- ##### MACRO GST_VERSION_MAJOR ##### -->
|
||||||
<para>
|
<para>
|
||||||
The major version of GStreamer at compile time
|
The major version of GStreamer at compile time
|
||||||
|
|
|
@ -72,34 +72,6 @@ The GstBin object
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
|
||||||
<!-- ##### SIGNAL GstBin::element-added ##### -->
|
|
||||||
<para>
|
|
||||||
|
|
||||||
</para>
|
|
||||||
|
|
||||||
@gstbin: the object which received the signal.
|
|
||||||
@arg1: the element that was added to the bin
|
|
||||||
|
|
||||||
<!-- ##### SIGNAL GstBin::element-removed ##### -->
|
|
||||||
<para>
|
|
||||||
|
|
||||||
</para>
|
|
||||||
|
|
||||||
@gstbin: the object which received the signal.
|
|
||||||
@arg1: the element that was removed from the bin
|
|
||||||
|
|
||||||
<!-- ##### SIGNAL GstBin::iterate ##### -->
|
|
||||||
<para>
|
|
||||||
This signal is emitted when a bin iterates, either automatically or
|
|
||||||
due to a #gst_bin_iterate() call. The return value is used to
|
|
||||||
determine if the object method handler processed any data.
|
|
||||||
In most normal cases, a user-provided signal handler should return
|
|
||||||
FALSE.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
@gstbin: the object which received the signal.
|
|
||||||
@Returns: TRUE if the state of the bin was advanced.
|
|
||||||
|
|
||||||
<!-- ##### USER_FUNCTION GstBinPrePostIterateFunction ##### -->
|
<!-- ##### USER_FUNCTION GstBinPrePostIterateFunction ##### -->
|
||||||
<para>
|
<para>
|
||||||
The signature of the callback for the post and pre iterate function as set with
|
The signature of the callback for the post and pre iterate function as set with
|
||||||
|
@ -252,3 +224,31 @@ gst_bin_set_pre_iterate_function() and gst_bin_set_post_iterate_function().
|
||||||
@clock:
|
@clock:
|
||||||
|
|
||||||
|
|
||||||
|
<!-- ##### SIGNAL GstBin::element-added ##### -->
|
||||||
|
<para>
|
||||||
|
|
||||||
|
</para>
|
||||||
|
|
||||||
|
@gstbin: the object which received the signal.
|
||||||
|
@arg1: the element that was added to the bin
|
||||||
|
|
||||||
|
<!-- ##### SIGNAL GstBin::element-removed ##### -->
|
||||||
|
<para>
|
||||||
|
|
||||||
|
</para>
|
||||||
|
|
||||||
|
@gstbin: the object which received the signal.
|
||||||
|
@arg1: the element that was removed from the bin
|
||||||
|
|
||||||
|
<!-- ##### SIGNAL GstBin::iterate ##### -->
|
||||||
|
<para>
|
||||||
|
This signal is emitted when a bin iterates, either automatically or
|
||||||
|
due to a #gst_bin_iterate() call. The return value is used to
|
||||||
|
determine if the object method handler processed any data.
|
||||||
|
In most normal cases, a user-provided signal handler should return
|
||||||
|
FALSE.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
@gstbin: the object which received the signal.
|
||||||
|
@Returns: TRUE if the state of the bin was advanced.
|
||||||
|
|
||||||
|
|
|
@ -235,21 +235,6 @@ Get the clock flags
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
|
||||||
<!-- ##### ARG GstClock:event-diff ##### -->
|
|
||||||
<para>
|
|
||||||
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<!-- ##### ARG GstClock:max-diff ##### -->
|
|
||||||
<para>
|
|
||||||
Maximum allowed diff for clock sync requests against the real time.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<!-- ##### ARG GstClock:stats ##### -->
|
|
||||||
<para>
|
|
||||||
Boolean property to activate stat generation on the clock.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<!-- ##### FUNCTION gst_clock_set_speed ##### -->
|
<!-- ##### FUNCTION gst_clock_set_speed ##### -->
|
||||||
<para>
|
<para>
|
||||||
|
|
||||||
|
@ -417,3 +402,18 @@ Boolean property to activate stat generation on the clock.
|
||||||
@id:
|
@id:
|
||||||
|
|
||||||
|
|
||||||
|
<!-- ##### ARG GstClock:event-diff ##### -->
|
||||||
|
<para>
|
||||||
|
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<!-- ##### ARG GstClock:max-diff ##### -->
|
||||||
|
<para>
|
||||||
|
Maximum allowed diff for clock sync requests against the real time.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<!-- ##### ARG GstClock:stats ##### -->
|
||||||
|
<para>
|
||||||
|
Boolean property to activate stat generation on the clock.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,16 @@ You'll get a bitmask of flags with gst_cpu_get_flags().
|
||||||
|
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
<!-- ##### ENUM GstCPUFlags ##### -->
|
||||||
|
<para>
|
||||||
|
Flags that represent cpu capabilities
|
||||||
|
</para>
|
||||||
|
|
||||||
|
@GST_CPU_FLAG_MMX: The cpu is mmx enabled
|
||||||
|
@GST_CPU_FLAG_SSE: The cpu is sse enabled
|
||||||
|
@GST_CPU_FLAG_MMXEXT: The cpu has extended mmx instructions
|
||||||
|
@GST_CPU_FLAG_3DNOW: The cpu is 3DNOW enabled
|
||||||
|
|
||||||
<!-- ##### FUNCTION gst_cpu_get_flags ##### -->
|
<!-- ##### FUNCTION gst_cpu_get_flags ##### -->
|
||||||
<para>
|
<para>
|
||||||
Request a set of bits specifiying the features of the CPU.
|
Request a set of bits specifiying the features of the CPU.
|
||||||
|
|
|
@ -71,59 +71,6 @@ The element object
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
|
||||||
<!-- ##### SIGNAL GstElement::eos ##### -->
|
|
||||||
<para>
|
|
||||||
Signal emited when the element goes to PAUSED due to an end-of-stream
|
|
||||||
condition.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
@gstelement: the object which received the signal.
|
|
||||||
|
|
||||||
<!-- ##### SIGNAL GstElement::error ##### -->
|
|
||||||
<para>
|
|
||||||
This signal is emitted when an element has encountered an error that caused
|
|
||||||
it to fail performing its function.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
@gstelement: the object which received the signal.
|
|
||||||
@arg1: the original #GstElement that generated the error.
|
|
||||||
@arg2: a #GError containing the translated error message.
|
|
||||||
@arg3: a debug string providing additional untranslated debug information, or NULL.
|
|
||||||
|
|
||||||
<!-- ##### SIGNAL GstElement::found-tag ##### -->
|
|
||||||
<para>
|
|
||||||
|
|
||||||
</para>
|
|
||||||
|
|
||||||
@gstelement: the object which received the signal.
|
|
||||||
@arg1:
|
|
||||||
@arg2:
|
|
||||||
|
|
||||||
<!-- ##### SIGNAL GstElement::new-pad ##### -->
|
|
||||||
<para>
|
|
||||||
Is triggered whenever a new pad is added to an element.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
@gstelement: the object which received the signal.
|
|
||||||
@arg1: the new pad that was added
|
|
||||||
|
|
||||||
<!-- ##### SIGNAL GstElement::pad-removed ##### -->
|
|
||||||
<para>
|
|
||||||
Is triggered whenever a pad has been removed from the element.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
@gstelement: the object which received the signal.
|
|
||||||
@arg1: The pad that was removed.
|
|
||||||
|
|
||||||
<!-- ##### SIGNAL GstElement::state-change ##### -->
|
|
||||||
<para>
|
|
||||||
Is triggered whenever the state of an element changes.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
@gstelement: the object which received the signal.
|
|
||||||
@arg1: the new state of the object
|
|
||||||
@arg2:
|
|
||||||
|
|
||||||
<!-- ##### MACRO gst_element_get_name ##### -->
|
<!-- ##### MACRO gst_element_get_name ##### -->
|
||||||
<para>
|
<para>
|
||||||
Gets the name of the element.
|
Gets the name of the element.
|
||||||
|
@ -1019,3 +966,56 @@ Helper macro to create query type functions
|
||||||
@...: list of query types.
|
@...: list of query types.
|
||||||
|
|
||||||
|
|
||||||
|
<!-- ##### SIGNAL GstElement::eos ##### -->
|
||||||
|
<para>
|
||||||
|
Signal emited when the element goes to PAUSED due to an end-of-stream
|
||||||
|
condition.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
@gstelement: the object which received the signal.
|
||||||
|
|
||||||
|
<!-- ##### SIGNAL GstElement::error ##### -->
|
||||||
|
<para>
|
||||||
|
This signal is emitted when an element has encountered an error that caused
|
||||||
|
it to fail performing its function.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
@gstelement: the object which received the signal.
|
||||||
|
@arg1: the original #GstElement that generated the error.
|
||||||
|
@arg2: a #GError containing the translated error message.
|
||||||
|
@arg3: a debug string providing additional untranslated debug information, or NULL.
|
||||||
|
|
||||||
|
<!-- ##### SIGNAL GstElement::found-tag ##### -->
|
||||||
|
<para>
|
||||||
|
|
||||||
|
</para>
|
||||||
|
|
||||||
|
@gstelement: the object which received the signal.
|
||||||
|
@arg1:
|
||||||
|
@arg2:
|
||||||
|
|
||||||
|
<!-- ##### SIGNAL GstElement::new-pad ##### -->
|
||||||
|
<para>
|
||||||
|
Is triggered whenever a new pad is added to an element.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
@gstelement: the object which received the signal.
|
||||||
|
@arg1: the new pad that was added
|
||||||
|
|
||||||
|
<!-- ##### SIGNAL GstElement::pad-removed ##### -->
|
||||||
|
<para>
|
||||||
|
Is triggered whenever a pad has been removed from the element.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
@gstelement: the object which received the signal.
|
||||||
|
@arg1: The pad that was removed.
|
||||||
|
|
||||||
|
<!-- ##### SIGNAL GstElement::state-change ##### -->
|
||||||
|
<para>
|
||||||
|
Is triggered whenever the state of an element changes.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
@gstelement: the object which received the signal.
|
||||||
|
@arg1: the new state of the object
|
||||||
|
@arg2:
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,18 @@ formats can be used to perform seeking or conversions/query operations.
|
||||||
#GstPad, #GstElement
|
#GstPad, #GstElement
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
<!-- ##### ENUM GstFormat ##### -->
|
||||||
|
<para>
|
||||||
|
Standard predefined formats
|
||||||
|
</para>
|
||||||
|
|
||||||
|
@GST_FORMAT_UNDEFINED: undefined format
|
||||||
|
@GST_FORMAT_DEFAULT: the default format of the pad/element
|
||||||
|
@GST_FORMAT_BYTES: bytes
|
||||||
|
@GST_FORMAT_TIME: time in nanoseconds
|
||||||
|
@GST_FORMAT_BUFFERS: buffers
|
||||||
|
@GST_FORMAT_PERCENT: percentage of stream
|
||||||
|
|
||||||
<!-- ##### MACRO GST_FORMAT_PERCENT_MAX ##### -->
|
<!-- ##### MACRO GST_FORMAT_PERCENT_MAX ##### -->
|
||||||
<para>
|
<para>
|
||||||
The PERCENT format is between 0 and this value
|
The PERCENT format is between 0 and this value
|
||||||
|
|
|
@ -209,19 +209,6 @@ The GstIndex object
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
|
||||||
<!-- ##### SIGNAL GstIndex::entry-added ##### -->
|
|
||||||
<para>
|
|
||||||
Is emited when a new entry is added to the index.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
@gstindex: the object which received the signal.
|
|
||||||
@arg1: The entry added to the index.
|
|
||||||
|
|
||||||
<!-- ##### ARG GstIndex:resolver ##### -->
|
|
||||||
<para>
|
|
||||||
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<!-- ##### FUNCTION gst_index_new ##### -->
|
<!-- ##### FUNCTION gst_index_new ##### -->
|
||||||
<para>
|
<para>
|
||||||
|
|
||||||
|
@ -414,3 +401,16 @@ Is emited when a new entry is added to the index.
|
||||||
@id:
|
@id:
|
||||||
|
|
||||||
|
|
||||||
|
<!-- ##### SIGNAL GstIndex::entry-added ##### -->
|
||||||
|
<para>
|
||||||
|
Is emited when a new entry is added to the index.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
@gstindex: the object which received the signal.
|
||||||
|
@arg1: The entry added to the index.
|
||||||
|
|
||||||
|
<!-- ##### ARG GstIndex:resolver ##### -->
|
||||||
|
<para>
|
||||||
|
|
||||||
|
</para>
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,12 @@ The GstMemChunk is used to allocate critical resources for #GstBuffer and
|
||||||
#GstAtomic, #GstBuffer, #GstEvent, #GstData
|
#GstAtomic, #GstBuffer, #GstEvent, #GstData
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
<!-- ##### STRUCT GstMemChunk ##### -->
|
||||||
|
<para>
|
||||||
|
The memchunk structure
|
||||||
|
</para>
|
||||||
|
|
||||||
|
|
||||||
<!-- ##### FUNCTION gst_mem_chunk_new ##### -->
|
<!-- ##### FUNCTION gst_mem_chunk_new ##### -->
|
||||||
<para>
|
<para>
|
||||||
|
|
||||||
|
|
|
@ -40,47 +40,6 @@ The GstObject
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
|
||||||
<!-- ##### SIGNAL GstObject::deep-notify ##### -->
|
|
||||||
<para>
|
|
||||||
The deep notify signal is used to be notified of property changes.
|
|
||||||
it is typically attached to the toplevel bin to receive notifications
|
|
||||||
from all the elements contained in that bin.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
@gstobject: the object which received the signal.
|
|
||||||
@arg1: the object that originated the signal
|
|
||||||
@arg2: the property that changed
|
|
||||||
|
|
||||||
<!-- ##### SIGNAL GstObject::object-saved ##### -->
|
|
||||||
<para>
|
|
||||||
Is trigered whenever a new object is saved to XML. You can connect to
|
|
||||||
this signal to insert custom XML tags into the core XML.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
@gstobject: the object which received the signal.
|
|
||||||
@arg1: the xmlNodePtr of the parent node
|
|
||||||
|
|
||||||
<!-- ##### SIGNAL GstObject::parent-set ##### -->
|
|
||||||
<para>
|
|
||||||
Is emitted when the parent of an object is set.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
@gstobject: the object which received the signal.
|
|
||||||
@arg1: the new parent
|
|
||||||
|
|
||||||
<!-- ##### SIGNAL GstObject::parent-unset ##### -->
|
|
||||||
<para>
|
|
||||||
Is emitted when the parent of an object is unset.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
@gstobject: the object which received the signal.
|
|
||||||
@arg1: the old parent
|
|
||||||
|
|
||||||
<!-- ##### ARG GstObject:name ##### -->
|
|
||||||
<para>
|
|
||||||
The name of the object
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<!-- ##### MACRO GST_FLAGS ##### -->
|
<!-- ##### MACRO GST_FLAGS ##### -->
|
||||||
<para>
|
<para>
|
||||||
This macro returns the entire set of flags for the object.
|
This macro returns the entire set of flags for the object.
|
||||||
|
@ -331,3 +290,44 @@ Check if the object has been destroyed.
|
||||||
@Returns:
|
@Returns:
|
||||||
|
|
||||||
|
|
||||||
|
<!-- ##### SIGNAL GstObject::deep-notify ##### -->
|
||||||
|
<para>
|
||||||
|
The deep notify signal is used to be notified of property changes.
|
||||||
|
it is typically attached to the toplevel bin to receive notifications
|
||||||
|
from all the elements contained in that bin.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
@gstobject: the object which received the signal.
|
||||||
|
@arg1: the object that originated the signal
|
||||||
|
@arg2: the property that changed
|
||||||
|
|
||||||
|
<!-- ##### SIGNAL GstObject::object-saved ##### -->
|
||||||
|
<para>
|
||||||
|
Is trigered whenever a new object is saved to XML. You can connect to
|
||||||
|
this signal to insert custom XML tags into the core XML.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
@gstobject: the object which received the signal.
|
||||||
|
@arg1: the xmlNodePtr of the parent node
|
||||||
|
|
||||||
|
<!-- ##### SIGNAL GstObject::parent-set ##### -->
|
||||||
|
<para>
|
||||||
|
Is emitted when the parent of an object is set.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
@gstobject: the object which received the signal.
|
||||||
|
@arg1: the new parent
|
||||||
|
|
||||||
|
<!-- ##### SIGNAL GstObject::parent-unset ##### -->
|
||||||
|
<para>
|
||||||
|
Is emitted when the parent of an object is unset.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
@gstobject: the object which received the signal.
|
||||||
|
@arg1: the old parent
|
||||||
|
|
||||||
|
<!-- ##### ARG GstObject:name ##### -->
|
||||||
|
<para>
|
||||||
|
The name of the object
|
||||||
|
</para>
|
||||||
|
|
||||||
|
|
|
@ -1193,11 +1193,6 @@ The Ghostpad object
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
|
||||||
<!-- ##### ARG GstGhostPad:real-pad ##### -->
|
|
||||||
<para>
|
|
||||||
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<!-- ##### FUNCTION gst_ghost_pad_new ##### -->
|
<!-- ##### FUNCTION gst_ghost_pad_new ##### -->
|
||||||
<para>
|
<para>
|
||||||
|
|
||||||
|
|
|
@ -86,15 +86,6 @@ The padtemplate object.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
|
||||||
<!-- ##### SIGNAL GstPadTemplate::pad-created ##### -->
|
|
||||||
<para>
|
|
||||||
This signal is fired when an element creates a pad from this
|
|
||||||
template.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
@gstpadtemplate: the object which received the signal.
|
|
||||||
@arg1: The pad that was created.
|
|
||||||
|
|
||||||
<!-- ##### ENUM GstPadTemplateFlags ##### -->
|
<!-- ##### ENUM GstPadTemplateFlags ##### -->
|
||||||
<para>
|
<para>
|
||||||
Flags for the padtemplate
|
Flags for the padtemplate
|
||||||
|
@ -176,3 +167,12 @@ Check if the properties of the padtemplate are fixed
|
||||||
@Returns:
|
@Returns:
|
||||||
|
|
||||||
|
|
||||||
|
<!-- ##### SIGNAL GstPadTemplate::pad-created ##### -->
|
||||||
|
<para>
|
||||||
|
This signal is fired when an element creates a pad from this
|
||||||
|
template.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
@gstpadtemplate: the object which received the signal.
|
||||||
|
@arg1: The pad that was created.
|
||||||
|
|
||||||
|
|
|
@ -41,6 +41,14 @@ The error quark
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- ##### FUNCTION gst_plugin_error_quark ##### -->
|
||||||
|
<para>
|
||||||
|
Get the error quark
|
||||||
|
</para>
|
||||||
|
|
||||||
|
@Returns: The error quark used in GError messages
|
||||||
|
|
||||||
|
|
||||||
<!-- ##### ENUM GstPluginError ##### -->
|
<!-- ##### ENUM GstPluginError ##### -->
|
||||||
<para>
|
<para>
|
||||||
The plugin loading errors
|
The plugin loading errors
|
||||||
|
|
|
@ -15,6 +15,20 @@ Query types can be used to perform queries on pads and elements.
|
||||||
#GstPad, #GstElement
|
#GstPad, #GstElement
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
<!-- ##### ENUM GstQueryType ##### -->
|
||||||
|
<para>
|
||||||
|
Standard predefined Query types
|
||||||
|
</para>
|
||||||
|
|
||||||
|
@GST_QUERY_NONE: invalid query type
|
||||||
|
@GST_QUERY_TOTAL: total length of stream
|
||||||
|
@GST_QUERY_POSITION: current position in stream
|
||||||
|
@GST_QUERY_LATENCY: latency of stream
|
||||||
|
@GST_QUERY_JITTER: current jitter of stream
|
||||||
|
@GST_QUERY_START: start of configured segment
|
||||||
|
@GST_QUERY_SEGMENT_END: end of configured segment
|
||||||
|
@GST_QUERY_RATE: current rate of the stream
|
||||||
|
|
||||||
<!-- ##### MACRO GST_QUERY_TYPE_RATE_DEN ##### -->
|
<!-- ##### MACRO GST_QUERY_TYPE_RATE_DEN ##### -->
|
||||||
<para>
|
<para>
|
||||||
Rates are relative to this value
|
Rates are relative to this value
|
||||||
|
@ -75,10 +89,10 @@ Convenience function to define a function that returns an array of query types.
|
||||||
|
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@Param1:
|
@type:
|
||||||
@Returns:
|
@Returns:
|
||||||
<!-- # Unused Parameters # -->
|
<!-- # Unused Parameters # -->
|
||||||
@type:
|
@Param1:
|
||||||
|
|
||||||
|
|
||||||
<!-- ##### FUNCTION gst_query_type_get_definitions ##### -->
|
<!-- ##### FUNCTION gst_query_type_get_definitions ##### -->
|
||||||
|
|
|
@ -4556,16 +4556,6 @@ can perform necessary cleanup.
|
||||||
@pool: The pool that is being destroyed
|
@pool: The pool that is being destroyed
|
||||||
@user_data: user data as set on th bufferpool
|
@user_data: user data as set on th bufferpool
|
||||||
|
|
||||||
<!-- ##### ENUM GstCPUFlags ##### -->
|
|
||||||
<para>
|
|
||||||
Flags that represent cpu capabilities
|
|
||||||
</para>
|
|
||||||
|
|
||||||
@GST_CPU_FLAG_MMX: The cpu is mmx enabled
|
|
||||||
@GST_CPU_FLAG_SSE: The cpu is sse enabled
|
|
||||||
@GST_CPU_FLAG_MMXEXT: The cpu has extended mmx instructions
|
|
||||||
@GST_CPU_FLAG_3DNOW: The cpu is 3DNOW enabled
|
|
||||||
|
|
||||||
<!-- ##### STRUCT GstCacheAssociation ##### -->
|
<!-- ##### STRUCT GstCacheAssociation ##### -->
|
||||||
<para>
|
<para>
|
||||||
|
|
||||||
|
@ -5168,17 +5158,11 @@ Indicates the mmapped area should be touched to bring it into memory.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
|
||||||
<!-- ##### ENUM GstFormat ##### -->
|
<!-- ##### ARG GstGhostPad:real-pad ##### -->
|
||||||
<para>
|
<para>
|
||||||
Standard predefined formats
|
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@GST_FORMAT_UNDEFINED: undefined format
|
|
||||||
@GST_FORMAT_DEFAULT: the default format of the pad/element
|
|
||||||
@GST_FORMAT_BYTES: bytes
|
|
||||||
@GST_FORMAT_TIME: time in nanoseconds
|
|
||||||
@GST_FORMAT_BUFFERS: buffers
|
|
||||||
@GST_FORMAT_PERCENT: percentage of stream
|
|
||||||
|
|
||||||
<!-- ##### STRUCT GstHttpSrc ##### -->
|
<!-- ##### STRUCT GstHttpSrc ##### -->
|
||||||
<para>
|
<para>
|
||||||
|
@ -5297,12 +5281,6 @@ Specify the location of the file. The location must be a fully qualified URL.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
|
||||||
<!-- ##### STRUCT GstMemChunk ##### -->
|
|
||||||
<para>
|
|
||||||
The memchunk structure
|
|
||||||
</para>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ##### STRUCT GstMemChunkElement ##### -->
|
<!-- ##### STRUCT GstMemChunkElement ##### -->
|
||||||
<para>
|
<para>
|
||||||
An entry in the memchunk area
|
An entry in the memchunk area
|
||||||
|
@ -5533,20 +5511,6 @@ Sets the command to be executed.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
|
||||||
<!-- ##### ENUM GstQueryType ##### -->
|
|
||||||
<para>
|
|
||||||
Standard predefined Query types
|
|
||||||
</para>
|
|
||||||
|
|
||||||
@GST_QUERY_NONE: invalid query type
|
|
||||||
@GST_QUERY_TOTAL: total length of stream
|
|
||||||
@GST_QUERY_POSITION: current position in stream
|
|
||||||
@GST_QUERY_LATENCY: latency of stream
|
|
||||||
@GST_QUERY_JITTER: current jitter of stream
|
|
||||||
@GST_QUERY_START: start of configured segment
|
|
||||||
@GST_QUERY_SEGMENT_END: end of configured segment
|
|
||||||
@GST_QUERY_RATE: current rate of the stream
|
|
||||||
|
|
||||||
<!-- ##### STRUCT GstQueue ##### -->
|
<!-- ##### STRUCT GstQueue ##### -->
|
||||||
<para>
|
<para>
|
||||||
|
|
||||||
|
@ -5613,17 +5577,6 @@ the region types for #gst_pad_pullregion.
|
||||||
@global_reg:
|
@global_reg:
|
||||||
@local_reg:
|
@local_reg:
|
||||||
|
|
||||||
<!-- ##### ENUM GstRegistryReturn ##### -->
|
|
||||||
<para>
|
|
||||||
The return value of registry operations
|
|
||||||
</para>
|
|
||||||
|
|
||||||
@GST_REGISTRY_OK: The registry reported no error.
|
|
||||||
@GST_REGISTRY_LOAD_ERROR: There was a load error
|
|
||||||
@GST_REGISTRY_SAVE_ERROR: There was an error saving the registry
|
|
||||||
@GST_REGISTRY_PLUGIN_LOAD_ERROR: There was an error loading a plugin
|
|
||||||
@GST_REGISTRY_PLUGIN_SIGNATURE_ERROR: There was an error saving a plugin
|
|
||||||
|
|
||||||
<!-- ##### STRUCT GstRegistryWrite ##### -->
|
<!-- ##### STRUCT GstRegistryWrite ##### -->
|
||||||
<para>
|
<para>
|
||||||
|
|
||||||
|
@ -5851,20 +5804,6 @@ Flags for the GstSrc element
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
|
||||||
<!-- ##### ENUM GstTagMergeMode ##### -->
|
|
||||||
<para>
|
|
||||||
|
|
||||||
</para>
|
|
||||||
|
|
||||||
@GST_TAG_MERGE_UNDEFINED:
|
|
||||||
@GST_TAG_MERGE_REPLACE_ALL:
|
|
||||||
@GST_TAG_MERGE_REPLACE:
|
|
||||||
@GST_TAG_MERGE_APPEND:
|
|
||||||
@GST_TAG_MERGE_PREPEND:
|
|
||||||
@GST_TAG_MERGE_KEEP:
|
|
||||||
@GST_TAG_MERGE_KEEP_ALL:
|
|
||||||
@GST_TAG_MERGE_COUNT:
|
|
||||||
|
|
||||||
<!-- ##### STRUCT GstTee ##### -->
|
<!-- ##### STRUCT GstTee ##### -->
|
||||||
<para>
|
<para>
|
||||||
|
|
||||||
|
@ -5988,15 +5927,6 @@ Query the element for the current mime type
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
|
||||||
<!-- ##### SIGNAL GstXML::object-loaded ##### -->
|
|
||||||
<para>
|
|
||||||
|
|
||||||
</para>
|
|
||||||
|
|
||||||
@gstxml: the object which received the signal.
|
|
||||||
@arg1:
|
|
||||||
@arg2:
|
|
||||||
|
|
||||||
<!-- ##### USER_FUNCTION GstXMLRegistryAddPathList ##### -->
|
<!-- ##### USER_FUNCTION GstXMLRegistryAddPathList ##### -->
|
||||||
<para>
|
<para>
|
||||||
|
|
||||||
|
@ -6752,12 +6682,6 @@ must be defined to activate the tracing functionality.
|
||||||
@llink:
|
@llink:
|
||||||
@Returns:
|
@Returns:
|
||||||
|
|
||||||
<!-- ##### VARIABLE g_log_domain_gstreamer ##### -->
|
|
||||||
<para>
|
|
||||||
The variable that holds the GStreamer log domain
|
|
||||||
</para>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ##### MACRO g_object_class_find_property ##### -->
|
<!-- ##### MACRO g_object_class_find_property ##### -->
|
||||||
<para>
|
<para>
|
||||||
|
|
||||||
|
@ -9643,13 +9567,6 @@ Destroys the pipeline.
|
||||||
|
|
||||||
@Returns:
|
@Returns:
|
||||||
|
|
||||||
<!-- ##### FUNCTION gst_plugin_error_quark ##### -->
|
|
||||||
<para>
|
|
||||||
Get the error quark
|
|
||||||
</para>
|
|
||||||
|
|
||||||
@Returns: The error quark used in GError messages
|
|
||||||
|
|
||||||
<!-- ##### FUNCTION gst_plugin_feature_get_type ##### -->
|
<!-- ##### FUNCTION gst_plugin_feature_get_type ##### -->
|
||||||
<para>
|
<para>
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,17 @@ The registry holds the available plugins in the system.
|
||||||
#GstPlugin, #GstPluginFeature
|
#GstPlugin, #GstPluginFeature
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
<!-- ##### ENUM GstRegistryReturn ##### -->
|
||||||
|
<para>
|
||||||
|
The return value of registry operations
|
||||||
|
</para>
|
||||||
|
|
||||||
|
@GST_REGISTRY_OK: The registry reported no error.
|
||||||
|
@GST_REGISTRY_LOAD_ERROR: There was a load error
|
||||||
|
@GST_REGISTRY_SAVE_ERROR: There was an error saving the registry
|
||||||
|
@GST_REGISTRY_PLUGIN_LOAD_ERROR: There was an error loading a plugin
|
||||||
|
@GST_REGISTRY_PLUGIN_SIGNATURE_ERROR: There was an error saving a plugin
|
||||||
|
|
||||||
<!-- ##### ENUM GstRegistryFlags ##### -->
|
<!-- ##### ENUM GstRegistryFlags ##### -->
|
||||||
<para>
|
<para>
|
||||||
Flags for the registry
|
Flags for the registry
|
||||||
|
|
|
@ -14,6 +14,20 @@ GstTag
|
||||||
|
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
<!-- ##### ENUM GstTagMergeMode ##### -->
|
||||||
|
<para>
|
||||||
|
|
||||||
|
</para>
|
||||||
|
|
||||||
|
@GST_TAG_MERGE_UNDEFINED:
|
||||||
|
@GST_TAG_MERGE_REPLACE_ALL:
|
||||||
|
@GST_TAG_MERGE_REPLACE:
|
||||||
|
@GST_TAG_MERGE_APPEND:
|
||||||
|
@GST_TAG_MERGE_PREPEND:
|
||||||
|
@GST_TAG_MERGE_KEEP:
|
||||||
|
@GST_TAG_MERGE_KEEP_ALL:
|
||||||
|
@GST_TAG_MERGE_COUNT:
|
||||||
|
|
||||||
<!-- ##### ENUM GstTagFlag ##### -->
|
<!-- ##### ENUM GstTagFlag ##### -->
|
||||||
<para>
|
<para>
|
||||||
|
|
||||||
|
|
|
@ -34,6 +34,15 @@ The GstThread object
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- ##### FUNCTION gst_thread_new ##### -->
|
||||||
|
<para>
|
||||||
|
|
||||||
|
</para>
|
||||||
|
|
||||||
|
@name:
|
||||||
|
@Returns:
|
||||||
|
|
||||||
|
|
||||||
<!-- ##### SIGNAL GstThread::shutdown ##### -->
|
<!-- ##### SIGNAL GstThread::shutdown ##### -->
|
||||||
<para>
|
<para>
|
||||||
|
|
||||||
|
@ -46,12 +55,3 @@ The GstThread object
|
||||||
The thread priority
|
The thread priority
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<!-- ##### FUNCTION gst_thread_new ##### -->
|
|
||||||
<para>
|
|
||||||
|
|
||||||
</para>
|
|
||||||
|
|
||||||
@name:
|
|
||||||
@Returns:
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -105,3 +105,21 @@ All GstElements can be serialized to an XML presentation and subsequently loaded
|
||||||
@Returns:
|
@Returns:
|
||||||
|
|
||||||
|
|
||||||
|
<!-- ##### SIGNAL GstXML::object-loaded ##### -->
|
||||||
|
<para>
|
||||||
|
|
||||||
|
</para>
|
||||||
|
|
||||||
|
@gstxml: the object which received the signal.
|
||||||
|
@arg1:
|
||||||
|
@arg2:
|
||||||
|
|
||||||
|
<!-- ##### SIGNAL GstXML::object-loaded ##### -->
|
||||||
|
<para>
|
||||||
|
|
||||||
|
</para>
|
||||||
|
|
||||||
|
@:
|
||||||
|
@:
|
||||||
|
@:
|
||||||
|
|
||||||
|
|
|
@ -3,13 +3,12 @@
|
||||||
* thomas@apestaart.org
|
* thomas@apestaart.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
GstElement *pipe;
|
GstElement *pipe;
|
||||||
GstElement *disksink;
|
GstElement *disksink;
|
||||||
GstElement *audiosink;
|
GstElement *audiosink;
|
||||||
|
|
||||||
char *location;
|
char *location;
|
||||||
int channel_id;
|
int channel_id;
|
||||||
}
|
} output_channel_t;
|
||||||
output_channel_t;
|
|
||||||
|
|
|
@ -3,11 +3,10 @@
|
||||||
* thomas@apestaart.org
|
* thomas@apestaart.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
GstElement *pipe, *filesrc, *volenv;
|
GstElement *pipe, *filesrc, *volenv;
|
||||||
|
|
||||||
char *location;
|
char *location;
|
||||||
int channel_id;
|
int channel_id;
|
||||||
}
|
} input_channel_t;
|
||||||
input_channel_t;
|
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
/* This is the definition of the element's object structure. */
|
/* This is the definition of the element's object structure. */
|
||||||
typedef struct _GstExample GstExample;
|
typedef struct _GstExample GstExample;
|
||||||
|
|
||||||
|
@ -32,12 +33,11 @@ typedef struct _GstExample GstExample;
|
||||||
* the beginning of the object. This allows the element to be cast to
|
* the beginning of the object. This allows the element to be cast to
|
||||||
* an Element or even an Object.
|
* an Element or even an Object.
|
||||||
*/
|
*/
|
||||||
struct _GstExample
|
struct _GstExample {
|
||||||
{
|
|
||||||
GstElement element;
|
GstElement element;
|
||||||
|
|
||||||
/* We need to keep track of our pads, so we do so here. */
|
/* We need to keep track of our pads, so we do so here. */
|
||||||
GstPad *sinkpad, *srcpad;
|
GstPad *sinkpad,*srcpad;
|
||||||
|
|
||||||
/* We'll use this to decide whether to do anything to the data we get. */
|
/* We'll use this to decide whether to do anything to the data we get. */
|
||||||
gboolean active;
|
gboolean active;
|
||||||
|
@ -49,12 +49,11 @@ struct _GstExample
|
||||||
* structure. */
|
* structure. */
|
||||||
typedef struct _GstExampleClass GstExampleClass;
|
typedef struct _GstExampleClass GstExampleClass;
|
||||||
|
|
||||||
struct _GstExampleClass
|
struct _GstExampleClass {
|
||||||
{
|
|
||||||
GstElementClass parent_class;
|
GstElementClass parent_class;
|
||||||
|
|
||||||
/* signals */
|
/* signals */
|
||||||
void (*asdf) (GstElement * element, GstExample * example);
|
void (*asdf) (GstElement *element, GstExample *example);
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Five standard preprocessing macros are used in the Gtk+ object system.
|
/* Five standard preprocessing macros are used in the Gtk+ object system.
|
||||||
|
@ -81,7 +80,8 @@ struct _GstExampleClass
|
||||||
/* This is the only prototype needed, because it is used in the above
|
/* This is the only prototype needed, because it is used in the above
|
||||||
* GST_TYPE_EXAMPLE macro.
|
* GST_TYPE_EXAMPLE macro.
|
||||||
*/
|
*/
|
||||||
GType gst_example_get_type (void);
|
GType gst_example_get_type(void);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GST_EXAMPLE_H__ */
|
#endif /* __GST_EXAMPLE_H__ */
|
||||||
|
|
|
@ -30,27 +30,21 @@
|
||||||
|
|
||||||
/* struct for a node, in the search tree */
|
/* struct for a node, in the search tree */
|
||||||
typedef struct _GstAutoplugNode GstAutoplugNode;
|
typedef struct _GstAutoplugNode GstAutoplugNode;
|
||||||
|
|
||||||
struct _GstAutoplugNode
|
struct _GstAutoplugNode {
|
||||||
{
|
GstAutoplugNode *prev; /* previous node */
|
||||||
GstAutoplugNode *prev; /* previous node */
|
GstElementFactory *fac; /* factory of element to connect to */
|
||||||
GstElementFactory *fac; /* factory of element to connect to */
|
GstPadTemplate *templ; /* template which can connect */
|
||||||
GstPadTemplate *templ; /* template which can connect */
|
guint cost; /* total cost to get here */
|
||||||
guint cost; /* total cost to get here */
|
GstPadTemplate *endpoint; /* pad template that can connect to sink caps */
|
||||||
GstPadTemplate *endpoint; /* pad template that can connect to sink caps */
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/* helper functions */
|
/* helper functions */
|
||||||
gboolean gst_autoplug_caps_intersect (const GstCaps * src,
|
gboolean gst_autoplug_caps_intersect (const GstCaps *src, const GstCaps *sink);
|
||||||
const GstCaps * sink);
|
GstPadTemplate * gst_autoplug_can_connect_src (GstElementFactory *fac, const GstCaps *src);
|
||||||
GstPadTemplate *gst_autoplug_can_connect_src (GstElementFactory * fac,
|
GstPadTemplate * gst_autoplug_can_connect_sink (GstElementFactory *fac, const GstCaps *sink);
|
||||||
const GstCaps * src);
|
GstPadTemplate * gst_autoplug_can_match (GstElementFactory *src, GstElementFactory *dest);
|
||||||
GstPadTemplate *gst_autoplug_can_connect_sink (GstElementFactory * fac,
|
gboolean gst_autoplug_factory_has_direction (GstElementFactory *fac, GstPadDirection dir);
|
||||||
const GstCaps * sink);
|
|
||||||
GstPadTemplate *gst_autoplug_can_match (GstElementFactory * src,
|
|
||||||
GstElementFactory * dest);
|
|
||||||
gboolean gst_autoplug_factory_has_direction (GstElementFactory * fac,
|
|
||||||
GstPadDirection dir);
|
|
||||||
#define gst_autoplug_factory_has_sink(fac) gst_autoplug_factory_has_direction((fac), GST_PAD_SINK)
|
#define gst_autoplug_factory_has_sink(fac) gst_autoplug_factory_has_direction((fac), GST_PAD_SINK)
|
||||||
#define gst_autoplug_factory_has_src(fac) gst_autoplug_factory_has_direction((fac), GST_PAD_SRC)
|
#define gst_autoplug_factory_has_src(fac) gst_autoplug_factory_has_direction((fac), GST_PAD_SRC)
|
||||||
|
|
||||||
|
@ -58,15 +52,13 @@ gboolean gst_autoplug_factory_has_direction (GstElementFactory * fac,
|
||||||
#define gst_autoplug_get_cost(fac) 1
|
#define gst_autoplug_get_cost(fac) 1
|
||||||
|
|
||||||
/* factory selections */
|
/* factory selections */
|
||||||
GList *gst_autoplug_factories_sinks (GList * factories);
|
GList * gst_autoplug_factories_sinks (GList *factories);
|
||||||
GList *gst_autoplug_factories_srcs (GList * factories);
|
GList * gst_autoplug_factories_srcs (GList *factories);
|
||||||
GList *gst_autoplug_factories_filters (GList * factories);
|
GList * gst_autoplug_factories_filters (GList *factories);
|
||||||
GList *gst_autoplug_factories_filters_with_sink_caps (GList * factories);
|
GList * gst_autoplug_factories_filters_with_sink_caps(GList *factories);
|
||||||
GList *gst_autoplug_factories_at_most_templates (GList * factories,
|
GList * gst_autoplug_factories_at_most_templates(GList *factories, GstPadDirection dir, guint maxtemplates);
|
||||||
GstPadDirection dir, guint maxtemplates);
|
|
||||||
|
|
||||||
/* shortest path algorithm */
|
/* shortest path algorithm */
|
||||||
GList *gst_autoplug_sp (const GstCaps * src_caps, const GstCaps * sink_caps,
|
GList * gst_autoplug_sp (const GstCaps *src_caps, const GstCaps *sink_caps, GList *factories);
|
||||||
GList * factories);
|
|
||||||
|
|
||||||
#endif /* __GST_SEARCHFUNCS_H__ */
|
#endif /* __GST_SEARCHFUNCS_H__ */
|
||||||
|
|
|
@ -19,16 +19,17 @@
|
||||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
* Boston, MA 02111-1307, USA.
|
* Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __GST_SPIDER_H__
|
#ifndef __GST_SPIDER_H__
|
||||||
#define __GST_SPIDER_H__
|
#define __GST_SPIDER_H__
|
||||||
|
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
#include "gstspideridentity.h"
|
#include "gstspideridentity.h"
|
||||||
|
|
||||||
G_BEGIN_DECLS extern GstElementDetails gst_spider_details;
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
GST_DEBUG_CATEGORY_EXTERN (gst_spider_debug);
|
extern GstElementDetails gst_spider_details;
|
||||||
|
GST_DEBUG_CATEGORY_EXTERN(gst_spider_debug);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Theory of operation:
|
* Theory of operation:
|
||||||
|
@ -45,52 +46,49 @@ GST_DEBUG_CATEGORY_EXTERN (gst_spider_debug);
|
||||||
* are refcounted once for every path.
|
* are refcounted once for every path.
|
||||||
* A GstSpider keeps a list of all GstSpiderConnections in it.
|
* A GstSpider keeps a list of all GstSpiderConnections in it.
|
||||||
*/
|
*/
|
||||||
typedef struct
|
typedef struct {
|
||||||
{
|
|
||||||
GstSpiderIdentity *src;
|
GstSpiderIdentity *src;
|
||||||
/* dunno if the path should stay here or if its too much load.
|
/* dunno if the path should stay here or if its too much load.
|
||||||
* it's at least easier then always searching it */
|
* it's at least easier then always searching it */
|
||||||
GList *path;
|
GList *path;
|
||||||
GstElement *current;
|
GstElement *current;
|
||||||
gulong signal_id;
|
gulong signal_id;
|
||||||
}
|
} GstSpiderConnection;
|
||||||
GstSpiderConnection;
|
|
||||||
|
|
||||||
#define GST_TYPE_SPIDER \
|
#define GST_TYPE_SPIDER \
|
||||||
(gst_spider_get_type())
|
(gst_spider_get_type())
|
||||||
#define GST_SPIDER(obj) \
|
#define GST_SPIDER(obj) \
|
||||||
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_SPIDER,GstSpider))
|
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_SPIDER,GstSpider))
|
||||||
#define GST_SPIDER_CLASS(klass) \
|
#define GST_SPIDER_CLASS(klass) \
|
||||||
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_SPIDER,GstSpiderClass))
|
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_SPIDER,GstSpiderClass))
|
||||||
#define GST_IS_SPIDER(obj) \
|
#define GST_IS_SPIDER(obj) \
|
||||||
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_SPIDER))
|
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_SPIDER))
|
||||||
#define GST_IS_SPIDER_CLASS(obj) \
|
#define GST_IS_SPIDER_CLASS(obj) \
|
||||||
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_SPIDER))
|
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_SPIDER))
|
||||||
|
|
||||||
typedef struct _GstSpider GstSpider;
|
typedef struct _GstSpider GstSpider;
|
||||||
typedef struct _GstSpiderClass GstSpiderClass;
|
typedef struct _GstSpiderClass GstSpiderClass;
|
||||||
|
|
||||||
struct _GstSpider
|
struct _GstSpider {
|
||||||
{
|
GstBin parent;
|
||||||
GstBin parent;
|
|
||||||
|
|
||||||
GstSpiderIdentity *sink_ident;
|
GstSpiderIdentity *sink_ident;
|
||||||
GList *factories; /* factories to use for plugging */
|
GList * factories; /* factories to use for plugging */
|
||||||
|
|
||||||
GList *links; /* GStSpiderConnection list of all links */
|
GList * links; /* GStSpiderConnection list of all links */
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstSpiderClass
|
struct _GstSpiderClass {
|
||||||
{
|
|
||||||
GstBinClass parent_class;
|
GstBinClass parent_class;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* default initialization stuff */
|
/* default initialization stuff */
|
||||||
GType gst_spider_get_type (void);
|
GType gst_spider_get_type (void);
|
||||||
|
|
||||||
/* private link functions to be called by GstSpiderIdentity */
|
/* private link functions to be called by GstSpiderIdentity */
|
||||||
void gst_spider_identity_plug (GstSpiderIdentity * ident);
|
void gst_spider_identity_plug (GstSpiderIdentity *ident);
|
||||||
void gst_spider_identity_unplug (GstSpiderIdentity * ident);
|
void gst_spider_identity_unplug (GstSpiderIdentity *ident);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GST_SPIDER_H__ */
|
#endif /* __GST_SPIDER_H__ */
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define GST_TYPE_SPIDER_IDENTITY \
|
#define GST_TYPE_SPIDER_IDENTITY \
|
||||||
(gst_spider_identity_get_type())
|
(gst_spider_identity_get_type())
|
||||||
#define GST_SPIDER_IDENTITY(obj) \
|
#define GST_SPIDER_IDENTITY(obj) \
|
||||||
|
@ -37,36 +38,35 @@ G_BEGIN_DECLS
|
||||||
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_SPIDER_IDENTITY))
|
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_SPIDER_IDENTITY))
|
||||||
#define GST_IS_SPIDER_IDENTITY_CLASS(obj) \
|
#define GST_IS_SPIDER_IDENTITY_CLASS(obj) \
|
||||||
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_SPIDER_IDENTITY))
|
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_SPIDER_IDENTITY))
|
||||||
|
|
||||||
typedef struct _GstSpiderIdentity GstSpiderIdentity;
|
typedef struct _GstSpiderIdentity GstSpiderIdentity;
|
||||||
typedef struct _GstSpiderIdentityClass GstSpiderIdentityClass;
|
typedef struct _GstSpiderIdentityClass GstSpiderIdentityClass;
|
||||||
|
|
||||||
struct _GstSpiderIdentity
|
struct _GstSpiderIdentity {
|
||||||
{
|
|
||||||
GstElement element;
|
GstElement element;
|
||||||
|
|
||||||
/* sink and source */
|
/* sink and source */
|
||||||
GstPad *sink;
|
GstPad *sink;
|
||||||
GstPad *src;
|
GstPad *src;
|
||||||
|
|
||||||
/* plugged into autoplugger yet? */
|
/* plugged into autoplugger yet? */
|
||||||
gboolean plugged;
|
gboolean plugged;
|
||||||
|
|
||||||
/* Caps from typefinding */
|
/* Caps from typefinding */
|
||||||
GstCaps *caps;
|
GstCaps *caps;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstSpiderIdentityClass
|
struct _GstSpiderIdentityClass {
|
||||||
{
|
|
||||||
GstElementClass parent_class;
|
GstElementClass parent_class;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
GType gst_spider_identity_get_type (void);
|
GType gst_spider_identity_get_type (void);
|
||||||
|
|
||||||
GstSpiderIdentity *gst_spider_identity_new_sink (gchar * name);
|
GstSpiderIdentity* gst_spider_identity_new_sink (gchar *name);
|
||||||
GstSpiderIdentity *gst_spider_identity_new_src (gchar * name);
|
GstSpiderIdentity* gst_spider_identity_new_src (gchar *name);
|
||||||
GstPad *gst_spider_identity_request_new_pad (GstElement * element,
|
GstPad* gst_spider_identity_request_new_pad (GstElement *element, GstPadTemplate *templ, const gchar *name);
|
||||||
GstPadTemplate * templ, const gchar * name);
|
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GST_SPIDER_IDENTITY_H__ */
|
#endif /* __GST_SPIDER_IDENTITY_H__ */
|
||||||
|
|
|
@ -26,56 +26,56 @@
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
#include <setjmp.h>
|
#include <setjmp.h>
|
||||||
|
|
||||||
typedef struct _cothread_state cothread_state;
|
typedef struct _cothread_state cothread_state;
|
||||||
typedef struct _cothread_context cothread_context;
|
typedef struct _cothread_context cothread_context;
|
||||||
|
|
||||||
typedef int (*cothread_func) (int argc, char **argv);
|
typedef int (*cothread_func) (int argc,char **argv);
|
||||||
|
|
||||||
#define COTHREAD_STARTED 0x01
|
#define COTHREAD_STARTED 0x01
|
||||||
#define COTHREAD_DESTROYED 0x02
|
#define COTHREAD_DESTROYED 0x02
|
||||||
|
|
||||||
struct _cothread_state
|
struct _cothread_state {
|
||||||
{
|
cothread_context *ctx;
|
||||||
cothread_context *ctx;
|
int cothreadnum;
|
||||||
int cothreadnum;
|
gpointer priv;
|
||||||
gpointer priv;
|
|
||||||
|
|
||||||
cothread_func func;
|
cothread_func func;
|
||||||
int argc;
|
int argc;
|
||||||
char **argv;
|
char **argv;
|
||||||
|
|
||||||
int flags;
|
int flags;
|
||||||
void *sp;
|
void *sp;
|
||||||
jmp_buf jmp;
|
jmp_buf jmp;
|
||||||
void *stack_base;
|
void *stack_base;
|
||||||
unsigned long stack_size;
|
unsigned long stack_size;
|
||||||
|
|
||||||
int magic_number;
|
int magic_number;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
cothread_context *cothread_context_init (void);
|
cothread_context* cothread_context_init (void);
|
||||||
void cothread_context_free (cothread_context * ctx);
|
void cothread_context_free (cothread_context *ctx);
|
||||||
void cothread_context_set_data (cothread_state * cothread,
|
void cothread_context_set_data (cothread_state *cothread,
|
||||||
gchar * key, gpointer data);
|
gchar *key, gpointer data);
|
||||||
gpointer cothread_context_get_data (cothread_state * cothread, gchar * key);
|
gpointer cothread_context_get_data (cothread_state *cothread, gchar *key);
|
||||||
|
|
||||||
cothread_state *cothread_create (cothread_context * ctx);
|
cothread_state* cothread_create (cothread_context *ctx);
|
||||||
void cothread_free (cothread_state * cothread);
|
void cothread_free (cothread_state *cothread);
|
||||||
void cothread_setfunc (cothread_state * cothread, cothread_func func,
|
void cothread_setfunc (cothread_state *cothread, cothread_func func,
|
||||||
int argc, char **argv);
|
int argc, char **argv);
|
||||||
void cothread_stop (cothread_state * cothread);
|
void cothread_stop (cothread_state *cothread);
|
||||||
|
|
||||||
void cothread_switch (cothread_state * cothread);
|
void cothread_switch (cothread_state *cothread);
|
||||||
void cothread_set_private (cothread_state * cothread, gpointer data);
|
void cothread_set_private (cothread_state *cothread,
|
||||||
gpointer cothread_get_private (cothread_state * cothread);
|
gpointer data);
|
||||||
|
gpointer cothread_get_private (cothread_state *cothread);
|
||||||
|
|
||||||
void cothread_lock (cothread_state * cothread);
|
void cothread_lock (cothread_state *cothread);
|
||||||
gboolean cothread_trylock (cothread_state * cothread);
|
gboolean cothread_trylock (cothread_state *cothread);
|
||||||
void cothread_unlock (cothread_state * cothread);
|
void cothread_unlock (cothread_state *cothread);
|
||||||
|
|
||||||
cothread_state *cothread_main (cothread_context * ctx);
|
cothread_state* cothread_main (cothread_context *ctx);
|
||||||
cothread_state *cothread_current_main (void);
|
cothread_state* cothread_current_main (void);
|
||||||
cothread_state *cothread_current (void);
|
cothread_state* cothread_current (void);
|
||||||
|
|
||||||
#endif /* __COTHREAD_H__ */
|
#endif /* __COTHREAD_H__ */
|
||||||
|
|
|
@ -26,13 +26,14 @@
|
||||||
|
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS typedef enum
|
G_BEGIN_DECLS
|
||||||
{
|
|
||||||
AGGREGATOR_LOOP = 1,
|
|
||||||
|
typedef enum {
|
||||||
|
AGGREGATOR_LOOP = 1,
|
||||||
AGGREGATOR_LOOP_SELECT,
|
AGGREGATOR_LOOP_SELECT,
|
||||||
AGGREGATOR_CHAIN
|
AGGREGATOR_CHAIN
|
||||||
}
|
} GstAggregatorSchedType;
|
||||||
GstAggregatorSchedType;
|
|
||||||
|
|
||||||
#define GST_TYPE_AGGREGATOR \
|
#define GST_TYPE_AGGREGATOR \
|
||||||
(gst_aggregator_get_type())
|
(gst_aggregator_get_type())
|
||||||
|
@ -45,11 +46,10 @@ GstAggregatorSchedType;
|
||||||
#define GST_IS_AGGREGATOR_CLASS(obj) \
|
#define GST_IS_AGGREGATOR_CLASS(obj) \
|
||||||
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_AGGREGATOR))
|
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_AGGREGATOR))
|
||||||
|
|
||||||
typedef struct _GstAggregator GstAggregator;
|
typedef struct _GstAggregator GstAggregator;
|
||||||
typedef struct _GstAggregatorClass GstAggregatorClass;
|
typedef struct _GstAggregatorClass GstAggregatorClass;
|
||||||
|
|
||||||
struct _GstAggregator
|
struct _GstAggregator {
|
||||||
{
|
|
||||||
GstElement element;
|
GstElement element;
|
||||||
|
|
||||||
GstPad *srcpad;
|
GstPad *srcpad;
|
||||||
|
@ -63,14 +63,14 @@ struct _GstAggregator
|
||||||
gchar *last_message;
|
gchar *last_message;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstAggregatorClass
|
struct _GstAggregatorClass {
|
||||||
{
|
|
||||||
GstElementClass parent_class;
|
GstElementClass parent_class;
|
||||||
};
|
};
|
||||||
|
|
||||||
GType gst_aggregator_get_type (void);
|
GType gst_aggregator_get_type (void);
|
||||||
|
|
||||||
gboolean gst_aggregator_factory_init (GstElementFactory * factory);
|
gboolean gst_aggregator_factory_init (GstElementFactory *factory);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GST_AGGREGATOR_H__ */
|
#endif /* __GST_AGGREGATOR_H__ */
|
||||||
|
|
|
@ -28,42 +28,46 @@
|
||||||
#include <gst/gstmarshal.h>
|
#include <gst/gstmarshal.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define GST_TYPE_BUFFER_STORE (gst_buffer_store_get_type ())
|
#define GST_TYPE_BUFFER_STORE (gst_buffer_store_get_type ())
|
||||||
#define GST_BUFFER_STORE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_BUFFER_STORE, GstBufferStore))
|
#define GST_BUFFER_STORE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_BUFFER_STORE, GstBufferStore))
|
||||||
#define GST_IS_BUFFER_STORE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_BUFFER_STORE))
|
#define GST_IS_BUFFER_STORE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_BUFFER_STORE))
|
||||||
#define GST_BUFFER_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_BUFFER_STORE, GstBufferStoreClass))
|
#define GST_BUFFER_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_BUFFER_STORE, GstBufferStoreClass))
|
||||||
#define GST_IS_BUFFER_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_BUFFER_STORE))
|
#define GST_IS_BUFFER_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_BUFFER_STORE))
|
||||||
#define GST_BUFFER_STORE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_BUFFER_STORE, GstBufferStoreClass))
|
#define GST_BUFFER_STORE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_BUFFER_STORE, GstBufferStoreClass))
|
||||||
typedef struct _GstBufferStore GstBufferStore;
|
|
||||||
typedef struct _GstBufferStoreClass GstBufferStoreClass;
|
|
||||||
|
|
||||||
struct _GstBufferStore
|
typedef struct _GstBufferStore GstBufferStore;
|
||||||
{
|
typedef struct _GstBufferStoreClass GstBufferStoreClass;
|
||||||
GObject object;
|
|
||||||
|
|
||||||
GList *buffers;
|
struct _GstBufferStore {
|
||||||
|
GObject object;
|
||||||
|
|
||||||
|
GList * buffers;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstBufferStoreClass
|
struct _GstBufferStoreClass {
|
||||||
{
|
GObjectClass parent_class;
|
||||||
GObjectClass parent_class;
|
|
||||||
|
|
||||||
/* signals */
|
/* signals */
|
||||||
void (*cleared) (GstBufferStore * store);
|
void (* cleared) (GstBufferStore * store);
|
||||||
gboolean (*buffer_added) (GstBufferStore * store, GstBuffer * buffer);
|
gboolean (* buffer_added) (GstBufferStore * store,
|
||||||
|
GstBuffer * buffer);
|
||||||
};
|
};
|
||||||
|
|
||||||
GType gst_buffer_store_get_type (void);
|
GType gst_buffer_store_get_type (void);
|
||||||
|
|
||||||
GstBufferStore *gst_buffer_store_new (void);
|
GstBufferStore * gst_buffer_store_new (void);
|
||||||
void gst_buffer_store_clear (GstBufferStore * store);
|
void gst_buffer_store_clear (GstBufferStore * store);
|
||||||
|
|
||||||
gboolean gst_buffer_store_add_buffer (GstBufferStore * store,
|
gboolean gst_buffer_store_add_buffer (GstBufferStore * store,
|
||||||
GstBuffer * buffer);
|
GstBuffer * buffer);
|
||||||
|
|
||||||
GstBuffer *gst_buffer_store_get_buffer (GstBufferStore * store,
|
GstBuffer * gst_buffer_store_get_buffer (GstBufferStore * store,
|
||||||
guint64 offset, guint size);
|
guint64 offset,
|
||||||
guint gst_buffer_store_get_size (GstBufferStore * store, guint64 offset);
|
guint size);
|
||||||
|
guint gst_buffer_store_get_size (GstBufferStore * store,
|
||||||
|
guint64 offset);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GST_BUFFER_STORE_H__ */
|
#endif /* __GST_BUFFER_STORE_H__ */
|
||||||
|
|
|
@ -27,6 +27,8 @@
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
|
||||||
#define GST_TYPE_FAKESINK \
|
#define GST_TYPE_FAKESINK \
|
||||||
(gst_fakesink_get_type())
|
(gst_fakesink_get_type())
|
||||||
#define GST_FAKESINK(obj) \
|
#define GST_FAKESINK(obj) \
|
||||||
|
@ -37,8 +39,8 @@ G_BEGIN_DECLS
|
||||||
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_FAKESINK))
|
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_FAKESINK))
|
||||||
#define GST_IS_FAKESINK_CLASS(obj) \
|
#define GST_IS_FAKESINK_CLASS(obj) \
|
||||||
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_FAKESINK))
|
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_FAKESINK))
|
||||||
typedef enum
|
|
||||||
{
|
typedef enum {
|
||||||
FAKESINK_STATE_ERROR_NONE = 0,
|
FAKESINK_STATE_ERROR_NONE = 0,
|
||||||
FAKESINK_STATE_ERROR_NULL_READY,
|
FAKESINK_STATE_ERROR_NULL_READY,
|
||||||
FAKESINK_STATE_ERROR_READY_PAUSED,
|
FAKESINK_STATE_ERROR_READY_PAUSED,
|
||||||
|
@ -46,37 +48,35 @@ G_BEGIN_DECLS
|
||||||
FAKESINK_STATE_ERROR_PLAYING_PAUSED,
|
FAKESINK_STATE_ERROR_PLAYING_PAUSED,
|
||||||
FAKESINK_STATE_ERROR_PAUSED_READY,
|
FAKESINK_STATE_ERROR_PAUSED_READY,
|
||||||
FAKESINK_STATE_ERROR_READY_NULL,
|
FAKESINK_STATE_ERROR_READY_NULL,
|
||||||
}
|
} GstFakeSinkStateError;
|
||||||
GstFakeSinkStateError;
|
|
||||||
|
|
||||||
typedef struct _GstFakeSink GstFakeSink;
|
typedef struct _GstFakeSink GstFakeSink;
|
||||||
typedef struct _GstFakeSinkClass GstFakeSinkClass;
|
typedef struct _GstFakeSinkClass GstFakeSinkClass;
|
||||||
|
|
||||||
struct _GstFakeSink
|
struct _GstFakeSink {
|
||||||
{
|
GstElement element;
|
||||||
GstElement element;
|
|
||||||
|
|
||||||
gboolean silent;
|
gboolean silent;
|
||||||
gboolean dump;
|
gboolean dump;
|
||||||
gboolean sync;
|
gboolean sync;
|
||||||
gboolean signal_handoffs;
|
gboolean signal_handoffs;
|
||||||
GstClock *clock;
|
GstClock *clock;
|
||||||
GstFakeSinkStateError state_error;
|
GstFakeSinkStateError state_error;
|
||||||
|
|
||||||
gchar *last_message;
|
gchar *last_message;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstFakeSinkClass
|
struct _GstFakeSinkClass {
|
||||||
{
|
|
||||||
GstElementClass parent_class;
|
GstElementClass parent_class;
|
||||||
|
|
||||||
/* signals */
|
/* signals */
|
||||||
void (*handoff) (GstElement * element, GstBuffer * buf, GstPad * pad);
|
void (*handoff) (GstElement *element, GstBuffer *buf, GstPad *pad);
|
||||||
};
|
};
|
||||||
|
|
||||||
GType gst_fakesink_get_type (void);
|
GType gst_fakesink_get_type(void);
|
||||||
|
|
||||||
gboolean gst_fakesink_factory_init (GstElementFactory * factory);
|
gboolean gst_fakesink_factory_init (GstElementFactory *factory);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GST_FAKESINK_H__ */
|
#endif /* __GST_FAKESINK_H__ */
|
||||||
|
|
|
@ -26,8 +26,10 @@
|
||||||
|
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS typedef enum
|
G_BEGIN_DECLS
|
||||||
{
|
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
FAKESRC_FIRST_LAST_LOOP = 1,
|
FAKESRC_FIRST_LAST_LOOP = 1,
|
||||||
FAKESRC_LAST_FIRST_LOOP,
|
FAKESRC_LAST_FIRST_LOOP,
|
||||||
FAKESRC_PING_PONG,
|
FAKESRC_PING_PONG,
|
||||||
|
@ -36,33 +38,26 @@ G_BEGIN_DECLS typedef enum
|
||||||
FAKESRC_PATTERN_LOOP,
|
FAKESRC_PATTERN_LOOP,
|
||||||
FAKESRC_PING_PONG_PATTERN,
|
FAKESRC_PING_PONG_PATTERN,
|
||||||
FAKESRC_GET_ALWAYS_SUCEEDS
|
FAKESRC_GET_ALWAYS_SUCEEDS
|
||||||
}
|
} GstFakeSrcOutputType;
|
||||||
GstFakeSrcOutputType;
|
|
||||||
|
|
||||||
typedef enum
|
typedef enum {
|
||||||
{
|
|
||||||
FAKESRC_DATA_ALLOCATE = 1,
|
FAKESRC_DATA_ALLOCATE = 1,
|
||||||
FAKESRC_DATA_SUBBUFFER,
|
FAKESRC_DATA_SUBBUFFER,
|
||||||
}
|
} GstFakeSrcDataType;
|
||||||
GstFakeSrcDataType;
|
|
||||||
|
|
||||||
typedef enum
|
typedef enum {
|
||||||
{
|
|
||||||
FAKESRC_SIZETYPE_NULL = 1,
|
FAKESRC_SIZETYPE_NULL = 1,
|
||||||
FAKESRC_SIZETYPE_FIXED,
|
FAKESRC_SIZETYPE_FIXED,
|
||||||
FAKESRC_SIZETYPE_RANDOM
|
FAKESRC_SIZETYPE_RANDOM
|
||||||
}
|
} GstFakeSrcSizeType;
|
||||||
GstFakeSrcSizeType;
|
|
||||||
|
|
||||||
typedef enum
|
typedef enum {
|
||||||
{
|
|
||||||
FAKESRC_FILLTYPE_NOTHING = 1,
|
FAKESRC_FILLTYPE_NOTHING = 1,
|
||||||
FAKESRC_FILLTYPE_NULL,
|
FAKESRC_FILLTYPE_NULL,
|
||||||
FAKESRC_FILLTYPE_RANDOM,
|
FAKESRC_FILLTYPE_RANDOM,
|
||||||
FAKESRC_FILLTYPE_PATTERN,
|
FAKESRC_FILLTYPE_PATTERN,
|
||||||
FAKESRC_FILLTYPE_PATTERN_CONT
|
FAKESRC_FILLTYPE_PATTERN_CONT
|
||||||
}
|
} GstFakeSrcFillType;
|
||||||
GstFakeSrcFillType;
|
|
||||||
|
|
||||||
#define GST_TYPE_FAKESRC \
|
#define GST_TYPE_FAKESRC \
|
||||||
(gst_fakesrc_get_type())
|
(gst_fakesrc_get_type())
|
||||||
|
@ -78,51 +73,50 @@ GstFakeSrcFillType;
|
||||||
typedef struct _GstFakeSrc GstFakeSrc;
|
typedef struct _GstFakeSrc GstFakeSrc;
|
||||||
typedef struct _GstFakeSrcClass GstFakeSrcClass;
|
typedef struct _GstFakeSrcClass GstFakeSrcClass;
|
||||||
|
|
||||||
struct _GstFakeSrc
|
struct _GstFakeSrc {
|
||||||
{
|
GstElement element;
|
||||||
GstElement element;
|
|
||||||
|
|
||||||
gboolean loop_based;
|
gboolean loop_based;
|
||||||
gboolean eos;
|
gboolean eos;
|
||||||
|
|
||||||
GstFakeSrcOutputType output;
|
GstFakeSrcOutputType output;
|
||||||
GstFakeSrcDataType data;
|
GstFakeSrcDataType data;
|
||||||
GstFakeSrcSizeType sizetype;
|
GstFakeSrcSizeType sizetype;
|
||||||
GstFakeSrcFillType filltype;
|
GstFakeSrcFillType filltype;
|
||||||
|
|
||||||
guint sizemin;
|
guint sizemin;
|
||||||
guint sizemax;
|
guint sizemax;
|
||||||
GstBuffer *parent;
|
GstBuffer *parent;
|
||||||
guint parentsize;
|
guint parentsize;
|
||||||
guint parentoffset;
|
guint parentoffset;
|
||||||
guint8 pattern_byte;
|
guint8 pattern_byte;
|
||||||
gchar *pattern;
|
gchar *pattern;
|
||||||
GList *patternlist;
|
GList *patternlist;
|
||||||
gint64 segment_start;
|
gint64 segment_start;
|
||||||
gint64 segment_end;
|
gint64 segment_end;
|
||||||
gboolean segment_loop;
|
gboolean segment_loop;
|
||||||
gint num_buffers;
|
gint num_buffers;
|
||||||
gint rt_num_buffers; /* we are going to change this at runtime */
|
gint rt_num_buffers; /* we are going to change this at runtime */
|
||||||
guint64 buffer_count;
|
guint64 buffer_count;
|
||||||
gboolean silent;
|
gboolean silent;
|
||||||
gboolean signal_handoffs;
|
gboolean signal_handoffs;
|
||||||
gboolean dump;
|
gboolean dump;
|
||||||
gboolean need_flush;
|
gboolean need_flush;
|
||||||
|
|
||||||
gchar *last_message;
|
gchar *last_message;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstFakeSrcClass
|
struct _GstFakeSrcClass {
|
||||||
{
|
|
||||||
GstElementClass parent_class;
|
GstElementClass parent_class;
|
||||||
|
|
||||||
/* signals */
|
/* signals */
|
||||||
void (*handoff) (GstElement * element, GstBuffer * buf, GstPad * pad);
|
void (*handoff) (GstElement *element, GstBuffer *buf, GstPad *pad);
|
||||||
};
|
};
|
||||||
|
|
||||||
GType gst_fakesrc_get_type (void);
|
GType gst_fakesrc_get_type(void);
|
||||||
|
|
||||||
gboolean gst_fakesrc_factory_init (GstElementFactory * factory);
|
gboolean gst_fakesrc_factory_init (GstElementFactory *factory);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GST_FAKESRC_H__ */
|
#endif /* __GST_FAKESRC_H__ */
|
||||||
|
|
|
@ -27,6 +27,8 @@
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
|
||||||
#define GST_TYPE_FDSINK \
|
#define GST_TYPE_FDSINK \
|
||||||
(gst_fdsink_get_type())
|
(gst_fdsink_get_type())
|
||||||
#define GST_FDSINK(obj) \
|
#define GST_FDSINK(obj) \
|
||||||
|
@ -37,11 +39,11 @@ G_BEGIN_DECLS
|
||||||
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_FDSINK))
|
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_FDSINK))
|
||||||
#define GST_IS_FDSINK_CLASS(obj) \
|
#define GST_IS_FDSINK_CLASS(obj) \
|
||||||
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_FDSINK))
|
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_FDSINK))
|
||||||
|
|
||||||
typedef struct _GstFdSink GstFdSink;
|
typedef struct _GstFdSink GstFdSink;
|
||||||
typedef struct _GstFdSinkClass GstFdSinkClass;
|
typedef struct _GstFdSinkClass GstFdSinkClass;
|
||||||
|
|
||||||
struct _GstFdSink
|
struct _GstFdSink {
|
||||||
{
|
|
||||||
GstElement element;
|
GstElement element;
|
||||||
|
|
||||||
GstPad *sinkpad;
|
GstPad *sinkpad;
|
||||||
|
@ -49,12 +51,12 @@ struct _GstFdSink
|
||||||
int fd;
|
int fd;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstFdSinkClass
|
struct _GstFdSinkClass {
|
||||||
{
|
|
||||||
GstElementClass parent_class;
|
GstElementClass parent_class;
|
||||||
};
|
};
|
||||||
|
|
||||||
GType gst_fdsink_get_type (void);
|
GType gst_fdsink_get_type(void);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GST_FDSINK_H__ */
|
#endif /* __GST_FDSINK_H__ */
|
||||||
|
|
|
@ -27,6 +27,8 @@
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
|
||||||
#define GST_TYPE_FDSRC \
|
#define GST_TYPE_FDSRC \
|
||||||
(gst_fdsrc_get_type())
|
(gst_fdsrc_get_type())
|
||||||
#define GST_FDSRC(obj) \
|
#define GST_FDSRC(obj) \
|
||||||
|
@ -37,11 +39,12 @@ G_BEGIN_DECLS
|
||||||
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_FDSRC))
|
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_FDSRC))
|
||||||
#define GST_IS_FDSRC_CLASS(obj) \
|
#define GST_IS_FDSRC_CLASS(obj) \
|
||||||
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_FDSRC))
|
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_FDSRC))
|
||||||
|
|
||||||
|
|
||||||
typedef struct _GstFdSrc GstFdSrc;
|
typedef struct _GstFdSrc GstFdSrc;
|
||||||
typedef struct _GstFdSrcClass GstFdSrcClass;
|
typedef struct _GstFdSrcClass GstFdSrcClass;
|
||||||
|
|
||||||
struct _GstFdSrc
|
struct _GstFdSrc {
|
||||||
{
|
|
||||||
GstElement element;
|
GstElement element;
|
||||||
/* pads */
|
/* pads */
|
||||||
GstPad *srcpad;
|
GstPad *srcpad;
|
||||||
|
@ -49,22 +52,22 @@ struct _GstFdSrc
|
||||||
/* fd */
|
/* fd */
|
||||||
gint fd;
|
gint fd;
|
||||||
|
|
||||||
gulong curoffset; /* current offset in file */
|
gulong curoffset; /* current offset in file */
|
||||||
gulong blocksize; /* bytes per read */
|
gulong blocksize; /* bytes per read */
|
||||||
guint64 timeout; /* read timeout, in nanoseconds */
|
guint64 timeout; /* read timeout, in nanoseconds */
|
||||||
|
|
||||||
gulong seq; /* buffer sequence number */
|
gulong seq; /* buffer sequence number */
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstFdSrcClass
|
struct _GstFdSrcClass {
|
||||||
{
|
|
||||||
GstElementClass parent_class;
|
GstElementClass parent_class;
|
||||||
|
|
||||||
/* signals */
|
/* signals */
|
||||||
void (*timeout) (GstElement * element);
|
void (*timeout) (GstElement *element);
|
||||||
};
|
};
|
||||||
|
|
||||||
GType gst_fdsrc_get_type (void);
|
GType gst_fdsrc_get_type(void);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GST_FDSRC_H__ */
|
#endif /* __GST_FDSRC_H__ */
|
||||||
|
|
|
@ -27,6 +27,8 @@
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
|
||||||
#define GST_TYPE_FILESINK \
|
#define GST_TYPE_FILESINK \
|
||||||
(gst_filesink_get_type())
|
(gst_filesink_get_type())
|
||||||
#define GST_FILESINK(obj) \
|
#define GST_FILESINK(obj) \
|
||||||
|
@ -37,19 +39,17 @@ G_BEGIN_DECLS
|
||||||
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_FILESINK))
|
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_FILESINK))
|
||||||
#define GST_IS_FILESINK_CLASS(obj) \
|
#define GST_IS_FILESINK_CLASS(obj) \
|
||||||
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_FILESINK))
|
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_FILESINK))
|
||||||
|
|
||||||
typedef struct _GstFileSink GstFileSink;
|
typedef struct _GstFileSink GstFileSink;
|
||||||
typedef struct _GstFileSinkClass GstFileSinkClass;
|
typedef struct _GstFileSinkClass GstFileSinkClass;
|
||||||
|
|
||||||
typedef enum
|
typedef enum {
|
||||||
{
|
GST_FILESINK_OPEN = GST_ELEMENT_FLAG_LAST,
|
||||||
GST_FILESINK_OPEN = GST_ELEMENT_FLAG_LAST,
|
|
||||||
|
|
||||||
GST_FILESINK_FLAG_LAST = GST_ELEMENT_FLAG_LAST + 2
|
GST_FILESINK_FLAG_LAST = GST_ELEMENT_FLAG_LAST + 2
|
||||||
}
|
} GstFileSinkFlags;
|
||||||
GstFileSinkFlags;
|
|
||||||
|
|
||||||
struct _GstFileSink
|
struct _GstFileSink {
|
||||||
{
|
|
||||||
GstElement element;
|
GstElement element;
|
||||||
|
|
||||||
gchar *filename;
|
gchar *filename;
|
||||||
|
@ -59,15 +59,15 @@ struct _GstFileSink
|
||||||
guint64 data_written;
|
guint64 data_written;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstFileSinkClass
|
struct _GstFileSinkClass {
|
||||||
{
|
|
||||||
GstElementClass parent_class;
|
GstElementClass parent_class;
|
||||||
|
|
||||||
/* signals */
|
/* signals */
|
||||||
void (*handoff) (GstElement * element, GstPad * pad);
|
void (*handoff) (GstElement *element, GstPad *pad);
|
||||||
};
|
};
|
||||||
|
|
||||||
GType gst_filesink_get_type (void);
|
GType gst_filesink_get_type(void);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GST_FILESINK_H__ */
|
#endif /* __GST_FILESINK_H__ */
|
||||||
|
|
|
@ -29,42 +29,42 @@
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
|
||||||
#define GST_TYPE_FILESRC \
|
#define GST_TYPE_FILESRC \
|
||||||
(gst_filesrc_get_type())
|
(gst_filesrc_get_type())
|
||||||
#define GST_FILESRC(obj) \
|
#define GST_FILESRC(obj) \
|
||||||
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_FILESRC,GstFileSrc))
|
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_FILESRC,GstFileSrc))
|
||||||
#define GST_FILESRC_CLASS(klass) \
|
#define GST_FILESRC_CLASS(klass) \
|
||||||
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_FILESRC,GstFileSrcClass))
|
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_FILESRC,GstFileSrcClass))
|
||||||
#define GST_IS_FILESRC(obj) \
|
#define GST_IS_FILESRC(obj) \
|
||||||
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_FILESRC))
|
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_FILESRC))
|
||||||
#define GST_IS_FILESRC_CLASS(obj) \
|
#define GST_IS_FILESRC_CLASS(obj) \
|
||||||
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_FILESRC))
|
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_FILESRC))
|
||||||
typedef enum
|
|
||||||
{
|
typedef enum {
|
||||||
GST_FILESRC_OPEN = GST_ELEMENT_FLAG_LAST,
|
GST_FILESRC_OPEN = GST_ELEMENT_FLAG_LAST,
|
||||||
|
|
||||||
GST_FILESRC_FLAG_LAST = GST_ELEMENT_FLAG_LAST + 2
|
GST_FILESRC_FLAG_LAST = GST_ELEMENT_FLAG_LAST + 2
|
||||||
}
|
} GstFileSrcFlags;
|
||||||
GstFileSrcFlags;
|
|
||||||
|
|
||||||
typedef struct _GstFileSrc GstFileSrc;
|
typedef struct _GstFileSrc GstFileSrc;
|
||||||
typedef struct _GstFileSrcClass GstFileSrcClass;
|
typedef struct _GstFileSrcClass GstFileSrcClass;
|
||||||
|
|
||||||
struct _GstFileSrc
|
struct _GstFileSrc {
|
||||||
{
|
|
||||||
GstElement element;
|
GstElement element;
|
||||||
GstPad *srcpad;
|
GstPad *srcpad;
|
||||||
|
|
||||||
guint pagesize; /* system page size */
|
guint pagesize; /* system page size*/
|
||||||
|
|
||||||
|
gchar *filename; /* filename */
|
||||||
|
gchar *uri; /* caching the URI */
|
||||||
|
gint fd; /* open file descriptor*/
|
||||||
|
off_t filelen; /* what's the file length?*/
|
||||||
|
|
||||||
gchar *filename; /* filename */
|
off_t curoffset; /* current offset in file*/
|
||||||
gchar *uri; /* caching the URI */
|
off_t block_size; /* bytes per read */
|
||||||
gint fd; /* open file descriptor */
|
gboolean touch; /* whether to touch every page */
|
||||||
off_t filelen; /* what's the file length? */
|
|
||||||
|
|
||||||
off_t curoffset; /* current offset in file */
|
|
||||||
off_t block_size; /* bytes per read */
|
|
||||||
gboolean touch; /* whether to touch every page */
|
|
||||||
gboolean using_mmap;
|
gboolean using_mmap;
|
||||||
|
|
||||||
GstBuffer *mapbuf;
|
GstBuffer *mapbuf;
|
||||||
|
@ -74,12 +74,12 @@ struct _GstFileSrc
|
||||||
gboolean need_flush;
|
gboolean need_flush;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstFileSrcClass
|
struct _GstFileSrcClass {
|
||||||
{
|
|
||||||
GstElementClass parent_class;
|
GstElementClass parent_class;
|
||||||
};
|
};
|
||||||
|
|
||||||
GType gst_filesrc_get_type (void);
|
GType gst_filesrc_get_type(void);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GST_FILESRC_H__ */
|
#endif /* __GST_FILESRC_H__ */
|
||||||
|
|
|
@ -28,6 +28,8 @@
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
|
||||||
#define GST_TYPE_IDENTITY \
|
#define GST_TYPE_IDENTITY \
|
||||||
(gst_identity_get_type())
|
(gst_identity_get_type())
|
||||||
#define GST_IDENTITY(obj) \
|
#define GST_IDENTITY(obj) \
|
||||||
|
@ -38,36 +40,36 @@ G_BEGIN_DECLS
|
||||||
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_IDENTITY))
|
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_IDENTITY))
|
||||||
#define GST_IS_IDENTITY_CLASS(obj) \
|
#define GST_IS_IDENTITY_CLASS(obj) \
|
||||||
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_IDENTITY))
|
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_IDENTITY))
|
||||||
|
|
||||||
typedef struct _GstIdentity GstIdentity;
|
typedef struct _GstIdentity GstIdentity;
|
||||||
typedef struct _GstIdentityClass GstIdentityClass;
|
typedef struct _GstIdentityClass GstIdentityClass;
|
||||||
|
|
||||||
struct _GstIdentity
|
struct _GstIdentity {
|
||||||
{
|
GstElement element;
|
||||||
GstElement element;
|
|
||||||
|
|
||||||
GstPad *sinkpad;
|
GstPad *sinkpad;
|
||||||
GstPad *srcpad;
|
GstPad *srcpad;
|
||||||
|
|
||||||
gboolean loop_based;
|
gboolean loop_based;
|
||||||
guint duplicate;
|
guint duplicate;
|
||||||
gint error_after;
|
gint error_after;
|
||||||
gfloat drop_probability;
|
gfloat drop_probability;
|
||||||
guint sleep_time;
|
guint sleep_time;
|
||||||
gboolean silent;
|
gboolean silent;
|
||||||
gboolean dump;
|
gboolean dump;
|
||||||
gchar *last_message;
|
gchar *last_message;
|
||||||
GstCaps *srccaps;
|
GstCaps *srccaps;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstIdentityClass
|
struct _GstIdentityClass {
|
||||||
{
|
|
||||||
GstElementClass parent_class;
|
GstElementClass parent_class;
|
||||||
|
|
||||||
/* signals */
|
/* signals */
|
||||||
void (*handoff) (GstElement * element, GstBuffer * buf);
|
void (*handoff) (GstElement *element, GstBuffer *buf);
|
||||||
};
|
};
|
||||||
|
|
||||||
GType gst_identity_get_type (void);
|
GType gst_identity_get_type(void);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GST_IDENTITY_H__ */
|
#endif /* __GST_IDENTITY_H__ */
|
||||||
|
|
|
@ -28,6 +28,8 @@
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
|
||||||
#define GST_TYPE_MD5SINK \
|
#define GST_TYPE_MD5SINK \
|
||||||
(gst_md5sink_get_type())
|
(gst_md5sink_get_type())
|
||||||
#define GST_MD5SINK(obj) \
|
#define GST_MD5SINK(obj) \
|
||||||
|
@ -38,11 +40,11 @@ G_BEGIN_DECLS
|
||||||
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_MD5SINK))
|
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_MD5SINK))
|
||||||
#define GST_IS_MD5SINK_CLASS(obj) \
|
#define GST_IS_MD5SINK_CLASS(obj) \
|
||||||
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_MD5SINK))
|
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_MD5SINK))
|
||||||
|
|
||||||
typedef struct _GstMD5Sink GstMD5Sink;
|
typedef struct _GstMD5Sink GstMD5Sink;
|
||||||
typedef struct _GstMD5SinkClass GstMD5SinkClass;
|
typedef struct _GstMD5SinkClass GstMD5SinkClass;
|
||||||
|
|
||||||
struct _GstMD5Sink
|
struct _GstMD5Sink {
|
||||||
{
|
|
||||||
GstElement element;
|
GstElement element;
|
||||||
|
|
||||||
/* md5 information */
|
/* md5 information */
|
||||||
|
@ -54,21 +56,21 @@ struct _GstMD5Sink
|
||||||
guint32 total[2];
|
guint32 total[2];
|
||||||
guint32 buflen;
|
guint32 buflen;
|
||||||
gchar buffer[128];
|
gchar buffer[128];
|
||||||
|
|
||||||
/* latest md5 */
|
/* latest md5 */
|
||||||
guchar md5[16];
|
guchar md5[16];
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstMD5SinkClass
|
struct _GstMD5SinkClass {
|
||||||
{
|
|
||||||
GstElementClass parent_class;
|
GstElementClass parent_class;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
GType gst_md5sink_get_type (void);
|
GType gst_md5sink_get_type (void);
|
||||||
|
|
||||||
gboolean gst_md5sink_factory_init (GstElementFactory * factory);
|
gboolean gst_md5sink_factory_init (GstElementFactory *factory);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GST_MD5SINK_H__ */
|
#endif /* __GST_MD5SINK_H__ */
|
||||||
|
|
|
@ -27,6 +27,8 @@
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
|
||||||
#define GST_TYPE_MULTIFILESRC \
|
#define GST_TYPE_MULTIFILESRC \
|
||||||
(gst_multifilesrc_get_type())
|
(gst_multifilesrc_get_type())
|
||||||
#define GST_MULTIFILESRC(obj) \
|
#define GST_MULTIFILESRC(obj) \
|
||||||
|
@ -37,43 +39,41 @@ G_BEGIN_DECLS
|
||||||
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_MULTIFILESRC))
|
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_MULTIFILESRC))
|
||||||
#define GST_IS_MULTIFILESRC_CLASS(obj) \
|
#define GST_IS_MULTIFILESRC_CLASS(obj) \
|
||||||
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_MULTIFILESRC))
|
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_MULTIFILESRC))
|
||||||
typedef enum
|
|
||||||
{
|
|
||||||
GST_MULTIFILESRC_OPEN = GST_ELEMENT_FLAG_LAST,
|
|
||||||
|
|
||||||
GST_MULTIFILESRC_FLAG_LAST = GST_ELEMENT_FLAG_LAST + 2
|
typedef enum {
|
||||||
}
|
GST_MULTIFILESRC_OPEN = GST_ELEMENT_FLAG_LAST,
|
||||||
GstMultiFileSrcFlags;
|
|
||||||
|
GST_MULTIFILESRC_FLAG_LAST = GST_ELEMENT_FLAG_LAST + 2
|
||||||
|
} GstMultiFileSrcFlags;
|
||||||
|
|
||||||
typedef struct _GstMultiFileSrc GstMultiFileSrc;
|
typedef struct _GstMultiFileSrc GstMultiFileSrc;
|
||||||
typedef struct _GstMultiFileSrcClass GstMultiFileSrcClass;
|
typedef struct _GstMultiFileSrcClass GstMultiFileSrcClass;
|
||||||
|
|
||||||
struct _GstMultiFileSrc
|
struct _GstMultiFileSrc {
|
||||||
{
|
|
||||||
GstElement element;
|
GstElement element;
|
||||||
/* pads */
|
/* pads */
|
||||||
GstPad *srcpad;
|
GstPad *srcpad;
|
||||||
|
|
||||||
/* current file details */
|
/* current file details */
|
||||||
gchar *currentfilename;
|
gchar *currentfilename;
|
||||||
GSList *listptr;
|
GSList *listptr;
|
||||||
|
|
||||||
/* mapping parameters */
|
/* mapping parameters */
|
||||||
gint fd;
|
gint fd;
|
||||||
gulong size; /* how long is the file? */
|
gulong size; /* how long is the file? */
|
||||||
guchar *map; /* where the file is mapped to */
|
guchar *map; /* where the file is mapped to */
|
||||||
|
|
||||||
gboolean new_seek;
|
gboolean new_seek;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstMultiFileSrcClass
|
struct _GstMultiFileSrcClass {
|
||||||
{
|
|
||||||
GstElementClass parent_class;
|
GstElementClass parent_class;
|
||||||
|
|
||||||
void (*new_file) (GstMultiFileSrc * multifilesrc, gchar * newfilename);
|
void (*new_file) (GstMultiFileSrc *multifilesrc, gchar *newfilename);
|
||||||
};
|
};
|
||||||
|
|
||||||
GType gst_multifilesrc_get_type (void);
|
GType gst_multifilesrc_get_type(void);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GST_MULTIFILESRC_H__ */
|
#endif /* __GST_MULTIFILESRC_H__ */
|
||||||
|
|
|
@ -28,6 +28,8 @@
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
|
||||||
#define GST_TYPE_PIPEFILTER \
|
#define GST_TYPE_PIPEFILTER \
|
||||||
(gst_pipefilter_get_type())
|
(gst_pipefilter_get_type())
|
||||||
#define GST_PIPEFILTER(obj) \
|
#define GST_PIPEFILTER(obj) \
|
||||||
|
@ -38,19 +40,17 @@ G_BEGIN_DECLS
|
||||||
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_PIPEFILTER))
|
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_PIPEFILTER))
|
||||||
#define GST_IS_PIPEFILTER_CLASS(obj) \
|
#define GST_IS_PIPEFILTER_CLASS(obj) \
|
||||||
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_PIPEFILTER))
|
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_PIPEFILTER))
|
||||||
typedef enum
|
|
||||||
{
|
|
||||||
GST_PIPEFILTER_OPEN = GST_ELEMENT_FLAG_LAST,
|
|
||||||
|
|
||||||
GST_PIPEFILTER_FLAG_LAST = GST_ELEMENT_FLAG_LAST + 2
|
typedef enum {
|
||||||
}
|
GST_PIPEFILTER_OPEN = GST_ELEMENT_FLAG_LAST,
|
||||||
GstPipeFilterFlags;
|
|
||||||
|
GST_PIPEFILTER_FLAG_LAST = GST_ELEMENT_FLAG_LAST + 2
|
||||||
|
} GstPipeFilterFlags;
|
||||||
|
|
||||||
typedef struct _GstPipefilter GstPipefilter;
|
typedef struct _GstPipefilter GstPipefilter;
|
||||||
typedef struct _GstPipefilterClass GstPipefilterClass;
|
typedef struct _GstPipefilterClass GstPipefilterClass;
|
||||||
|
|
||||||
struct _GstPipefilter
|
struct _GstPipefilter {
|
||||||
{
|
|
||||||
GstElement element;
|
GstElement element;
|
||||||
|
|
||||||
GstPad *sinkpad;
|
GstPad *sinkpad;
|
||||||
|
@ -62,20 +62,20 @@ struct _GstPipefilter
|
||||||
/* fd */
|
/* fd */
|
||||||
gint fdout[2];
|
gint fdout[2];
|
||||||
gint fdin[2];
|
gint fdin[2];
|
||||||
pid_t childpid;
|
pid_t childpid;
|
||||||
|
|
||||||
gulong curoffset; /* current offset in file */
|
gulong curoffset; /* current offset in file */
|
||||||
gulong bytes_per_read; /* bytes per read */
|
gulong bytes_per_read; /* bytes per read */
|
||||||
|
|
||||||
gulong seq; /* buffer sequence number */
|
gulong seq; /* buffer sequence number */
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstPipefilterClass
|
struct _GstPipefilterClass {
|
||||||
{
|
|
||||||
GstElementClass parent_class;
|
GstElementClass parent_class;
|
||||||
};
|
};
|
||||||
|
|
||||||
GType gst_pipefilter_get_type (void);
|
GType gst_pipefilter_get_type(void);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GST_PIPEFILTER_H__ */
|
#endif /* __GST_PIPEFILTER_H__ */
|
||||||
|
|
|
@ -28,6 +28,8 @@
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
|
||||||
#define GST_TYPE_SHAPER \
|
#define GST_TYPE_SHAPER \
|
||||||
(gst_shaper_get_type())
|
(gst_shaper_get_type())
|
||||||
#define GST_SHAPER(obj) \
|
#define GST_SHAPER(obj) \
|
||||||
|
@ -38,37 +40,35 @@ G_BEGIN_DECLS
|
||||||
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_SHAPER))
|
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_SHAPER))
|
||||||
#define GST_IS_SHAPER_CLASS(obj) \
|
#define GST_IS_SHAPER_CLASS(obj) \
|
||||||
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_SHAPER))
|
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_SHAPER))
|
||||||
typedef enum
|
|
||||||
{
|
typedef enum {
|
||||||
SHAPER_POLICY_TIMESTAMPS = 1,
|
SHAPER_POLICY_TIMESTAMPS = 1,
|
||||||
SHAPER_POLICY_BUFFERSIZE
|
SHAPER_POLICY_BUFFERSIZE
|
||||||
}
|
} GstShaperPolicyType;
|
||||||
GstShaperPolicyType;
|
|
||||||
|
|
||||||
typedef struct _GstShaper GstShaper;
|
typedef struct _GstShaper GstShaper;
|
||||||
typedef struct _GstShaperClass GstShaperClass;
|
typedef struct _GstShaperClass GstShaperClass;
|
||||||
|
|
||||||
struct _GstShaper
|
struct _GstShaper {
|
||||||
{
|
GstElement element;
|
||||||
GstElement element;
|
|
||||||
|
|
||||||
GSList *connections;
|
GSList *connections;
|
||||||
gint nconnections;
|
gint nconnections;
|
||||||
|
|
||||||
GstShaperPolicyType policy;
|
GstShaperPolicyType policy;
|
||||||
|
|
||||||
gboolean silent;
|
gboolean silent;
|
||||||
gchar *last_message;
|
gchar *last_message;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstShaperClass
|
struct _GstShaperClass {
|
||||||
{
|
|
||||||
GstElementClass parent_class;
|
GstElementClass parent_class;
|
||||||
};
|
};
|
||||||
|
|
||||||
GType gst_shaper_get_type (void);
|
GType gst_shaper_get_type (void);
|
||||||
gboolean gst_shaper_factory_init (GstElementFactory * factory);
|
gboolean gst_shaper_factory_init (GstElementFactory *factory);
|
||||||
|
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GST_SHAPER_H__ */
|
#endif /* __GST_SHAPER_H__ */
|
||||||
|
|
|
@ -27,6 +27,8 @@
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
|
||||||
#define GST_TYPE_STATISTICS \
|
#define GST_TYPE_STATISTICS \
|
||||||
(gst_statistics_get_type())
|
(gst_statistics_get_type())
|
||||||
#define GST_STATISTICS(obj) \
|
#define GST_STATISTICS(obj) \
|
||||||
|
@ -37,20 +39,19 @@ G_BEGIN_DECLS
|
||||||
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_STATISTICS))
|
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_STATISTICS))
|
||||||
#define GST_IS_STATISTICS_CLASS(obj) \
|
#define GST_IS_STATISTICS_CLASS(obj) \
|
||||||
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_STATISTICS))
|
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_STATISTICS))
|
||||||
|
|
||||||
typedef struct _GstStatistics GstStatistics;
|
typedef struct _GstStatistics GstStatistics;
|
||||||
typedef struct _GstStatisticsClass GstStatisticsClass;
|
typedef struct _GstStatisticsClass GstStatisticsClass;
|
||||||
|
|
||||||
typedef struct _stats stats;
|
typedef struct _stats stats;
|
||||||
|
|
||||||
struct _stats
|
struct _stats {
|
||||||
{
|
|
||||||
gint64 buffers;
|
gint64 buffers;
|
||||||
gint64 bytes;
|
gint64 bytes;
|
||||||
gint64 events;
|
gint64 events;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstStatistics
|
struct _GstStatistics {
|
||||||
{
|
|
||||||
GstElement element;
|
GstElement element;
|
||||||
|
|
||||||
GstPad *sinkpad;
|
GstPad *sinkpad;
|
||||||
|
@ -64,20 +65,20 @@ struct _GstStatistics
|
||||||
stats update_count;
|
stats update_count;
|
||||||
stats update_freq;
|
stats update_freq;
|
||||||
|
|
||||||
gboolean update_on_eos;
|
gboolean update_on_eos;
|
||||||
gboolean update;
|
gboolean update;
|
||||||
gboolean silent;
|
gboolean silent;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstStatisticsClass
|
struct _GstStatisticsClass {
|
||||||
{
|
|
||||||
GstElementClass parent_class;
|
GstElementClass parent_class;
|
||||||
|
|
||||||
/* signals */
|
/* signals */
|
||||||
void (*update) (GstElement * element);
|
void (*update) (GstElement *element);
|
||||||
};
|
};
|
||||||
|
|
||||||
GType gst_statistics_get_type (void);
|
GType gst_statistics_get_type(void);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GST_STATISTICS_H__ */
|
#endif /* __GST_STATISTICS_H__ */
|
||||||
|
|
|
@ -27,6 +27,8 @@
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
|
||||||
#define GST_TYPE_TEE \
|
#define GST_TYPE_TEE \
|
||||||
(gst_tee_get_type())
|
(gst_tee_get_type())
|
||||||
#define GST_TEE(obj) \
|
#define GST_TEE(obj) \
|
||||||
|
@ -37,27 +39,27 @@ G_BEGIN_DECLS
|
||||||
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_TEE))
|
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_TEE))
|
||||||
#define GST_IS_TEE_CLASS(obj) \
|
#define GST_IS_TEE_CLASS(obj) \
|
||||||
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_TEE))
|
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_TEE))
|
||||||
typedef struct _GstTee GstTee;
|
|
||||||
typedef struct _GstTeeClass GstTeeClass;
|
|
||||||
|
|
||||||
struct _GstTee
|
typedef struct _GstTee GstTee;
|
||||||
{
|
typedef struct _GstTeeClass GstTeeClass;
|
||||||
|
|
||||||
|
struct _GstTee {
|
||||||
GstElement element;
|
GstElement element;
|
||||||
|
|
||||||
GstPad *sinkpad;
|
GstPad *sinkpad;
|
||||||
|
|
||||||
gboolean silent;
|
gboolean silent;
|
||||||
gchar *last_message;
|
gchar *last_message;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstTeeClass
|
struct _GstTeeClass {
|
||||||
{
|
|
||||||
GstElementClass parent_class;
|
GstElementClass parent_class;
|
||||||
};
|
};
|
||||||
|
|
||||||
GType gst_tee_get_type (void);
|
GType gst_tee_get_type (void);
|
||||||
|
|
||||||
gboolean gst_tee_factory_init (GstElementFactory * factory);
|
gboolean gst_tee_factory_init (GstElementFactory *factory);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GST_TEE_H__ */
|
#endif /* __GST_TEE_H__ */
|
||||||
|
|
|
@ -29,44 +29,48 @@
|
||||||
#include "gstbufferstore.h"
|
#include "gstbufferstore.h"
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define GST_TYPE_TYPE_FIND_ELEMENT (gst_type_find_element_get_type ())
|
#define GST_TYPE_TYPE_FIND_ELEMENT (gst_type_find_element_get_type ())
|
||||||
#define GST_TYPE_FIND_ELEMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_TYPE_FIND_ELEMENT, GstTypeFindElement))
|
#define GST_TYPE_FIND_ELEMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_TYPE_FIND_ELEMENT, GstTypeFindElement))
|
||||||
#define GST_IS_TYPE_FIND_ELEMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_TYPE_FIND_ELEMENT))
|
#define GST_IS_TYPE_FIND_ELEMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_TYPE_FIND_ELEMENT))
|
||||||
#define GST_TYPE_FIND_ELEMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_TYPE_FIND_ELEMENT, GstTypeFindElementClass))
|
#define GST_TYPE_FIND_ELEMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_TYPE_FIND_ELEMENT, GstTypeFindElementClass))
|
||||||
#define GST_IS_TYPE_FIND_ELEMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_TYPE_FIND_ELEMENT))
|
#define GST_IS_TYPE_FIND_ELEMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_TYPE_FIND_ELEMENT))
|
||||||
#define GST_TYPE_FIND_ELEMENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_TYPE_FIND_ELEMENT, GstTypeFindElementClass))
|
#define GST_TYPE_FIND_ELEMENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_TYPE_FIND_ELEMENT, GstTypeFindElementClass))
|
||||||
typedef struct _GstTypeFindElement GstTypeFindElement;
|
|
||||||
typedef struct _GstTypeFindElementClass GstTypeFindElementClass;
|
|
||||||
|
|
||||||
struct _GstTypeFindElement
|
typedef struct _GstTypeFindElement GstTypeFindElement;
|
||||||
{
|
typedef struct _GstTypeFindElementClass GstTypeFindElementClass;
|
||||||
GstElement element;
|
|
||||||
|
|
||||||
GstPad *sink;
|
struct _GstTypeFindElement {
|
||||||
GstPad *src;
|
GstElement element;
|
||||||
|
|
||||||
guint min_probability;
|
GstPad * sink;
|
||||||
guint max_probability;
|
GstPad * src;
|
||||||
GstCaps *caps;
|
|
||||||
|
|
||||||
guint mode;
|
guint min_probability;
|
||||||
GstBufferStore *store;
|
guint max_probability;
|
||||||
guint64 stream_length;
|
GstCaps * caps;
|
||||||
gboolean stream_length_available;
|
|
||||||
|
|
||||||
GList *possibilities;
|
guint mode;
|
||||||
|
GstBufferStore * store;
|
||||||
|
guint64 stream_length;
|
||||||
|
gboolean stream_length_available;
|
||||||
|
|
||||||
|
GList * possibilities;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstTypeFindElementClass
|
struct _GstTypeFindElementClass {
|
||||||
{
|
GstElementClass parent_class;
|
||||||
GstElementClass parent_class;
|
|
||||||
|
|
||||||
/* signals */
|
/* signals */
|
||||||
void (*have_type) (GstTypeFindElement * element,
|
void (*have_type) (GstTypeFindElement *element,
|
||||||
guint probability, const GstCaps * caps);
|
guint probability,
|
||||||
|
const GstCaps * caps);
|
||||||
};
|
};
|
||||||
|
|
||||||
GType gst_type_find_element_get_type (void);
|
GType gst_type_find_element_get_type (void);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GST_TYPE_FIND_ELEMENT_H__ */
|
#endif /* __GST_TYPE_FIND_ELEMENT_H__ */
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
#ifndef __GST_I18N_APP_H__
|
#ifndef __GST_I18N_APP_H__
|
||||||
#define __GST_I18N_APP_H__
|
#define __GST_I18N_APP_H__
|
||||||
|
|
||||||
#include "gettext.h" /* included with gettext distribution and copied */
|
#include "gettext.h" /* included with gettext distribution and copied */
|
||||||
|
|
||||||
/* we want to use shorthand _() for translating and N_() for marking */
|
/* we want to use shorthand _() for translating and N_() for marking */
|
||||||
#define _(String) gettext (String)
|
#define _(String) gettext (String)
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
#ifndef __GST_I18N_LIB_H__
|
#ifndef __GST_I18N_LIB_H__
|
||||||
#define __GST_I18N_LIB_H__
|
#define __GST_I18N_LIB_H__
|
||||||
|
|
||||||
#include "gettext.h" /* included with gettext distribution and copied */
|
#include "gettext.h" /* included with gettext distribution and copied */
|
||||||
|
|
||||||
#ifndef GETTEXT_PACKAGE
|
#ifndef GETTEXT_PACKAGE
|
||||||
#error You must define GETTEXT_PACKAGE before including this header.
|
#error You must define GETTEXT_PACKAGE before including this header.
|
||||||
|
|
27
gst/gst.h
27
gst/gst.h
|
@ -69,26 +69,31 @@
|
||||||
#include <gst/gstcompat.h>
|
#include <gst/gstcompat.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
/* make our own type for poptOption because the struct poptOption
|
/* make our own type for poptOption because the struct poptOption
|
||||||
* definition is iffy */
|
* definition is iffy */
|
||||||
typedef struct poptOption GstPoptOption;
|
typedef struct poptOption GstPoptOption;
|
||||||
|
|
||||||
/* initialize GST */
|
/* initialize GST */
|
||||||
void gst_init (int *argc, char **argv[]);
|
void gst_init (int *argc, char **argv[]);
|
||||||
gboolean gst_init_check (int *argc, char **argv[]);
|
gboolean gst_init_check (int *argc, char **argv[]);
|
||||||
void gst_init_with_popt_table (int *argc, char **argv[],
|
void gst_init_with_popt_table (int *argc, char **argv[],
|
||||||
const GstPoptOption * popt_options);
|
const GstPoptOption
|
||||||
gboolean gst_init_check_with_popt_table (int *argc, char **argv[],
|
*popt_options);
|
||||||
const GstPoptOption * popt_options);
|
gboolean gst_init_check_with_popt_table (int *argc, char **argv[],
|
||||||
|
const GstPoptOption
|
||||||
|
*popt_options);
|
||||||
|
|
||||||
const GstPoptOption *gst_init_get_popt_table (void);
|
const GstPoptOption * gst_init_get_popt_table (void);
|
||||||
|
|
||||||
void gst_use_threads (gboolean use_threads);
|
void gst_use_threads (gboolean use_threads);
|
||||||
gboolean gst_has_threads (void);
|
gboolean gst_has_threads (void);
|
||||||
|
|
||||||
void gst_main (void);
|
void gst_main (void);
|
||||||
void gst_main_quit (void);
|
void gst_main_quit (void);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#include <gst/gstlog.h>
|
#include <gst/gstlog.h>
|
||||||
|
|
||||||
#endif /* __GST_H__ */
|
#endif /* __GST_H__ */
|
||||||
|
|
|
@ -47,18 +47,17 @@
|
||||||
|
|
||||||
#define GST_ARCH_SET_SP(stackpointer) \
|
#define GST_ARCH_SET_SP(stackpointer) \
|
||||||
__asm__("lwz r1,%0" : : "m"(stackpointer))
|
__asm__("lwz r1,%0" : : "m"(stackpointer))
|
||||||
|
|
||||||
#define GST_ARCH_CALL(target) \
|
#define GST_ARCH_CALL(target) \
|
||||||
__asm__( "mr r0,%0\n\t" \
|
__asm__( "mr r0,%0\n\t" \
|
||||||
"mtlr r0\n\t" \
|
"mtlr r0\n\t" \
|
||||||
"blrl" : : "r"(target) );
|
"blrl" : : "r"(target) );
|
||||||
|
|
||||||
struct minimal_ppc_stackframe
|
struct minimal_ppc_stackframe {
|
||||||
{
|
unsigned long back_chain;
|
||||||
unsigned long back_chain;
|
unsigned long LR_save;
|
||||||
unsigned long LR_save;
|
unsigned long unused1;
|
||||||
unsigned long unused1;
|
unsigned long unused2;
|
||||||
unsigned long unused2;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#define GST_ARCH_SETUP_STACK(sp) \
|
#define GST_ARCH_SETUP_STACK(sp) \
|
||||||
|
@ -80,12 +79,11 @@ struct minimal_ppc_stackframe
|
||||||
/* Need to get more information about the stackframe format
|
/* Need to get more information about the stackframe format
|
||||||
* and get the fields more correct. Check GDB sources maybe?
|
* and get the fields more correct. Check GDB sources maybe?
|
||||||
*/
|
*/
|
||||||
struct minimal_stackframe
|
struct minimal_stackframe {
|
||||||
{
|
unsigned long back_chain;
|
||||||
unsigned long back_chain;
|
unsigned long LR_save;
|
||||||
unsigned long LR_save;
|
unsigned long unused1;
|
||||||
unsigned long unused1;
|
unsigned long unused2;
|
||||||
unsigned long unused2;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#define GST_ARCH_SETUP_STACK(sp) \
|
#define GST_ARCH_SETUP_STACK(sp) \
|
||||||
|
@ -143,7 +141,7 @@ struct minimal_stackframe
|
||||||
|
|
||||||
/* assuming the stackframe is 16 bytes */
|
/* assuming the stackframe is 16 bytes */
|
||||||
#define GST_ARCH_SETUP_STACK(sp) sp -= 4
|
#define GST_ARCH_SETUP_STACK(sp) sp -= 4
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/***** HP-PA *****/
|
/***** HP-PA *****/
|
||||||
|
@ -169,12 +167,11 @@ struct minimal_stackframe
|
||||||
#define GST_ARCH_CALL(target) \
|
#define GST_ARCH_CALL(target) \
|
||||||
__asm__( "basr 14,%0" : : "a"(target) );
|
__asm__( "basr 14,%0" : : "a"(target) );
|
||||||
|
|
||||||
struct minimal_s390_stackframe
|
struct minimal_s390_stackframe {
|
||||||
{
|
unsigned long back_chain;
|
||||||
unsigned long back_chain;
|
unsigned long reserved;
|
||||||
unsigned long reserved;
|
unsigned long greg[14];
|
||||||
unsigned long greg[14];
|
double freg[4];
|
||||||
double freg[4];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#define GST_ARCH_SETUP_STACK(sp) \
|
#define GST_ARCH_SETUP_STACK(sp) \
|
||||||
|
|
|
@ -22,25 +22,27 @@
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS typedef volatile gint gst_vgint; /* gtk-doc volatile workaround */
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
typedef volatile gint gst_vgint; /* gtk-doc volatile workaround */
|
||||||
|
|
||||||
typedef struct _GstAtomicInt GstAtomicInt;
|
typedef struct _GstAtomicInt GstAtomicInt;
|
||||||
|
|
||||||
struct _GstAtomicInt
|
struct _GstAtomicInt {
|
||||||
{
|
gst_vgint counter;
|
||||||
gst_vgint counter;
|
GMutex *lock; /* for C fallback */
|
||||||
GMutex *lock; /* for C fallback */
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
void gst_atomic_int_init (GstAtomicInt * aint, gint val);
|
void gst_atomic_int_init (GstAtomicInt *aint, gint val);
|
||||||
void gst_atomic_int_destroy (GstAtomicInt * aint);
|
void gst_atomic_int_destroy (GstAtomicInt *aint);
|
||||||
void gst_atomic_int_set (GstAtomicInt * aint, gint val);
|
void gst_atomic_int_set (GstAtomicInt *aint, gint val);
|
||||||
gint gst_atomic_int_read (GstAtomicInt * aint);
|
gint gst_atomic_int_read (GstAtomicInt *aint);
|
||||||
void gst_atomic_int_add (GstAtomicInt * aint, gint val);
|
void gst_atomic_int_add (GstAtomicInt *aint, gint val);
|
||||||
void gst_atomic_int_inc (GstAtomicInt * aint);
|
void gst_atomic_int_inc (GstAtomicInt *aint);
|
||||||
gboolean gst_atomic_int_dec_and_test (GstAtomicInt * aint);
|
gboolean gst_atomic_int_dec_and_test (GstAtomicInt *aint);
|
||||||
|
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GST_ATOMIC_H__ */
|
#endif /* __GST_ATOMIC_H__ */
|
||||||
|
|
|
@ -34,62 +34,57 @@
|
||||||
#include "gstmacros.h"
|
#include "gstmacros.h"
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#if defined (GST_CAN_INLINE) || defined (__GST_ATOMIC_C__)
|
#if defined (GST_CAN_INLINE) || defined (__GST_ATOMIC_C__)
|
||||||
|
|
||||||
/***** Intel x86 *****/
|
/***** Intel x86 *****/
|
||||||
#if defined (HAVE_CPU_I386) && defined(__GNUC__)
|
#if defined (HAVE_CPU_I386) && defined(__GNUC__)
|
||||||
|
|
||||||
#ifdef GST_CONFIG_NO_SMP
|
#ifdef GST_CONFIG_NO_SMP
|
||||||
#define SMP_LOCK ""
|
#define SMP_LOCK ""
|
||||||
#else
|
#else
|
||||||
#define SMP_LOCK "lock ; "
|
#define SMP_LOCK "lock ; "
|
||||||
#endif
|
#endif
|
||||||
GST_INLINE_FUNC void
|
|
||||||
gst_atomic_int_init (GstAtomicInt * aint, gint val)
|
|
||||||
{
|
|
||||||
aint->counter = val;
|
|
||||||
}
|
|
||||||
GST_INLINE_FUNC void
|
|
||||||
gst_atomic_int_destroy (GstAtomicInt * aint)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
GST_INLINE_FUNC void
|
|
||||||
gst_atomic_int_set (GstAtomicInt * aint, gint val)
|
|
||||||
{
|
|
||||||
aint->counter = val;
|
|
||||||
}
|
|
||||||
GST_INLINE_FUNC gint
|
|
||||||
gst_atomic_int_read (GstAtomicInt * aint)
|
|
||||||
{
|
|
||||||
return aint->counter;
|
|
||||||
}
|
|
||||||
|
|
||||||
GST_INLINE_FUNC void
|
GST_INLINE_FUNC void gst_atomic_int_init (GstAtomicInt *aint, gint val) { aint->counter = val; }
|
||||||
gst_atomic_int_add (GstAtomicInt * aint, gint val)
|
GST_INLINE_FUNC void gst_atomic_int_destroy (GstAtomicInt *aint) { }
|
||||||
|
GST_INLINE_FUNC void gst_atomic_int_set (GstAtomicInt *aint, gint val) { aint->counter = val; }
|
||||||
|
GST_INLINE_FUNC gint gst_atomic_int_read (GstAtomicInt *aint) { return aint->counter; }
|
||||||
|
|
||||||
|
GST_INLINE_FUNC void
|
||||||
|
gst_atomic_int_add (GstAtomicInt *aint, gint val)
|
||||||
{
|
{
|
||||||
__asm__ __volatile__ (SMP_LOCK "addl %1,%0":"=m" (aint->counter)
|
__asm__ __volatile__(
|
||||||
|
SMP_LOCK "addl %1,%0"
|
||||||
|
:"=m" (aint->counter)
|
||||||
:"ir" (val), "m" (aint->counter));
|
:"ir" (val), "m" (aint->counter));
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_INLINE_FUNC void
|
GST_INLINE_FUNC void
|
||||||
gst_atomic_int_inc (GstAtomicInt * aint)
|
gst_atomic_int_inc (GstAtomicInt *aint)
|
||||||
{
|
{
|
||||||
__asm__ __volatile__ (SMP_LOCK "incl %0":"=m" (aint->counter)
|
__asm__ __volatile__(
|
||||||
|
SMP_LOCK "incl %0"
|
||||||
|
:"=m" (aint->counter)
|
||||||
:"m" (aint->counter));
|
:"m" (aint->counter));
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_INLINE_FUNC gboolean
|
GST_INLINE_FUNC gboolean
|
||||||
gst_atomic_int_dec_and_test (GstAtomicInt * aint)
|
gst_atomic_int_dec_and_test (GstAtomicInt *aint)
|
||||||
{
|
{
|
||||||
guchar res;
|
guchar res;
|
||||||
|
|
||||||
__asm__ __volatile__ (SMP_LOCK "decl %0; sete %1":"=m" (aint->counter),
|
__asm__ __volatile__(
|
||||||
"=qm" (res)
|
SMP_LOCK "decl %0; sete %1"
|
||||||
:"m" (aint->counter):"memory");
|
:"=m" (aint->counter), "=qm" (res)
|
||||||
|
:"m" (aint->counter) : "memory");
|
||||||
|
|
||||||
return res != 0;
|
return res != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/***** PowerPC *****/
|
/***** PowerPC *****/
|
||||||
#elif defined (HAVE_CPU_PPC) && defined(__GNUC__)
|
#elif defined (HAVE_CPU_PPC) && defined(__GNUC__)
|
||||||
|
|
||||||
#ifdef GST_CONFIG_NO_SMP
|
#ifdef GST_CONFIG_NO_SMP
|
||||||
#define SMP_SYNC ""
|
#define SMP_SYNC ""
|
||||||
#define SMP_ISYNC
|
#define SMP_ISYNC
|
||||||
|
@ -97,6 +92,7 @@ gst_atomic_int_dec_and_test (GstAtomicInt * aint)
|
||||||
#define SMP_SYNC "\tsync\n"
|
#define SMP_SYNC "\tsync\n"
|
||||||
#define SMP_ISYNC "\tisync\n"
|
#define SMP_ISYNC "\tisync\n"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Erratum #77 on the 405 means we need a sync or dcbt before every stwcx.
|
/* Erratum #77 on the 405 means we need a sync or dcbt before every stwcx.
|
||||||
* The old ATOMIC_SYNC_FIX covered some but not all of this.
|
* The old ATOMIC_SYNC_FIX covered some but not all of this.
|
||||||
*/
|
*/
|
||||||
|
@ -105,123 +101,111 @@ gst_atomic_int_dec_and_test (GstAtomicInt * aint)
|
||||||
#else
|
#else
|
||||||
#define PPC405_ERR77(ra,rb)
|
#define PPC405_ERR77(ra,rb)
|
||||||
#endif
|
#endif
|
||||||
GST_INLINE_FUNC void
|
|
||||||
gst_atomic_int_init (GstAtomicInt * aint, gint val)
|
|
||||||
{
|
|
||||||
aint->counter = val;
|
|
||||||
}
|
|
||||||
GST_INLINE_FUNC void
|
|
||||||
gst_atomic_int_destroy (GstAtomicInt * aint)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
GST_INLINE_FUNC void
|
|
||||||
gst_atomic_int_set (GstAtomicInt * aint, gint val)
|
|
||||||
{
|
|
||||||
aint->counter = val;
|
|
||||||
}
|
|
||||||
GST_INLINE_FUNC gint
|
|
||||||
gst_atomic_int_read (GstAtomicInt * aint)
|
|
||||||
{
|
|
||||||
return aint->counter;
|
|
||||||
}
|
|
||||||
|
|
||||||
GST_INLINE_FUNC void
|
GST_INLINE_FUNC void gst_atomic_int_init (GstAtomicInt *aint, gint val) { aint->counter = val; }
|
||||||
gst_atomic_int_add (GstAtomicInt * aint, gint val)
|
GST_INLINE_FUNC void gst_atomic_int_destroy (GstAtomicInt *aint) { }
|
||||||
|
GST_INLINE_FUNC void gst_atomic_int_set (GstAtomicInt *aint, gint val) { aint->counter = val; }
|
||||||
|
GST_INLINE_FUNC gint gst_atomic_int_read (GstAtomicInt *aint) { return aint->counter; }
|
||||||
|
|
||||||
|
GST_INLINE_FUNC void
|
||||||
|
gst_atomic_int_add (GstAtomicInt *aint, gint val)
|
||||||
{
|
{
|
||||||
int t;
|
int t;
|
||||||
|
|
||||||
__asm__ __volatile__ ("1: lwarx %0,0,%3\n"
|
__asm__ __volatile__(
|
||||||
" add %0,%2,%0\n" PPC405_ERR77 (0, %3)
|
"1: lwarx %0,0,%3\n"
|
||||||
" stwcx. %0,0,%3 \n"
|
" add %0,%2,%0\n"
|
||||||
" bne- 1b\n":"=&r" (t), "=m" (aint->counter)
|
PPC405_ERR77(0,%3)
|
||||||
:"r" (val), "r" (&aint->counter), "m" (aint->counter)
|
" stwcx. %0,0,%3 \n"
|
||||||
:"cc");
|
" bne- 1b\n"
|
||||||
|
: "=&r" (t), "=m" (aint->counter)
|
||||||
|
: "r" (val), "r" (&aint->counter), "m" (aint->counter)
|
||||||
|
: "cc");
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_INLINE_FUNC void
|
GST_INLINE_FUNC void
|
||||||
gst_atomic_int_inc (GstAtomicInt * aint)
|
gst_atomic_int_inc (GstAtomicInt *aint)
|
||||||
{
|
{
|
||||||
int t;
|
int t;
|
||||||
|
|
||||||
__asm__ __volatile__ ("1: lwarx %0,0,%2\n"
|
__asm__ __volatile__(
|
||||||
" addic %0,%0,1\n" PPC405_ERR77 (0, %2)
|
"1: lwarx %0,0,%2\n"
|
||||||
" stwcx. %0,0,%2\n"
|
" addic %0,%0,1\n"
|
||||||
" bne- 1b\n":"=&r" (t), "=m" (aint->counter)
|
PPC405_ERR77(0,%2)
|
||||||
:"r" (&aint->counter), "m" (aint->counter)
|
" stwcx. %0,0,%2\n"
|
||||||
:"cc");
|
" bne- 1b\n"
|
||||||
|
: "=&r" (t), "=m" (aint->counter)
|
||||||
|
: "r" (&aint->counter), "m" (aint->counter)
|
||||||
|
: "cc");
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_INLINE_FUNC gboolean
|
GST_INLINE_FUNC gboolean
|
||||||
gst_atomic_int_dec_and_test (GstAtomicInt * aint)
|
gst_atomic_int_dec_and_test (GstAtomicInt *aint)
|
||||||
{
|
{
|
||||||
int t;
|
int t;
|
||||||
|
|
||||||
__asm__ __volatile__ ("1: lwarx %0,0,%1\n"
|
__asm__ __volatile__(
|
||||||
" addic %0,%0,-1\n" PPC405_ERR77 (0, %1)
|
"1: lwarx %0,0,%1\n"
|
||||||
" stwcx. %0,0,%1\n" " bne- 1b\n" SMP_ISYNC:"=&r" (t)
|
" addic %0,%0,-1\n"
|
||||||
:"r" (&aint->counter)
|
PPC405_ERR77(0,%1)
|
||||||
:"cc", "memory");
|
" stwcx. %0,0,%1\n"
|
||||||
|
" bne- 1b\n"
|
||||||
|
SMP_ISYNC
|
||||||
|
: "=&r" (t)
|
||||||
|
: "r" (&aint->counter)
|
||||||
|
: "cc", "memory");
|
||||||
|
|
||||||
return t == 0;
|
return t == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/***** DEC[/Compaq/HP?/Intel?] Alpha *****/
|
/***** DEC[/Compaq/HP?/Intel?] Alpha *****/
|
||||||
#elif defined(HAVE_CPU_ALPHA) && defined(__GNUC__)
|
#elif defined(HAVE_CPU_ALPHA) && defined(__GNUC__)
|
||||||
GST_INLINE_FUNC void
|
|
||||||
gst_atomic_int_init (GstAtomicInt * aint, gint val)
|
|
||||||
{
|
|
||||||
aint->counter = val;
|
|
||||||
}
|
|
||||||
GST_INLINE_FUNC void
|
|
||||||
gst_atomic_int_destroy (GstAtomicInt * aint)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
GST_INLINE_FUNC void
|
|
||||||
gst_atomic_int_set (GstAtomicInt * aint, gint val)
|
|
||||||
{
|
|
||||||
aint->counter = val;
|
|
||||||
}
|
|
||||||
GST_INLINE_FUNC gint
|
|
||||||
gst_atomic_int_read (GstAtomicInt * aint)
|
|
||||||
{
|
|
||||||
return aint->counter;
|
|
||||||
}
|
|
||||||
|
|
||||||
GST_INLINE_FUNC void
|
GST_INLINE_FUNC void gst_atomic_int_init (GstAtomicInt *aint, gint val) { aint->counter = val; }
|
||||||
gst_atomic_int_add (GstAtomicInt * aint, gint val)
|
GST_INLINE_FUNC void gst_atomic_int_destroy (GstAtomicInt *aint) { }
|
||||||
|
GST_INLINE_FUNC void gst_atomic_int_set (GstAtomicInt *aint, gint val) { aint->counter = val; }
|
||||||
|
GST_INLINE_FUNC gint gst_atomic_int_read (GstAtomicInt *aint) { return aint->counter; }
|
||||||
|
|
||||||
|
GST_INLINE_FUNC void
|
||||||
|
gst_atomic_int_add (GstAtomicInt *aint, gint val)
|
||||||
{
|
{
|
||||||
unsigned long temp;
|
unsigned long temp;
|
||||||
|
|
||||||
__asm__ __volatile__ ("1: ldl_l %0,%1\n"
|
__asm__ __volatile__(
|
||||||
" addl %0,%2,%0\n"
|
"1: ldl_l %0,%1\n"
|
||||||
" stl_c %0,%1\n"
|
" addl %0,%2,%0\n"
|
||||||
" beq %0,2f\n"
|
" stl_c %0,%1\n"
|
||||||
".subsection 2\n"
|
" beq %0,2f\n"
|
||||||
"2: br 1b\n" ".previous":"=&r" (temp), "=m" (aint->counter)
|
".subsection 2\n"
|
||||||
|
"2: br 1b\n"
|
||||||
|
".previous"
|
||||||
|
:"=&r" (temp), "=m" (aint->counter)
|
||||||
:"Ir" (val), "m" (aint->counter));
|
:"Ir" (val), "m" (aint->counter));
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_INLINE_FUNC void
|
GST_INLINE_FUNC void
|
||||||
gst_atomic_int_inc (GstAtomicInt * aint)
|
gst_atomic_int_inc (GstAtomicInt *aint)
|
||||||
{
|
{
|
||||||
gst_atomic_int_add (aint, 1);
|
gst_atomic_int_add (aint, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_INLINE_FUNC gboolean
|
GST_INLINE_FUNC gboolean
|
||||||
gst_atomic_int_dec_and_test (GstAtomicInt * aint)
|
gst_atomic_int_dec_and_test (GstAtomicInt *aint)
|
||||||
{
|
{
|
||||||
long temp, result;
|
long temp, result;
|
||||||
int val = 1;
|
int val = 1;
|
||||||
__asm__ __volatile__ ("1: ldl_l %0,%1\n"
|
__asm__ __volatile__(
|
||||||
" subl %0,%3,%2\n"
|
"1: ldl_l %0,%1\n"
|
||||||
" subl %0,%3,%0\n"
|
" subl %0,%3,%2\n"
|
||||||
" stl_c %0,%1\n"
|
" subl %0,%3,%0\n"
|
||||||
" beq %0,2f\n"
|
" stl_c %0,%1\n"
|
||||||
" mb\n"
|
" beq %0,2f\n"
|
||||||
".subsection 2\n"
|
" mb\n"
|
||||||
"2: br 1b\n"
|
".subsection 2\n"
|
||||||
".previous":"=&r" (temp), "=m" (aint->counter), "=&r" (result)
|
"2: br 1b\n"
|
||||||
:"Ir" (val), "m" (aint->counter):"memory");
|
".previous"
|
||||||
|
:"=&r" (temp), "=m" (aint->counter), "=&r" (result)
|
||||||
|
:"Ir" (val), "m" (aint->counter) : "memory");
|
||||||
|
|
||||||
return result == 0;
|
return result == 0;
|
||||||
}
|
}
|
||||||
|
@ -229,38 +213,16 @@ gst_atomic_int_dec_and_test (GstAtomicInt * aint)
|
||||||
/***** Sun SPARC *****/
|
/***** Sun SPARC *****/
|
||||||
#elif 0 && defined(HAVE_CPU_SPARC) && defined(__GNUC__)
|
#elif 0 && defined(HAVE_CPU_SPARC) && defined(__GNUC__)
|
||||||
/* allegedly broken again */
|
/* allegedly broken again */
|
||||||
GST_INLINE_FUNC void
|
|
||||||
gst_atomic_int_destroy (GstAtomicInt * aint)
|
GST_INLINE_FUNC void gst_atomic_int_destroy (GstAtomicInt *aint) { }
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef GST_CONFIG_NO_SMP
|
#ifdef GST_CONFIG_NO_SMP
|
||||||
GST_INLINE_FUNC void
|
GST_INLINE_FUNC void gst_atomic_int_init (GstAtomicInt *aint, gint val) { aint->counter = val; }
|
||||||
gst_atomic_int_init (GstAtomicInt * aint, gint val)
|
GST_INLINE_FUNC void gst_atomic_int_set (GstAtomicInt *aint, gint val) { aint->counter = val; }
|
||||||
{
|
GST_INLINE_FUNC gint gst_atomic_int_read (GstAtomicInt *aint) { return aint->counter; }
|
||||||
aint->counter = val;
|
|
||||||
}
|
|
||||||
GST_INLINE_FUNC void
|
|
||||||
gst_atomic_int_set (GstAtomicInt * aint, gint val)
|
|
||||||
{
|
|
||||||
aint->counter = val;
|
|
||||||
}
|
|
||||||
GST_INLINE_FUNC gint
|
|
||||||
gst_atomic_int_read (GstAtomicInt * aint)
|
|
||||||
{
|
|
||||||
return aint->counter;
|
|
||||||
}
|
|
||||||
#else
|
#else
|
||||||
GST_INLINE_FUNC void
|
GST_INLINE_FUNC void gst_atomic_int_init (GstAtomicInt *aint, gint val) { aint->counter = (val<<8); }
|
||||||
gst_atomic_int_init (GstAtomicInt * aint, gint val)
|
GST_INLINE_FUNC void gst_atomic_int_set (GstAtomicInt *aint, gint val) { aint->counter = (val<<8); }
|
||||||
{
|
|
||||||
aint->counter = (val << 8);
|
|
||||||
}
|
|
||||||
GST_INLINE_FUNC void
|
|
||||||
gst_atomic_int_set (GstAtomicInt * aint, gint val)
|
|
||||||
{
|
|
||||||
aint->counter = (val << 8);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* For SMP the trick is you embed the spin lock byte within
|
* For SMP the trick is you embed the spin lock byte within
|
||||||
|
@ -273,8 +235,8 @@ gst_atomic_int_set (GstAtomicInt * aint, gint val)
|
||||||
* 31 8 7 0
|
* 31 8 7 0
|
||||||
*/
|
*/
|
||||||
GST_INLINE_FUNC gint
|
GST_INLINE_FUNC gint
|
||||||
gst_atomic_int_read (GstAtomicInt * aint)
|
gst_atomic_int_read (GstAtomicInt *aint)
|
||||||
{
|
{
|
||||||
int ret = aint->counter;
|
int ret = aint->counter;
|
||||||
|
|
||||||
while (ret & 0xff)
|
while (ret & 0xff)
|
||||||
|
@ -284,8 +246,8 @@ gst_atomic_int_read (GstAtomicInt * aint)
|
||||||
}
|
}
|
||||||
#endif /* GST_CONFIG_NO_SMP */
|
#endif /* GST_CONFIG_NO_SMP */
|
||||||
|
|
||||||
GST_INLINE_FUNC void
|
GST_INLINE_FUNC void
|
||||||
gst_atomic_int_add (GstAtomicInt * aint, gint val)
|
gst_atomic_int_add (GstAtomicInt *aint, gint val)
|
||||||
{
|
{
|
||||||
volatile int increment, *ptr;
|
volatile int increment, *ptr;
|
||||||
int lock = 1;
|
int lock = 1;
|
||||||
|
@ -294,28 +256,41 @@ gst_atomic_int_add (GstAtomicInt * aint, gint val)
|
||||||
ptr = &(aint->counter);
|
ptr = &(aint->counter);
|
||||||
|
|
||||||
#if __GNUC__ > 3 || (__GNUC__ >=3 && __GNUC_MINOR__ >= 2)
|
#if __GNUC__ > 3 || (__GNUC__ >=3 && __GNUC_MINOR__ >= 2)
|
||||||
__asm__ __volatile__ ("1: ldstub [%[ptr] + 3], %[lock]\n" "\torcc %[lock], 0, %[ignore]\n" "\tbne 1b\n" /* go back until we have the lock */
|
__asm__ __volatile__("1: ldstub [%[ptr] + 3], %[lock]\n"
|
||||||
"\tld [%[ptr]], %[inc]\n" "\tsra %[inc], 8, %[inc]\n" "\tadd %[inc], %[val], %[inc]\n" "\tsll %[inc], 8, %[lock]\n" "\tst %[lock],[%[ptr]]\n" /* Release the lock */
|
"\torcc %[lock], 0, %[ignore]\n"
|
||||||
:[inc] "=&r" (increment),[lock] "=r" (lock),[ignore] "=&r" (ignore)
|
"\tbne 1b\n" /* go back until we have the lock */
|
||||||
:"0" (increment),[ptr] "r" (ptr),[val] "r" (val)
|
"\tld [%[ptr]], %[inc]\n"
|
||||||
);
|
"\tsra %[inc], 8, %[inc]\n"
|
||||||
|
"\tadd %[inc], %[val], %[inc]\n"
|
||||||
|
"\tsll %[inc], 8, %[lock]\n"
|
||||||
|
"\tst %[lock],[%[ptr]]\n" /* Release the lock */
|
||||||
|
: [inc] "=&r" (increment), [lock] "=r" (lock),
|
||||||
|
[ignore] "=&r" (ignore)
|
||||||
|
: "0" (increment), [ptr] "r" (ptr), [val] "r" (val)
|
||||||
|
);
|
||||||
#else
|
#else
|
||||||
__asm__ __volatile__ ("1: ldstub [%4 + 3], %1\n" "\torcc %1, 0, %2\n" "\tbne 1b\n" /* go back until we have the lock */
|
__asm__ __volatile__("1: ldstub [%4 + 3], %1\n"
|
||||||
"\tld [%4], %0\n" "\tsra %0, 8, %0\n" "\tadd %0, %5, %0\n" "\tsll %0, 8, %1\n" "\tst %1,[%4]\n" /* Release the lock */
|
"\torcc %1, 0, %2\n"
|
||||||
:"=&r" (increment), "=r" (lock), "=&r" (ignore)
|
"\tbne 1b\n" /* go back until we have the lock */
|
||||||
:"0" (increment), "r" (ptr), "r" (val)
|
"\tld [%4], %0\n"
|
||||||
);
|
"\tsra %0, 8, %0\n"
|
||||||
|
"\tadd %0, %5, %0\n"
|
||||||
|
"\tsll %0, 8, %1\n"
|
||||||
|
"\tst %1,[%4]\n" /* Release the lock */
|
||||||
|
: "=&r" (increment), "=r" (lock), "=&r" (ignore)
|
||||||
|
: "0" (increment), "r" (ptr), "r" (val)
|
||||||
|
);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_INLINE_FUNC void
|
GST_INLINE_FUNC void
|
||||||
gst_atomic_int_inc (GstAtomicInt * aint)
|
gst_atomic_int_inc (GstAtomicInt *aint)
|
||||||
{
|
{
|
||||||
gst_atomic_int_add (aint, 1);
|
gst_atomic_int_add (aint, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_INLINE_FUNC gboolean
|
GST_INLINE_FUNC gboolean
|
||||||
gst_atomic_int_dec_and_test (GstAtomicInt * aint)
|
gst_atomic_int_dec_and_test (GstAtomicInt *aint)
|
||||||
{
|
{
|
||||||
volatile int increment, *ptr;
|
volatile int increment, *ptr;
|
||||||
int lock = 1;
|
int lock = 1;
|
||||||
|
@ -324,17 +299,30 @@ gst_atomic_int_dec_and_test (GstAtomicInt * aint)
|
||||||
ptr = &aint->counter;
|
ptr = &aint->counter;
|
||||||
|
|
||||||
#if __GNUC__ > 3 || (__GNUC__ >=3 && __GNUC_MINOR__ >= 2)
|
#if __GNUC__ > 3 || (__GNUC__ >=3 && __GNUC_MINOR__ >= 2)
|
||||||
__asm__ __volatile__ ("1: ldstub [%[ptr] + 3], %[lock]\n" "\torcc %[lock], 0, %[ignore]\n" "\tbne 1b\n" /* go back until we have the lock */
|
__asm__ __volatile__("1: ldstub [%[ptr] + 3], %[lock]\n"
|
||||||
"\tld [%[ptr]], %[inc]\n" "\tsra %[inc], 8, %[inc]\n" "\tsub %[inc], 1, %[inc]\n" "\tsll %[inc], 8, %[lock]\n" "\tst %[lock],[%[ptr]]\n" /* Release the lock */
|
"\torcc %[lock], 0, %[ignore]\n"
|
||||||
:[inc] "=&r" (increment),[lock] "=r" (lock),[ignore] "=&r" (ignore)
|
"\tbne 1b\n" /* go back until we have the lock */
|
||||||
:"0" (increment),[ptr] "r" (ptr)
|
"\tld [%[ptr]], %[inc]\n"
|
||||||
);
|
"\tsra %[inc], 8, %[inc]\n"
|
||||||
|
"\tsub %[inc], 1, %[inc]\n"
|
||||||
|
"\tsll %[inc], 8, %[lock]\n"
|
||||||
|
"\tst %[lock],[%[ptr]]\n" /* Release the lock */
|
||||||
|
: [inc] "=&r" (increment), [lock] "=r" (lock),
|
||||||
|
[ignore] "=&r" (ignore)
|
||||||
|
: "0" (increment), [ptr] "r" (ptr)
|
||||||
|
);
|
||||||
#else
|
#else
|
||||||
__asm__ __volatile__ ("1: ldstub [%4 + 3], %1\n" "\torcc %1, 0, %2\n" "\tbne 1b\n" /* go back until we have the lock */
|
__asm__ __volatile__("1: ldstub [%4 + 3], %1\n"
|
||||||
"\tld [%4], %0\n" "\tsra %0, 8, %0\n" "\tsub %0, 1, %0\n" "\tsll %0, 8, %1\n" "\tst %1,[%4]\n" /* Release the lock */
|
"\torcc %1, 0, %2\n"
|
||||||
:"=&r" (increment), "=r" (lock), "=&r" (ignore)
|
"\tbne 1b\n" /* go back until we have the lock */
|
||||||
:"0" (increment), "r" (ptr)
|
"\tld [%4], %0\n"
|
||||||
);
|
"\tsra %0, 8, %0\n"
|
||||||
|
"\tsub %0, 1, %0\n"
|
||||||
|
"\tsll %0, 8, %1\n"
|
||||||
|
"\tst %1,[%4]\n" /* Release the lock */
|
||||||
|
: "=&r" (increment), "=r" (lock), "=&r" (ignore)
|
||||||
|
: "0" (increment), "r" (ptr)
|
||||||
|
);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return increment == 0;
|
return increment == 0;
|
||||||
|
@ -344,94 +332,63 @@ gst_atomic_int_dec_and_test (GstAtomicInt * aint)
|
||||||
/* This is disabled because the asm code is broken on most MIPS
|
/* This is disabled because the asm code is broken on most MIPS
|
||||||
* processors and doesn't generally compile. */
|
* processors and doesn't generally compile. */
|
||||||
#elif defined(HAVE_CPU_MIPS) && defined(__GNUC__) && 0
|
#elif defined(HAVE_CPU_MIPS) && defined(__GNUC__) && 0
|
||||||
GST_INLINE_FUNC void
|
|
||||||
gst_atomic_int_init (GstAtomicInt * aint, gint val)
|
GST_INLINE_FUNC void gst_atomic_int_init (GstAtomicInt *aint, gint val) { aint->counter = val; }
|
||||||
{
|
GST_INLINE_FUNC void gst_atomic_int_destroy (GstAtomicInt *aint) { }
|
||||||
aint->counter = val;
|
GST_INLINE_FUNC void gst_atomic_int_set (GstAtomicInt *aint, gint val) { aint->counter = val; }
|
||||||
}
|
GST_INLINE_FUNC gint gst_atomic_int_read (GstAtomicInt *aint) { return aint->counter; }
|
||||||
GST_INLINE_FUNC void
|
|
||||||
gst_atomic_int_destroy (GstAtomicInt * aint)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
GST_INLINE_FUNC void
|
|
||||||
gst_atomic_int_set (GstAtomicInt * aint, gint val)
|
|
||||||
{
|
|
||||||
aint->counter = val;
|
|
||||||
}
|
|
||||||
GST_INLINE_FUNC gint
|
|
||||||
gst_atomic_int_read (GstAtomicInt * aint)
|
|
||||||
{
|
|
||||||
return aint->counter;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* this only works on MIPS II and better */
|
/* this only works on MIPS II and better */
|
||||||
GST_INLINE_FUNC void
|
GST_INLINE_FUNC void
|
||||||
gst_atomic_int_add (GstAtomicInt * aint, gint val)
|
gst_atomic_int_add (GstAtomicInt *aint, gint val)
|
||||||
{
|
{
|
||||||
unsigned long temp;
|
unsigned long temp;
|
||||||
|
|
||||||
__asm__ __volatile__ ("1: ll %0, %1 # atomic_add\n"
|
__asm__ __volatile__(
|
||||||
" addu %0, %2 \n"
|
"1: ll %0, %1 # atomic_add\n"
|
||||||
" sc %0, %1 \n"
|
" addu %0, %2 \n"
|
||||||
" beqz %0, 1b \n":"=&r" (temp),
|
" sc %0, %1 \n"
|
||||||
"=m" (aint->counter)
|
" beqz %0, 1b \n"
|
||||||
:"Ir" (val), "m" (aint->counter));
|
: "=&r" (temp), "=m" (aint->counter)
|
||||||
|
: "Ir" (val), "m" (aint->counter));
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_INLINE_FUNC void
|
GST_INLINE_FUNC void
|
||||||
gst_atomic_int_inc (GstAtomicInt * aint)
|
gst_atomic_int_inc (GstAtomicInt *aint)
|
||||||
{
|
{
|
||||||
gst_atomic_int_add (aint, 1);
|
gst_atomic_int_add (aint, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_INLINE_FUNC gboolean
|
GST_INLINE_FUNC gboolean
|
||||||
gst_atomic_int_dec_and_test (GstAtomicInt * aint)
|
gst_atomic_int_dec_and_test (GstAtomicInt *aint)
|
||||||
{
|
{
|
||||||
unsigned long temp, result;
|
unsigned long temp, result;
|
||||||
int val = 1;
|
int val = 1;
|
||||||
|
|
||||||
__asm__ __volatile__ (".set push \n"
|
__asm__ __volatile__(
|
||||||
".set noreorder # atomic_sub_return\n"
|
".set push \n"
|
||||||
"1: ll %1, %2 \n"
|
".set noreorder # atomic_sub_return\n"
|
||||||
" subu %0, %1, %3 \n"
|
"1: ll %1, %2 \n"
|
||||||
" sc %0, %2 \n"
|
" subu %0, %1, %3 \n"
|
||||||
" beqz %0, 1b \n"
|
" sc %0, %2 \n"
|
||||||
" subu %0, %1, %3 \n"
|
" beqz %0, 1b \n"
|
||||||
".set pop \n":"=&r" (result),
|
" subu %0, %1, %3 \n"
|
||||||
"=&r" (temp), "=m" (aint->counter)
|
".set pop \n"
|
||||||
:"Ir" (val), "m" (aint->counter)
|
: "=&r" (result), "=&r" (temp), "=m" (aint->counter)
|
||||||
:"memory");
|
: "Ir" (val), "m" (aint->counter)
|
||||||
|
: "memory");
|
||||||
|
|
||||||
return result == 0;
|
return result == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/***** S/390 *****/
|
/***** S/390 *****/
|
||||||
#elif defined(HAVE_CPU_S390) && defined(__GNUC__)
|
#elif defined(HAVE_CPU_S390) && defined(__GNUC__)
|
||||||
typedef struct
|
typedef struct { volatile int counter; } atomic_t __attribute__ ((aligned (4)));
|
||||||
{
|
|
||||||
volatile int counter;
|
|
||||||
}
|
|
||||||
atomic_t __attribute__ ((aligned (4)));
|
|
||||||
|
|
||||||
GST_INLINE_FUNC void
|
GST_INLINE_FUNC void gst_atomic_int_init (GstAtomicInt *aint, gint val) { aint->counter = val; }
|
||||||
gst_atomic_int_init (GstAtomicInt * aint, gint val)
|
GST_INLINE_FUNC void gst_atomic_int_destroy (GstAtomicInt *aint) { }
|
||||||
{
|
GST_INLINE_FUNC void gst_atomic_int_set (GstAtomicInt *aint, gint val) { aint->counter = val; }
|
||||||
aint->counter = val;
|
GST_INLINE_FUNC gint gst_atomic_int_read (GstAtomicInt *aint) { return aint->counter; }
|
||||||
}
|
|
||||||
GST_INLINE_FUNC void
|
|
||||||
gst_atomic_int_destroy (GstAtomicInt * aint)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
GST_INLINE_FUNC void
|
|
||||||
gst_atomic_int_set (GstAtomicInt * aint, gint val)
|
|
||||||
{
|
|
||||||
aint->counter = val;
|
|
||||||
}
|
|
||||||
GST_INLINE_FUNC gint
|
|
||||||
gst_atomic_int_read (GstAtomicInt * aint)
|
|
||||||
{
|
|
||||||
return aint->counter;
|
|
||||||
}
|
|
||||||
|
|
||||||
#define __CS_LOOP(old_val, new_val, ptr, op_val, op_string) \
|
#define __CS_LOOP(old_val, new_val, ptr, op_val, op_string) \
|
||||||
__asm__ __volatile__(" l %0,0(%3)\n" \
|
__asm__ __volatile__(" l %0,0(%3)\n" \
|
||||||
|
@ -443,51 +400,49 @@ gst_atomic_int_read (GstAtomicInt * aint)
|
||||||
"+m" (((atomic_t *)(ptr))->counter) \
|
"+m" (((atomic_t *)(ptr))->counter) \
|
||||||
: "a" (ptr), "d" (op_val) : "cc" );
|
: "a" (ptr), "d" (op_val) : "cc" );
|
||||||
|
|
||||||
GST_INLINE_FUNC void
|
GST_INLINE_FUNC void
|
||||||
gst_atomic_int_add (GstAtomicInt * aint, gint val)
|
gst_atomic_int_add (GstAtomicInt *aint, gint val)
|
||||||
{
|
{
|
||||||
int old_val, new_val;
|
int old_val, new_val;
|
||||||
|
__CS_LOOP(old_val, new_val, aint, val, "ar");
|
||||||
__CS_LOOP (old_val, new_val, aint, val, "ar");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_INLINE_FUNC void
|
GST_INLINE_FUNC void
|
||||||
gst_atomic_int_inc (GstAtomicInt * aint)
|
gst_atomic_int_inc (GstAtomicInt *aint)
|
||||||
{
|
{
|
||||||
int old_val, new_val;
|
int old_val, new_val;
|
||||||
|
__CS_LOOP(old_val, new_val, aint, 1, "ar");
|
||||||
__CS_LOOP (old_val, new_val, aint, 1, "ar");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_INLINE_FUNC gboolean
|
GST_INLINE_FUNC gboolean
|
||||||
gst_atomic_int_dec_and_test (GstAtomicInt * aint)
|
gst_atomic_int_dec_and_test (GstAtomicInt *aint)
|
||||||
{
|
{
|
||||||
int old_val, new_val;
|
int old_val, new_val;
|
||||||
|
__CS_LOOP(old_val, new_val, aint, 1, "sr");
|
||||||
__CS_LOOP (old_val, new_val, aint, 1, "sr");
|
|
||||||
return new_val == 0;
|
return new_val == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
#warning consider putting your architecture specific atomic implementations here
|
#warning consider putting your architecture specific atomic implementations here
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* generic implementation
|
* generic implementation
|
||||||
*/
|
*/
|
||||||
GST_INLINE_FUNC void
|
GST_INLINE_FUNC void
|
||||||
gst_atomic_int_init (GstAtomicInt * aint, gint val)
|
gst_atomic_int_init (GstAtomicInt *aint, gint val)
|
||||||
{
|
{
|
||||||
aint->counter = val;
|
aint->counter = val;
|
||||||
aint->lock = g_mutex_new ();
|
aint->lock = g_mutex_new ();
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_INLINE_FUNC void
|
GST_INLINE_FUNC void
|
||||||
gst_atomic_int_destroy (GstAtomicInt * aint)
|
gst_atomic_int_destroy (GstAtomicInt *aint)
|
||||||
{
|
{
|
||||||
g_mutex_free (aint->lock);
|
g_mutex_free (aint->lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_INLINE_FUNC void
|
GST_INLINE_FUNC void
|
||||||
gst_atomic_int_set (GstAtomicInt * aint, gint val)
|
gst_atomic_int_set (GstAtomicInt *aint, gint val)
|
||||||
{
|
{
|
||||||
g_mutex_lock (aint->lock);
|
g_mutex_lock (aint->lock);
|
||||||
aint->counter = val;
|
aint->counter = val;
|
||||||
|
@ -495,7 +450,7 @@ gst_atomic_int_set (GstAtomicInt * aint, gint val)
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_INLINE_FUNC gint
|
GST_INLINE_FUNC gint
|
||||||
gst_atomic_int_read (GstAtomicInt * aint)
|
gst_atomic_int_read (GstAtomicInt *aint)
|
||||||
{
|
{
|
||||||
gint res;
|
gint res;
|
||||||
|
|
||||||
|
@ -506,8 +461,8 @@ gst_atomic_int_read (GstAtomicInt * aint)
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_INLINE_FUNC void
|
GST_INLINE_FUNC void
|
||||||
gst_atomic_int_add (GstAtomicInt * aint, gint val)
|
gst_atomic_int_add (GstAtomicInt *aint, gint val)
|
||||||
{
|
{
|
||||||
g_mutex_lock (aint->lock);
|
g_mutex_lock (aint->lock);
|
||||||
aint->counter += val;
|
aint->counter += val;
|
||||||
|
@ -515,7 +470,7 @@ gst_atomic_int_add (GstAtomicInt * aint, gint val)
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_INLINE_FUNC void
|
GST_INLINE_FUNC void
|
||||||
gst_atomic_int_inc (GstAtomicInt * aint)
|
gst_atomic_int_inc (GstAtomicInt *aint)
|
||||||
{
|
{
|
||||||
g_mutex_lock (aint->lock);
|
g_mutex_lock (aint->lock);
|
||||||
aint->counter++;
|
aint->counter++;
|
||||||
|
@ -523,10 +478,10 @@ gst_atomic_int_inc (GstAtomicInt * aint)
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_INLINE_FUNC gboolean
|
GST_INLINE_FUNC gboolean
|
||||||
gst_atomic_int_dec_and_test (GstAtomicInt * aint)
|
gst_atomic_int_dec_and_test (GstAtomicInt *aint)
|
||||||
{
|
{
|
||||||
gboolean res;
|
gboolean res;
|
||||||
|
|
||||||
g_mutex_lock (aint->lock);
|
g_mutex_lock (aint->lock);
|
||||||
aint->counter--;
|
aint->counter--;
|
||||||
res = (aint->counter == 0);
|
res = (aint->counter == 0);
|
||||||
|
@ -535,11 +490,11 @@ gst_atomic_int_dec_and_test (GstAtomicInt * aint)
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
/*
|
/*
|
||||||
* common functions
|
* common functions
|
||||||
*/
|
*/
|
||||||
GST_INLINE_FUNC GstAtomicInt *
|
GST_INLINE_FUNC GstAtomicInt*
|
||||||
gst_atomic_int_new (gint val)
|
gst_atomic_int_new (gint val)
|
||||||
{
|
{
|
||||||
GstAtomicInt *aint;
|
GstAtomicInt *aint;
|
||||||
|
@ -551,13 +506,14 @@ gst_atomic_int_new (gint val)
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_INLINE_FUNC void
|
GST_INLINE_FUNC void
|
||||||
gst_atomic_int_free (GstAtomicInt * aint)
|
gst_atomic_int_free (GstAtomicInt *aint)
|
||||||
{
|
{
|
||||||
gst_atomic_int_destroy (aint);
|
gst_atomic_int_destroy (aint);
|
||||||
g_free (aint);
|
g_free (aint);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* defined (GST_CAN_INLINE) || defined (__GST_TRASH_STACK_C__) */
|
#endif /* defined (GST_CAN_INLINE) || defined (__GST_TRASH_STACK_C__)*/
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GST_ATOMIC_IMPL_H__ */
|
#endif /* __GST_ATOMIC_IMPL_H__ */
|
||||||
|
|
91
gst/gstbin.h
91
gst/gstbin.h
|
@ -26,7 +26,9 @@
|
||||||
|
|
||||||
#include <gst/gstelement.h>
|
#include <gst/gstelement.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS extern GType _gst_bin_type;
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
extern GType _gst_bin_type;
|
||||||
|
|
||||||
#define GST_TYPE_BIN (_gst_bin_type)
|
#define GST_TYPE_BIN (_gst_bin_type)
|
||||||
#define GST_IS_BIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_BIN))
|
#define GST_IS_BIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_BIN))
|
||||||
|
@ -35,12 +37,11 @@ G_BEGIN_DECLS extern GType _gst_bin_type;
|
||||||
#define GST_BIN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_BIN, GstBin))
|
#define GST_BIN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_BIN, GstBin))
|
||||||
#define GST_BIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_BIN, GstBinClass))
|
#define GST_BIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_BIN, GstBinClass))
|
||||||
|
|
||||||
typedef void (*GstBinPrePostIterateFunction) (GstBin * bin, gpointer user_data);
|
typedef void (*GstBinPrePostIterateFunction) (GstBin *bin, gpointer user_data);
|
||||||
|
|
||||||
typedef enum
|
typedef enum {
|
||||||
{
|
|
||||||
/* this bin is a manager of child elements, i.e. a pipeline or thread */
|
/* this bin is a manager of child elements, i.e. a pipeline or thread */
|
||||||
GST_BIN_FLAG_MANAGER = GST_ELEMENT_FLAG_LAST,
|
GST_BIN_FLAG_MANAGER = GST_ELEMENT_FLAG_LAST,
|
||||||
|
|
||||||
/* this bin iterates itself */
|
/* this bin iterates itself */
|
||||||
GST_BIN_SELF_SCHEDULABLE,
|
GST_BIN_SELF_SCHEDULABLE,
|
||||||
|
@ -51,79 +52,81 @@ typedef enum
|
||||||
GST_BIN_FLAG_FIXED_CLOCK,
|
GST_BIN_FLAG_FIXED_CLOCK,
|
||||||
|
|
||||||
/* padding */
|
/* padding */
|
||||||
GST_BIN_FLAG_LAST = GST_ELEMENT_FLAG_LAST + 5
|
GST_BIN_FLAG_LAST = GST_ELEMENT_FLAG_LAST + 5
|
||||||
}
|
} GstBinFlags;
|
||||||
GstBinFlags;
|
|
||||||
|
|
||||||
/*typedef struct _GstBin GstBin; */
|
/*typedef struct _GstBin GstBin; */
|
||||||
/*typedef struct _GstBinClass GstBinClass; */
|
/*typedef struct _GstBinClass GstBinClass; */
|
||||||
|
|
||||||
struct _GstBin
|
struct _GstBin {
|
||||||
{
|
GstElement element;
|
||||||
GstElement element;
|
|
||||||
|
|
||||||
/* our children */
|
/* our children */
|
||||||
gint numchildren;
|
gint numchildren;
|
||||||
GList *children;
|
GList *children;
|
||||||
|
|
||||||
GstElementState child_states[GST_NUM_STATES];
|
GstElementState child_states[GST_NUM_STATES];
|
||||||
|
|
||||||
gpointer _gst_reserved[GST_PADDING];
|
gpointer _gst_reserved[GST_PADDING];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstBinClass
|
struct _GstBinClass {
|
||||||
{
|
|
||||||
GstElementClass parent_class;
|
GstElementClass parent_class;
|
||||||
|
|
||||||
/* vtable */
|
/* vtable */
|
||||||
void (*add_element) (GstBin * bin, GstElement * element);
|
void (*add_element) (GstBin *bin, GstElement *element);
|
||||||
void (*remove_element) (GstBin * bin, GstElement * element);
|
void (*remove_element) (GstBin *bin, GstElement *element);
|
||||||
void (*child_state_change) (GstBin * bin, GstElementState oldstate,
|
void (*child_state_change) (GstBin *bin, GstElementState oldstate,
|
||||||
GstElementState newstate, GstElement * element);
|
GstElementState newstate, GstElement *element);
|
||||||
|
|
||||||
/* run a full iteration of operation */
|
/* run a full iteration of operation */
|
||||||
gboolean (*iterate) (GstBin * bin);
|
gboolean (*iterate) (GstBin *bin);
|
||||||
|
|
||||||
/* signals */
|
/* signals */
|
||||||
void (*element_added) (GstBin * bin, GstElement * child);
|
void (*element_added) (GstBin *bin, GstElement *child);
|
||||||
void (*element_removed) (GstBin * bin, GstElement * child);
|
void (*element_removed) (GstBin *bin, GstElement *child);
|
||||||
|
|
||||||
gpointer _gst_reserved[GST_PADDING];
|
gpointer _gst_reserved[GST_PADDING];
|
||||||
};
|
};
|
||||||
|
|
||||||
GType gst_bin_get_type (void);
|
GType gst_bin_get_type (void);
|
||||||
GstElement *gst_bin_new (const gchar * name);
|
GstElement* gst_bin_new (const gchar *name);
|
||||||
|
|
||||||
/* add and remove elements from the bin */
|
/* add and remove elements from the bin */
|
||||||
void gst_bin_add (GstBin * bin, GstElement * element);
|
void gst_bin_add (GstBin *bin, GstElement *element);
|
||||||
void gst_bin_add_many (GstBin * bin, GstElement * element_1, ...);
|
void gst_bin_add_many (GstBin *bin, GstElement *element_1, ...);
|
||||||
void gst_bin_remove (GstBin * bin, GstElement * element);
|
void gst_bin_remove (GstBin *bin, GstElement *element);
|
||||||
void gst_bin_remove_many (GstBin * bin, GstElement * element_1, ...);
|
void gst_bin_remove_many (GstBin *bin, GstElement *element_1, ...);
|
||||||
|
|
||||||
/* retrieve a single element or the list of children */
|
/* retrieve a single element or the list of children */
|
||||||
GstElement *gst_bin_get_by_name (GstBin * bin, const gchar * name);
|
GstElement* gst_bin_get_by_name (GstBin *bin, const gchar *name);
|
||||||
GstElement *gst_bin_get_by_name_recurse_up (GstBin * bin, const gchar * name);
|
GstElement* gst_bin_get_by_name_recurse_up (GstBin *bin, const gchar *name);
|
||||||
G_CONST_RETURN GList *gst_bin_get_list (GstBin * bin);
|
G_CONST_RETURN GList*
|
||||||
GstElement *gst_bin_get_by_interface (GstBin * bin, GType interface);
|
gst_bin_get_list (GstBin *bin);
|
||||||
GList *gst_bin_get_all_by_interface (GstBin * bin, GType interface);
|
GstElement* gst_bin_get_by_interface (GstBin *bin, GType interface);
|
||||||
|
GList * gst_bin_get_all_by_interface (GstBin *bin, GType interface);
|
||||||
|
|
||||||
gboolean gst_bin_iterate (GstBin * bin);
|
gboolean gst_bin_iterate (GstBin *bin);
|
||||||
|
|
||||||
void gst_bin_use_clock (GstBin * bin, GstClock * clock);
|
void gst_bin_use_clock (GstBin *bin, GstClock *clock);
|
||||||
GstClock *gst_bin_get_clock (GstBin * bin);
|
GstClock* gst_bin_get_clock (GstBin *bin);
|
||||||
void gst_bin_auto_clock (GstBin * bin);
|
void gst_bin_auto_clock (GstBin *bin);
|
||||||
|
|
||||||
GstElementStateReturn gst_bin_sync_children_state (GstBin * bin);
|
GstElementStateReturn gst_bin_sync_children_state (GstBin *bin);
|
||||||
|
|
||||||
/* internal */
|
/* internal */
|
||||||
/* one of our childs signaled a state change */
|
/* one of our childs signaled a state change */
|
||||||
void gst_bin_child_state_change (GstBin * bin, GstElementState oldstate,
|
void gst_bin_child_state_change (GstBin *bin, GstElementState oldstate,
|
||||||
GstElementState newstate, GstElement * child);
|
GstElementState newstate, GstElement *child);
|
||||||
|
|
||||||
void gst_bin_set_pre_iterate_function (GstBin * bin,
|
void gst_bin_set_pre_iterate_function (GstBin *bin,
|
||||||
GstBinPrePostIterateFunction func, gpointer user_data);
|
GstBinPrePostIterateFunction func,
|
||||||
void gst_bin_set_post_iterate_function (GstBin * bin,
|
gpointer user_data);
|
||||||
GstBinPrePostIterateFunction func, gpointer user_data);
|
void gst_bin_set_post_iterate_function (GstBin *bin,
|
||||||
|
GstBinPrePostIterateFunction func,
|
||||||
|
gpointer user_data);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
|
||||||
#endif /* __GST_BIN_H__ */
|
#endif /* __GST_BIN_H__ */
|
||||||
|
|
|
@ -27,9 +27,11 @@
|
||||||
#include <gst/gstdata.h>
|
#include <gst/gstdata.h>
|
||||||
#include <gst/gstclock.h>
|
#include <gst/gstclock.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS typedef struct _GstBuffer GstBuffer;
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
typedef void (*GstBufferFreeDataFunc) (GstBuffer * buffer);
|
typedef struct _GstBuffer GstBuffer;
|
||||||
|
|
||||||
|
typedef void (*GstBufferFreeDataFunc) (GstBuffer *buffer);
|
||||||
|
|
||||||
#define GST_BUFFER_TRACE_NAME "GstBuffer"
|
#define GST_BUFFER_TRACE_NAME "GstBuffer"
|
||||||
|
|
||||||
|
@ -72,30 +74,27 @@ extern GType _gst_buffer_type;
|
||||||
#define GST_BUFFER_OFFSET_END_IS_VALID(buffer) (GST_BUFFER_OFFSET_END (buffer) != GST_BUFFER_OFFSET_NONE)
|
#define GST_BUFFER_OFFSET_END_IS_VALID(buffer) (GST_BUFFER_OFFSET_END (buffer) != GST_BUFFER_OFFSET_NONE)
|
||||||
#define GST_BUFFER_MAXSIZE_IS_VALID(buffer) (GST_BUFFER_MAXSIZE (buffer) != GST_BUFFER_MAXSIZE_NONE)
|
#define GST_BUFFER_MAXSIZE_IS_VALID(buffer) (GST_BUFFER_MAXSIZE (buffer) != GST_BUFFER_MAXSIZE_NONE)
|
||||||
|
|
||||||
typedef enum
|
typedef enum {
|
||||||
{
|
GST_BUFFER_READONLY = GST_DATA_READONLY,
|
||||||
GST_BUFFER_READONLY = GST_DATA_READONLY,
|
GST_BUFFER_SUBBUFFER = GST_DATA_FLAG_LAST,
|
||||||
GST_BUFFER_SUBBUFFER = GST_DATA_FLAG_LAST,
|
|
||||||
GST_BUFFER_ORIGINAL,
|
GST_BUFFER_ORIGINAL,
|
||||||
GST_BUFFER_DONTFREE,
|
GST_BUFFER_DONTFREE,
|
||||||
GST_BUFFER_KEY_UNIT,
|
GST_BUFFER_KEY_UNIT,
|
||||||
GST_BUFFER_DONTKEEP,
|
GST_BUFFER_DONTKEEP,
|
||||||
GST_BUFFER_FLAG_LAST = GST_DATA_FLAG_LAST + 8
|
GST_BUFFER_FLAG_LAST = GST_DATA_FLAG_LAST + 8
|
||||||
}
|
} GstBufferFlag;
|
||||||
GstBufferFlag;
|
|
||||||
|
|
||||||
struct _GstBuffer
|
struct _GstBuffer {
|
||||||
{
|
GstData data_type;
|
||||||
GstData data_type;
|
|
||||||
|
|
||||||
/* pointer to data and its size */
|
/* pointer to data and its size */
|
||||||
guint8 *data; /* pointer to buffer data */
|
guint8 *data; /* pointer to buffer data */
|
||||||
guint size; /* size of buffer data */
|
guint size; /* size of buffer data */
|
||||||
guint maxsize; /* max size of this buffer */
|
guint maxsize; /* max size of this buffer */
|
||||||
|
|
||||||
/* timestamp */
|
/* timestamp */
|
||||||
GstClockTime timestamp;
|
GstClockTime timestamp;
|
||||||
GstClockTime duration;
|
GstClockTime duration;
|
||||||
|
|
||||||
/* media specific offset
|
/* media specific offset
|
||||||
* for video frames, this could be the number of frames,
|
* for video frames, this could be the number of frames,
|
||||||
|
@ -104,19 +103,19 @@ struct _GstBuffer
|
||||||
* offset_end is the last offset contained in the buffer. The format specifies
|
* offset_end is the last offset contained in the buffer. The format specifies
|
||||||
* the meaning of both of them exactly.
|
* the meaning of both of them exactly.
|
||||||
*/
|
*/
|
||||||
guint64 offset;
|
guint64 offset;
|
||||||
guint64 offset_end;
|
guint64 offset_end;
|
||||||
|
|
||||||
GstBufferFreeDataFunc free_data;
|
GstBufferFreeDataFunc free_data;
|
||||||
gpointer buffer_private;
|
gpointer buffer_private;
|
||||||
|
|
||||||
gpointer _gst_reserved[GST_PADDING];
|
gpointer _gst_reserved[GST_PADDING];
|
||||||
};
|
};
|
||||||
|
|
||||||
/* allocation */
|
/* allocation */
|
||||||
GType gst_buffer_get_type (void);
|
GType gst_buffer_get_type (void);
|
||||||
GstBuffer *gst_buffer_new (void);
|
GstBuffer* gst_buffer_new (void);
|
||||||
GstBuffer *gst_buffer_new_and_alloc (guint size);
|
GstBuffer* gst_buffer_new_and_alloc (guint size);
|
||||||
|
|
||||||
#define gst_buffer_set_data(buf, data, size) \
|
#define gst_buffer_set_data(buf, data, size) \
|
||||||
G_STMT_START { \
|
G_STMT_START { \
|
||||||
|
@ -129,26 +128,25 @@ G_STMT_START { \
|
||||||
#define gst_buffer_ref_by_count(buf,c) GST_BUFFER (gst_data_ref_by_count (GST_DATA (buf), c))
|
#define gst_buffer_ref_by_count(buf,c) GST_BUFFER (gst_data_ref_by_count (GST_DATA (buf), c))
|
||||||
#define gst_buffer_unref(buf) gst_data_unref (GST_DATA (buf))
|
#define gst_buffer_unref(buf) gst_data_unref (GST_DATA (buf))
|
||||||
/* copy buffer */
|
/* copy buffer */
|
||||||
void gst_buffer_stamp (GstBuffer * dest, const GstBuffer * src);
|
void gst_buffer_stamp (GstBuffer *dest, const GstBuffer *src);
|
||||||
|
|
||||||
#define gst_buffer_copy(buf) GST_BUFFER (gst_data_copy (GST_DATA (buf)))
|
#define gst_buffer_copy(buf) GST_BUFFER (gst_data_copy (GST_DATA (buf)))
|
||||||
#define gst_buffer_is_writable(buf) gst_data_is_writable (GST_DATA (buf))
|
#define gst_buffer_is_writable(buf) gst_data_is_writable (GST_DATA (buf))
|
||||||
#define gst_buffer_copy_on_write(buf) GST_BUFFER (gst_data_copy_on_write (GST_DATA (buf)))
|
#define gst_buffer_copy_on_write(buf) GST_BUFFER (gst_data_copy_on_write (GST_DATA (buf)))
|
||||||
|
|
||||||
/* creating a subbuffer */
|
/* creating a subbuffer */
|
||||||
GstBuffer *gst_buffer_create_sub (GstBuffer * parent, guint offset, guint size);
|
GstBuffer* gst_buffer_create_sub (GstBuffer *parent, guint offset, guint size);
|
||||||
|
|
||||||
/* merge, span, or append two buffers, intelligently */
|
/* merge, span, or append two buffers, intelligently */
|
||||||
GstBuffer *gst_buffer_merge (GstBuffer * buf1, GstBuffer * buf2);
|
GstBuffer* gst_buffer_merge (GstBuffer *buf1, GstBuffer *buf2);
|
||||||
gboolean gst_buffer_is_span_fast (GstBuffer * buf1, GstBuffer * buf2);
|
gboolean gst_buffer_is_span_fast (GstBuffer *buf1, GstBuffer *buf2);
|
||||||
GstBuffer *gst_buffer_span (GstBuffer * buf1, guint32 offset, GstBuffer * buf2,
|
GstBuffer* gst_buffer_span (GstBuffer *buf1, guint32 offset, GstBuffer *buf2, guint32 len);
|
||||||
guint32 len);
|
|
||||||
|
|
||||||
/* --- private --- */
|
/* --- private --- */
|
||||||
void _gst_buffer_initialize (void);
|
void _gst_buffer_initialize (void);
|
||||||
|
|
||||||
void gst_buffer_default_free (GstBuffer * buffer);
|
void gst_buffer_default_free (GstBuffer *buffer);
|
||||||
GstBuffer *gst_buffer_default_copy (GstBuffer * buffer);
|
GstBuffer* gst_buffer_default_copy (GstBuffer *buffer);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GST_BUFFER_H__ */
|
#endif /* __GST_BUFFER_H__ */
|
||||||
|
|
114
gst/gstcaps.h
114
gst/gstcaps.h
|
@ -24,103 +24,119 @@
|
||||||
#include <gst/gststructure.h>
|
#include <gst/gststructure.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define GST_TYPE_CAPS gst_caps_get_type()
|
#define GST_TYPE_CAPS gst_caps_get_type()
|
||||||
#define GST_CAPS(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GST_TYPE_CAPS, GstCaps))
|
#define GST_CAPS(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GST_TYPE_CAPS, GstCaps))
|
||||||
#define GST_IS_CAPS(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GST_TYPE_CAPS))
|
#define GST_IS_CAPS(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GST_TYPE_CAPS))
|
||||||
|
|
||||||
#define GST_CAPS_FLAGS_ANY (1 << 0)
|
#define GST_CAPS_FLAGS_ANY (1 << 0)
|
||||||
|
|
||||||
#define GST_CAPS_ANY gst_caps_new_any()
|
#define GST_CAPS_ANY gst_caps_new_any()
|
||||||
#define GST_CAPS_NONE gst_caps_new_empty()
|
#define GST_CAPS_NONE gst_caps_new_empty()
|
||||||
|
|
||||||
#define GST_STATIC_CAPS_ANY GST_STATIC_CAPS("ANY")
|
#define GST_STATIC_CAPS_ANY GST_STATIC_CAPS("ANY")
|
||||||
#define GST_STATIC_CAPS_NONE GST_STATIC_CAPS("NONE")
|
#define GST_STATIC_CAPS_NONE GST_STATIC_CAPS("NONE")
|
||||||
|
|
||||||
#define GST_CAPS_IS_SIMPLE(caps) (gst_caps_get_size(caps) == 1)
|
#define GST_CAPS_IS_SIMPLE(caps) (gst_caps_get_size(caps) == 1)
|
||||||
#define gst_caps_is_simple(caps) GST_CAPS_IS_SIMPLE(caps)
|
#define gst_caps_is_simple(caps) GST_CAPS_IS_SIMPLE(caps)
|
||||||
|
|
||||||
#ifndef GST_DISABLE_DEPRECATED
|
#ifndef GST_DISABLE_DEPRECATED
|
||||||
#define GST_DEBUG_CAPS(string, caps) \
|
#define GST_DEBUG_CAPS(string, caps) \
|
||||||
GST_DEBUG ( string "%s: " GST_PTR_FORMAT, caps)
|
GST_DEBUG ( string "%s: " GST_PTR_FORMAT, caps)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define GST_STATIC_CAPS(string) \
|
#define GST_STATIC_CAPS(string) \
|
||||||
{ \
|
{ \
|
||||||
/* caps */ { 0 }, \
|
/* caps */ { 0 }, \
|
||||||
/* string */ string, \
|
/* string */ string, \
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef struct _GstCaps GstCaps;
|
typedef struct _GstCaps GstCaps;
|
||||||
typedef struct _GstStaticCaps GstStaticCaps;
|
typedef struct _GstStaticCaps GstStaticCaps;
|
||||||
|
|
||||||
struct _GstCaps
|
struct _GstCaps {
|
||||||
{
|
|
||||||
GType type;
|
GType type;
|
||||||
|
|
||||||
guint16 flags;
|
guint16 flags;
|
||||||
GPtrArray *structs;
|
GPtrArray *structs;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstStaticCaps
|
struct _GstStaticCaps {
|
||||||
{
|
|
||||||
GstCaps caps;
|
GstCaps caps;
|
||||||
const char *string;
|
const char *string;
|
||||||
};
|
};
|
||||||
|
|
||||||
GType
|
GType gst_caps_get_type (void) G_GNUC_CONST;
|
||||||
gst_caps_get_type (void)
|
GstCaps * gst_caps_new_empty (void);
|
||||||
G_GNUC_CONST;
|
GstCaps * gst_caps_new_any (void);
|
||||||
GstCaps *gst_caps_new_empty (void);
|
GstCaps * gst_caps_new_simple (const char *media_type,
|
||||||
GstCaps *gst_caps_new_any (void);
|
const char *fieldname,
|
||||||
GstCaps *gst_caps_new_simple (const char *media_type,
|
...);
|
||||||
const char *fieldname, ...);
|
GstCaps * gst_caps_new_full (GstStructure *struct1,
|
||||||
GstCaps *gst_caps_new_full (GstStructure * struct1, ...);
|
...);
|
||||||
GstCaps *gst_caps_new_full_valist (GstStructure * structure,
|
GstCaps * gst_caps_new_full_valist (GstStructure *structure,
|
||||||
va_list var_args);
|
va_list var_args);
|
||||||
GstCaps *gst_caps_copy (const GstCaps * caps);
|
GstCaps * gst_caps_copy (const GstCaps *caps);
|
||||||
void gst_caps_free (GstCaps * caps);
|
void gst_caps_free (GstCaps *caps);
|
||||||
G_CONST_RETURN GstCaps *gst_static_caps_get (GstStaticCaps * caps);
|
G_CONST_RETURN GstCaps * gst_static_caps_get (GstStaticCaps *caps);
|
||||||
|
|
||||||
/* manipulation */
|
/* manipulation */
|
||||||
void gst_caps_append (GstCaps * caps1, GstCaps * caps2);
|
void gst_caps_append (GstCaps *caps1,
|
||||||
void gst_caps_append_structure (GstCaps * caps1, GstStructure * structure);
|
GstCaps *caps2);
|
||||||
GstCaps *gst_caps_split_one (GstCaps * caps);
|
void gst_caps_append_structure (GstCaps *caps1,
|
||||||
int gst_caps_get_size (const GstCaps * caps);
|
GstStructure *structure);
|
||||||
GstStructure *gst_caps_get_structure (const GstCaps * caps, int index);
|
GstCaps * gst_caps_split_one (GstCaps *caps);
|
||||||
|
int gst_caps_get_size (const GstCaps *caps);
|
||||||
|
GstStructure * gst_caps_get_structure (const GstCaps *caps,
|
||||||
|
int index);
|
||||||
#ifndef GST_DISABLE_DEPRECATED
|
#ifndef GST_DISABLE_DEPRECATED
|
||||||
GstCaps *gst_caps_copy_1 (const GstCaps * caps);
|
GstCaps * gst_caps_copy_1 (const GstCaps *caps);
|
||||||
#endif
|
#endif
|
||||||
void gst_caps_set_simple (GstCaps * caps, char *field, ...);
|
void gst_caps_set_simple (GstCaps *caps,
|
||||||
void gst_caps_set_simple_valist (GstCaps * caps,
|
char *field, ...);
|
||||||
char *field, va_list varargs);
|
void gst_caps_set_simple_valist (GstCaps *caps,
|
||||||
|
char *field,
|
||||||
|
va_list varargs);
|
||||||
|
|
||||||
/* tests */
|
/* tests */
|
||||||
gboolean gst_caps_is_any (const GstCaps * caps);
|
gboolean gst_caps_is_any (const GstCaps *caps);
|
||||||
gboolean gst_caps_is_empty (const GstCaps * caps);
|
gboolean gst_caps_is_empty (const GstCaps *caps);
|
||||||
|
|
||||||
#ifndef GST_DISABLE_DEPRECATED
|
#ifndef GST_DISABLE_DEPRECATED
|
||||||
gboolean gst_caps_is_chained (const GstCaps * caps);
|
gboolean gst_caps_is_chained (const GstCaps *caps);
|
||||||
#endif
|
#endif
|
||||||
gboolean gst_caps_is_fixed (const GstCaps * caps);
|
gboolean gst_caps_is_fixed (const GstCaps *caps);
|
||||||
gboolean gst_caps_is_equal_fixed (const GstCaps * caps1,
|
gboolean gst_caps_is_equal_fixed (const GstCaps *caps1,
|
||||||
const GstCaps * caps2);
|
const GstCaps *caps2);
|
||||||
gboolean gst_caps_is_always_compatible (const GstCaps * caps1,
|
gboolean gst_caps_is_always_compatible (const GstCaps *caps1,
|
||||||
const GstCaps * caps2);
|
const GstCaps *caps2);
|
||||||
|
|
||||||
/* operations */
|
/* operations */
|
||||||
GstCaps *gst_caps_intersect (const GstCaps * caps1, const GstCaps * caps2);
|
GstCaps * gst_caps_intersect (const GstCaps *caps1,
|
||||||
GstCaps *gst_caps_union (const GstCaps * caps1, const GstCaps * caps2);
|
const GstCaps *caps2);
|
||||||
GstCaps *gst_caps_normalize (const GstCaps * caps);
|
GstCaps * gst_caps_union (const GstCaps *caps1,
|
||||||
GstCaps *gst_caps_simplify (const GstCaps * caps);
|
const GstCaps *caps2);
|
||||||
|
GstCaps * gst_caps_normalize (const GstCaps *caps);
|
||||||
|
GstCaps * gst_caps_simplify (const GstCaps *caps);
|
||||||
|
|
||||||
#ifndef GST_DISABLE_LOADSAVE
|
#ifndef GST_DISABLE_LOADSAVE
|
||||||
xmlNodePtr gst_caps_save_thyself (const GstCaps * caps, xmlNodePtr parent);
|
xmlNodePtr gst_caps_save_thyself (const GstCaps *caps,
|
||||||
GstCaps *gst_caps_load_thyself (xmlNodePtr parent);
|
xmlNodePtr parent);
|
||||||
|
GstCaps * gst_caps_load_thyself (xmlNodePtr parent);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* utility */
|
/* utility */
|
||||||
void gst_caps_replace (GstCaps ** caps, GstCaps * newcaps);
|
void gst_caps_replace (GstCaps **caps,
|
||||||
gchar *gst_caps_to_string (const GstCaps * caps);
|
GstCaps *newcaps);
|
||||||
GstCaps *gst_caps_from_string (const gchar * string);
|
gchar * gst_caps_to_string (const GstCaps *caps);
|
||||||
|
GstCaps * gst_caps_from_string (const gchar *string);
|
||||||
|
|
||||||
gboolean gst_caps_structure_fixate_field_nearest_int (GstStructure *
|
gboolean gst_caps_structure_fixate_field_nearest_int (GstStructure *structure,
|
||||||
structure, const char *field_name, int target);
|
const char *field_name,
|
||||||
gboolean gst_caps_structure_fixate_field_nearest_double (GstStructure *
|
int target);
|
||||||
structure, const char *field_name, double target);
|
gboolean gst_caps_structure_fixate_field_nearest_double (GstStructure *structure,
|
||||||
|
const char *field_name,
|
||||||
|
double target);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GST_CAPS_H__ */
|
#endif /* __GST_CAPS_H__ */
|
||||||
|
|
180
gst/gstclock.h
180
gst/gstclock.h
|
@ -26,6 +26,7 @@
|
||||||
#include <gst/gstobject.h>
|
#include <gst/gstobject.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
/* --- standard type macros --- */
|
/* --- standard type macros --- */
|
||||||
#define GST_TYPE_CLOCK (gst_clock_get_type ())
|
#define GST_TYPE_CLOCK (gst_clock_get_type ())
|
||||||
#define GST_CLOCK(clock) (G_TYPE_CHECK_INSTANCE_CAST ((clock), GST_TYPE_CLOCK, GstClock))
|
#define GST_CLOCK(clock) (G_TYPE_CHECK_INSTANCE_CAST ((clock), GST_TYPE_CLOCK, GstClock))
|
||||||
|
@ -33,9 +34,10 @@ G_BEGIN_DECLS
|
||||||
#define GST_CLOCK_CLASS(cclass) (G_TYPE_CHECK_CLASS_CAST ((cclass), GST_TYPE_CLOCK, GstClockClass))
|
#define GST_CLOCK_CLASS(cclass) (G_TYPE_CHECK_CLASS_CAST ((cclass), GST_TYPE_CLOCK, GstClockClass))
|
||||||
#define GST_IS_CLOCK_CLASS(cclass) (G_TYPE_CHECK_CLASS_TYPE ((cclass), GST_TYPE_CLOCK))
|
#define GST_IS_CLOCK_CLASS(cclass) (G_TYPE_CHECK_CLASS_TYPE ((cclass), GST_TYPE_CLOCK))
|
||||||
#define GST_CLOCK_GET_CLASS(clock) (G_TYPE_INSTANCE_GET_CLASS ((clock), GST_TYPE_CLOCK, GstClockClass))
|
#define GST_CLOCK_GET_CLASS(clock) (G_TYPE_INSTANCE_GET_CLASS ((clock), GST_TYPE_CLOCK, GstClockClass))
|
||||||
typedef guint64 GstClockTime;
|
|
||||||
typedef gint64 GstClockTimeDiff;
|
typedef guint64 GstClockTime;
|
||||||
typedef gpointer GstClockID;
|
typedef gint64 GstClockTimeDiff;
|
||||||
|
typedef gpointer GstClockID;
|
||||||
|
|
||||||
#define GST_CLOCK_TIME_NONE ((GstClockTime)-1)
|
#define GST_CLOCK_TIME_NONE ((GstClockTime)-1)
|
||||||
#define GST_CLOCK_TIME_IS_VALID(time) ((time) != GST_CLOCK_TIME_NONE)
|
#define GST_CLOCK_TIME_IS_VALID(time) ((time) != GST_CLOCK_TIME_NONE)
|
||||||
|
@ -55,30 +57,26 @@ G_STMT_START { \
|
||||||
|
|
||||||
#define GST_CLOCK_ENTRY_TRACE_NAME "GstClockEntry"
|
#define GST_CLOCK_ENTRY_TRACE_NAME "GstClockEntry"
|
||||||
|
|
||||||
typedef struct _GstClockEntry GstClockEntry;
|
typedef struct _GstClockEntry GstClockEntry;
|
||||||
typedef struct _GstClock GstClock;
|
typedef struct _GstClock GstClock;
|
||||||
typedef struct _GstClockClass GstClockClass;
|
typedef struct _GstClockClass GstClockClass;
|
||||||
|
|
||||||
/* --- prototype for async callbacks --- */
|
/* --- prototype for async callbacks --- */
|
||||||
typedef gboolean (*GstClockCallback) (GstClock * clock, GstClockTime time,
|
typedef gboolean (*GstClockCallback) (GstClock *clock, GstClockTime time,
|
||||||
GstClockID id, gpointer user_data);
|
GstClockID id, gpointer user_data);
|
||||||
|
|
||||||
typedef enum
|
typedef enum {
|
||||||
{
|
|
||||||
/* --- protected --- */
|
/* --- protected --- */
|
||||||
GST_CLOCK_ENTRY_OK,
|
GST_CLOCK_ENTRY_OK,
|
||||||
GST_CLOCK_ENTRY_EARLY,
|
GST_CLOCK_ENTRY_EARLY,
|
||||||
GST_CLOCK_ENTRY_RESTART
|
GST_CLOCK_ENTRY_RESTART
|
||||||
}
|
} GstClockEntryStatus;
|
||||||
GstClockEntryStatus;
|
|
||||||
|
|
||||||
typedef enum
|
typedef enum {
|
||||||
{
|
|
||||||
/* --- protected --- */
|
/* --- protected --- */
|
||||||
GST_CLOCK_ENTRY_SINGLE,
|
GST_CLOCK_ENTRY_SINGLE,
|
||||||
GST_CLOCK_ENTRY_PERIODIC
|
GST_CLOCK_ENTRY_PERIODIC
|
||||||
}
|
} GstClockEntryType;
|
||||||
GstClockEntryType;
|
|
||||||
|
|
||||||
#define GST_CLOCK_ENTRY(entry) ((GstClockEntry *)(entry))
|
#define GST_CLOCK_ENTRY(entry) ((GstClockEntry *)(entry))
|
||||||
#define GST_CLOCK_ENTRY_CLOCK(entry) ((entry)->clock)
|
#define GST_CLOCK_ENTRY_CLOCK(entry) ((entry)->clock)
|
||||||
|
@ -87,120 +85,120 @@ GstClockEntryType;
|
||||||
#define GST_CLOCK_ENTRY_INTERVAL(entry) ((entry)->interval)
|
#define GST_CLOCK_ENTRY_INTERVAL(entry) ((entry)->interval)
|
||||||
#define GST_CLOCK_ENTRY_STATUS(entry) ((entry)->status)
|
#define GST_CLOCK_ENTRY_STATUS(entry) ((entry)->status)
|
||||||
|
|
||||||
struct _GstClockEntry
|
struct _GstClockEntry {
|
||||||
{
|
|
||||||
/* --- protected --- */
|
/* --- protected --- */
|
||||||
GstClock *clock;
|
GstClock *clock;
|
||||||
GstClockEntryType type;
|
GstClockEntryType type;
|
||||||
GstClockTime time;
|
GstClockTime time;
|
||||||
GstClockTime interval;
|
GstClockTime interval;
|
||||||
GstClockEntryStatus status;
|
GstClockEntryStatus status;
|
||||||
GstClockCallback func;
|
GstClockCallback func;
|
||||||
gpointer user_data;
|
gpointer user_data;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
GST_CLOCK_STOPPED = 0,
|
GST_CLOCK_STOPPED = 0,
|
||||||
GST_CLOCK_TIMEOUT = 1,
|
GST_CLOCK_TIMEOUT = 1,
|
||||||
GST_CLOCK_EARLY = 2,
|
GST_CLOCK_EARLY = 2,
|
||||||
GST_CLOCK_ERROR = 3,
|
GST_CLOCK_ERROR = 3,
|
||||||
GST_CLOCK_UNSUPPORTED = 4
|
GST_CLOCK_UNSUPPORTED = 4
|
||||||
}
|
} GstClockReturn;
|
||||||
GstClockReturn;
|
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
GST_CLOCK_FLAG_CAN_DO_SINGLE_SYNC = (1 << 1),
|
GST_CLOCK_FLAG_CAN_DO_SINGLE_SYNC = (1 << 1),
|
||||||
GST_CLOCK_FLAG_CAN_DO_SINGLE_ASYNC = (1 << 2),
|
GST_CLOCK_FLAG_CAN_DO_SINGLE_ASYNC = (1 << 2),
|
||||||
GST_CLOCK_FLAG_CAN_DO_PERIODIC_SYNC = (1 << 3),
|
GST_CLOCK_FLAG_CAN_DO_PERIODIC_SYNC = (1 << 3),
|
||||||
GST_CLOCK_FLAG_CAN_DO_PERIODIC_ASYNC = (1 << 4),
|
GST_CLOCK_FLAG_CAN_DO_PERIODIC_ASYNC = (1 << 4),
|
||||||
GST_CLOCK_FLAG_CAN_SET_RESOLUTION = (1 << 5),
|
GST_CLOCK_FLAG_CAN_SET_RESOLUTION = (1 << 5),
|
||||||
GST_CLOCK_FLAG_CAN_SET_SPEED = (1 << 6)
|
GST_CLOCK_FLAG_CAN_SET_SPEED = (1 << 6)
|
||||||
}
|
} GstClockFlags;
|
||||||
GstClockFlags;
|
|
||||||
|
|
||||||
#define GST_CLOCK_FLAGS(clock) (GST_CLOCK(clock)->flags)
|
#define GST_CLOCK_FLAGS(clock) (GST_CLOCK(clock)->flags)
|
||||||
|
|
||||||
struct _GstClock
|
struct _GstClock {
|
||||||
{
|
GstObject object;
|
||||||
GstObject object;
|
|
||||||
|
|
||||||
GstClockFlags flags;
|
GstClockFlags flags;
|
||||||
|
|
||||||
/* --- protected --- */
|
/* --- protected --- */
|
||||||
GstClockTime start_time;
|
GstClockTime start_time;
|
||||||
GstClockTime last_time;
|
GstClockTime last_time;
|
||||||
gint64 max_diff;
|
gint64 max_diff;
|
||||||
|
|
||||||
/* --- private --- */
|
/* --- private --- */
|
||||||
guint64 resolution;
|
guint64 resolution;
|
||||||
GList *entries;
|
GList *entries;
|
||||||
GMutex *active_mutex;
|
GMutex *active_mutex;
|
||||||
GCond *active_cond;
|
GCond *active_cond;
|
||||||
gboolean stats;
|
gboolean stats;
|
||||||
|
|
||||||
GstClockTime last_event;
|
|
||||||
GstClockTime max_event_diff;
|
|
||||||
|
|
||||||
|
GstClockTime last_event;
|
||||||
|
GstClockTime max_event_diff;
|
||||||
|
|
||||||
gpointer _gst_reserved[GST_PADDING];
|
gpointer _gst_reserved[GST_PADDING];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstClockClass
|
struct _GstClockClass {
|
||||||
{
|
GstObjectClass parent_class;
|
||||||
GstObjectClass parent_class;
|
|
||||||
|
|
||||||
/* vtable */
|
/* vtable */
|
||||||
gdouble (*change_speed) (GstClock * clock,
|
gdouble (*change_speed) (GstClock *clock,
|
||||||
gdouble oldspeed, gdouble newspeed);
|
gdouble oldspeed, gdouble newspeed);
|
||||||
gdouble (*get_speed) (GstClock * clock);
|
gdouble (*get_speed) (GstClock *clock);
|
||||||
guint64 (*change_resolution) (GstClock * clock, guint64 old_resolution,
|
guint64 (*change_resolution) (GstClock *clock, guint64 old_resolution,
|
||||||
guint64 new_resolution);
|
guint64 new_resolution);
|
||||||
guint64 (*get_resolution) (GstClock * clock);
|
guint64 (*get_resolution) (GstClock *clock);
|
||||||
|
|
||||||
GstClockTime (*get_internal_time) (GstClock * clock);
|
GstClockTime (*get_internal_time) (GstClock *clock);
|
||||||
|
|
||||||
/* waiting on an ID */
|
/* waiting on an ID */
|
||||||
GstClockEntryStatus (*wait) (GstClock * clock, GstClockEntry * entry);
|
GstClockEntryStatus (*wait) (GstClock *clock, GstClockEntry *entry);
|
||||||
GstClockEntryStatus (*wait_async) (GstClock * clock, GstClockEntry * entry);
|
GstClockEntryStatus (*wait_async) (GstClock *clock, GstClockEntry *entry);
|
||||||
void (*unschedule) (GstClock * clock, GstClockEntry * entry);
|
void (*unschedule) (GstClock *clock, GstClockEntry *entry);
|
||||||
void (*unlock) (GstClock * clock, GstClockEntry * entry);
|
void (*unlock) (GstClock *clock, GstClockEntry *entry);
|
||||||
gpointer _gst_reserved[GST_PADDING];
|
gpointer _gst_reserved[GST_PADDING];
|
||||||
};
|
};
|
||||||
|
|
||||||
GType gst_clock_get_type (void);
|
GType gst_clock_get_type (void);
|
||||||
|
|
||||||
gdouble gst_clock_set_speed (GstClock * clock, gdouble speed);
|
gdouble gst_clock_set_speed (GstClock *clock, gdouble speed);
|
||||||
gdouble gst_clock_get_speed (GstClock * clock);
|
gdouble gst_clock_get_speed (GstClock *clock);
|
||||||
|
|
||||||
guint64 gst_clock_set_resolution (GstClock * clock, guint64 resolution);
|
guint64 gst_clock_set_resolution (GstClock *clock, guint64 resolution);
|
||||||
guint64 gst_clock_get_resolution (GstClock * clock);
|
guint64 gst_clock_get_resolution (GstClock *clock);
|
||||||
|
|
||||||
void gst_clock_set_active (GstClock * clock, gboolean active);
|
void gst_clock_set_active (GstClock *clock, gboolean active);
|
||||||
gboolean gst_clock_is_active (GstClock * clock);
|
gboolean gst_clock_is_active (GstClock *clock);
|
||||||
void gst_clock_reset (GstClock * clock);
|
void gst_clock_reset (GstClock *clock);
|
||||||
gboolean gst_clock_handle_discont (GstClock * clock, guint64 time);
|
gboolean gst_clock_handle_discont (GstClock *clock, guint64 time);
|
||||||
|
|
||||||
GstClockTime gst_clock_get_time (GstClock * clock);
|
GstClockTime gst_clock_get_time (GstClock *clock);
|
||||||
GstClockTime gst_clock_get_event_time (GstClock * clock);
|
GstClockTime gst_clock_get_event_time (GstClock *clock);
|
||||||
|
|
||||||
|
|
||||||
GstClockID gst_clock_get_next_id (GstClock * clock);
|
GstClockID gst_clock_get_next_id (GstClock *clock);
|
||||||
|
|
||||||
/* creating IDs that can be used to get notifications */
|
/* creating IDs that can be used to get notifications */
|
||||||
GstClockID gst_clock_new_single_shot_id (GstClock * clock, GstClockTime time);
|
GstClockID gst_clock_new_single_shot_id (GstClock *clock,
|
||||||
GstClockID gst_clock_new_periodic_id (GstClock * clock,
|
GstClockTime time);
|
||||||
GstClockTime start_time, GstClockTime interval);
|
GstClockID gst_clock_new_periodic_id (GstClock *clock,
|
||||||
|
GstClockTime start_time,
|
||||||
|
GstClockTime interval);
|
||||||
|
|
||||||
/* operations on IDs */
|
/* operations on IDs */
|
||||||
GstClockTime gst_clock_id_get_time (GstClockID id);
|
GstClockTime gst_clock_id_get_time (GstClockID id);
|
||||||
GstClockReturn gst_clock_id_wait (GstClockID id, GstClockTimeDiff * jitter);
|
GstClockReturn gst_clock_id_wait (GstClockID id,
|
||||||
GstClockReturn gst_clock_id_wait_async (GstClockID id,
|
GstClockTimeDiff *jitter);
|
||||||
GstClockCallback func, gpointer user_data);
|
GstClockReturn gst_clock_id_wait_async (GstClockID id,
|
||||||
void gst_clock_id_unschedule (GstClockID id);
|
GstClockCallback func,
|
||||||
void gst_clock_id_unlock (GstClockID id);
|
gpointer user_data);
|
||||||
void gst_clock_id_free (GstClockID id);
|
void gst_clock_id_unschedule (GstClockID id);
|
||||||
|
void gst_clock_id_unlock (GstClockID id);
|
||||||
|
void gst_clock_id_free (GstClockID id);
|
||||||
|
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GST_CLOCK_H__ */
|
#endif /* __GST_CLOCK_H__ */
|
||||||
|
|
|
@ -26,8 +26,10 @@
|
||||||
#define __GSTCOMPAT_H__
|
#define __GSTCOMPAT_H__
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#ifndef GST_DISABLE_DEPRECATED
|
#ifndef GST_DISABLE_DEPRECATED
|
||||||
/* 0.5.2 changes */
|
/* 0.5.2 changes */
|
||||||
|
|
||||||
/* element functions */
|
/* element functions */
|
||||||
#define gst_element_connect(a,b) gst_element_link(a,b)
|
#define gst_element_connect(a,b) gst_element_link(a,b)
|
||||||
#define gst_element_connect_pads(a,b,c,d) \
|
#define gst_element_connect_pads(a,b,c,d) \
|
||||||
|
@ -41,6 +43,7 @@ G_BEGIN_DECLS
|
||||||
#define gst_element_connect_filtered(a,b,c) \
|
#define gst_element_connect_filtered(a,b,c) \
|
||||||
gst_element_link_filtered(a,b,c)
|
gst_element_link_filtered(a,b,c)
|
||||||
#define gst_element_disconnect(a,b) gst_element_unlink(a,b)
|
#define gst_element_disconnect(a,b) gst_element_unlink(a,b)
|
||||||
|
|
||||||
/* pad functions */
|
/* pad functions */
|
||||||
#define gst_pad_connect(a,b) gst_pad_link(a,b)
|
#define gst_pad_connect(a,b) gst_pad_link(a,b)
|
||||||
#define gst_pad_connect_filtered(a,b,c) gst_pad_link_filtered(a,b,c)
|
#define gst_pad_connect_filtered(a,b,c) gst_pad_link_filtered(a,b,c)
|
||||||
|
@ -48,17 +51,19 @@ G_BEGIN_DECLS
|
||||||
#define gst_pad_proxy_connect(a,b) gst_pad_proxy_link(a,b)
|
#define gst_pad_proxy_connect(a,b) gst_pad_proxy_link(a,b)
|
||||||
#define gst_pad_set_connect_function(a,b) \
|
#define gst_pad_set_connect_function(a,b) \
|
||||||
gst_pad_set_link_function(a,b)
|
gst_pad_set_link_function(a,b)
|
||||||
|
|
||||||
/* pad macros */
|
/* pad macros */
|
||||||
#define GST_PAD_IS_CONNECTED(a) GST_PAD_IS_LINKED(a)
|
#define GST_PAD_IS_CONNECTED(a) GST_PAD_IS_LINKED(a)
|
||||||
|
|
||||||
/* pad enums */
|
/* pad enums */
|
||||||
#define GST_PAD_CONNECT_REFUSED GST_PAD_LINK_REFUSED
|
#define GST_PAD_CONNECT_REFUSED GST_PAD_LINK_REFUSED
|
||||||
#define GST_PAD_CONNECT_DELAYED GST_PAD_LINK_DELAYED
|
#define GST_PAD_CONNECT_DELAYED GST_PAD_LINK_DELAYED
|
||||||
#define GST_PAD_CONNECT_OK GST_PAD_LINK_OK
|
#define GST_PAD_CONNECT_OK GST_PAD_LINK_OK
|
||||||
#define GST_PAD_CONNECT_DONE GST_PAD_LINK_DONE
|
#define GST_PAD_CONNECT_DONE GST_PAD_LINK_DONE
|
||||||
typedef GstPadLinkReturn GstPadConnectReturn;
|
typedef GstPadLinkReturn GstPadConnectReturn;
|
||||||
|
|
||||||
/* pad function types */
|
/* pad function types */
|
||||||
typedef GstPadLinkFunction GstPadConnectFunction;
|
typedef GstPadLinkFunction GstPadConnectFunction;
|
||||||
|
|
||||||
/* probably not used */
|
/* probably not used */
|
||||||
/*
|
/*
|
||||||
|
@ -67,4 +72,5 @@ typedef GstPadLinkFunction GstPadConnectFunction;
|
||||||
#endif /* not GST_DISABLE_DEPRECATED */
|
#endif /* not GST_DISABLE_DEPRECATED */
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GSTCOMPAT_H__ */
|
#endif /* __GSTCOMPAT_H__ */
|
||||||
|
|
21
gst/gstcpu.h
21
gst/gstcpu.h
|
@ -24,18 +24,19 @@
|
||||||
#ifndef __GST_CPU_H__
|
#ifndef __GST_CPU_H__
|
||||||
#define __GST_CPU_H__
|
#define __GST_CPU_H__
|
||||||
|
|
||||||
G_BEGIN_DECLS typedef enum
|
G_BEGIN_DECLS
|
||||||
{
|
|
||||||
GST_CPU_FLAG_MMX = (1 << 0),
|
|
||||||
GST_CPU_FLAG_SSE = (1 << 1),
|
|
||||||
GST_CPU_FLAG_MMXEXT = (1 << 2),
|
|
||||||
GST_CPU_FLAG_3DNOW = (1 << 3)
|
|
||||||
}
|
|
||||||
GstCPUFlags;
|
|
||||||
|
|
||||||
void _gst_cpu_initialize (gboolean useopt);
|
typedef enum {
|
||||||
|
GST_CPU_FLAG_MMX = (1<<0),
|
||||||
|
GST_CPU_FLAG_SSE = (1<<1),
|
||||||
|
GST_CPU_FLAG_MMXEXT = (1<<2),
|
||||||
|
GST_CPU_FLAG_3DNOW = (1<<3)
|
||||||
|
} GstCPUFlags;
|
||||||
|
|
||||||
GstCPUFlags gst_cpu_get_flags (void);
|
void _gst_cpu_initialize (gboolean useopt);
|
||||||
|
|
||||||
|
GstCPUFlags gst_cpu_get_flags (void);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GST_CPU_H__ */
|
#endif /* __GST_CPU_H__ */
|
||||||
|
|
|
@ -29,30 +29,33 @@
|
||||||
#include <gst/gsttypes.h>
|
#include <gst/gsttypes.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
/* type */
|
/* type */
|
||||||
#define GST_DATA(data) ((GstData*)(data))
|
#define GST_DATA(data) ((GstData*)(data))
|
||||||
#define GST_DATA_TYPE(data) (GST_DATA(data)->type)
|
#define GST_DATA_TYPE(data) (GST_DATA(data)->type)
|
||||||
|
|
||||||
/* flags */
|
/* flags */
|
||||||
#define GST_DATA_FLAGS(data) (GST_DATA(data)->flags)
|
#define GST_DATA_FLAGS(data) (GST_DATA(data)->flags)
|
||||||
#define GST_DATA_FLAG_SHIFT(flag) (1<<(flag))
|
#define GST_DATA_FLAG_SHIFT(flag) (1<<(flag))
|
||||||
#define GST_DATA_FLAG_IS_SET(data,flag) (GST_DATA_FLAGS(data) & (1<<(flag)))
|
#define GST_DATA_FLAG_IS_SET(data,flag) (GST_DATA_FLAGS(data) & (1<<(flag)))
|
||||||
#define GST_DATA_FLAG_SET(data,flag) G_STMT_START{ (GST_DATA_FLAGS(data) |= (1<<(flag))); }G_STMT_END
|
#define GST_DATA_FLAG_SET(data,flag) G_STMT_START{ (GST_DATA_FLAGS(data) |= (1<<(flag))); }G_STMT_END
|
||||||
#define GST_DATA_FLAG_UNSET(data,flag) G_STMT_START{ (GST_DATA_FLAGS(data) &= ~(1<<(flag))); }G_STMT_END
|
#define GST_DATA_FLAG_UNSET(data,flag) G_STMT_START{ (GST_DATA_FLAGS(data) &= ~(1<<(flag))); }G_STMT_END
|
||||||
|
|
||||||
/* Macros for the GType */
|
/* Macros for the GType */
|
||||||
#define GST_TYPE_DATA (gst_data_get_type ())
|
#define GST_TYPE_DATA (gst_data_get_type ())
|
||||||
|
|
||||||
typedef struct _GstData GstData;
|
typedef struct _GstData GstData;
|
||||||
|
|
||||||
typedef void (*GstDataFreeFunction) (GstData * data);
|
typedef void (*GstDataFreeFunction) (GstData *data);
|
||||||
typedef GstData *(*GstDataCopyFunction) (const GstData * data);
|
typedef GstData* (*GstDataCopyFunction) (const GstData *data);
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
GST_DATA_READONLY = 1,
|
GST_DATA_READONLY = 1,
|
||||||
|
|
||||||
/* insert more */
|
/* insert more */
|
||||||
GST_DATA_FLAG_LAST = 8
|
GST_DATA_FLAG_LAST = 8
|
||||||
}
|
} GstDataFlags;
|
||||||
GstDataFlags;
|
|
||||||
|
|
||||||
/* refcount */
|
/* refcount */
|
||||||
#define GST_DATA_REFCOUNT(data) ((GST_DATA(data))->refcount)
|
#define GST_DATA_REFCOUNT(data) ((GST_DATA(data))->refcount)
|
||||||
|
@ -63,42 +66,41 @@ GstDataFlags;
|
||||||
#define GST_DATA_FREE_FUNC(data) (GST_DATA(data)->free)
|
#define GST_DATA_FREE_FUNC(data) (GST_DATA(data)->free)
|
||||||
|
|
||||||
|
|
||||||
struct _GstData
|
struct _GstData {
|
||||||
{
|
GType type;
|
||||||
GType type;
|
|
||||||
|
|
||||||
/* refcounting */
|
/* refcounting */
|
||||||
GstAtomicInt refcount;
|
GstAtomicInt refcount;
|
||||||
|
|
||||||
guint16 flags;
|
|
||||||
|
|
||||||
|
guint16 flags;
|
||||||
|
|
||||||
/* utility function pointers, can override default */
|
/* utility function pointers, can override default */
|
||||||
GstDataFreeFunction free; /* free the data */
|
GstDataFreeFunction free; /* free the data */
|
||||||
GstDataCopyFunction copy; /* copy the data */
|
GstDataCopyFunction copy; /* copy the data */
|
||||||
|
|
||||||
gpointer _gst_reserved[GST_PADDING];
|
gpointer _gst_reserved[GST_PADDING];
|
||||||
};
|
};
|
||||||
|
|
||||||
/* function used by subclasses only */
|
/* function used by subclasses only */
|
||||||
void gst_data_init (GstData * data, GType type, guint16 flags,
|
void gst_data_init (GstData *data, GType type, guint16 flags,
|
||||||
GstDataFreeFunction free, GstDataCopyFunction copy);
|
GstDataFreeFunction free,
|
||||||
void gst_data_dispose (GstData * data);
|
GstDataCopyFunction copy);
|
||||||
void gst_data_copy_into (const GstData * data, GstData * target);
|
void gst_data_dispose (GstData *data);
|
||||||
|
void gst_data_copy_into (const GstData *data, GstData *target);
|
||||||
|
|
||||||
/* basic operations on data */
|
/* basic operations on data */
|
||||||
GstData *gst_data_copy (const GstData * data);
|
GstData* gst_data_copy (const GstData *data);
|
||||||
gboolean gst_data_is_writable (GstData * data);
|
gboolean gst_data_is_writable (GstData *data);
|
||||||
GstData *gst_data_copy_on_write (GstData * data);
|
GstData* gst_data_copy_on_write (GstData *data);
|
||||||
|
|
||||||
/* reference counting */
|
/* reference counting */
|
||||||
GstData *gst_data_ref (GstData * data);
|
GstData* gst_data_ref (GstData* data);
|
||||||
GstData *gst_data_ref_by_count (GstData * data, gint count);
|
GstData* gst_data_ref_by_count (GstData* data, gint count);
|
||||||
void gst_data_unref (GstData * data);
|
void gst_data_unref (GstData* data);
|
||||||
|
|
||||||
/* GType for GstData */
|
/* GType for GstData */
|
||||||
GType
|
GType gst_data_get_type (void) G_GNUC_CONST;
|
||||||
gst_data_get_type (void)
|
|
||||||
G_GNUC_CONST;
|
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GST_DATA_H__ */
|
#endif /* __GST_DATA_H__ */
|
||||||
|
|
|
@ -35,3 +35,4 @@ G_STMT_START { \
|
||||||
G_STMT_START { \
|
G_STMT_START { \
|
||||||
gst_atomic_int_destroy (&(data)->refcount); \
|
gst_atomic_int_destroy (&(data)->refcount); \
|
||||||
} G_STMT_END;
|
} G_STMT_END;
|
||||||
|
|
||||||
|
|
444
gst/gstelement.h
444
gst/gstelement.h
|
@ -34,19 +34,19 @@
|
||||||
#include <gst/gstindex.h>
|
#include <gst/gstindex.h>
|
||||||
#include <gst/gsttag.h>
|
#include <gst/gsttag.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS typedef struct _GstElementDetails GstElementDetails;
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
typedef struct _GstElementDetails GstElementDetails;
|
||||||
|
|
||||||
/* FIXME: need translatable stuff in here (how handle in registry)? */
|
/* FIXME: need translatable stuff in here (how handle in registry)? */
|
||||||
struct _GstElementDetails
|
struct _GstElementDetails {
|
||||||
{
|
gchar *longname; /* long, english name */
|
||||||
gchar *longname; /* long, english name */
|
gchar *klass; /* type of element, as hierarchy */
|
||||||
gchar *klass; /* type of element, as hierarchy */
|
gchar *description; /* insights of one form or another */
|
||||||
gchar *description; /* insights of one form or another */
|
gchar *author; /* who wrote this thing? */
|
||||||
gchar *author; /* who wrote this thing? */
|
|
||||||
|
|
||||||
gpointer _gst_reserved[GST_PADDING];
|
gpointer _gst_reserved[GST_PADDING];
|
||||||
};
|
};
|
||||||
|
|
||||||
#define GST_ELEMENT_DETAILS(longname,klass,description,author) \
|
#define GST_ELEMENT_DETAILS(longname,klass,description,author) \
|
||||||
{ longname, klass, description, author, GST_PADDING_INIT }
|
{ longname, klass, description, author, GST_PADDING_INIT }
|
||||||
#define GST_IS_ELEMENT_DETAILS(details) ( \
|
#define GST_IS_ELEMENT_DETAILS(details) ( \
|
||||||
|
@ -98,10 +98,9 @@ extern GType _gst_element_type;
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef enum
|
typedef enum {
|
||||||
{
|
|
||||||
/* element is complex (for some def.) and generally require a cothread */
|
/* element is complex (for some def.) and generally require a cothread */
|
||||||
GST_ELEMENT_COMPLEX = GST_OBJECT_FLAG_LAST,
|
GST_ELEMENT_COMPLEX = GST_OBJECT_FLAG_LAST,
|
||||||
/* input and output pads aren't directly coupled to each other
|
/* input and output pads aren't directly coupled to each other
|
||||||
examples: queues, multi-output async readers, etc. */
|
examples: queues, multi-output async readers, etc. */
|
||||||
GST_ELEMENT_DECOUPLED,
|
GST_ELEMENT_DECOUPLED,
|
||||||
|
@ -128,9 +127,8 @@ typedef enum
|
||||||
GST_ELEMENT_IN_ERROR,
|
GST_ELEMENT_IN_ERROR,
|
||||||
|
|
||||||
/* use some padding for future expansion */
|
/* use some padding for future expansion */
|
||||||
GST_ELEMENT_FLAG_LAST = GST_OBJECT_FLAG_LAST + 16
|
GST_ELEMENT_FLAG_LAST = GST_OBJECT_FLAG_LAST + 16
|
||||||
}
|
} GstElementFlags;
|
||||||
GstElementFlags;
|
|
||||||
|
|
||||||
#define GST_ELEMENT_IS_THREAD_SUGGESTED(obj) (GST_FLAG_IS_SET(obj,GST_ELEMENT_THREAD_SUGGESTED))
|
#define GST_ELEMENT_IS_THREAD_SUGGESTED(obj) (GST_FLAG_IS_SET(obj,GST_ELEMENT_THREAD_SUGGESTED))
|
||||||
#define GST_ELEMENT_IS_EVENT_AWARE(obj) (GST_FLAG_IS_SET(obj,GST_ELEMENT_EVENT_AWARE))
|
#define GST_ELEMENT_IS_EVENT_AWARE(obj) (GST_FLAG_IS_SET(obj,GST_ELEMENT_EVENT_AWARE))
|
||||||
|
@ -156,124 +154,113 @@ GstElementFlags;
|
||||||
typedef struct _GstElementFactory GstElementFactory;
|
typedef struct _GstElementFactory GstElementFactory;
|
||||||
typedef struct _GstElementFactoryClass GstElementFactoryClass;
|
typedef struct _GstElementFactoryClass GstElementFactoryClass;
|
||||||
|
|
||||||
typedef void (*GstElementLoopFunction) (GstElement * element);
|
typedef void (*GstElementLoopFunction) (GstElement *element);
|
||||||
typedef void (*GstElementPreRunFunction) (GstElement * element);
|
typedef void (*GstElementPreRunFunction) (GstElement *element);
|
||||||
typedef void (*GstElementPostRunFunction) (GstElement * element);
|
typedef void (*GstElementPostRunFunction) (GstElement *element);
|
||||||
|
|
||||||
struct _GstElement
|
struct _GstElement {
|
||||||
{
|
GstObject object;
|
||||||
GstObject object;
|
|
||||||
|
|
||||||
/* element state and scheduling */
|
/* element state and scheduling */
|
||||||
guint8 current_state;
|
guint8 current_state;
|
||||||
guint8 pending_state;
|
guint8 pending_state;
|
||||||
GstElementLoopFunction loopfunc;
|
GstElementLoopFunction loopfunc;
|
||||||
|
|
||||||
GstScheduler *sched;
|
GstScheduler *sched;
|
||||||
gpointer sched_private;
|
gpointer sched_private;
|
||||||
|
|
||||||
/* allocated clock */
|
/* allocated clock */
|
||||||
GstClock *clock;
|
GstClock *clock;
|
||||||
GstClockTimeDiff base_time; /* NULL/READY: 0 - PAUSED: current time - PLAYING: difference to clock */
|
GstClockTimeDiff base_time; /* NULL/READY: 0 - PAUSED: current time - PLAYING: difference to clock */
|
||||||
|
|
||||||
/* element pads */
|
/* element pads */
|
||||||
guint16 numpads;
|
guint16 numpads;
|
||||||
guint16 numsrcpads;
|
guint16 numsrcpads;
|
||||||
guint16 numsinkpads;
|
guint16 numsinkpads;
|
||||||
GList *pads;
|
GList *pads;
|
||||||
|
|
||||||
GMutex *state_mutex;
|
GMutex *state_mutex;
|
||||||
GCond *state_cond;
|
GCond *state_cond;
|
||||||
|
|
||||||
GstElementPreRunFunction pre_run_func;
|
GstElementPreRunFunction pre_run_func;
|
||||||
GstElementPostRunFunction post_run_func;
|
GstElementPostRunFunction post_run_func;
|
||||||
GAsyncQueue *prop_value_queue;
|
GAsyncQueue *prop_value_queue;
|
||||||
GMutex *property_mutex;
|
GMutex *property_mutex;
|
||||||
|
|
||||||
gpointer _gst_reserved[GST_PADDING];
|
gpointer _gst_reserved[GST_PADDING];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstElementClass
|
struct _GstElementClass {
|
||||||
{
|
GstObjectClass parent_class;
|
||||||
GstObjectClass parent_class;
|
|
||||||
|
|
||||||
/* the element details */
|
/* the element details */
|
||||||
GstElementDetails details;
|
GstElementDetails details;
|
||||||
|
|
||||||
/* factory that the element was created from */
|
/* factory that the element was created from */
|
||||||
GstElementFactory *elementfactory;
|
GstElementFactory *elementfactory;
|
||||||
|
|
||||||
/* templates for our pads */
|
/* templates for our pads */
|
||||||
GList *padtemplates;
|
GList *padtemplates;
|
||||||
gint numpadtemplates;
|
gint numpadtemplates;
|
||||||
|
|
||||||
/* signal callbacks */
|
/* signal callbacks */
|
||||||
void (*state_change) (GstElement * element, GstElementState old,
|
void (*state_change) (GstElement *element, GstElementState old, GstElementState state);
|
||||||
GstElementState state);
|
void (*new_pad) (GstElement *element, GstPad *pad);
|
||||||
void (*new_pad) (GstElement * element, GstPad * pad);
|
void (*pad_removed) (GstElement *element, GstPad *pad);
|
||||||
void (*pad_removed) (GstElement * element, GstPad * pad);
|
void (*error) (GstElement *element, GstElement *source, GError *error, gchar *debug);
|
||||||
void (*error) (GstElement * element, GstElement * source, GError * error,
|
void (*eos) (GstElement *element);
|
||||||
gchar * debug);
|
void (*found_tag) (GstElement *element, GstElement *source, const GstTagList *tag_list);
|
||||||
void (*eos) (GstElement * element);
|
|
||||||
void (*found_tag) (GstElement * element, GstElement * source,
|
|
||||||
const GstTagList * tag_list);
|
|
||||||
|
|
||||||
/* local pointers for get/set */
|
/* local pointers for get/set */
|
||||||
void (*set_property) (GObject * object, guint prop_id, const GValue * value,
|
void (*set_property) (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec);
|
||||||
GParamSpec * pspec);
|
void (*get_property) (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec);
|
||||||
void (*get_property) (GObject * object, guint prop_id, GValue * value,
|
|
||||||
GParamSpec * pspec);
|
|
||||||
|
|
||||||
/* vtable */
|
/* vtable*/
|
||||||
gboolean (*release_locks) (GstElement * element);
|
gboolean (*release_locks) (GstElement *element);
|
||||||
|
|
||||||
/* query/convert/events functions */
|
/* query/convert/events functions */
|
||||||
const GstEventMask *(*get_event_masks) (GstElement * element);
|
const GstEventMask* (*get_event_masks) (GstElement *element);
|
||||||
gboolean (*send_event) (GstElement * element, GstEvent * event);
|
gboolean (*send_event) (GstElement *element, GstEvent *event);
|
||||||
const GstFormat *(*get_formats) (GstElement * element);
|
const GstFormat* (*get_formats) (GstElement *element);
|
||||||
gboolean (*convert) (GstElement * element,
|
gboolean (*convert) (GstElement *element,
|
||||||
GstFormat src_format, gint64 src_value,
|
GstFormat src_format, gint64 src_value,
|
||||||
GstFormat * dest_format, gint64 * dest_value);
|
GstFormat *dest_format, gint64 *dest_value);
|
||||||
const GstQueryType *(*get_query_types) (GstElement * element);
|
const GstQueryType* (*get_query_types) (GstElement *element);
|
||||||
gboolean (*query) (GstElement * element, GstQueryType type,
|
gboolean (*query) (GstElement *element, GstQueryType type,
|
||||||
GstFormat * format, gint64 * value);
|
GstFormat *format, gint64 *value);
|
||||||
|
|
||||||
/* change the element state */
|
/* change the element state */
|
||||||
GstElementStateReturn (*change_state) (GstElement * element);
|
GstElementStateReturn (*change_state) (GstElement *element);
|
||||||
|
|
||||||
/* request/release pads */
|
/* request/release pads */
|
||||||
GstPad *(*request_new_pad) (GstElement * element, GstPadTemplate * templ,
|
GstPad* (*request_new_pad) (GstElement *element, GstPadTemplate *templ, const gchar* name);
|
||||||
const gchar * name);
|
void (*release_pad) (GstElement *element, GstPad *pad);
|
||||||
void (*release_pad) (GstElement * element, GstPad * pad);
|
|
||||||
|
|
||||||
/* set/get clocks */
|
/* set/get clocks */
|
||||||
GstClock *(*get_clock) (GstElement * element);
|
GstClock* (*get_clock) (GstElement *element);
|
||||||
void (*set_clock) (GstElement * element, GstClock * clock);
|
void (*set_clock) (GstElement *element, GstClock *clock);
|
||||||
|
|
||||||
/* index */
|
/* index */
|
||||||
GstIndex *(*get_index) (GstElement * element);
|
GstIndex* (*get_index) (GstElement *element);
|
||||||
void (*set_index) (GstElement * element, GstIndex * index);
|
void (*set_index) (GstElement *element, GstIndex *index);
|
||||||
|
|
||||||
GstElementStateReturn (*set_state) (GstElement * element,
|
GstElementStateReturn (*set_state) (GstElement *element, GstElementState state);
|
||||||
GstElementState state);
|
|
||||||
gpointer _gst_reserved[GST_PADDING];
|
gpointer _gst_reserved[GST_PADDING];
|
||||||
};
|
};
|
||||||
|
|
||||||
void gst_element_class_add_pad_template (GstElementClass * klass,
|
void gst_element_class_add_pad_template (GstElementClass *klass, GstPadTemplate *templ);
|
||||||
GstPadTemplate * templ);
|
void gst_element_class_install_std_props (GstElementClass *klass,
|
||||||
void gst_element_class_install_std_props (GstElementClass * klass,
|
const gchar *first_name, ...);
|
||||||
const gchar * first_name, ...);
|
void gst_element_class_set_details (GstElementClass *klass,
|
||||||
void gst_element_class_set_details (GstElementClass * klass,
|
const GstElementDetails *details);
|
||||||
const GstElementDetails * details);
|
|
||||||
|
|
||||||
#define gst_element_default_deep_notify gst_object_default_deep_notify
|
#define gst_element_default_deep_notify gst_object_default_deep_notify
|
||||||
|
|
||||||
void gst_element_default_error (GObject * object, GstObject * orig,
|
void gst_element_default_error (GObject *object, GstObject *orig, GError *error, gchar *debug);
|
||||||
GError * error, gchar * debug);
|
|
||||||
|
|
||||||
GType gst_element_get_type (void);
|
GType gst_element_get_type (void);
|
||||||
void gst_element_set_loop_function (GstElement * element,
|
void gst_element_set_loop_function (GstElement *element,
|
||||||
GstElementLoopFunction loop);
|
GstElementLoopFunction loop);
|
||||||
|
|
||||||
#define gst_element_get_name(elem) gst_object_get_name(GST_OBJECT(elem))
|
#define gst_element_get_name(elem) gst_object_get_name(GST_OBJECT(elem))
|
||||||
#define gst_element_set_name(elem,name) gst_object_set_name(GST_OBJECT(elem),name)
|
#define gst_element_set_name(elem,name) gst_object_set_name(GST_OBJECT(elem),name)
|
||||||
|
@ -281,129 +268,125 @@ void gst_element_set_loop_function (GstElement * element,
|
||||||
#define gst_element_set_parent(elem,parent) gst_object_set_parent(GST_OBJECT(elem),parent)
|
#define gst_element_set_parent(elem,parent) gst_object_set_parent(GST_OBJECT(elem),parent)
|
||||||
|
|
||||||
/* threadsafe versions of their g_object_* counterparts */
|
/* threadsafe versions of their g_object_* counterparts */
|
||||||
void gst_element_set (GstElement * element, const gchar * first_property_name,
|
void gst_element_set (GstElement *element, const gchar *first_property_name, ...);
|
||||||
...);
|
void gst_element_get (GstElement *element, const gchar *first_property_name, ...);
|
||||||
void gst_element_get (GstElement * element, const gchar * first_property_name,
|
void gst_element_set_valist (GstElement *element, const gchar *first_property_name,
|
||||||
...);
|
va_list var_args);
|
||||||
void gst_element_set_valist (GstElement * element,
|
void gst_element_get_valist (GstElement *element, const gchar *first_property_name,
|
||||||
const gchar * first_property_name, va_list var_args);
|
va_list var_args);
|
||||||
void gst_element_get_valist (GstElement * element,
|
void gst_element_set_property (GstElement *element, const gchar *property_name,
|
||||||
const gchar * first_property_name, va_list var_args);
|
const GValue *value);
|
||||||
void gst_element_set_property (GstElement * element,
|
void gst_element_get_property (GstElement *element, const gchar *property_name,
|
||||||
const gchar * property_name, const GValue * value);
|
GValue *value);
|
||||||
void gst_element_get_property (GstElement * element,
|
|
||||||
const gchar * property_name, GValue * value);
|
|
||||||
|
|
||||||
void gst_element_enable_threadsafe_properties (GstElement * element);
|
void gst_element_enable_threadsafe_properties (GstElement *element);
|
||||||
void gst_element_disable_threadsafe_properties (GstElement * element);
|
void gst_element_disable_threadsafe_properties (GstElement *element);
|
||||||
void gst_element_set_pending_properties (GstElement * element);
|
void gst_element_set_pending_properties (GstElement *element);
|
||||||
|
|
||||||
/* clocking */
|
/* clocking */
|
||||||
gboolean gst_element_requires_clock (GstElement * element);
|
gboolean gst_element_requires_clock (GstElement *element);
|
||||||
gboolean gst_element_provides_clock (GstElement * element);
|
gboolean gst_element_provides_clock (GstElement *element);
|
||||||
GstClock *gst_element_get_clock (GstElement * element);
|
GstClock* gst_element_get_clock (GstElement *element);
|
||||||
void gst_element_set_clock (GstElement * element, GstClock * clock);
|
void gst_element_set_clock (GstElement *element, GstClock *clock);
|
||||||
GstClockReturn gst_element_clock_wait (GstElement * element,
|
GstClockReturn gst_element_clock_wait (GstElement *element,
|
||||||
GstClockID id, GstClockTimeDiff * jitter);
|
GstClockID id, GstClockTimeDiff *jitter);
|
||||||
GstClockTime gst_element_get_time (GstElement * element);
|
GstClockTime gst_element_get_time (GstElement *element);
|
||||||
gboolean gst_element_wait (GstElement * element, GstClockTime timestamp);
|
gboolean gst_element_wait (GstElement *element, GstClockTime timestamp);
|
||||||
void gst_element_set_time (GstElement * element, GstClockTime time);
|
void gst_element_set_time (GstElement *element, GstClockTime time);
|
||||||
void gst_element_adjust_time (GstElement * element, GstClockTimeDiff diff);
|
void gst_element_adjust_time (GstElement *element, GstClockTimeDiff diff);
|
||||||
|
|
||||||
/* indexs */
|
/* indexs */
|
||||||
gboolean gst_element_is_indexable (GstElement * element);
|
gboolean gst_element_is_indexable (GstElement *element);
|
||||||
void gst_element_set_index (GstElement * element, GstIndex * index);
|
void gst_element_set_index (GstElement *element, GstIndex *index);
|
||||||
GstIndex *gst_element_get_index (GstElement * element);
|
GstIndex* gst_element_get_index (GstElement *element);
|
||||||
|
|
||||||
|
|
||||||
gboolean gst_element_release_locks (GstElement * element);
|
gboolean gst_element_release_locks (GstElement *element);
|
||||||
|
|
||||||
void gst_element_yield (GstElement * element);
|
void gst_element_yield (GstElement *element);
|
||||||
gboolean gst_element_interrupt (GstElement * element);
|
gboolean gst_element_interrupt (GstElement *element);
|
||||||
void gst_element_set_scheduler (GstElement * element, GstScheduler * sched);
|
void gst_element_set_scheduler (GstElement *element, GstScheduler *sched);
|
||||||
GstScheduler *gst_element_get_scheduler (GstElement * element);
|
GstScheduler* gst_element_get_scheduler (GstElement *element);
|
||||||
|
|
||||||
void gst_element_add_pad (GstElement * element, GstPad * pad);
|
void gst_element_add_pad (GstElement *element, GstPad *pad);
|
||||||
void gst_element_remove_pad (GstElement * element, GstPad * pad);
|
void gst_element_remove_pad (GstElement *element, GstPad *pad);
|
||||||
GstPad *gst_element_add_ghost_pad (GstElement * element, GstPad * pad,
|
GstPad * gst_element_add_ghost_pad (GstElement *element, GstPad *pad, const gchar *name);
|
||||||
const gchar * name);
|
void gst_element_remove_ghost_pad (GstElement *element, GstPad *pad);
|
||||||
void gst_element_remove_ghost_pad (GstElement * element, GstPad * pad);
|
|
||||||
|
|
||||||
GstPad *gst_element_get_pad (GstElement * element, const gchar * name);
|
GstPad* gst_element_get_pad (GstElement *element, const gchar *name);
|
||||||
GstPad *gst_element_get_static_pad (GstElement * element, const gchar * name);
|
GstPad* gst_element_get_static_pad (GstElement *element, const gchar *name);
|
||||||
GstPad *gst_element_get_request_pad (GstElement * element, const gchar * name);
|
GstPad* gst_element_get_request_pad (GstElement *element, const gchar *name);
|
||||||
void gst_element_release_request_pad (GstElement * element, GstPad * pad);
|
void gst_element_release_request_pad (GstElement *element, GstPad *pad);
|
||||||
|
|
||||||
G_CONST_RETURN GList *gst_element_get_pad_list (GstElement * element);
|
G_CONST_RETURN GList*
|
||||||
GstPad *gst_element_get_compatible_pad (GstElement * element, GstPad * pad);
|
gst_element_get_pad_list (GstElement *element);
|
||||||
GstPad *gst_element_get_compatible_pad_filtered (GstElement * element,
|
GstPad* gst_element_get_compatible_pad (GstElement *element, GstPad *pad);
|
||||||
GstPad * pad, const GstCaps * filtercaps);
|
GstPad* gst_element_get_compatible_pad_filtered (GstElement *element, GstPad *pad,
|
||||||
|
const GstCaps *filtercaps);
|
||||||
|
|
||||||
GstPadTemplate *gst_element_class_get_pad_template (GstElementClass *
|
GstPadTemplate* gst_element_class_get_pad_template (GstElementClass *element_class, const gchar *name);
|
||||||
element_class, const gchar * name);
|
GList* gst_element_class_get_pad_template_list (GstElementClass *element_class);
|
||||||
GList *gst_element_class_get_pad_template_list (GstElementClass *
|
GstPadTemplate* gst_element_get_pad_template (GstElement *element, const gchar *name);
|
||||||
element_class);
|
GList* gst_element_get_pad_template_list (GstElement *element);
|
||||||
GstPadTemplate *gst_element_get_pad_template (GstElement * element,
|
GstPadTemplate* gst_element_get_compatible_pad_template (GstElement *element, GstPadTemplate *compattempl);
|
||||||
const gchar * name);
|
|
||||||
GList *gst_element_get_pad_template_list (GstElement * element);
|
|
||||||
GstPadTemplate *gst_element_get_compatible_pad_template (GstElement * element,
|
|
||||||
GstPadTemplate * compattempl);
|
|
||||||
|
|
||||||
gboolean gst_element_link (GstElement * src, GstElement * dest);
|
gboolean gst_element_link (GstElement *src, GstElement *dest);
|
||||||
gboolean gst_element_link_many (GstElement * element_1,
|
gboolean gst_element_link_many (GstElement *element_1,
|
||||||
GstElement * element_2, ...);
|
GstElement *element_2, ...);
|
||||||
gboolean gst_element_link_filtered (GstElement * src, GstElement * dest,
|
gboolean gst_element_link_filtered (GstElement *src, GstElement *dest,
|
||||||
const GstCaps * filtercaps);
|
const GstCaps *filtercaps);
|
||||||
void gst_element_unlink (GstElement * src, GstElement * dest);
|
void gst_element_unlink (GstElement *src, GstElement *dest);
|
||||||
void gst_element_unlink_many (GstElement * element_1,
|
void gst_element_unlink_many (GstElement *element_1,
|
||||||
GstElement * element_2, ...);
|
GstElement *element_2, ...);
|
||||||
|
|
||||||
gboolean gst_element_link_pads (GstElement * src, const gchar * srcpadname,
|
gboolean gst_element_link_pads (GstElement *src, const gchar *srcpadname,
|
||||||
GstElement * dest, const gchar * destpadname);
|
GstElement *dest, const gchar *destpadname);
|
||||||
gboolean gst_element_link_pads_filtered (GstElement * src,
|
gboolean gst_element_link_pads_filtered (GstElement *src, const gchar *srcpadname,
|
||||||
const gchar * srcpadname, GstElement * dest, const gchar * destpadname,
|
GstElement *dest, const gchar *destpadname,
|
||||||
const GstCaps * filtercaps);
|
const GstCaps *filtercaps);
|
||||||
void gst_element_unlink_pads (GstElement * src, const gchar * srcpadname,
|
void gst_element_unlink_pads (GstElement *src, const gchar *srcpadname,
|
||||||
GstElement * dest, const gchar * destpadname);
|
GstElement *dest, const gchar *destpadname);
|
||||||
|
|
||||||
G_CONST_RETURN GstEventMask *gst_element_get_event_masks (GstElement * element);
|
G_CONST_RETURN GstEventMask*
|
||||||
gboolean gst_element_send_event (GstElement * element, GstEvent * event);
|
gst_element_get_event_masks (GstElement *element);
|
||||||
gboolean gst_element_seek (GstElement * element, GstSeekType seek_type,
|
gboolean gst_element_send_event (GstElement *element, GstEvent *event);
|
||||||
guint64 offset);
|
gboolean gst_element_seek (GstElement *element, GstSeekType seek_type,
|
||||||
G_CONST_RETURN GstQueryType *gst_element_get_query_types (GstElement * element);
|
guint64 offset);
|
||||||
gboolean gst_element_query (GstElement * element, GstQueryType type,
|
G_CONST_RETURN GstQueryType*
|
||||||
GstFormat * format, gint64 * value);
|
gst_element_get_query_types (GstElement *element);
|
||||||
G_CONST_RETURN GstFormat *gst_element_get_formats (GstElement * element);
|
gboolean gst_element_query (GstElement *element, GstQueryType type,
|
||||||
gboolean gst_element_convert (GstElement * element,
|
GstFormat *format, gint64 *value);
|
||||||
GstFormat src_format, gint64 src_value,
|
G_CONST_RETURN GstFormat*
|
||||||
GstFormat * dest_format, gint64 * dest_value);
|
gst_element_get_formats (GstElement *element);
|
||||||
|
gboolean gst_element_convert (GstElement *element,
|
||||||
|
GstFormat src_format, gint64 src_value,
|
||||||
|
GstFormat *dest_format, gint64 *dest_value);
|
||||||
|
|
||||||
void gst_element_found_tags (GstElement * element, const GstTagList * tag_list);
|
void gst_element_found_tags (GstElement *element, const GstTagList *tag_list);
|
||||||
void gst_element_found_tags_for_pad (GstElement * element, GstPad * pad,
|
void gst_element_found_tags_for_pad (GstElement *element, GstPad *pad, GstClockTime timestamp,
|
||||||
GstClockTime timestamp, GstTagList * list);
|
GstTagList *list);
|
||||||
|
|
||||||
void gst_element_set_eos (GstElement * element);
|
void gst_element_set_eos (GstElement *element);
|
||||||
|
|
||||||
gchar *_gst_element_error_printf (const gchar * format, ...);
|
gchar * _gst_element_error_printf (const gchar *format, ...);
|
||||||
void gst_element_error_full (GstElement * element, GQuark domain, gint code,
|
void gst_element_error_full (GstElement *element, GQuark domain, gint code,
|
||||||
gchar * message, gchar * debug,
|
gchar *message, gchar *debug,
|
||||||
const gchar * file, const gchar * function, gint line);
|
const gchar *file, const gchar *function, gint line);
|
||||||
|
|
||||||
gboolean gst_element_is_locked_state (GstElement * element);
|
gboolean gst_element_is_locked_state (GstElement *element);
|
||||||
void gst_element_set_locked_state (GstElement * element, gboolean locked_state);
|
void gst_element_set_locked_state (GstElement *element, gboolean locked_state);
|
||||||
gboolean gst_element_sync_state_with_parent (GstElement * element);
|
gboolean gst_element_sync_state_with_parent (GstElement *element);
|
||||||
|
|
||||||
GstElementState gst_element_get_state (GstElement * element);
|
GstElementState gst_element_get_state (GstElement *element);
|
||||||
GstElementStateReturn gst_element_set_state (GstElement * element,
|
GstElementStateReturn gst_element_set_state (GstElement *element, GstElementState state);
|
||||||
GstElementState state);
|
|
||||||
|
|
||||||
void gst_element_wait_state_change (GstElement * element);
|
void gst_element_wait_state_change (GstElement *element);
|
||||||
|
|
||||||
|
G_CONST_RETURN gchar* gst_element_state_get_name (GstElementState state);
|
||||||
|
|
||||||
G_CONST_RETURN gchar *gst_element_state_get_name (GstElementState state);
|
GstElementFactory* gst_element_get_factory (GstElement *element);
|
||||||
|
|
||||||
GstElementFactory *gst_element_get_factory (GstElement * element);
|
GstBin* gst_element_get_managing_bin (GstElement *element);
|
||||||
|
|
||||||
GstBin *gst_element_get_managing_bin (GstElement * element);
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -420,69 +403,66 @@ GstBin *gst_element_get_managing_bin (GstElement * element);
|
||||||
#define GST_IS_ELEMENT_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_ELEMENT_FACTORY))
|
#define GST_IS_ELEMENT_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_ELEMENT_FACTORY))
|
||||||
#define GST_IS_ELEMENT_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_ELEMENT_FACTORY))
|
#define GST_IS_ELEMENT_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_ELEMENT_FACTORY))
|
||||||
|
|
||||||
struct _GstElementFactory
|
struct _GstElementFactory {
|
||||||
{
|
GstPluginFeature parent;
|
||||||
GstPluginFeature parent;
|
|
||||||
|
|
||||||
GType type; /* unique GType of element or 0 if not loaded */
|
GType type; /* unique GType of element or 0 if not loaded */
|
||||||
|
|
||||||
GstElementDetails details;
|
GstElementDetails details;
|
||||||
|
|
||||||
GList *padtemplates;
|
GList * padtemplates;
|
||||||
guint numpadtemplates;
|
guint numpadtemplates;
|
||||||
|
|
||||||
/* URI interface stuff */
|
/* URI interface stuff */
|
||||||
guint uri_type;
|
guint uri_type;
|
||||||
gchar **uri_protocols;
|
gchar ** uri_protocols;
|
||||||
|
|
||||||
GList *interfaces; /* interfaces this element implements */
|
GList * interfaces; /* interfaces this element implements */
|
||||||
|
|
||||||
gpointer _gst_reserved[GST_PADDING];
|
gpointer _gst_reserved[GST_PADDING];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstElementFactoryClass
|
struct _GstElementFactoryClass {
|
||||||
{
|
|
||||||
GstPluginFeatureClass parent_class;
|
GstPluginFeatureClass parent_class;
|
||||||
|
|
||||||
gpointer _gst_reserved[GST_PADDING];
|
gpointer _gst_reserved[GST_PADDING];
|
||||||
};
|
};
|
||||||
|
|
||||||
GType gst_element_factory_get_type (void);
|
GType gst_element_factory_get_type (void);
|
||||||
|
|
||||||
gboolean gst_element_register (GstPlugin * plugin,
|
gboolean gst_element_register (GstPlugin *plugin,
|
||||||
const gchar * elementname, guint rank, GType type);
|
const gchar *elementname,
|
||||||
|
guint rank,
|
||||||
|
GType type);
|
||||||
|
|
||||||
GstElementFactory *gst_element_factory_find (const gchar * name);
|
GstElementFactory * gst_element_factory_find (const gchar *name);
|
||||||
GType gst_element_factory_get_element_type (GstElementFactory * factory);
|
GType gst_element_factory_get_element_type (GstElementFactory *factory);
|
||||||
G_CONST_RETURN gchar *gst_element_factory_get_longname (GstElementFactory *
|
G_CONST_RETURN gchar * gst_element_factory_get_longname (GstElementFactory *factory);
|
||||||
factory);
|
G_CONST_RETURN gchar * gst_element_factory_get_klass (GstElementFactory *factory);
|
||||||
G_CONST_RETURN gchar *gst_element_factory_get_klass (GstElementFactory *
|
G_CONST_RETURN gchar * gst_element_factory_get_description (GstElementFactory *factory);
|
||||||
factory);
|
G_CONST_RETURN gchar * gst_element_factory_get_author (GstElementFactory *factory);
|
||||||
G_CONST_RETURN gchar *gst_element_factory_get_description (GstElementFactory *
|
guint gst_element_factory_get_num_pad_templates (GstElementFactory *factory);
|
||||||
factory);
|
G_CONST_RETURN GList * gst_element_factory_get_pad_templates (GstElementFactory *factory);
|
||||||
G_CONST_RETURN gchar *gst_element_factory_get_author (GstElementFactory *
|
guint gst_element_factory_get_uri_type (GstElementFactory *factory);
|
||||||
factory);
|
gchar ** gst_element_factory_get_uri_protocols (GstElementFactory *factory);
|
||||||
guint gst_element_factory_get_num_pad_templates (GstElementFactory * factory);
|
|
||||||
G_CONST_RETURN GList *gst_element_factory_get_pad_templates (GstElementFactory *
|
|
||||||
factory);
|
|
||||||
guint gst_element_factory_get_uri_type (GstElementFactory * factory);
|
|
||||||
gchar **gst_element_factory_get_uri_protocols (GstElementFactory * factory);
|
|
||||||
|
|
||||||
GstElement *gst_element_factory_create (GstElementFactory * factory,
|
GstElement* gst_element_factory_create (GstElementFactory *factory,
|
||||||
const gchar * name);
|
const gchar *name);
|
||||||
GstElement *gst_element_factory_make (const gchar * factoryname,
|
GstElement* gst_element_factory_make (const gchar *factoryname, const gchar *name);
|
||||||
const gchar * name);
|
|
||||||
|
|
||||||
gboolean gst_element_factory_can_src_caps (GstElementFactory * factory,
|
gboolean gst_element_factory_can_src_caps (GstElementFactory *factory,
|
||||||
const GstCaps * caps);
|
const GstCaps *caps);
|
||||||
gboolean gst_element_factory_can_sink_caps (GstElementFactory * factory,
|
gboolean gst_element_factory_can_sink_caps (GstElementFactory *factory,
|
||||||
const GstCaps * caps);
|
const GstCaps *caps);
|
||||||
|
|
||||||
void __gst_element_factory_add_pad_template (GstElementFactory * elementfactory,
|
void __gst_element_factory_add_pad_template (GstElementFactory *elementfactory,
|
||||||
GstPadTemplate * templ);
|
GstPadTemplate *templ);
|
||||||
void __gst_element_factory_add_interface (GstElementFactory * elementfactory,
|
void __gst_element_factory_add_interface (GstElementFactory *elementfactory,
|
||||||
const gchar * interfacename);
|
const gchar *interfacename);
|
||||||
|
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
|
||||||
#endif /* __GST_ELEMENT_H__ */
|
#endif /* __GST_ELEMENT_H__ */
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
#define __GST_ERROR_H__
|
#define __GST_ERROR_H__
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* we define FIXME error domains:
|
* we define FIXME error domains:
|
||||||
* GST_CORE_ERROR
|
* GST_CORE_ERROR
|
||||||
|
@ -30,12 +31,12 @@ G_BEGIN_DECLS
|
||||||
*
|
*
|
||||||
* Check GError API docs for rationale for naming.
|
* Check GError API docs for rationale for naming.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Core errors are anything that can go wrong in or using
|
/* Core errors are anything that can go wrong in or using
|
||||||
* the core GStreamer library */
|
* the core GStreamer library */
|
||||||
/* FIXME: should we divide in numerical blocks so we can easily add
|
/* FIXME: should we divide in numerical blocks so we can easily add
|
||||||
for example PAD errors later ? */
|
for example PAD errors later ? */
|
||||||
typedef enum
|
typedef enum {
|
||||||
{
|
|
||||||
GST_CORE_ERROR_FAILED = 1,
|
GST_CORE_ERROR_FAILED = 1,
|
||||||
GST_CORE_ERROR_TOO_LAZY,
|
GST_CORE_ERROR_TOO_LAZY,
|
||||||
GST_CORE_ERROR_NOT_IMPLEMENTED,
|
GST_CORE_ERROR_NOT_IMPLEMENTED,
|
||||||
|
@ -54,8 +55,7 @@ GstCoreError;
|
||||||
|
|
||||||
/* Library errors are for errors from the library being used by elements
|
/* Library errors are for errors from the library being used by elements
|
||||||
initializing, closing, ... */
|
initializing, closing, ... */
|
||||||
typedef enum
|
typedef enum {
|
||||||
{
|
|
||||||
GST_LIBRARY_ERROR_FAILED = 1,
|
GST_LIBRARY_ERROR_FAILED = 1,
|
||||||
GST_LIBRARY_ERROR_TOO_LAZY,
|
GST_LIBRARY_ERROR_TOO_LAZY,
|
||||||
GST_LIBRARY_ERROR_INIT,
|
GST_LIBRARY_ERROR_INIT,
|
||||||
|
@ -69,8 +69,7 @@ GstLibraryError;
|
||||||
/* Resource errors are for anything external used by an element:
|
/* Resource errors are for anything external used by an element:
|
||||||
memory, files, network connections, process space, ...
|
memory, files, network connections, process space, ...
|
||||||
They're typically used by source and sink elements */
|
They're typically used by source and sink elements */
|
||||||
typedef enum
|
typedef enum {
|
||||||
{
|
|
||||||
GST_RESOURCE_ERROR_FAILED = 1,
|
GST_RESOURCE_ERROR_FAILED = 1,
|
||||||
GST_RESOURCE_ERROR_TOO_LAZY,
|
GST_RESOURCE_ERROR_TOO_LAZY,
|
||||||
GST_RESOURCE_ERROR_NOT_FOUND,
|
GST_RESOURCE_ERROR_NOT_FOUND,
|
||||||
|
@ -91,8 +90,7 @@ GstResourceError;
|
||||||
/* Stream errors are for anything related to the stream being processed:
|
/* Stream errors are for anything related to the stream being processed:
|
||||||
format errors, media type errors, ...
|
format errors, media type errors, ...
|
||||||
They're typically used by decoders, demuxers, converters, ... */
|
They're typically used by decoders, demuxers, converters, ... */
|
||||||
typedef enum
|
typedef enum {
|
||||||
{
|
|
||||||
GST_STREAM_ERROR_FAILED = 1,
|
GST_STREAM_ERROR_FAILED = 1,
|
||||||
GST_STREAM_ERROR_TOO_LAZY,
|
GST_STREAM_ERROR_TOO_LAZY,
|
||||||
GST_STREAM_ERROR_NOT_IMPLEMENTED,
|
GST_STREAM_ERROR_NOT_IMPLEMENTED,
|
||||||
|
@ -118,12 +116,15 @@ GstStreamError;
|
||||||
|
|
||||||
#define GST_ERROR_SYSTEM ("system error: %s", g_strerror (errno))
|
#define GST_ERROR_SYSTEM ("system error: %s", g_strerror (errno))
|
||||||
|
|
||||||
GType gst_g_error_get_type (void);
|
GType gst_g_error_get_type (void);
|
||||||
gchar *gst_error_get_message (GQuark domain, gint code);
|
gchar * gst_error_get_message (GQuark domain, gint code);
|
||||||
GQuark gst_stream_error_quark (void);
|
GQuark gst_stream_error_quark (void);
|
||||||
GQuark gst_core_error_quark (void);
|
GQuark gst_core_error_quark (void);
|
||||||
GQuark gst_resource_error_quark (void);
|
GQuark gst_resource_error_quark (void);
|
||||||
GQuark gst_library_error_quark (void);
|
GQuark gst_library_error_quark (void);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GST_ERROR_H__ */
|
#endif /* __GST_ERROR_H__ */
|
||||||
|
|
||||||
|
|
||||||
|
|
194
gst/gstevent.h
194
gst/gstevent.h
|
@ -30,29 +30,29 @@
|
||||||
#include <gst/gstobject.h>
|
#include <gst/gstobject.h>
|
||||||
#include <gst/gststructure.h>
|
#include <gst/gststructure.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS extern GType _gst_event_type;
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
typedef enum
|
extern GType _gst_event_type;
|
||||||
{
|
|
||||||
GST_EVENT_UNKNOWN = 0,
|
typedef enum {
|
||||||
GST_EVENT_EOS = 1,
|
GST_EVENT_UNKNOWN = 0,
|
||||||
GST_EVENT_FLUSH = 2,
|
GST_EVENT_EOS = 1,
|
||||||
GST_EVENT_EMPTY = 3,
|
GST_EVENT_FLUSH = 2,
|
||||||
GST_EVENT_DISCONTINUOUS = 4,
|
GST_EVENT_EMPTY = 3,
|
||||||
/*GST_EVENT_NEW_MEDIA = 5, <- removed */
|
GST_EVENT_DISCONTINUOUS = 4,
|
||||||
GST_EVENT_QOS = 6,
|
/*GST_EVENT_NEW_MEDIA = 5, <- removed */
|
||||||
GST_EVENT_SEEK = 7,
|
GST_EVENT_QOS = 6,
|
||||||
GST_EVENT_SEEK_SEGMENT = 8,
|
GST_EVENT_SEEK = 7,
|
||||||
GST_EVENT_SEGMENT_DONE = 9,
|
GST_EVENT_SEEK_SEGMENT = 8,
|
||||||
GST_EVENT_SIZE = 10,
|
GST_EVENT_SEGMENT_DONE = 9,
|
||||||
GST_EVENT_RATE = 11,
|
GST_EVENT_SIZE = 10,
|
||||||
GST_EVENT_FILLER = 12,
|
GST_EVENT_RATE = 11,
|
||||||
GST_EVENT_TS_OFFSET = 13,
|
GST_EVENT_FILLER = 12,
|
||||||
GST_EVENT_INTERRUPT = 14,
|
GST_EVENT_TS_OFFSET = 13,
|
||||||
GST_EVENT_NAVIGATION = 15,
|
GST_EVENT_INTERRUPT = 14,
|
||||||
GST_EVENT_TAG = 16
|
GST_EVENT_NAVIGATION = 15,
|
||||||
}
|
GST_EVENT_TAG = 16
|
||||||
GstEventType;
|
} GstEventType;
|
||||||
|
|
||||||
#define GST_EVENT_TRACE_NAME "GstEvent"
|
#define GST_EVENT_TRACE_NAME "GstEvent"
|
||||||
|
|
||||||
|
@ -73,21 +73,18 @@ GstEventType;
|
||||||
#define GST_SEEK_METHOD_MASK 0x000f0000
|
#define GST_SEEK_METHOD_MASK 0x000f0000
|
||||||
#define GST_SEEK_FLAGS_MASK 0xfff00000
|
#define GST_SEEK_FLAGS_MASK 0xfff00000
|
||||||
|
|
||||||
typedef enum
|
typedef enum {
|
||||||
{
|
GST_EVENT_FLAG_NONE = 0,
|
||||||
GST_EVENT_FLAG_NONE = 0,
|
|
||||||
|
|
||||||
/* indicates negative rates are supported */
|
/* indicates negative rates are supported */
|
||||||
GST_RATE_FLAG_NEGATIVE = (1 << 1)
|
GST_RATE_FLAG_NEGATIVE = (1 << 1)
|
||||||
}
|
} GstEventFlag;
|
||||||
GstEventFlag;
|
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
GstEventType type;
|
GstEventType type;
|
||||||
GstEventFlag flags;
|
GstEventFlag flags;
|
||||||
}
|
} GstEventMask;
|
||||||
GstEventMask;
|
|
||||||
|
|
||||||
#ifndef GST_DISABLE_DEPRECATED
|
#ifndef GST_DISABLE_DEPRECATED
|
||||||
#ifdef G_HAVE_ISO_VARARGS
|
#ifdef G_HAVE_ISO_VARARGS
|
||||||
|
@ -116,37 +113,32 @@ functionname (type pad) \
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* seek events, extends GstEventFlag */
|
/* seek events, extends GstEventFlag */
|
||||||
typedef enum
|
typedef enum {
|
||||||
{
|
|
||||||
/* | with some format */
|
/* | with some format */
|
||||||
/* | with one of these */
|
/* | with one of these */
|
||||||
GST_SEEK_METHOD_CUR = (1 << (GST_SEEK_METHOD_SHIFT + 0)),
|
GST_SEEK_METHOD_CUR = (1 << (GST_SEEK_METHOD_SHIFT + 0)),
|
||||||
GST_SEEK_METHOD_SET = (1 << (GST_SEEK_METHOD_SHIFT + 1)),
|
GST_SEEK_METHOD_SET = (1 << (GST_SEEK_METHOD_SHIFT + 1)),
|
||||||
GST_SEEK_METHOD_END = (1 << (GST_SEEK_METHOD_SHIFT + 2)),
|
GST_SEEK_METHOD_END = (1 << (GST_SEEK_METHOD_SHIFT + 2)),
|
||||||
|
|
||||||
/* | with optional seek flags */
|
/* | with optional seek flags */
|
||||||
/* seek flags */
|
/* seek flags */
|
||||||
GST_SEEK_FLAG_FLUSH = (1 << (GST_SEEK_FLAGS_SHIFT + 0)),
|
GST_SEEK_FLAG_FLUSH = (1 << (GST_SEEK_FLAGS_SHIFT + 0)),
|
||||||
GST_SEEK_FLAG_ACCURATE = (1 << (GST_SEEK_FLAGS_SHIFT + 1)),
|
GST_SEEK_FLAG_ACCURATE = (1 << (GST_SEEK_FLAGS_SHIFT + 1)),
|
||||||
GST_SEEK_FLAG_KEY_UNIT = (1 << (GST_SEEK_FLAGS_SHIFT + 2)),
|
GST_SEEK_FLAG_KEY_UNIT = (1 << (GST_SEEK_FLAGS_SHIFT + 2)),
|
||||||
GST_SEEK_FLAG_SEGMENT_LOOP = (1 << (GST_SEEK_FLAGS_SHIFT + 3))
|
GST_SEEK_FLAG_SEGMENT_LOOP = (1 << (GST_SEEK_FLAGS_SHIFT + 3))
|
||||||
|
|
||||||
|
} GstSeekType;
|
||||||
|
|
||||||
}
|
typedef enum {
|
||||||
GstSeekType;
|
|
||||||
|
|
||||||
typedef enum
|
|
||||||
{
|
|
||||||
GST_SEEK_CERTAIN,
|
GST_SEEK_CERTAIN,
|
||||||
GST_SEEK_FUZZY
|
GST_SEEK_FUZZY
|
||||||
}
|
} GstSeekAccuracy;
|
||||||
GstSeekAccuracy;
|
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
GstFormat format;
|
GstFormat format;
|
||||||
gint64 value;
|
gint64 value;
|
||||||
}
|
} GstFormatValue;
|
||||||
GstFormatValue;
|
|
||||||
|
|
||||||
#define GST_EVENT_SEEK_TYPE(event) (GST_EVENT(event)->event_data.seek.type)
|
#define GST_EVENT_SEEK_TYPE(event) (GST_EVENT(event)->event_data.seek.type)
|
||||||
#define GST_EVENT_SEEK_FORMAT(event) (GST_EVENT_SEEK_TYPE(event) & GST_SEEK_FORMAT_MASK)
|
#define GST_EVENT_SEEK_FORMAT(event) (GST_EVENT_SEEK_TYPE(event) & GST_SEEK_FORMAT_MASK)
|
||||||
|
@ -165,57 +157,44 @@ GstFormatValue;
|
||||||
|
|
||||||
#define GST_EVENT_RATE_VALUE(event) (GST_EVENT(event)->event_data.rate.value)
|
#define GST_EVENT_RATE_VALUE(event) (GST_EVENT(event)->event_data.rate.value)
|
||||||
|
|
||||||
struct _GstEvent
|
struct _GstEvent {
|
||||||
{
|
|
||||||
GstData data;
|
GstData data;
|
||||||
|
|
||||||
GstEventType type;
|
GstEventType type;
|
||||||
guint64 timestamp;
|
guint64 timestamp;
|
||||||
GstObject *src;
|
GstObject *src;
|
||||||
|
|
||||||
union
|
union {
|
||||||
{
|
struct {
|
||||||
struct
|
GstSeekType type;
|
||||||
{
|
gint64 offset;
|
||||||
GstSeekType type;
|
gint64 endoffset;
|
||||||
gint64 offset;
|
GstSeekAccuracy accuracy;
|
||||||
gint64 endoffset;
|
} seek;
|
||||||
GstSeekAccuracy accuracy;
|
struct {
|
||||||
}
|
GstFormatValue offsets[8];
|
||||||
seek;
|
gint noffsets;
|
||||||
struct
|
gboolean new_media;
|
||||||
{
|
} discont;
|
||||||
GstFormatValue offsets[8];
|
struct {
|
||||||
gint noffsets;
|
GstFormat format;
|
||||||
gboolean new_media;
|
gint64 value;
|
||||||
}
|
} size;
|
||||||
discont;
|
struct {
|
||||||
struct
|
gdouble value;
|
||||||
{
|
} rate;
|
||||||
GstFormat format;
|
struct {
|
||||||
gint64 value;
|
GstStructure *structure;
|
||||||
}
|
} structure;
|
||||||
size;
|
} event_data;
|
||||||
struct
|
|
||||||
{
|
|
||||||
gdouble value;
|
|
||||||
}
|
|
||||||
rate;
|
|
||||||
struct
|
|
||||||
{
|
|
||||||
GstStructure *structure;
|
|
||||||
}
|
|
||||||
structure;
|
|
||||||
}
|
|
||||||
event_data;
|
|
||||||
|
|
||||||
gpointer _gst_reserved[GST_PADDING];
|
gpointer _gst_reserved[GST_PADDING];
|
||||||
};
|
};
|
||||||
|
|
||||||
void _gst_event_initialize (void);
|
void _gst_event_initialize (void);
|
||||||
|
|
||||||
GType gst_event_get_type (void);
|
GType gst_event_get_type (void);
|
||||||
GstEvent *gst_event_new (GstEventType type);
|
GstEvent* gst_event_new (GstEventType type);
|
||||||
|
|
||||||
/* refcounting */
|
/* refcounting */
|
||||||
#define gst_event_ref(ev) GST_EVENT (gst_data_ref (GST_DATA (ev)))
|
#define gst_event_ref(ev) GST_EVENT (gst_data_ref (GST_DATA (ev)))
|
||||||
|
@ -224,26 +203,24 @@ GstEvent *gst_event_new (GstEventType type);
|
||||||
/* copy buffer */
|
/* copy buffer */
|
||||||
#define gst_event_copy(ev) GST_EVENT (gst_data_copy (GST_DATA (ev)))
|
#define gst_event_copy(ev) GST_EVENT (gst_data_copy (GST_DATA (ev)))
|
||||||
|
|
||||||
gboolean gst_event_masks_contains (const GstEventMask * masks,
|
gboolean gst_event_masks_contains (const GstEventMask *masks, GstEventMask *mask);
|
||||||
GstEventMask * mask);
|
|
||||||
|
|
||||||
/* seek event */
|
/* seek event */
|
||||||
GstEvent *gst_event_new_seek (GstSeekType type, gint64 offset);
|
GstEvent* gst_event_new_seek (GstSeekType type, gint64 offset);
|
||||||
|
|
||||||
GstEvent *gst_event_new_segment_seek (GstSeekType type, gint64 start,
|
GstEvent* gst_event_new_segment_seek (GstSeekType type, gint64 start, gint64 stop);
|
||||||
gint64 stop);
|
|
||||||
|
|
||||||
|
|
||||||
/* size events */
|
/* size events */
|
||||||
GstEvent *gst_event_new_size (GstFormat format, gint64 value);
|
GstEvent* gst_event_new_size (GstFormat format, gint64 value);
|
||||||
|
|
||||||
/* discontinous event */
|
/* discontinous event */
|
||||||
GstEvent *gst_event_new_discontinuous (gboolean new_media,
|
GstEvent* gst_event_new_discontinuous (gboolean new_media,
|
||||||
GstFormat format1, ...);
|
GstFormat format1, ...);
|
||||||
GstEvent *gst_event_new_discontinuous_valist (gboolean new_media,
|
GstEvent* gst_event_new_discontinuous_valist (gboolean new_media,
|
||||||
GstFormat format1, va_list var_args);
|
GstFormat format1,
|
||||||
gboolean gst_event_discont_get_value (GstEvent * event, GstFormat format,
|
va_list var_args);
|
||||||
gint64 * value);
|
gboolean gst_event_discont_get_value (GstEvent *event, GstFormat format, gint64 *value);
|
||||||
|
|
||||||
#define gst_event_new_filler() gst_event_new(GST_EVENT_FILLER)
|
#define gst_event_new_filler() gst_event_new(GST_EVENT_FILLER)
|
||||||
|
|
||||||
|
@ -251,4 +228,5 @@ gboolean gst_event_discont_get_value (GstEvent * event, GstFormat format,
|
||||||
#define gst_event_new_flush() gst_event_new(GST_EVENT_FLUSH)
|
#define gst_event_new_flush() gst_event_new(GST_EVENT_FLUSH)
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GST_EVENT_H__ */
|
#endif /* __GST_EVENT_H__ */
|
||||||
|
|
|
@ -23,10 +23,11 @@
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
typedef gboolean (*GstFilterFunc) (gpointer obj, gpointer user_data);
|
|
||||||
|
|
||||||
GList *gst_filter_run (const GList * list, GstFilterFunc func, gboolean first,
|
typedef gboolean (*GstFilterFunc) (gpointer obj, gpointer user_data);
|
||||||
gpointer user_data);
|
|
||||||
|
GList* gst_filter_run (const GList *list, GstFilterFunc func, gboolean first, gpointer user_data);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GST_FILTER_H_ */
|
#endif /* __GST_FILTER_H_ */
|
||||||
|
|
|
@ -27,16 +27,16 @@
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS typedef enum
|
G_BEGIN_DECLS
|
||||||
{
|
|
||||||
GST_FORMAT_UNDEFINED = 0, /* must be first in list */
|
typedef enum {
|
||||||
GST_FORMAT_DEFAULT = 1, /* samples for audio, frames/fields for video */
|
GST_FORMAT_UNDEFINED = 0, /* must be first in list */
|
||||||
GST_FORMAT_BYTES = 2,
|
GST_FORMAT_DEFAULT = 1, /* samples for audio, frames/fields for video */
|
||||||
GST_FORMAT_TIME = 3,
|
GST_FORMAT_BYTES = 2,
|
||||||
GST_FORMAT_BUFFERS = 4,
|
GST_FORMAT_TIME = 3,
|
||||||
GST_FORMAT_PERCENT = 5
|
GST_FORMAT_BUFFERS = 4,
|
||||||
}
|
GST_FORMAT_PERCENT = 5
|
||||||
GstFormat;
|
} GstFormat;
|
||||||
|
|
||||||
/* a percentage is always relative to 1000000 */
|
/* a percentage is always relative to 1000000 */
|
||||||
#define GST_FORMAT_PERCENT_MAX G_GINT64_CONSTANT (1000000)
|
#define GST_FORMAT_PERCENT_MAX G_GINT64_CONSTANT (1000000)
|
||||||
|
@ -44,11 +44,11 @@ GstFormat;
|
||||||
|
|
||||||
typedef struct _GstFormatDefinition GstFormatDefinition;
|
typedef struct _GstFormatDefinition GstFormatDefinition;
|
||||||
|
|
||||||
struct _GstFormatDefinition
|
struct _GstFormatDefinition
|
||||||
{
|
{
|
||||||
GstFormat value;
|
GstFormat value;
|
||||||
gchar *nick;
|
gchar *nick;
|
||||||
gchar *description;
|
gchar *description;
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef G_HAVE_ISO_VARARGS
|
#ifdef G_HAVE_ISO_VARARGS
|
||||||
|
@ -75,18 +75,22 @@ functionname (type object) \
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void _gst_format_initialize (void);
|
void _gst_format_initialize (void);
|
||||||
|
|
||||||
/* register a new format */
|
/* register a new format */
|
||||||
GstFormat gst_format_register (const gchar * nick, const gchar * description);
|
GstFormat gst_format_register (const gchar *nick,
|
||||||
GstFormat gst_format_get_by_nick (const gchar * nick);
|
const gchar *description);
|
||||||
|
GstFormat gst_format_get_by_nick (const gchar *nick);
|
||||||
|
|
||||||
/* check if a format is in an array of formats */
|
/* check if a format is in an array of formats */
|
||||||
gboolean gst_formats_contains (const GstFormat * formats, GstFormat format);
|
gboolean gst_formats_contains (const GstFormat *formats, GstFormat format);
|
||||||
|
|
||||||
/* query for format details */
|
/* query for format details */
|
||||||
G_CONST_RETURN GstFormatDefinition *gst_format_get_details (GstFormat format);
|
G_CONST_RETURN GstFormatDefinition*
|
||||||
G_CONST_RETURN GList *gst_format_get_definitions (void);
|
gst_format_get_details (GstFormat format);
|
||||||
|
G_CONST_RETURN GList*
|
||||||
|
gst_format_get_definitions (void);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GST_FORMAT_H__ */
|
#endif /* __GST_FORMAT_H__ */
|
||||||
|
|
262
gst/gstindex.h
262
gst/gstindex.h
|
@ -29,42 +29,39 @@
|
||||||
#include <gst/gstpluginfeature.h>
|
#include <gst/gstpluginfeature.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define GST_TYPE_INDEX (gst_index_get_type ())
|
#define GST_TYPE_INDEX (gst_index_get_type ())
|
||||||
#define GST_INDEX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_INDEX, GstIndex))
|
#define GST_INDEX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_INDEX, GstIndex))
|
||||||
#define GST_IS_INDEX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_INDEX))
|
#define GST_IS_INDEX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_INDEX))
|
||||||
#define GST_INDEX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_INDEX, GstIndexClass))
|
#define GST_INDEX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_INDEX, GstIndexClass))
|
||||||
#define GST_IS_INDEX_CLASS(klass) (GST_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_INDEX))
|
#define GST_IS_INDEX_CLASS(klass) (GST_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_INDEX))
|
||||||
#define GST_INDEX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_INDEX, GstIndexClass))
|
#define GST_INDEX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_INDEX, GstIndexClass))
|
||||||
|
|
||||||
#define GST_TYPE_INDEX_ENTRY (gst_index_entry_get_type())
|
#define GST_TYPE_INDEX_ENTRY (gst_index_entry_get_type())
|
||||||
|
|
||||||
typedef struct _GstIndexEntry GstIndexEntry;
|
typedef struct _GstIndexEntry GstIndexEntry;
|
||||||
typedef struct _GstIndexGroup GstIndexGroup;
|
typedef struct _GstIndexGroup GstIndexGroup;
|
||||||
typedef struct _GstIndex GstIndex;
|
typedef struct _GstIndex GstIndex;
|
||||||
typedef struct _GstIndexClass GstIndexClass;
|
typedef struct _GstIndexClass GstIndexClass;
|
||||||
|
|
||||||
typedef enum
|
typedef enum {
|
||||||
{
|
|
||||||
GST_INDEX_UNKNOWN,
|
GST_INDEX_UNKNOWN,
|
||||||
GST_INDEX_CERTAIN,
|
GST_INDEX_CERTAIN,
|
||||||
GST_INDEX_FUZZY
|
GST_INDEX_FUZZY
|
||||||
}
|
} GstIndexCertainty;
|
||||||
GstIndexCertainty;
|
|
||||||
|
|
||||||
typedef enum
|
typedef enum {
|
||||||
{
|
|
||||||
GST_INDEX_ENTRY_ID,
|
GST_INDEX_ENTRY_ID,
|
||||||
GST_INDEX_ENTRY_ASSOCIATION,
|
GST_INDEX_ENTRY_ASSOCIATION,
|
||||||
GST_INDEX_ENTRY_OBJECT,
|
GST_INDEX_ENTRY_OBJECT,
|
||||||
GST_INDEX_ENTRY_FORMAT
|
GST_INDEX_ENTRY_FORMAT
|
||||||
}
|
} GstIndexEntryType;
|
||||||
GstIndexEntryType;
|
|
||||||
|
|
||||||
typedef enum
|
typedef enum {
|
||||||
{
|
|
||||||
GST_INDEX_LOOKUP_EXACT,
|
GST_INDEX_LOOKUP_EXACT,
|
||||||
GST_INDEX_LOOKUP_BEFORE,
|
GST_INDEX_LOOKUP_BEFORE,
|
||||||
GST_INDEX_LOOKUP_AFTER
|
GST_INDEX_LOOKUP_AFTER
|
||||||
}
|
} GstIndexLookupMethod;
|
||||||
GstIndexLookupMethod;
|
|
||||||
|
|
||||||
#define GST_INDEX_NASSOCS(entry) ((entry)->data.assoc.nassocs)
|
#define GST_INDEX_NASSOCS(entry) ((entry)->data.assoc.nassocs)
|
||||||
#define GST_INDEX_ASSOC_FLAGS(entry) ((entry)->data.assoc.flags)
|
#define GST_INDEX_ASSOC_FLAGS(entry) ((entry)->data.assoc.flags)
|
||||||
|
@ -73,21 +70,18 @@ GstIndexLookupMethod;
|
||||||
|
|
||||||
typedef struct _GstIndexAssociation GstIndexAssociation;
|
typedef struct _GstIndexAssociation GstIndexAssociation;
|
||||||
|
|
||||||
struct _GstIndexAssociation
|
struct _GstIndexAssociation {
|
||||||
{
|
GstFormat format;
|
||||||
GstFormat format;
|
gint64 value;
|
||||||
gint64 value;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef enum
|
typedef enum {
|
||||||
{
|
GST_ASSOCIATION_FLAG_NONE = 0,
|
||||||
GST_ASSOCIATION_FLAG_NONE = 0,
|
|
||||||
GST_ASSOCIATION_FLAG_KEY_UNIT = (1 << 0),
|
GST_ASSOCIATION_FLAG_KEY_UNIT = (1 << 0),
|
||||||
|
|
||||||
/* new flags should start here */
|
/* new flags should start here */
|
||||||
GST_ASSOCIATION_FLAG_LAST = (1 << 8)
|
GST_ASSOCIATION_FLAG_LAST = (1 << 8)
|
||||||
}
|
} GstAssocFlags;
|
||||||
GstAssocFlags;
|
|
||||||
|
|
||||||
#define GST_INDEX_FORMAT_FORMAT(entry) ((entry)->data.format.format)
|
#define GST_INDEX_FORMAT_FORMAT(entry) ((entry)->data.format.format)
|
||||||
#define GST_INDEX_FORMAT_KEY(entry) ((entry)->data.format.key)
|
#define GST_INDEX_FORMAT_KEY(entry) ((entry)->data.format.key)
|
||||||
|
@ -96,44 +90,33 @@ GstAssocFlags;
|
||||||
|
|
||||||
#define GST_INDEX_ID_DESCRIPTION(entry) ((entry)->data.id.description)
|
#define GST_INDEX_ID_DESCRIPTION(entry) ((entry)->data.id.description)
|
||||||
|
|
||||||
struct _GstIndexEntry
|
struct _GstIndexEntry {
|
||||||
{
|
GstIndexEntryType type;
|
||||||
GstIndexEntryType type;
|
gint id;
|
||||||
gint id;
|
|
||||||
|
|
||||||
union
|
union {
|
||||||
{
|
struct {
|
||||||
struct
|
gchar *description;
|
||||||
{
|
} id;
|
||||||
gchar *description;
|
struct {
|
||||||
}
|
gint nassocs;
|
||||||
id;
|
GstIndexAssociation
|
||||||
struct
|
*assocs;
|
||||||
{
|
GstAssocFlags flags;
|
||||||
gint nassocs;
|
} assoc;
|
||||||
GstIndexAssociation * assocs;
|
struct {
|
||||||
GstAssocFlags flags;
|
gchar *key;
|
||||||
}
|
GType type;
|
||||||
assoc;
|
gpointer object;
|
||||||
struct
|
} object;
|
||||||
{
|
struct {
|
||||||
gchar *key;
|
GstFormat format;
|
||||||
GType type;
|
gchar *key;
|
||||||
gpointer object;
|
} format;
|
||||||
}
|
} data;
|
||||||
object;
|
|
||||||
struct
|
|
||||||
{
|
|
||||||
GstFormat format;
|
|
||||||
gchar *key;
|
|
||||||
}
|
|
||||||
format;
|
|
||||||
}
|
|
||||||
data;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstIndexGroup
|
struct _GstIndexGroup {
|
||||||
{
|
|
||||||
/* unique ID of group in index */
|
/* unique ID of group in index */
|
||||||
gint groupnum;
|
gint groupnum;
|
||||||
|
|
||||||
|
@ -147,114 +130,112 @@ struct _GstIndexGroup
|
||||||
gint peergroup;
|
gint peergroup;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef gboolean (*GstIndexFilter) (GstIndex * index, GstIndexEntry * entry);
|
typedef gboolean (*GstIndexFilter) (GstIndex *index,
|
||||||
|
GstIndexEntry *entry);
|
||||||
|
|
||||||
typedef enum
|
typedef enum {
|
||||||
{
|
|
||||||
GST_INDEX_RESOLVER_CUSTOM,
|
GST_INDEX_RESOLVER_CUSTOM,
|
||||||
GST_INDEX_RESOLVER_GTYPE,
|
GST_INDEX_RESOLVER_GTYPE,
|
||||||
GST_INDEX_RESOLVER_PATH
|
GST_INDEX_RESOLVER_PATH
|
||||||
}
|
} GstIndexResolverMethod;
|
||||||
GstIndexResolverMethod;
|
|
||||||
|
|
||||||
typedef gboolean (*GstIndexResolver) (GstIndex * index,
|
typedef gboolean (*GstIndexResolver) (GstIndex *index,
|
||||||
GstObject * writer, gchar ** writer_string, gpointer user_data);
|
GstObject *writer,
|
||||||
typedef enum
|
gchar **writer_string,
|
||||||
{
|
gpointer user_data);
|
||||||
GST_INDEX_WRITABLE = GST_OBJECT_FLAG_LAST,
|
typedef enum {
|
||||||
GST_INDEX_READABLE,
|
GST_INDEX_WRITABLE = GST_OBJECT_FLAG_LAST,
|
||||||
|
GST_INDEX_READABLE,
|
||||||
|
|
||||||
GST_INDEX_FLAG_LAST = GST_OBJECT_FLAG_LAST + 8
|
GST_INDEX_FLAG_LAST = GST_OBJECT_FLAG_LAST + 8
|
||||||
}
|
} GstIndexFlags;
|
||||||
GstIndexFlags;
|
|
||||||
|
|
||||||
#define GST_INDEX_IS_READABLE(obj) (GST_FLAG_IS_SET (obj, GST_INDEX_READABLE))
|
#define GST_INDEX_IS_READABLE(obj) (GST_FLAG_IS_SET (obj, GST_INDEX_READABLE))
|
||||||
#define GST_INDEX_IS_WRITABLE(obj) (GST_FLAG_IS_SET (obj, GST_INDEX_WRITABLE))
|
#define GST_INDEX_IS_WRITABLE(obj) (GST_FLAG_IS_SET (obj, GST_INDEX_WRITABLE))
|
||||||
|
|
||||||
struct _GstIndex
|
struct _GstIndex {
|
||||||
{
|
GstObject object;
|
||||||
GstObject object;
|
|
||||||
|
|
||||||
GList *groups;
|
GList *groups;
|
||||||
GstIndexGroup *curgroup;
|
GstIndexGroup *curgroup;
|
||||||
gint maxgroup;
|
gint maxgroup;
|
||||||
|
|
||||||
GstIndexResolverMethod method;
|
GstIndexResolverMethod method;
|
||||||
GstIndexResolver resolver;
|
GstIndexResolver resolver;
|
||||||
gpointer resolver_user_data;
|
gpointer resolver_user_data;
|
||||||
|
|
||||||
GstIndexFilter filter;
|
GstIndexFilter filter;
|
||||||
gpointer filter_user_data;
|
gpointer filter_user_data;
|
||||||
|
|
||||||
GHashTable *writers;
|
GHashTable *writers;
|
||||||
gint last_id;
|
gint last_id;
|
||||||
|
|
||||||
gpointer _gst_reserved[GST_PADDING];
|
gpointer _gst_reserved[GST_PADDING];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstIndexClass
|
struct _GstIndexClass {
|
||||||
{
|
|
||||||
GstObjectClass parent_class;
|
GstObjectClass parent_class;
|
||||||
|
|
||||||
gboolean (*get_writer_id) (GstIndex * index, gint * writer_id,
|
gboolean (*get_writer_id) (GstIndex *index, gint *writer_id, gchar *writer_string);
|
||||||
gchar * writer_string);
|
|
||||||
|
|
||||||
void (*commit) (GstIndex * index, gint id);
|
void (*commit) (GstIndex *index, gint id);
|
||||||
|
|
||||||
/* abstract methods */
|
/* abstract methods */
|
||||||
void (*add_entry) (GstIndex * index, GstIndexEntry * entry);
|
void (*add_entry) (GstIndex *index, GstIndexEntry *entry);
|
||||||
|
|
||||||
GstIndexEntry *(*get_assoc_entry) (GstIndex * index, gint id,
|
GstIndexEntry* (*get_assoc_entry) (GstIndex *index, gint id,
|
||||||
GstIndexLookupMethod method, GstAssocFlags flags,
|
GstIndexLookupMethod method, GstAssocFlags flags,
|
||||||
GstFormat format, gint64 value,
|
GstFormat format, gint64 value,
|
||||||
GCompareDataFunc func, gpointer user_data);
|
GCompareDataFunc func,
|
||||||
|
gpointer user_data);
|
||||||
/* signals */
|
/* signals */
|
||||||
void (*entry_added) (GstIndex * index, GstIndexEntry * entry);
|
void (*entry_added) (GstIndex *index, GstIndexEntry *entry);
|
||||||
|
|
||||||
gpointer _gst_reserved[GST_PADDING];
|
gpointer _gst_reserved[GST_PADDING];
|
||||||
};
|
};
|
||||||
|
|
||||||
GType gst_index_get_type (void);
|
GType gst_index_get_type (void);
|
||||||
GstIndex *gst_index_new (void);
|
GstIndex* gst_index_new (void);
|
||||||
void gst_index_commit (GstIndex * index, gint id);
|
void gst_index_commit (GstIndex *index, gint id);
|
||||||
|
|
||||||
gint gst_index_get_group (GstIndex * index);
|
gint gst_index_get_group (GstIndex *index);
|
||||||
gint gst_index_new_group (GstIndex * index);
|
gint gst_index_new_group (GstIndex *index);
|
||||||
gboolean gst_index_set_group (GstIndex * index, gint groupnum);
|
gboolean gst_index_set_group (GstIndex *index, gint groupnum);
|
||||||
|
|
||||||
void gst_index_set_certainty (GstIndex * index, GstIndexCertainty certainty);
|
void gst_index_set_certainty (GstIndex *index,
|
||||||
GstIndexCertainty gst_index_get_certainty (GstIndex * index);
|
GstIndexCertainty certainty);
|
||||||
|
GstIndexCertainty gst_index_get_certainty (GstIndex *index);
|
||||||
|
|
||||||
void gst_index_set_filter (GstIndex * index,
|
void gst_index_set_filter (GstIndex *index,
|
||||||
GstIndexFilter filter, gpointer user_data);
|
GstIndexFilter filter, gpointer user_data);
|
||||||
void gst_index_set_resolver (GstIndex * index,
|
void gst_index_set_resolver (GstIndex *index,
|
||||||
GstIndexResolver resolver, gpointer user_data);
|
GstIndexResolver resolver, gpointer user_data);
|
||||||
|
|
||||||
gboolean gst_index_get_writer_id (GstIndex * index, GstObject * writer,
|
gboolean gst_index_get_writer_id (GstIndex *index, GstObject *writer, gint *id);
|
||||||
gint * id);
|
|
||||||
|
|
||||||
GstIndexEntry *gst_index_add_format (GstIndex * index, gint id,
|
GstIndexEntry* gst_index_add_format (GstIndex *index, gint id, GstFormat format);
|
||||||
GstFormat format);
|
GstIndexEntry* gst_index_add_association (GstIndex *index, gint id, GstAssocFlags flags,
|
||||||
GstIndexEntry *gst_index_add_association (GstIndex * index, gint id,
|
GstFormat format, gint64 value, ...);
|
||||||
GstAssocFlags flags, GstFormat format, gint64 value, ...);
|
GstIndexEntry* gst_index_add_object (GstIndex *index, gint id, gchar *key,
|
||||||
GstIndexEntry *gst_index_add_object (GstIndex * index, gint id, gchar * key,
|
GType type, gpointer object);
|
||||||
GType type, gpointer object);
|
GstIndexEntry* gst_index_add_id (GstIndex *index, gint id,
|
||||||
GstIndexEntry *gst_index_add_id (GstIndex * index, gint id,
|
gchar *description);
|
||||||
gchar * description);
|
|
||||||
|
|
||||||
GstIndexEntry *gst_index_get_assoc_entry (GstIndex * index, gint id,
|
GstIndexEntry* gst_index_get_assoc_entry (GstIndex *index, gint id,
|
||||||
GstIndexLookupMethod method, GstAssocFlags flags,
|
GstIndexLookupMethod method, GstAssocFlags flags,
|
||||||
GstFormat format, gint64 value);
|
GstFormat format, gint64 value);
|
||||||
GstIndexEntry *gst_index_get_assoc_entry_full (GstIndex * index, gint id,
|
GstIndexEntry* gst_index_get_assoc_entry_full (GstIndex *index, gint id,
|
||||||
GstIndexLookupMethod method, GstAssocFlags flags,
|
GstIndexLookupMethod method, GstAssocFlags flags,
|
||||||
GstFormat format, gint64 value, GCompareDataFunc func, gpointer user_data);
|
GstFormat format, gint64 value,
|
||||||
|
GCompareDataFunc func,
|
||||||
|
gpointer user_data);
|
||||||
|
|
||||||
/* working with index entries */
|
/* working with index entries */
|
||||||
GType gst_index_entry_get_type (void);
|
GType gst_index_entry_get_type (void);
|
||||||
GstIndexEntry *gst_index_entry_copy (GstIndexEntry * entry);
|
GstIndexEntry * gst_index_entry_copy (GstIndexEntry *entry);
|
||||||
void gst_index_entry_free (GstIndexEntry * entry);
|
void gst_index_entry_free (GstIndexEntry *entry);
|
||||||
gboolean gst_index_entry_assoc_map (GstIndexEntry * entry,
|
gboolean gst_index_entry_assoc_map (GstIndexEntry *entry,
|
||||||
GstFormat format, gint64 * value);
|
GstFormat format, gint64 *value);
|
||||||
/*
|
/*
|
||||||
* creating indexs
|
* creating indexs
|
||||||
*
|
*
|
||||||
|
@ -269,33 +250,32 @@ gboolean gst_index_entry_assoc_map (GstIndexEntry * entry,
|
||||||
typedef struct _GstIndexFactory GstIndexFactory;
|
typedef struct _GstIndexFactory GstIndexFactory;
|
||||||
typedef struct _GstIndexFactoryClass GstIndexFactoryClass;
|
typedef struct _GstIndexFactoryClass GstIndexFactoryClass;
|
||||||
|
|
||||||
struct _GstIndexFactory
|
struct _GstIndexFactory {
|
||||||
{
|
|
||||||
GstPluginFeature feature;
|
GstPluginFeature feature;
|
||||||
|
|
||||||
gchar *longdesc; /* long description of the index (well, don't overdo it..) */
|
gchar *longdesc; /* long description of the index (well, don't overdo it..) */
|
||||||
GType type; /* unique GType of the index */
|
GType type; /* unique GType of the index */
|
||||||
|
|
||||||
gpointer _gst_reserved[GST_PADDING];
|
gpointer _gst_reserved[GST_PADDING];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstIndexFactoryClass
|
struct _GstIndexFactoryClass {
|
||||||
{
|
GstPluginFeatureClass parent;
|
||||||
GstPluginFeatureClass parent;
|
|
||||||
|
|
||||||
gpointer _gst_reserved[GST_PADDING];
|
gpointer _gst_reserved[GST_PADDING];
|
||||||
};
|
};
|
||||||
|
|
||||||
GType gst_index_factory_get_type (void);
|
GType gst_index_factory_get_type (void);
|
||||||
|
|
||||||
GstIndexFactory *gst_index_factory_new (const gchar * name,
|
GstIndexFactory* gst_index_factory_new (const gchar *name,
|
||||||
const gchar * longdesc, GType type);
|
const gchar *longdesc, GType type);
|
||||||
void gst_index_factory_destroy (GstIndexFactory * factory);
|
void gst_index_factory_destroy (GstIndexFactory *factory);
|
||||||
|
|
||||||
GstIndexFactory *gst_index_factory_find (const gchar * name);
|
GstIndexFactory* gst_index_factory_find (const gchar *name);
|
||||||
|
|
||||||
GstIndex *gst_index_factory_create (GstIndexFactory * factory);
|
GstIndex* gst_index_factory_create (GstIndexFactory *factory);
|
||||||
GstIndex *gst_index_factory_make (const gchar * name);
|
GstIndex* gst_index_factory_make (const gchar *name);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GST_INDEX_H__ */
|
#endif /* __GST_INDEX_H__ */
|
||||||
|
|
331
gst/gstinfo.h
331
gst/gstinfo.h
|
@ -31,15 +31,16 @@
|
||||||
#include <gst/gstconfig.h>
|
#include <gst/gstconfig.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* GStreamer's debugging subsystem is an easy way to get information about what
|
* GStreamer's debugging subsystem is an easy way to get information about what
|
||||||
* the application is doing.
|
* the application is doing.
|
||||||
* It is not meant for programming errors. Use GLibs methods (g_warning and so
|
* It is not meant for programming errors. Use GLibs methods (g_warning and so
|
||||||
* on for that.
|
* on for that.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* log levels */
|
/* log levels */
|
||||||
typedef enum
|
typedef enum {
|
||||||
{
|
|
||||||
GST_LEVEL_NONE = 0,
|
GST_LEVEL_NONE = 0,
|
||||||
GST_LEVEL_ERROR,
|
GST_LEVEL_ERROR,
|
||||||
GST_LEVEL_WARNING,
|
GST_LEVEL_WARNING,
|
||||||
|
@ -48,8 +49,7 @@ G_BEGIN_DECLS
|
||||||
GST_LEVEL_LOG,
|
GST_LEVEL_LOG,
|
||||||
/* add more */
|
/* add more */
|
||||||
GST_LEVEL_COUNT
|
GST_LEVEL_COUNT
|
||||||
}
|
} GstDebugLevel;
|
||||||
GstDebugLevel;
|
|
||||||
|
|
||||||
/* we can now override this to be more general in maintainer builds or cvs checkouts */
|
/* we can now override this to be more general in maintainer builds or cvs checkouts */
|
||||||
#ifndef GST_LEVEL_DEFAULT
|
#ifndef GST_LEVEL_DEFAULT
|
||||||
|
@ -64,45 +64,42 @@ GstDebugLevel;
|
||||||
* Background color codes:
|
* Background color codes:
|
||||||
* 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white
|
* 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white
|
||||||
*/
|
*/
|
||||||
typedef enum
|
typedef enum {
|
||||||
{
|
|
||||||
/* colors */
|
/* colors */
|
||||||
GST_DEBUG_FG_BLACK = 0x0000,
|
GST_DEBUG_FG_BLACK = 0x0000,
|
||||||
GST_DEBUG_FG_RED = 0x0001,
|
GST_DEBUG_FG_RED = 0x0001,
|
||||||
GST_DEBUG_FG_GREEN = 0x0002,
|
GST_DEBUG_FG_GREEN = 0x0002,
|
||||||
GST_DEBUG_FG_YELLOW = 0x0003,
|
GST_DEBUG_FG_YELLOW = 0x0003,
|
||||||
GST_DEBUG_FG_BLUE = 0x0004,
|
GST_DEBUG_FG_BLUE = 0x0004,
|
||||||
GST_DEBUG_FG_MAGENTA = 0x0005,
|
GST_DEBUG_FG_MAGENTA = 0x0005,
|
||||||
GST_DEBUG_FG_CYAN = 0x0006,
|
GST_DEBUG_FG_CYAN = 0x0006,
|
||||||
GST_DEBUG_FG_WHITE = 0x0007,
|
GST_DEBUG_FG_WHITE = 0x0007,
|
||||||
/* background colors */
|
/* background colors */
|
||||||
GST_DEBUG_BG_BLACK = 0x0000,
|
GST_DEBUG_BG_BLACK = 0x0000,
|
||||||
GST_DEBUG_BG_RED = 0x0010,
|
GST_DEBUG_BG_RED = 0x0010,
|
||||||
GST_DEBUG_BG_GREEN = 0x0020,
|
GST_DEBUG_BG_GREEN = 0x0020,
|
||||||
GST_DEBUG_BG_YELLOW = 0x0030,
|
GST_DEBUG_BG_YELLOW = 0x0030,
|
||||||
GST_DEBUG_BG_BLUE = 0x0040,
|
GST_DEBUG_BG_BLUE = 0x0040,
|
||||||
GST_DEBUG_BG_MAGENTA = 0x0050,
|
GST_DEBUG_BG_MAGENTA = 0x0050,
|
||||||
GST_DEBUG_BG_CYAN = 0x0060,
|
GST_DEBUG_BG_CYAN = 0x0060,
|
||||||
GST_DEBUG_BG_WHITE = 0x0070,
|
GST_DEBUG_BG_WHITE = 0x0070,
|
||||||
/* other formats */
|
/* other formats */
|
||||||
GST_DEBUG_BOLD = 0x0100,
|
GST_DEBUG_BOLD = 0x0100,
|
||||||
GST_DEBUG_UNDERLINE = 0x0200
|
GST_DEBUG_UNDERLINE = 0x0200
|
||||||
}
|
} GstDebugColorFlags;
|
||||||
GstDebugColorFlags;
|
|
||||||
|
|
||||||
#define GST_DEBUG_FG_MASK (0x000F)
|
#define GST_DEBUG_FG_MASK (0x000F)
|
||||||
#define GST_DEBUG_BG_MASK (0x00F0)
|
#define GST_DEBUG_BG_MASK (0x00F0)
|
||||||
#define GST_DEBUG_FORMAT_MASK (0xFF00)
|
#define GST_DEBUG_FORMAT_MASK (0xFF00)
|
||||||
|
|
||||||
typedef struct _GstDebugCategory GstDebugCategory;
|
typedef struct _GstDebugCategory GstDebugCategory;
|
||||||
struct _GstDebugCategory
|
struct _GstDebugCategory {
|
||||||
{
|
/*< private >*/
|
||||||
/*< private > */
|
GstAtomicInt * threshold;
|
||||||
GstAtomicInt *threshold;
|
guint color; /* see defines above */
|
||||||
guint color; /* see defines above */
|
|
||||||
|
|
||||||
const gchar *name;
|
const gchar * name;
|
||||||
const gchar *description;
|
const gchar * description;
|
||||||
};
|
};
|
||||||
|
|
||||||
/********** some convenience macros for debugging **********/
|
/********** some convenience macros for debugging **********/
|
||||||
|
@ -130,11 +127,14 @@ struct _GstDebugCategory
|
||||||
|
|
||||||
|
|
||||||
typedef struct _GstDebugMessage GstDebugMessage;
|
typedef struct _GstDebugMessage GstDebugMessage;
|
||||||
typedef void (*GstLogFunction) (GstDebugCategory * category,
|
typedef void (*GstLogFunction) (GstDebugCategory * category,
|
||||||
GstDebugLevel level,
|
GstDebugLevel level,
|
||||||
const gchar * file,
|
const gchar * file,
|
||||||
const gchar * function,
|
const gchar * function,
|
||||||
gint line, GObject * object, GstDebugMessage * message, gpointer data);
|
gint line,
|
||||||
|
GObject * object,
|
||||||
|
GstDebugMessage * message,
|
||||||
|
gpointer data);
|
||||||
|
|
||||||
/* Disable this subsystem if no varargs macro can be found.
|
/* Disable this subsystem if no varargs macro can be found.
|
||||||
Use a trick so the core builds the functions nonetheless if it wasn't
|
Use a trick so the core builds the functions nonetheless if it wasn't
|
||||||
|
@ -150,51 +150,57 @@ typedef void (*GstLogFunction) (GstDebugCategory * category,
|
||||||
|
|
||||||
#ifndef __GST_DISABLE_GST_DEBUG
|
#ifndef __GST_DISABLE_GST_DEBUG
|
||||||
|
|
||||||
void _gst_debug_init (void);
|
void _gst_debug_init (void);
|
||||||
|
|
||||||
/* note we can't use G_GNUC_PRINTF (7, 8) because gcc chokes on %P, which
|
/* note we can't use G_GNUC_PRINTF (7, 8) because gcc chokes on %P, which
|
||||||
* we use for GST_PTR_FORMAT. */
|
* we use for GST_PTR_FORMAT. */
|
||||||
void
|
void gst_debug_log (GstDebugCategory * category,
|
||||||
gst_debug_log (GstDebugCategory * category,
|
GstDebugLevel level,
|
||||||
GstDebugLevel level,
|
const gchar * file,
|
||||||
const gchar * file,
|
const gchar * function,
|
||||||
const gchar * function,
|
gint line,
|
||||||
gint line, GObject * object, const gchar * format, ...)
|
GObject * object,
|
||||||
G_GNUC_NO_INSTRUMENT;
|
const gchar * format,
|
||||||
void gst_debug_log_valist (GstDebugCategory * category,
|
...) G_GNUC_NO_INSTRUMENT;
|
||||||
GstDebugLevel level,
|
void gst_debug_log_valist (GstDebugCategory * category,
|
||||||
const gchar * file,
|
GstDebugLevel level,
|
||||||
const gchar * function,
|
const gchar * file,
|
||||||
gint line,
|
const gchar * function,
|
||||||
GObject * object, const gchar * format, va_list args) G_GNUC_NO_INSTRUMENT;
|
gint line,
|
||||||
|
GObject * object,
|
||||||
|
const gchar * format,
|
||||||
|
va_list args) G_GNUC_NO_INSTRUMENT;
|
||||||
|
|
||||||
const gchar *gst_debug_message_get (GstDebugMessage * message);
|
const gchar * gst_debug_message_get (GstDebugMessage * message);
|
||||||
|
|
||||||
void gst_debug_log_default (GstDebugCategory * category,
|
void gst_debug_log_default (GstDebugCategory * category,
|
||||||
GstDebugLevel level,
|
GstDebugLevel level,
|
||||||
const gchar * file,
|
const gchar * file,
|
||||||
const gchar * function,
|
const gchar * function,
|
||||||
gint line,
|
gint line,
|
||||||
GObject * object,
|
GObject * object,
|
||||||
GstDebugMessage * message, gpointer unused) G_GNUC_NO_INSTRUMENT;
|
GstDebugMessage * message,
|
||||||
|
gpointer unused) G_GNUC_NO_INSTRUMENT;
|
||||||
|
|
||||||
G_CONST_RETURN gchar *gst_debug_level_get_name (GstDebugLevel level);
|
G_CONST_RETURN gchar *
|
||||||
|
gst_debug_level_get_name (GstDebugLevel level);
|
||||||
|
|
||||||
void gst_debug_add_log_function (GstLogFunction func, gpointer data);
|
void gst_debug_add_log_function (GstLogFunction func,
|
||||||
guint gst_debug_remove_log_function (GstLogFunction func);
|
gpointer data);
|
||||||
guint gst_debug_remove_log_function_by_data (gpointer data);
|
guint gst_debug_remove_log_function (GstLogFunction func);
|
||||||
|
guint gst_debug_remove_log_function_by_data (gpointer data);
|
||||||
|
|
||||||
void gst_debug_set_active (gboolean active);
|
void gst_debug_set_active (gboolean active);
|
||||||
gboolean gst_debug_is_active (void);
|
gboolean gst_debug_is_active (void);
|
||||||
|
|
||||||
void gst_debug_set_colored (gboolean colored);
|
void gst_debug_set_colored (gboolean colored);
|
||||||
gboolean gst_debug_is_colored (void);
|
gboolean gst_debug_is_colored (void);
|
||||||
|
|
||||||
void gst_debug_set_default_threshold (GstDebugLevel level);
|
void gst_debug_set_default_threshold (GstDebugLevel level);
|
||||||
GstDebugLevel gst_debug_get_default_threshold (void);
|
GstDebugLevel gst_debug_get_default_threshold (void);
|
||||||
void gst_debug_set_threshold_for_name (const gchar * name,
|
void gst_debug_set_threshold_for_name (const gchar * name,
|
||||||
GstDebugLevel level);
|
GstDebugLevel level);
|
||||||
void gst_debug_unset_threshold_for_name (const gchar * name);
|
void gst_debug_unset_threshold_for_name (const gchar * name);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GST_DEBUG_CATEGORY:
|
* GST_DEBUG_CATEGORY:
|
||||||
|
@ -221,8 +227,9 @@ gst_debug_log (GstDebugCategory * category,
|
||||||
*/
|
*/
|
||||||
#define GST_DEBUG_CATEGORY_STATIC(cat) static GstDebugCategory *cat = NULL
|
#define GST_DEBUG_CATEGORY_STATIC(cat) static GstDebugCategory *cat = NULL
|
||||||
/* do not use this function, use the macros below */
|
/* do not use this function, use the macros below */
|
||||||
GstDebugCategory *_gst_debug_category_new (gchar * name,
|
GstDebugCategory *_gst_debug_category_new (gchar * name,
|
||||||
guint color, gchar * description);
|
guint color,
|
||||||
|
gchar * description);
|
||||||
/**
|
/**
|
||||||
* GST_DEBUG_CATEGORY_INIT:
|
* GST_DEBUG_CATEGORY_INIT:
|
||||||
* @cat: the category to initialize.
|
* @cat: the category to initialize.
|
||||||
|
@ -263,27 +270,24 @@ gst_debug_log (GstDebugCategory * category,
|
||||||
cat = _gst_debug_category_new (name,color,description); \
|
cat = _gst_debug_category_new (name,color,description); \
|
||||||
}G_STMT_END
|
}G_STMT_END
|
||||||
|
|
||||||
void gst_debug_category_free (GstDebugCategory * category);
|
void gst_debug_category_free (GstDebugCategory * category);
|
||||||
void gst_debug_category_set_threshold (GstDebugCategory * category,
|
void gst_debug_category_set_threshold (GstDebugCategory * category,
|
||||||
GstDebugLevel level);
|
GstDebugLevel level);
|
||||||
void gst_debug_category_reset_threshold (GstDebugCategory * category);
|
void gst_debug_category_reset_threshold (GstDebugCategory * category);
|
||||||
GstDebugLevel gst_debug_category_get_threshold (GstDebugCategory *
|
GstDebugLevel gst_debug_category_get_threshold (GstDebugCategory * category);
|
||||||
category);
|
G_CONST_RETURN gchar *
|
||||||
G_CONST_RETURN gchar *gst_debug_category_get_name (GstDebugCategory *
|
gst_debug_category_get_name (GstDebugCategory * category);
|
||||||
category);
|
guint gst_debug_category_get_color (GstDebugCategory * category);
|
||||||
guint gst_debug_category_get_color (GstDebugCategory * category);
|
G_CONST_RETURN gchar *
|
||||||
G_CONST_RETURN gchar *gst_debug_category_get_description (GstDebugCategory
|
gst_debug_category_get_description (GstDebugCategory * category);
|
||||||
* category);
|
GSList * gst_debug_get_all_categories (void);
|
||||||
GSList *gst_debug_get_all_categories (void);
|
|
||||||
|
|
||||||
gchar *gst_debug_construct_term_color (guint colorinfo);
|
gchar * gst_debug_construct_term_color (guint colorinfo);
|
||||||
|
|
||||||
|
|
||||||
extern GstDebugCategory *GST_CAT_DEFAULT;
|
extern GstDebugCategory * GST_CAT_DEFAULT;
|
||||||
|
|
||||||
/* this symbol may not be used */
|
/* this symbol may not be used */
|
||||||
extern gboolean __gst_debug_enabled;
|
extern gboolean __gst_debug_enabled;
|
||||||
|
|
||||||
#ifdef G_HAVE_ISO_VARARGS
|
#ifdef G_HAVE_ISO_VARARGS
|
||||||
#define GST_CAT_LEVEL_LOG(cat,level,object,...) G_STMT_START{ \
|
#define GST_CAT_LEVEL_LOG(cat,level,object,...) G_STMT_START{ \
|
||||||
if (__gst_debug_enabled) { \
|
if (__gst_debug_enabled) { \
|
||||||
|
@ -382,8 +386,10 @@ gst_debug_log (GstDebugCategory * category,
|
||||||
|
|
||||||
|
|
||||||
/********** function pointer stuff **********/
|
/********** function pointer stuff **********/
|
||||||
void *_gst_debug_register_funcptr (void *ptr, gchar * ptrname);
|
void* _gst_debug_register_funcptr (void * ptr,
|
||||||
G_CONST_RETURN gchar *_gst_debug_nameof_funcptr (void *ptr);
|
gchar * ptrname);
|
||||||
|
G_CONST_RETURN gchar*
|
||||||
|
_gst_debug_nameof_funcptr (void * ptr);
|
||||||
|
|
||||||
#define GST_DEBUG_FUNCPTR(ptr) (_gst_debug_register_funcptr((void *)(ptr), #ptr) , ptr)
|
#define GST_DEBUG_FUNCPTR(ptr) (_gst_debug_register_funcptr((void *)(ptr), #ptr) , ptr)
|
||||||
#define GST_DEBUG_FUNCPTR_NAME(ptr) _gst_debug_nameof_funcptr((void *)ptr)
|
#define GST_DEBUG_FUNCPTR_NAME(ptr) _gst_debug_nameof_funcptr((void *)ptr)
|
||||||
|
@ -397,34 +403,34 @@ gst_debug_log (GstDebugCategory * category,
|
||||||
# pragma GCC poison _gst_debug_category_new
|
# pragma GCC poison _gst_debug_category_new
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define _gst_debug_init() /* NOP */
|
#define _gst_debug_init() /* NOP */
|
||||||
|
|
||||||
#define gst_debug_set_log_function(func,data) /* NOP */
|
#define gst_debug_set_log_function(func,data) /* NOP */
|
||||||
#define gst_debug_reset_log_function(void) /* NOP */
|
#define gst_debug_reset_log_function(void) /* NOP */
|
||||||
#define gst_debug_set_default_threshold(level) /* NOP */
|
#define gst_debug_set_default_threshold(level) /* NOP */
|
||||||
#define gst_debug_get_default_threshold() (GST_LEVEL_NONE)
|
#define gst_debug_get_default_threshold() (GST_LEVEL_NONE)
|
||||||
#define gst_debug_category_set_threshold_for_name(name, level) /* NOP */
|
#define gst_debug_category_set_threshold_for_name(name, level) /* NOP */
|
||||||
#define gst_debug_category_unset_threshold_for_name(name) /* NOP */
|
#define gst_debug_category_unset_threshold_for_name(name) /* NOP */
|
||||||
|
|
||||||
#define gst_debug_level_get_name(level) ("NONE")
|
#define gst_debug_level_get_name(level) ("NONE")
|
||||||
#define gst_debug_add_log_function(func,data) (FALSE)
|
#define gst_debug_add_log_function(func,data) (FALSE)
|
||||||
#define gst_debug_remove_log_function(func) (0)
|
#define gst_debug_remove_log_function(func) (0)
|
||||||
#define gst_debug_remove_log_function_by_data(data) (0)
|
#define gst_debug_remove_log_function_by_data(data) (0)
|
||||||
#define gst_debug_set_active(active) /* NOP */
|
#define gst_debug_set_active(active) /* NOP */
|
||||||
#define gst_debug_is_active() (FALSE)
|
#define gst_debug_is_active() (FALSE)
|
||||||
#define gst_debug_set_colored(colored) /* NOP */
|
#define gst_debug_set_colored(colored) /* NOP */
|
||||||
#define gst_debug_is_colored() (FALSE)
|
#define gst_debug_is_colored() (FALSE)
|
||||||
#define gst_debug_set_default_threshold(level) /* NOP */
|
#define gst_debug_set_default_threshold(level) /* NOP */
|
||||||
#define gst_debug_get_default_threshold() (GST_LEVEL_NONE)
|
#define gst_debug_get_default_threshold() (GST_LEVEL_NONE)
|
||||||
#define gst_debug_set_threshold_for_name(name,level) /* NOP */
|
#define gst_debug_set_threshold_for_name(name,level) /* NOP */
|
||||||
#define gst_debug_unset_threshold_for_name(name) /* NOP */
|
#define gst_debug_unset_threshold_for_name(name) /* NOP */
|
||||||
|
|
||||||
#define GST_DEBUG_CATEGORY(var) /* NOP */
|
#define GST_DEBUG_CATEGORY(var) /* NOP */
|
||||||
#define GST_DEBUG_CATEGORY_EXTERN(var) /* NOP */
|
#define GST_DEBUG_CATEGORY_EXTERN(var) /* NOP */
|
||||||
#define GST_DEBUG_CATEGORY_STATIC(var) /* NOP */
|
#define GST_DEBUG_CATEGORY_STATIC(var) /* NOP */
|
||||||
#define GST_DEBUG_CATEGORY_INIT(var,name,color,desc) /* NOP */
|
#define GST_DEBUG_CATEGORY_INIT(var,name,color,desc) /* NOP */
|
||||||
#define gst_debug_category_free(category) /* NOP */
|
#define gst_debug_category_free(category) /* NOP */
|
||||||
#define gst_debug_category_set_threshold(category,level) /* NOP */
|
#define gst_debug_category_set_threshold(category,level) /* NOP */
|
||||||
#define gst_debug_category_reset_threshold(category) /* NOP */
|
#define gst_debug_category_reset_threshold(category) /* NOP */
|
||||||
#define gst_debug_category_get_threshold(category) (GST_LEVEL_NONE)
|
#define gst_debug_category_get_threshold(category) (GST_LEVEL_NONE)
|
||||||
#define gst_debug_category_get_name(cat) ("")
|
#define gst_debug_category_get_name(cat) ("")
|
||||||
|
@ -435,76 +441,76 @@ gst_debug_log (GstDebugCategory * category,
|
||||||
|
|
||||||
#ifdef G_HAVE_ISO_VARARGS
|
#ifdef G_HAVE_ISO_VARARGS
|
||||||
|
|
||||||
#define GST_CAT_LEVEL_LOG(cat,level,...) /* NOP */
|
#define GST_CAT_LEVEL_LOG(cat,level,...) /* NOP */
|
||||||
|
|
||||||
#define GST_CAT_ERROR_OBJECT(...) /* NOP */
|
#define GST_CAT_ERROR_OBJECT(...) /* NOP */
|
||||||
#define GST_CAT_WARNING_OBJECT(...) /* NOP */
|
#define GST_CAT_WARNING_OBJECT(...) /* NOP */
|
||||||
#define GST_CAT_INFO_OBJECT(...) /* NOP */
|
#define GST_CAT_INFO_OBJECT(...) /* NOP */
|
||||||
#define GST_CAT_DEBUG_OBJECT(...) /* NOP */
|
#define GST_CAT_DEBUG_OBJECT(...) /* NOP */
|
||||||
#define GST_CAT_LOG_OBJECT(...) /* NOP */
|
#define GST_CAT_LOG_OBJECT(...) /* NOP */
|
||||||
|
|
||||||
#define GST_CAT_ERROR(...) /* NOP */
|
#define GST_CAT_ERROR(...) /* NOP */
|
||||||
#define GST_CAT_WARNING(...) /* NOP */
|
#define GST_CAT_WARNING(...) /* NOP */
|
||||||
#define GST_CAT_INFO(...) /* NOP */
|
#define GST_CAT_INFO(...) /* NOP */
|
||||||
#define GST_CAT_DEBUG(...) /* NOP */
|
#define GST_CAT_DEBUG(...) /* NOP */
|
||||||
#define GST_CAT_LOG(...) /* NOP */
|
#define GST_CAT_LOG(...) /* NOP */
|
||||||
|
|
||||||
#define GST_ERROR_OBJECT(...) /* NOP */
|
#define GST_ERROR_OBJECT(...) /* NOP */
|
||||||
#define GST_WARNING_OBJECT(...) /* NOP */
|
#define GST_WARNING_OBJECT(...) /* NOP */
|
||||||
#define GST_INFO_OBJECT(...) /* NOP */
|
#define GST_INFO_OBJECT(...) /* NOP */
|
||||||
#define GST_DEBUG_OBJECT(...) /* NOP */
|
#define GST_DEBUG_OBJECT(...) /* NOP */
|
||||||
#define GST_LOG_OBJECT(...) /* NOP */
|
#define GST_LOG_OBJECT(...) /* NOP */
|
||||||
|
|
||||||
#define GST_ERROR(...) /* NOP */
|
#define GST_ERROR(...) /* NOP */
|
||||||
#define GST_WARNING(...) /* NOP */
|
#define GST_WARNING(...) /* NOP */
|
||||||
#define GST_INFO(...) /* NOP */
|
#define GST_INFO(...) /* NOP */
|
||||||
#define GST_DEBUG(...) /* NOP */
|
#define GST_DEBUG(...) /* NOP */
|
||||||
#define GST_LOG(...) /* NOP */
|
#define GST_LOG(...) /* NOP */
|
||||||
|
|
||||||
#ifdef GST_DEBUG_ENABLE_DEPRECATED
|
#ifdef GST_DEBUG_ENABLE_DEPRECATED
|
||||||
#define GST_INFO_ELEMENT(cat,obj,...) /* NOP */
|
#define GST_INFO_ELEMENT(cat,obj,...) /* NOP */
|
||||||
#define GST_DEBUG_ELEMENT(cat,obj,...) /* NOP */
|
#define GST_DEBUG_ELEMENT(cat,obj,...) /* NOP */
|
||||||
#define GST_DEBUG_ENTER(...) /* NOP */
|
#define GST_DEBUG_ENTER(...) /* NOP */
|
||||||
#define GST_DEBUG_LEAVE(...) /* NOP */
|
#define GST_DEBUG_LEAVE(...) /* NOP */
|
||||||
#define GST_INFO_ENTER(...) /* NOP */
|
#define GST_INFO_ENTER(...) /* NOP */
|
||||||
#define GST_INFO_LEAVE(...) /* NOP */
|
#define GST_INFO_LEAVE(...) /* NOP */
|
||||||
#endif /* GST_DEBUG_ENABLE_DEPRECATED */
|
#endif /* GST_DEBUG_ENABLE_DEPRECATED */
|
||||||
|
|
||||||
#else /* !G_HAVE_ISO_VARARGS */
|
#else /* !G_HAVE_ISO_VARARGS */
|
||||||
|
|
||||||
#define GST_CAT_LEVEL_LOG(cat,level,args...) /* NOP */
|
#define GST_CAT_LEVEL_LOG(cat,level,args...) /* NOP */
|
||||||
|
|
||||||
#define GST_CAT_ERROR_OBJECT(args...) /* NOP */
|
#define GST_CAT_ERROR_OBJECT(args...) /* NOP */
|
||||||
#define GST_CAT_WARNING_OBJECT(args...) /* NOP */
|
#define GST_CAT_WARNING_OBJECT(args...) /* NOP */
|
||||||
#define GST_CAT_INFO_OBJECT(args...) /* NOP */
|
#define GST_CAT_INFO_OBJECT(args...) /* NOP */
|
||||||
#define GST_CAT_DEBUG_OBJECT(args...) /* NOP */
|
#define GST_CAT_DEBUG_OBJECT(args...) /* NOP */
|
||||||
#define GST_CAT_LOG_OBJECT(args...) /* NOP */
|
#define GST_CAT_LOG_OBJECT(args...) /* NOP */
|
||||||
|
|
||||||
#define GST_CAT_ERROR(args...) /* NOP */
|
#define GST_CAT_ERROR(args...) /* NOP */
|
||||||
#define GST_CAT_WARNING(args...) /* NOP */
|
#define GST_CAT_WARNING(args...) /* NOP */
|
||||||
#define GST_CAT_INFO(args...) /* NOP */
|
#define GST_CAT_INFO(args...) /* NOP */
|
||||||
#define GST_CAT_DEBUG(args...) /* NOP */
|
#define GST_CAT_DEBUG(args...) /* NOP */
|
||||||
#define GST_CAT_LOG(args...) /* NOP */
|
#define GST_CAT_LOG(args...) /* NOP */
|
||||||
|
|
||||||
#define GST_ERROR_OBJECT(args...) /* NOP */
|
#define GST_ERROR_OBJECT(args...) /* NOP */
|
||||||
#define GST_WARNING_OBJECT(args...) /* NOP */
|
#define GST_WARNING_OBJECT(args...) /* NOP */
|
||||||
#define GST_INFO_OBJECT(args...) /* NOP */
|
#define GST_INFO_OBJECT(args...) /* NOP */
|
||||||
#define GST_DEBUG_OBJECT(args...) /* NOP */
|
#define GST_DEBUG_OBJECT(args...) /* NOP */
|
||||||
#define GST_LOG_OBJECT(args...) /* NOP */
|
#define GST_LOG_OBJECT(args...) /* NOP */
|
||||||
|
|
||||||
#define GST_ERROR(args...) /* NOP */
|
#define GST_ERROR(args...) /* NOP */
|
||||||
#define GST_WARNING(args...) /* NOP */
|
#define GST_WARNING(args...) /* NOP */
|
||||||
#define GST_INFO(args...) /* NOP */
|
#define GST_INFO(args...) /* NOP */
|
||||||
#define GST_DEBUG(args...) /* NOP */
|
#define GST_DEBUG(args...) /* NOP */
|
||||||
#define GST_LOG(args...) /* NOP */
|
#define GST_LOG(args...) /* NOP */
|
||||||
|
|
||||||
#ifdef GST_DEBUG_ENABLE_DEPRECATED
|
#ifdef GST_DEBUG_ENABLE_DEPRECATED
|
||||||
#define GST_INFO_ELEMENT(cat,obj,args...) /* NOP */
|
#define GST_INFO_ELEMENT(cat,obj,args...) /* NOP */
|
||||||
#define GST_DEBUG_ELEMENT(cat,obj,args...) /* NOP */
|
#define GST_DEBUG_ELEMENT(cat,obj,args...) /* NOP */
|
||||||
#define GST_DEBUG_ENTER(args...) /* NOP */
|
#define GST_DEBUG_ENTER(args...) /* NOP */
|
||||||
#define GST_DEBUG_LEAVE(args...) /* NOP */
|
#define GST_DEBUG_LEAVE(args...) /* NOP */
|
||||||
#define GST_INFO_ENTER(args...) /* NOP */
|
#define GST_INFO_ENTER(args...) /* NOP */
|
||||||
#define GST_INFO_LEAVE(args...) /* NOP */
|
#define GST_INFO_LEAVE(args...) /* NOP */
|
||||||
#endif /* GST_DEBUG_ENABLE_DEPRECATED */
|
#endif /* GST_DEBUG_ENABLE_DEPRECATED */
|
||||||
|
|
||||||
#endif /* G_HAVE_ISO_VARARGS */
|
#endif /* G_HAVE_ISO_VARARGS */
|
||||||
|
@ -517,4 +523,5 @@ gst_debug_log (GstDebugCategory * category,
|
||||||
void gst_debug_print_stack_trace (void);
|
void gst_debug_print_stack_trace (void);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GSTINFO_H__ */
|
#endif /* __GSTINFO_H__ */
|
||||||
|
|
|
@ -26,6 +26,7 @@
|
||||||
#include <gst/gstelement.h>
|
#include <gst/gstelement.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define GST_TYPE_IMPLEMENTS_INTERFACE \
|
#define GST_TYPE_IMPLEMENTS_INTERFACE \
|
||||||
(gst_implements_interface_get_type ())
|
(gst_implements_interface_get_type ())
|
||||||
#define GST_IMPLEMENTS_INTERFACE(obj) \
|
#define GST_IMPLEMENTS_INTERFACE(obj) \
|
||||||
|
@ -41,35 +42,38 @@ G_BEGIN_DECLS
|
||||||
#define GST_IMPLEMENTS_INTERFACE_GET_CLASS(inst) \
|
#define GST_IMPLEMENTS_INTERFACE_GET_CLASS(inst) \
|
||||||
(G_TYPE_INSTANCE_GET_INTERFACE ((inst), GST_TYPE_IMPLEMENTS_INTERFACE, \
|
(G_TYPE_INSTANCE_GET_INTERFACE ((inst), GST_TYPE_IMPLEMENTS_INTERFACE, \
|
||||||
GstImplementsInterfaceClass))
|
GstImplementsInterfaceClass))
|
||||||
|
|
||||||
typedef struct _GstImplementsInterface GstImplementsInterface;
|
typedef struct _GstImplementsInterface GstImplementsInterface;
|
||||||
|
|
||||||
/* This small extra virtual function is here to provide an
|
/* This small extra virtual function is here to provide an
|
||||||
* interface functionality on a per-instance basis rather
|
* interface functionality on a per-instance basis rather
|
||||||
* than a per-class basis, which is the case for glib.
|
* than a per-class basis, which is the case for glib.
|
||||||
*/
|
*/
|
||||||
typedef struct _GstImplementsInterfaceClass
|
typedef struct _GstImplementsInterfaceClass {
|
||||||
{
|
|
||||||
GTypeInterface parent;
|
GTypeInterface parent;
|
||||||
|
|
||||||
/* virtual functions */
|
/* virtual functions */
|
||||||
gboolean (*supported) (GstImplementsInterface * iface, GType iface_type);
|
gboolean (* supported) (GstImplementsInterface *iface,
|
||||||
|
GType iface_type);
|
||||||
|
|
||||||
gpointer _gst_reserved[GST_PADDING];
|
gpointer _gst_reserved[GST_PADDING];
|
||||||
}
|
} GstImplementsInterfaceClass;
|
||||||
GstImplementsInterfaceClass;
|
|
||||||
|
|
||||||
#define GST_IMPLEMENTS_INTERFACE_CHECK_INSTANCE_CAST(obj, type, cast_t) \
|
#define GST_IMPLEMENTS_INTERFACE_CHECK_INSTANCE_CAST(obj, type, cast_t) \
|
||||||
((cast_t *) gst_implements_interface_cast ((obj), (type)))
|
((cast_t *) gst_implements_interface_cast ((obj), (type)))
|
||||||
#define GST_IMPLEMENTS_INTERFACE_CHECK_INSTANCE_TYPE(obj, type) \
|
#define GST_IMPLEMENTS_INTERFACE_CHECK_INSTANCE_TYPE(obj, type) \
|
||||||
(gst_implements_interface_check ((obj), (type)))
|
(gst_implements_interface_check ((obj), (type)))
|
||||||
|
|
||||||
GType gst_implements_interface_get_type (void);
|
GType gst_implements_interface_get_type (void);
|
||||||
|
|
||||||
/* wrapper functions to check for functionality implementation */
|
/* wrapper functions to check for functionality implementation */
|
||||||
gboolean gst_element_implements_interface (GstElement * element,
|
gboolean gst_element_implements_interface (GstElement *element,
|
||||||
GType iface_type);
|
GType iface_type);
|
||||||
gpointer gst_implements_interface_cast (gpointer from, GType type);
|
gpointer gst_implements_interface_cast (gpointer from,
|
||||||
gboolean gst_implements_interface_check (gpointer from, GType type);
|
GType type);
|
||||||
|
gboolean gst_implements_interface_check (gpointer from,
|
||||||
|
GType type);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GST_IMPLEMENTS_INTERFACE_H__ */
|
#endif /* __GST_IMPLEMENTS_INTERFACE_H__ */
|
||||||
|
|
|
@ -25,7 +25,9 @@
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS extern const char *g_log_domain_gstreamer;
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
extern const char *g_log_domain_gstreamer;
|
||||||
|
|
||||||
#ifdef G_HAVE_ISO_VARARGS
|
#ifdef G_HAVE_ISO_VARARGS
|
||||||
|
|
||||||
|
@ -49,4 +51,5 @@ G_BEGIN_DECLS extern const char *g_log_domain_gstreamer;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GST_LOG_H__ */
|
#endif /* __GST_LOG_H__ */
|
||||||
|
|
|
@ -21,18 +21,24 @@
|
||||||
#define __GST_MACROS_H__
|
#define __GST_MACROS_H__
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)
|
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)
|
||||||
# define GST_GNUC_CONSTRUCTOR \
|
# define GST_GNUC_CONSTRUCTOR \
|
||||||
__attribute__ ((constructor))
|
__attribute__ ((constructor))
|
||||||
#else /* !__GNUC__ */
|
#else /* !__GNUC__ */
|
||||||
# define GST_GNUC_CONSTRUCTOR
|
# define GST_GNUC_CONSTRUCTOR
|
||||||
#endif /* !__GNUC__ */
|
#endif /* !__GNUC__ */
|
||||||
|
|
||||||
#if defined (__GNUC__) && !defined (GST_IMPLEMENT_INLINES)
|
#if defined (__GNUC__) && !defined (GST_IMPLEMENT_INLINES)
|
||||||
# define GST_INLINE_FUNC extern __inline__
|
# define GST_INLINE_FUNC extern __inline__
|
||||||
# define GST_CAN_INLINE 1
|
# define GST_CAN_INLINE 1
|
||||||
#else
|
#else
|
||||||
# define GST_INLINE_FUNC extern
|
# define GST_INLINE_FUNC extern
|
||||||
# undef GST_CAN_INLINE
|
# undef GST_CAN_INLINE
|
||||||
#endif
|
#endif
|
||||||
G_END_DECLS
|
|
||||||
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GST_MACROS_H__ */
|
#endif /* __GST_MACROS_H__ */
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -22,16 +22,22 @@
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS typedef struct _GstMemChunk GstMemChunk;
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
GstMemChunk *gst_mem_chunk_new (gchar * name,
|
typedef struct _GstMemChunk GstMemChunk;
|
||||||
gint atom_size, gulong area_size, gint type);
|
|
||||||
|
|
||||||
void gst_mem_chunk_destroy (GstMemChunk * mem_chunk);
|
GstMemChunk* gst_mem_chunk_new (gchar *name,
|
||||||
|
gint atom_size,
|
||||||
|
gulong area_size,
|
||||||
|
gint type);
|
||||||
|
|
||||||
gpointer gst_mem_chunk_alloc (GstMemChunk * mem_chunk);
|
void gst_mem_chunk_destroy (GstMemChunk *mem_chunk);
|
||||||
gpointer gst_mem_chunk_alloc0 (GstMemChunk * mem_chunk);
|
|
||||||
void gst_mem_chunk_free (GstMemChunk * mem_chunk, gpointer mem);
|
gpointer gst_mem_chunk_alloc (GstMemChunk *mem_chunk);
|
||||||
|
gpointer gst_mem_chunk_alloc0 (GstMemChunk *mem_chunk);
|
||||||
|
void gst_mem_chunk_free (GstMemChunk *mem_chunk,
|
||||||
|
gpointer mem);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GST_MEM_CHUNK_H__ */
|
#endif /* __GST_MEM_CHUNK_H__ */
|
||||||
|
|
|
@ -30,7 +30,9 @@
|
||||||
|
|
||||||
#include <gst/gsttypes.h>
|
#include <gst/gsttypes.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS extern GType _gst_object_type;
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
extern GType _gst_object_type;
|
||||||
|
|
||||||
#define GST_TYPE_OBJECT (_gst_object_type)
|
#define GST_TYPE_OBJECT (_gst_object_type)
|
||||||
#define GST_IS_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_OBJECT))
|
#define GST_IS_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_OBJECT))
|
||||||
|
@ -47,49 +49,45 @@ G_BEGIN_DECLS extern GType _gst_object_type;
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
GST_DESTROYED = 0,
|
GST_DESTROYED = 0,
|
||||||
GST_FLOATING,
|
GST_FLOATING,
|
||||||
|
|
||||||
GST_OBJECT_FLAG_LAST = 4
|
GST_OBJECT_FLAG_LAST = 4
|
||||||
}
|
} GstObjectFlags;
|
||||||
GstObjectFlags;
|
|
||||||
|
|
||||||
struct _GstObject
|
struct _GstObject {
|
||||||
{
|
GObject object;
|
||||||
GObject object;
|
|
||||||
|
|
||||||
gchar *name;
|
gchar *name;
|
||||||
|
|
||||||
/* locking for all sorts of things */
|
/* locking for all sorts of things */
|
||||||
GMutex *lock;
|
GMutex *lock;
|
||||||
/* this object's parent */
|
/* this object's parent */
|
||||||
GstObject *parent;
|
GstObject *parent;
|
||||||
|
|
||||||
guint32 flags;
|
guint32 flags;
|
||||||
|
|
||||||
gpointer _gst_reserved[GST_PADDING];
|
gpointer _gst_reserved[GST_PADDING];
|
||||||
};
|
};
|
||||||
|
|
||||||
/* signal_object is used to signal to the whole class */
|
/* signal_object is used to signal to the whole class */
|
||||||
struct _GstObjectClass
|
struct _GstObjectClass {
|
||||||
{
|
GObjectClass parent_class;
|
||||||
GObjectClass parent_class;
|
|
||||||
|
|
||||||
gchar *path_string_separator;
|
gchar *path_string_separator;
|
||||||
GObject *signal_object;
|
GObject *signal_object;
|
||||||
|
|
||||||
/* signals */
|
/* signals */
|
||||||
void (*parent_set) (GstObject * object, GstObject * parent);
|
void (*parent_set) (GstObject *object, GstObject *parent);
|
||||||
void (*parent_unset) (GstObject * object, GstObject * parent);
|
void (*parent_unset) (GstObject *object, GstObject *parent);
|
||||||
void (*object_saved) (GstObject * object, xmlNodePtr parent);
|
void (*object_saved) (GstObject *object, xmlNodePtr parent);
|
||||||
void (*deep_notify) (GstObject * object, GstObject * orig,
|
void (*deep_notify) (GstObject *object, GstObject *orig, GParamSpec *pspec);
|
||||||
GParamSpec * pspec);
|
|
||||||
|
|
||||||
/* functions go here */
|
/* functions go here */
|
||||||
void (*destroy) (GstObject * object);
|
void (*destroy) (GstObject *object);
|
||||||
|
|
||||||
xmlNodePtr (*save_thyself) (GstObject * object, xmlNodePtr parent);
|
xmlNodePtr (*save_thyself) (GstObject *object, xmlNodePtr parent);
|
||||||
void (*restore_thyself) (GstObject * object, xmlNodePtr self);
|
void (*restore_thyself) (GstObject *object, xmlNodePtr self);
|
||||||
|
|
||||||
gpointer _gst_reserved[GST_PADDING];
|
gpointer _gst_reserved[GST_PADDING];
|
||||||
};
|
};
|
||||||
|
@ -113,51 +111,57 @@ struct _GstObjectClass
|
||||||
|
|
||||||
|
|
||||||
/* normal GObject stuff */
|
/* normal GObject stuff */
|
||||||
GType gst_object_get_type (void);
|
GType gst_object_get_type (void);
|
||||||
|
|
||||||
/* name routines */
|
/* name routines */
|
||||||
void gst_object_set_name (GstObject * object, const gchar * name);
|
void gst_object_set_name (GstObject *object, const gchar *name);
|
||||||
G_CONST_RETURN gchar *gst_object_get_name (GstObject * object);
|
G_CONST_RETURN gchar*
|
||||||
|
gst_object_get_name (GstObject *object);
|
||||||
|
|
||||||
/* parentage routines */
|
/* parentage routines */
|
||||||
void gst_object_set_parent (GstObject * object, GstObject * parent);
|
void gst_object_set_parent (GstObject *object, GstObject *parent);
|
||||||
GstObject *gst_object_get_parent (GstObject * object);
|
GstObject* gst_object_get_parent (GstObject *object);
|
||||||
void gst_object_unparent (GstObject * object);
|
void gst_object_unparent (GstObject *object);
|
||||||
|
|
||||||
void gst_object_default_deep_notify (GObject * object, GstObject * orig,
|
void gst_object_default_deep_notify (GObject *object, GstObject *orig,
|
||||||
GParamSpec * pspec, gchar ** excluded_props);
|
GParamSpec *pspec, gchar **excluded_props);
|
||||||
|
|
||||||
gboolean gst_object_check_uniqueness (GList * list, const gchar * name);
|
gboolean gst_object_check_uniqueness (GList *list, const gchar *name);
|
||||||
|
|
||||||
#ifndef GST_DISABLE_LOADSAVE_REGISTRY
|
#ifndef GST_DISABLE_LOADSAVE_REGISTRY
|
||||||
xmlNodePtr gst_object_save_thyself (GstObject * object, xmlNodePtr parent);
|
xmlNodePtr gst_object_save_thyself (GstObject *object, xmlNodePtr parent);
|
||||||
void gst_object_restore_thyself (GstObject * object, xmlNodePtr self);
|
void gst_object_restore_thyself (GstObject *object, xmlNodePtr self);
|
||||||
#else
|
#else
|
||||||
#pragma GCC poison gst_object_save_thyself
|
#pragma GCC poison gst_object_save_thyself
|
||||||
#pragma GCC poison gst_object_restore_thyself
|
#pragma GCC poison gst_object_restore_thyself
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* refcounting + life cycle */
|
/* refcounting + life cycle */
|
||||||
GstObject *gst_object_ref (GstObject * object);
|
GstObject * gst_object_ref (GstObject *object);
|
||||||
void gst_object_unref (GstObject * object);
|
void gst_object_unref (GstObject *object);
|
||||||
void gst_object_sink (GstObject * object);
|
void gst_object_sink (GstObject *object);
|
||||||
|
|
||||||
/* replace object pointer */
|
/* replace object pointer */
|
||||||
void gst_object_replace (GstObject ** oldobj, GstObject * newobj);
|
void gst_object_replace (GstObject **oldobj, GstObject *newobj);
|
||||||
|
|
||||||
/* printing out the 'path' of the object */
|
/* printing out the 'path' of the object */
|
||||||
gchar *gst_object_get_path_string (GstObject * object);
|
gchar * gst_object_get_path_string (GstObject *object);
|
||||||
|
|
||||||
guint gst_class_signal_connect (GstObjectClass * klass,
|
guint gst_class_signal_connect (GstObjectClass *klass,
|
||||||
const gchar * name, gpointer func, gpointer func_data);
|
const gchar *name,
|
||||||
|
gpointer func,
|
||||||
|
gpointer func_data);
|
||||||
|
|
||||||
#ifndef GST_DISABLE_LOADSAVE_REGISTRY
|
#ifndef GST_DISABLE_LOADSAVE_REGISTRY
|
||||||
void gst_class_signal_emit_by_name (GstObject * object,
|
void gst_class_signal_emit_by_name (GstObject *object,
|
||||||
const gchar * name, xmlNodePtr self);
|
const gchar *name,
|
||||||
|
xmlNodePtr self);
|
||||||
#else
|
#else
|
||||||
#pragma GCC poison gst_class_signal_emit_by_name
|
#pragma GCC poison gst_class_signal_emit_by_name
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GST_OBJECT_H__ */
|
#endif /* __GST_OBJECT_H__ */
|
||||||
|
|
||||||
|
|
442
gst/gstpad.h
442
gst/gstpad.h
|
@ -34,14 +34,16 @@
|
||||||
#include <gst/gstquery.h>
|
#include <gst/gstquery.h>
|
||||||
|
|
||||||
|
|
||||||
G_BEGIN_DECLS extern GType _gst_pad_type;
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
extern GType _gst_pad_type;
|
||||||
extern GType _gst_real_pad_type;
|
extern GType _gst_real_pad_type;
|
||||||
extern GType _gst_ghost_pad_type;
|
extern GType _gst_ghost_pad_type;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Pad base class
|
* Pad base class
|
||||||
*/
|
*/
|
||||||
#define GST_TYPE_PAD (_gst_pad_type)
|
#define GST_TYPE_PAD (_gst_pad_type)
|
||||||
#define GST_IS_PAD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_PAD))
|
#define GST_IS_PAD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_PAD))
|
||||||
#define GST_IS_PAD_FAST(obj) (G_OBJECT_TYPE(obj) == GST_TYPE_REAL_PAD || \
|
#define GST_IS_PAD_FAST(obj) (G_OBJECT_TYPE(obj) == GST_TYPE_REAL_PAD || \
|
||||||
G_OBJECT_TYPE(obj) == GST_TYPE_GHOST_PAD)
|
G_OBJECT_TYPE(obj) == GST_TYPE_GHOST_PAD)
|
||||||
|
@ -76,20 +78,17 @@ typedef struct _GstRealPad GstRealPad;
|
||||||
typedef struct _GstRealPadClass GstRealPadClass;
|
typedef struct _GstRealPadClass GstRealPadClass;
|
||||||
typedef struct _GstGhostPad GstGhostPad;
|
typedef struct _GstGhostPad GstGhostPad;
|
||||||
typedef struct _GstGhostPadClass GstGhostPadClass;
|
typedef struct _GstGhostPadClass GstGhostPadClass;
|
||||||
|
|
||||||
/*typedef struct _GstPadTemplate GstPadTemplate;*/
|
/*typedef struct _GstPadTemplate GstPadTemplate;*/
|
||||||
/*typedef struct _GstPadTemplateClass GstPadTemplateClass;*/
|
/*typedef struct _GstPadTemplateClass GstPadTemplateClass;*/
|
||||||
typedef struct _GstStaticPadTemplate GstStaticPadTemplate;
|
typedef struct _GstStaticPadTemplate GstStaticPadTemplate;
|
||||||
typedef struct _GstPadLink GstPadLink;
|
typedef struct _GstPadLink GstPadLink;
|
||||||
|
|
||||||
typedef enum
|
typedef enum {
|
||||||
{
|
|
||||||
GST_PAD_LINK_REFUSED = -1,
|
GST_PAD_LINK_REFUSED = -1,
|
||||||
GST_PAD_LINK_DELAYED = 0,
|
GST_PAD_LINK_DELAYED = 0,
|
||||||
GST_PAD_LINK_OK = 1,
|
GST_PAD_LINK_OK = 1,
|
||||||
GST_PAD_LINK_DONE = 2
|
GST_PAD_LINK_DONE = 2
|
||||||
}
|
} GstPadLinkReturn;
|
||||||
GstPadLinkReturn;
|
|
||||||
|
|
||||||
#define GST_PAD_LINK_FAILED(ret) (ret < GST_PAD_LINK_OK)
|
#define GST_PAD_LINK_FAILED(ret) (ret < GST_PAD_LINK_OK)
|
||||||
#define GST_PAD_LINK_SUCCESSFUL(ret) (ret >= GST_PAD_LINK_OK)
|
#define GST_PAD_LINK_SUCCESSFUL(ret) (ret >= GST_PAD_LINK_OK)
|
||||||
|
@ -107,131 +106,120 @@ GstPadLinkReturn;
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* this defines the functions used to chain buffers
|
/* this defines the functions used to chain buffers
|
||||||
* pad is the sink pad (so the same chain function can be used for N pads)
|
* pad is the sink pad (so the same chain function can be used for N pads)
|
||||||
* buf is the buffer being passed */
|
* buf is the buffer being passed */
|
||||||
typedef void (*GstPadChainFunction) (GstPad * pad, GstData * data);
|
typedef void (*GstPadChainFunction) (GstPad *pad,GstData *data);
|
||||||
typedef GstData *(*GstPadGetFunction) (GstPad * pad);
|
typedef GstData* (*GstPadGetFunction) (GstPad *pad);
|
||||||
typedef gboolean (*GstPadEventFunction) (GstPad * pad, GstEvent * event);
|
typedef gboolean (*GstPadEventFunction) (GstPad *pad, GstEvent *event);
|
||||||
typedef gboolean (*GstPadConvertFunction) (GstPad * pad,
|
typedef gboolean (*GstPadConvertFunction) (GstPad *pad,
|
||||||
GstFormat src_format, gint64 src_value,
|
GstFormat src_format, gint64 src_value,
|
||||||
GstFormat * dest_format, gint64 * dest_value);
|
GstFormat *dest_format, gint64 *dest_value);
|
||||||
typedef gboolean (*GstPadQueryFunction) (GstPad * pad, GstQueryType type,
|
typedef gboolean (*GstPadQueryFunction) (GstPad *pad, GstQueryType type,
|
||||||
GstFormat * format, gint64 * value);
|
GstFormat *format, gint64 *value);
|
||||||
typedef GList *(*GstPadIntLinkFunction) (GstPad * pad);
|
typedef GList* (*GstPadIntLinkFunction) (GstPad *pad);
|
||||||
typedef const GstFormat *(*GstPadFormatsFunction) (GstPad * pad);
|
typedef const GstFormat* (*GstPadFormatsFunction) (GstPad *pad);
|
||||||
typedef const GstEventMask *(*GstPadEventMaskFunction) (GstPad * pad);
|
typedef const GstEventMask* (*GstPadEventMaskFunction) (GstPad *pad);
|
||||||
typedef const GstQueryType *(*GstPadQueryTypeFunction) (GstPad * pad);
|
typedef const GstQueryType* (*GstPadQueryTypeFunction) (GstPad *pad);
|
||||||
|
|
||||||
typedef GstPadLinkReturn (*GstPadLinkFunction) (GstPad * pad,
|
typedef GstPadLinkReturn (*GstPadLinkFunction) (GstPad *pad, const GstCaps *caps);
|
||||||
const GstCaps * caps);
|
typedef void (*GstPadUnlinkFunction) (GstPad *pad);
|
||||||
typedef void (*GstPadUnlinkFunction) (GstPad * pad);
|
typedef GstCaps* (*GstPadGetCapsFunction) (GstPad *pad);
|
||||||
typedef GstCaps *(*GstPadGetCapsFunction) (GstPad * pad);
|
typedef GstCaps* (*GstPadFixateFunction) (GstPad *pad, const GstCaps *caps);
|
||||||
typedef GstCaps *(*GstPadFixateFunction) (GstPad * pad, const GstCaps * caps);
|
typedef GstBuffer* (*GstPadBufferAllocFunction) (GstPad *pad, guint64 offset, guint size);
|
||||||
typedef GstBuffer *(*GstPadBufferAllocFunction) (GstPad * pad, guint64 offset,
|
|
||||||
guint size);
|
|
||||||
|
|
||||||
typedef gboolean (*GstPadDispatcherFunction) (GstPad * pad, gpointer data);
|
typedef gboolean (*GstPadDispatcherFunction) (GstPad *pad, gpointer data);
|
||||||
|
|
||||||
typedef enum
|
typedef enum {
|
||||||
{
|
|
||||||
GST_PAD_UNKNOWN,
|
GST_PAD_UNKNOWN,
|
||||||
GST_PAD_SRC,
|
GST_PAD_SRC,
|
||||||
GST_PAD_SINK
|
GST_PAD_SINK
|
||||||
}
|
} GstPadDirection;
|
||||||
GstPadDirection;
|
|
||||||
|
|
||||||
typedef enum
|
typedef enum {
|
||||||
{
|
GST_PAD_DISABLED = GST_OBJECT_FLAG_LAST,
|
||||||
GST_PAD_DISABLED = GST_OBJECT_FLAG_LAST,
|
|
||||||
GST_PAD_NEGOTIATING,
|
GST_PAD_NEGOTIATING,
|
||||||
|
|
||||||
GST_PAD_FLAG_LAST = GST_OBJECT_FLAG_LAST + 4
|
GST_PAD_FLAG_LAST = GST_OBJECT_FLAG_LAST + 4
|
||||||
}
|
} GstPadFlags;
|
||||||
GstPadFlags;
|
|
||||||
|
|
||||||
struct _GstPad
|
struct _GstPad {
|
||||||
{
|
GstObject object;
|
||||||
GstObject object;
|
|
||||||
|
|
||||||
gpointer element_private;
|
gpointer element_private;
|
||||||
|
|
||||||
GstPadTemplate *padtemplate; /* the template for this pad */
|
GstPadTemplate *padtemplate; /* the template for this pad */
|
||||||
|
|
||||||
gpointer _gst_reserved[GST_PADDING];
|
gpointer _gst_reserved[GST_PADDING];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstPadClass
|
struct _GstPadClass {
|
||||||
{
|
|
||||||
GstObjectClass parent_class;
|
GstObjectClass parent_class;
|
||||||
|
|
||||||
gpointer _gst_reserved[GST_PADDING];
|
gpointer _gst_reserved[GST_PADDING];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstRealPad
|
struct _GstRealPad {
|
||||||
{
|
GstPad pad;
|
||||||
GstPad pad;
|
|
||||||
|
|
||||||
/* the pad capabilities */
|
/* the pad capabilities */
|
||||||
GstCaps *caps;
|
GstCaps *caps;
|
||||||
GstPadFixateFunction appfixatefunc;
|
GstPadFixateFunction appfixatefunc;
|
||||||
GstCaps *appfilter;
|
GstCaps *appfilter;
|
||||||
GstPadGetCapsFunction getcapsfunc;
|
GstPadGetCapsFunction getcapsfunc;
|
||||||
GstPadFixateFunction fixatefunc;
|
GstPadFixateFunction fixatefunc;
|
||||||
|
|
||||||
|
GstPadDirection direction;
|
||||||
|
|
||||||
GstPadDirection direction;
|
GstPadLinkFunction linkfunc;
|
||||||
|
GstPadUnlinkFunction unlinkfunc;
|
||||||
|
GstRealPad *peer;
|
||||||
|
|
||||||
GstPadLinkFunction linkfunc;
|
gpointer sched_private;
|
||||||
GstPadUnlinkFunction unlinkfunc;
|
|
||||||
GstRealPad *peer;
|
|
||||||
|
|
||||||
gpointer sched_private;
|
|
||||||
|
|
||||||
/* data transport functions */
|
/* data transport functions */
|
||||||
GstPadChainFunction chainfunc;
|
GstPadChainFunction chainfunc;
|
||||||
GstPadChainFunction chainhandler;
|
GstPadChainFunction chainhandler;
|
||||||
GstPadGetFunction getfunc;
|
GstPadGetFunction getfunc;
|
||||||
GstPadGetFunction gethandler;
|
GstPadGetFunction gethandler;
|
||||||
GstPadEventFunction eventfunc;
|
GstPadEventFunction eventfunc;
|
||||||
GstPadEventFunction eventhandler;
|
GstPadEventFunction eventhandler;
|
||||||
GstPadEventMaskFunction eventmaskfunc;
|
GstPadEventMaskFunction eventmaskfunc;
|
||||||
|
|
||||||
GList *ghostpads;
|
GList *ghostpads;
|
||||||
|
|
||||||
/* query/convert/formats functions */
|
/* query/convert/formats functions */
|
||||||
GstPadConvertFunction convertfunc;
|
GstPadConvertFunction convertfunc;
|
||||||
GstPadQueryFunction queryfunc;
|
GstPadQueryFunction queryfunc;
|
||||||
GstPadFormatsFunction formatsfunc;
|
GstPadFormatsFunction formatsfunc;
|
||||||
GstPadQueryTypeFunction querytypefunc;
|
GstPadQueryTypeFunction querytypefunc;
|
||||||
GstPadIntLinkFunction intlinkfunc;
|
GstPadIntLinkFunction intlinkfunc;
|
||||||
|
|
||||||
GstPadBufferAllocFunction bufferallocfunc;
|
GstPadBufferAllocFunction bufferallocfunc;
|
||||||
|
|
||||||
GstProbeDispatcher probedisp;
|
GstProbeDispatcher probedisp;
|
||||||
|
|
||||||
GstPadLink *link;
|
GstPadLink *link;
|
||||||
GstCaps *explicit_caps;
|
GstCaps *explicit_caps;
|
||||||
|
|
||||||
gpointer _gst_reserved[GST_PADDING];
|
gpointer _gst_reserved[GST_PADDING];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstRealPadClass
|
struct _GstRealPadClass {
|
||||||
{
|
GstPadClass parent_class;
|
||||||
GstPadClass parent_class;
|
|
||||||
|
|
||||||
/* signal callbacks */
|
/* signal callbacks */
|
||||||
void (*caps_nego_failed) (GstPad * pad, GstCaps * caps);
|
void (*caps_nego_failed) (GstPad *pad, GstCaps *caps);
|
||||||
|
|
||||||
void (*linked) (GstPad * pad, GstPad * peer);
|
void (*linked) (GstPad *pad, GstPad *peer);
|
||||||
void (*unlinked) (GstPad * pad, GstPad * peer);
|
void (*unlinked) (GstPad *pad, GstPad *peer);
|
||||||
GstPadFixateFunction appfixatefunc;
|
GstPadFixateFunction appfixatefunc;
|
||||||
|
|
||||||
gpointer _gst_reserved[GST_PADDING];
|
gpointer _gst_reserved[GST_PADDING];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstGhostPad
|
struct _GstGhostPad {
|
||||||
{
|
|
||||||
GstPad pad;
|
GstPad pad;
|
||||||
|
|
||||||
GstRealPad *realpad;
|
GstRealPad *realpad;
|
||||||
|
@ -239,8 +227,7 @@ struct _GstGhostPad
|
||||||
gpointer _gst_reserved[GST_PADDING];
|
gpointer _gst_reserved[GST_PADDING];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstGhostPadClass
|
struct _GstGhostPadClass {
|
||||||
{
|
|
||||||
GstPadClass parent_class;
|
GstPadClass parent_class;
|
||||||
|
|
||||||
gpointer _gst_reserved[GST_PADDING];
|
gpointer _gst_reserved[GST_PADDING];
|
||||||
|
@ -306,57 +293,50 @@ struct _GstGhostPadClass
|
||||||
#define GST_IS_PAD_TEMPLATE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_PAD_TEMPLATE))
|
#define GST_IS_PAD_TEMPLATE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_PAD_TEMPLATE))
|
||||||
#define GST_IS_PAD_TEMPLATE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_PAD_TEMPLATE))
|
#define GST_IS_PAD_TEMPLATE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_PAD_TEMPLATE))
|
||||||
|
|
||||||
typedef enum
|
typedef enum {
|
||||||
{
|
|
||||||
GST_PAD_ALWAYS,
|
GST_PAD_ALWAYS,
|
||||||
GST_PAD_SOMETIMES,
|
GST_PAD_SOMETIMES,
|
||||||
GST_PAD_REQUEST
|
GST_PAD_REQUEST
|
||||||
}
|
} GstPadPresence;
|
||||||
GstPadPresence;
|
|
||||||
|
|
||||||
#define GST_PAD_TEMPLATE_NAME_TEMPLATE(templ) (((GstPadTemplate *)(templ))->name_template)
|
#define GST_PAD_TEMPLATE_NAME_TEMPLATE(templ) (((GstPadTemplate *)(templ))->name_template)
|
||||||
#define GST_PAD_TEMPLATE_DIRECTION(templ) (((GstPadTemplate *)(templ))->direction)
|
#define GST_PAD_TEMPLATE_DIRECTION(templ) (((GstPadTemplate *)(templ))->direction)
|
||||||
#define GST_PAD_TEMPLATE_PRESENCE(templ) (((GstPadTemplate *)(templ))->presence)
|
#define GST_PAD_TEMPLATE_PRESENCE(templ) (((GstPadTemplate *)(templ))->presence)
|
||||||
#define GST_PAD_TEMPLATE_CAPS(templ) (((GstPadTemplate *)(templ))->caps)
|
#define GST_PAD_TEMPLATE_CAPS(templ) (((GstPadTemplate *)(templ))->caps)
|
||||||
|
|
||||||
typedef enum
|
typedef enum {
|
||||||
{
|
GST_PAD_TEMPLATE_FIXED = GST_OBJECT_FLAG_LAST,
|
||||||
GST_PAD_TEMPLATE_FIXED = GST_OBJECT_FLAG_LAST,
|
|
||||||
|
|
||||||
GST_PAD_TEMPLATE_FLAG_LAST = GST_OBJECT_FLAG_LAST + 4
|
GST_PAD_TEMPLATE_FLAG_LAST = GST_OBJECT_FLAG_LAST + 4
|
||||||
}
|
} GstPadTemplateFlags;
|
||||||
GstPadTemplateFlags;
|
|
||||||
|
|
||||||
#define GST_PAD_TEMPLATE_IS_FIXED(templ) (GST_FLAG_IS_SET(templ, GST_PAD_TEMPLATE_FIXED))
|
#define GST_PAD_TEMPLATE_IS_FIXED(templ) (GST_FLAG_IS_SET(templ, GST_PAD_TEMPLATE_FIXED))
|
||||||
|
|
||||||
struct _GstPadTemplate
|
struct _GstPadTemplate {
|
||||||
{
|
GstObject object;
|
||||||
GstObject object;
|
|
||||||
|
|
||||||
gchar *name_template;
|
gchar *name_template;
|
||||||
GstPadDirection direction;
|
GstPadDirection direction;
|
||||||
GstPadPresence presence;
|
GstPadPresence presence;
|
||||||
GstCaps *caps;
|
GstCaps *caps;
|
||||||
|
|
||||||
gpointer _gst_reserved[GST_PADDING];
|
gpointer _gst_reserved[GST_PADDING];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstPadTemplateClass
|
struct _GstPadTemplateClass {
|
||||||
{
|
GstObjectClass parent_class;
|
||||||
GstObjectClass parent_class;
|
|
||||||
|
|
||||||
/* signal callbacks */
|
/* signal callbacks */
|
||||||
void (*pad_created) (GstPadTemplate * templ, GstPad * pad);
|
void (*pad_created) (GstPadTemplate *templ, GstPad *pad);
|
||||||
|
|
||||||
gpointer _gst_reserved[GST_PADDING];
|
gpointer _gst_reserved[GST_PADDING];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstStaticPadTemplate
|
struct _GstStaticPadTemplate {
|
||||||
{
|
gchar *name_template;
|
||||||
gchar *name_template;
|
GstPadDirection direction;
|
||||||
GstPadDirection direction;
|
GstPadPresence presence;
|
||||||
GstPadPresence presence;
|
GstStaticCaps static_caps;
|
||||||
GstStaticCaps static_caps;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#define GST_STATIC_PAD_TEMPLATE(padname, dir, pres, caps) \
|
#define GST_STATIC_PAD_TEMPLATE(padname, dir, pres, caps) \
|
||||||
|
@ -368,145 +348,140 @@ struct _GstStaticPadTemplate
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
GType gst_pad_get_type (void);
|
GType gst_pad_get_type (void);
|
||||||
GType gst_real_pad_get_type (void);
|
GType gst_real_pad_get_type (void);
|
||||||
GType gst_ghost_pad_get_type (void);
|
GType gst_ghost_pad_get_type (void);
|
||||||
|
|
||||||
/* creating pads */
|
/* creating pads */
|
||||||
GstPad *gst_pad_new (const gchar * name, GstPadDirection direction);
|
GstPad* gst_pad_new (const gchar *name, GstPadDirection direction);
|
||||||
GstPad *gst_pad_new_from_template (GstPadTemplate * templ, const gchar * name);
|
GstPad* gst_pad_new_from_template (GstPadTemplate *templ, const gchar *name);
|
||||||
GstPad *gst_pad_custom_new (GType type, const gchar * name,
|
GstPad* gst_pad_custom_new (GType type, const gchar *name, GstPadDirection direction);
|
||||||
GstPadDirection direction);
|
GstPad* gst_pad_custom_new_from_template (GType type, GstPadTemplate *templ, const gchar *name);
|
||||||
GstPad *gst_pad_custom_new_from_template (GType type, GstPadTemplate * templ,
|
|
||||||
const gchar * name);
|
|
||||||
|
|
||||||
void gst_pad_set_name (GstPad * pad, const gchar * name);
|
void gst_pad_set_name (GstPad *pad, const gchar *name);
|
||||||
G_CONST_RETURN gchar *gst_pad_get_name (GstPad * pad);
|
G_CONST_RETURN gchar* gst_pad_get_name (GstPad *pad);
|
||||||
|
|
||||||
GstPadDirection gst_pad_get_direction (GstPad * pad);
|
GstPadDirection gst_pad_get_direction (GstPad *pad);
|
||||||
|
|
||||||
void gst_pad_set_active (GstPad * pad, gboolean active);
|
void gst_pad_set_active (GstPad *pad, gboolean active);
|
||||||
gboolean gst_pad_is_active (GstPad * pad);
|
gboolean gst_pad_is_active (GstPad *pad);
|
||||||
|
|
||||||
void gst_pad_set_element_private (GstPad * pad, gpointer priv);
|
void gst_pad_set_element_private (GstPad *pad, gpointer priv);
|
||||||
gpointer gst_pad_get_element_private (GstPad * pad);
|
gpointer gst_pad_get_element_private (GstPad *pad);
|
||||||
|
|
||||||
void gst_pad_set_parent (GstPad * pad, GstElement * parent);
|
void gst_pad_set_parent (GstPad *pad, GstElement *parent);
|
||||||
GstElement *gst_pad_get_parent (GstPad * pad);
|
GstElement* gst_pad_get_parent (GstPad *pad);
|
||||||
GstElement *gst_pad_get_real_parent (GstPad * pad);
|
GstElement* gst_pad_get_real_parent (GstPad *pad);
|
||||||
|
|
||||||
GstScheduler *gst_pad_get_scheduler (GstPad * pad);
|
GstScheduler* gst_pad_get_scheduler (GstPad *pad);
|
||||||
|
|
||||||
void gst_pad_add_ghost_pad (GstPad * pad, GstPad * ghostpad);
|
void gst_pad_add_ghost_pad (GstPad *pad, GstPad *ghostpad);
|
||||||
void gst_pad_remove_ghost_pad (GstPad * pad, GstPad * ghostpad);
|
void gst_pad_remove_ghost_pad (GstPad *pad, GstPad *ghostpad);
|
||||||
GList *gst_pad_get_ghost_pad_list (GstPad * pad);
|
GList* gst_pad_get_ghost_pad_list (GstPad *pad);
|
||||||
|
|
||||||
GstPadTemplate *gst_pad_get_pad_template (GstPad * pad);
|
GstPadTemplate* gst_pad_get_pad_template (GstPad *pad);
|
||||||
|
|
||||||
void gst_pad_set_bufferalloc_function (GstPad * pad,
|
void gst_pad_set_bufferalloc_function (GstPad *pad, GstPadBufferAllocFunction bufferalloc);
|
||||||
GstPadBufferAllocFunction bufferalloc);
|
GstBuffer* gst_pad_alloc_buffer (GstPad *pad, guint64 offset, gint size);
|
||||||
GstBuffer *gst_pad_alloc_buffer (GstPad * pad, guint64 offset, gint size);
|
|
||||||
|
|
||||||
/* data passing setup functions */
|
/* data passing setup functions */
|
||||||
void gst_pad_set_chain_function (GstPad * pad, GstPadChainFunction chain);
|
void gst_pad_set_chain_function (GstPad *pad, GstPadChainFunction chain);
|
||||||
void gst_pad_set_get_function (GstPad * pad, GstPadGetFunction get);
|
void gst_pad_set_get_function (GstPad *pad, GstPadGetFunction get);
|
||||||
void gst_pad_set_event_function (GstPad * pad, GstPadEventFunction event);
|
void gst_pad_set_event_function (GstPad *pad, GstPadEventFunction event);
|
||||||
void gst_pad_set_event_mask_function (GstPad * pad,
|
void gst_pad_set_event_mask_function (GstPad *pad, GstPadEventMaskFunction mask_func);
|
||||||
GstPadEventMaskFunction mask_func);
|
G_CONST_RETURN GstEventMask*
|
||||||
G_CONST_RETURN GstEventMask *gst_pad_get_event_masks (GstPad * pad);
|
gst_pad_get_event_masks (GstPad *pad);
|
||||||
G_CONST_RETURN GstEventMask *gst_pad_get_event_masks_default (GstPad * pad);
|
G_CONST_RETURN GstEventMask*
|
||||||
|
gst_pad_get_event_masks_default (GstPad *pad);
|
||||||
|
|
||||||
/* pad links */
|
/* pad links */
|
||||||
void gst_pad_set_link_function (GstPad * pad, GstPadLinkFunction link);
|
void gst_pad_set_link_function (GstPad *pad, GstPadLinkFunction link);
|
||||||
gboolean gst_pad_can_link (GstPad * srcpad, GstPad * sinkpad);
|
gboolean gst_pad_can_link (GstPad *srcpad, GstPad *sinkpad);
|
||||||
gboolean gst_pad_can_link_filtered (GstPad * srcpad, GstPad * sinkpad,
|
gboolean gst_pad_can_link_filtered (GstPad *srcpad, GstPad *sinkpad, const GstCaps *filtercaps);
|
||||||
const GstCaps * filtercaps);
|
void gst_pad_set_unlink_function (GstPad *pad, GstPadUnlinkFunction unlink);
|
||||||
void gst_pad_set_unlink_function (GstPad * pad, GstPadUnlinkFunction unlink);
|
|
||||||
|
|
||||||
gboolean gst_pad_link (GstPad * srcpad, GstPad * sinkpad);
|
gboolean gst_pad_link (GstPad *srcpad, GstPad *sinkpad);
|
||||||
gboolean gst_pad_link_filtered (GstPad * srcpad, GstPad * sinkpad,
|
gboolean gst_pad_link_filtered (GstPad *srcpad, GstPad *sinkpad, const GstCaps *filtercaps);
|
||||||
const GstCaps * filtercaps);
|
void gst_pad_unlink (GstPad *srcpad, GstPad *sinkpad);
|
||||||
void gst_pad_unlink (GstPad * srcpad, GstPad * sinkpad);
|
gboolean gst_pad_is_linked (GstPad *pad);
|
||||||
gboolean gst_pad_is_linked (GstPad * pad);
|
|
||||||
|
|
||||||
GstPad *gst_pad_get_peer (GstPad * pad);
|
GstPad* gst_pad_get_peer (GstPad *pad);
|
||||||
|
|
||||||
/* capsnego functions */
|
/* capsnego functions */
|
||||||
G_CONST_RETURN GstCaps *gst_pad_get_negotiated_caps (GstPad * pad);
|
G_CONST_RETURN GstCaps* gst_pad_get_negotiated_caps (GstPad *pad);
|
||||||
gboolean gst_pad_is_negotiated (GstPad * pad);
|
gboolean gst_pad_is_negotiated (GstPad *pad);
|
||||||
GstCaps *gst_pad_get_caps (GstPad * pad);
|
GstCaps* gst_pad_get_caps (GstPad *pad);
|
||||||
G_CONST_RETURN GstCaps *gst_pad_get_pad_template_caps (GstPad * pad);
|
G_CONST_RETURN GstCaps* gst_pad_get_pad_template_caps (GstPad *pad);
|
||||||
GstPadLinkReturn gst_pad_try_set_caps (GstPad * pad, const GstCaps * caps);
|
GstPadLinkReturn gst_pad_try_set_caps (GstPad *pad, const GstCaps *caps);
|
||||||
GstPadLinkReturn gst_pad_try_set_caps_nonfixed (GstPad * pad,
|
GstPadLinkReturn gst_pad_try_set_caps_nonfixed (GstPad *pad, const GstCaps *caps);
|
||||||
const GstCaps * caps);
|
gboolean gst_pad_check_compatibility (GstPad *srcpad, GstPad *sinkpad);
|
||||||
gboolean gst_pad_check_compatibility (GstPad * srcpad, GstPad * sinkpad);
|
|
||||||
|
|
||||||
void gst_pad_set_getcaps_function (GstPad * pad, GstPadGetCapsFunction getcaps);
|
|
||||||
void gst_pad_set_fixate_function (GstPad * pad, GstPadFixateFunction fixate);
|
|
||||||
GstCaps *gst_pad_proxy_getcaps (GstPad * pad);
|
|
||||||
GstPadLinkReturn gst_pad_proxy_pad_link (GstPad * pad, const GstCaps * caps);
|
|
||||||
GstCaps *gst_pad_proxy_fixate (GstPad * pad, const GstCaps * caps);
|
|
||||||
|
|
||||||
|
void gst_pad_set_getcaps_function (GstPad *pad, GstPadGetCapsFunction getcaps);
|
||||||
|
void gst_pad_set_fixate_function (GstPad *pad, GstPadFixateFunction fixate);
|
||||||
|
GstCaps * gst_pad_proxy_getcaps (GstPad *pad);
|
||||||
|
GstPadLinkReturn gst_pad_proxy_pad_link (GstPad *pad, const GstCaps *caps);
|
||||||
|
GstCaps * gst_pad_proxy_fixate (GstPad *pad, const GstCaps *caps);
|
||||||
#ifndef GST_DISABLE_DEPRECATED
|
#ifndef GST_DISABLE_DEPRECATED
|
||||||
GstPadLinkReturn gst_pad_proxy_link (GstPad * pad, const GstCaps * caps);
|
GstPadLinkReturn gst_pad_proxy_link (GstPad *pad, const GstCaps *caps);
|
||||||
#endif
|
#endif
|
||||||
gboolean gst_pad_set_explicit_caps (GstPad * pad, const GstCaps * caps);
|
gboolean gst_pad_set_explicit_caps (GstPad *pad, const GstCaps *caps);
|
||||||
void gst_pad_use_explicit_caps (GstPad * pad);
|
void gst_pad_use_explicit_caps (GstPad *pad);
|
||||||
gboolean gst_pad_relink_filtered (GstPad * srcpad, GstPad * sinkpad,
|
gboolean gst_pad_relink_filtered (GstPad *srcpad, GstPad *sinkpad, const GstCaps *filtercaps);
|
||||||
const GstCaps * filtercaps);
|
|
||||||
#ifndef GST_DISABLE_DEPRECATED
|
#ifndef GST_DISABLE_DEPRECATED
|
||||||
gboolean gst_pad_perform_negotiate (GstPad * srcpad, GstPad * sinkpad);
|
gboolean gst_pad_perform_negotiate (GstPad *srcpad, GstPad *sinkpad);
|
||||||
#endif
|
#endif
|
||||||
GstPadLinkReturn gst_pad_renegotiate (GstPad * pad);
|
GstPadLinkReturn gst_pad_renegotiate (GstPad *pad);
|
||||||
void gst_pad_unnegotiate (GstPad * pad);
|
void gst_pad_unnegotiate (GstPad *pad);
|
||||||
gboolean gst_pad_try_relink_filtered (GstPad * srcpad, GstPad * sinkpad,
|
gboolean gst_pad_try_relink_filtered (GstPad *srcpad, GstPad *sinkpad, const GstCaps *filtercaps);
|
||||||
const GstCaps * filtercaps);
|
GstCaps* gst_pad_get_allowed_caps (GstPad *pad);
|
||||||
GstCaps *gst_pad_get_allowed_caps (GstPad * pad);
|
void gst_pad_caps_change_notify (GstPad *pad);
|
||||||
void gst_pad_caps_change_notify (GstPad * pad);
|
|
||||||
|
|
||||||
gboolean gst_pad_recover_caps_error (GstPad * pad, const GstCaps * allowed);
|
gboolean gst_pad_recover_caps_error (GstPad *pad, const GstCaps *allowed);
|
||||||
|
|
||||||
/* data passing functions */
|
/* data passing functions */
|
||||||
void gst_pad_push (GstPad * pad, GstData * data);
|
void gst_pad_push (GstPad *pad, GstData *data);
|
||||||
GstData *gst_pad_pull (GstPad * pad);
|
GstData* gst_pad_pull (GstPad *pad);
|
||||||
gboolean gst_pad_send_event (GstPad * pad, GstEvent * event);
|
gboolean gst_pad_send_event (GstPad *pad, GstEvent *event);
|
||||||
gboolean gst_pad_event_default (GstPad * pad, GstEvent * event);
|
gboolean gst_pad_event_default (GstPad *pad, GstEvent *event);
|
||||||
GstPad *gst_pad_selectv (GList * padlist);
|
GstPad* gst_pad_selectv (GList *padlist);
|
||||||
GstPad *gst_pad_select (GstPad * pad, ...);
|
GstPad* gst_pad_select (GstPad *pad, ...);
|
||||||
GstPad *gst_pad_select_valist (GstPad * pad, va_list varargs);
|
GstPad* gst_pad_select_valist (GstPad *pad, va_list varargs);
|
||||||
|
|
||||||
|
|
||||||
/* convert/query/format functions */
|
/* convert/query/format functions */
|
||||||
void gst_pad_set_formats_function (GstPad * pad, GstPadFormatsFunction formats);
|
void gst_pad_set_formats_function (GstPad *pad,
|
||||||
G_CONST_RETURN GstFormat *gst_pad_get_formats (GstPad * pad);
|
GstPadFormatsFunction formats);
|
||||||
G_CONST_RETURN GstFormat *gst_pad_get_formats_default (GstPad * pad);
|
G_CONST_RETURN GstFormat*
|
||||||
|
gst_pad_get_formats (GstPad *pad);
|
||||||
|
G_CONST_RETURN GstFormat*
|
||||||
|
gst_pad_get_formats_default (GstPad *pad);
|
||||||
|
|
||||||
void gst_pad_set_convert_function (GstPad * pad, GstPadConvertFunction convert);
|
void gst_pad_set_convert_function (GstPad *pad, GstPadConvertFunction convert);
|
||||||
gboolean gst_pad_convert (GstPad * pad,
|
gboolean gst_pad_convert (GstPad *pad,
|
||||||
GstFormat src_format, gint64 src_value,
|
GstFormat src_format, gint64 src_value,
|
||||||
GstFormat * dest_format, gint64 * dest_value);
|
GstFormat *dest_format, gint64 *dest_value);
|
||||||
gboolean gst_pad_convert_default (GstPad * pad,
|
gboolean gst_pad_convert_default (GstPad *pad,
|
||||||
GstFormat src_format, gint64 src_value,
|
GstFormat src_format, gint64 src_value,
|
||||||
GstFormat * dest_format, gint64 * dest_value);
|
GstFormat *dest_format, gint64 *dest_value);
|
||||||
|
|
||||||
void gst_pad_set_query_function (GstPad * pad, GstPadQueryFunction query);
|
void gst_pad_set_query_function (GstPad *pad, GstPadQueryFunction query);
|
||||||
void gst_pad_set_query_type_function (GstPad * pad,
|
void gst_pad_set_query_type_function (GstPad *pad, GstPadQueryTypeFunction type_func);
|
||||||
GstPadQueryTypeFunction type_func);
|
G_CONST_RETURN GstQueryType*
|
||||||
G_CONST_RETURN GstQueryType *gst_pad_get_query_types (GstPad * pad);
|
gst_pad_get_query_types (GstPad *pad);
|
||||||
G_CONST_RETURN GstQueryType *gst_pad_get_query_types_default (GstPad * pad);
|
G_CONST_RETURN GstQueryType*
|
||||||
gboolean gst_pad_query (GstPad * pad, GstQueryType type,
|
gst_pad_get_query_types_default (GstPad *pad);
|
||||||
GstFormat * format, gint64 * value);
|
gboolean gst_pad_query (GstPad *pad, GstQueryType type,
|
||||||
gboolean gst_pad_query_default (GstPad * pad, GstQueryType type,
|
GstFormat *format, gint64 *value);
|
||||||
GstFormat * format, gint64 * value);
|
gboolean gst_pad_query_default (GstPad *pad, GstQueryType type,
|
||||||
|
GstFormat *format, gint64 *value);
|
||||||
void gst_pad_set_internal_link_function (GstPad * pad,
|
|
||||||
GstPadIntLinkFunction intlink);
|
|
||||||
GList *gst_pad_get_internal_links (GstPad * pad);
|
|
||||||
GList *gst_pad_get_internal_links_default (GstPad * pad);
|
|
||||||
|
|
||||||
|
void gst_pad_set_internal_link_function (GstPad *pad, GstPadIntLinkFunction intlink);
|
||||||
|
GList* gst_pad_get_internal_links (GstPad *pad);
|
||||||
|
GList* gst_pad_get_internal_links_default (GstPad *pad);
|
||||||
|
|
||||||
/* misc helper functions */
|
/* misc helper functions */
|
||||||
gboolean gst_pad_dispatcher (GstPad * pad, GstPadDispatcherFunction dispatch,
|
gboolean gst_pad_dispatcher (GstPad *pad, GstPadDispatcherFunction dispatch,
|
||||||
gpointer data);
|
gpointer data);
|
||||||
|
|
||||||
#define gst_pad_add_probe(pad, probe) \
|
#define gst_pad_add_probe(pad, probe) \
|
||||||
(gst_probe_dispatcher_add_probe (&(GST_REAL_PAD (pad)->probedisp), probe))
|
(gst_probe_dispatcher_add_probe (&(GST_REAL_PAD (pad)->probedisp), probe))
|
||||||
|
@ -514,28 +489,31 @@ gboolean gst_pad_dispatcher (GstPad * pad, GstPadDispatcherFunction dispatch,
|
||||||
(gst_probe_dispatcher_remove_probe (&(GST_REAL_PAD (pad)->probedisp), probe))
|
(gst_probe_dispatcher_remove_probe (&(GST_REAL_PAD (pad)->probedisp), probe))
|
||||||
|
|
||||||
#ifndef GST_DISABLE_LOADSAVE
|
#ifndef GST_DISABLE_LOADSAVE
|
||||||
void gst_pad_load_and_link (xmlNodePtr self, GstObject * parent);
|
void gst_pad_load_and_link (xmlNodePtr self, GstObject *parent);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* ghostpads */
|
/* ghostpads */
|
||||||
GstPad *gst_ghost_pad_new (const gchar * name, GstPad * pad);
|
GstPad* gst_ghost_pad_new (const gchar *name, GstPad *pad);
|
||||||
|
|
||||||
|
|
||||||
/* templates and factories */
|
/* templates and factories */
|
||||||
GType gst_pad_template_get_type (void);
|
GType gst_pad_template_get_type (void);
|
||||||
|
|
||||||
GstPadTemplate *gst_pad_template_new (const gchar * name_template,
|
GstPadTemplate* gst_pad_template_new (const gchar *name_template,
|
||||||
GstPadDirection direction, GstPadPresence presence, GstCaps * caps);
|
GstPadDirection direction, GstPadPresence presence,
|
||||||
|
GstCaps *caps);
|
||||||
|
|
||||||
GstPadTemplate *gst_static_pad_template_get (GstStaticPadTemplate * templ);
|
GstPadTemplate * gst_static_pad_template_get (GstStaticPadTemplate *templ);
|
||||||
const GstCaps *gst_pad_template_get_caps (GstPadTemplate * templ);
|
const GstCaps* gst_pad_template_get_caps (GstPadTemplate *templ);
|
||||||
const GstCaps *gst_pad_template_get_caps_by_name (GstPadTemplate * templ,
|
const GstCaps* gst_pad_template_get_caps_by_name (GstPadTemplate *templ, const gchar *name);
|
||||||
const gchar * name);
|
|
||||||
|
|
||||||
#ifndef GST_DISABLE_LOADSAVE
|
#ifndef GST_DISABLE_LOADSAVE
|
||||||
xmlNodePtr gst_ghost_pad_save_thyself (GstPad * pad, xmlNodePtr parent);
|
xmlNodePtr gst_ghost_pad_save_thyself (GstPad *pad,
|
||||||
|
xmlNodePtr parent);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
|
||||||
#endif /* __GST_PAD_H__ */
|
#endif /* __GST_PAD_H__ */
|
||||||
|
|
|
@ -26,9 +26,10 @@
|
||||||
#include <gst/gstbin.h>
|
#include <gst/gstbin.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
#ifndef GST_DISABLE_PARSE
|
|
||||||
GQuark gst_parse_error_quark (void);
|
|
||||||
|
|
||||||
|
#ifndef GST_DISABLE_PARSE
|
||||||
|
|
||||||
|
GQuark gst_parse_error_quark (void);
|
||||||
#define GST_PARSE_ERROR gst_parse_error_quark ()
|
#define GST_PARSE_ERROR gst_parse_error_quark ()
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
|
@ -40,17 +41,19 @@ typedef enum
|
||||||
GST_PARSE_ERROR_COULD_NOT_SET_PROPERTY,
|
GST_PARSE_ERROR_COULD_NOT_SET_PROPERTY,
|
||||||
GST_PARSE_ERROR_EMPTY_BIN,
|
GST_PARSE_ERROR_EMPTY_BIN,
|
||||||
GST_PARSE_ERROR_EMPTY
|
GST_PARSE_ERROR_EMPTY
|
||||||
}
|
} GstParseError;
|
||||||
GstParseError;
|
|
||||||
|
|
||||||
|
|
||||||
GstElement *gst_parse_launch (const gchar * pipeline_description,
|
GstElement* gst_parse_launch (const gchar *pipeline_description, GError **error);
|
||||||
GError ** error);
|
GstElement* gst_parse_launchv (const gchar **argv, GError **error);
|
||||||
GstElement *gst_parse_launchv (const gchar ** argv, GError ** error);
|
|
||||||
|
|
||||||
#else /* GST_DISABLE_PARSE */
|
#else /* GST_DISABLE_PARSE */
|
||||||
|
|
||||||
#pragma GCC poison gst_parse_launch
|
#pragma GCC poison gst_parse_launch
|
||||||
#pragma GCC poison gst_parse_launchv
|
#pragma GCC poison gst_parse_launchv
|
||||||
|
|
||||||
#endif /* GST_DISABLE_PARSE */
|
#endif /* GST_DISABLE_PARSE */
|
||||||
G_END_DECLS
|
|
||||||
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GST_PARSE_H__ */
|
#endif /* __GST_PARSE_H__ */
|
||||||
|
|
|
@ -27,32 +27,34 @@
|
||||||
#include <gst/gstbin.h>
|
#include <gst/gstbin.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define GST_TYPE_PIPELINE (gst_pipeline_get_type ())
|
#define GST_TYPE_PIPELINE (gst_pipeline_get_type ())
|
||||||
#define GST_PIPELINE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_PIPELINE, GstPipeline))
|
#define GST_PIPELINE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_PIPELINE, GstPipeline))
|
||||||
#define GST_IS_PIPELINE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_PIPELINE))
|
#define GST_IS_PIPELINE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_PIPELINE))
|
||||||
#define GST_PIPELINE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_PIPELINE, GstPipelineClass))
|
#define GST_PIPELINE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_PIPELINE, GstPipelineClass))
|
||||||
#define GST_IS_PIPELINE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_PIPELINE))
|
#define GST_IS_PIPELINE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_PIPELINE))
|
||||||
#define GST_PIPELINE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_PIPELINE, GstPipelineClass))
|
#define GST_PIPELINE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_PIPELINE, GstPipelineClass))
|
||||||
|
|
||||||
typedef struct _GstPipeline GstPipeline;
|
typedef struct _GstPipeline GstPipeline;
|
||||||
typedef struct _GstPipelineClass GstPipelineClass;
|
typedef struct _GstPipelineClass GstPipelineClass;
|
||||||
|
|
||||||
struct _GstPipeline
|
struct _GstPipeline {
|
||||||
{
|
GstBin bin;
|
||||||
GstBin bin;
|
|
||||||
|
|
||||||
gpointer _gst_reserved[GST_PADDING];
|
gpointer _gst_reserved[GST_PADDING];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstPipelineClass
|
struct _GstPipelineClass {
|
||||||
{
|
|
||||||
GstBinClass parent_class;
|
GstBinClass parent_class;
|
||||||
|
|
||||||
gpointer _gst_reserved[GST_PADDING];
|
gpointer _gst_reserved[GST_PADDING];
|
||||||
};
|
};
|
||||||
|
|
||||||
GType gst_pipeline_get_type (void);
|
GType gst_pipeline_get_type (void);
|
||||||
GstElement *gst_pipeline_new (const gchar * name);
|
GstElement* gst_pipeline_new (const gchar *name);
|
||||||
|
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GST_PIPELINE_H__ */
|
#endif /* __GST_PIPELINE_H__ */
|
||||||
|
|
||||||
|
|
108
gst/gstplugin.h
108
gst/gstplugin.h
|
@ -30,8 +30,9 @@
|
||||||
#include <gst/gstpluginfeature.h>
|
#include <gst/gstpluginfeature.h>
|
||||||
#include <gst/gstmacros.h>
|
#include <gst/gstmacros.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS GQuark gst_plugin_error_quark (void);
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
GQuark gst_plugin_error_quark (void);
|
||||||
#define GST_PLUGIN_ERROR gst_plugin_error_quark ()
|
#define GST_PLUGIN_ERROR gst_plugin_error_quark ()
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
|
@ -39,46 +40,42 @@ typedef enum
|
||||||
GST_PLUGIN_ERROR_MODULE,
|
GST_PLUGIN_ERROR_MODULE,
|
||||||
GST_PLUGIN_ERROR_DEPENDENCIES,
|
GST_PLUGIN_ERROR_DEPENDENCIES,
|
||||||
GST_PLUGIN_ERROR_NAME_MISMATCH
|
GST_PLUGIN_ERROR_NAME_MISMATCH
|
||||||
}
|
} GstPluginError;
|
||||||
GstPluginError;
|
|
||||||
|
|
||||||
#define GST_PLUGIN(plugin) ((GstPlugin *) (plugin))
|
#define GST_PLUGIN(plugin) ((GstPlugin *) (plugin))
|
||||||
|
|
||||||
typedef struct _GstPlugin GstPlugin;
|
typedef struct _GstPlugin GstPlugin;
|
||||||
typedef struct _GstPluginDesc GstPluginDesc;
|
typedef struct _GstPluginDesc GstPluginDesc;
|
||||||
|
|
||||||
/* Initialiser function: returns TRUE if plugin initialised successfully */
|
/* Initialiser function: returns TRUE if plugin initialised successfully */
|
||||||
typedef gboolean (*GstPluginInitFunc) (GstPlugin * plugin);
|
typedef gboolean (*GstPluginInitFunc) (GstPlugin *plugin);
|
||||||
|
|
||||||
/* exiting function when plugin is unloaded */
|
/* exiting function when plugin is unloaded */
|
||||||
typedef void (*GstPluginExitFunc) (GstPlugin * plugin);
|
typedef void (*GstPluginExitFunc) (GstPlugin *plugin);
|
||||||
|
|
||||||
struct _GstPluginDesc
|
struct _GstPluginDesc {
|
||||||
{
|
gint major_version; /* major version of core that plugin was compiled for */
|
||||||
gint major_version; /* major version of core that plugin was compiled for */
|
gint minor_version; /* minor version of core that plugin was compiled for */
|
||||||
gint minor_version; /* minor version of core that plugin was compiled for */
|
gchar *name; /* unique name of plugin */
|
||||||
gchar *name; /* unique name of plugin */
|
gchar *description; /* description of plugin */
|
||||||
gchar *description; /* description of plugin */
|
|
||||||
GstPluginInitFunc plugin_init; /* pointer to plugin_init function */
|
GstPluginInitFunc plugin_init; /* pointer to plugin_init function */
|
||||||
GstPluginExitFunc plugin_exit; /* pointer to exiting function */
|
GstPluginExitFunc plugin_exit; /* pointer to exiting function */
|
||||||
gchar *version; /* version of the plugin */
|
gchar *version; /* version of the plugin */
|
||||||
gchar *license; /* effective license of plugin */
|
gchar *license; /* effective license of plugin */
|
||||||
gchar *package; /* package plugin belongs to */
|
gchar *package; /* package plugin belongs to */
|
||||||
gchar *origin; /* URL to provider of plugin */
|
gchar *origin; /* URL to provider of plugin */
|
||||||
|
|
||||||
gpointer _gst_reserved[GST_PADDING];
|
gpointer _gst_reserved[GST_PADDING];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstPlugin
|
struct _GstPlugin {
|
||||||
{
|
GstPluginDesc desc;
|
||||||
GstPluginDesc desc;
|
|
||||||
|
|
||||||
gchar *filename;
|
gchar * filename;
|
||||||
GList *features; /* list of features provided */
|
GList * features; /* list of features provided */
|
||||||
gint numfeatures;
|
gint numfeatures;
|
||||||
|
|
||||||
gpointer manager; /* managing registry */
|
gpointer manager; /* managing registry */
|
||||||
GModule *module; /* contains the module if the plugin is loaded */
|
GModule * module; /* contains the module if the plugin is loaded */
|
||||||
|
|
||||||
gpointer _gst_reserved[GST_PADDING];
|
gpointer _gst_reserved[GST_PADDING];
|
||||||
};
|
};
|
||||||
|
@ -116,46 +113,51 @@ _gst_plugin_static_init__ ##init (void) \
|
||||||
GST_PADDING_INIT \
|
GST_PADDING_INIT \
|
||||||
}; \
|
}; \
|
||||||
_gst_plugin_register_static (&plugin_desc_); \
|
_gst_plugin_register_static (&plugin_desc_); \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define GST_LICENSE_UNKNOWN "unknown"
|
#define GST_LICENSE_UNKNOWN "unknown"
|
||||||
|
|
||||||
|
|
||||||
/* function for filters */
|
/* function for filters */
|
||||||
typedef gboolean (*GstPluginFilter) (GstPlugin * plugin, gpointer user_data);
|
typedef gboolean (*GstPluginFilter) (GstPlugin *plugin,
|
||||||
|
gpointer user_data);
|
||||||
|
|
||||||
#define GST_TYPE_PLUGIN (gst_plugin_get_type())
|
#define GST_TYPE_PLUGIN (gst_plugin_get_type())
|
||||||
GType gst_plugin_get_type (void);
|
GType gst_plugin_get_type (void);
|
||||||
void _gst_plugin_initialize (void);
|
void _gst_plugin_initialize (void);
|
||||||
void _gst_plugin_register_static (GstPluginDesc * desc);
|
void _gst_plugin_register_static (GstPluginDesc *desc);
|
||||||
|
|
||||||
G_CONST_RETURN gchar *gst_plugin_get_name (GstPlugin * plugin);
|
G_CONST_RETURN gchar* gst_plugin_get_name (GstPlugin *plugin);
|
||||||
G_CONST_RETURN gchar *gst_plugin_get_description (GstPlugin * plugin);
|
G_CONST_RETURN gchar* gst_plugin_get_description (GstPlugin *plugin);
|
||||||
G_CONST_RETURN gchar *gst_plugin_get_filename (GstPlugin * plugin);
|
G_CONST_RETURN gchar* gst_plugin_get_filename (GstPlugin *plugin);
|
||||||
G_CONST_RETURN gchar *gst_plugin_get_license (GstPlugin * plugin);
|
G_CONST_RETURN gchar* gst_plugin_get_license (GstPlugin *plugin);
|
||||||
G_CONST_RETURN gchar *gst_plugin_get_package (GstPlugin * plugin);
|
G_CONST_RETURN gchar* gst_plugin_get_package (GstPlugin *plugin);
|
||||||
G_CONST_RETURN gchar *gst_plugin_get_origin (GstPlugin * plugin);
|
G_CONST_RETURN gchar* gst_plugin_get_origin (GstPlugin *plugin);
|
||||||
GModule *gst_plugin_get_module (GstPlugin * plugin);
|
GModule * gst_plugin_get_module (GstPlugin *plugin);
|
||||||
gboolean gst_plugin_is_loaded (GstPlugin * plugin);
|
gboolean gst_plugin_is_loaded (GstPlugin *plugin);
|
||||||
|
|
||||||
GList *gst_plugin_feature_filter (GstPlugin * plugin,
|
GList* gst_plugin_feature_filter (GstPlugin *plugin,
|
||||||
GstPluginFeatureFilter filter, gboolean first, gpointer user_data);
|
GstPluginFeatureFilter filter,
|
||||||
GList *gst_plugin_list_feature_filter (GList * list,
|
gboolean first,
|
||||||
GstPluginFeatureFilter filter, gboolean first, gpointer user_data);
|
gpointer user_data);
|
||||||
gboolean gst_plugin_name_filter (GstPlugin * plugin, const gchar * name);
|
GList* gst_plugin_list_feature_filter (GList *list,
|
||||||
|
GstPluginFeatureFilter filter,
|
||||||
|
gboolean first,
|
||||||
|
gpointer user_data);
|
||||||
|
gboolean gst_plugin_name_filter (GstPlugin *plugin, const gchar *name);
|
||||||
|
|
||||||
GList *gst_plugin_get_feature_list (GstPlugin * plugin);
|
GList* gst_plugin_get_feature_list (GstPlugin *plugin);
|
||||||
GstPluginFeature *gst_plugin_find_feature (GstPlugin * plugin,
|
GstPluginFeature* gst_plugin_find_feature (GstPlugin *plugin, const gchar *name, GType type);
|
||||||
const gchar * name, GType type);
|
|
||||||
|
|
||||||
GstPlugin *gst_plugin_load_file (const gchar * filename, GError ** error);
|
GstPlugin * gst_plugin_load_file (const gchar *filename, GError** error);
|
||||||
gboolean gst_plugin_unload_plugin (GstPlugin * plugin);
|
gboolean gst_plugin_unload_plugin (GstPlugin *plugin);
|
||||||
|
|
||||||
void gst_plugin_add_feature (GstPlugin * plugin, GstPluginFeature * feature);
|
void gst_plugin_add_feature (GstPlugin *plugin, GstPluginFeature *feature);
|
||||||
|
|
||||||
/* shortcuts to load from the registry pool */
|
/* shortcuts to load from the registry pool */
|
||||||
gboolean gst_plugin_load (const gchar * name);
|
gboolean gst_plugin_load (const gchar *name);
|
||||||
gboolean gst_library_load (const gchar * name);
|
gboolean gst_library_load (const gchar *name);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GST_PLUGIN_H__ */
|
#endif /* __GST_PLUGIN_H__ */
|
||||||
|
|
|
@ -28,63 +28,64 @@
|
||||||
#include <gst/gsttypes.h>
|
#include <gst/gsttypes.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define GST_TYPE_PLUGIN_FEATURE (gst_plugin_feature_get_type())
|
#define GST_TYPE_PLUGIN_FEATURE (gst_plugin_feature_get_type())
|
||||||
#define GST_PLUGIN_FEATURE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_PLUGIN_FEATURE, GstPluginFeature))
|
#define GST_PLUGIN_FEATURE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_PLUGIN_FEATURE, GstPluginFeature))
|
||||||
#define GST_IS_PLUGIN_FEATURE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_PLUGIN_FEATURE))
|
#define GST_IS_PLUGIN_FEATURE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_PLUGIN_FEATURE))
|
||||||
#define GST_PLUGIN_FEATURE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_PLUGIN_FEATURE, GstPluginFeatureClass))
|
#define GST_PLUGIN_FEATURE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_PLUGIN_FEATURE, GstPluginFeatureClass))
|
||||||
#define GST_IS_PLUGIN_FEATURE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_PLUGIN_FEATURE))
|
#define GST_IS_PLUGIN_FEATURE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_PLUGIN_FEATURE))
|
||||||
#define GST_PLUGIN_FEATURE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_PLUGIN_FEATURE, GstPluginFeatureClass))
|
#define GST_PLUGIN_FEATURE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_PLUGIN_FEATURE, GstPluginFeatureClass))
|
||||||
|
|
||||||
#define GST_PLUGIN_FEATURE_NAME(feature) (GST_PLUGIN_FEATURE (feature)->name)
|
#define GST_PLUGIN_FEATURE_NAME(feature) (GST_PLUGIN_FEATURE (feature)->name)
|
||||||
|
|
||||||
typedef struct _GstPluginFeature GstPluginFeature;
|
typedef struct _GstPluginFeature GstPluginFeature;
|
||||||
typedef struct _GstPluginFeatureClass GstPluginFeatureClass;
|
typedef struct _GstPluginFeatureClass GstPluginFeatureClass;
|
||||||
|
|
||||||
struct _GstPluginFeature
|
struct _GstPluginFeature {
|
||||||
{
|
GObject object;
|
||||||
GObject object;
|
|
||||||
|
|
||||||
/*< private > */
|
/*< private >*/
|
||||||
gchar *name;
|
gchar *name;
|
||||||
guint rank;
|
guint rank;
|
||||||
|
|
||||||
gpointer manager;
|
gpointer manager;
|
||||||
|
|
||||||
gpointer _gst_reserved[GST_PADDING];
|
gpointer _gst_reserved[GST_PADDING];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstPluginFeatureClass
|
struct _GstPluginFeatureClass {
|
||||||
{
|
GObjectClass parent_class;
|
||||||
GObjectClass parent_class;
|
|
||||||
|
|
||||||
void (*unload_thyself) (GstPluginFeature * feature);
|
void (*unload_thyself) (GstPluginFeature *feature);
|
||||||
|
|
||||||
gpointer _gst_reserved[GST_PADDING];
|
gpointer _gst_reserved[GST_PADDING];
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct
|
typedef struct {
|
||||||
{
|
const gchar *name;
|
||||||
const gchar *name;
|
GType type;
|
||||||
GType type;
|
} GstTypeNameData;
|
||||||
}
|
|
||||||
GstTypeNameData;
|
|
||||||
|
|
||||||
/* filter */
|
/* filter */
|
||||||
typedef gboolean (*GstPluginFeatureFilter) (GstPluginFeature * feature,
|
typedef gboolean (*GstPluginFeatureFilter) (GstPluginFeature *feature,
|
||||||
gpointer user_data);
|
gpointer user_data);
|
||||||
|
|
||||||
/* normal GObject stuff */
|
/* normal GObject stuff */
|
||||||
GType gst_plugin_feature_get_type (void);
|
GType gst_plugin_feature_get_type (void);
|
||||||
|
|
||||||
gboolean gst_plugin_feature_ensure_loaded (GstPluginFeature * feature);
|
gboolean gst_plugin_feature_ensure_loaded (GstPluginFeature *feature);
|
||||||
void gst_plugin_feature_unload_thyself (GstPluginFeature * feature);
|
void gst_plugin_feature_unload_thyself (GstPluginFeature *feature);
|
||||||
|
|
||||||
gboolean gst_plugin_feature_type_name_filter (GstPluginFeature * feature,
|
gboolean gst_plugin_feature_type_name_filter (GstPluginFeature *feature,
|
||||||
GstTypeNameData * data);
|
GstTypeNameData *data);
|
||||||
|
|
||||||
void gst_plugin_feature_set_rank (GstPluginFeature * feature, guint rank);
|
void gst_plugin_feature_set_rank (GstPluginFeature *feature, guint rank);
|
||||||
void gst_plugin_feature_set_name (GstPluginFeature * feature,
|
void gst_plugin_feature_set_name (GstPluginFeature *feature, const gchar *name);
|
||||||
const gchar * name);
|
guint gst_plugin_feature_get_rank (GstPluginFeature *feature);
|
||||||
guint gst_plugin_feature_get_rank (GstPluginFeature * feature);
|
G_CONST_RETURN gchar *gst_plugin_feature_get_name (GstPluginFeature *feature);
|
||||||
G_CONST_RETURN gchar *gst_plugin_feature_get_name (GstPluginFeature * feature);
|
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
|
||||||
#endif /* __GST_PLUGIN_FEATURE_H__ */
|
#endif /* __GST_PLUGIN_FEATURE_H__ */
|
||||||
|
|
||||||
|
|
|
@ -27,49 +27,50 @@
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
#include <gst/gstdata.h>
|
#include <gst/gstdata.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS typedef struct _GstProbe GstProbe;
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
typedef struct _GstProbe GstProbe;
|
||||||
|
|
||||||
/* the callback should return FALSE if the data should be discarded */
|
/* the callback should return FALSE if the data should be discarded */
|
||||||
typedef gboolean (*GstProbeCallback) (GstProbe * probe,
|
typedef gboolean (*GstProbeCallback) (GstProbe *probe,
|
||||||
GstData ** data, gpointer user_data);
|
GstData **data,
|
||||||
|
gpointer user_data);
|
||||||
|
|
||||||
struct _GstProbe
|
struct _GstProbe {
|
||||||
{
|
gboolean single_shot;
|
||||||
gboolean single_shot;
|
|
||||||
|
GstProbeCallback callback;
|
||||||
GstProbeCallback callback;
|
gpointer user_data;
|
||||||
gpointer user_data;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
GstProbe *gst_probe_new (gboolean single_shot,
|
GstProbe* gst_probe_new (gboolean single_shot,
|
||||||
GstProbeCallback callback, gpointer user_data);
|
GstProbeCallback callback,
|
||||||
void gst_probe_destroy (GstProbe * probe);
|
gpointer user_data);
|
||||||
|
void gst_probe_destroy (GstProbe *probe);
|
||||||
|
|
||||||
gboolean gst_probe_perform (GstProbe * probe, GstData ** data);
|
gboolean gst_probe_perform (GstProbe *probe, GstData **data);
|
||||||
|
|
||||||
typedef struct _GstProbeDispatcher GstProbeDispatcher;
|
typedef struct _GstProbeDispatcher GstProbeDispatcher;
|
||||||
|
|
||||||
struct _GstProbeDispatcher
|
struct _GstProbeDispatcher {
|
||||||
{
|
gboolean active;
|
||||||
gboolean active;
|
|
||||||
|
GSList *probes;
|
||||||
GSList *probes;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
GstProbeDispatcher *gst_probe_dispatcher_new (void);
|
GstProbeDispatcher* gst_probe_dispatcher_new (void);
|
||||||
void gst_probe_dispatcher_destroy (GstProbeDispatcher * disp);
|
void gst_probe_dispatcher_destroy (GstProbeDispatcher *disp);
|
||||||
void gst_probe_dispatcher_init (GstProbeDispatcher * disp);
|
void gst_probe_dispatcher_init (GstProbeDispatcher *disp);
|
||||||
|
|
||||||
void gst_probe_dispatcher_set_active (GstProbeDispatcher * disp,
|
void gst_probe_dispatcher_set_active (GstProbeDispatcher *disp, gboolean active);
|
||||||
gboolean active);
|
void gst_probe_dispatcher_add_probe (GstProbeDispatcher *disp, GstProbe *probe);
|
||||||
void gst_probe_dispatcher_add_probe (GstProbeDispatcher * disp,
|
void gst_probe_dispatcher_remove_probe (GstProbeDispatcher *disp, GstProbe *probe);
|
||||||
GstProbe * probe);
|
|
||||||
void gst_probe_dispatcher_remove_probe (GstProbeDispatcher * disp,
|
|
||||||
GstProbe * probe);
|
|
||||||
|
|
||||||
gboolean gst_probe_dispatcher_dispatch (GstProbeDispatcher * disp,
|
gboolean gst_probe_dispatcher_dispatch (GstProbeDispatcher *disp, GstData **data);
|
||||||
GstData ** data);
|
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
|
||||||
#endif /* __GST_PAD_H__ */
|
#endif /* __GST_PAD_H__ */
|
||||||
|
|
||||||
|
|
|
@ -26,8 +26,9 @@
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS typedef enum
|
G_BEGIN_DECLS
|
||||||
{
|
|
||||||
|
typedef enum {
|
||||||
GST_QUERY_NONE = 0,
|
GST_QUERY_NONE = 0,
|
||||||
GST_QUERY_TOTAL,
|
GST_QUERY_TOTAL,
|
||||||
GST_QUERY_POSITION,
|
GST_QUERY_POSITION,
|
||||||
|
@ -36,8 +37,7 @@ G_BEGIN_DECLS typedef enum
|
||||||
GST_QUERY_START,
|
GST_QUERY_START,
|
||||||
GST_QUERY_SEGMENT_END,
|
GST_QUERY_SEGMENT_END,
|
||||||
GST_QUERY_RATE
|
GST_QUERY_RATE
|
||||||
}
|
} GstQueryType;
|
||||||
GstQueryType;
|
|
||||||
|
|
||||||
/* rate is relative to 1000000 */
|
/* rate is relative to 1000000 */
|
||||||
#define GST_QUERY_TYPE_RATE_DEN G_GINT64_CONSTANT (1000000)
|
#define GST_QUERY_TYPE_RATE_DEN G_GINT64_CONSTANT (1000000)
|
||||||
|
@ -46,9 +46,9 @@ typedef struct _GstQueryTypeDefinition GstQueryTypeDefinition;
|
||||||
|
|
||||||
struct _GstQueryTypeDefinition
|
struct _GstQueryTypeDefinition
|
||||||
{
|
{
|
||||||
GstQueryType value;
|
GstQueryType value;
|
||||||
gchar *nick;
|
gchar *nick;
|
||||||
gchar *description;
|
gchar *description;
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef G_HAVE_ISO_VARARGS
|
#ifdef G_HAVE_ISO_VARARGS
|
||||||
|
@ -75,21 +75,22 @@ functionname (type object) \
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void _gst_query_type_initialize (void);
|
void _gst_query_type_initialize (void);
|
||||||
|
|
||||||
/* register a new query */
|
/* register a new query */
|
||||||
GstQueryType gst_query_type_register (const gchar * nick,
|
GstQueryType gst_query_type_register (const gchar *nick,
|
||||||
const gchar * description);
|
const gchar *description);
|
||||||
GstQueryType gst_query_type_get_by_nick (const gchar * nick);
|
GstQueryType gst_query_type_get_by_nick (const gchar *nick);
|
||||||
|
|
||||||
/* check if a query is in an array of querys */
|
/* check if a query is in an array of querys */
|
||||||
gboolean gst_query_types_contains (const GstQueryType * types,
|
gboolean gst_query_types_contains (const GstQueryType *types, GstQueryType type);
|
||||||
GstQueryType type);
|
|
||||||
|
|
||||||
/* query for query details */
|
/* query for query details */
|
||||||
G_CONST_RETURN GstQueryTypeDefinition *gst_query_type_get_details (GstQueryType
|
G_CONST_RETURN GstQueryTypeDefinition*
|
||||||
type);
|
gst_query_type_get_details (GstQueryType type);
|
||||||
G_CONST_RETURN GList *gst_query_type_get_definitions (void);
|
G_CONST_RETURN GList* gst_query_type_get_definitions (void);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GST_QUERY_H__ */
|
#endif /* __GST_QUERY_H__ */
|
||||||
|
|
||||||
|
|
|
@ -29,6 +29,7 @@
|
||||||
|
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define GST_TYPE_QUEUE \
|
#define GST_TYPE_QUEUE \
|
||||||
(gst_queue_get_type())
|
(gst_queue_get_type())
|
||||||
#define GST_QUEUE(obj) \
|
#define GST_QUEUE(obj) \
|
||||||
|
@ -39,18 +40,17 @@ G_BEGIN_DECLS
|
||||||
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_QUEUE))
|
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_QUEUE))
|
||||||
#define GST_IS_QUEUE_CLASS(obj) \
|
#define GST_IS_QUEUE_CLASS(obj) \
|
||||||
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_QUEUE))
|
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_QUEUE))
|
||||||
enum
|
|
||||||
{
|
enum {
|
||||||
GST_QUEUE_NO_LEAK = 0,
|
GST_QUEUE_NO_LEAK = 0,
|
||||||
GST_QUEUE_LEAK_UPSTREAM = 1,
|
GST_QUEUE_LEAK_UPSTREAM = 1,
|
||||||
GST_QUEUE_LEAK_DOWNSTREAM = 2
|
GST_QUEUE_LEAK_DOWNSTREAM = 2
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct _GstQueue GstQueue;
|
typedef struct _GstQueue GstQueue;
|
||||||
typedef struct _GstQueueClass GstQueueClass;
|
typedef struct _GstQueueClass GstQueueClass;
|
||||||
|
|
||||||
struct _GstQueue
|
struct _GstQueue {
|
||||||
{
|
|
||||||
GstElement element;
|
GstElement element;
|
||||||
|
|
||||||
GstPad *sinkpad;
|
GstPad *sinkpad;
|
||||||
|
@ -59,15 +59,13 @@ struct _GstQueue
|
||||||
/* the queue of data we're keeping our grubby hands on */
|
/* the queue of data we're keeping our grubby hands on */
|
||||||
GQueue *queue;
|
GQueue *queue;
|
||||||
|
|
||||||
struct
|
struct {
|
||||||
{
|
guint buffers; /* no. of buffers */
|
||||||
guint buffers; /* no. of buffers */
|
guint bytes; /* no. of bytes */
|
||||||
guint bytes; /* no. of bytes */
|
guint64 time; /* amount of time */
|
||||||
guint64 time; /* amount of time */
|
} cur_level, /* currently in the queue */
|
||||||
}
|
max_size, /* max. amount of data allowed in the queue */
|
||||||
cur_level, /* currently in the queue */
|
min_threshold; /* min. amount of data required to wake reader */
|
||||||
max_size, /* max. amount of data allowed in the queue */
|
|
||||||
min_threshold; /* min. amount of data required to wake reader */
|
|
||||||
|
|
||||||
/* whether we leak data, and at which end */
|
/* whether we leak data, and at which end */
|
||||||
gint leaky;
|
gint leaky;
|
||||||
|
@ -82,28 +80,27 @@ struct _GstQueue
|
||||||
gboolean interrupt;
|
gboolean interrupt;
|
||||||
gboolean flush;
|
gboolean flush;
|
||||||
|
|
||||||
GMutex *qlock; /* lock for queue (vs object lock) */
|
GMutex *qlock; /* lock for queue (vs object lock) */
|
||||||
GCond *item_add; /* signals buffers now available for reading */
|
GCond *item_add; /* signals buffers now available for reading */
|
||||||
GCond *item_del; /* signals space now available for writing */
|
GCond *item_del; /* signals space now available for writing */
|
||||||
GCond *event_done; /* upstream event signaller */
|
GCond *event_done; /* upstream event signaller */
|
||||||
|
|
||||||
GTimeVal *timeval; /* the timeout for the queue locking */
|
GTimeVal *timeval; /* the timeout for the queue locking */
|
||||||
GQueue *events; /* upstream events get decoupled here */
|
GQueue *events; /* upstream events get decoupled here */
|
||||||
|
|
||||||
GstCaps *negotiated_caps;
|
GstCaps *negotiated_caps;
|
||||||
|
|
||||||
gpointer _gst_reserved[GST_PADDING];
|
gpointer _gst_reserved[GST_PADDING];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstQueueClass
|
struct _GstQueueClass {
|
||||||
{
|
|
||||||
GstElementClass parent_class;
|
GstElementClass parent_class;
|
||||||
|
|
||||||
/* signals - 'running' is called from both sides
|
/* signals - 'running' is called from both sides
|
||||||
* which might make it sort of non-useful... */
|
* which might make it sort of non-useful... */
|
||||||
void (*underrun) (GstQueue * queue);
|
void (*underrun) (GstQueue *queue);
|
||||||
void (*running) (GstQueue * queue);
|
void (*running) (GstQueue *queue);
|
||||||
void (*overrun) (GstQueue * queue);
|
void (*overrun) (GstQueue *queue);
|
||||||
|
|
||||||
gpointer _gst_reserved[GST_PADDING];
|
gpointer _gst_reserved[GST_PADDING];
|
||||||
};
|
};
|
||||||
|
@ -111,4 +108,6 @@ struct _GstQueueClass
|
||||||
GType gst_queue_get_type (void);
|
GType gst_queue_get_type (void);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
|
||||||
#endif /* __GST_QUEUE_H__ */
|
#endif /* __GST_QUEUE_H__ */
|
||||||
|
|
|
@ -43,27 +43,25 @@
|
||||||
S_IRGRP | S_IWGRP | \
|
S_IRGRP | S_IWGRP | \
|
||||||
S_IROTH | S_IWOTH)
|
S_IROTH | S_IWOTH)
|
||||||
|
|
||||||
G_BEGIN_DECLS typedef enum
|
G_BEGIN_DECLS
|
||||||
{
|
|
||||||
GST_REGISTRY_OK = (0),
|
|
||||||
GST_REGISTRY_LOAD_ERROR = (1 << 1),
|
|
||||||
GST_REGISTRY_SAVE_ERROR = (1 << 2),
|
|
||||||
GST_REGISTRY_PLUGIN_LOAD_ERROR = (1 << 3),
|
|
||||||
GST_REGISTRY_PLUGIN_SIGNATURE_ERROR = (1 << 4)
|
|
||||||
}
|
|
||||||
GstRegistryReturn;
|
|
||||||
|
|
||||||
typedef enum
|
typedef enum {
|
||||||
{
|
GST_REGISTRY_OK = (0),
|
||||||
GST_REGISTRY_READABLE = (1 << 1),
|
GST_REGISTRY_LOAD_ERROR = (1 << 1),
|
||||||
GST_REGISTRY_WRITABLE = (1 << 2),
|
GST_REGISTRY_SAVE_ERROR = (1 << 2),
|
||||||
GST_REGISTRY_EXISTS = (1 << 3),
|
GST_REGISTRY_PLUGIN_LOAD_ERROR = (1 << 3),
|
||||||
GST_REGISTRY_REMOTE = (1 << 4),
|
GST_REGISTRY_PLUGIN_SIGNATURE_ERROR = (1 << 4)
|
||||||
GST_REGISTRY_DELAYED_LOADING = (1 << 5)
|
} GstRegistryReturn;
|
||||||
}
|
|
||||||
GstRegistryFlags;
|
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
GST_REGISTRY_READABLE = (1 << 1),
|
||||||
|
GST_REGISTRY_WRITABLE = (1 << 2),
|
||||||
|
GST_REGISTRY_EXISTS = (1 << 3),
|
||||||
|
GST_REGISTRY_REMOTE = (1 << 4),
|
||||||
|
GST_REGISTRY_DELAYED_LOADING = (1 << 5)
|
||||||
|
} GstRegistryFlags;
|
||||||
|
|
||||||
|
|
||||||
#define GST_TYPE_REGISTRY (gst_registry_get_type ())
|
#define GST_TYPE_REGISTRY (gst_registry_get_type ())
|
||||||
#define GST_REGISTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_REGISTRY, GstRegistry))
|
#define GST_REGISTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_REGISTRY, GstRegistry))
|
||||||
#define GST_IS_REGISTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_REGISTRY))
|
#define GST_IS_REGISTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_REGISTRY))
|
||||||
|
@ -74,80 +72,75 @@ GstRegistryFlags;
|
||||||
typedef struct _GstRegistry GstRegistry;
|
typedef struct _GstRegistry GstRegistry;
|
||||||
typedef struct _GstRegistryClass GstRegistryClass;
|
typedef struct _GstRegistryClass GstRegistryClass;
|
||||||
|
|
||||||
struct _GstRegistry
|
struct _GstRegistry {
|
||||||
{
|
GObject object;
|
||||||
GObject object;
|
|
||||||
|
|
||||||
gint priority;
|
gint priority;
|
||||||
GstRegistryFlags flags;
|
GstRegistryFlags flags;
|
||||||
|
|
||||||
gchar *name;
|
gchar *name;
|
||||||
gchar *details;
|
gchar *details;
|
||||||
|
|
||||||
gboolean loaded;
|
gboolean loaded;
|
||||||
GList *plugins;
|
GList *plugins;
|
||||||
|
|
||||||
GList *paths;
|
GList *paths;
|
||||||
|
|
||||||
gpointer _gst_reserved[GST_PADDING];
|
gpointer _gst_reserved[GST_PADDING];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstRegistryClass
|
struct _GstRegistryClass {
|
||||||
{
|
GObjectClass parent_class;
|
||||||
GObjectClass parent_class;
|
|
||||||
|
|
||||||
/* vtable */
|
/* vtable */
|
||||||
gboolean (*load) (GstRegistry * registry);
|
gboolean (*load) (GstRegistry *registry);
|
||||||
gboolean (*save) (GstRegistry * registry);
|
gboolean (*save) (GstRegistry *registry);
|
||||||
gboolean (*rebuild) (GstRegistry * registry);
|
gboolean (*rebuild) (GstRegistry *registry);
|
||||||
gboolean (*unload) (GstRegistry * registry);
|
gboolean (*unload) (GstRegistry *registry);
|
||||||
|
|
||||||
GstRegistryReturn (*load_plugin) (GstRegistry * registry,
|
GstRegistryReturn (*load_plugin) (GstRegistry *registry, GstPlugin *plugin);
|
||||||
GstPlugin * plugin);
|
GstRegistryReturn (*unload_plugin) (GstRegistry *registry, GstPlugin *plugin);
|
||||||
GstRegistryReturn (*unload_plugin) (GstRegistry * registry,
|
GstRegistryReturn (*update_plugin) (GstRegistry *registry, GstPlugin *plugin);
|
||||||
GstPlugin * plugin);
|
|
||||||
GstRegistryReturn (*update_plugin) (GstRegistry * registry,
|
|
||||||
GstPlugin * plugin);
|
|
||||||
|
|
||||||
/* signals */
|
/* signals */
|
||||||
void (*plugin_added) (GstRegistry * registry, GstPlugin * plugin);
|
void (*plugin_added) (GstRegistry *registry, GstPlugin *plugin);
|
||||||
|
|
||||||
gpointer _gst_reserved[GST_PADDING];
|
gpointer _gst_reserved[GST_PADDING];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/* normal GObject stuff */
|
/* normal GObject stuff */
|
||||||
GType gst_registry_get_type (void);
|
GType gst_registry_get_type (void);
|
||||||
|
|
||||||
gboolean gst_registry_load (GstRegistry * registry);
|
gboolean gst_registry_load (GstRegistry *registry);
|
||||||
gboolean gst_registry_is_loaded (GstRegistry * registry);
|
gboolean gst_registry_is_loaded (GstRegistry *registry);
|
||||||
gboolean gst_registry_save (GstRegistry * registry);
|
gboolean gst_registry_save (GstRegistry *registry);
|
||||||
gboolean gst_registry_rebuild (GstRegistry * registry);
|
gboolean gst_registry_rebuild (GstRegistry *registry);
|
||||||
gboolean gst_registry_unload (GstRegistry * registry);
|
gboolean gst_registry_unload (GstRegistry *registry);
|
||||||
|
|
||||||
void gst_registry_add_path (GstRegistry * registry, const gchar * path);
|
void gst_registry_add_path (GstRegistry *registry, const gchar *path);
|
||||||
GList *gst_registry_get_path_list (GstRegistry * registry);
|
GList* gst_registry_get_path_list (GstRegistry *registry);
|
||||||
void gst_registry_clear_paths (GstRegistry * registry);
|
void gst_registry_clear_paths (GstRegistry *registry);
|
||||||
|
|
||||||
gboolean gst_registry_add_plugin (GstRegistry * registry, GstPlugin * plugin);
|
gboolean gst_registry_add_plugin (GstRegistry *registry, GstPlugin *plugin);
|
||||||
void gst_registry_remove_plugin (GstRegistry * registry, GstPlugin * plugin);
|
void gst_registry_remove_plugin (GstRegistry *registry, GstPlugin *plugin);
|
||||||
|
|
||||||
GList *gst_registry_plugin_filter (GstRegistry * registry,
|
GList* gst_registry_plugin_filter (GstRegistry *registry,
|
||||||
GstPluginFilter filter, gboolean first, gpointer user_data);
|
GstPluginFilter filter,
|
||||||
GList *gst_registry_feature_filter (GstRegistry * registry,
|
gboolean first,
|
||||||
GstPluginFeatureFilter filter, gboolean first, gpointer user_data);
|
gpointer user_data);
|
||||||
|
GList* gst_registry_feature_filter (GstRegistry *registry,
|
||||||
|
GstPluginFeatureFilter filter,
|
||||||
|
gboolean first,
|
||||||
|
gpointer user_data);
|
||||||
|
|
||||||
GstPlugin *gst_registry_find_plugin (GstRegistry * registry,
|
GstPlugin* gst_registry_find_plugin (GstRegistry *registry, const gchar *name);
|
||||||
const gchar * name);
|
GstPluginFeature* gst_registry_find_feature (GstRegistry *registry, const gchar *name, GType type);
|
||||||
GstPluginFeature *gst_registry_find_feature (GstRegistry * registry,
|
|
||||||
const gchar * name, GType type);
|
|
||||||
|
|
||||||
GstRegistryReturn gst_registry_load_plugin (GstRegistry * registry,
|
GstRegistryReturn gst_registry_load_plugin (GstRegistry *registry, GstPlugin *plugin);
|
||||||
GstPlugin * plugin);
|
GstRegistryReturn gst_registry_unload_plugin (GstRegistry *registry, GstPlugin *plugin);
|
||||||
GstRegistryReturn gst_registry_unload_plugin (GstRegistry * registry,
|
GstRegistryReturn gst_registry_update_plugin (GstRegistry *registry, GstPlugin *plugin);
|
||||||
GstPlugin * plugin);
|
|
||||||
GstRegistryReturn gst_registry_update_plugin (GstRegistry * registry,
|
|
||||||
GstPlugin * plugin);
|
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GST_REGISTRY_H__ */
|
#endif /* __GST_REGISTRY_H__ */
|
||||||
|
|
|
@ -25,33 +25,35 @@
|
||||||
#define __GST_REGISTRY_POOL_H__
|
#define __GST_REGISTRY_POOL_H__
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#include <gst/gstplugin.h>
|
#include <gst/gstplugin.h>
|
||||||
#include <gst/gstregistry.h>
|
#include <gst/gstregistry.h>
|
||||||
|
|
||||||
/* the pool of registries */
|
/* the pool of registries */
|
||||||
GList * gst_registry_pool_list (void);
|
GList* gst_registry_pool_list (void);
|
||||||
|
|
||||||
void gst_registry_pool_add (GstRegistry * registry, guint priority);
|
void gst_registry_pool_add (GstRegistry *registry, guint priority);
|
||||||
void gst_registry_pool_remove (GstRegistry * registry);
|
void gst_registry_pool_remove (GstRegistry *registry);
|
||||||
|
|
||||||
void gst_registry_pool_add_plugin (GstPlugin * plugin);
|
void gst_registry_pool_add_plugin (GstPlugin *plugin);
|
||||||
|
|
||||||
void gst_registry_pool_load_all (void);
|
void gst_registry_pool_load_all (void);
|
||||||
|
|
||||||
/* query the plugins/features */
|
/* query the plugins/features */
|
||||||
GList *gst_registry_pool_plugin_filter (GstPluginFilter filter,
|
GList* gst_registry_pool_plugin_filter (GstPluginFilter filter,
|
||||||
gboolean first, gpointer user_data);
|
gboolean first, gpointer user_data);
|
||||||
GList *gst_registry_pool_feature_filter (GstPluginFeatureFilter filter,
|
GList* gst_registry_pool_feature_filter (GstPluginFeatureFilter filter,
|
||||||
gboolean first, gpointer user_data);
|
gboolean first, gpointer user_data);
|
||||||
|
|
||||||
/* some predefined filters */
|
/* some predefined filters */
|
||||||
GList *gst_registry_pool_plugin_list (void);
|
GList* gst_registry_pool_plugin_list (void);
|
||||||
GList *gst_registry_pool_feature_list (GType type);
|
GList* gst_registry_pool_feature_list (GType type);
|
||||||
|
|
||||||
GstPlugin *gst_registry_pool_find_plugin (const gchar * name);
|
GstPlugin* gst_registry_pool_find_plugin (const gchar *name);
|
||||||
GstPluginFeature *gst_registry_pool_find_feature (const gchar * name,
|
GstPluginFeature* gst_registry_pool_find_feature (const gchar *name, GType type);
|
||||||
GType type);
|
|
||||||
|
|
||||||
GstRegistry *gst_registry_pool_get_prefered (GstRegistryFlags flags);
|
GstRegistry* gst_registry_pool_get_prefered (GstRegistryFlags flags);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GST_REGISTRY_POOL_H__ */
|
#endif /* __GST_REGISTRY_POOL_H__ */
|
||||||
|
|
|
@ -29,124 +29,114 @@
|
||||||
#include <gst/gstbin.h>
|
#include <gst/gstbin.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define GST_TYPE_SCHEDULER (gst_scheduler_get_type ())
|
#define GST_TYPE_SCHEDULER (gst_scheduler_get_type ())
|
||||||
#define GST_SCHEDULER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_SCHEDULER, GstScheduler))
|
#define GST_SCHEDULER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_SCHEDULER, GstScheduler))
|
||||||
#define GST_IS_SCHEDULER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_SCHEDULER))
|
#define GST_IS_SCHEDULER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_SCHEDULER))
|
||||||
#define GST_SCHEDULER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_SCHEDULER,GstSchedulerClass))
|
#define GST_SCHEDULER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_SCHEDULER,GstSchedulerClass))
|
||||||
#define GST_IS_SCHEDULER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_SCHEDULER))
|
#define GST_IS_SCHEDULER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_SCHEDULER))
|
||||||
#define GST_SCHEDULER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_SCHEDULER, GstSchedulerClass))
|
#define GST_SCHEDULER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_SCHEDULER, GstSchedulerClass))
|
||||||
typedef enum
|
|
||||||
{
|
typedef enum {
|
||||||
/* this scheduler works with a fixed clock */
|
/* this scheduler works with a fixed clock */
|
||||||
GST_SCHEDULER_FLAG_FIXED_CLOCK = GST_OBJECT_FLAG_LAST,
|
GST_SCHEDULER_FLAG_FIXED_CLOCK = GST_OBJECT_FLAG_LAST,
|
||||||
|
|
||||||
/* padding */
|
/* padding */
|
||||||
GST_SCHEDULER_FLAG_LAST = GST_OBJECT_FLAG_LAST + 4
|
GST_SCHEDULER_FLAG_LAST = GST_OBJECT_FLAG_LAST + 4
|
||||||
}
|
} GstSchedulerFlags;
|
||||||
GstSchedulerFlags;
|
|
||||||
|
|
||||||
#define GST_SCHEDULER_PARENT(sched) ((sched)->parent)
|
#define GST_SCHEDULER_PARENT(sched) ((sched)->parent)
|
||||||
#define GST_SCHEDULER_STATE(sched) ((sched)->state)
|
#define GST_SCHEDULER_STATE(sched) ((sched)->state)
|
||||||
|
|
||||||
/*typedef struct _GstScheduler GstScheduler; */
|
/*typedef struct _GstScheduler GstScheduler; */
|
||||||
/*typedef struct _GstSchedulerClass GstSchedulerClass; */
|
/*typedef struct _GstSchedulerClass GstSchedulerClass; */
|
||||||
typedef enum
|
typedef enum {
|
||||||
{
|
|
||||||
GST_SCHEDULER_STATE_NONE,
|
GST_SCHEDULER_STATE_NONE,
|
||||||
GST_SCHEDULER_STATE_RUNNING,
|
GST_SCHEDULER_STATE_RUNNING,
|
||||||
GST_SCHEDULER_STATE_STOPPED,
|
GST_SCHEDULER_STATE_STOPPED,
|
||||||
GST_SCHEDULER_STATE_ERROR
|
GST_SCHEDULER_STATE_ERROR
|
||||||
}
|
} GstSchedulerState;
|
||||||
GstSchedulerState;
|
|
||||||
|
|
||||||
struct _GstScheduler
|
struct _GstScheduler {
|
||||||
{
|
GstObject object;
|
||||||
GstObject object;
|
|
||||||
|
|
||||||
GstElement *parent;
|
GstElement *parent;
|
||||||
GstScheduler *parent_sched;
|
GstScheduler *parent_sched;
|
||||||
|
|
||||||
GstSchedulerState state;
|
GstSchedulerState state;
|
||||||
GstClock *clock;
|
GstClock *clock;
|
||||||
GstClock *current_clock;
|
GstClock *current_clock;
|
||||||
|
|
||||||
GList *clock_providers;
|
GList *clock_providers;
|
||||||
GList *clock_receivers;
|
GList *clock_receivers;
|
||||||
|
|
||||||
GList *schedulers;
|
GList *schedulers;
|
||||||
|
|
||||||
gpointer _gst_reserved[GST_PADDING];
|
gpointer _gst_reserved[GST_PADDING];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstSchedulerClass
|
struct _GstSchedulerClass {
|
||||||
{
|
|
||||||
GstObjectClass parent_class;
|
GstObjectClass parent_class;
|
||||||
|
|
||||||
/* virtual methods */
|
/* virtual methods */
|
||||||
void (*setup) (GstScheduler * sched);
|
void (*setup) (GstScheduler *sched);
|
||||||
void (*reset) (GstScheduler * sched);
|
void (*reset) (GstScheduler *sched);
|
||||||
void (*add_element) (GstScheduler * sched, GstElement * element);
|
void (*add_element) (GstScheduler *sched, GstElement *element);
|
||||||
void (*remove_element) (GstScheduler * sched, GstElement * element);
|
void (*remove_element) (GstScheduler *sched, GstElement *element);
|
||||||
void (*add_scheduler) (GstScheduler * sched, GstScheduler * sched2);
|
void (*add_scheduler) (GstScheduler *sched, GstScheduler *sched2);
|
||||||
void (*remove_scheduler) (GstScheduler * sched, GstScheduler * sched2);
|
void (*remove_scheduler) (GstScheduler *sched, GstScheduler *sched2);
|
||||||
GstElementStateReturn (*state_transition) (GstScheduler * sched,
|
GstElementStateReturn (*state_transition) (GstScheduler *sched, GstElement *element, gint transition);
|
||||||
GstElement * element, gint transition);
|
void (*scheduling_change) (GstScheduler *sched, GstElement *element);
|
||||||
void (*scheduling_change) (GstScheduler * sched, GstElement * element);
|
void (*lock_element) (GstScheduler *sched, GstElement *element);
|
||||||
void (*lock_element) (GstScheduler * sched, GstElement * element);
|
void (*unlock_element) (GstScheduler *sched, GstElement *element);
|
||||||
void (*unlock_element) (GstScheduler * sched, GstElement * element);
|
gboolean (*yield) (GstScheduler *sched, GstElement *element);
|
||||||
gboolean (*yield) (GstScheduler * sched, GstElement * element);
|
gboolean (*interrupt) (GstScheduler *sched, GstElement *element);
|
||||||
gboolean (*interrupt) (GstScheduler * sched, GstElement * element);
|
void (*error) (GstScheduler *sched, GstElement *element);
|
||||||
void (*error) (GstScheduler * sched, GstElement * element);
|
void (*pad_link) (GstScheduler *sched, GstPad *srcpad, GstPad *sinkpad);
|
||||||
void (*pad_link) (GstScheduler * sched, GstPad * srcpad, GstPad * sinkpad);
|
void (*pad_unlink) (GstScheduler *sched, GstPad *srcpad, GstPad *sinkpad);
|
||||||
void (*pad_unlink) (GstScheduler * sched, GstPad * srcpad, GstPad * sinkpad);
|
void (*pad_select) (GstScheduler *sched, GList *padlist);
|
||||||
void (*pad_select) (GstScheduler * sched, GList * padlist);
|
GstClockReturn (*clock_wait) (GstScheduler *sched, GstElement *element,
|
||||||
GstClockReturn (*clock_wait) (GstScheduler * sched, GstElement * element,
|
GstClockID id, GstClockTimeDiff *jitter);
|
||||||
GstClockID id, GstClockTimeDiff * jitter);
|
GstSchedulerState (*iterate) (GstScheduler *sched);
|
||||||
GstSchedulerState (*iterate) (GstScheduler * sched);
|
|
||||||
/* for debugging */
|
/* for debugging */
|
||||||
void (*show) (GstScheduler * sched);
|
void (*show) (GstScheduler *sched);
|
||||||
|
|
||||||
/* signals */
|
/* signals */
|
||||||
void (*object_sync) (GstScheduler * sched, GstClock * clock,
|
void (*object_sync) (GstScheduler *sched, GstClock *clock, GstObject *object,
|
||||||
GstObject * object, GstClockID id);
|
GstClockID id);
|
||||||
|
|
||||||
gpointer _gst_reserved[GST_PADDING];
|
gpointer _gst_reserved[GST_PADDING];
|
||||||
};
|
};
|
||||||
|
|
||||||
GType gst_scheduler_get_type (void);
|
GType gst_scheduler_get_type (void);
|
||||||
|
|
||||||
|
|
||||||
void gst_scheduler_setup (GstScheduler * sched);
|
void gst_scheduler_setup (GstScheduler *sched);
|
||||||
void gst_scheduler_reset (GstScheduler * sched);
|
void gst_scheduler_reset (GstScheduler *sched);
|
||||||
void gst_scheduler_add_element (GstScheduler * sched, GstElement * element);
|
void gst_scheduler_add_element (GstScheduler *sched, GstElement *element);
|
||||||
void gst_scheduler_remove_element (GstScheduler * sched, GstElement * element);
|
void gst_scheduler_remove_element (GstScheduler *sched, GstElement *element);
|
||||||
void gst_scheduler_add_scheduler (GstScheduler * sched, GstScheduler * sched2);
|
void gst_scheduler_add_scheduler (GstScheduler *sched, GstScheduler *sched2);
|
||||||
void gst_scheduler_remove_scheduler (GstScheduler * sched,
|
void gst_scheduler_remove_scheduler (GstScheduler *sched, GstScheduler *sched2);
|
||||||
GstScheduler * sched2);
|
GstElementStateReturn gst_scheduler_state_transition (GstScheduler *sched, GstElement *element, gint transition);
|
||||||
GstElementStateReturn gst_scheduler_state_transition (GstScheduler * sched,
|
void gst_scheduler_scheduling_change (GstScheduler *sched, GstElement *element);
|
||||||
GstElement * element, gint transition);
|
void gst_scheduler_lock_element (GstScheduler *sched, GstElement *element);
|
||||||
void gst_scheduler_scheduling_change (GstScheduler * sched,
|
void gst_scheduler_unlock_element (GstScheduler *sched, GstElement *element);
|
||||||
GstElement * element);
|
gboolean gst_scheduler_yield (GstScheduler *sched, GstElement *element);
|
||||||
void gst_scheduler_lock_element (GstScheduler * sched, GstElement * element);
|
gboolean gst_scheduler_interrupt (GstScheduler *sched, GstElement *element);
|
||||||
void gst_scheduler_unlock_element (GstScheduler * sched, GstElement * element);
|
void gst_scheduler_error (GstScheduler *sched, GstElement *element);
|
||||||
gboolean gst_scheduler_yield (GstScheduler * sched, GstElement * element);
|
void gst_scheduler_pad_link (GstScheduler *sched, GstPad *srcpad, GstPad *sinkpad);
|
||||||
gboolean gst_scheduler_interrupt (GstScheduler * sched, GstElement * element);
|
void gst_scheduler_pad_unlink (GstScheduler *sched, GstPad *srcpad, GstPad *sinkpad);
|
||||||
void gst_scheduler_error (GstScheduler * sched, GstElement * element);
|
GstPad* gst_scheduler_pad_select (GstScheduler *sched, GList *padlist);
|
||||||
void gst_scheduler_pad_link (GstScheduler * sched, GstPad * srcpad,
|
GstClockReturn gst_scheduler_clock_wait (GstScheduler *sched, GstElement *element,
|
||||||
GstPad * sinkpad);
|
GstClockID id, GstClockTimeDiff *jitter);
|
||||||
void gst_scheduler_pad_unlink (GstScheduler * sched, GstPad * srcpad,
|
gboolean gst_scheduler_iterate (GstScheduler *sched);
|
||||||
GstPad * sinkpad);
|
|
||||||
GstPad *gst_scheduler_pad_select (GstScheduler * sched, GList * padlist);
|
|
||||||
GstClockReturn gst_scheduler_clock_wait (GstScheduler * sched,
|
|
||||||
GstElement * element, GstClockID id, GstClockTimeDiff * jitter);
|
|
||||||
gboolean gst_scheduler_iterate (GstScheduler * sched);
|
|
||||||
|
|
||||||
void gst_scheduler_use_clock (GstScheduler * sched, GstClock * clock);
|
void gst_scheduler_use_clock (GstScheduler *sched, GstClock *clock);
|
||||||
void gst_scheduler_set_clock (GstScheduler * sched, GstClock * clock);
|
void gst_scheduler_set_clock (GstScheduler *sched, GstClock *clock);
|
||||||
GstClock *gst_scheduler_get_clock (GstScheduler * sched);
|
GstClock* gst_scheduler_get_clock (GstScheduler *sched);
|
||||||
void gst_scheduler_auto_clock (GstScheduler * sched);
|
void gst_scheduler_auto_clock (GstScheduler *sched);
|
||||||
|
|
||||||
void gst_scheduler_show (GstScheduler * sched);
|
void gst_scheduler_show (GstScheduler *sched);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* creating schedulers
|
* creating schedulers
|
||||||
|
@ -165,39 +155,35 @@ void gst_scheduler_show (GstScheduler * sched);
|
||||||
typedef struct _GstSchedulerFactory GstSchedulerFactory;
|
typedef struct _GstSchedulerFactory GstSchedulerFactory;
|
||||||
typedef struct _GstSchedulerFactoryClass GstSchedulerFactoryClass;
|
typedef struct _GstSchedulerFactoryClass GstSchedulerFactoryClass;
|
||||||
|
|
||||||
struct _GstSchedulerFactory
|
struct _GstSchedulerFactory {
|
||||||
{
|
|
||||||
GstPluginFeature feature;
|
GstPluginFeature feature;
|
||||||
|
|
||||||
gchar *longdesc; /* long description of the scheduler (well, don't overdo it..) */
|
gchar *longdesc; /* long description of the scheduler (well, don't overdo it..) */
|
||||||
GType type; /* unique GType of the scheduler */
|
GType type; /* unique GType of the scheduler */
|
||||||
|
|
||||||
gpointer _gst_reserved[GST_PADDING];
|
gpointer _gst_reserved[GST_PADDING];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstSchedulerFactoryClass
|
struct _GstSchedulerFactoryClass {
|
||||||
{
|
|
||||||
GstPluginFeatureClass parent;
|
GstPluginFeatureClass parent;
|
||||||
|
|
||||||
gpointer _gst_reserved[GST_PADDING];
|
gpointer _gst_reserved[GST_PADDING];
|
||||||
};
|
};
|
||||||
|
|
||||||
GType gst_scheduler_factory_get_type (void);
|
GType gst_scheduler_factory_get_type (void);
|
||||||
|
|
||||||
GstSchedulerFactory *gst_scheduler_factory_new (const gchar * name,
|
GstSchedulerFactory* gst_scheduler_factory_new (const gchar *name, const gchar *longdesc, GType type);
|
||||||
const gchar * longdesc, GType type);
|
void gst_scheduler_factory_destroy (GstSchedulerFactory *factory);
|
||||||
void gst_scheduler_factory_destroy (GstSchedulerFactory * factory);
|
|
||||||
|
|
||||||
GstSchedulerFactory *gst_scheduler_factory_find (const gchar * name);
|
GstSchedulerFactory* gst_scheduler_factory_find (const gchar *name);
|
||||||
|
|
||||||
GstScheduler *gst_scheduler_factory_create (GstSchedulerFactory * factory,
|
GstScheduler* gst_scheduler_factory_create (GstSchedulerFactory *factory, GstElement *parent);
|
||||||
GstElement * parent);
|
GstScheduler* gst_scheduler_factory_make (const gchar *name, GstElement *parent);
|
||||||
GstScheduler *gst_scheduler_factory_make (const gchar * name,
|
|
||||||
GstElement * parent);
|
|
||||||
|
|
||||||
void gst_scheduler_factory_set_default_name (const gchar * name);
|
void gst_scheduler_factory_set_default_name (const gchar* name);
|
||||||
G_CONST_RETURN gchar *gst_scheduler_factory_get_default_name (void);
|
G_CONST_RETURN gchar* gst_scheduler_factory_get_default_name (void);
|
||||||
|
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GST_SCHEDULER_H__ */
|
#endif /* __GST_SCHEDULER_H__ */
|
||||||
|
|
|
@ -24,16 +24,18 @@
|
||||||
#include <glib-object.h>
|
#include <glib-object.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define GST_TYPE_STRUCTURE (gst_structure_get_type ())
|
#define GST_TYPE_STRUCTURE (gst_structure_get_type ())
|
||||||
#define GST_STRUCTURE(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GST_TYPE_STRUCTURE, GstStructure))
|
#define GST_STRUCTURE(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GST_TYPE_STRUCTURE, GstStructure))
|
||||||
#define GST_IS_STRUCTURE(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GST_TYPE_STRUCTURE))
|
#define GST_IS_STRUCTURE(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GST_TYPE_STRUCTURE))
|
||||||
|
|
||||||
typedef struct _GstStructure GstStructure;
|
typedef struct _GstStructure GstStructure;
|
||||||
|
|
||||||
typedef gboolean (*GstStructureForeachFunc) (GQuark field_id,
|
typedef gboolean (*GstStructureForeachFunc) (GQuark field_id,
|
||||||
GValue * value, gpointer user_data);
|
GValue * value,
|
||||||
|
gpointer user_data);
|
||||||
|
|
||||||
struct _GstStructure
|
struct _GstStructure {
|
||||||
{
|
|
||||||
GType type;
|
GType type;
|
||||||
|
|
||||||
GQuark name;
|
GQuark name;
|
||||||
|
@ -41,68 +43,82 @@ struct _GstStructure
|
||||||
GArray *fields;
|
GArray *fields;
|
||||||
};
|
};
|
||||||
|
|
||||||
GType
|
GType gst_structure_get_type (void) G_GNUC_CONST;
|
||||||
gst_structure_get_type (void)
|
|
||||||
G_GNUC_CONST;
|
|
||||||
|
|
||||||
GstStructure *gst_structure_empty_new (const gchar * name);
|
GstStructure * gst_structure_empty_new (const gchar * name);
|
||||||
GstStructure *gst_structure_id_empty_new (GQuark quark);
|
GstStructure * gst_structure_id_empty_new (GQuark quark);
|
||||||
GstStructure *gst_structure_new (const gchar * name,
|
GstStructure * gst_structure_new (const gchar * name,
|
||||||
const gchar * firstfield, ...);
|
const gchar * firstfield,
|
||||||
GstStructure *gst_structure_new_valist (const gchar * name,
|
...);
|
||||||
const gchar * firstfield, va_list varargs);
|
GstStructure * gst_structure_new_valist (const gchar * name,
|
||||||
GstStructure *gst_structure_copy (const GstStructure * structure);
|
const gchar * firstfield,
|
||||||
void gst_structure_free (GstStructure * structure);
|
va_list varargs);
|
||||||
|
GstStructure * gst_structure_copy (const GstStructure *structure);
|
||||||
|
void gst_structure_free (GstStructure *structure);
|
||||||
|
|
||||||
G_CONST_RETURN gchar *gst_structure_get_name (const GstStructure *
|
G_CONST_RETURN gchar * gst_structure_get_name (const GstStructure *structure);
|
||||||
structure);
|
void gst_structure_set_name (GstStructure *structure,
|
||||||
void gst_structure_set_name (GstStructure * structure, const gchar * name);
|
const gchar *name);
|
||||||
|
|
||||||
void gst_structure_id_set_value (GstStructure * structure,
|
void gst_structure_id_set_value (GstStructure *structure,
|
||||||
GQuark field, const GValue * value);
|
GQuark field,
|
||||||
void gst_structure_set_value (GstStructure * structure,
|
const GValue *value);
|
||||||
const gchar * fieldname, const GValue * value);
|
void gst_structure_set_value (GstStructure *structure,
|
||||||
void gst_structure_set (GstStructure * structure,
|
const gchar *fieldname,
|
||||||
const gchar * fieldname, ...);
|
const GValue *value);
|
||||||
void gst_structure_set_valist (GstStructure * structure,
|
void gst_structure_set (GstStructure *structure,
|
||||||
const gchar * fieldname, va_list varargs);
|
const gchar *fieldname,
|
||||||
G_CONST_RETURN GValue *gst_structure_id_get_value (const GstStructure *
|
...);
|
||||||
structure, GQuark field);
|
void gst_structure_set_valist (GstStructure *structure,
|
||||||
G_CONST_RETURN GValue *gst_structure_get_value (const GstStructure *
|
const gchar *fieldname,
|
||||||
structure, const gchar * fieldname);
|
va_list varargs);
|
||||||
void gst_structure_remove_field (GstStructure * structure,
|
G_CONST_RETURN GValue * gst_structure_id_get_value (const GstStructure *structure,
|
||||||
const gchar * fieldname);
|
GQuark field);
|
||||||
void gst_structure_remove_fields (GstStructure * structure,
|
G_CONST_RETURN GValue * gst_structure_get_value (const GstStructure *structure,
|
||||||
const gchar * fieldname, ...);
|
const gchar *fieldname);
|
||||||
void gst_structure_remove_fields_valist (GstStructure * structure,
|
void gst_structure_remove_field (GstStructure *structure,
|
||||||
const gchar * fieldname, va_list varargs);
|
const gchar *fieldname);
|
||||||
void gst_structure_remove_all_fields (GstStructure * structure);
|
void gst_structure_remove_fields (GstStructure *structure,
|
||||||
|
const gchar *fieldname,
|
||||||
|
...);
|
||||||
|
void gst_structure_remove_fields_valist (GstStructure *structure,
|
||||||
|
const gchar *fieldname,
|
||||||
|
va_list varargs);
|
||||||
|
void gst_structure_remove_all_fields (GstStructure *structure);
|
||||||
|
|
||||||
GType gst_structure_get_field_type (const GstStructure * structure,
|
GType gst_structure_get_field_type (const GstStructure *structure,
|
||||||
const gchar * fieldname);
|
const gchar *fieldname);
|
||||||
gboolean gst_structure_foreach (GstStructure * structure,
|
gboolean gst_structure_foreach (GstStructure *structure,
|
||||||
GstStructureForeachFunc func, gpointer user_data);
|
GstStructureForeachFunc func,
|
||||||
gint gst_structure_n_fields (const GstStructure * structure);
|
gpointer user_data);
|
||||||
gboolean gst_structure_has_field (const GstStructure * structure,
|
gint gst_structure_n_fields (const GstStructure *structure);
|
||||||
const gchar * fieldname);
|
gboolean gst_structure_has_field (const GstStructure *structure,
|
||||||
gboolean gst_structure_has_field_typed (const GstStructure * structure,
|
const gchar *fieldname);
|
||||||
const gchar * fieldname, GType type);
|
gboolean gst_structure_has_field_typed (const GstStructure *structure,
|
||||||
|
const gchar *fieldname,
|
||||||
|
GType type);
|
||||||
|
|
||||||
/* utility functions */
|
/* utility functions */
|
||||||
gboolean gst_structure_get_boolean (const GstStructure * structure,
|
gboolean gst_structure_get_boolean (const GstStructure *structure,
|
||||||
const gchar * fieldname, gboolean * value);
|
const gchar *fieldname,
|
||||||
gboolean gst_structure_get_int (const GstStructure * structure,
|
gboolean *value);
|
||||||
const gchar * fieldname, gint * value);
|
gboolean gst_structure_get_int (const GstStructure *structure,
|
||||||
gboolean gst_structure_get_fourcc (const GstStructure * structure,
|
const gchar *fieldname,
|
||||||
const gchar * fieldname, guint32 * value);
|
gint *value);
|
||||||
gboolean gst_structure_get_double (const GstStructure * structure,
|
gboolean gst_structure_get_fourcc (const GstStructure *structure,
|
||||||
const gchar * fieldname, gdouble * value);
|
const gchar *fieldname,
|
||||||
G_CONST_RETURN gchar *gst_structure_get_string (const GstStructure *
|
guint32 *value);
|
||||||
structure, const gchar * fieldname);
|
gboolean gst_structure_get_double (const GstStructure *structure,
|
||||||
|
const gchar *fieldname,
|
||||||
|
gdouble *value);
|
||||||
|
G_CONST_RETURN gchar * gst_structure_get_string (const GstStructure *structure,
|
||||||
|
const gchar *fieldname);
|
||||||
|
|
||||||
gchar *gst_structure_to_string (const GstStructure * structure);
|
gchar * gst_structure_to_string (const GstStructure *structure);
|
||||||
GstStructure *gst_structure_from_string (const gchar * string,
|
GstStructure * gst_structure_from_string (const gchar *string,
|
||||||
gchar ** end);
|
gchar **end);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -27,35 +27,37 @@
|
||||||
#include <gst/gstclock.h>
|
#include <gst/gstclock.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define GST_TYPE_SYSTEM_CLOCK (gst_system_clock_get_type ())
|
#define GST_TYPE_SYSTEM_CLOCK (gst_system_clock_get_type ())
|
||||||
#define GST_SYSTEM_CLOCK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_SYSTEM_CLOCK, GstSystemClock))
|
#define GST_SYSTEM_CLOCK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_SYSTEM_CLOCK, GstSystemClock))
|
||||||
#define GST_IS_SYSTEM_CLOCK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_SYSTEM_CLOCK))
|
#define GST_IS_SYSTEM_CLOCK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_SYSTEM_CLOCK))
|
||||||
#define GST_SYSTEM_CLOCK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_SYSTEM_CLOCK, GstSystemClockClass))
|
#define GST_SYSTEM_CLOCK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_SYSTEM_CLOCK, GstSystemClockClass))
|
||||||
#define GST_IS_SYSTEM_CLOCK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_SYSTEM_CLOCK))
|
#define GST_IS_SYSTEM_CLOCK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_SYSTEM_CLOCK))
|
||||||
#define GST_SYSTEM_CLOCK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_SYSTEM_CLOCK, GstSystemClockClass))
|
#define GST_SYSTEM_CLOCK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_SYSTEM_CLOCK, GstSystemClockClass))
|
||||||
|
|
||||||
|
|
||||||
typedef struct _GstSystemClock GstSystemClock;
|
typedef struct _GstSystemClock GstSystemClock;
|
||||||
typedef struct _GstSystemClockClass GstSystemClockClass;
|
typedef struct _GstSystemClockClass GstSystemClockClass;
|
||||||
|
|
||||||
struct _GstSystemClock
|
struct _GstSystemClock {
|
||||||
{
|
GstClock clock;
|
||||||
GstClock clock;
|
|
||||||
|
|
||||||
GMutex *mutex;
|
GMutex * mutex;
|
||||||
GCond *cond;
|
GCond * cond;
|
||||||
|
|
||||||
gpointer _gst_reserved[GST_PADDING];
|
gpointer _gst_reserved[GST_PADDING];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstSystemClockClass
|
struct _GstSystemClockClass {
|
||||||
{
|
GstClockClass parent_class;
|
||||||
GstClockClass parent_class;
|
|
||||||
|
|
||||||
gpointer _gst_reserved[GST_PADDING];
|
gpointer _gst_reserved[GST_PADDING];
|
||||||
};
|
};
|
||||||
|
|
||||||
GType gst_system_clock_get_type (void);
|
GType gst_system_clock_get_type (void);
|
||||||
|
|
||||||
GstClock *gst_system_clock_obtain (void);
|
GstClock* gst_system_clock_obtain (void);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GST_SYSTEM_CLOCK_H__ */
|
#endif /* __GST_SYSTEM_CLOCK_H__ */
|
||||||
|
|
267
gst/gsttag.h
267
gst/gsttag.h
|
@ -26,8 +26,9 @@
|
||||||
#include <gst/gststructure.h>
|
#include <gst/gststructure.h>
|
||||||
#include <gst/gstevent.h>
|
#include <gst/gstevent.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS typedef enum
|
G_BEGIN_DECLS
|
||||||
{
|
|
||||||
|
typedef enum {
|
||||||
GST_TAG_MERGE_UNDEFINED,
|
GST_TAG_MERGE_UNDEFINED,
|
||||||
GST_TAG_MERGE_REPLACE_ALL,
|
GST_TAG_MERGE_REPLACE_ALL,
|
||||||
GST_TAG_MERGE_REPLACE,
|
GST_TAG_MERGE_REPLACE,
|
||||||
|
@ -37,136 +38,191 @@ G_BEGIN_DECLS typedef enum
|
||||||
GST_TAG_MERGE_KEEP_ALL,
|
GST_TAG_MERGE_KEEP_ALL,
|
||||||
/* add more */
|
/* add more */
|
||||||
GST_TAG_MERGE_COUNT
|
GST_TAG_MERGE_COUNT
|
||||||
}
|
} GstTagMergeMode;
|
||||||
GstTagMergeMode;
|
|
||||||
|
|
||||||
#define GST_TAG_MODE_IS_VALID(mode) (((mode) > GST_TAG_MERGE_UNDEFINED) && ((mode) < GST_TAG_MERGE_COUNT))
|
#define GST_TAG_MODE_IS_VALID(mode) (((mode) > GST_TAG_MERGE_UNDEFINED) && ((mode) < GST_TAG_MERGE_COUNT))
|
||||||
|
|
||||||
typedef enum
|
typedef enum {
|
||||||
{
|
|
||||||
GST_TAG_FLAG_UNDEFINED,
|
GST_TAG_FLAG_UNDEFINED,
|
||||||
GST_TAG_FLAG_META,
|
GST_TAG_FLAG_META,
|
||||||
GST_TAG_FLAG_ENCODED,
|
GST_TAG_FLAG_ENCODED,
|
||||||
GST_TAG_FLAG_DECODED,
|
GST_TAG_FLAG_DECODED,
|
||||||
GST_TAG_FLAG_COUNT
|
GST_TAG_FLAG_COUNT
|
||||||
}
|
} GstTagFlag;
|
||||||
GstTagFlag;
|
|
||||||
|
|
||||||
#define GST_TAG_FLAG_IS_VALID(flag) (((flag) > GST_TAG_FLAG_UNDEFINED) && ((flag) < GST_TAG_FLAG_COUNT))
|
#define GST_TAG_FLAG_IS_VALID(flag) (((flag) > GST_TAG_FLAG_UNDEFINED) && ((flag) < GST_TAG_FLAG_COUNT))
|
||||||
|
|
||||||
typedef GstStructure GstTagList;
|
typedef GstStructure GstTagList;
|
||||||
|
|
||||||
#define GST_TAG_LIST(x) ((GstTagList *) (x))
|
#define GST_TAG_LIST(x) ((GstTagList *) (x))
|
||||||
#define GST_IS_TAG_LIST(x) (gst_is_tag_list (GST_TAG_LIST (x)))
|
#define GST_IS_TAG_LIST(x) (gst_is_tag_list (GST_TAG_LIST (x)))
|
||||||
#define GST_TYPE_TAG_LIST (gst_tag_list_get_type ())
|
#define GST_TYPE_TAG_LIST (gst_tag_list_get_type ())
|
||||||
|
|
||||||
typedef void (*GstTagForeachFunc) (const GstTagList * list, const gchar * tag,
|
typedef void (* GstTagForeachFunc) (const GstTagList *list, const gchar *tag, gpointer user_data);
|
||||||
gpointer user_data);
|
typedef void (* GstTagMergeFunc) (GValue *dest, const GValue *src);
|
||||||
typedef void (*GstTagMergeFunc) (GValue * dest, const GValue * src);
|
|
||||||
|
|
||||||
/* initialize tagging system */
|
/* initialize tagging system */
|
||||||
void _gst_tag_initialize (void);
|
void _gst_tag_initialize (void);
|
||||||
GType gst_tag_list_get_type (void);
|
GType gst_tag_list_get_type (void);
|
||||||
|
|
||||||
void gst_tag_register (gchar * name,
|
void gst_tag_register (gchar * name,
|
||||||
GstTagFlag flag,
|
GstTagFlag flag,
|
||||||
GType type, gchar * nick, gchar * blurb, GstTagMergeFunc func);
|
GType type,
|
||||||
|
gchar * nick,
|
||||||
|
gchar * blurb,
|
||||||
|
GstTagMergeFunc func);
|
||||||
/* some default merging functions */
|
/* some default merging functions */
|
||||||
void gst_tag_merge_use_first (GValue * dest, const GValue * src);
|
void gst_tag_merge_use_first (GValue * dest,
|
||||||
void gst_tag_merge_strings_with_comma (GValue * dest, const GValue * src);
|
const GValue * src);
|
||||||
|
void gst_tag_merge_strings_with_comma (GValue * dest,
|
||||||
|
const GValue * src);
|
||||||
|
|
||||||
/* basic tag support */
|
/* basic tag support */
|
||||||
gboolean gst_tag_exists (const gchar * tag);
|
gboolean gst_tag_exists (const gchar * tag);
|
||||||
GType gst_tag_get_type (const gchar * tag);
|
GType gst_tag_get_type (const gchar * tag);
|
||||||
G_CONST_RETURN gchar *gst_tag_get_nick (const gchar * tag);
|
G_CONST_RETURN gchar *
|
||||||
G_CONST_RETURN gchar *gst_tag_get_description (const gchar * tag);
|
gst_tag_get_nick (const gchar * tag);
|
||||||
GstTagFlag gst_tag_get_flag (const gchar * tag);
|
G_CONST_RETURN gchar *
|
||||||
gboolean gst_tag_is_fixed (const gchar * tag);
|
gst_tag_get_description (const gchar * tag);
|
||||||
|
GstTagFlag gst_tag_get_flag (const gchar * tag);
|
||||||
|
gboolean gst_tag_is_fixed (const gchar * tag);
|
||||||
|
|
||||||
/* tag lists */
|
/* tag lists */
|
||||||
GstTagList *gst_tag_list_new (void);
|
GstTagList * gst_tag_list_new (void);
|
||||||
gboolean gst_is_tag_list (gconstpointer p);
|
gboolean gst_is_tag_list (gconstpointer p);
|
||||||
GstTagList *gst_tag_list_copy (const GstTagList * list);
|
GstTagList * gst_tag_list_copy (const GstTagList * list);
|
||||||
void gst_tag_list_insert (GstTagList * into,
|
void gst_tag_list_insert (GstTagList * into,
|
||||||
const GstTagList * from, GstTagMergeMode mode);
|
const GstTagList * from,
|
||||||
GstTagList *gst_tag_list_merge (const GstTagList * list1,
|
GstTagMergeMode mode);
|
||||||
const GstTagList * list2, GstTagMergeMode mode);
|
GstTagList * gst_tag_list_merge (const GstTagList * list1,
|
||||||
void gst_tag_list_free (GstTagList * list);
|
const GstTagList * list2,
|
||||||
guint gst_tag_list_get_tag_size (const GstTagList * list, const gchar * tag);
|
GstTagMergeMode mode);
|
||||||
void gst_tag_list_add (GstTagList * list,
|
void gst_tag_list_free (GstTagList * list);
|
||||||
GstTagMergeMode mode, const gchar * tag, ...);
|
guint gst_tag_list_get_tag_size (const GstTagList * list,
|
||||||
void gst_tag_list_add_values (GstTagList * list,
|
const gchar * tag);
|
||||||
GstTagMergeMode mode, const gchar * tag, ...);
|
void gst_tag_list_add (GstTagList * list,
|
||||||
void gst_tag_list_add_valist (GstTagList * list,
|
GstTagMergeMode mode,
|
||||||
GstTagMergeMode mode, const gchar * tag, va_list var_args);
|
const gchar * tag,
|
||||||
void gst_tag_list_add_valist_values (GstTagList * list,
|
...);
|
||||||
GstTagMergeMode mode, const gchar * tag, va_list var_args);
|
void gst_tag_list_add_values (GstTagList * list,
|
||||||
void gst_tag_list_remove_tag (GstTagList * list, const gchar * tag);
|
GstTagMergeMode mode,
|
||||||
void gst_tag_list_foreach (GstTagList * list,
|
const gchar * tag,
|
||||||
GstTagForeachFunc func, gpointer user_data);
|
...);
|
||||||
|
void gst_tag_list_add_valist (GstTagList * list,
|
||||||
|
GstTagMergeMode mode,
|
||||||
|
const gchar * tag,
|
||||||
|
va_list var_args);
|
||||||
|
void gst_tag_list_add_valist_values (GstTagList * list,
|
||||||
|
GstTagMergeMode mode,
|
||||||
|
const gchar * tag,
|
||||||
|
va_list var_args);
|
||||||
|
void gst_tag_list_remove_tag (GstTagList * list,
|
||||||
|
const gchar * tag);
|
||||||
|
void gst_tag_list_foreach (GstTagList * list,
|
||||||
|
GstTagForeachFunc func,
|
||||||
|
gpointer user_data);
|
||||||
|
|
||||||
G_CONST_RETURN GValue *gst_tag_list_get_value_index (const GstTagList * list,
|
G_CONST_RETURN GValue *
|
||||||
const gchar * tag, guint index);
|
gst_tag_list_get_value_index (const GstTagList * list,
|
||||||
gboolean gst_tag_list_copy_value (GValue * dest,
|
const gchar * tag,
|
||||||
const GstTagList * list, const gchar * tag);
|
guint index);
|
||||||
|
gboolean gst_tag_list_copy_value (GValue * dest,
|
||||||
|
const GstTagList * list,
|
||||||
|
const gchar * tag);
|
||||||
|
|
||||||
/* simplifications (FIXME: do we want them?) */
|
/* simplifications (FIXME: do we want them?) */
|
||||||
gboolean gst_tag_list_get_char (const GstTagList * list,
|
gboolean gst_tag_list_get_char (const GstTagList * list,
|
||||||
const gchar * tag, gchar * value);
|
const gchar * tag,
|
||||||
gboolean gst_tag_list_get_char_index (const GstTagList * list,
|
gchar * value);
|
||||||
const gchar * tag, guint index, gchar * value);
|
gboolean gst_tag_list_get_char_index (const GstTagList * list,
|
||||||
gboolean gst_tag_list_get_uchar (const GstTagList * list,
|
const gchar * tag,
|
||||||
const gchar * tag, guchar * value);
|
guint index,
|
||||||
gboolean gst_tag_list_get_uchar_index (const GstTagList * list,
|
gchar * value);
|
||||||
const gchar * tag, guint index, guchar * value);
|
gboolean gst_tag_list_get_uchar (const GstTagList * list,
|
||||||
gboolean gst_tag_list_get_boolean (const GstTagList * list,
|
const gchar * tag,
|
||||||
const gchar * tag, gboolean * value);
|
guchar * value);
|
||||||
gboolean gst_tag_list_get_boolean_index (const GstTagList * list,
|
gboolean gst_tag_list_get_uchar_index (const GstTagList * list,
|
||||||
const gchar * tag, guint index, gboolean * value);
|
const gchar * tag,
|
||||||
gboolean gst_tag_list_get_int (const GstTagList * list,
|
guint index,
|
||||||
const gchar * tag, gint * value);
|
guchar * value);
|
||||||
gboolean gst_tag_list_get_int_index (const GstTagList * list,
|
gboolean gst_tag_list_get_boolean (const GstTagList * list,
|
||||||
const gchar * tag, guint index, gint * value);
|
const gchar * tag,
|
||||||
gboolean gst_tag_list_get_uint (const GstTagList * list,
|
gboolean * value);
|
||||||
const gchar * tag, guint * value);
|
gboolean gst_tag_list_get_boolean_index (const GstTagList * list,
|
||||||
gboolean gst_tag_list_get_uint_index (const GstTagList * list,
|
const gchar * tag,
|
||||||
const gchar * tag, guint index, guint * value);
|
guint index,
|
||||||
gboolean gst_tag_list_get_long (const GstTagList * list,
|
gboolean * value);
|
||||||
const gchar * tag, glong * value);
|
gboolean gst_tag_list_get_int (const GstTagList * list,
|
||||||
gboolean gst_tag_list_get_long_index (const GstTagList * list,
|
const gchar * tag,
|
||||||
const gchar * tag, guint index, glong * value);
|
gint * value);
|
||||||
gboolean gst_tag_list_get_ulong (const GstTagList * list,
|
gboolean gst_tag_list_get_int_index (const GstTagList * list,
|
||||||
const gchar * tag, gulong * value);
|
const gchar * tag,
|
||||||
gboolean gst_tag_list_get_ulong_index (const GstTagList * list,
|
guint index,
|
||||||
const gchar * tag, guint index, gulong * value);
|
gint * value);
|
||||||
gboolean gst_tag_list_get_int64 (const GstTagList * list,
|
gboolean gst_tag_list_get_uint (const GstTagList * list,
|
||||||
const gchar * tag, gint64 * value);
|
const gchar * tag,
|
||||||
gboolean gst_tag_list_get_int64_index (const GstTagList * list,
|
guint * value);
|
||||||
const gchar * tag, guint index, gint64 * value);
|
gboolean gst_tag_list_get_uint_index (const GstTagList * list,
|
||||||
gboolean gst_tag_list_get_uint64 (const GstTagList * list,
|
const gchar * tag,
|
||||||
const gchar * tag, guint64 * value);
|
guint index,
|
||||||
gboolean gst_tag_list_get_uint64_index (const GstTagList * list,
|
guint * value);
|
||||||
const gchar * tag, guint index, guint64 * value);
|
gboolean gst_tag_list_get_long (const GstTagList * list,
|
||||||
gboolean gst_tag_list_get_float (const GstTagList * list,
|
const gchar * tag,
|
||||||
const gchar * tag, gfloat * value);
|
glong * value);
|
||||||
gboolean gst_tag_list_get_float_index (const GstTagList * list,
|
gboolean gst_tag_list_get_long_index (const GstTagList * list,
|
||||||
const gchar * tag, guint index, gfloat * value);
|
const gchar * tag,
|
||||||
gboolean gst_tag_list_get_double (const GstTagList * list,
|
guint index,
|
||||||
const gchar * tag, gdouble * value);
|
glong * value);
|
||||||
gboolean gst_tag_list_get_double_index (const GstTagList * list,
|
gboolean gst_tag_list_get_ulong (const GstTagList * list,
|
||||||
const gchar * tag, guint index, gdouble * value);
|
const gchar * tag,
|
||||||
gboolean gst_tag_list_get_string (const GstTagList * list,
|
gulong * value);
|
||||||
const gchar * tag, gchar ** value);
|
gboolean gst_tag_list_get_ulong_index (const GstTagList * list,
|
||||||
gboolean gst_tag_list_get_string_index (const GstTagList * list,
|
const gchar * tag,
|
||||||
const gchar * tag, guint index, gchar ** value);
|
guint index,
|
||||||
gboolean gst_tag_list_get_pointer (const GstTagList * list,
|
gulong * value);
|
||||||
const gchar * tag, gpointer * value);
|
gboolean gst_tag_list_get_int64 (const GstTagList * list,
|
||||||
gboolean gst_tag_list_get_pointer_index (const GstTagList * list,
|
const gchar * tag,
|
||||||
const gchar * tag, guint index, gpointer * value);
|
gint64 * value);
|
||||||
|
gboolean gst_tag_list_get_int64_index (const GstTagList * list,
|
||||||
|
const gchar * tag,
|
||||||
|
guint index,
|
||||||
|
gint64 * value);
|
||||||
|
gboolean gst_tag_list_get_uint64 (const GstTagList * list,
|
||||||
|
const gchar * tag,
|
||||||
|
guint64 * value);
|
||||||
|
gboolean gst_tag_list_get_uint64_index (const GstTagList * list,
|
||||||
|
const gchar * tag,
|
||||||
|
guint index,
|
||||||
|
guint64 * value);
|
||||||
|
gboolean gst_tag_list_get_float (const GstTagList * list,
|
||||||
|
const gchar * tag,
|
||||||
|
gfloat * value);
|
||||||
|
gboolean gst_tag_list_get_float_index (const GstTagList * list,
|
||||||
|
const gchar * tag,
|
||||||
|
guint index,
|
||||||
|
gfloat * value);
|
||||||
|
gboolean gst_tag_list_get_double (const GstTagList * list,
|
||||||
|
const gchar * tag,
|
||||||
|
gdouble * value);
|
||||||
|
gboolean gst_tag_list_get_double_index (const GstTagList * list,
|
||||||
|
const gchar * tag,
|
||||||
|
guint index,
|
||||||
|
gdouble * value);
|
||||||
|
gboolean gst_tag_list_get_string (const GstTagList * list,
|
||||||
|
const gchar * tag,
|
||||||
|
gchar ** value);
|
||||||
|
gboolean gst_tag_list_get_string_index (const GstTagList * list,
|
||||||
|
const gchar * tag,
|
||||||
|
guint index,
|
||||||
|
gchar ** value);
|
||||||
|
gboolean gst_tag_list_get_pointer (const GstTagList * list,
|
||||||
|
const gchar * tag,
|
||||||
|
gpointer * value);
|
||||||
|
gboolean gst_tag_list_get_pointer_index (const GstTagList * list,
|
||||||
|
const gchar * tag,
|
||||||
|
guint index,
|
||||||
|
gpointer * value);
|
||||||
|
|
||||||
/* tag events */
|
/* tag events */
|
||||||
GstEvent *gst_event_new_tag (GstTagList * list);
|
GstEvent * gst_event_new_tag (GstTagList * list);
|
||||||
GstTagList *gst_event_tag_get_list (GstEvent * tag_event);
|
GstTagList * gst_event_tag_get_list (GstEvent * tag_event);
|
||||||
|
|
||||||
|
|
||||||
/* GStreamer core tags (need to be discussed) */
|
/* GStreamer core tags (need to be discussed) */
|
||||||
|
@ -206,4 +262,5 @@ GstTagList *gst_event_tag_get_list (GstEvent * tag_event);
|
||||||
#define GST_TAG_ALBUM_PEAK "replaygain-album-peak"
|
#define GST_TAG_ALBUM_PEAK "replaygain-album-peak"
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GST_EVENT_H__ */
|
#endif /* __GST_EVENT_H__ */
|
||||||
|
|
|
@ -25,13 +25,15 @@
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define GST_TYPE_TAG_SETTER (gst_tag_setter_get_type ())
|
#define GST_TYPE_TAG_SETTER (gst_tag_setter_get_type ())
|
||||||
#define GST_TAG_SETTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_TAG_SETTER, GstTagSetter))
|
#define GST_TAG_SETTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_TAG_SETTER, GstTagSetter))
|
||||||
#define GST_TAG_SETTER_CLASS(obj) (G_TYPE_CHECK_CLASS_CAST ((obj), GST_TYPE_TAG_SETTER, GstTagSetter))
|
#define GST_TAG_SETTER_CLASS(obj) (G_TYPE_CHECK_CLASS_CAST ((obj), GST_TYPE_TAG_SETTER, GstTagSetter))
|
||||||
#define GST_IS_TAG_SETTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_TAG_SETTER))
|
#define GST_IS_TAG_SETTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_TAG_SETTER))
|
||||||
#define GST_TAG_SETTER_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GST_TYPE_TAG_SETTER, GstTagSetterIFace))
|
#define GST_TAG_SETTER_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GST_TYPE_TAG_SETTER, GstTagSetterIFace))
|
||||||
typedef struct _GstTagSetter GstTagSetter; /* Dummy typedef */
|
|
||||||
typedef struct _GstTagSetterIFace GstTagSetterIFace;
|
typedef struct _GstTagSetter GstTagSetter; /* Dummy typedef */
|
||||||
|
typedef struct _GstTagSetterIFace GstTagSetterIFace;
|
||||||
|
|
||||||
/* use an empty interface here to allow detection of elements using user-set
|
/* use an empty interface here to allow detection of elements using user-set
|
||||||
tags */
|
tags */
|
||||||
|
@ -44,29 +46,38 @@ struct _GstTagSetterIFace
|
||||||
/* virtual table */
|
/* virtual table */
|
||||||
};
|
};
|
||||||
|
|
||||||
GType
|
GType gst_tag_setter_get_type (void) G_GNUC_CONST;
|
||||||
gst_tag_setter_get_type (void)
|
|
||||||
G_GNUC_CONST;
|
|
||||||
|
|
||||||
void gst_tag_setter_merge (GstTagSetter * setter,
|
void gst_tag_setter_merge (GstTagSetter * setter,
|
||||||
const GstTagList * list, GstTagMergeMode mode);
|
const GstTagList * list,
|
||||||
void gst_tag_setter_add (GstTagSetter * setter,
|
GstTagMergeMode mode);
|
||||||
GstTagMergeMode mode, const gchar * tag, ...);
|
void gst_tag_setter_add (GstTagSetter * setter,
|
||||||
|
GstTagMergeMode mode,
|
||||||
|
const gchar * tag,
|
||||||
|
...);
|
||||||
|
|
||||||
void gst_tag_setter_add_values (GstTagSetter * setter,
|
void gst_tag_setter_add_values (GstTagSetter * setter,
|
||||||
GstTagMergeMode mode, const gchar * tag, ...);
|
GstTagMergeMode mode,
|
||||||
|
const gchar * tag,
|
||||||
|
...);
|
||||||
|
|
||||||
void gst_tag_setter_add_valist (GstTagSetter * setter,
|
void gst_tag_setter_add_valist (GstTagSetter * setter,
|
||||||
GstTagMergeMode mode, const gchar * tag, va_list var_args);
|
GstTagMergeMode mode,
|
||||||
|
const gchar * tag,
|
||||||
|
va_list var_args);
|
||||||
|
|
||||||
void gst_tag_setter_add_valist_values (GstTagSetter * setter,
|
void gst_tag_setter_add_valist_values(GstTagSetter * setter,
|
||||||
GstTagMergeMode mode, const gchar * tag, va_list var_args);
|
GstTagMergeMode mode,
|
||||||
|
const gchar * tag,
|
||||||
|
va_list var_args);
|
||||||
|
|
||||||
G_CONST_RETURN GstTagList *gst_tag_setter_get_list (GstTagSetter * setter);
|
G_CONST_RETURN GstTagList *
|
||||||
|
gst_tag_setter_get_list (GstTagSetter * setter);
|
||||||
|
|
||||||
void gst_tag_setter_set_merge_mode (GstTagSetter * setter,
|
void gst_tag_setter_set_merge_mode (GstTagSetter * setter,
|
||||||
GstTagMergeMode mode);
|
GstTagMergeMode mode);
|
||||||
GstTagMergeMode gst_tag_setter_get_merge_mode (GstTagSetter * setter);
|
GstTagMergeMode gst_tag_setter_get_merge_mode (GstTagSetter * setter);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GST_TAG_INTERFACE_H__ */
|
#endif /* __GST_TAG_INTERFACE_H__ */
|
||||||
|
|
267
gst/gsttaglist.h
267
gst/gsttaglist.h
|
@ -26,8 +26,9 @@
|
||||||
#include <gst/gststructure.h>
|
#include <gst/gststructure.h>
|
||||||
#include <gst/gstevent.h>
|
#include <gst/gstevent.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS typedef enum
|
G_BEGIN_DECLS
|
||||||
{
|
|
||||||
|
typedef enum {
|
||||||
GST_TAG_MERGE_UNDEFINED,
|
GST_TAG_MERGE_UNDEFINED,
|
||||||
GST_TAG_MERGE_REPLACE_ALL,
|
GST_TAG_MERGE_REPLACE_ALL,
|
||||||
GST_TAG_MERGE_REPLACE,
|
GST_TAG_MERGE_REPLACE,
|
||||||
|
@ -37,136 +38,191 @@ G_BEGIN_DECLS typedef enum
|
||||||
GST_TAG_MERGE_KEEP_ALL,
|
GST_TAG_MERGE_KEEP_ALL,
|
||||||
/* add more */
|
/* add more */
|
||||||
GST_TAG_MERGE_COUNT
|
GST_TAG_MERGE_COUNT
|
||||||
}
|
} GstTagMergeMode;
|
||||||
GstTagMergeMode;
|
|
||||||
|
|
||||||
#define GST_TAG_MODE_IS_VALID(mode) (((mode) > GST_TAG_MERGE_UNDEFINED) && ((mode) < GST_TAG_MERGE_COUNT))
|
#define GST_TAG_MODE_IS_VALID(mode) (((mode) > GST_TAG_MERGE_UNDEFINED) && ((mode) < GST_TAG_MERGE_COUNT))
|
||||||
|
|
||||||
typedef enum
|
typedef enum {
|
||||||
{
|
|
||||||
GST_TAG_FLAG_UNDEFINED,
|
GST_TAG_FLAG_UNDEFINED,
|
||||||
GST_TAG_FLAG_META,
|
GST_TAG_FLAG_META,
|
||||||
GST_TAG_FLAG_ENCODED,
|
GST_TAG_FLAG_ENCODED,
|
||||||
GST_TAG_FLAG_DECODED,
|
GST_TAG_FLAG_DECODED,
|
||||||
GST_TAG_FLAG_COUNT
|
GST_TAG_FLAG_COUNT
|
||||||
}
|
} GstTagFlag;
|
||||||
GstTagFlag;
|
|
||||||
|
|
||||||
#define GST_TAG_FLAG_IS_VALID(flag) (((flag) > GST_TAG_FLAG_UNDEFINED) && ((flag) < GST_TAG_FLAG_COUNT))
|
#define GST_TAG_FLAG_IS_VALID(flag) (((flag) > GST_TAG_FLAG_UNDEFINED) && ((flag) < GST_TAG_FLAG_COUNT))
|
||||||
|
|
||||||
typedef GstStructure GstTagList;
|
typedef GstStructure GstTagList;
|
||||||
|
|
||||||
#define GST_TAG_LIST(x) ((GstTagList *) (x))
|
#define GST_TAG_LIST(x) ((GstTagList *) (x))
|
||||||
#define GST_IS_TAG_LIST(x) (gst_is_tag_list (GST_TAG_LIST (x)))
|
#define GST_IS_TAG_LIST(x) (gst_is_tag_list (GST_TAG_LIST (x)))
|
||||||
#define GST_TYPE_TAG_LIST (gst_tag_list_get_type ())
|
#define GST_TYPE_TAG_LIST (gst_tag_list_get_type ())
|
||||||
|
|
||||||
typedef void (*GstTagForeachFunc) (const GstTagList * list, const gchar * tag,
|
typedef void (* GstTagForeachFunc) (const GstTagList *list, const gchar *tag, gpointer user_data);
|
||||||
gpointer user_data);
|
typedef void (* GstTagMergeFunc) (GValue *dest, const GValue *src);
|
||||||
typedef void (*GstTagMergeFunc) (GValue * dest, const GValue * src);
|
|
||||||
|
|
||||||
/* initialize tagging system */
|
/* initialize tagging system */
|
||||||
void _gst_tag_initialize (void);
|
void _gst_tag_initialize (void);
|
||||||
GType gst_tag_list_get_type (void);
|
GType gst_tag_list_get_type (void);
|
||||||
|
|
||||||
void gst_tag_register (gchar * name,
|
void gst_tag_register (gchar * name,
|
||||||
GstTagFlag flag,
|
GstTagFlag flag,
|
||||||
GType type, gchar * nick, gchar * blurb, GstTagMergeFunc func);
|
GType type,
|
||||||
|
gchar * nick,
|
||||||
|
gchar * blurb,
|
||||||
|
GstTagMergeFunc func);
|
||||||
/* some default merging functions */
|
/* some default merging functions */
|
||||||
void gst_tag_merge_use_first (GValue * dest, const GValue * src);
|
void gst_tag_merge_use_first (GValue * dest,
|
||||||
void gst_tag_merge_strings_with_comma (GValue * dest, const GValue * src);
|
const GValue * src);
|
||||||
|
void gst_tag_merge_strings_with_comma (GValue * dest,
|
||||||
|
const GValue * src);
|
||||||
|
|
||||||
/* basic tag support */
|
/* basic tag support */
|
||||||
gboolean gst_tag_exists (const gchar * tag);
|
gboolean gst_tag_exists (const gchar * tag);
|
||||||
GType gst_tag_get_type (const gchar * tag);
|
GType gst_tag_get_type (const gchar * tag);
|
||||||
G_CONST_RETURN gchar *gst_tag_get_nick (const gchar * tag);
|
G_CONST_RETURN gchar *
|
||||||
G_CONST_RETURN gchar *gst_tag_get_description (const gchar * tag);
|
gst_tag_get_nick (const gchar * tag);
|
||||||
GstTagFlag gst_tag_get_flag (const gchar * tag);
|
G_CONST_RETURN gchar *
|
||||||
gboolean gst_tag_is_fixed (const gchar * tag);
|
gst_tag_get_description (const gchar * tag);
|
||||||
|
GstTagFlag gst_tag_get_flag (const gchar * tag);
|
||||||
|
gboolean gst_tag_is_fixed (const gchar * tag);
|
||||||
|
|
||||||
/* tag lists */
|
/* tag lists */
|
||||||
GstTagList *gst_tag_list_new (void);
|
GstTagList * gst_tag_list_new (void);
|
||||||
gboolean gst_is_tag_list (gconstpointer p);
|
gboolean gst_is_tag_list (gconstpointer p);
|
||||||
GstTagList *gst_tag_list_copy (const GstTagList * list);
|
GstTagList * gst_tag_list_copy (const GstTagList * list);
|
||||||
void gst_tag_list_insert (GstTagList * into,
|
void gst_tag_list_insert (GstTagList * into,
|
||||||
const GstTagList * from, GstTagMergeMode mode);
|
const GstTagList * from,
|
||||||
GstTagList *gst_tag_list_merge (const GstTagList * list1,
|
GstTagMergeMode mode);
|
||||||
const GstTagList * list2, GstTagMergeMode mode);
|
GstTagList * gst_tag_list_merge (const GstTagList * list1,
|
||||||
void gst_tag_list_free (GstTagList * list);
|
const GstTagList * list2,
|
||||||
guint gst_tag_list_get_tag_size (const GstTagList * list, const gchar * tag);
|
GstTagMergeMode mode);
|
||||||
void gst_tag_list_add (GstTagList * list,
|
void gst_tag_list_free (GstTagList * list);
|
||||||
GstTagMergeMode mode, const gchar * tag, ...);
|
guint gst_tag_list_get_tag_size (const GstTagList * list,
|
||||||
void gst_tag_list_add_values (GstTagList * list,
|
const gchar * tag);
|
||||||
GstTagMergeMode mode, const gchar * tag, ...);
|
void gst_tag_list_add (GstTagList * list,
|
||||||
void gst_tag_list_add_valist (GstTagList * list,
|
GstTagMergeMode mode,
|
||||||
GstTagMergeMode mode, const gchar * tag, va_list var_args);
|
const gchar * tag,
|
||||||
void gst_tag_list_add_valist_values (GstTagList * list,
|
...);
|
||||||
GstTagMergeMode mode, const gchar * tag, va_list var_args);
|
void gst_tag_list_add_values (GstTagList * list,
|
||||||
void gst_tag_list_remove_tag (GstTagList * list, const gchar * tag);
|
GstTagMergeMode mode,
|
||||||
void gst_tag_list_foreach (GstTagList * list,
|
const gchar * tag,
|
||||||
GstTagForeachFunc func, gpointer user_data);
|
...);
|
||||||
|
void gst_tag_list_add_valist (GstTagList * list,
|
||||||
|
GstTagMergeMode mode,
|
||||||
|
const gchar * tag,
|
||||||
|
va_list var_args);
|
||||||
|
void gst_tag_list_add_valist_values (GstTagList * list,
|
||||||
|
GstTagMergeMode mode,
|
||||||
|
const gchar * tag,
|
||||||
|
va_list var_args);
|
||||||
|
void gst_tag_list_remove_tag (GstTagList * list,
|
||||||
|
const gchar * tag);
|
||||||
|
void gst_tag_list_foreach (GstTagList * list,
|
||||||
|
GstTagForeachFunc func,
|
||||||
|
gpointer user_data);
|
||||||
|
|
||||||
G_CONST_RETURN GValue *gst_tag_list_get_value_index (const GstTagList * list,
|
G_CONST_RETURN GValue *
|
||||||
const gchar * tag, guint index);
|
gst_tag_list_get_value_index (const GstTagList * list,
|
||||||
gboolean gst_tag_list_copy_value (GValue * dest,
|
const gchar * tag,
|
||||||
const GstTagList * list, const gchar * tag);
|
guint index);
|
||||||
|
gboolean gst_tag_list_copy_value (GValue * dest,
|
||||||
|
const GstTagList * list,
|
||||||
|
const gchar * tag);
|
||||||
|
|
||||||
/* simplifications (FIXME: do we want them?) */
|
/* simplifications (FIXME: do we want them?) */
|
||||||
gboolean gst_tag_list_get_char (const GstTagList * list,
|
gboolean gst_tag_list_get_char (const GstTagList * list,
|
||||||
const gchar * tag, gchar * value);
|
const gchar * tag,
|
||||||
gboolean gst_tag_list_get_char_index (const GstTagList * list,
|
gchar * value);
|
||||||
const gchar * tag, guint index, gchar * value);
|
gboolean gst_tag_list_get_char_index (const GstTagList * list,
|
||||||
gboolean gst_tag_list_get_uchar (const GstTagList * list,
|
const gchar * tag,
|
||||||
const gchar * tag, guchar * value);
|
guint index,
|
||||||
gboolean gst_tag_list_get_uchar_index (const GstTagList * list,
|
gchar * value);
|
||||||
const gchar * tag, guint index, guchar * value);
|
gboolean gst_tag_list_get_uchar (const GstTagList * list,
|
||||||
gboolean gst_tag_list_get_boolean (const GstTagList * list,
|
const gchar * tag,
|
||||||
const gchar * tag, gboolean * value);
|
guchar * value);
|
||||||
gboolean gst_tag_list_get_boolean_index (const GstTagList * list,
|
gboolean gst_tag_list_get_uchar_index (const GstTagList * list,
|
||||||
const gchar * tag, guint index, gboolean * value);
|
const gchar * tag,
|
||||||
gboolean gst_tag_list_get_int (const GstTagList * list,
|
guint index,
|
||||||
const gchar * tag, gint * value);
|
guchar * value);
|
||||||
gboolean gst_tag_list_get_int_index (const GstTagList * list,
|
gboolean gst_tag_list_get_boolean (const GstTagList * list,
|
||||||
const gchar * tag, guint index, gint * value);
|
const gchar * tag,
|
||||||
gboolean gst_tag_list_get_uint (const GstTagList * list,
|
gboolean * value);
|
||||||
const gchar * tag, guint * value);
|
gboolean gst_tag_list_get_boolean_index (const GstTagList * list,
|
||||||
gboolean gst_tag_list_get_uint_index (const GstTagList * list,
|
const gchar * tag,
|
||||||
const gchar * tag, guint index, guint * value);
|
guint index,
|
||||||
gboolean gst_tag_list_get_long (const GstTagList * list,
|
gboolean * value);
|
||||||
const gchar * tag, glong * value);
|
gboolean gst_tag_list_get_int (const GstTagList * list,
|
||||||
gboolean gst_tag_list_get_long_index (const GstTagList * list,
|
const gchar * tag,
|
||||||
const gchar * tag, guint index, glong * value);
|
gint * value);
|
||||||
gboolean gst_tag_list_get_ulong (const GstTagList * list,
|
gboolean gst_tag_list_get_int_index (const GstTagList * list,
|
||||||
const gchar * tag, gulong * value);
|
const gchar * tag,
|
||||||
gboolean gst_tag_list_get_ulong_index (const GstTagList * list,
|
guint index,
|
||||||
const gchar * tag, guint index, gulong * value);
|
gint * value);
|
||||||
gboolean gst_tag_list_get_int64 (const GstTagList * list,
|
gboolean gst_tag_list_get_uint (const GstTagList * list,
|
||||||
const gchar * tag, gint64 * value);
|
const gchar * tag,
|
||||||
gboolean gst_tag_list_get_int64_index (const GstTagList * list,
|
guint * value);
|
||||||
const gchar * tag, guint index, gint64 * value);
|
gboolean gst_tag_list_get_uint_index (const GstTagList * list,
|
||||||
gboolean gst_tag_list_get_uint64 (const GstTagList * list,
|
const gchar * tag,
|
||||||
const gchar * tag, guint64 * value);
|
guint index,
|
||||||
gboolean gst_tag_list_get_uint64_index (const GstTagList * list,
|
guint * value);
|
||||||
const gchar * tag, guint index, guint64 * value);
|
gboolean gst_tag_list_get_long (const GstTagList * list,
|
||||||
gboolean gst_tag_list_get_float (const GstTagList * list,
|
const gchar * tag,
|
||||||
const gchar * tag, gfloat * value);
|
glong * value);
|
||||||
gboolean gst_tag_list_get_float_index (const GstTagList * list,
|
gboolean gst_tag_list_get_long_index (const GstTagList * list,
|
||||||
const gchar * tag, guint index, gfloat * value);
|
const gchar * tag,
|
||||||
gboolean gst_tag_list_get_double (const GstTagList * list,
|
guint index,
|
||||||
const gchar * tag, gdouble * value);
|
glong * value);
|
||||||
gboolean gst_tag_list_get_double_index (const GstTagList * list,
|
gboolean gst_tag_list_get_ulong (const GstTagList * list,
|
||||||
const gchar * tag, guint index, gdouble * value);
|
const gchar * tag,
|
||||||
gboolean gst_tag_list_get_string (const GstTagList * list,
|
gulong * value);
|
||||||
const gchar * tag, gchar ** value);
|
gboolean gst_tag_list_get_ulong_index (const GstTagList * list,
|
||||||
gboolean gst_tag_list_get_string_index (const GstTagList * list,
|
const gchar * tag,
|
||||||
const gchar * tag, guint index, gchar ** value);
|
guint index,
|
||||||
gboolean gst_tag_list_get_pointer (const GstTagList * list,
|
gulong * value);
|
||||||
const gchar * tag, gpointer * value);
|
gboolean gst_tag_list_get_int64 (const GstTagList * list,
|
||||||
gboolean gst_tag_list_get_pointer_index (const GstTagList * list,
|
const gchar * tag,
|
||||||
const gchar * tag, guint index, gpointer * value);
|
gint64 * value);
|
||||||
|
gboolean gst_tag_list_get_int64_index (const GstTagList * list,
|
||||||
|
const gchar * tag,
|
||||||
|
guint index,
|
||||||
|
gint64 * value);
|
||||||
|
gboolean gst_tag_list_get_uint64 (const GstTagList * list,
|
||||||
|
const gchar * tag,
|
||||||
|
guint64 * value);
|
||||||
|
gboolean gst_tag_list_get_uint64_index (const GstTagList * list,
|
||||||
|
const gchar * tag,
|
||||||
|
guint index,
|
||||||
|
guint64 * value);
|
||||||
|
gboolean gst_tag_list_get_float (const GstTagList * list,
|
||||||
|
const gchar * tag,
|
||||||
|
gfloat * value);
|
||||||
|
gboolean gst_tag_list_get_float_index (const GstTagList * list,
|
||||||
|
const gchar * tag,
|
||||||
|
guint index,
|
||||||
|
gfloat * value);
|
||||||
|
gboolean gst_tag_list_get_double (const GstTagList * list,
|
||||||
|
const gchar * tag,
|
||||||
|
gdouble * value);
|
||||||
|
gboolean gst_tag_list_get_double_index (const GstTagList * list,
|
||||||
|
const gchar * tag,
|
||||||
|
guint index,
|
||||||
|
gdouble * value);
|
||||||
|
gboolean gst_tag_list_get_string (const GstTagList * list,
|
||||||
|
const gchar * tag,
|
||||||
|
gchar ** value);
|
||||||
|
gboolean gst_tag_list_get_string_index (const GstTagList * list,
|
||||||
|
const gchar * tag,
|
||||||
|
guint index,
|
||||||
|
gchar ** value);
|
||||||
|
gboolean gst_tag_list_get_pointer (const GstTagList * list,
|
||||||
|
const gchar * tag,
|
||||||
|
gpointer * value);
|
||||||
|
gboolean gst_tag_list_get_pointer_index (const GstTagList * list,
|
||||||
|
const gchar * tag,
|
||||||
|
guint index,
|
||||||
|
gpointer * value);
|
||||||
|
|
||||||
/* tag events */
|
/* tag events */
|
||||||
GstEvent *gst_event_new_tag (GstTagList * list);
|
GstEvent * gst_event_new_tag (GstTagList * list);
|
||||||
GstTagList *gst_event_tag_get_list (GstEvent * tag_event);
|
GstTagList * gst_event_tag_get_list (GstEvent * tag_event);
|
||||||
|
|
||||||
|
|
||||||
/* GStreamer core tags (need to be discussed) */
|
/* GStreamer core tags (need to be discussed) */
|
||||||
|
@ -206,4 +262,5 @@ GstTagList *gst_event_tag_get_list (GstEvent * tag_event);
|
||||||
#define GST_TAG_ALBUM_PEAK "replaygain-album-peak"
|
#define GST_TAG_ALBUM_PEAK "replaygain-album-peak"
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GST_EVENT_H__ */
|
#endif /* __GST_EVENT_H__ */
|
||||||
|
|
|
@ -25,13 +25,15 @@
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define GST_TYPE_TAG_SETTER (gst_tag_setter_get_type ())
|
#define GST_TYPE_TAG_SETTER (gst_tag_setter_get_type ())
|
||||||
#define GST_TAG_SETTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_TAG_SETTER, GstTagSetter))
|
#define GST_TAG_SETTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_TAG_SETTER, GstTagSetter))
|
||||||
#define GST_TAG_SETTER_CLASS(obj) (G_TYPE_CHECK_CLASS_CAST ((obj), GST_TYPE_TAG_SETTER, GstTagSetter))
|
#define GST_TAG_SETTER_CLASS(obj) (G_TYPE_CHECK_CLASS_CAST ((obj), GST_TYPE_TAG_SETTER, GstTagSetter))
|
||||||
#define GST_IS_TAG_SETTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_TAG_SETTER))
|
#define GST_IS_TAG_SETTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_TAG_SETTER))
|
||||||
#define GST_TAG_SETTER_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GST_TYPE_TAG_SETTER, GstTagSetterIFace))
|
#define GST_TAG_SETTER_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GST_TYPE_TAG_SETTER, GstTagSetterIFace))
|
||||||
typedef struct _GstTagSetter GstTagSetter; /* Dummy typedef */
|
|
||||||
typedef struct _GstTagSetterIFace GstTagSetterIFace;
|
typedef struct _GstTagSetter GstTagSetter; /* Dummy typedef */
|
||||||
|
typedef struct _GstTagSetterIFace GstTagSetterIFace;
|
||||||
|
|
||||||
/* use an empty interface here to allow detection of elements using user-set
|
/* use an empty interface here to allow detection of elements using user-set
|
||||||
tags */
|
tags */
|
||||||
|
@ -44,29 +46,38 @@ struct _GstTagSetterIFace
|
||||||
/* virtual table */
|
/* virtual table */
|
||||||
};
|
};
|
||||||
|
|
||||||
GType
|
GType gst_tag_setter_get_type (void) G_GNUC_CONST;
|
||||||
gst_tag_setter_get_type (void)
|
|
||||||
G_GNUC_CONST;
|
|
||||||
|
|
||||||
void gst_tag_setter_merge (GstTagSetter * setter,
|
void gst_tag_setter_merge (GstTagSetter * setter,
|
||||||
const GstTagList * list, GstTagMergeMode mode);
|
const GstTagList * list,
|
||||||
void gst_tag_setter_add (GstTagSetter * setter,
|
GstTagMergeMode mode);
|
||||||
GstTagMergeMode mode, const gchar * tag, ...);
|
void gst_tag_setter_add (GstTagSetter * setter,
|
||||||
|
GstTagMergeMode mode,
|
||||||
|
const gchar * tag,
|
||||||
|
...);
|
||||||
|
|
||||||
void gst_tag_setter_add_values (GstTagSetter * setter,
|
void gst_tag_setter_add_values (GstTagSetter * setter,
|
||||||
GstTagMergeMode mode, const gchar * tag, ...);
|
GstTagMergeMode mode,
|
||||||
|
const gchar * tag,
|
||||||
|
...);
|
||||||
|
|
||||||
void gst_tag_setter_add_valist (GstTagSetter * setter,
|
void gst_tag_setter_add_valist (GstTagSetter * setter,
|
||||||
GstTagMergeMode mode, const gchar * tag, va_list var_args);
|
GstTagMergeMode mode,
|
||||||
|
const gchar * tag,
|
||||||
|
va_list var_args);
|
||||||
|
|
||||||
void gst_tag_setter_add_valist_values (GstTagSetter * setter,
|
void gst_tag_setter_add_valist_values(GstTagSetter * setter,
|
||||||
GstTagMergeMode mode, const gchar * tag, va_list var_args);
|
GstTagMergeMode mode,
|
||||||
|
const gchar * tag,
|
||||||
|
va_list var_args);
|
||||||
|
|
||||||
G_CONST_RETURN GstTagList *gst_tag_setter_get_list (GstTagSetter * setter);
|
G_CONST_RETURN GstTagList *
|
||||||
|
gst_tag_setter_get_list (GstTagSetter * setter);
|
||||||
|
|
||||||
void gst_tag_setter_set_merge_mode (GstTagSetter * setter,
|
void gst_tag_setter_set_merge_mode (GstTagSetter * setter,
|
||||||
GstTagMergeMode mode);
|
GstTagMergeMode mode);
|
||||||
GstTagMergeMode gst_tag_setter_get_merge_mode (GstTagSetter * setter);
|
GstTagMergeMode gst_tag_setter_get_merge_mode (GstTagSetter * setter);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GST_TAG_INTERFACE_H__ */
|
#endif /* __GST_TAG_INTERFACE_H__ */
|
||||||
|
|
|
@ -29,20 +29,20 @@
|
||||||
#include <gst/gstbin.h>
|
#include <gst/gstbin.h>
|
||||||
|
|
||||||
|
|
||||||
G_BEGIN_DECLS extern GPrivate *gst_thread_current;
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
typedef enum
|
extern GPrivate *gst_thread_current;
|
||||||
{
|
|
||||||
GST_THREAD_STATE_SPINNING = GST_BIN_FLAG_LAST,
|
typedef enum {
|
||||||
|
GST_THREAD_STATE_SPINNING = GST_BIN_FLAG_LAST,
|
||||||
GST_THREAD_STATE_REAPING,
|
GST_THREAD_STATE_REAPING,
|
||||||
/* when iterating with mutex locked (special cases)
|
/* when iterating with mutex locked (special cases)
|
||||||
may only be set by thread itself */
|
may only be set by thread itself */
|
||||||
GST_THREAD_MUTEX_LOCKED,
|
GST_THREAD_MUTEX_LOCKED,
|
||||||
|
|
||||||
/* padding */
|
/* padding */
|
||||||
GST_THREAD_FLAG_LAST = GST_BIN_FLAG_LAST + 4
|
GST_THREAD_FLAG_LAST = GST_BIN_FLAG_LAST + 4
|
||||||
}
|
} GstThreadState;
|
||||||
GstThreadState;
|
|
||||||
|
|
||||||
#define GST_TYPE_THREAD (gst_thread_get_type())
|
#define GST_TYPE_THREAD (gst_thread_get_type())
|
||||||
#define GST_THREAD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_THREAD,GstThread))
|
#define GST_THREAD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_THREAD,GstThread))
|
||||||
|
@ -51,38 +51,38 @@ GstThreadState;
|
||||||
#define GST_IS_THREAD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_THREAD))
|
#define GST_IS_THREAD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_THREAD))
|
||||||
#define GST_THREAD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_THREAD, GstThreadClass))
|
#define GST_THREAD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_THREAD, GstThreadClass))
|
||||||
|
|
||||||
typedef struct _GstThread GstThread;
|
typedef struct _GstThread GstThread;
|
||||||
typedef struct _GstThreadClass GstThreadClass;
|
typedef struct _GstThreadClass GstThreadClass;
|
||||||
|
|
||||||
struct _GstThread
|
struct _GstThread {
|
||||||
{
|
GstBin bin;
|
||||||
GstBin bin;
|
|
||||||
|
|
||||||
GThread *thread_id; /* id of the thread, if any */
|
GThread *thread_id; /* id of the thread, if any */
|
||||||
GThreadPriority priority;
|
GThreadPriority priority;
|
||||||
|
|
||||||
GMutex *lock; /* thread lock/condititon pairs */
|
GMutex *lock; /* thread lock/condititon pairs */
|
||||||
GCond *cond; /* used to control the thread */
|
GCond *cond; /* used to control the thread */
|
||||||
|
|
||||||
gpointer _gst_reserved[GST_PADDING];
|
gpointer _gst_reserved[GST_PADDING];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstThreadClass
|
struct _GstThreadClass {
|
||||||
{
|
|
||||||
GstBinClass parent_class;
|
GstBinClass parent_class;
|
||||||
|
|
||||||
/* signals */
|
/* signals */
|
||||||
void (*shutdown) (GstThread * thread);
|
void (*shutdown) (GstThread *thread);
|
||||||
|
|
||||||
gpointer _gst_reserved[GST_PADDING];
|
gpointer _gst_reserved[GST_PADDING];
|
||||||
};
|
};
|
||||||
|
|
||||||
GType gst_thread_get_type (void);
|
GType gst_thread_get_type (void);
|
||||||
|
|
||||||
GstElement *gst_thread_new (const gchar * name);
|
GstElement* gst_thread_new (const gchar *name);
|
||||||
|
|
||||||
void gst_thread_set_priority (GstThread * thread, GThreadPriority priority);
|
void gst_thread_set_priority (GstThread *thread, GThreadPriority priority);
|
||||||
GstThread *gst_thread_get_current (void);
|
GstThread * gst_thread_get_current (void);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
|
||||||
#endif /* __GST_THREAD_H__ */
|
#endif /* __GST_THREAD_H__ */
|
||||||
|
|
|
@ -28,11 +28,12 @@
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS typedef struct _GstTrace GstTrace;
|
G_BEGIN_DECLS
|
||||||
typedef struct _GstTraceEntry GstTraceEntry;
|
|
||||||
|
|
||||||
struct _GstTrace
|
typedef struct _GstTrace GstTrace;
|
||||||
{
|
typedef struct _GstTraceEntry GstTraceEntry;
|
||||||
|
|
||||||
|
struct _GstTrace {
|
||||||
/* where this trace is going */
|
/* where this trace is going */
|
||||||
gchar *filename;
|
gchar *filename;
|
||||||
int fd;
|
int fd;
|
||||||
|
@ -43,8 +44,7 @@ struct _GstTrace
|
||||||
gint bufoffset;
|
gint bufoffset;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstTraceEntry
|
struct _GstTraceEntry {
|
||||||
{
|
|
||||||
gint64 timestamp;
|
gint64 timestamp;
|
||||||
guint32 sequence;
|
guint32 sequence;
|
||||||
guint32 data;
|
guint32 data;
|
||||||
|
@ -53,53 +53,49 @@ struct _GstTraceEntry
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
GstTrace *gst_trace_new (gchar * filename, gint size);
|
GstTrace* gst_trace_new (gchar *filename, gint size);
|
||||||
|
|
||||||
void gst_trace_destroy (GstTrace * trace);
|
|
||||||
void gst_trace_flush (GstTrace * trace);
|
|
||||||
void gst_trace_text_flush (GstTrace * trace);
|
|
||||||
|
|
||||||
|
void gst_trace_destroy (GstTrace *trace);
|
||||||
|
void gst_trace_flush (GstTrace *trace);
|
||||||
|
void gst_trace_text_flush (GstTrace *trace);
|
||||||
#define gst_trace_get_size(trace) ((trace)->bufsize)
|
#define gst_trace_get_size(trace) ((trace)->bufsize)
|
||||||
#define gst_trace_get_offset(trace) ((trace)->bufoffset)
|
#define gst_trace_get_offset(trace) ((trace)->bufoffset)
|
||||||
#define gst_trace_get_remaining(trace) ((trace)->bufsize - (trace)->bufoffset)
|
#define gst_trace_get_remaining(trace) ((trace)->bufsize - (trace)->bufoffset)
|
||||||
void gst_trace_set_default (GstTrace * trace);
|
void gst_trace_set_default (GstTrace *trace);
|
||||||
|
|
||||||
void _gst_trace_add_entry (GstTrace * trace, guint32 seq,
|
void _gst_trace_add_entry (GstTrace *trace, guint32 seq,
|
||||||
guint32 data, gchar * msg);
|
guint32 data, gchar *msg);
|
||||||
|
|
||||||
void gst_trace_read_tsc (gint64 * dst);
|
void gst_trace_read_tsc (gint64 *dst);
|
||||||
|
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
GST_ALLOC_TRACE_LIVE = (1 << 0),
|
GST_ALLOC_TRACE_LIVE = (1 << 0),
|
||||||
GST_ALLOC_TRACE_MEM_LIVE = (1 << 1)
|
GST_ALLOC_TRACE_MEM_LIVE = (1 << 1)
|
||||||
}
|
} GstAllocTraceFlags;
|
||||||
GstAllocTraceFlags;
|
|
||||||
|
|
||||||
typedef struct _GstAllocTrace GstAllocTrace;
|
typedef struct _GstAllocTrace GstAllocTrace;
|
||||||
|
|
||||||
struct _GstAllocTrace
|
struct _GstAllocTrace {
|
||||||
{
|
gchar *name;
|
||||||
gchar *name;
|
gint flags;
|
||||||
gint flags;
|
|
||||||
|
|
||||||
gint live;
|
gint live;
|
||||||
GSList *mem_live;
|
GSList *mem_live;
|
||||||
};
|
};
|
||||||
|
|
||||||
gboolean gst_alloc_trace_available (void);
|
gboolean gst_alloc_trace_available (void);
|
||||||
G_CONST_RETURN GList *gst_alloc_trace_list (void);
|
G_CONST_RETURN GList* gst_alloc_trace_list (void);
|
||||||
GstAllocTrace *_gst_alloc_trace_register (const gchar * name);
|
GstAllocTrace* _gst_alloc_trace_register (const gchar *name);
|
||||||
|
|
||||||
int gst_alloc_trace_live_all (void);
|
int gst_alloc_trace_live_all (void);
|
||||||
void gst_alloc_trace_print_all (void);
|
void gst_alloc_trace_print_all (void);
|
||||||
void gst_alloc_trace_set_flags_all (GstAllocTraceFlags flags);
|
void gst_alloc_trace_set_flags_all (GstAllocTraceFlags flags);
|
||||||
|
|
||||||
GstAllocTrace *gst_alloc_trace_get (const gchar * name);
|
GstAllocTrace* gst_alloc_trace_get (const gchar *name);
|
||||||
void gst_alloc_trace_print (const GstAllocTrace * trace);
|
void gst_alloc_trace_print (const GstAllocTrace *trace);
|
||||||
void gst_alloc_trace_set_flags (GstAllocTrace * trace,
|
void gst_alloc_trace_set_flags (GstAllocTrace *trace, GstAllocTraceFlags flags);
|
||||||
GstAllocTraceFlags flags);
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef GST_DISABLE_ALLOC_TRACE
|
#ifndef GST_DISABLE_ALLOC_TRACE
|
||||||
|
@ -131,7 +127,6 @@ G_STMT_START { \
|
||||||
|
|
||||||
#ifndef GST_DISABLE_TRACE
|
#ifndef GST_DISABLE_TRACE
|
||||||
extern gint _gst_trace_on;
|
extern gint _gst_trace_on;
|
||||||
|
|
||||||
#define gst_trace_add_entry(trace,seq,data,msg) \
|
#define gst_trace_add_entry(trace,seq,data,msg) \
|
||||||
if (_gst_trace_on) { \
|
if (_gst_trace_on) { \
|
||||||
_gst_trace_add_entry(trace,(guint32)seq,(guint32)data,msg); \
|
_gst_trace_add_entry(trace,(guint32)seq,(guint32)data,msg); \
|
||||||
|
@ -142,7 +137,7 @@ extern gint _gst_trace_on;
|
||||||
|
|
||||||
#else /* GST_DISABLE_TRACE */
|
#else /* GST_DISABLE_TRACE */
|
||||||
|
|
||||||
#pragma GCC poison gst_trace_new
|
#pragma GCC poison gst_trace_new
|
||||||
#pragma GCC poison gst_trace_destroy
|
#pragma GCC poison gst_trace_destroy
|
||||||
#pragma GCC poison gst_trace_flush
|
#pragma GCC poison gst_trace_flush
|
||||||
#pragma GCC poison gst_trace_text_flush
|
#pragma GCC poison gst_trace_text_flush
|
||||||
|
@ -155,16 +150,16 @@ extern gint _gst_trace_on;
|
||||||
#pragma GCC poison gst_trace_add_entry
|
#pragma GCC poison gst_trace_add_entry
|
||||||
|
|
||||||
#define gst_alloc_trace_register(name)
|
#define gst_alloc_trace_register(name)
|
||||||
#define gst_alloc_trace_new(trace, mem)
|
#define gst_alloc_trace_new(trace, mem)
|
||||||
#define gst_alloc_trace_free(trace, mem)
|
#define gst_alloc_trace_free(trace, mem)
|
||||||
|
|
||||||
#define gst_alloc_trace_available() (FALSE)
|
#define gst_alloc_trace_available() (FALSE)
|
||||||
#define gst_alloc_trace_list() (NULL)
|
#define gst_alloc_trace_list() (NULL)
|
||||||
#define _gst_alloc_trace_register(name) (NULL)
|
#define _gst_alloc_trace_register(name) (NULL)
|
||||||
|
|
||||||
#define gst_alloc_trace_print_all()
|
#define gst_alloc_trace_print_all()
|
||||||
#define gst_alloc_trace_set_flags_all(flags)
|
#define gst_alloc_trace_set_flags_all(flags)
|
||||||
|
|
||||||
#define gst_alloc_trace_get(name) (NULL)
|
#define gst_alloc_trace_get(name) (NULL)
|
||||||
#define gst_alloc_trace_print(trace)
|
#define gst_alloc_trace_print(trace)
|
||||||
#define gst_alloc_trace_set_flags(trace,flags)
|
#define gst_alloc_trace_set_flags(trace,flags)
|
||||||
|
@ -173,4 +168,5 @@ extern gint _gst_trace_on;
|
||||||
#endif /* GST_DISABLE_TRACE */
|
#endif /* GST_DISABLE_TRACE */
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GST_TRACE_H__ */
|
#endif /* __GST_TRACE_H__ */
|
||||||
|
|
|
@ -23,35 +23,35 @@
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
#include "gstmacros.h"
|
#include "gstmacros.h"
|
||||||
|
|
||||||
G_BEGIN_DECLS typedef struct _GstTrashStack GstTrashStack;
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
typedef struct _GstTrashStack GstTrashStack;
|
||||||
typedef struct _GstTrashStackElement GstTrashStackElement;
|
typedef struct _GstTrashStackElement GstTrashStackElement;
|
||||||
|
|
||||||
struct _GstTrashStackElement
|
struct _GstTrashStackElement {
|
||||||
{
|
|
||||||
GstTrashStackElement *next;
|
GstTrashStackElement *next;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef volatile gpointer gst_vgpointer; /* gtk-doc volatile workaround */
|
typedef volatile gpointer gst_vgpointer;/* gtk-doc volatile workaround */
|
||||||
typedef volatile gulong gst_vgulong; /* gtk-doc volatile workaround */
|
typedef volatile gulong gst_vgulong; /* gtk-doc volatile workaround */
|
||||||
|
|
||||||
struct _GstTrashStack
|
struct _GstTrashStack {
|
||||||
{
|
gst_vgpointer head;
|
||||||
gst_vgpointer head;
|
gst_vgulong count; /* for the ABA problem */
|
||||||
gst_vgulong count; /* for the ABA problem */
|
GMutex *lock; /* lock for C fallback */
|
||||||
GMutex *lock; /* lock for C fallback */
|
|
||||||
};
|
};
|
||||||
|
|
||||||
GST_INLINE_FUNC GstTrashStack *gst_trash_stack_new (void);
|
GST_INLINE_FUNC GstTrashStack* gst_trash_stack_new (void);
|
||||||
GST_INLINE_FUNC void gst_trash_stack_init (GstTrashStack * stack);
|
GST_INLINE_FUNC void gst_trash_stack_init (GstTrashStack *stack);
|
||||||
GST_INLINE_FUNC void gst_trash_stack_destroy (GstTrashStack * stack);
|
GST_INLINE_FUNC void gst_trash_stack_destroy (GstTrashStack *stack);
|
||||||
GST_INLINE_FUNC void gst_trash_stack_free (GstTrashStack * stack);
|
GST_INLINE_FUNC void gst_trash_stack_free (GstTrashStack *stack);
|
||||||
|
|
||||||
GST_INLINE_FUNC void gst_trash_stack_push (GstTrashStack * stack, gpointer mem);
|
GST_INLINE_FUNC void gst_trash_stack_push (GstTrashStack *stack, gpointer mem);
|
||||||
GST_INLINE_FUNC gpointer gst_trash_stack_pop (GstTrashStack * stack);
|
GST_INLINE_FUNC gpointer gst_trash_stack_pop (GstTrashStack *stack);
|
||||||
|
|
||||||
#if defined (GST_CAN_INLINE) || defined (__GST_TRASH_STACK_C__)
|
#if defined (GST_CAN_INLINE) || defined (__GST_TRASH_STACK_C__)
|
||||||
|
|
||||||
#if defined (USE_FAST_STACK_TRASH) && defined (__i386__) && defined (__GNUC__) && __GNUC__ >= 2
|
#if defined (USE_FAST_STACK_TRASH) && defined (__i386__) && defined (__GNUC__) && __GNUC__ >= 2
|
||||||
|
|
||||||
#ifdef GST_CONFIG_NO_SMP
|
#ifdef GST_CONFIG_NO_SMP
|
||||||
#define SMP_LOCK ""
|
#define SMP_LOCK ""
|
||||||
|
@ -63,29 +63,34 @@ GST_INLINE_FUNC gpointer gst_trash_stack_pop (GstTrashStack * stack);
|
||||||
* intel ia32 optimized lockfree implementations
|
* intel ia32 optimized lockfree implementations
|
||||||
*/
|
*/
|
||||||
GST_INLINE_FUNC void
|
GST_INLINE_FUNC void
|
||||||
gst_trash_stack_init (GstTrashStack * stack)
|
gst_trash_stack_init (GstTrashStack *stack)
|
||||||
{
|
{
|
||||||
stack->head = NULL;
|
stack->head = NULL;
|
||||||
stack->count = 0;
|
stack->count = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_INLINE_FUNC void
|
GST_INLINE_FUNC void
|
||||||
gst_trash_stack_destroy (GstTrashStack * stack)
|
gst_trash_stack_destroy (GstTrashStack *stack)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_INLINE_FUNC void
|
GST_INLINE_FUNC void
|
||||||
gst_trash_stack_push (GstTrashStack * stack, gpointer mem)
|
gst_trash_stack_push (GstTrashStack *stack, gpointer mem)
|
||||||
{
|
{
|
||||||
__asm__ __volatile__ ("1: \n\t" " movl %2, (%1); \n\t" /* mem->next == stack->head */
|
__asm__ __volatile__ (
|
||||||
SMP_LOCK "cmpxchg %1, %0; \n\t" /* if head unchanged, move mem into it */
|
"1: \n\t"
|
||||||
" jnz 1b; \n" /* head changed, retry */
|
" movl %2, (%1); \n\t" /* mem->next == stack->head */
|
||||||
::"m" (*stack), "r" (mem), "a" (stack->head)
|
SMP_LOCK "cmpxchg %1, %0; \n\t" /* if head unchanged, move mem into it */
|
||||||
);
|
" jnz 1b; \n" /* head changed, retry */
|
||||||
|
:
|
||||||
|
: "m" (*stack),
|
||||||
|
"r" (mem),
|
||||||
|
"a" (stack->head)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_INLINE_FUNC gpointer
|
GST_INLINE_FUNC gpointer
|
||||||
gst_trash_stack_pop (GstTrashStack * stack)
|
gst_trash_stack_pop (GstTrashStack *stack)
|
||||||
{
|
{
|
||||||
GstTrashStackElement *head;
|
GstTrashStackElement *head;
|
||||||
|
|
||||||
|
@ -95,16 +100,23 @@ gst_trash_stack_pop (GstTrashStack * stack)
|
||||||
* into place. This is usually solved using a counter which makes it highly
|
* into place. This is usually solved using a counter which makes it highly
|
||||||
* inlikely that we manage to grab the wrong head->next value.
|
* inlikely that we manage to grab the wrong head->next value.
|
||||||
*/
|
*/
|
||||||
__asm__ __volatile__ (" testl %%eax, %%eax; \n\t" /* if (head == NULL) return */
|
__asm__ __volatile__ (
|
||||||
" jz 20f; \n\t" "10: \n\t" " movl (%%eax), %%ebx; \n\t" /* take value pointed to by head (head->next) */
|
" testl %%eax, %%eax; \n\t" /* if (head == NULL) return */
|
||||||
" movl %%edx, %%ecx; \n\t" /* take counter */
|
" jz 20f; \n\t"
|
||||||
" incl %%ecx; \n\t" /* and increment */
|
"10: \n\t"
|
||||||
SMP_LOCK "cmpxchg8b %1; \n\t" /* if eax:edx == *stack, move ebx:ecx to *stack,
|
" movl (%%eax), %%ebx; \n\t" /* take value pointed to by head (head->next) */
|
||||||
|
" movl %%edx, %%ecx; \n\t" /* take counter */
|
||||||
|
" incl %%ecx; \n\t" /* and increment */
|
||||||
|
SMP_LOCK "cmpxchg8b %1; \n\t" /* if eax:edx == *stack, move ebx:ecx to *stack,
|
||||||
* else *stack is moved into eax:edx again... */
|
* else *stack is moved into eax:edx again... */
|
||||||
" jnz 10b; \n\t" /* ... and we retry */
|
" jnz 10b; \n\t" /* ... and we retry */
|
||||||
"20: \n":"=a" (head)
|
"20: \n"
|
||||||
:"m" (*stack), "a" (stack->head), "d" (stack->count)
|
: "=a" (head)
|
||||||
:"ecx", "ebx");
|
: "m" (*stack),
|
||||||
|
"a" (stack->head),
|
||||||
|
"d" (stack->count)
|
||||||
|
: "ecx", "ebx"
|
||||||
|
);
|
||||||
|
|
||||||
return head;
|
return head;
|
||||||
}
|
}
|
||||||
|
@ -115,20 +127,20 @@ gst_trash_stack_pop (GstTrashStack * stack)
|
||||||
* generic implementation
|
* generic implementation
|
||||||
*/
|
*/
|
||||||
GST_INLINE_FUNC void
|
GST_INLINE_FUNC void
|
||||||
gst_trash_stack_init (GstTrashStack * stack)
|
gst_trash_stack_init (GstTrashStack *stack)
|
||||||
{
|
{
|
||||||
stack->head = NULL;
|
stack->head = NULL;
|
||||||
stack->lock = g_mutex_new ();
|
stack->lock = g_mutex_new();
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_INLINE_FUNC void
|
GST_INLINE_FUNC void
|
||||||
gst_trash_stack_destroy (GstTrashStack * stack)
|
gst_trash_stack_destroy (GstTrashStack *stack)
|
||||||
{
|
{
|
||||||
g_mutex_free (stack->lock);
|
g_mutex_free (stack->lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_INLINE_FUNC void
|
GST_INLINE_FUNC void
|
||||||
gst_trash_stack_push (GstTrashStack * stack, gpointer mem)
|
gst_trash_stack_push (GstTrashStack *stack, gpointer mem)
|
||||||
{
|
{
|
||||||
GstTrashStackElement *elem = (GstTrashStackElement *) mem;
|
GstTrashStackElement *elem = (GstTrashStackElement *) mem;
|
||||||
|
|
||||||
|
@ -139,10 +151,10 @@ gst_trash_stack_push (GstTrashStack * stack, gpointer mem)
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_INLINE_FUNC gpointer
|
GST_INLINE_FUNC gpointer
|
||||||
gst_trash_stack_pop (GstTrashStack * stack)
|
gst_trash_stack_pop (GstTrashStack *stack)
|
||||||
{
|
{
|
||||||
GstTrashStackElement *head;
|
GstTrashStackElement *head;
|
||||||
|
|
||||||
g_mutex_lock (stack->lock);
|
g_mutex_lock (stack->lock);
|
||||||
head = (GstTrashStackElement *) stack->head;
|
head = (GstTrashStackElement *) stack->head;
|
||||||
if (head)
|
if (head)
|
||||||
|
@ -157,7 +169,7 @@ gst_trash_stack_pop (GstTrashStack * stack)
|
||||||
/*
|
/*
|
||||||
* common functions
|
* common functions
|
||||||
*/
|
*/
|
||||||
GST_INLINE_FUNC GstTrashStack *
|
GST_INLINE_FUNC GstTrashStack*
|
||||||
gst_trash_stack_new (void)
|
gst_trash_stack_new (void)
|
||||||
{
|
{
|
||||||
GstTrashStack *stack;
|
GstTrashStack *stack;
|
||||||
|
@ -169,13 +181,14 @@ gst_trash_stack_new (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_INLINE_FUNC void
|
GST_INLINE_FUNC void
|
||||||
gst_trash_stack_free (GstTrashStack * stack)
|
gst_trash_stack_free (GstTrashStack *stack)
|
||||||
{
|
{
|
||||||
gst_trash_stack_destroy (stack);
|
gst_trash_stack_destroy (stack);
|
||||||
g_free (stack);
|
g_free (stack);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* defined (GST_CAN_INLINE) || defined (__GST_TRASH_STACK_C__) */
|
#endif /* defined (GST_CAN_INLINE) || defined (__GST_TRASH_STACK_C__)*/
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GST_TRASH_STACK_H__ */
|
#endif /* __GST_TRASH_STACK_H__ */
|
||||||
|
|
|
@ -30,91 +30,96 @@
|
||||||
#include <gst/gsttypes.h>
|
#include <gst/gsttypes.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define GST_TYPE_TYPE_FIND_FACTORY (gst_type_find_factory_get_type())
|
#define GST_TYPE_TYPE_FIND_FACTORY (gst_type_find_factory_get_type())
|
||||||
#define GST_TYPE_FIND_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_TYPE_FIND_FACTORY, GstTypeFindFactory))
|
#define GST_TYPE_FIND_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_TYPE_FIND_FACTORY, GstTypeFindFactory))
|
||||||
#define GST_IS_TYPE_FIND_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_TYPE_FIND_FACTORY))
|
#define GST_IS_TYPE_FIND_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_TYPE_FIND_FACTORY))
|
||||||
#define GST_TYPE_FIND_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_TYPE_FIND_FACTORY, GstTypeFindFactoryClass))
|
#define GST_TYPE_FIND_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_TYPE_FIND_FACTORY, GstTypeFindFactoryClass))
|
||||||
#define GST_IS_TYPE_FIND_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_TYPE_FIND_FACTORY))
|
#define GST_IS_TYPE_FIND_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_TYPE_FIND_FACTORY))
|
||||||
#define GST_TYPE_FIND_FACTORY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_TYPE_FIND_FACTORY, GstTypeFindFactoryClass))
|
#define GST_TYPE_FIND_FACTORY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_TYPE_FIND_FACTORY, GstTypeFindFactoryClass))
|
||||||
|
|
||||||
typedef struct _GstTypeFind GstTypeFind;
|
typedef struct _GstTypeFind GstTypeFind;
|
||||||
typedef struct _GstTypeFindFactory GstTypeFindFactory;
|
typedef struct _GstTypeFindFactory GstTypeFindFactory;
|
||||||
typedef struct _GstTypeFindFactoryClass GstTypeFindFactoryClass;
|
typedef struct _GstTypeFindFactoryClass GstTypeFindFactoryClass;
|
||||||
|
|
||||||
typedef void (*GstTypeFindFunction) (GstTypeFind * find, gpointer data);
|
typedef void (* GstTypeFindFunction) (GstTypeFind *find, gpointer data);
|
||||||
|
|
||||||
typedef enum
|
typedef enum {
|
||||||
{
|
|
||||||
GST_TYPE_FIND_MINIMUM = 1,
|
GST_TYPE_FIND_MINIMUM = 1,
|
||||||
GST_TYPE_FIND_POSSIBLE = 50,
|
GST_TYPE_FIND_POSSIBLE = 50,
|
||||||
GST_TYPE_FIND_LIKELY = 80,
|
GST_TYPE_FIND_LIKELY = 80,
|
||||||
GST_TYPE_FIND_NEARLY_CERTAIN = 99,
|
GST_TYPE_FIND_NEARLY_CERTAIN = 99,
|
||||||
GST_TYPE_FIND_MAXIMUM = 100,
|
GST_TYPE_FIND_MAXIMUM = 100,
|
||||||
}
|
} GstTypeFindProbability;
|
||||||
GstTypeFindProbability;
|
|
||||||
|
|
||||||
struct _GstTypeFind
|
struct _GstTypeFind {
|
||||||
{
|
|
||||||
/* private to the caller of the typefind function */
|
/* private to the caller of the typefind function */
|
||||||
guint8 *(*peek) (gpointer data, gint64 offset, guint size);
|
guint8 * (* peek) (gpointer data,
|
||||||
void (*suggest) (gpointer data, guint probability, const GstCaps * caps);
|
gint64 offset,
|
||||||
|
guint size);
|
||||||
gpointer data;
|
void (* suggest) (gpointer data,
|
||||||
|
guint probability,
|
||||||
|
const GstCaps * caps);
|
||||||
|
|
||||||
|
gpointer data;
|
||||||
|
|
||||||
/* optional */
|
/* optional */
|
||||||
guint64 (*get_length) (gpointer data);
|
guint64 (* get_length) (gpointer data);
|
||||||
|
|
||||||
/* <private> */
|
/* <private> */
|
||||||
gpointer _gst_reserved[GST_PADDING];
|
gpointer _gst_reserved[GST_PADDING];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstTypeFindFactory
|
struct _GstTypeFindFactory {
|
||||||
{
|
GstPluginFeature feature;
|
||||||
GstPluginFeature feature;
|
|
||||||
/* <private> */
|
/* <private> */
|
||||||
|
|
||||||
GstTypeFindFunction function;
|
GstTypeFindFunction function;
|
||||||
gchar **extensions;
|
gchar ** extensions;
|
||||||
GstCaps *caps; /* FIXME: not yet saved in registry */
|
GstCaps * caps; /* FIXME: not yet saved in registry */
|
||||||
|
|
||||||
gpointer user_data;
|
gpointer user_data;
|
||||||
|
|
||||||
gpointer _gst_reserved[GST_PADDING];
|
gpointer _gst_reserved[GST_PADDING];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstTypeFindFactoryClass
|
struct _GstTypeFindFactoryClass {
|
||||||
{
|
GstPluginFeatureClass parent;
|
||||||
GstPluginFeatureClass parent;
|
|
||||||
/* <private> */
|
/* <private> */
|
||||||
|
|
||||||
gpointer _gst_reserved[GST_PADDING];
|
gpointer _gst_reserved[GST_PADDING];
|
||||||
};
|
};
|
||||||
|
|
||||||
/* typefind function interface */
|
/* typefind function interface */
|
||||||
guint8 *gst_type_find_peek (GstTypeFind * find, gint64 offset, guint size);
|
guint8 * gst_type_find_peek (GstTypeFind * find,
|
||||||
void gst_type_find_suggest (GstTypeFind * find,
|
gint64 offset,
|
||||||
guint probability, const GstCaps * caps);
|
guint size);
|
||||||
guint64 gst_type_find_get_length (GstTypeFind * find);
|
void gst_type_find_suggest (GstTypeFind * find,
|
||||||
|
guint probability,
|
||||||
|
const GstCaps * caps);
|
||||||
|
guint64 gst_type_find_get_length (GstTypeFind * find);
|
||||||
|
|
||||||
/* registration interface */
|
/* registration interface */
|
||||||
gboolean gst_type_find_register (GstPlugin * plugin,
|
gboolean gst_type_find_register (GstPlugin * plugin,
|
||||||
const gchar * name,
|
const gchar * name,
|
||||||
guint rank,
|
guint rank,
|
||||||
GstTypeFindFunction func,
|
GstTypeFindFunction func,
|
||||||
gchar ** extensions, const GstCaps * possible_caps, gpointer data);
|
gchar ** extensions,
|
||||||
|
const GstCaps * possible_caps,
|
||||||
|
gpointer data);
|
||||||
|
|
||||||
/* typefinding interface */
|
/* typefinding interface */
|
||||||
|
|
||||||
GType gst_type_find_factory_get_type (void);
|
GType gst_type_find_factory_get_type (void);
|
||||||
|
|
||||||
|
GList * gst_type_find_factory_get_list (void);
|
||||||
|
|
||||||
GList *gst_type_find_factory_get_list (void);
|
gchar ** gst_type_find_factory_get_extensions (const GstTypeFindFactory *factory);
|
||||||
|
const GstCaps * gst_type_find_factory_get_caps (const GstTypeFindFactory *factory);
|
||||||
gchar **gst_type_find_factory_get_extensions (const GstTypeFindFactory *
|
void gst_type_find_factory_call_function (const GstTypeFindFactory *factory,
|
||||||
factory);
|
GstTypeFind *find);
|
||||||
const GstCaps *gst_type_find_factory_get_caps (const GstTypeFindFactory *
|
|
||||||
factory);
|
|
||||||
void gst_type_find_factory_call_function (const GstTypeFindFactory * factory,
|
|
||||||
GstTypeFind * find);
|
|
||||||
|
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GST_TYPE_FIND_H__ */
|
#endif /* __GST_TYPE_FIND_H__ */
|
||||||
|
|
|
@ -22,7 +22,9 @@
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS typedef struct _GstObject GstObject;
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
typedef struct _GstObject GstObject;
|
||||||
typedef struct _GstObjectClass GstObjectClass;
|
typedef struct _GstObjectClass GstObjectClass;
|
||||||
typedef struct _GstPad GstPad;
|
typedef struct _GstPad GstPad;
|
||||||
typedef struct _GstPadClass GstPadClass;
|
typedef struct _GstPadClass GstPadClass;
|
||||||
|
@ -36,31 +38,25 @@ typedef struct _GstScheduler GstScheduler;
|
||||||
typedef struct _GstSchedulerClass GstSchedulerClass;
|
typedef struct _GstSchedulerClass GstSchedulerClass;
|
||||||
typedef struct _GstEvent GstEvent;
|
typedef struct _GstEvent GstEvent;
|
||||||
|
|
||||||
typedef enum
|
typedef enum {
|
||||||
{
|
GST_STATE_VOID_PENDING = 0,
|
||||||
GST_STATE_VOID_PENDING = 0,
|
GST_STATE_NULL = (1 << 0),
|
||||||
GST_STATE_NULL = (1 << 0),
|
GST_STATE_READY = (1 << 1),
|
||||||
GST_STATE_READY = (1 << 1),
|
GST_STATE_PAUSED = (1 << 2),
|
||||||
GST_STATE_PAUSED = (1 << 2),
|
GST_STATE_PLAYING = (1 << 3)
|
||||||
GST_STATE_PLAYING = (1 << 3)
|
} GstElementState;
|
||||||
}
|
|
||||||
GstElementState;
|
|
||||||
|
|
||||||
typedef enum
|
typedef enum {
|
||||||
{
|
GST_STATE_FAILURE = 0,
|
||||||
GST_STATE_FAILURE = 0,
|
GST_STATE_SUCCESS = 1,
|
||||||
GST_STATE_SUCCESS = 1,
|
GST_STATE_ASYNC = 2
|
||||||
GST_STATE_ASYNC = 2
|
} GstElementStateReturn;
|
||||||
}
|
|
||||||
GstElementStateReturn;
|
|
||||||
|
|
||||||
typedef enum
|
typedef enum {
|
||||||
{
|
|
||||||
GST_RESULT_OK,
|
GST_RESULT_OK,
|
||||||
GST_RESULT_NOK,
|
GST_RESULT_NOK,
|
||||||
GST_RESULT_NOT_IMPL
|
GST_RESULT_NOT_IMPL
|
||||||
}
|
} GstResult;
|
||||||
GstResult;
|
|
||||||
|
|
||||||
#define GST_RANK_PRIMARY 256
|
#define GST_RANK_PRIMARY 256
|
||||||
#define GST_RANK_SECONDARY 128
|
#define GST_RANK_SECONDARY 128
|
||||||
|
@ -71,4 +67,5 @@ GstResult;
|
||||||
#define GST_PADDING_INIT { 0 }
|
#define GST_PADDING_INIT { 0 }
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GST_TYPES_H__ */
|
#endif /* __GST_TYPES_H__ */
|
||||||
|
|
64
gst/gsturi.h
64
gst/gsturi.h
|
@ -28,13 +28,13 @@
|
||||||
#include <gst/gstelement.h>
|
#include <gst/gstelement.h>
|
||||||
#include <gst/gstpluginfeature.h>
|
#include <gst/gstpluginfeature.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS typedef enum
|
G_BEGIN_DECLS
|
||||||
{
|
|
||||||
|
typedef enum {
|
||||||
GST_URI_UNKNOWN,
|
GST_URI_UNKNOWN,
|
||||||
GST_URI_SINK,
|
GST_URI_SINK,
|
||||||
GST_URI_SRC
|
GST_URI_SRC
|
||||||
}
|
} GstURIType;
|
||||||
GstURIType;
|
|
||||||
|
|
||||||
#define GST_URI_TYPE_IS_VALID(type) ((type) == GST_URI_SRC || (type) == GST_URI_SINK)
|
#define GST_URI_TYPE_IS_VALID(type) ((type) == GST_URI_SRC || (type) == GST_URI_SINK)
|
||||||
|
|
||||||
|
@ -48,28 +48,29 @@ GstURIType;
|
||||||
typedef struct _GstURIHandler GstURIHandler;
|
typedef struct _GstURIHandler GstURIHandler;
|
||||||
typedef struct _GstURIHandlerInterface GstURIHandlerInterface;
|
typedef struct _GstURIHandlerInterface GstURIHandlerInterface;
|
||||||
|
|
||||||
struct _GstURIHandlerInterface
|
struct _GstURIHandlerInterface {
|
||||||
{
|
GTypeInterface parent;
|
||||||
GTypeInterface parent;
|
|
||||||
|
|
||||||
/* signals */
|
/* signals */
|
||||||
void (*new_uri) (GstURIHandler * handler, const gchar * uri);
|
void (* new_uri) (GstURIHandler * handler,
|
||||||
|
const gchar * uri);
|
||||||
/* idea for the future ?
|
/* idea for the future ?
|
||||||
gboolean (* require_password) (GstURIHandler * handler,
|
gboolean (* require_password) (GstURIHandler * handler,
|
||||||
gchar ** username,
|
gchar ** username,
|
||||||
gchar ** password);
|
gchar ** password);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* vtable */
|
/* vtable */
|
||||||
|
|
||||||
/* querying capabilities */
|
/* querying capabilities */
|
||||||
GstURIType (*get_type) (void);
|
GstURIType (* get_type) (void);
|
||||||
gchar **(*get_protocols) (void);
|
gchar ** (* get_protocols) (void);
|
||||||
|
|
||||||
/* using the interface */
|
/* using the interface */
|
||||||
G_CONST_RETURN gchar *(*get_uri) (GstURIHandler * handler);
|
G_CONST_RETURN gchar *(* get_uri) (GstURIHandler * handler);
|
||||||
gboolean (*set_uri) (GstURIHandler * handler, const gchar * uri);
|
gboolean (* set_uri) (GstURIHandler * handler,
|
||||||
|
const gchar * uri);
|
||||||
|
|
||||||
/* we might want to add functions here to query features, someone with gnome-vfs knowledge go ahead */
|
/* we might want to add functions here to query features, someone with gnome-vfs knowledge go ahead */
|
||||||
|
|
||||||
gpointer _gst_reserved[GST_PADDING];
|
gpointer _gst_reserved[GST_PADDING];
|
||||||
|
@ -77,23 +78,28 @@ struct _GstURIHandlerInterface
|
||||||
|
|
||||||
/* general URI functions */
|
/* general URI functions */
|
||||||
|
|
||||||
gboolean gst_uri_protocol_is_valid (const gchar * protocol);
|
gboolean gst_uri_protocol_is_valid (const gchar * protocol);
|
||||||
gboolean gst_uri_is_valid (const gchar * uri);
|
gboolean gst_uri_is_valid (const gchar * uri);
|
||||||
gchar *gst_uri_get_protocol (const gchar * uri);
|
gchar * gst_uri_get_protocol (const gchar * uri);
|
||||||
gchar *gst_uri_get_location (const gchar * uri);
|
gchar * gst_uri_get_location (const gchar * uri);
|
||||||
gchar *gst_uri_construct (const gchar * protocol, const gchar * location);
|
gchar * gst_uri_construct (const gchar * protocol,
|
||||||
|
const gchar * location);
|
||||||
|
|
||||||
GstElement *gst_element_make_from_uri (const GstURIType type,
|
GstElement * gst_element_make_from_uri (const GstURIType type,
|
||||||
const gchar * uri, const gchar * elementname);
|
const gchar * uri,
|
||||||
|
const gchar * elementname);
|
||||||
|
|
||||||
/* accessing the interface */
|
/* accessing the interface */
|
||||||
GType gst_uri_handler_get_type (void);
|
GType gst_uri_handler_get_type (void);
|
||||||
|
|
||||||
guint gst_uri_handler_get_uri_type (GstURIHandler * handler);
|
guint gst_uri_handler_get_uri_type (GstURIHandler * handler);
|
||||||
gchar **gst_uri_handler_get_protocols (GstURIHandler * handler);
|
gchar ** gst_uri_handler_get_protocols (GstURIHandler * handler);
|
||||||
G_CONST_RETURN gchar *gst_uri_handler_get_uri (GstURIHandler * handler);
|
G_CONST_RETURN gchar * gst_uri_handler_get_uri (GstURIHandler * handler);
|
||||||
gboolean gst_uri_handler_set_uri (GstURIHandler * handler, const gchar * uri);
|
gboolean gst_uri_handler_set_uri (GstURIHandler * handler,
|
||||||
void gst_uri_handler_new_uri (GstURIHandler * handler, const gchar * uri);
|
const gchar * uri);
|
||||||
|
void gst_uri_handler_new_uri (GstURIHandler * handler,
|
||||||
|
const gchar * uri);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GST_URI_H__ */
|
#endif /* __GST_URI_H__ */
|
||||||
|
|
|
@ -27,9 +27,11 @@
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
/* a static type for making uri element properties */
|
/* a static type for making uri element properties */
|
||||||
#define GST_TYPE_URI (gst_uri_get_uri_type())
|
#define GST_TYPE_URI (gst_uri_get_uri_type())
|
||||||
GType gst_uri_get_uri_type (void);
|
GType gst_uri_get_uri_type (void);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GST_URI_TYPE_H */
|
#endif /* __GST_URI_TYPE_H */
|
||||||
|
|
|
@ -28,15 +28,14 @@
|
||||||
#include <gst/gstelement.h>
|
#include <gst/gstelement.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
void gst_util_set_value_from_string (GValue * value,
|
|
||||||
const gchar * value_str);
|
|
||||||
void gst_util_set_object_arg (GObject * object, const gchar * name,
|
|
||||||
const gchar * value);
|
|
||||||
|
|
||||||
void gst_util_dump_mem (guchar * mem, guint size);
|
void gst_util_set_value_from_string (GValue *value, const gchar *value_str);
|
||||||
|
void gst_util_set_object_arg (GObject *object, const gchar *name, const gchar *value);
|
||||||
|
|
||||||
|
void gst_util_dump_mem (guchar *mem, guint size);
|
||||||
|
|
||||||
void gst_print_pad_caps (GString * buf, gint indent, GstPad * pad);
|
void gst_print_pad_caps (GString *buf, gint indent, GstPad *pad);
|
||||||
void gst_print_element_args (GString * buf, gint indent, GstElement * element);
|
void gst_print_element_args (GString *buf, gint indent, GstElement *element);
|
||||||
|
|
||||||
|
|
||||||
/* Macros for defining classes. Ideas taken from Bonobo, which took theirs
|
/* Macros for defining classes. Ideas taken from Bonobo, which took theirs
|
||||||
|
@ -106,4 +105,5 @@ type_as_function ## _get_type (void) \
|
||||||
|
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GST_UTILS_H__ */
|
#endif /* __GST_UTILS_H__ */
|
||||||
|
|
|
@ -24,24 +24,24 @@
|
||||||
#include <gst/gstcaps.h>
|
#include <gst/gstcaps.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
typedef int (*GstValueCompareFunc) (const GValue * value1,
|
|
||||||
const GValue * value2);
|
typedef int (* GstValueCompareFunc) (const GValue *value1,
|
||||||
typedef char *(*GstValueSerializeFunc) (const GValue * value1);
|
const GValue *value2);
|
||||||
typedef gboolean (*GstValueDeserializeFunc) (GValue * dest, const char *s);
|
typedef char * (* GstValueSerializeFunc) (const GValue *value1);
|
||||||
typedef int (*GstValueUnionFunc) (GValue * dest, const GValue * value1,
|
typedef gboolean (* GstValueDeserializeFunc) (GValue *dest, const char *s);
|
||||||
const GValue * value2);
|
typedef int (* GstValueUnionFunc) (GValue *dest, const GValue *value1,
|
||||||
typedef int (*GstValueIntersectFunc) (GValue * dest, const GValue * value1,
|
const GValue *value2);
|
||||||
const GValue * value2);
|
typedef int (* GstValueIntersectFunc) (GValue *dest, const GValue *value1,
|
||||||
|
const GValue *value2);
|
||||||
|
|
||||||
typedef struct _GstValueTable GstValueTable;
|
typedef struct _GstValueTable GstValueTable;
|
||||||
struct _GstValueTable
|
struct _GstValueTable {
|
||||||
{
|
|
||||||
GType type;
|
GType type;
|
||||||
GstValueCompareFunc compare;
|
GstValueCompareFunc compare;
|
||||||
GstValueSerializeFunc serialize;
|
GstValueSerializeFunc serialize;
|
||||||
GstValueDeserializeFunc deserialize;
|
GstValueDeserializeFunc deserialize;
|
||||||
|
|
||||||
void *_gst_reserved[GST_PADDING];
|
void *_gst_reserved [GST_PADDING];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -78,66 +78,62 @@ extern GType gst_type_list;
|
||||||
|
|
||||||
/* list */
|
/* list */
|
||||||
|
|
||||||
void gst_value_list_prepend_value (GValue * value,
|
void gst_value_list_prepend_value (GValue *value, const GValue *prepend_value);
|
||||||
const GValue * prepend_value);
|
void gst_value_list_append_value (GValue *value, const GValue *append_value);
|
||||||
void gst_value_list_append_value (GValue * value, const GValue * append_value);
|
guint gst_value_list_get_size (const GValue *value);
|
||||||
guint gst_value_list_get_size (const GValue * value);
|
G_CONST_RETURN GValue *gst_value_list_get_value (const GValue *value, guint index);
|
||||||
G_CONST_RETURN GValue *gst_value_list_get_value (const GValue * value,
|
void gst_value_list_concat (GValue *dest, const GValue *value1, const GValue *value2);
|
||||||
guint index);
|
|
||||||
void gst_value_list_concat (GValue * dest, const GValue * value1,
|
|
||||||
const GValue * value2);
|
|
||||||
|
|
||||||
/* fourcc */
|
/* fourcc */
|
||||||
|
|
||||||
void gst_value_set_fourcc (GValue * value, guint32 fourcc);
|
void gst_value_set_fourcc (GValue *value, guint32 fourcc);
|
||||||
guint32 gst_value_get_fourcc (const GValue * value);
|
guint32 gst_value_get_fourcc (const GValue *value);
|
||||||
|
|
||||||
/* int range */
|
/* int range */
|
||||||
|
|
||||||
void gst_value_set_int_range (GValue * value, int start, int end);
|
void gst_value_set_int_range (GValue *value, int start, int end);
|
||||||
int gst_value_get_int_range_min (const GValue * value);
|
int gst_value_get_int_range_min (const GValue *value);
|
||||||
int gst_value_get_int_range_max (const GValue * value);
|
int gst_value_get_int_range_max (const GValue *value);
|
||||||
|
|
||||||
/* double range */
|
/* double range */
|
||||||
|
|
||||||
void gst_value_set_double_range (GValue * value, double start, double end);
|
void gst_value_set_double_range (GValue *value, double start, double end);
|
||||||
double gst_value_get_double_range_min (const GValue * value);
|
double gst_value_get_double_range_min (const GValue *value);
|
||||||
double gst_value_get_double_range_max (const GValue * value);
|
double gst_value_get_double_range_max (const GValue *value);
|
||||||
|
|
||||||
/* caps */
|
/* caps */
|
||||||
G_CONST_RETURN GstCaps *gst_value_get_caps (const GValue * value);
|
G_CONST_RETURN GstCaps *gst_value_get_caps (const GValue *value);
|
||||||
void gst_value_set_caps (GValue * value, const GstCaps * caps);
|
void gst_value_set_caps (GValue *value, const GstCaps *caps);
|
||||||
|
|
||||||
/* compare */
|
/* compare */
|
||||||
|
|
||||||
gboolean gst_value_can_compare (const GValue * value1, const GValue * value2);
|
gboolean gst_value_can_compare (const GValue *value1, const GValue *value2);
|
||||||
int gst_value_compare (const GValue * value1, const GValue * value2);
|
int gst_value_compare (const GValue *value1, const GValue *value2);
|
||||||
|
|
||||||
/* union */
|
/* union */
|
||||||
|
|
||||||
gboolean gst_value_can_union (const GValue * value1, const GValue * value2);
|
gboolean gst_value_can_union (const GValue *value1, const GValue *value2);
|
||||||
gboolean gst_value_union (GValue * dest, const GValue * value1,
|
gboolean gst_value_union (GValue *dest, const GValue *value1, const GValue *value2);
|
||||||
const GValue * value2);
|
void gst_value_register_union_func (GType type1, GType type2, GstValueUnionFunc func);
|
||||||
void gst_value_register_union_func (GType type1, GType type2,
|
|
||||||
GstValueUnionFunc func);
|
|
||||||
|
|
||||||
/* intersection */
|
/* intersection */
|
||||||
|
|
||||||
gboolean gst_value_can_intersect (const GValue * value1, const GValue * value2);
|
gboolean gst_value_can_intersect (const GValue *value1, const GValue *value2);
|
||||||
gboolean gst_value_intersect (GValue * dest, const GValue * value1,
|
gboolean gst_value_intersect (GValue *dest, const GValue *value1, const GValue *value2);
|
||||||
const GValue * value2);
|
void gst_value_register_intersect_func (GType type1, GType type2, GstValueIntersectFunc func);
|
||||||
void gst_value_register_intersect_func (GType type1, GType type2,
|
|
||||||
GstValueIntersectFunc func);
|
|
||||||
|
|
||||||
/* */
|
/* */
|
||||||
|
|
||||||
void gst_value_register (const GstValueTable * table);
|
void gst_value_register (const GstValueTable *table);
|
||||||
void gst_value_init_and_copy (GValue * dest, const GValue * src);
|
void gst_value_init_and_copy (GValue *dest, const GValue *src);
|
||||||
void _gst_value_initialize (void);
|
void _gst_value_initialize (void);
|
||||||
|
|
||||||
gchar *gst_value_serialize (const GValue * value);
|
gchar * gst_value_serialize (const GValue *value);
|
||||||
gboolean gst_value_deserialize (GValue * dest, const gchar * src);
|
gboolean gst_value_deserialize (GValue *dest, const gchar *src);
|
||||||
|
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
38
gst/gstxml.h
38
gst/gstxml.h
|
@ -30,20 +30,22 @@
|
||||||
#include <gst/gstelement.h>
|
#include <gst/gstelement.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define GST_TYPE_XML (gst_xml_get_type ())
|
#define GST_TYPE_XML (gst_xml_get_type ())
|
||||||
#define GST_XML(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_XML, GstXML))
|
#define GST_XML(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_XML, GstXML))
|
||||||
#define GST_IS_XML(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_XML))
|
#define GST_IS_XML(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_XML))
|
||||||
#define GST_XML_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_XML, GstXMLClass))
|
#define GST_XML_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_XML, GstXMLClass))
|
||||||
#define GST_IS_XML_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_XML))
|
#define GST_IS_XML_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_XML))
|
||||||
|
|
||||||
#define GST_XML_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_XML, GstXMLClass))
|
#define GST_XML_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_XML, GstXMLClass))
|
||||||
|
|
||||||
typedef struct _GstXML GstXML;
|
typedef struct _GstXML GstXML;
|
||||||
typedef struct _GstXMLClass GstXMLClass;
|
typedef struct _GstXMLClass GstXMLClass;
|
||||||
|
|
||||||
struct _GstXML
|
struct _GstXML {
|
||||||
{
|
|
||||||
GstObject object;
|
GstObject object;
|
||||||
|
|
||||||
GList *topelements;
|
GList *topelements;
|
||||||
|
|
||||||
xmlNsPtr ns;
|
xmlNsPtr ns;
|
||||||
|
|
||||||
|
@ -52,41 +54,39 @@ struct _GstXML
|
||||||
|
|
||||||
typedef struct _GstXMLNs GstXMLNs;
|
typedef struct _GstXMLNs GstXMLNs;
|
||||||
|
|
||||||
struct _GstXMLClass
|
struct _GstXMLClass {
|
||||||
{
|
|
||||||
GstObjectClass parent_class;
|
GstObjectClass parent_class;
|
||||||
|
|
||||||
/* signal callbacks */
|
/* signal callbacks */
|
||||||
void (*object_loaded) (GstXML * xml, GstObject * object, xmlNodePtr self);
|
void (*object_loaded) (GstXML *xml, GstObject *object, xmlNodePtr self);
|
||||||
void (*object_saved) (GstXML * xml, GstObject * object, xmlNodePtr self);
|
void (*object_saved) (GstXML *xml, GstObject *object, xmlNodePtr self);
|
||||||
|
|
||||||
gpointer _gst_reserved[GST_PADDING];
|
gpointer _gst_reserved[GST_PADDING];
|
||||||
};
|
};
|
||||||
|
|
||||||
GType gst_xml_get_type (void);
|
GType gst_xml_get_type (void);
|
||||||
|
|
||||||
|
|
||||||
/* create an XML document out of a pipeline */
|
/* create an XML document out of a pipeline */
|
||||||
xmlDocPtr gst_xml_write (GstElement * element);
|
xmlDocPtr gst_xml_write (GstElement *element);
|
||||||
|
|
||||||
/* write a formatted representation of a pipeline to an open file */
|
/* write a formatted representation of a pipeline to an open file */
|
||||||
gint gst_xml_write_file (GstElement * element, FILE * out);
|
gint gst_xml_write_file (GstElement *element, FILE *out);
|
||||||
|
|
||||||
GstXML *gst_xml_new (void);
|
GstXML* gst_xml_new (void);
|
||||||
|
|
||||||
gboolean gst_xml_parse_doc (GstXML * xml, xmlDocPtr doc, const guchar * root);
|
gboolean gst_xml_parse_doc (GstXML *xml, xmlDocPtr doc, const guchar *root);
|
||||||
gboolean gst_xml_parse_file (GstXML * xml, const guchar * fname,
|
gboolean gst_xml_parse_file (GstXML *xml, const guchar *fname, const guchar *root);
|
||||||
const guchar * root);
|
gboolean gst_xml_parse_memory (GstXML *xml, guchar *buffer, guint size, const gchar *root);
|
||||||
gboolean gst_xml_parse_memory (GstXML * xml, guchar * buffer, guint size,
|
|
||||||
const gchar * root);
|
|
||||||
|
|
||||||
|
|
||||||
GstElement *gst_xml_get_element (GstXML * xml, const guchar * name);
|
GstElement* gst_xml_get_element (GstXML *xml, const guchar *name);
|
||||||
GList *gst_xml_get_topelements (GstXML * xml);
|
GList* gst_xml_get_topelements (GstXML *xml);
|
||||||
|
|
||||||
GstElement *gst_xml_make_element (xmlNodePtr cur, GstObject * parent);
|
GstElement* gst_xml_make_element (xmlNodePtr cur, GstObject *parent);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#else /* GST_DISABLE_LOADSAVE */
|
#else /* GST_DISABLE_LOADSAVE */
|
||||||
|
|
||||||
#pragma GCC poison gst_xml_write
|
#pragma GCC poison gst_xml_write
|
||||||
|
|
|
@ -8,8 +8,7 @@
|
||||||
# include "config.h"
|
# include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef struct
|
typedef struct {
|
||||||
{
|
|
||||||
GstElement *src;
|
GstElement *src;
|
||||||
GstElement *sink;
|
GstElement *sink;
|
||||||
gchar *src_name;
|
gchar *src_name;
|
||||||
|
@ -17,23 +16,19 @@ typedef struct
|
||||||
GSList *src_pads;
|
GSList *src_pads;
|
||||||
GSList *sink_pads;
|
GSList *sink_pads;
|
||||||
GstCaps *caps;
|
GstCaps *caps;
|
||||||
}
|
} link_t;
|
||||||
link_t;
|
|
||||||
|
|
||||||
typedef struct
|
typedef struct {
|
||||||
{
|
|
||||||
GSList *elements;
|
GSList *elements;
|
||||||
GstElement *first;
|
GstElement *first;
|
||||||
GstElement *last;
|
GstElement *last;
|
||||||
link_t *front;
|
link_t *front;
|
||||||
link_t *back;
|
link_t *back;
|
||||||
}
|
} chain_t;
|
||||||
chain_t;
|
|
||||||
|
|
||||||
typedef struct _graph_t graph_t;
|
typedef struct _graph_t graph_t;
|
||||||
struct _graph_t
|
struct _graph_t {
|
||||||
{
|
chain_t *chain; /* links are supposed to be done now */
|
||||||
chain_t *chain; /* links are supposed to be done now */
|
|
||||||
GSList *links;
|
GSList *links;
|
||||||
GError **error;
|
GError **error;
|
||||||
};
|
};
|
||||||
|
@ -50,13 +45,12 @@ struct _graph_t
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __GST_PARSE_TRACE
|
#ifdef __GST_PARSE_TRACE
|
||||||
gchar *__gst_parse_strdup (gchar * org);
|
gchar *__gst_parse_strdup (gchar *org);
|
||||||
void __gst_parse_strfree (gchar * str);
|
void __gst_parse_strfree (gchar *str);
|
||||||
link_t *__gst_parse_link_new ();
|
link_t *__gst_parse_link_new ();
|
||||||
void __gst_parse_link_free (link_t * data);
|
void __gst_parse_link_free (link_t *data);
|
||||||
chain_t *__gst_parse_chain_new ();
|
chain_t *__gst_parse_chain_new ();
|
||||||
void __gst_parse_chain_free (chain_t * data);
|
void __gst_parse_chain_free (chain_t *data);
|
||||||
|
|
||||||
# define gst_parse_strdup __gst_parse_strdup
|
# define gst_parse_strdup __gst_parse_strdup
|
||||||
# define gst_parse_strfree __gst_parse_strfree
|
# define gst_parse_strfree __gst_parse_strfree
|
||||||
# define gst_parse_link_new __gst_parse_link_new
|
# define gst_parse_link_new __gst_parse_link_new
|
||||||
|
@ -73,14 +67,14 @@ void __gst_parse_chain_free (chain_t * data);
|
||||||
#endif /* __GST_PARSE_TRACE */
|
#endif /* __GST_PARSE_TRACE */
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
gst_parse_unescape (gchar * str)
|
gst_parse_unescape (gchar *str)
|
||||||
{
|
{
|
||||||
gchar *walk;
|
gchar *walk;
|
||||||
|
|
||||||
g_return_if_fail (str != NULL);
|
g_return_if_fail (str != NULL);
|
||||||
|
|
||||||
walk = str;
|
walk = str;
|
||||||
|
|
||||||
while (*walk) {
|
while (*walk) {
|
||||||
if (*walk == '\\')
|
if (*walk == '\\')
|
||||||
walk++;
|
walk++;
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
#include <gst/gstregistry.h>
|
#include <gst/gstregistry.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define GST_TYPE_XML_REGISTRY \
|
#define GST_TYPE_XML_REGISTRY \
|
||||||
(gst_xml_registry_get_type())
|
(gst_xml_registry_get_type())
|
||||||
#define GST_XML_REGISTRY(obj) \
|
#define GST_XML_REGISTRY(obj) \
|
||||||
|
@ -37,11 +38,11 @@ G_BEGIN_DECLS
|
||||||
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_XML_REGISTRY))
|
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_XML_REGISTRY))
|
||||||
#define GST_IS_XML_REGISTRY_CLASS(obj) \
|
#define GST_IS_XML_REGISTRY_CLASS(obj) \
|
||||||
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_XML_REGISTRY))
|
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_XML_REGISTRY))
|
||||||
|
|
||||||
typedef struct _GstXMLRegistry GstXMLRegistry;
|
typedef struct _GstXMLRegistry GstXMLRegistry;
|
||||||
typedef struct _GstXMLRegistryClass GstXMLRegistryClass;
|
typedef struct _GstXMLRegistryClass GstXMLRegistryClass;
|
||||||
|
|
||||||
typedef enum
|
typedef enum {
|
||||||
{
|
|
||||||
GST_XML_REGISTRY_NONE,
|
GST_XML_REGISTRY_NONE,
|
||||||
GST_XML_REGISTRY_TOP,
|
GST_XML_REGISTRY_TOP,
|
||||||
GST_XML_REGISTRY_PATHS,
|
GST_XML_REGISTRY_PATHS,
|
||||||
|
@ -53,79 +54,80 @@ typedef enum
|
||||||
GST_XML_REGISTRY_CAPS,
|
GST_XML_REGISTRY_CAPS,
|
||||||
GST_XML_REGISTRY_STRUCTURE,
|
GST_XML_REGISTRY_STRUCTURE,
|
||||||
GST_XML_REGISTRY_PROPERTIES
|
GST_XML_REGISTRY_PROPERTIES
|
||||||
}
|
} GstXMLRegistryState;
|
||||||
GstXMLRegistryState;
|
|
||||||
|
|
||||||
typedef enum
|
typedef enum {
|
||||||
{
|
|
||||||
GST_XML_REGISTRY_READ,
|
GST_XML_REGISTRY_READ,
|
||||||
GST_XML_REGISTRY_WRITE
|
GST_XML_REGISTRY_WRITE
|
||||||
}
|
} GstXMLRegistryMode;
|
||||||
GstXMLRegistryMode;
|
|
||||||
|
|
||||||
typedef void (*GstXMLRegistryGetPerms) (GstXMLRegistry * registry);
|
typedef void (*GstXMLRegistryGetPerms) (GstXMLRegistry *registry);
|
||||||
typedef void (*GstXMLRegistryAddPathList) (GstXMLRegistry * registry);
|
typedef void (*GstXMLRegistryAddPathList) (GstXMLRegistry *registry);
|
||||||
typedef gboolean (*GstXMLRegistryParser) (GMarkupParseContext * context,
|
typedef gboolean (*GstXMLRegistryParser) (GMarkupParseContext *context,
|
||||||
const gchar * tag,
|
const gchar *tag,
|
||||||
const gchar * text,
|
const gchar *text,
|
||||||
gsize text_len, GstXMLRegistry * registry, GError ** error);
|
gsize text_len,
|
||||||
|
GstXMLRegistry *registry,
|
||||||
|
GError **error);
|
||||||
|
|
||||||
typedef gboolean (*GstXMLRegistryOpen) (GstXMLRegistry * registry,
|
typedef gboolean (*GstXMLRegistryOpen) (GstXMLRegistry *registry,
|
||||||
GstXMLRegistryMode mode);
|
GstXMLRegistryMode mode);
|
||||||
typedef gboolean (*GstXMLRegistryLoad) (GstXMLRegistry * registry,
|
typedef gboolean (*GstXMLRegistryLoad) (GstXMLRegistry *registry,
|
||||||
gchar * dest, gssize * size);
|
gchar *dest,
|
||||||
typedef gboolean (*GstXMLRegistrySave) (GstXMLRegistry * registry,
|
gssize *size);
|
||||||
gchar * format, ...);
|
typedef gboolean (*GstXMLRegistrySave) (GstXMLRegistry *registry,
|
||||||
typedef gboolean (*GstXMLRegistryClose) (GstXMLRegistry * registry);
|
gchar *format,
|
||||||
|
...);
|
||||||
|
typedef gboolean (*GstXMLRegistryClose) (GstXMLRegistry *registry);
|
||||||
|
|
||||||
struct _GstXMLRegistry
|
struct _GstXMLRegistry {
|
||||||
{
|
GstRegistry object;
|
||||||
GstRegistry object;
|
|
||||||
|
|
||||||
gchar *location;
|
gchar *location;
|
||||||
gboolean open;
|
gboolean open;
|
||||||
|
|
||||||
FILE *regfile;
|
FILE *regfile;
|
||||||
gchar *buffer;
|
gchar *buffer;
|
||||||
|
|
||||||
GMarkupParseContext *context;
|
GMarkupParseContext *context;
|
||||||
GList *open_tags;
|
GList *open_tags;
|
||||||
GstXMLRegistryState state;
|
GstXMLRegistryState state;
|
||||||
GstXMLRegistryParser parser;
|
GstXMLRegistryParser parser;
|
||||||
|
|
||||||
GstPlugin *current_plugin;
|
GstPlugin *current_plugin;
|
||||||
GstPluginFeature *current_feature;
|
GstPluginFeature *current_feature;
|
||||||
|
|
||||||
gchar *name_template;
|
gchar *name_template;
|
||||||
GstPadDirection direction;
|
GstPadDirection direction;
|
||||||
GstPadPresence presence;
|
GstPadPresence presence;
|
||||||
GstCaps *caps;
|
GstCaps *caps;
|
||||||
|
|
||||||
gchar *caps_name;
|
gchar *caps_name;
|
||||||
gchar *structure_name;
|
gchar *structure_name;
|
||||||
|
|
||||||
gboolean in_list;
|
gboolean in_list;
|
||||||
GList *entry_list;
|
GList *entry_list;
|
||||||
gchar *list_name;
|
gchar *list_name;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstXMLRegistryClass
|
struct _GstXMLRegistryClass {
|
||||||
{
|
GstRegistryClass parent_class;
|
||||||
GstRegistryClass parent_class;
|
|
||||||
|
|
||||||
GstXMLRegistryGetPerms get_perms_func;
|
GstXMLRegistryGetPerms get_perms_func;
|
||||||
GstXMLRegistryAddPathList add_path_list_func;
|
GstXMLRegistryAddPathList add_path_list_func;
|
||||||
GstXMLRegistryOpen open_func;
|
GstXMLRegistryOpen open_func;
|
||||||
GstXMLRegistryLoad load_func;
|
GstXMLRegistryLoad load_func;
|
||||||
GstXMLRegistrySave save_func;
|
GstXMLRegistrySave save_func;
|
||||||
GstXMLRegistryClose close_func;
|
GstXMLRegistryClose close_func;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/* normal GObject stuff */
|
/* normal GObject stuff */
|
||||||
GType gst_xml_registry_get_type (void);
|
GType gst_xml_registry_get_type (void);
|
||||||
|
|
||||||
GstRegistry *gst_xml_registry_new (const gchar * name, const gchar * location);
|
GstRegistry* gst_xml_registry_new (const gchar *name, const gchar *location);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GST_XML_REGISTRY_H__ */
|
#endif /* __GST_XML_REGISTRY_H__ */
|
||||||
|
|
||||||
|
|
265
include/mmx.h
265
include/mmx.h
|
@ -83,126 +83,180 @@
|
||||||
by LL and unsigned long long values by ULL, lest
|
by LL and unsigned long long values by ULL, lest
|
||||||
they be truncated by the compiler)
|
they be truncated by the compiler)
|
||||||
*/
|
*/
|
||||||
typedef union
|
typedef union {
|
||||||
{
|
long long q; /* Quadword (64-bit) value */
|
||||||
long long q; /* Quadword (64-bit) value */
|
unsigned long long uq; /* Unsigned Quadword */
|
||||||
unsigned long long uq; /* Unsigned Quadword */
|
int d[2]; /* 2 Doubleword (32-bit) values */
|
||||||
int d[2]; /* 2 Doubleword (32-bit) values */
|
unsigned int ud[2]; /* 2 Unsigned Doubleword */
|
||||||
unsigned int ud[2]; /* 2 Unsigned Doubleword */
|
short w[4]; /* 4 Word (16-bit) values */
|
||||||
short w[4]; /* 4 Word (16-bit) values */
|
unsigned short uw[4]; /* 4 Unsigned Word */
|
||||||
unsigned short uw[4]; /* 4 Unsigned Word */
|
char b[8]; /* 8 Byte (8-bit) values */
|
||||||
char b[8]; /* 8 Byte (8-bit) values */
|
unsigned char ub[8]; /* 8 Unsigned Byte */
|
||||||
unsigned char ub[8]; /* 8 Unsigned Byte */
|
float s[2]; /* Single-precision (32-bit) value */
|
||||||
float s[2]; /* Single-precision (32-bit) value */
|
} mmx_t;
|
||||||
}
|
|
||||||
mmx_t;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Function to test if multimedia instructions are supported...
|
/* Function to test if multimedia instructions are supported...
|
||||||
*/
|
*/
|
||||||
inline extern int
|
inline extern int
|
||||||
mm_support (void)
|
mm_support(void)
|
||||||
{
|
{
|
||||||
/* Returns 1 if MMX instructions are supported,
|
/* Returns 1 if MMX instructions are supported,
|
||||||
3 if Cyrix MMX and Extended MMX instructions are supported
|
3 if Cyrix MMX and Extended MMX instructions are supported
|
||||||
5 if AMD MMX and 3DNow! instructions are supported
|
5 if AMD MMX and 3DNow! instructions are supported
|
||||||
0 if hardware does not support any of these
|
0 if hardware does not support any of these
|
||||||
*/
|
*/
|
||||||
register int rval = 0;
|
register int rval = 0;
|
||||||
|
|
||||||
__asm__ __volatile__ (
|
__asm__ __volatile__ (
|
||||||
/* See if CPUID instruction is supported ... */
|
/* See if CPUID instruction is supported ... */
|
||||||
/* ... Get copies of EFLAGS into eax and ecx */
|
/* ... Get copies of EFLAGS into eax and ecx */
|
||||||
"pushf\n\t" "popl %%eax\n\t" "movl %%eax, %%ecx\n\t"
|
"pushf\n\t"
|
||||||
/* ... Toggle the ID bit in one copy and store */
|
"popl %%eax\n\t"
|
||||||
/* to the EFLAGS reg */
|
"movl %%eax, %%ecx\n\t"
|
||||||
"xorl $0x200000, %%eax\n\t" "push %%eax\n\t" "popf\n\t"
|
|
||||||
/* ... Get the (hopefully modified) EFLAGS */
|
|
||||||
"pushf\n\t" "popl %%eax\n\t"
|
|
||||||
/* ... Compare and test result */
|
|
||||||
"xorl %%eax, %%ecx\n\t" "testl $0x200000, %%ecx\n\t" "jz NotSupported1\n\t" /* Nothing supported */
|
|
||||||
/* Get standard CPUID information, and
|
|
||||||
go to a specific vendor section */
|
|
||||||
"movl $0, %%eax\n\t" "cpuid\n\t"
|
|
||||||
/* Check for Intel */
|
|
||||||
"cmpl $0x756e6547, %%ebx\n\t"
|
|
||||||
"jne TryAMD\n\t"
|
|
||||||
"cmpl $0x49656e69, %%edx\n\t"
|
|
||||||
"jne TryAMD\n\t"
|
|
||||||
"cmpl $0x6c65746e, %%ecx\n" "jne TryAMD\n\t" "jmp Intel\n\t"
|
|
||||||
/* Check for AMD */
|
|
||||||
"\nTryAMD:\n\t"
|
|
||||||
"cmpl $0x68747541, %%ebx\n\t"
|
|
||||||
"jne TryCyrix\n\t"
|
|
||||||
"cmpl $0x69746e65, %%edx\n\t"
|
|
||||||
"jne TryCyrix\n\t"
|
|
||||||
"cmpl $0x444d4163, %%ecx\n" "jne TryCyrix\n\t" "jmp AMD\n\t"
|
|
||||||
/* Check for Cyrix */
|
|
||||||
"\nTryCyrix:\n\t"
|
|
||||||
"cmpl $0x69727943, %%ebx\n\t"
|
|
||||||
"jne NotSupported2\n\t"
|
|
||||||
"cmpl $0x736e4978, %%edx\n\t"
|
|
||||||
"jne NotSupported3\n\t"
|
|
||||||
"cmpl $0x64616574, %%ecx\n\t" "jne NotSupported4\n\t"
|
|
||||||
/* Drop through to Cyrix... */
|
|
||||||
/* Cyrix Section */
|
|
||||||
/* See if extended CPUID is supported */
|
|
||||||
"movl $0x80000000, %%eax\n\t" "cpuid\n\t" "cmpl $0x80000000, %%eax\n\t" "jl MMXtest\n\t" /* Try standard CPUID instead */
|
|
||||||
/* Extended CPUID supported, so get extended features */
|
|
||||||
"movl $0x80000001, %%eax\n\t" "cpuid\n\t" "testl $0x00800000, %%eax\n\t" /* Test for MMX */
|
|
||||||
"jz NotSupported5\n\t" /* MMX not supported */
|
|
||||||
"testl $0x01000000, %%eax\n\t" /* Test for Ext'd MMX */
|
|
||||||
"jnz EMMXSupported\n\t" "movl $1, %0:\n\n\t" /* MMX Supported */
|
|
||||||
"jmp Return\n\n" "EMMXSupported:\n\t" "movl $3, %0:\n\n\t" /* EMMX and MMX Supported */
|
|
||||||
"jmp Return\n\t"
|
|
||||||
/* AMD Section */
|
|
||||||
"AMD:\n\t"
|
|
||||||
/* See if extended CPUID is supported */
|
|
||||||
"movl $0x80000000, %%eax\n\t" "cpuid\n\t" "cmpl $0x80000000, %%eax\n\t" "jl MMXtest\n\t" /* Try standard CPUID instead */
|
|
||||||
/* Extended CPUID supported, so get extended features */
|
|
||||||
"movl $0x80000001, %%eax\n\t" "cpuid\n\t" "testl $0x00800000, %%edx\n\t" /* Test for MMX */
|
|
||||||
"jz NotSupported6\n\t" /* MMX not supported */
|
|
||||||
"testl $0x80000000, %%edx\n\t" /* Test for 3DNow! */
|
|
||||||
"jnz ThreeDNowSupported\n\t" "movl $1, %0:\n\n\t" /* MMX Supported */
|
|
||||||
"jmp Return\n\n" "ThreeDNowSupported:\n\t" "movl $5, %0:\n\n\t" /* 3DNow! and MMX Supported */
|
|
||||||
"jmp Return\n\t"
|
|
||||||
/* Intel Section */
|
|
||||||
"Intel:\n\t"
|
|
||||||
/* Check for MMX */
|
|
||||||
"MMXtest:\n\t" "movl $1, %%eax\n\t" "cpuid\n\t" "testl $0x00800000, %%edx\n\t" /* Test for MMX */
|
|
||||||
"jz NotSupported7\n\t" /* MMX Not supported */
|
|
||||||
"movl $1, %0:\n\n\t" /* MMX Supported */
|
|
||||||
"jmp Return\n\t"
|
|
||||||
/* Nothing supported */
|
|
||||||
"\nNotSupported1:\n\t"
|
|
||||||
"#movl $101, %0:\n\n\t"
|
|
||||||
"\nNotSupported2:\n\t"
|
|
||||||
"#movl $102, %0:\n\n\t"
|
|
||||||
"\nNotSupported3:\n\t"
|
|
||||||
"#movl $103, %0:\n\n\t"
|
|
||||||
"\nNotSupported4:\n\t"
|
|
||||||
"#movl $104, %0:\n\n\t"
|
|
||||||
"\nNotSupported5:\n\t"
|
|
||||||
"#movl $105, %0:\n\n\t"
|
|
||||||
"\nNotSupported6:\n\t"
|
|
||||||
"#movl $106, %0:\n\n\t"
|
|
||||||
"\nNotSupported7:\n\t"
|
|
||||||
"#movl $107, %0:\n\n\t" "movl $0, %0:\n\n\t" "Return:\n\t":"=a" (rval)
|
|
||||||
: /* no input */
|
|
||||||
:"eax", "ebx", "ecx", "edx");
|
|
||||||
|
|
||||||
/* Return */
|
/* ... Toggle the ID bit in one copy and store */
|
||||||
return (rval);
|
/* to the EFLAGS reg */
|
||||||
|
"xorl $0x200000, %%eax\n\t"
|
||||||
|
"push %%eax\n\t"
|
||||||
|
"popf\n\t"
|
||||||
|
|
||||||
|
/* ... Get the (hopefully modified) EFLAGS */
|
||||||
|
"pushf\n\t"
|
||||||
|
"popl %%eax\n\t"
|
||||||
|
|
||||||
|
/* ... Compare and test result */
|
||||||
|
"xorl %%eax, %%ecx\n\t"
|
||||||
|
"testl $0x200000, %%ecx\n\t"
|
||||||
|
"jz NotSupported1\n\t" /* Nothing supported */
|
||||||
|
|
||||||
|
|
||||||
|
/* Get standard CPUID information, and
|
||||||
|
go to a specific vendor section */
|
||||||
|
"movl $0, %%eax\n\t"
|
||||||
|
"cpuid\n\t"
|
||||||
|
|
||||||
|
/* Check for Intel */
|
||||||
|
"cmpl $0x756e6547, %%ebx\n\t"
|
||||||
|
"jne TryAMD\n\t"
|
||||||
|
"cmpl $0x49656e69, %%edx\n\t"
|
||||||
|
"jne TryAMD\n\t"
|
||||||
|
"cmpl $0x6c65746e, %%ecx\n"
|
||||||
|
"jne TryAMD\n\t"
|
||||||
|
"jmp Intel\n\t"
|
||||||
|
|
||||||
|
/* Check for AMD */
|
||||||
|
"\nTryAMD:\n\t"
|
||||||
|
"cmpl $0x68747541, %%ebx\n\t"
|
||||||
|
"jne TryCyrix\n\t"
|
||||||
|
"cmpl $0x69746e65, %%edx\n\t"
|
||||||
|
"jne TryCyrix\n\t"
|
||||||
|
"cmpl $0x444d4163, %%ecx\n"
|
||||||
|
"jne TryCyrix\n\t"
|
||||||
|
"jmp AMD\n\t"
|
||||||
|
|
||||||
|
/* Check for Cyrix */
|
||||||
|
"\nTryCyrix:\n\t"
|
||||||
|
"cmpl $0x69727943, %%ebx\n\t"
|
||||||
|
"jne NotSupported2\n\t"
|
||||||
|
"cmpl $0x736e4978, %%edx\n\t"
|
||||||
|
"jne NotSupported3\n\t"
|
||||||
|
"cmpl $0x64616574, %%ecx\n\t"
|
||||||
|
"jne NotSupported4\n\t"
|
||||||
|
/* Drop through to Cyrix... */
|
||||||
|
|
||||||
|
|
||||||
|
/* Cyrix Section */
|
||||||
|
/* See if extended CPUID is supported */
|
||||||
|
"movl $0x80000000, %%eax\n\t"
|
||||||
|
"cpuid\n\t"
|
||||||
|
"cmpl $0x80000000, %%eax\n\t"
|
||||||
|
"jl MMXtest\n\t" /* Try standard CPUID instead */
|
||||||
|
|
||||||
|
/* Extended CPUID supported, so get extended features */
|
||||||
|
"movl $0x80000001, %%eax\n\t"
|
||||||
|
"cpuid\n\t"
|
||||||
|
"testl $0x00800000, %%eax\n\t" /* Test for MMX */
|
||||||
|
"jz NotSupported5\n\t" /* MMX not supported */
|
||||||
|
"testl $0x01000000, %%eax\n\t" /* Test for Ext'd MMX */
|
||||||
|
"jnz EMMXSupported\n\t"
|
||||||
|
"movl $1, %0:\n\n\t" /* MMX Supported */
|
||||||
|
"jmp Return\n\n"
|
||||||
|
"EMMXSupported:\n\t"
|
||||||
|
"movl $3, %0:\n\n\t" /* EMMX and MMX Supported */
|
||||||
|
"jmp Return\n\t"
|
||||||
|
|
||||||
|
|
||||||
|
/* AMD Section */
|
||||||
|
"AMD:\n\t"
|
||||||
|
|
||||||
|
/* See if extended CPUID is supported */
|
||||||
|
"movl $0x80000000, %%eax\n\t"
|
||||||
|
"cpuid\n\t"
|
||||||
|
"cmpl $0x80000000, %%eax\n\t"
|
||||||
|
"jl MMXtest\n\t" /* Try standard CPUID instead */
|
||||||
|
|
||||||
|
/* Extended CPUID supported, so get extended features */
|
||||||
|
"movl $0x80000001, %%eax\n\t"
|
||||||
|
"cpuid\n\t"
|
||||||
|
"testl $0x00800000, %%edx\n\t" /* Test for MMX */
|
||||||
|
"jz NotSupported6\n\t" /* MMX not supported */
|
||||||
|
"testl $0x80000000, %%edx\n\t" /* Test for 3DNow! */
|
||||||
|
"jnz ThreeDNowSupported\n\t"
|
||||||
|
"movl $1, %0:\n\n\t" /* MMX Supported */
|
||||||
|
"jmp Return\n\n"
|
||||||
|
"ThreeDNowSupported:\n\t"
|
||||||
|
"movl $5, %0:\n\n\t" /* 3DNow! and MMX Supported */
|
||||||
|
"jmp Return\n\t"
|
||||||
|
|
||||||
|
|
||||||
|
/* Intel Section */
|
||||||
|
"Intel:\n\t"
|
||||||
|
|
||||||
|
/* Check for MMX */
|
||||||
|
"MMXtest:\n\t"
|
||||||
|
"movl $1, %%eax\n\t"
|
||||||
|
"cpuid\n\t"
|
||||||
|
"testl $0x00800000, %%edx\n\t" /* Test for MMX */
|
||||||
|
"jz NotSupported7\n\t" /* MMX Not supported */
|
||||||
|
"movl $1, %0:\n\n\t" /* MMX Supported */
|
||||||
|
"jmp Return\n\t"
|
||||||
|
|
||||||
|
/* Nothing supported */
|
||||||
|
"\nNotSupported1:\n\t"
|
||||||
|
"#movl $101, %0:\n\n\t"
|
||||||
|
"\nNotSupported2:\n\t"
|
||||||
|
"#movl $102, %0:\n\n\t"
|
||||||
|
"\nNotSupported3:\n\t"
|
||||||
|
"#movl $103, %0:\n\n\t"
|
||||||
|
"\nNotSupported4:\n\t"
|
||||||
|
"#movl $104, %0:\n\n\t"
|
||||||
|
"\nNotSupported5:\n\t"
|
||||||
|
"#movl $105, %0:\n\n\t"
|
||||||
|
"\nNotSupported6:\n\t"
|
||||||
|
"#movl $106, %0:\n\n\t"
|
||||||
|
"\nNotSupported7:\n\t"
|
||||||
|
"#movl $107, %0:\n\n\t"
|
||||||
|
"movl $0, %0:\n\n\t"
|
||||||
|
|
||||||
|
"Return:\n\t"
|
||||||
|
: "=a" (rval)
|
||||||
|
: /* no input */
|
||||||
|
: "eax", "ebx", "ecx", "edx"
|
||||||
|
);
|
||||||
|
|
||||||
|
/* Return */
|
||||||
|
return(rval);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Function to test if mmx instructions are supported...
|
/* Function to test if mmx instructions are supported...
|
||||||
*/
|
*/
|
||||||
inline extern int
|
inline extern int
|
||||||
mmx_ok (void)
|
mmx_ok(void)
|
||||||
{
|
{
|
||||||
/* Returns 1 if MMX instructions are supported, 0 otherwise */
|
/* Returns 1 if MMX instructions are supported, 0 otherwise */
|
||||||
return (mm_support () & 0x1);
|
return ( mm_support() & 0x1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -668,3 +722,4 @@ mmx_ok (void)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
317
include/sse.h
317
include/sse.h
|
@ -43,132 +43,188 @@
|
||||||
by LL and unsigned long long values by ULL, lest
|
by LL and unsigned long long values by ULL, lest
|
||||||
they be truncated by the compiler)
|
they be truncated by the compiler)
|
||||||
*/
|
*/
|
||||||
typedef union
|
typedef union {
|
||||||
{
|
float sf[4]; /* Single-precision (32-bit) value */
|
||||||
float sf[4]; /* Single-precision (32-bit) value */
|
} __attribute__ ((aligned (16))) sse_t; /* On a 16 byte (128-bit) boundary */
|
||||||
}
|
|
||||||
__attribute__ ((aligned (16))) sse_t; /* On a 16 byte (128-bit) boundary */
|
|
||||||
|
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
/* Function to test if multimedia instructions are supported...
|
/* Function to test if multimedia instructions are supported...
|
||||||
*/
|
*/
|
||||||
inline extern int
|
inline extern int
|
||||||
mm_support (void)
|
mm_support(void)
|
||||||
{
|
{
|
||||||
/* Returns 1 if MMX instructions are supported,
|
/* Returns 1 if MMX instructions are supported,
|
||||||
3 if Cyrix MMX and Extended MMX instructions are supported
|
3 if Cyrix MMX and Extended MMX instructions are supported
|
||||||
5 if AMD MMX and 3DNow! instructions are supported
|
5 if AMD MMX and 3DNow! instructions are supported
|
||||||
9 if MMX and SSE instructions are supported
|
9 if MMX and SSE instructions are supported
|
||||||
0 if hardware does not support any of these
|
0 if hardware does not support any of these
|
||||||
*/
|
*/
|
||||||
register int rval = 0;
|
register int rval = 0;
|
||||||
|
|
||||||
__asm__ __volatile__ (
|
__asm__ __volatile__ (
|
||||||
/* See if CPUID instruction is supported ... */
|
/* See if CPUID instruction is supported ... */
|
||||||
/* ... Get copies of EFLAGS into eax and ecx */
|
/* ... Get copies of EFLAGS into eax and ecx */
|
||||||
"pushf\n\t" "popl %%eax\n\t" "movl %%eax, %%ecx\n\t"
|
"pushf\n\t"
|
||||||
/* ... Toggle the ID bit in one copy and store */
|
"popl %%eax\n\t"
|
||||||
/* to the EFLAGS reg */
|
"movl %%eax, %%ecx\n\t"
|
||||||
"xorl $0x200000, %%eax\n\t" "push %%eax\n\t" "popf\n\t"
|
|
||||||
/* ... Get the (hopefully modified) EFLAGS */
|
|
||||||
"pushf\n\t" "popl %%eax\n\t"
|
|
||||||
/* ... Compare and test result */
|
|
||||||
"xorl %%eax, %%ecx\n\t" "testl $0x200000, %%ecx\n\t" "jz NotSupported1\n\t" /* CPUID not supported */
|
|
||||||
/* Get standard CPUID information, and
|
|
||||||
go to a specific vendor section */
|
|
||||||
"movl $0, %%eax\n\t" "cpuid\n\t"
|
|
||||||
/* Check for Intel */
|
|
||||||
"cmpl $0x756e6547, %%ebx\n\t"
|
|
||||||
"jne TryAMD\n\t"
|
|
||||||
"cmpl $0x49656e69, %%edx\n\t"
|
|
||||||
"jne TryAMD\n\t"
|
|
||||||
"cmpl $0x6c65746e, %%ecx\n" "jne TryAMD\n\t" "jmp Intel\n\t"
|
|
||||||
/* Check for AMD */
|
|
||||||
"\nTryAMD:\n\t"
|
|
||||||
"cmpl $0x68747541, %%ebx\n\t"
|
|
||||||
"jne TryCyrix\n\t"
|
|
||||||
"cmpl $0x69746e65, %%edx\n\t"
|
|
||||||
"jne TryCyrix\n\t"
|
|
||||||
"cmpl $0x444d4163, %%ecx\n" "jne TryCyrix\n\t" "jmp AMD\n\t"
|
|
||||||
/* Check for Cyrix */
|
|
||||||
"\nTryCyrix:\n\t"
|
|
||||||
"cmpl $0x69727943, %%ebx\n\t"
|
|
||||||
"jne NotSupported2\n\t"
|
|
||||||
"cmpl $0x736e4978, %%edx\n\t"
|
|
||||||
"jne NotSupported3\n\t"
|
|
||||||
"cmpl $0x64616574, %%ecx\n\t" "jne NotSupported4\n\t"
|
|
||||||
/* Drop through to Cyrix... */
|
|
||||||
/* Cyrix Section */
|
|
||||||
/* See if extended CPUID level 80000001 is supported */
|
|
||||||
/* The value of CPUID/80000001 for the 6x86MX is undefined
|
|
||||||
according to the Cyrix CPU Detection Guide (Preliminary
|
|
||||||
Rev. 1.01 table 1), so we'll check the value of eax for
|
|
||||||
CPUID/0 to see if standard CPUID level 2 is supported.
|
|
||||||
According to the table, the only CPU which supports level
|
|
||||||
2 is also the only one which supports extended CPUID levels.
|
|
||||||
*/
|
|
||||||
"cmpl $0x2, %%eax\n\t" "jne MMXtest\n\t" /* Use standard CPUID instead */
|
|
||||||
/* Extended CPUID supported (in theory), so get extended
|
|
||||||
features */
|
|
||||||
"movl $0x80000001, %%eax\n\t" "cpuid\n\t" "testl $0x00800000, %%eax\n\t" /* Test for MMX */
|
|
||||||
"jz NotSupported5\n\t" /* MMX not supported */
|
|
||||||
"testl $0x01000000, %%eax\n\t" /* Test for Ext'd MMX */
|
|
||||||
"jnz EMMXSupported\n\t" "movl $1, %0:\n\n\t" /* MMX Supported */
|
|
||||||
"jmp Return\n\n" "EMMXSupported:\n\t" "movl $3, %0:\n\n\t" /* EMMX and MMX Supported */
|
|
||||||
"jmp Return\n\t"
|
|
||||||
/* AMD Section */
|
|
||||||
"AMD:\n\t"
|
|
||||||
/* See if extended CPUID is supported */
|
|
||||||
"movl $0x80000000, %%eax\n\t" "cpuid\n\t" "cmpl $0x80000000, %%eax\n\t" "jl MMXtest\n\t" /* Use standard CPUID instead */
|
|
||||||
/* Extended CPUID supported, so get extended features */
|
|
||||||
"movl $0x80000001, %%eax\n\t" "cpuid\n\t" "testl $0x00800000, %%edx\n\t" /* Test for MMX */
|
|
||||||
"jz NotSupported6\n\t" /* MMX not supported */
|
|
||||||
"testl $0x80000000, %%edx\n\t" /* Test for 3DNow! */
|
|
||||||
"jnz ThreeDNowSupported\n\t" "movl $1, %0:\n\n\t" /* MMX Supported */
|
|
||||||
"jmp Return\n\n" "ThreeDNowSupported:\n\t" "movl $5, %0:\n\n\t" /* 3DNow! and MMX Supported */
|
|
||||||
"jmp Return\n\t"
|
|
||||||
/* Intel Section */
|
|
||||||
"Intel:\n\t"
|
|
||||||
/* Check for SSE */
|
|
||||||
"SSEtest:\n\t" "movl $1, %%eax\n\t" "cpuid\n\t" "testl $0x02000000, %%edx\n\t" /* Test for SSE */
|
|
||||||
"jz MMXtest\n\t" /* SSE Not supported */
|
|
||||||
"movl $9, %0:\n\n\t" /* SSE Supported */
|
|
||||||
"jmp Return\n\t"
|
|
||||||
/* Check for MMX */
|
|
||||||
"MMXtest:\n\t" "movl $1, %%eax\n\t" "cpuid\n\t" "testl $0x00800000, %%edx\n\t" /* Test for MMX */
|
|
||||||
"jz NotSupported7\n\t" /* MMX Not supported */
|
|
||||||
"movl $1, %0:\n\n\t" /* MMX Supported */
|
|
||||||
"jmp Return\n\t"
|
|
||||||
/* Nothing supported */
|
|
||||||
"\nNotSupported1:\n\t"
|
|
||||||
"#movl $101, %0:\n\n\t"
|
|
||||||
"\nNotSupported2:\n\t"
|
|
||||||
"#movl $102, %0:\n\n\t"
|
|
||||||
"\nNotSupported3:\n\t"
|
|
||||||
"#movl $103, %0:\n\n\t"
|
|
||||||
"\nNotSupported4:\n\t"
|
|
||||||
"#movl $104, %0:\n\n\t"
|
|
||||||
"\nNotSupported5:\n\t"
|
|
||||||
"#movl $105, %0:\n\n\t"
|
|
||||||
"\nNotSupported6:\n\t"
|
|
||||||
"#movl $106, %0:\n\n\t"
|
|
||||||
"\nNotSupported7:\n\t"
|
|
||||||
"#movl $107, %0:\n\n\t" "movl $0, %0:\n\n\t" "Return:\n\t":"=a" (rval)
|
|
||||||
: /* no input */
|
|
||||||
:"eax", "ebx", "ecx", "edx");
|
|
||||||
|
|
||||||
/* Return */
|
/* ... Toggle the ID bit in one copy and store */
|
||||||
return (rval);
|
/* to the EFLAGS reg */
|
||||||
|
"xorl $0x200000, %%eax\n\t"
|
||||||
|
"push %%eax\n\t"
|
||||||
|
"popf\n\t"
|
||||||
|
|
||||||
|
/* ... Get the (hopefully modified) EFLAGS */
|
||||||
|
"pushf\n\t"
|
||||||
|
"popl %%eax\n\t"
|
||||||
|
|
||||||
|
/* ... Compare and test result */
|
||||||
|
"xorl %%eax, %%ecx\n\t"
|
||||||
|
"testl $0x200000, %%ecx\n\t"
|
||||||
|
"jz NotSupported1\n\t" /* CPUID not supported */
|
||||||
|
|
||||||
|
|
||||||
|
/* Get standard CPUID information, and
|
||||||
|
go to a specific vendor section */
|
||||||
|
"movl $0, %%eax\n\t"
|
||||||
|
"cpuid\n\t"
|
||||||
|
|
||||||
|
/* Check for Intel */
|
||||||
|
"cmpl $0x756e6547, %%ebx\n\t"
|
||||||
|
"jne TryAMD\n\t"
|
||||||
|
"cmpl $0x49656e69, %%edx\n\t"
|
||||||
|
"jne TryAMD\n\t"
|
||||||
|
"cmpl $0x6c65746e, %%ecx\n"
|
||||||
|
"jne TryAMD\n\t"
|
||||||
|
"jmp Intel\n\t"
|
||||||
|
|
||||||
|
/* Check for AMD */
|
||||||
|
"\nTryAMD:\n\t"
|
||||||
|
"cmpl $0x68747541, %%ebx\n\t"
|
||||||
|
"jne TryCyrix\n\t"
|
||||||
|
"cmpl $0x69746e65, %%edx\n\t"
|
||||||
|
"jne TryCyrix\n\t"
|
||||||
|
"cmpl $0x444d4163, %%ecx\n"
|
||||||
|
"jne TryCyrix\n\t"
|
||||||
|
"jmp AMD\n\t"
|
||||||
|
|
||||||
|
/* Check for Cyrix */
|
||||||
|
"\nTryCyrix:\n\t"
|
||||||
|
"cmpl $0x69727943, %%ebx\n\t"
|
||||||
|
"jne NotSupported2\n\t"
|
||||||
|
"cmpl $0x736e4978, %%edx\n\t"
|
||||||
|
"jne NotSupported3\n\t"
|
||||||
|
"cmpl $0x64616574, %%ecx\n\t"
|
||||||
|
"jne NotSupported4\n\t"
|
||||||
|
/* Drop through to Cyrix... */
|
||||||
|
|
||||||
|
|
||||||
|
/* Cyrix Section */
|
||||||
|
/* See if extended CPUID level 80000001 is supported */
|
||||||
|
/* The value of CPUID/80000001 for the 6x86MX is undefined
|
||||||
|
according to the Cyrix CPU Detection Guide (Preliminary
|
||||||
|
Rev. 1.01 table 1), so we'll check the value of eax for
|
||||||
|
CPUID/0 to see if standard CPUID level 2 is supported.
|
||||||
|
According to the table, the only CPU which supports level
|
||||||
|
2 is also the only one which supports extended CPUID levels.
|
||||||
|
*/
|
||||||
|
"cmpl $0x2, %%eax\n\t"
|
||||||
|
"jne MMXtest\n\t" /* Use standard CPUID instead */
|
||||||
|
|
||||||
|
/* Extended CPUID supported (in theory), so get extended
|
||||||
|
features */
|
||||||
|
"movl $0x80000001, %%eax\n\t"
|
||||||
|
"cpuid\n\t"
|
||||||
|
"testl $0x00800000, %%eax\n\t" /* Test for MMX */
|
||||||
|
"jz NotSupported5\n\t" /* MMX not supported */
|
||||||
|
"testl $0x01000000, %%eax\n\t" /* Test for Ext'd MMX */
|
||||||
|
"jnz EMMXSupported\n\t"
|
||||||
|
"movl $1, %0:\n\n\t" /* MMX Supported */
|
||||||
|
"jmp Return\n\n"
|
||||||
|
"EMMXSupported:\n\t"
|
||||||
|
"movl $3, %0:\n\n\t" /* EMMX and MMX Supported */
|
||||||
|
"jmp Return\n\t"
|
||||||
|
|
||||||
|
|
||||||
|
/* AMD Section */
|
||||||
|
"AMD:\n\t"
|
||||||
|
|
||||||
|
/* See if extended CPUID is supported */
|
||||||
|
"movl $0x80000000, %%eax\n\t"
|
||||||
|
"cpuid\n\t"
|
||||||
|
"cmpl $0x80000000, %%eax\n\t"
|
||||||
|
"jl MMXtest\n\t" /* Use standard CPUID instead */
|
||||||
|
|
||||||
|
/* Extended CPUID supported, so get extended features */
|
||||||
|
"movl $0x80000001, %%eax\n\t"
|
||||||
|
"cpuid\n\t"
|
||||||
|
"testl $0x00800000, %%edx\n\t" /* Test for MMX */
|
||||||
|
"jz NotSupported6\n\t" /* MMX not supported */
|
||||||
|
"testl $0x80000000, %%edx\n\t" /* Test for 3DNow! */
|
||||||
|
"jnz ThreeDNowSupported\n\t"
|
||||||
|
"movl $1, %0:\n\n\t" /* MMX Supported */
|
||||||
|
"jmp Return\n\n"
|
||||||
|
"ThreeDNowSupported:\n\t"
|
||||||
|
"movl $5, %0:\n\n\t" /* 3DNow! and MMX Supported */
|
||||||
|
"jmp Return\n\t"
|
||||||
|
|
||||||
|
|
||||||
|
/* Intel Section */
|
||||||
|
"Intel:\n\t"
|
||||||
|
|
||||||
|
/* Check for SSE */
|
||||||
|
"SSEtest:\n\t"
|
||||||
|
"movl $1, %%eax\n\t"
|
||||||
|
"cpuid\n\t"
|
||||||
|
"testl $0x02000000, %%edx\n\t" /* Test for SSE */
|
||||||
|
"jz MMXtest\n\t" /* SSE Not supported */
|
||||||
|
"movl $9, %0:\n\n\t" /* SSE Supported */
|
||||||
|
"jmp Return\n\t"
|
||||||
|
|
||||||
|
/* Check for MMX */
|
||||||
|
"MMXtest:\n\t"
|
||||||
|
"movl $1, %%eax\n\t"
|
||||||
|
"cpuid\n\t"
|
||||||
|
"testl $0x00800000, %%edx\n\t" /* Test for MMX */
|
||||||
|
"jz NotSupported7\n\t" /* MMX Not supported */
|
||||||
|
"movl $1, %0:\n\n\t" /* MMX Supported */
|
||||||
|
"jmp Return\n\t"
|
||||||
|
|
||||||
|
/* Nothing supported */
|
||||||
|
"\nNotSupported1:\n\t"
|
||||||
|
"#movl $101, %0:\n\n\t"
|
||||||
|
"\nNotSupported2:\n\t"
|
||||||
|
"#movl $102, %0:\n\n\t"
|
||||||
|
"\nNotSupported3:\n\t"
|
||||||
|
"#movl $103, %0:\n\n\t"
|
||||||
|
"\nNotSupported4:\n\t"
|
||||||
|
"#movl $104, %0:\n\n\t"
|
||||||
|
"\nNotSupported5:\n\t"
|
||||||
|
"#movl $105, %0:\n\n\t"
|
||||||
|
"\nNotSupported6:\n\t"
|
||||||
|
"#movl $106, %0:\n\n\t"
|
||||||
|
"\nNotSupported7:\n\t"
|
||||||
|
"#movl $107, %0:\n\n\t"
|
||||||
|
"movl $0, %0:\n\n\t"
|
||||||
|
|
||||||
|
"Return:\n\t"
|
||||||
|
: "=a" (rval)
|
||||||
|
: /* no input */
|
||||||
|
: "eax", "ebx", "ecx", "edx"
|
||||||
|
);
|
||||||
|
|
||||||
|
/* Return */
|
||||||
|
return(rval);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Function to test if sse instructions are supported...
|
/* Function to test if sse instructions are supported...
|
||||||
*/
|
*/
|
||||||
inline extern int
|
inline extern int
|
||||||
sse_ok (void)
|
sse_ok(void)
|
||||||
{
|
{
|
||||||
/* Returns 1 if SSE instructions are supported, 0 otherwise */
|
/* Returns 1 if SSE instructions are supported, 0 otherwise */
|
||||||
return ((mm_support () & 0x8) >> 3);
|
return ( (mm_support() & 0x8) >> 3 );
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -485,13 +541,13 @@ sse_ok (void)
|
||||||
/* MOVe MaSK from Packed Single-fp
|
/* MOVe MaSK from Packed Single-fp
|
||||||
*/
|
*/
|
||||||
#ifdef SSE_TRACE
|
#ifdef SSE_TRACE
|
||||||
#define movmskps(xmmreg, reg) \
|
#define movmskps(xmmreg, reg) \
|
||||||
{ \
|
{ \
|
||||||
fprintf(stderr, "movmskps()\n"); \
|
fprintf(stderr, "movmskps()\n"); \
|
||||||
__asm__ __volatile__ ("movmskps %" #xmmreg ", %" #reg) \
|
__asm__ __volatile__ ("movmskps %" #xmmreg ", %" #reg) \
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
#define movmskps(xmmreg, reg) \
|
#define movmskps(xmmreg, reg) \
|
||||||
__asm__ __volatile__ ("movmskps %" #xmmreg ", %" #reg)
|
__asm__ __volatile__ ("movmskps %" #xmmreg ", %" #reg)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -499,13 +555,13 @@ sse_ok (void)
|
||||||
/* Parallel MOVe MaSK from mmx reg to 32-bit reg
|
/* Parallel MOVe MaSK from mmx reg to 32-bit reg
|
||||||
*/
|
*/
|
||||||
#ifdef SSE_TRACE
|
#ifdef SSE_TRACE
|
||||||
#define pmovmskb(mmreg, reg) \
|
#define pmovmskb(mmreg, reg) \
|
||||||
{ \
|
{ \
|
||||||
fprintf(stderr, "movmskps()\n"); \
|
fprintf(stderr, "movmskps()\n"); \
|
||||||
__asm__ __volatile__ ("movmskps %" #mmreg ", %" #reg) \
|
__asm__ __volatile__ ("movmskps %" #mmreg ", %" #reg) \
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
#define pmovmskb(mmreg, reg) \
|
#define pmovmskb(mmreg, reg) \
|
||||||
__asm__ __volatile__ ("movmskps %" #mmreg ", %" #reg)
|
__asm__ __volatile__ ("movmskps %" #mmreg ", %" #reg)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -828,7 +884,7 @@ sse_ok (void)
|
||||||
/* Fp and mmX ReSTORe state
|
/* Fp and mmX ReSTORe state
|
||||||
*/
|
*/
|
||||||
#ifdef SSE_TRACE
|
#ifdef SSE_TRACE
|
||||||
#define fxrstor(mem) \
|
#define fxrstor(mem) \
|
||||||
{ \
|
{ \
|
||||||
fprintf(stderr, "fxrstor()\n"); \
|
fprintf(stderr, "fxrstor()\n"); \
|
||||||
__asm__ __volatile__ ("fxrstor %0" \
|
__asm__ __volatile__ ("fxrstor %0" \
|
||||||
|
@ -836,7 +892,7 @@ sse_ok (void)
|
||||||
: "X" (mem)) \
|
: "X" (mem)) \
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
#define fxrstor(mem) \
|
#define fxrstor(mem) \
|
||||||
__asm__ __volatile__ ("fxrstor %0" \
|
__asm__ __volatile__ ("fxrstor %0" \
|
||||||
: /* nothing */ \
|
: /* nothing */ \
|
||||||
: "X" (mem))
|
: "X" (mem))
|
||||||
|
@ -846,7 +902,7 @@ sse_ok (void)
|
||||||
/* Fp and mmX SAVE state
|
/* Fp and mmX SAVE state
|
||||||
*/
|
*/
|
||||||
#ifdef SSE_TRACE
|
#ifdef SSE_TRACE
|
||||||
#define fxsave(mem) \
|
#define fxsave(mem) \
|
||||||
{ \
|
{ \
|
||||||
fprintf(stderr, "fxsave()\n"); \
|
fprintf(stderr, "fxsave()\n"); \
|
||||||
__asm__ __volatile__ ("fxsave %0" \
|
__asm__ __volatile__ ("fxsave %0" \
|
||||||
|
@ -854,7 +910,7 @@ sse_ok (void)
|
||||||
: "X" (mem)) \
|
: "X" (mem)) \
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
#define fxsave(mem) \
|
#define fxsave(mem) \
|
||||||
__asm__ __volatile__ ("fxsave %0" \
|
__asm__ __volatile__ ("fxsave %0" \
|
||||||
: /* nothing */ \
|
: /* nothing */ \
|
||||||
: "X" (mem))
|
: "X" (mem))
|
||||||
|
@ -864,7 +920,7 @@ sse_ok (void)
|
||||||
/* STore streaMing simd eXtensions Control/Status Register
|
/* STore streaMing simd eXtensions Control/Status Register
|
||||||
*/
|
*/
|
||||||
#ifdef SSE_TRACE
|
#ifdef SSE_TRACE
|
||||||
#define stmxcsr(mem) \
|
#define stmxcsr(mem) \
|
||||||
{ \
|
{ \
|
||||||
fprintf(stderr, "stmxcsr()\n"); \
|
fprintf(stderr, "stmxcsr()\n"); \
|
||||||
__asm__ __volatile__ ("stmxcsr %0" \
|
__asm__ __volatile__ ("stmxcsr %0" \
|
||||||
|
@ -872,7 +928,7 @@ sse_ok (void)
|
||||||
: "X" (mem)) \
|
: "X" (mem)) \
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
#define stmxcsr(mem) \
|
#define stmxcsr(mem) \
|
||||||
__asm__ __volatile__ ("stmxcsr %0" \
|
__asm__ __volatile__ ("stmxcsr %0" \
|
||||||
: /* nothing */ \
|
: /* nothing */ \
|
||||||
: "X" (mem))
|
: "X" (mem))
|
||||||
|
@ -882,7 +938,7 @@ sse_ok (void)
|
||||||
/* LoaD streaMing simd eXtensions Control/Status Register
|
/* LoaD streaMing simd eXtensions Control/Status Register
|
||||||
*/
|
*/
|
||||||
#ifdef SSE_TRACE
|
#ifdef SSE_TRACE
|
||||||
#define ldmxcsr(mem) \
|
#define ldmxcsr(mem) \
|
||||||
{ \
|
{ \
|
||||||
fprintf(stderr, "ldmxcsr()\n"); \
|
fprintf(stderr, "ldmxcsr()\n"); \
|
||||||
__asm__ __volatile__ ("ldmxcsr %0" \
|
__asm__ __volatile__ ("ldmxcsr %0" \
|
||||||
|
@ -890,7 +946,7 @@ sse_ok (void)
|
||||||
: "X" (mem)) \
|
: "X" (mem)) \
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
#define ldmxcsr(mem) \
|
#define ldmxcsr(mem) \
|
||||||
__asm__ __volatile__ ("ldmxcsr %0" \
|
__asm__ __volatile__ ("ldmxcsr %0" \
|
||||||
: /* nothing */ \
|
: /* nothing */ \
|
||||||
: "X" (mem))
|
: "X" (mem))
|
||||||
|
@ -901,13 +957,13 @@ sse_ok (void)
|
||||||
occuring after fence in source code.
|
occuring after fence in source code.
|
||||||
*/
|
*/
|
||||||
#ifdef SSE_TRACE
|
#ifdef SSE_TRACE
|
||||||
#define sfence() \
|
#define sfence() \
|
||||||
{ \
|
{ \
|
||||||
fprintf(stderr, "sfence()\n"); \
|
fprintf(stderr, "sfence()\n"); \
|
||||||
__asm__ __volatile__ ("sfence\n\t") \
|
__asm__ __volatile__ ("sfence\n\t") \
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
#define sfence() \
|
#define sfence() \
|
||||||
__asm__ __volatile__ ("sfence\n\t")
|
__asm__ __volatile__ ("sfence\n\t")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -920,17 +976,18 @@ sse_ok (void)
|
||||||
*/
|
*/
|
||||||
#ifdef SSE_TRACE
|
#ifdef SSE_TRACE
|
||||||
#else
|
#else
|
||||||
#define prefetch(mem, hint) \
|
#define prefetch(mem, hint) \
|
||||||
__asm__ __volatile__ ("prefetch" #hint " %0" \
|
__asm__ __volatile__ ("prefetch" #hint " %0" \
|
||||||
: /* nothing */ \
|
: /* nothing */ \
|
||||||
: "X" (mem))
|
: "X" (mem))
|
||||||
|
|
||||||
#define prefetcht0(mem) prefetch(mem, t0)
|
#define prefetcht0(mem) prefetch(mem, t0)
|
||||||
#define prefetcht1(mem) prefetch(mem, t1)
|
#define prefetcht1(mem) prefetch(mem, t1)
|
||||||
#define prefetcht2(mem) prefetch(mem, t2)
|
#define prefetcht2(mem) prefetch(mem, t2)
|
||||||
#define prefetchnta(mem) prefetch(mem, nta)
|
#define prefetchnta(mem) prefetch(mem, nta)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -24,52 +24,51 @@
|
||||||
#include <gst/gstpad.h>
|
#include <gst/gstpad.h>
|
||||||
#include <gst/gstevent.h>
|
#include <gst/gstevent.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS typedef struct _GstByteStream GstByteStream;
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
struct _GstByteStream
|
typedef struct _GstByteStream GstByteStream;
|
||||||
{
|
|
||||||
GstPad *pad;
|
|
||||||
|
|
||||||
GstEvent *event;
|
struct _GstByteStream {
|
||||||
|
GstPad *pad;
|
||||||
|
|
||||||
GSList *buflist;
|
GstEvent *event;
|
||||||
guint32 headbufavail;
|
|
||||||
guint32 listavail;
|
GSList *buflist;
|
||||||
|
guint32 headbufavail;
|
||||||
|
guint32 listavail;
|
||||||
|
|
||||||
/* we keep state of assembled pieces */
|
/* we keep state of assembled pieces */
|
||||||
guint8 *assembled;
|
guint8 *assembled;
|
||||||
guint32 assembled_len; /* only valid when assembled != NULL */
|
guint32 assembled_len; /* only valid when assembled != NULL */
|
||||||
|
|
||||||
/* this is needed for gst_bytestream_tell */
|
/* this is needed for gst_bytestream_tell */
|
||||||
guint64 offset;
|
guint64 offset;
|
||||||
guint64 last_ts;
|
guint64 last_ts;
|
||||||
|
|
||||||
/* if we are in the seek state (waiting for DISCONT) */
|
/* if we are in the seek state (waiting for DISCONT) */
|
||||||
gboolean in_seek;
|
gboolean in_seek;
|
||||||
|
|
||||||
gpointer _gst_reserved[GST_PADDING];
|
gpointer _gst_reserved[GST_PADDING];
|
||||||
};
|
};
|
||||||
|
|
||||||
GstByteStream *gst_bytestream_new (GstPad * pad);
|
GstByteStream* gst_bytestream_new (GstPad *pad);
|
||||||
void gst_bytestream_destroy (GstByteStream * bs);
|
void gst_bytestream_destroy (GstByteStream *bs);
|
||||||
|
|
||||||
void gst_bytestream_reset (GstByteStream * bs);
|
void gst_bytestream_reset (GstByteStream *bs);
|
||||||
guint32 gst_bytestream_read (GstByteStream * bs, GstBuffer ** buf, guint32 len);
|
guint32 gst_bytestream_read (GstByteStream *bs, GstBuffer** buf, guint32 len);
|
||||||
guint64 gst_bytestream_tell (GstByteStream * bs);
|
guint64 gst_bytestream_tell (GstByteStream *bs);
|
||||||
guint64 gst_bytestream_length (GstByteStream * bs);
|
guint64 gst_bytestream_length (GstByteStream *bs);
|
||||||
gboolean gst_bytestream_size_hint (GstByteStream * bs, guint32 size);
|
gboolean gst_bytestream_size_hint (GstByteStream *bs, guint32 size);
|
||||||
gboolean gst_bytestream_seek (GstByteStream * bs, gint64 offset,
|
gboolean gst_bytestream_seek (GstByteStream *bs, gint64 offset, GstSeekType type);
|
||||||
GstSeekType type);
|
guint32 gst_bytestream_peek (GstByteStream *bs, GstBuffer** buf, guint32 len);
|
||||||
guint32 gst_bytestream_peek (GstByteStream * bs, GstBuffer ** buf, guint32 len);
|
guint32 gst_bytestream_peek_bytes (GstByteStream *bs, guint8** data, guint32 len);
|
||||||
guint32 gst_bytestream_peek_bytes (GstByteStream * bs, guint8 ** data,
|
gboolean gst_bytestream_flush (GstByteStream *bs, guint32 len);
|
||||||
guint32 len);
|
void gst_bytestream_flush_fast (GstByteStream *bs, guint32 len);
|
||||||
gboolean gst_bytestream_flush (GstByteStream * bs, guint32 len);
|
void gst_bytestream_get_status (GstByteStream *bs, guint32 *avail_out, GstEvent **event_out);
|
||||||
void gst_bytestream_flush_fast (GstByteStream * bs, guint32 len);
|
guint64 gst_bytestream_get_timestamp (GstByteStream *bs);
|
||||||
void gst_bytestream_get_status (GstByteStream * bs, guint32 * avail_out,
|
|
||||||
GstEvent ** event_out);
|
|
||||||
guint64 gst_bytestream_get_timestamp (GstByteStream * bs);
|
|
||||||
|
|
||||||
void gst_bytestream_print_status (GstByteStream * bs);
|
void gst_bytestream_print_status (GstByteStream *bs);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GST_BYTESTREAM_H__ */
|
#endif /* __GST_BYTESTREAM_H__ */
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
* Boston, MA 02111-1307, USA.
|
* Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __GST_CONTROL_H__
|
#ifndef __GST_CONTROL_H__
|
||||||
#define __GST_CONTROL_H__
|
#define __GST_CONTROL_H__
|
||||||
|
|
||||||
|
@ -28,7 +28,10 @@
|
||||||
#include <gst/control/dplinearinterp.h>
|
#include <gst/control/dplinearinterp.h>
|
||||||
#include <gst/control/unitconvert.h>
|
#include <gst/control/unitconvert.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS void gst_control_init (int *argc, char **argv[]);
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
void gst_control_init (int *argc, char **argv[]);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GST_CONTROL_H__ */
|
#endif /* __GST_CONTROL_H__ */
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue