1 <!-- ##### FUNCTION gst_fakesink_chain ##### -->
9 <!-- ##### ARG GstTypeFind:type ##### -->
11 Query the element for the current mime type
15 <!-- ##### ARG GstAudioSink:mute ##### -->
21 <!-- ##### STRUCT GstFakeSrc ##### -->
27 <!-- ##### FUNCTION gst_tee_get_type ##### -->
34 <!-- ##### MACRO GST_IS_SINK ##### -->
41 <!-- ##### MACRO GST_META ##### -->
48 <!-- ##### FUNCTION gst_caps_list_check_compatibility ##### -->
57 <!-- ##### MACRO GST_IS_CONNECTION ##### -->
64 <!-- ##### MACRO GST_TYPE_FAKESINK ##### -->
70 <!-- ##### FUNCTION gst_pad_remove_ghost_parent ##### -->
78 <!-- ##### FUNCTION gst_fdsink_chain ##### -->
86 <!-- ##### FUNCTION gst_identity_chain ##### -->
94 <!-- ##### FUNCTION gst_connection_get_type ##### -->
101 <!-- ##### FUNCTION gst_audiosink_chain ##### -->
109 <!-- ##### MACRO GST_PIPELINE_CLASS ##### -->
116 <!-- ##### FUNCTION gst_elementfactory_add_src ##### -->
124 <!-- ##### STRUCT GstConnectionClass ##### -->
130 <!-- ##### ARG GstSineSrc:channels ##### -->
132 The number of channels.
136 <!-- ##### MACRO DEBUG ##### -->
138 Use this macro to show debugging info. This is only usefull when developing new
140 If you #define DEBUG_ENABLED before including gst/gst.h, this macro will produce
144 @format: the format specification as in g_print
147 <!-- ##### SECTION ./tmpl/gstesdsink.sgml:Title ##### -->
151 <!-- ##### MACRO GST_TYPE_IDENTITY ##### -->
157 <!-- ##### FUNCTION gst_type_save_thyself ##### -->
166 <!-- ##### FUNCTION gst_audiosrc_push ##### -->
173 <!-- ##### MACRO GST_IS_FAKESRC_CLASS ##### -->
180 <!-- ##### SECTION ./tmpl/gstaudiosrc.sgml:See_Also ##### -->
186 <!-- ##### MACRO GST_AUDIOSINK ##### -->
193 <!-- ##### SIGNAL GstSrc::eos ##### -->
195 An eos signal is triggered whenever the GstSrc has reached the end of
200 @gstsrc: the object which received the signal.
201 @arg1: the object which received the signal
203 <!-- ##### TYPEDEF GstCapsFactoryEntry ##### -->
209 <!-- ##### FUNCTION gst_disksrc_get_type ##### -->
216 <!-- ##### MACRO GST_IS_DISKSRC_CLASS ##### -->
223 <!-- ##### SECTION ./tmpl/gstmeta.sgml:Short_Description ##### -->
224 Provide context for buffers
227 <!-- ##### MACRO DEBUG_ENTER_STRING ##### -->
233 <!-- ##### SECTION ./tmpl/audioraw.sgml:See_Also ##### -->
239 <!-- ##### FUNCTION gst_padtemplate_create ##### -->
250 <!-- ##### MACRO GST_IS_ESDSINK_CLASS ##### -->
257 <!-- ##### SECTION ./tmpl/gstgetbits.sgml:See_Also ##### -->
263 <!-- ##### MACRO GST_SRC ##### -->
270 <!-- ##### FUNCTION gst_sink_new ##### -->
278 <!-- ##### MACRO GST_PAD_CLASS ##### -->
285 <!-- ##### FUNCTION plugin_load_all ##### -->
291 <!-- ##### MACRO GST_SINESRC_CLASS ##### -->
298 <!-- ##### FUNCTION gst_pad_save_thyself ##### -->
307 <!-- ##### MACRO GST_IS_AUDIOSINK_CLASS ##### -->
314 <!-- ##### STRUCT GstDiskSrc ##### -->
320 <!-- ##### ARG GstDiskSink:location ##### -->
322 The filename to write to.
326 <!-- ##### MACRO GST_IS_SRC_CLASS ##### -->
333 <!-- ##### ARG GstAsyncDiskSrc:bytesperread ##### -->
335 Specify how many bytes to read at a time.
339 <!-- ##### FUNCTION gst_filter_new ##### -->
347 <!-- ##### SECTION ./tmpl/gstesdsink.sgml:Short_Description ##### -->
351 <!-- ##### FUNCTION gst_sink_get_type ##### -->
358 <!-- ##### FUNCTION gst_queue_push ##### -->
365 <!-- ##### MACRO GST_FILTER_FLAG_LAST ##### -->
367 subclass use this to start their flag enumeration
371 <!-- ##### FUNCTION gst_audiosink_set_channels ##### -->
379 <!-- ##### SECTION ./tmpl/gstconnection.sgml:Short_Description ##### -->
380 Generic connection between elements.
383 <!-- ##### STRUCT GstSinkClass ##### -->
389 <!-- ##### STRUCT GstFilterClass ##### -->
395 <!-- ##### MACRO GST_FDSINK ##### -->
402 <!-- ##### FUNCTION gst_bin_schedule ##### -->
409 <!-- ##### MACRO ERROR ##### -->
418 <!-- ##### STRUCT MetaVideoRaw ##### -->
431 <!-- ##### FUNCTION gst_meta_ref ##### -->
438 <!-- ##### SECTION ./tmpl/gstaudiosink.sgml:See_Also ##### -->
444 <!-- ##### MACRO GST_FILTER ##### -->
451 <!-- ##### MACRO GST_DEBUG_LEAVE_STRING ##### -->
457 <!-- ##### FUNCTION gst_esdsink_set_channels ##### -->
465 <!-- ##### FUNCTION gst_autoplug_caps_list ##### -->
478 <!-- ##### MACRO GST_ELEMENT ##### -->
485 <!-- ##### ARG GstQueue:block ##### -->
487 Specify wether the queue blocks or not.
491 <!-- ##### FUNCTION gst_pad_pull_region ##### -->
501 <!-- ##### FUNCTION gst_fdsink_new_with_fd ##### -->
510 <!-- ##### MACRO GST_IS_ELEMENT_CLASS ##### -->
517 <!-- ##### STRUCT GstSrcClass ##### -->
523 <!-- ##### ARG GstIdentity:control ##### -->
529 <!-- ##### TYPEDEF GstPropsListFactory[] ##### -->
535 <!-- ##### MACRO GST_PAD ##### -->
542 <!-- ##### FUNCTION gst_pad_set_pull_function ##### -->
550 <!-- ##### STRUCT GstSink ##### -->
556 <!-- ##### FUNCTION gst_pipeline_get_type ##### -->
563 <!-- ##### MACRO GST_IS_THREAD ##### -->
570 <!-- ##### MACRO GST_TYPE_THREAD ##### -->
576 <!-- ##### STRUCT GstAsyncDiskSrcClass ##### -->
582 <!-- ##### FUNCTION gst_pad_set_caps_list ##### -->
590 <!-- ##### MACRO GST_PROPS_FOURCC_INT ##### -->
592 Create a fourcc property out of an integer value.
595 @a: the integer value
597 <!-- ##### MACRO GST_TYPE_SINK ##### -->
603 <!-- ##### MACRO DEBUG_SET_STRING ##### -->
611 <!-- ##### MACRO GST_IS_THREAD_CLASS ##### -->
618 <!-- ##### FUNCTION gst_bin_get_type ##### -->
625 <!-- ##### ARG GstAsyncDiskSrc:offset ##### -->
627 Specify the current offset in the file.
631 <!-- ##### MACRO STACK_SIZE ##### -->
637 <!-- ##### MACRO GST_TYPE_AUDIOSINK ##### -->
643 <!-- ##### SECTION ./tmpl/plugin.sgml:Long_Description ##### -->
649 <!-- ##### MACRO GST_FILTER_CLASS ##### -->
656 <!-- ##### FUNCTION gst_pad_select ##### -->
665 <!-- ##### FUNCTION gst_identity_get_type ##### -->
672 <!-- ##### TYPEDEF GstCapsFactory[] ##### -->
678 <!-- ##### MACRO GST_PROPS_BOOL_ID ##### -->
684 <!-- ##### FUNCTION gst_meta_unref ##### -->
691 <!-- ##### STRUCT GstSineSrc ##### -->
697 <!-- ##### STRUCT MetaDGA ##### -->
707 <!-- ##### SECTION ./tmpl/spectrum.sgml:Title ##### -->
711 <!-- ##### SECTION ./tmpl/GstElement.sgml:Long_Description ##### -->
717 <!-- ##### ARG GstAudioSink:format ##### -->
723 <!-- ##### MACRO GST_IS_FAKESINK_CLASS ##### -->
730 <!-- ##### MACRO GST_AUDIOSRC_CLASS ##### -->
737 <!-- ##### STRUCT GstAudioSrcClass ##### -->
743 <!-- ##### FUNCTION gst_audiosrc_new ##### -->
751 <!-- ##### STRUCT GstConnection ##### -->
757 <!-- ##### STRUCT GstQueueClass ##### -->
763 <!-- ##### FUNCTION gst_fakesrc_push ##### -->
770 <!-- ##### FUNCTION gst_type_add_sink ##### -->
778 <!-- ##### MACRO GST_IS_IDENTITY_CLASS ##### -->
785 <!-- ##### SECTION ./tmpl/gstgetbits.sgml:Title ##### -->
789 <!-- ##### SECTION ./tmpl/audioraw.sgml:Title ##### -->
793 <!-- ##### MACRO GST_FDSINK_CLASS ##### -->
800 <!-- ##### FUNCTION gst_fdsink_new ##### -->
808 <!-- ##### FUNCTION gst_element_save_thyself ##### -->
817 <!-- ##### MACRO GST_IS_TEE ##### -->
824 <!-- ##### FUNCTION gst_type_get_sink_to_src ##### -->
833 <!-- ##### MACRO GST_PROPS_INT_ID ##### -->
839 <!-- ##### STRUCT GstTeeClass ##### -->
845 <!-- ##### MACRO GST_FAKESINK ##### -->
852 <!-- ##### FUNCTION gst_type_get_srcs ##### -->
860 <!-- ##### FUNCTION gst_esdsink_set_frequency ##### -->
868 <!-- ##### SECTION ./tmpl/gstgetbits.sgml:Short_Description ##### -->
872 <!-- ##### MACRO GST_TYPE_SRC ##### -->
878 <!-- ##### MACRO GST_FAKESRC ##### -->
885 <!-- ##### MACRO GST_IS_HTTPSRC ##### -->
892 <!-- ##### MACRO GST_DEBUG_NOPREFIX ##### -->
901 <!-- ##### MACRO GST_IDENTITY ##### -->
908 <!-- ##### ARG GstAudioSrc:format ##### -->
910 The audio format as defined in soundcard.h
914 <!-- ##### MACRO GST_IS_HTTPSRC_CLASS ##### -->
921 <!-- ##### SECTION ./tmpl/gstasyncdisksrc.sgml:Title ##### -->
925 <!-- ##### MACRO GST_TYPE_ASYNCDISKSRC ##### -->
932 <!-- ##### FUNCTION gst_elementfactory_add_sink ##### -->
940 <!-- ##### FUNCTION gst_bin_schedule_func ##### -->
947 <!-- ##### MACRO GST_IS_OBJECT ##### -->
954 <!-- ##### MACRO GST_TYPE_OBJECT ##### -->
960 <!-- ##### ARG GstSineSrc:frequency ##### -->
966 <!-- ##### FUNCTION gst_src_get_type ##### -->
973 <!-- ##### FUNCTION gst_tee_new ##### -->
981 <!-- ##### STRUCT GstAudioSink ##### -->
987 <!-- ##### MACRO GST_IS_QUEUE ##### -->
994 <!-- ##### TYPEDEF GstPropsFactory[] ##### -->
1000 <!-- ##### SIGNAL GstAudioSink::handoff ##### -->
1002 The buffer is sent to the sound card.
1005 @gstaudiosink: the object which received the signal.
1006 @arg1: the audiosink.
1008 <!-- ##### MACRO GST_IS_FDSRC_CLASS ##### -->
1015 <!-- ##### MACRO GST_IS_OBJECT_CLASS ##### -->
1022 <!-- ##### FUNCTION gst_esdsink_chain ##### -->
1030 <!-- ##### FUNCTION gst_buffer_add_meta ##### -->
1038 <!-- ##### FUNCTION gst_elementfactory_can_src_caps_list ##### -->
1047 <!-- ##### FUNCTION gst_queue_chain ##### -->
1055 <!-- ##### MACRO GST_TYPE_QUEUE ##### -->
1061 <!-- ##### FUNCTION gst_buffer_remove_meta ##### -->
1069 <!-- ##### FUNCTION gst_caps_register_count ##### -->
1079 <!-- ##### MACRO GST_TYPE_HTTPSRC ##### -->
1085 <!-- ##### MACRO GST_TYPE_PAD ##### -->
1091 <!-- ##### MACRO GST_IS_AUDIOSRC ##### -->
1098 <!-- ##### MACRO GST_DISKSRC ##### -->
1105 <!-- ##### MACRO INFO_ELEMENT ##### -->
1115 <!-- ##### MACRO GST_SINK_CLASS ##### -->
1122 <!-- ##### STRUCT GstAudioSinkClass ##### -->
1128 <!-- ##### FUNCTION gst_type_add_src ##### -->
1136 <!-- ##### STRUCT GstFdSink ##### -->
1142 <!-- ##### MACRO GST_IS_PIPELINE ##### -->
1149 <!-- ##### STRUCT GstFdSinkClass ##### -->
1155 <!-- ##### MACRO GST_IS_SINESRC_CLASS ##### -->
1162 <!-- ##### MACRO GST_ASYNCDISKSRC_CLASS ##### -->
1169 <!-- ##### FUNCTION gst_esdsink_sync_parms ##### -->
1176 <!-- ##### FUNCTION gst_connection_push ##### -->
1183 <!-- ##### SIGNAL GstDiskSink::handoff ##### -->
1185 Is emited after the buffer has been written to the disk.
1188 @gstdisksink: the object which received the signal.
1190 <!-- ##### FUNCTION gst_audiosink_new ##### -->
1198 <!-- ##### FUNCTION gst_bin_set_element_manager ##### -->
1206 <!-- ##### MACRO GST_ESDSINK ##### -->
1213 <!-- ##### FUNCTION gst_type_initialize ##### -->
1219 <!-- ##### SECTION ./tmpl/gstfilter.sgml:Title ##### -->
1223 <!-- ##### MACRO GST_TEE ##### -->
1230 <!-- ##### MACRO GST_IS_QUEUE_CLASS ##### -->
1237 <!-- ##### FUNCTION gst_fdsrc_get_type ##### -->
1244 <!-- ##### FUNCTION gst_pad_get_type_id ##### -->
1252 <!-- ##### FUNCTION gst_thread_iterate ##### -->
1259 <!-- ##### STRUCT OverlayClip ##### -->
1269 <!-- ##### ENUM GstSrcFlags ##### -->
1271 Flags for the GstSrc element
1274 @GST_SRC_ASYNC: Indicates that this src is asynchronous
1275 @GST_SRC_FLAG_LAST: subclasses can use this to number their flags
1277 <!-- ##### SECTION ./tmpl/gstaudiosink.sgml:Short_Description ##### -->
1281 <!-- ##### SECTION ./tmpl/gstcolorspace.sgml:Title ##### -->
1285 <!-- ##### TYPEDEF GstPadFactoryEntry ##### -->
1287 Defines an entry for a padfactory.
1291 <!-- ##### ENUM GstAsyncDiskSrcFlags ##### -->
1293 <informaltable pgwide=1 frame="none" role="enum">
1294 <tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*">
1297 <entry>GST_ASYNCDISKSRC_OPEN</entry>
1298 <entry>the asyncdisksrc is open for reading</entry>
1301 </tbody></tgroup></informaltable>
1305 @GST_ASYNCDISKSRC_OPEN:
1306 @GST_ASYNCDISKSRC_FLAG_LAST:
1308 <!-- ##### STRUCT GstAsyncDiskSrc ##### -->
1314 <!-- ##### FUNCTION gst_element_change_state ##### -->
1323 <!-- ##### FUNCTION gst_pad_get_ghost_parents ##### -->
1331 <!-- ##### STRUCT GstFilter ##### -->
1337 <!-- ##### MACRO GST_IS_BIN ##### -->
1344 <!-- ##### MACRO GST_OBJECT_FLAG_LAST ##### -->
1346 subclasses can use this value to start the enumeration of their flags
1350 <!-- ##### SECTION ./tmpl/spectrum.sgml:Short_Description ##### -->
1351 Frequencies of a spectrum analysis.
1354 <!-- ##### FUNCTION gst_asyncdisksrc_get_type ##### -->
1361 <!-- ##### MACRO GST_AUDIOSINK_CLASS ##### -->
1368 <!-- ##### MACRO GST_PAD_FACTORY_SINK ##### -->
1370 Indicates a sinkpad for the padfactory.
1374 <!-- ##### MACRO GST_SRC_CLASS ##### -->
1381 <!-- ##### SECTION ./tmpl/gstcolorspace.sgml:Long_Description ##### -->
1387 <!-- ##### FUNCTION gst_type_load_thyself ##### -->
1395 <!-- ##### FUNCTION gst_pad_get_caps_list ##### -->
1403 <!-- ##### MACRO GST_PROPS_FOURCC_ID ##### -->
1409 <!-- ##### FUNCTION gst_esdsink_new ##### -->
1417 <!-- ##### MACRO GST_META_FLAGS ##### -->
1419 Retrieve the flags of the given meta information.
1422 @meta: the meta information
1424 <!-- ##### FUNCTION gst_element_request_pad ##### -->
1434 <!-- ##### MACRO GST_SINESRC ##### -->
1441 <!-- ##### SECTION ./tmpl/gstsink.sgml:Short_Description ##### -->
1442 The end point of a filter graph
1445 <!-- ##### STRUCT MetaAudioRaw ##### -->
1456 <!-- ##### ARG GstAudioSrc:channels ##### -->
1458 The number of channels (mono, stereo, ...)
1462 <!-- ##### STRUCT GstFakeSink ##### -->
1468 <!-- ##### MACRO GST_STATE_IS_SET ##### -->
1470 This macro checks to see if the given state is set.
1473 @obj: Element to check for state.
1474 @flag: State to check for, must be a single bit in guint32.
1476 <!-- ##### STRUCT GstMeta ##### -->
1481 @lock: for locking purposes
1482 @flags: the flags of the meta data
1483 @data: the meta data
1484 @size: the size of the meta data
1486 <!-- ##### FUNCTION gst_xml_new_from_memory ##### -->
1496 <!-- ##### MACRO GST_PROPS_LIST_ID ##### -->
1502 <!-- ##### SECTION ./tmpl/gstconnection.sgml:See_Also ##### -->
1508 <!-- ##### FUNCTION plugin_load ##### -->
1516 <!-- ##### MACRO GST_IS_ELEMENT ##### -->
1523 <!-- ##### SECTION ./tmpl/gstaudiosink.sgml:Title ##### -->
1527 <!-- ##### MACRO GST_IS_ASYNCDISKSRC ##### -->
1534 <!-- ##### MACRO GST_SRC_SET_FLAGS ##### -->
1536 This macro sets the given flags.
1540 @flag: Flag to set, can by any number of bits in guint32.
1541 @obj: GstSrc to set flag in.
1543 <!-- ##### MACRO GST_BUFFER_TYPE ##### -->
1545 Retrieves the type id of the data in the buffer.
1550 <!-- ##### MACRO GST_PROPS_FLOAT_STRING ##### -->
1557 <!-- ##### MACRO DEBUG_LEAVE_STRING ##### -->
1563 <!-- ##### FUNCTION gst_filter_get_type ##### -->
1570 <!-- ##### FUNCTION plugin_load_absolute ##### -->
1578 <!-- ##### STRUCT GstObjectClass ##### -->
1584 <!-- ##### SECTION ./tmpl/gstsink.sgml:Title ##### -->
1588 <!-- ##### MACRO GST_CPU_FLAG_MMX ##### -->
1590 A flag indicating that MMX instructions are supported.
1594 <!-- ##### FUNCTION gst_object_get_type ##### -->
1601 <!-- ##### STRUCT GstSineSrcClass ##### -->
1607 <!-- ##### FUNCTION gst_elementfactory_can_sink_caps_list ##### -->
1616 <!-- ##### MACRO GST_SRC_UNSET_FLAGS ##### -->
1618 This macro usets the given flags.
1622 @flag: Flag to set, must be a single bit in guint32.
1623 @obj: GstSrc to unset flag in.
1625 <!-- ##### ARG GstAudioSrc:frequency ##### -->
1631 <!-- ##### MACRO GST_PAD_FACTORY_SRC ##### -->
1633 Indicates a srcpad for the padfactory.
1637 <!-- ##### ARG GstDiskSink:closed ##### -->
1643 <!-- ##### FUNCTION gst_buffer_get_first_meta ##### -->
1651 <!-- ##### MACRO GST_IS_SINK_CLASS ##### -->
1658 <!-- ##### MACRO GST_IS_PIPELINE_CLASS ##### -->
1665 <!-- ##### MACRO GST_PROPS_INT_RANGE_ID ##### -->
1671 <!-- ##### STRUCT GstAudioSrc ##### -->
1677 <!-- ##### MACRO GST_TYPE_ELEMENT ##### -->
1683 <!-- ##### ARG GstFakeSrc:patern ##### -->
1689 <!-- ##### FUNCTION gst_pad_get_caps_by_name ##### -->
1698 <!-- ##### SECTION ./tmpl/gstsrc.sgml:See_Also ##### -->
1704 <!-- ##### FUNCTION gst_esdsink_set_format ##### -->
1712 <!-- ##### MACRO GST_DEBUG_PREFIX ##### -->
1721 <!-- ##### SECTION ./tmpl/gstcolorspace.sgml:See_Also ##### -->
1727 <!-- ##### MACRO GST_IS_FDSRC ##### -->
1734 <!-- ##### STRUCT GstIdentity ##### -->
1740 <!-- ##### FUNCTION gst_thread_get_type ##### -->
1747 <!-- ##### MACRO GST_QUEUE ##### -->
1754 <!-- ##### MACRO GST_THREAD ##### -->
1761 <!-- ##### MACRO COTHREAD_MAXTHREADS ##### -->
1763 The maximum number of cothreads we are going to support.
1767 <!-- ##### FUNCTION gst_fakesink_new ##### -->
1775 <!-- ##### MACRO GST_PAD_FACTORY_CAPS ##### -->
1777 Starts the declaration of a the capabilities for this padtemplate.
1780 @a...: a capability factory
1782 <!-- ##### SECTION ./tmpl/gstsrc.sgml:Title ##### -->
1786 <!-- ##### FUNCTION gst_pad_get_directory ##### -->
1794 <!-- ##### FUNCTION gst_tee_chain ##### -->
1802 <!-- ##### FUNCTION gst_caps_new_with_props ##### -->
1812 <!-- ##### MACRO GST_STATE_READY_TO_PLAYING ##### -->
1814 The Element is going from the READY state to the PLAYING state.
1818 <!-- ##### MACRO GST_TYPE_AUDIOSRC ##### -->
1824 <!-- ##### SECTION ./tmpl/plugin.sgml:See_Also ##### -->
1830 <!-- ##### SECTION ./tmpl/gstmeta.sgml:See_Also ##### -->
1836 <!-- ##### MACRO GST_IS_TEE_CLASS ##### -->
1843 <!-- ##### FUNCTION gst_thread_main_loop ##### -->
1850 <!-- ##### SECTION ./tmpl/gstmeta.sgml:Long_Description ##### -->
1852 The point of the metadata is to provide some context for each buffer. In
1853 the case of audio data, for instance, it would provide the samplerate, bit
1854 depth, and channel count.
1858 The trick is that there may be multiple types of metadata ganged onto a
1859 single buffer. This is why they're going to be a GList. This does mean
1860 extra overhead in all cases, but I think it's minimal. The GList type
1861 uses a chunk allocater so we're not wasting too much memory or time when
1866 The trick is dealing with these structs as they pass through a pipeline,
1867 since they have potentially different mutability properties. For
1868 instance, if you've got a mp3 decoder connected to a tee, which sends the
1869 buffers off to both the decoder and a spectrum analyzer (and then a
1870 visualization element). The preferred setup would be where every time a
1871 audio/raw metadata comes down the pipe (indicating a potential change in
1872 audio format), the audiosink and spectrum would just save off pointers.
1876 So when exactly does this metadata go away (deallocated)? Well, that
1877 means metadata has to be refcounted. But that gets rather hairy. OK, in
1878 the simple case you create a metadata struct, it comes with refcount set
1879 to 1. You pass it through, it stays one, eventually someone drops the
1880 last reference on the buffer it's tied to, you free the metadata too.
1881 Easy. What if you tee? You could go through and for every metadata in
1882 the buffer, increment the refcount by the same as the buffer. So in the
1883 above case (tee'd), the audiosink and spectrum would get the buffer with a
1884 refcount of 2, and it'd have a metadata with refcount 2. Do they ref it
1885 each themselves, then unref the buffer? Or do they remove the metadata?
1886 Removing the metadata would require a buffer CoW, which would suck, so
1887 yes, they'd just ref the metadata.
1891 But.... what if they're all in different threads? Then we're off into
1892 the magical world of mutexes. Everything with a refcount in a threaded
1893 world must be mutexed, else you can do atomic increment and atomic
1894 dec and test. Can this be done from C easily? Perhaps it needs to be found
1895 from kernel includes via autoconf?
1899 The goal in designing the way metadata will be defined and used is to keep
1900 it as simple as possible. The basis for accomplishing this is the fact
1901 that in order to actually use (rather than just pass) the metadata, you
1902 have to know what the fields are, which means you have to have compiled in
1903 support for that metadata at build time. Therefore, if you're using
1904 metadata, you must have build-time access to the necessary include file
1909 So, given that you've got an include file, it would be nice if the whole
1910 thing could be contained there. This would limit the need to be linked
1911 against something, or have load-time requirements as to that has to be
1912 loaded before you are.
1916 Given that really all metadata is is a region of memory of a given size
1917 with a certain signature, this isn't all that hard. First you lay out the
1918 struct that defines the metadata. Then you set up #defines that expand to
1919 the size of the struct in question, as well as the four-cc code that
1924 The work is done by a few #defines, a la the #defines used in all Gtk
1925 objects. The first is a NEW() method that allocates the memory for the
1926 metadata and fills in all the normal fields (type, size, utility
1927 functions). Because of the way it's defined (as a #define, no less),
1928 you'll have to invoke it as META_NEW(meta), since it can't return()
1933 Another #define will check to make sure a meta is indeed that type by
1934 verifying the type code and size. Theoretically, meta types can overlap
1935 with the same fourcc code, as long as they have different sizes. But I
1936 probably ought to have a global public registry so people writing things
1937 don't conflict. MSFT got that right, at least.
1941 So, a hairy problem is what to do when there are utility functions
1942 associated with one of these things. One option is to not bother with
1943 them. This is very likely a possible solution, since metadata is supposed
1944 to be flat memory of a given size. Not much to do to either free or copy
1949 <!-- ##### SECTION ./tmpl/gstconnection.sgml:Title ##### -->
1953 <!-- ##### MACRO GST_TYPE_FDSRC ##### -->
1959 <!-- ##### MACRO GST_TYPE_PIPELINE ##### -->
1965 <!-- ##### STRUCT GstHttpSrcClass ##### -->
1971 <!-- ##### SECTION ./tmpl/GstElement.sgml:Short_Description ##### -->
1975 <!-- ##### SECTION ./tmpl/gstesdsink.sgml:See_Also ##### -->
1981 <!-- ##### MACRO GST_TYPE_TEE ##### -->
1987 <!-- ##### MACRO GST_BIN ##### -->
1994 <!-- ##### SECTION ./tmpl/GstElement.sgml:Title ##### -->
1998 <!-- ##### FUNCTION gst_type_get_sinks ##### -->
2006 <!-- ##### MACRO GST_BUFFER_POOL ##### -->
2013 <!-- ##### STRUCT GstEsdSink ##### -->
2019 <!-- ##### MACRO GST_META_FLAG_UNSET ##### -->
2021 Clear a flag in the meta data.
2024 @meta: the meta data
2025 @flag: the flag to clear
2027 <!-- ##### MACRO GST_IS_FAKESRC ##### -->
2034 <!-- ##### SECTION ./tmpl/gstaudiosink.sgml:Long_Description ##### -->
2040 <!-- ##### SECTION ./tmpl/gstsink.sgml:Long_Description ##### -->
2042 The sink is the end of the filter graph. A typical sink would be an audio
2048 <!-- ##### MACRO GST_IS_BIN_CLASS ##### -->
2055 <!-- ##### FUNCTION gst_esdsink_get_type ##### -->
2062 <!-- ##### SECTION ./tmpl/GstElement.sgml:See_Also ##### -->
2068 <!-- ##### STRUCT GstEsdSinkClass ##### -->
2074 <!-- ##### MACRO GST_ELEMENT_IS_MULTI_IN ##### -->
2076 Query whether this object has multiple input pads.
2080 @obj: Element to query for multiple input pads.
2082 <!-- ##### SECTION ./tmpl/gstfilter.sgml:See_Also ##### -->
2088 <!-- ##### MACRO DEBUG_NOPREFIX ##### -->
2096 <!-- ##### ARG GstAudioSink:frequency ##### -->
2102 <!-- ##### STRUCT GstFdSrc ##### -->
2108 <!-- ##### FUNCTION gst_props_register ##### -->
2116 <!-- ##### STRUCT GstThreadClass ##### -->
2122 <!-- ##### FUNCTION gst_element_load_thyself ##### -->
2132 <!-- ##### FUNCTION gst_src_signal_eos ##### -->
2139 <!-- ##### STRUCT GstHttpSrc ##### -->
2145 <!-- ##### STRUCT GstSrc ##### -->
2151 <!-- ##### SECTION ./tmpl/videoraw.sgml:Long_Description ##### -->
2153 Information about video buffers.
2157 <!-- ##### FUNCTION gst_bin_add_managed_element ##### -->
2165 <!-- ##### FUNCTION gst_queue_new ##### -->
2173 <!-- ##### MACRO GST_THREAD_CLASS ##### -->
2180 <!-- ##### TYPEDEF GstPropsFactoryEntry ##### -->
2186 <!-- ##### MACRO GST_IS_FILTER_CLASS ##### -->
2193 <!-- ##### MACRO GST_CONNECTION_CLASS ##### -->
2200 <!-- ##### SECTION ./tmpl/gstgetbits.sgml:Long_Description ##### -->
2206 <!-- ##### FUNCTION gst_connection_new ##### -->
2214 <!-- ##### MACRO GST_SINK ##### -->
2221 <!-- ##### MACRO GST_FDSRC_CLASS ##### -->
2228 <!-- ##### MACRO GST_TYPE_FAKESRC ##### -->
2234 <!-- ##### SECTION ./tmpl/plugin.sgml:Short_Description ##### -->
2238 <!-- ##### FUNCTION gst_pad_get_type ##### -->
2245 <!-- ##### SECTION ./tmpl/gstsink.sgml:See_Also ##### -->
2251 <!-- ##### MACRO GST_IS_AUDIOSINK ##### -->
2258 <!-- ##### SECTION ./tmpl/gstfilter.sgml:Long_Description ##### -->
2260 Filters take data in and spit data out. They are the main Element in a filter graph.
2261 Filters have zero or more inputs and zero or more outputs. Filters are connected
2262 together to form filter graphs. A GstFilter is the base class and is not very usefull
2267 <!-- ##### FUNCTION gst_tee_new_pad ##### -->
2275 <!-- ##### MACRO GST_OBJECT ##### -->
2282 <!-- ##### MACRO GST_STATE_PLAYING_TO_READY ##### -->
2284 The Element is going from the PLAYING state to the READY state.
2288 <!-- ##### MACRO GST_IS_FDSINK ##### -->
2295 <!-- ##### MACRO GST_DEBUG_ENTER_STRING ##### -->
2297 Combine #GST_DEBUG_ENTER and #GST_DEBUG_SET_STRING.
2301 <!-- ##### MACRO GST_IS_DISKSRC ##### -->
2308 <!-- ##### MACRO GST_FAKESINK_CLASS ##### -->
2315 <!-- ##### MACRO GST_TYPE_FDSINK ##### -->
2321 <!-- ##### SECTION ./tmpl/gstcolorspace.sgml:Short_Description ##### -->
2325 <!-- ##### SECTION ./tmpl/videoraw.sgml:Title ##### -->
2329 <!-- ##### MACRO GST_IS_FILTER ##### -->
2336 <!-- ##### STRUCT MetaOverlay ##### -->
2351 <!-- ##### MACRO GST_TYPE_FILTER ##### -->
2357 <!-- ##### FUNCTION gst_identity_new ##### -->
2365 <!-- ##### MACRO GST_IS_AUDIOSRC_CLASS ##### -->
2372 <!-- ##### STRUCT GstIdentityClass ##### -->
2378 <!-- ##### MACRO GST_IS_PAD_CLASS ##### -->
2385 <!-- ##### MACRO GST_IDENTITY_CLASS ##### -->
2392 <!-- ##### MACRO GST_SINK_FLAG_LAST ##### -->
2398 <!-- ##### MACRO GST_IS_FDSINK_CLASS ##### -->
2405 <!-- ##### MACRO GST_SRC_FLAGS ##### -->
2407 This macro returns the entire set of flags for the object.
2410 @obj: GstSrc to return flags for.
2412 <!-- ##### STRUCT GstFakeSinkClass ##### -->
2418 <!-- ##### ARG GstAsyncDiskSrc:length ##### -->
2420 Get the size of the current file.
2424 <!-- ##### SECTION ./tmpl/gstaudiosrc.sgml:Short_Description ##### -->
2428 <!-- ##### SECTION ./tmpl/gstsrc.sgml:Short_Description ##### -->
2429 The start point of a filter graph
2432 <!-- ##### FUNCTION gst_src_push ##### -->
2439 <!-- ##### MACRO GST_IS_ESDSINK ##### -->
2446 <!-- ##### FUNCTION gst_sinesrc_push ##### -->
2453 <!-- ##### FUNCTION gst_bin_create_plan ##### -->
2460 <!-- ##### FUNCTION gst_props_register_count ##### -->
2469 <!-- ##### ARG GstFakeSink:num_sources ##### -->
2475 <!-- ##### MACRO GST_PROPS_FLOAT_RANGE_STRING ##### -->
2483 <!-- ##### MACRO GST_FAKESRC_CLASS ##### -->
2490 <!-- ##### ARG GstQueue:timeout ##### -->
2496 <!-- ##### MACRO COTHREAD_STACKSIZE ##### -->
2498 The default stack size of a cothread.
2502 <!-- ##### SECTION ./tmpl/gstesdsink.sgml:Long_Description ##### -->
2508 <!-- ##### STRUCT GstBinClass ##### -->
2514 <!-- ##### MACRO GST_TYPE_DISKSRC ##### -->
2520 <!-- ##### FUNCTION gst_audiosrc_get_type ##### -->
2527 <!-- ##### FUNCTION gst_httpsrc_get_type ##### -->
2534 <!-- ##### MACRO GST_DISKSRC_CLASS ##### -->
2541 <!-- ##### MACRO GST_ESDSINK_CLASS ##### -->
2546 @klass: <<<<<<< gstreamer-unused.sgml
2548 <!-- ##### MACRO GST_PAD_FACTORY_REQUEST ##### -->
2550 Indicates that this pad will be available on request. Use
2551 this in the factory definition.
2555 <!-- ##### FUNCTION gst_audiosink_sync_parms ##### -->
2562 <!-- ##### MACRO GST_IS_FAKESINK ##### -->
2569 <!-- ##### MACRO GST_STATE_UNSET ##### -->
2571 This macro unsets the given state on the element.
2574 @obj: Element to unset state of.
2575 @flag: State to unset, can be any number of bits in guint32.
2577 <!-- ##### MACRO GST_QUEUE_CLASS ##### -->
2584 <!-- ##### FUNCTION gst_pad_set_type_id ##### -->
2592 <!-- ##### MACRO GST_PAD_FACTORY_ALWAYS ##### -->
2594 Indicate that this pad will always be available.
2595 Use this in the factory definition.
2599 <!-- ##### FUNCTION gst_pad_add_ghost_parent ##### -->
2607 <!-- ##### FUNCTION gst_audiosink_set_frequency ##### -->
2615 <!-- ##### MACRO GST_TYPE_BIN ##### -->
2621 <!-- ##### FUNCTION gst_elementfactory_register ##### -->
2628 <!-- ##### ARG GstAudioSrc:bytes_per_read ##### -->
2630 The number of bytes per read.
2634 <!-- ##### FUNCTION gst_element_loopfunc_wrapper ##### -->
2642 <!-- ##### MACRO GST_IS_SINESRC ##### -->
2649 <!-- ##### FUNCTION gst_meta_new_size ##### -->
2657 <!-- ##### MACRO ERROR_OBJECT ##### -->
2667 <!-- ##### FUNCTION gst_sinesrc_get_type ##### -->
2674 <!-- ##### MACRO GST_IS_IDENTITY ##### -->
2681 <!-- ##### MACRO GST_AUDIOSRC ##### -->
2688 <!-- ##### MACRO GST_TYPE_ESDSINK ##### -->
2694 <!-- ##### MACRO GST_FDSRC ##### -->
2701 <!-- ##### SECTION ./tmpl/gstaudiosrc.sgml:Long_Description ##### -->
2707 <!-- ##### FUNCTION gst_audiosink_get_type ##### -->
2714 <!-- ##### MACRO GST_OBJECT_CLASS ##### -->
2721 <!-- ##### SECTION ./tmpl/gstconnection.sgml:Long_Description ##### -->
2723 A connection is a bas class for a generic connection between
2724 elements. A connection is typically a bas class for queues.
2729 <!-- ##### MACRO GST_BUFFER ##### -->
2736 <!-- ##### MACRO GST_SRC_IS_ASYNC ##### -->
2738 Query a GstSrc for the ASYNC flag
2741 @obj: The GstSrc to query
2743 <!-- ##### MACRO GST_PIPELINE ##### -->
2750 <!-- ##### MACRO GST_STATE_SET ##### -->
2752 This macro sets the given state on the element.
2755 @obj: Element to set state of.
2756 @flag: State to set, can be any number of bits in guint32.
2758 <!-- ##### FUNCTION gst_fakesink_get_type ##### -->
2765 <!-- ##### MACRO GST_TYPE_CONNECTION ##### -->
2771 <!-- ##### ENUM GstMetaFlags ##### -->
2773 Flags indicating properties about the meta data.
2776 @GST_META_FREEABLE: the meta data can be freed
2778 <!-- ##### SECTION ./tmpl/spectrum.sgml:See_Also ##### -->
2784 <!-- ##### MACRO GST_CONNECTION ##### -->
2791 <!-- ##### SECTION ./tmpl/videoraw.sgml:Short_Description ##### -->
2792 Information about video buffers.
2795 <!-- ##### FUNCTION gst_fdsink_get_type ##### -->
2802 <!-- ##### FUNCTION gst_src_push_region ##### -->
2811 <!-- ##### STRUCT GstPipelineClass ##### -->
2817 <!-- ##### MACRO DEBUG_ENTER ##### -->
2825 <!-- ##### SIGNAL GstXML::object-loaded ##### -->
2827 Is trigered whenever the state of an element changes
2830 @gstelement: the object which received the signal.
2831 @arg1: the new state of the object
2833 <!-- ##### MACRO GST_ELEMENT_CLASS ##### -->
2840 <!-- ##### FUNCTION gst_fakesrc_new ##### -->
2848 <!-- ##### FUNCTION gst_fakesrc_get_type ##### -->
2855 <!-- ##### SECTION ./tmpl/audioraw.sgml:Short_Description ##### -->
2856 Information about audio buffers.
2859 <!-- ##### SECTION ./tmpl/videoraw.sgml:See_Also ##### -->
2865 <!-- ##### SECTION ./tmpl/gstfilter.sgml:Short_Description ##### -->
2866 Take data in and spit data out
2869 <!-- ##### TYPEDEF GstPadFactory[] ##### -->
2875 <!-- ##### MACRO GST_SRC_ASYNC ##### -->
2877 This macro checks to see if the GST_SRC_ASYNC flag is set.
2880 @obj: GstSrc to check for flag in.
2882 <!-- ##### STRUCT GstPluginElement ##### -->
2888 <!-- ##### MACRO GST_TYPE_SINESRC ##### -->
2894 <!-- ##### SECTION ./tmpl/gstmeta.sgml:Title ##### -->
2898 <!-- ##### TYPEDEF GstCapsFactory ##### -->
2904 <!-- ##### STRUCT GstFdSrcClass ##### -->
2910 <!-- ##### MACRO GST_CPU_FLAG_SSE ##### -->
2912 A flag indicating that SSE instructions are supported.
2916 <!-- ##### MACRO GST_IS_CONNECTION_CLASS ##### -->
2923 <!-- ##### FUNCTION gst_util_get_widget_arg ##### -->
2932 <!-- ##### ARG GstAsyncDiskSrc:size ##### -->
2938 <!-- ##### STRUCT GstDiskSrcClass ##### -->
2944 <!-- ##### MACRO GST_DEBUG_SET_STRING ##### -->
2946 Set the debug string for the current function, typically containing the arguments
2947 to the current function, i.e. "('element')"
2950 @format: printf-style format string
2951 @args...: printf arguments
2953 <!-- ##### FUNCTION gst_element_get_type ##### -->
2960 <!-- ##### FUNCTION gst_bin_remove_managed_element ##### -->
2968 <!-- ##### STRUCT GstElementClass ##### -->
2974 <!-- ##### MACRO GST_META_FLAG_SET ##### -->
2976 Set a flag in the meta data.
2979 @meta: the meta data
2980 @flag: the flag to set
2982 <!-- ##### MACRO GST_IS_SRC ##### -->
2989 <!-- ##### SECTION ./tmpl/audioraw.sgml:Long_Description ##### -->
2991 Information about audio buffers.
2995 <!-- ##### ENUM GstPropsId ##### -->
3000 @GST_PROPS_END_ID_NUM:
3001 @GST_PROPS_LIST_ID_NUM:
3002 @GST_PROPS_INT_ID_NUM:
3003 @GST_PROPS_INT_RANGE_ID_NUM:
3004 @GST_PROPS_FOURCC_ID_NUM:
3005 @GST_PROPS_BOOL_ID_NUM:
3007 <!-- ##### ENUM GstCapsDefinition ##### -->
3015 <!-- ##### MACRO GST_META_FLAG_IS_SET ##### -->
3017 Check if a given flag is set.
3020 @meta: the meta data to test
3021 @flag: the flag to test
3023 <!-- ##### STRUCT GstPadClass ##### -->
3029 <<<<<<< gstreamer-unused.sgml
3032 <!-- ##### SECTION ./tmpl/gstasyncdisksrc.sgml:See_Also ##### -->
3038 <!-- ##### MACRO GST_HTTPSRC ##### -->
3046 <!-- ##### STRUCT GstQueue ##### -->
3052 <!-- ##### MACRO gst_meta_new ##### -->
3054 Create new meta data.
3057 @type: the type of the meta data to create
3059 <!-- ##### FUNCTION plugin_initialize ##### -->
3065 <!-- ##### FUNCTION gst_caps_register ##### -->
3073 <!-- ##### ARG GstAsyncDiskSrc:location ##### -->
3075 Specify the location of the file to read.
3079 <!-- ##### MACRO GST_TEE_CLASS ##### -->
3086 <!-- ##### FUNCTION gst_queue_get_type ##### -->
3093 <!-- ##### MACRO DEBUG_LEAVE ##### -->
3101 <!-- ##### FUNCTION gst_audiosink_set_format ##### -->
3109 <!-- ##### SECTION ./tmpl/spectrum.sgml:Long_Description ##### -->
3111 Frequencies of a spectrum analysis.
3116 <!-- ##### SECTION ./tmpl/gstaudiosrc.sgml:Title ##### -->
3120 <!-- ##### MACRO GST_PAD_FACTORY_SOMETIMES ##### -->
3122 Indicate that this pad will become available depending
3123 on the media type. Use this in the factory definition.
3127 <!-- ##### MACRO INFO ##### -->
3136 <!-- ##### SECTION ./tmpl/gstasyncdisksrc.sgml:Long_Description ##### -->
3138 Reads data from a file. You can seek to a specific location by setting
3143 <!-- ##### FUNCTION gst_sinesrc_new ##### -->
3151 <!-- ##### MACRO GST_IS_ASYNCDISKSRC_CLASS ##### -->
3158 <!-- ##### FUNCTION gst_buffer_get_metas ##### -->
3166 <!-- ##### ARG GstAudioSrc:curoffset ##### -->
3168 Get the current number of bytes read.
3172 <!-- ##### FUNCTION gst_plugin_init ##### -->
3178 <!-- ##### STRUCT MetaAudioSpectrum ##### -->
3191 <!-- ##### SECTION ./tmpl/plugin.sgml:Title ##### -->
3195 <!-- ##### MACRO GST_IS_PAD ##### -->
3202 <!-- ##### STRUCT GstFakeSrcClass ##### -->
3208 <!-- ##### FUNCTION gst_type_dump ##### -->
3214 <!-- ##### ARG GstAudioSink:channels ##### -->
3220 <!-- ##### MACRO GST_BIN_CLASS ##### -->
3227 <!-- ##### MACRO GST_HTTPSRC_CLASS ##### -->
3234 <!-- ##### MACRO GST_ASYNCDISKSRC ##### -->
3241 <!-- ##### ARG GstPad:active ##### -->
3243 Indicates this pad is active
3247 <!-- ##### STRUCT GstTee ##### -->
3253 <!-- ##### SECTION ./tmpl/gstsrc.sgml:Long_Description ##### -->
3255 A GstSrc is the start of a filter graph. It typically is a file or an
3256 audio source. It provides data for the next element in the graph.