mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-31 03:29:50 +00:00
Updated the manual and the docs.
Original commit message from CVS: Updated the manual and the docs. Removed the esdsink in gst/elements/ we have a real one not in the plugins dir. Added more APIs to query the plugins, types and caps. more fields now have a getter and a setter. This is needed to make gstreamer wrapper fiendly. Added gst_element_disconnect beacuse we also have a gst_element_connect
This commit is contained in:
parent
ded7ca6616
commit
3d34ce7b95
48 changed files with 2741 additions and 2213 deletions
|
@ -196,6 +196,7 @@ gst_element_get_padtemplate_list
|
|||
gst_element_add_ghost_pad
|
||||
gst_element_remove_ghost_pad
|
||||
gst_element_connect
|
||||
gst_element_disconnect
|
||||
gst_element_set_state
|
||||
gst_element_error
|
||||
gst_element_get_factory
|
||||
|
@ -339,8 +340,10 @@ gst_pad_push
|
|||
gst_pad_pull
|
||||
gst_pad_pull_region
|
||||
gst_pad_pullregion
|
||||
gst_pad_handle_qos
|
||||
gst_pad_select
|
||||
gst_pad_set_eos
|
||||
gst_pad_eos_func
|
||||
gst_pad_handle_qos
|
||||
gst_pad_eos
|
||||
gst_pad_save_thyself
|
||||
gst_pad_load_and_connect
|
||||
|
@ -426,7 +429,12 @@ GstPlugin
|
|||
GstPluginElement
|
||||
GstPluginInitFunc
|
||||
gst_plugin_new
|
||||
gst_plugin_set_name
|
||||
gst_plugin_get_name
|
||||
gst_plugin_get_longname
|
||||
gst_plugin_set_longname
|
||||
gst_plugin_get_filename
|
||||
gst_plugin_is_loaded
|
||||
gst_plugin_load_all
|
||||
gst_plugin_load
|
||||
gst_plugin_load_absolute
|
||||
|
@ -435,6 +443,8 @@ gst_plugin_add_factory
|
|||
gst_plugin_add_type
|
||||
gst_plugin_find
|
||||
gst_plugin_get_list
|
||||
gst_plugin_get_factory_list
|
||||
gst_plugin_get_type_list
|
||||
gst_plugin_find_elementfactory
|
||||
gst_plugin_load_elementfactory
|
||||
gst_plugin_load_typefactory
|
||||
|
@ -521,6 +531,12 @@ gst_caps_new
|
|||
gst_caps_new_with_props
|
||||
gst_caps_register
|
||||
gst_caps_register_count
|
||||
gst_caps_get_name
|
||||
gst_caps_set_mime
|
||||
gst_caps_set_type_id
|
||||
gst_caps_get_type_id
|
||||
gst_caps_get_mime
|
||||
gst_caps_set_name
|
||||
gst_caps_set_props
|
||||
gst_caps_get_props
|
||||
gst_caps_check_compatibility
|
||||
|
|
|
@ -32,3 +32,23 @@ the offset.
|
|||
@GST_ASYNCDISKSRC_OPEN:
|
||||
@GST_ASYNCDISKSRC_FLAG_LAST:
|
||||
|
||||
<!-- ##### ARG GstAsyncDiskSrc:location ##### -->
|
||||
<para>
|
||||
Specify the location of the file to read.
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GstAsyncDiskSrc:bytesperread ##### -->
|
||||
<para>
|
||||
Specify how many bytes to read at a time.
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GstAsyncDiskSrc:offset ##### -->
|
||||
<para>
|
||||
Specify the current offset in the file.
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GstAsyncDiskSrc:size ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
|
|
@ -14,3 +14,32 @@ Output to a sound card via OSS.
|
|||
|
||||
</para>
|
||||
|
||||
<!-- ##### SIGNAL GstAudioSink::handoff ##### -->
|
||||
<para>
|
||||
The buffer is sent to the sound card.
|
||||
</para>
|
||||
|
||||
@gstaudiosink: the object which received the signal.
|
||||
<!-- # Unused Parameters # -->
|
||||
@arg1: the audiosink.
|
||||
|
||||
<!-- ##### ARG GstAudioSink:mute ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GstAudioSink:format ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GstAudioSink:channels ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GstAudioSink:frequency ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
|
|
@ -14,3 +14,28 @@ Create buffers from an OSS sound card.
|
|||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GstAudioSrc:bytes_per_read ##### -->
|
||||
<para>
|
||||
The number of bytes per read.
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GstAudioSrc:curoffset ##### -->
|
||||
<para>
|
||||
Get the current number of bytes read.
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GstAudioSrc:format ##### -->
|
||||
<para>
|
||||
The audio format as defined in soundcard.h
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GstAudioSrc:channels ##### -->
|
||||
<para>
|
||||
The number of channels (mono, stereo, ...)
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GstAudioSrc:frequency ##### -->
|
||||
<para>
|
||||
The frequency.
|
||||
</para>
|
||||
|
||||
|
|
|
@ -121,3 +121,12 @@ Flags for a bin
|
|||
@bin:
|
||||
|
||||
|
||||
<!-- ##### SIGNAL GstBin::object-added ##### -->
|
||||
<para>
|
||||
is signaled whenever a new <classname>GstElement</classname> is added to the <classname>GstBin</classname>
|
||||
|
||||
</para>
|
||||
|
||||
@gstbin: the object which received the signal.
|
||||
@arg1: the element that was added
|
||||
|
||||
|
|
|
@ -78,6 +78,60 @@ a mime-type and a set of properties.
|
|||
@count:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gst_caps_get_name ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@caps:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gst_caps_set_mime ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@caps:
|
||||
@mime:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gst_caps_set_type_id ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@caps:
|
||||
@typeid:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gst_caps_get_type_id ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@caps:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gst_caps_get_mime ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@caps:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gst_caps_set_name ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@caps:
|
||||
@name:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gst_caps_set_props ##### -->
|
||||
<para>
|
||||
|
||||
|
|
|
@ -33,3 +33,23 @@ with seeking capabilities use a <classname>GstAsynDiskSrc</classname> instead.
|
|||
@GST_DISKSRC_OPEN:
|
||||
@GST_DISKSRC_FLAG_LAST:
|
||||
|
||||
<!-- ##### ARG GstDiskSrc:location ##### -->
|
||||
<para>
|
||||
Specify the location of the file to read.
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GstDiskSrc:bytesperread ##### -->
|
||||
<para>
|
||||
Specify how many bytes to read at a time.
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GstDiskSrc:offset ##### -->
|
||||
<para>
|
||||
Get the current offset in the file.
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GstDiskSrc:size ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
|
|
@ -319,6 +319,17 @@ circumstances.
|
|||
@destpadname:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gst_element_disconnect ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@src:
|
||||
@srcpadname:
|
||||
@dest:
|
||||
@destpadname:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gst_element_set_state ##### -->
|
||||
<para>
|
||||
|
||||
|
@ -501,3 +512,44 @@ circumstances.
|
|||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### SIGNAL GstElement::state-change ##### -->
|
||||
<para>
|
||||
Is trigered whenever the state of an element changes
|
||||
</para>
|
||||
|
||||
@gstelement: the object which received the signal.
|
||||
@arg1: the new state of the object
|
||||
|
||||
<!-- ##### SIGNAL GstElement::new-pad ##### -->
|
||||
<para>
|
||||
Is trigered 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::new-ghost-pad ##### -->
|
||||
<para>
|
||||
|
||||
Is trigered whenever a new ghost pad is added to an element
|
||||
</para>
|
||||
|
||||
@gstelement: the object which received the signal.
|
||||
@arg1: the new ghost pad that was added
|
||||
|
||||
<!-- ##### SIGNAL GstElement::error ##### -->
|
||||
<para>
|
||||
Is trigered whenever an error occured
|
||||
|
||||
</para>
|
||||
|
||||
@gstelement: the object which received the signal.
|
||||
@arg1: the error message
|
||||
|
||||
<!-- ##### SIGNAL GstElement::eos ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gstelement: the object which received the signal.
|
||||
|
||||
|
|
|
@ -16,3 +16,15 @@ with the buffer. (fakesink)
|
|||
|
||||
</para>
|
||||
|
||||
<!-- ##### SIGNAL GstFakeSink::handoff ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gstfakesink: the object which received the signal.
|
||||
|
||||
<!-- ##### ARG GstFakeSink:num_sources ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
|
|
@ -14,3 +14,35 @@ The <classname>GstFakeSrc</classname> generates empty buffers. (fakesrc)
|
|||
|
||||
</para>
|
||||
|
||||
<!-- ##### SIGNAL GstFakeSrc::handoff ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gstfakesrc: the object which received the signal.
|
||||
|
||||
<!-- ##### ARG GstFakeSrc:num_sources ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GstFakeSrc:loop_based ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GstFakeSrc:output ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GstFakeSrc:patern ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GstFakeSrc:num_buffers ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
|
|
@ -14,3 +14,8 @@ Write data to a file descriptor.
|
|||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GstFdSink:fd ##### -->
|
||||
<para>
|
||||
The filedescriptor to write to.
|
||||
</para>
|
||||
|
||||
|
|
|
@ -14,3 +14,18 @@ Read buffers from a file descriptor.
|
|||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GstFdSrc:location ##### -->
|
||||
<para>
|
||||
The filedescriptor to read from. Pass the argument as a char* (???)
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GstFdSrc:bytesperread ##### -->
|
||||
<para>
|
||||
The number of bytes per read.
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GstFdSrc:offset ##### -->
|
||||
<para>
|
||||
Get the current offset in the file.
|
||||
</para>
|
||||
|
||||
|
|
|
@ -14,3 +14,14 @@ Reads data from a URL.
|
|||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GstHttpSrc:location ##### -->
|
||||
<para>
|
||||
Specify the location of the file. The location must be a fully qualified URL.
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GstHttpSrc:bytesperread ##### -->
|
||||
<para>
|
||||
Specify how many bytes to read at a time.
|
||||
|
||||
</para>
|
||||
|
||||
|
|
|
@ -14,3 +14,8 @@ Pass data without modification.
|
|||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GstIdentity:loop_based ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
|
|
@ -174,3 +174,11 @@ This macro releases a lock on the object.
|
|||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### SIGNAL GstObject::parent-set ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gstobject: the object which received the signal.
|
||||
@arg1: the new parent
|
||||
|
||||
|
|
|
@ -382,13 +382,14 @@ Destroy the pad
|
|||
@size:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gst_pad_handle_qos ##### -->
|
||||
<!-- ##### FUNCTION gst_pad_select ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@pad:
|
||||
@qos_message:
|
||||
@nextpad:
|
||||
@Varargs:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gst_pad_set_eos ##### -->
|
||||
|
@ -400,6 +401,24 @@ Destroy the pad
|
|||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gst_pad_eos_func ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@pad:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gst_pad_handle_qos ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@pad:
|
||||
@qos_message:
|
||||
|
||||
|
||||
<!-- ##### MACRO gst_pad_eos ##### -->
|
||||
<para>
|
||||
|
||||
|
@ -537,3 +556,8 @@ Indicates when this pad will become available
|
|||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### ARG GstPad:active ##### -->
|
||||
<para>
|
||||
Indicates this pad is active
|
||||
</para>
|
||||
|
||||
|
|
|
@ -15,3 +15,8 @@ buffers from its output.
|
|||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GstPipefilter:command ##### -->
|
||||
<para>
|
||||
Sets the command to be executed.
|
||||
</para>
|
||||
|
||||
|
|
|
@ -54,6 +54,33 @@ by the loader at statup.
|
|||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gst_plugin_set_name ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@plugin:
|
||||
@name:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gst_plugin_get_name ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@plugin:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gst_plugin_get_longname ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@plugin:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gst_plugin_set_longname ##### -->
|
||||
<para>
|
||||
|
||||
|
@ -63,6 +90,24 @@ by the loader at statup.
|
|||
@longname:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gst_plugin_get_filename ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@plugin:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gst_plugin_is_loaded ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@plugin:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gst_plugin_load_all ##### -->
|
||||
<para>
|
||||
|
||||
|
@ -132,6 +177,24 @@ by the loader at statup.
|
|||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gst_plugin_get_factory_list ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@plugin:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gst_plugin_get_type_list ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@plugin:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gst_plugin_find_elementfactory ##### -->
|
||||
<para>
|
||||
|
||||
|
|
|
@ -21,3 +21,19 @@ The default queue length is set to 10.
|
|||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GstQueue:level ##### -->
|
||||
<para>
|
||||
Get the number of buffers in the queue.
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GstQueue:max_level ##### -->
|
||||
<para>
|
||||
Specify the maximum number of buffers in the queue before the queue
|
||||
blocks.
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GstQueue:block ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -14,3 +14,23 @@ Create a sine wave of a given frequency and volume.
|
|||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GstSineSrc:volume ##### -->
|
||||
<para>
|
||||
The volume as a double 0.0 is silent, 1.0 is loudest.
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GstSineSrc:format ##### -->
|
||||
<para>
|
||||
The format ad defined in soundcard.h
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GstSineSrc:channels ##### -->
|
||||
<para>
|
||||
The number of channels.
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GstSineSrc:frequency ##### -->
|
||||
<para>
|
||||
The fequency.
|
||||
</para>
|
||||
|
||||
|
|
|
@ -43,3 +43,9 @@ thread flags
|
|||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### ARG GstThread:create_thread ##### -->
|
||||
<para>
|
||||
TRUE if the thread should be created.
|
||||
|
||||
</para>
|
||||
|
||||
|
|
|
@ -15,3 +15,16 @@ the detected mime type of the stream. It is used in autoplugging.
|
|||
|
||||
</para>
|
||||
|
||||
<!-- ##### SIGNAL GstTypeFind::have-type ##### -->
|
||||
<para>
|
||||
The signal to indicate the mime type was detected.
|
||||
</para>
|
||||
|
||||
@gsttypefind: the object which received the signal.
|
||||
@arg1: The mime type that was detected
|
||||
|
||||
<!-- ##### ARG GstTypeFind:caps ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
|
|
@ -12,7 +12,6 @@ sgml_files = gstreamer-manual.sgml \
|
|||
dynamic.sgml \
|
||||
elements.sgml \
|
||||
factories.sgml \
|
||||
ghostpads.sgml \
|
||||
goals.sgml \
|
||||
helloworld.sgml \
|
||||
helloworld2.sgml \
|
||||
|
|
|
@ -41,31 +41,119 @@
|
|||
</itemizedlist>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The application programmer can create custom bins packed with elements to perform a
|
||||
specific task. This allow you to write an MPEG audio decoder with just the follwing lines
|
||||
of code:
|
||||
|
||||
<sect1 id="sec-bin-create">
|
||||
<title>Creating a bin</title>
|
||||
<para>
|
||||
You create a bin with a specified name 'mybin' with:
|
||||
</para>
|
||||
<programlisting>
|
||||
|
||||
// create the mp3player element
|
||||
GstElement *mp3player = gst_elementfactory_make("mp3player","mp3player");
|
||||
// set the source mp3 audio file
|
||||
gtk_object_set(GTK_OBJECT(mp3player), "location", "helloworld.mp3", NULL);
|
||||
// tell the mp3player to prepare itself
|
||||
gst_element_set_state(GST_ELEMENT(mp3player),GST_STATE_READY);
|
||||
// start playback
|
||||
gst_element_set_state(GST_ELEMENT(mp3player),GST_STATE_PLAYING);
|
||||
...
|
||||
// pause playback
|
||||
gst_element_set_state(GST_ELEMENT(mp3player),GST_STATE_PAUSED);
|
||||
...
|
||||
// stop
|
||||
gst_element_set_state(GST_ELEMENT(mp3player),GST_STATE_NULL);
|
||||
GstElement *bin;
|
||||
|
||||
gst_bin_new ("mybin");
|
||||
...
|
||||
</programlisting>
|
||||
<para>
|
||||
A thread can be created with:
|
||||
</para>
|
||||
<programlisting>
|
||||
GstElement *thread;
|
||||
|
||||
gst_thread_new ("mythread");
|
||||
...
|
||||
</programlisting>
|
||||
<para>
|
||||
Pipelines are created with gst_pipeline_new ("name");
|
||||
</para>
|
||||
</sect1>
|
||||
|
||||
Custom bins can be created with a plugin or an XML description.
|
||||
</para>
|
||||
<sect1 id="sec-bin-adding">
|
||||
<title>Adding elements to a bin</title>
|
||||
<para>
|
||||
Elements are added to a bin with the following code sample:
|
||||
</para>
|
||||
<programlisting>
|
||||
GstElement *element;
|
||||
GstElement *bin;
|
||||
|
||||
bin = gst_bin_new ("mybin");
|
||||
|
||||
element = gst_elementfactory_make ("mpg123", "decoder");
|
||||
gst_bin_add (GST_BIN (bin), element);
|
||||
...
|
||||
</programlisting>
|
||||
<para>
|
||||
Bins and threads can be added to other bins too. This allows you to create nested
|
||||
bins.
|
||||
</para>
|
||||
<para>
|
||||
To get an element from the bin you can use:
|
||||
</para>
|
||||
<programlisting>
|
||||
GstElement *element;
|
||||
|
||||
element = gst_bin_get_by_name (GST_BIN (bin), "decoder");
|
||||
...
|
||||
</programlisting>
|
||||
<para>
|
||||
You can see that the name of the element becomes very handy for retrieving the
|
||||
element from an bin by using the elements name. gst_bin_get_by_name () will
|
||||
recursively search nested bins.
|
||||
</para>
|
||||
<para>
|
||||
To get a list of elements in a bin, use:
|
||||
</para>
|
||||
<programlisting>
|
||||
GList *elements;
|
||||
|
||||
elements = gst_bin_get_list (GST_BIN (bin));
|
||||
|
||||
while (elements) {
|
||||
GstElement *element = GST_ELEMENT (elements->data);
|
||||
|
||||
g_print ("element in bin: %s\n", gst_element_get_name (element));
|
||||
|
||||
elements = g_list_next (elements);
|
||||
}
|
||||
...
|
||||
</programlisting>
|
||||
<para>
|
||||
To remove an element from a bin use:
|
||||
</para>
|
||||
<programlisting>
|
||||
GstElement *element;
|
||||
|
||||
gst_bin_remove (GST_BIN (bin), element);
|
||||
...
|
||||
</programlisting>
|
||||
</sect1>
|
||||
|
||||
<sect1 id="sec-bin-custom">
|
||||
<title>Custom bins</title>
|
||||
<para>
|
||||
The application programmer can create custom bins packed with elements to perform a
|
||||
specific task. This allow you to write an MPEG audio decoder with just the follwing lines
|
||||
of code:
|
||||
|
||||
<programlisting>
|
||||
|
||||
// create the mp3player element
|
||||
GstElement *mp3player = gst_elementfactory_make("mp3player","mp3player");
|
||||
// set the source mp3 audio file
|
||||
gtk_object_set(GTK_OBJECT(mp3player), "location", "helloworld.mp3", NULL);
|
||||
// start playback
|
||||
gst_element_set_state(GST_ELEMENT(mp3player),GST_STATE_PLAYING);
|
||||
...
|
||||
// pause playback
|
||||
gst_element_set_state(GST_ELEMENT(mp3player),GST_STATE_PAUSED);
|
||||
...
|
||||
// stop
|
||||
gst_element_set_state(GST_ELEMENT(mp3player),GST_STATE_NULL);
|
||||
</programlisting>
|
||||
|
||||
Custom bins can be created with a plugin or an XML description. You will find more
|
||||
information about creating custom bin in the Filter-Writers-Guide.
|
||||
</para>
|
||||
</sect1>
|
||||
|
||||
<sect1 id="sec-bin-ghostpads">
|
||||
<title>Ghostpads</title>
|
||||
|
@ -76,7 +164,8 @@
|
|||
<para>
|
||||
A ghostpad is a pad from some element in the bin that has been promoted to the bin.
|
||||
This way, the bin also has a pad. The bin becomes just another element with a pad and
|
||||
you can then use the bin just like any other element.
|
||||
you can then use the bin just like any other element. This is a very important feature
|
||||
for creating custom bins.
|
||||
</para>
|
||||
|
||||
<figure float="1" id="sec-bin-ghost-img">
|
||||
|
@ -87,6 +176,35 @@
|
|||
Above is a representation of a ghostpad. the sinkpad of element one is now also a pad
|
||||
of the bin.
|
||||
</para>
|
||||
<para>
|
||||
Ghostpads can actually be added to all <classname>GstElement</classname>s and not just
|
||||
<classname>GstBin</classname>s. Use the following code example to add a ghostpad to a bin:
|
||||
</para>
|
||||
<programlisting>
|
||||
GstElement *bin;
|
||||
GstElement *element;
|
||||
|
||||
element = gst_elementfactory_create ("mpg123", "decoder");
|
||||
bin = gst_bin_new ("mybin");
|
||||
|
||||
gst_bin_add (GST_BIN (bin), element);
|
||||
|
||||
gst_element_add_ghost_pad (bin, gst_element_get_pad (element, "sink"));
|
||||
|
||||
</programlisting>
|
||||
<para>
|
||||
In the above example, the bin now also has a pad: the pad called 'sink' of the
|
||||
given element. We can now, for example, connect the srcpad of a disksrc to the
|
||||
bin with:
|
||||
</para>
|
||||
<programlisting>
|
||||
GstElement *disksrc;
|
||||
|
||||
disksrc = gst_elementfactory_create ("disksrc", "disk_reader");
|
||||
|
||||
gst_element_connect (disksrc, "src", bin, "sink");
|
||||
...
|
||||
</programlisting>
|
||||
</sect1>
|
||||
|
||||
</chapter>
|
||||
|
|
|
@ -21,4 +21,41 @@
|
|||
audiocard. We will use this simple graph to construct an mpeg player later
|
||||
in this manual.
|
||||
</para>
|
||||
<para>
|
||||
You can connect two pads with:
|
||||
</para>
|
||||
<programlisting>
|
||||
GstPad *srcpad, *sinkpad;
|
||||
|
||||
srcpad = gst_element_get_pad (element1, "src");
|
||||
sinpad = gst_element_get_pad (element2, "sink");
|
||||
|
||||
// connect them
|
||||
gst_pad_connect (srcpad, sinkpad);
|
||||
....
|
||||
// and disconnect them
|
||||
gst_pad_disconnect (srcpad, sinkpad);
|
||||
|
||||
</programlisting>
|
||||
<para>
|
||||
A convenient shortcut for the above code is done with the gst_element_connect ()
|
||||
function:
|
||||
</para>
|
||||
<programlisting>
|
||||
|
||||
// connect them
|
||||
gst_element_connect (element1, "src", element2, "sink");
|
||||
....
|
||||
// and disconnect them
|
||||
gst_element_disconnect (element1, "src", element2, "sink");
|
||||
|
||||
</programlisting>
|
||||
<para>
|
||||
You can query if a pad is connected with GST_PAD_IS_CONNECTED (pad).
|
||||
</para>
|
||||
<para>
|
||||
To query for the <classname>GstPad</classname> this srcpad is connected to, use
|
||||
gst_pad_get_peer (srcpad).
|
||||
</para>
|
||||
|
||||
</chapter>
|
||||
|
|
|
@ -93,4 +93,53 @@
|
|||
</figure>
|
||||
</sect2>
|
||||
</sect1>
|
||||
<sect1 id="sec-elements-create">
|
||||
<title>Creating a GstElement</title>
|
||||
<para>
|
||||
GstElements are created from factories. To create an element, one has to get
|
||||
access the a <classname>GstElementFactory</classname> using a unique factoryname.
|
||||
</para>
|
||||
<para>
|
||||
The following code example is used to get a factory that can be used to create the
|
||||
mpg123 element, an mp3 decoder.
|
||||
</para>
|
||||
<programlisting>
|
||||
GstElementFactory *factory;
|
||||
|
||||
factory = gst_elementfactory_find ("mpg123");
|
||||
</programlisting>
|
||||
<para>
|
||||
Once you have the handle to the elementfactory, you can create a real element with
|
||||
the following code fragment:
|
||||
</para>
|
||||
<programlisting>
|
||||
GstElement *element;
|
||||
|
||||
element = gst_elementfactory_create (factory, "decoder");
|
||||
</programlisting>
|
||||
<para>
|
||||
gst_elementfactory_create () will use the elementfactory to create an element with the
|
||||
given name. The name of the element is something you can use later on to lookup the
|
||||
element in a bin, for example.
|
||||
</para>
|
||||
<para>
|
||||
A simple shortcut exists for creating an element from a factory. The following example
|
||||
creates an element, named "decoder" from the elementfactory named "mpg123". This
|
||||
convenient function is most widly used to create an element.
|
||||
</para>
|
||||
<programlisting>
|
||||
GstElement *element;
|
||||
|
||||
element = gst_elementfactory_make ("mpg123", "decoder");
|
||||
</programlisting>
|
||||
<para>
|
||||
An element can be destroyed with:
|
||||
</para>
|
||||
<programlisting>
|
||||
GstElement *element;
|
||||
|
||||
...
|
||||
gst_element_destroy (element);
|
||||
</programlisting>
|
||||
</sect1>
|
||||
</chapter>
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
<chapter id="cha-ghostpads">
|
||||
<title>Ghostpads</title>
|
||||
<para>
|
||||
</para>
|
||||
|
||||
</chapter>
|
|
@ -18,7 +18,6 @@
|
|||
<!ENTITY QUEUES SYSTEM "queues.sgml">
|
||||
<!ENTITY COTHREADS SYSTEM "cothreads.sgml">
|
||||
<!ENTITY DYNAMIC SYSTEM "dynamic.sgml">
|
||||
<!ENTITY GHOSTPADS SYSTEM "ghostpads.sgml">
|
||||
<!ENTITY TYPEDETECTION SYSTEM "typedetection.sgml">
|
||||
<!ENTITY UTILITY SYSTEM "utility.sgml">
|
||||
|
||||
|
@ -98,6 +97,8 @@
|
|||
<!-- ############ Basic concepts - chapter ############# -->
|
||||
&ELEMENTS;
|
||||
|
||||
&PLUGINS;
|
||||
|
||||
&PADS;
|
||||
|
||||
&CONNECTIONS;
|
||||
|
@ -107,6 +108,7 @@
|
|||
&BUFFERS;
|
||||
|
||||
&STATES;
|
||||
|
||||
</part>
|
||||
<!-- ############ Building Apps - part ############# -->
|
||||
|
||||
|
@ -151,8 +153,6 @@
|
|||
|
||||
&DYNAMIC;
|
||||
|
||||
&GHOSTPADS;
|
||||
|
||||
&TYPEDETECTION;
|
||||
|
||||
&UTILITY;
|
||||
|
@ -173,19 +173,6 @@
|
|||
&XML;
|
||||
</part>
|
||||
|
||||
<!-- ############ XML in GStreamer - part ############# -->
|
||||
|
||||
<part id="plugins"><title>plugin development in <application>GStreamer</application></title>
|
||||
|
||||
<partintro>
|
||||
<para>
|
||||
In this part we will describe how you can create a new plugin
|
||||
to be used in <application>GStreamer</application>.
|
||||
</para>
|
||||
</partintro>
|
||||
|
||||
&PLUGINS;
|
||||
</part>
|
||||
|
||||
<!-- ############ Appendices - part ############# -->
|
||||
|
||||
|
|
|
@ -138,7 +138,7 @@ main (int argc, char *argv[])
|
|||
bin = gst_bin_new ("bin");
|
||||
</programlisting>
|
||||
<para>
|
||||
We use the standard constructor for a bin: gst_bin_new ("
|
||||
We use the standard constructor for a bin: gst_bin_new ("name").
|
||||
</para>
|
||||
|
||||
<para>
|
||||
|
|
|
@ -9,6 +9,55 @@
|
|||
The description of this media type is done with capabilities (<classname>GstCaps</classname>)
|
||||
</para>
|
||||
|
||||
<sect1 id="sec-pads-get">
|
||||
<title>Getting pads from an element</title>
|
||||
<para>
|
||||
Once you have created an element, you can get one of its pads with:
|
||||
</para>
|
||||
<programlisting>
|
||||
GstPad *srcpad;
|
||||
...
|
||||
srcpad = gst_element_get_pad (element, "src");
|
||||
...
|
||||
</programlisting>
|
||||
<para>
|
||||
This function will get the pad named "src" from the given element.
|
||||
</para>
|
||||
<para>
|
||||
Alternatively, you can also request a GList of pads from the element. The following
|
||||
code example will print the names of all the pads of an element.
|
||||
</para>
|
||||
<programlisting>
|
||||
GList *pads;
|
||||
...
|
||||
pads = gst_element_get_pad_list (element);
|
||||
while (pads) {
|
||||
GstPad *pad = GST_PAD (pads->data);
|
||||
|
||||
g_print ("pad name %s\n", gst_pad_get_name (pad));
|
||||
|
||||
pads = g_list_next (pads);
|
||||
}
|
||||
...
|
||||
</programlisting>
|
||||
<sect2 id="sec-pads-functions">
|
||||
<title>Usefull pad functions</title>
|
||||
<para>
|
||||
You can get the name of a pad with gst_pad_get_name () and set its name with
|
||||
get_pad_set_name();
|
||||
</para>
|
||||
<para>
|
||||
gst_pad_get_direction (GstPad *pad) can be used to query if the pad is a sink
|
||||
or a src pad. Remember a src pad is a pad that can output data and a sink pad is
|
||||
one that accepts data.
|
||||
</para>
|
||||
<para>
|
||||
You can get the parent of the pad, this is the element that this pad belongs to,
|
||||
with get_pad_set_parent(GstPad *pad). This function will return a pointer to a
|
||||
GstObject.
|
||||
</para>
|
||||
</sect2>
|
||||
</sect1>
|
||||
<sect1 id="sec-pads-description">
|
||||
<title>Capabilities of a GstPad</title>
|
||||
<para>
|
||||
|
@ -136,6 +185,30 @@ Pads:
|
|||
</listitem>
|
||||
</itemizedlist>
|
||||
</sect2>
|
||||
<sect2 id="sec-pads-caps-get">
|
||||
<title>Getting the capabilities of a pad</title>
|
||||
<para>
|
||||
A pad can have a GList of capabilities attached to it. You can get the capabilities list
|
||||
with:
|
||||
</para>
|
||||
<programlisting>
|
||||
GList *caps;
|
||||
...
|
||||
caps = gst_pad_get_caps_list (pad);
|
||||
|
||||
g_print ("pad name %s\n", gst_pad_get_name (pad));
|
||||
|
||||
while (caps) {
|
||||
GstCaps *cap = (GstCaps *) caps->data;
|
||||
|
||||
g_print (" Capability name %s, MIME type\n", gst_caps_get_name (cap),
|
||||
gst_caps_get_mime (cap));
|
||||
|
||||
caps = g_list_next (caps);
|
||||
}
|
||||
...
|
||||
</programlisting>
|
||||
</sect2>
|
||||
|
||||
</sect1>
|
||||
</chapter>
|
||||
|
|
|
@ -1,6 +1,63 @@
|
|||
<chapter id="cha-plugins">
|
||||
<title>Plugin development</title>
|
||||
<title>What are Plugins</title>
|
||||
<para>
|
||||
A plugin is a shared library that contains at least one of the following items:
|
||||
</para>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>
|
||||
one or more elementfactories
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
one or more typedefinitions
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
<para>
|
||||
The plugins have one simple method: plugin_init () where all the elementfactories are
|
||||
created and the typedefinitions are registered.
|
||||
</para>
|
||||
<para>
|
||||
the plugins are maintained in the plugin system. Optionally, the typedefinitions and
|
||||
the elementfactories can be saved into an XML representation so that the plugin system
|
||||
does not have to load all available plugins in order to know their definition.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The basic plugin structure has the following fields:
|
||||
</para>
|
||||
<programlisting>
|
||||
struct _GstPlugin {
|
||||
gchar *name; /* name of the plugin */
|
||||
gchar *longname; /* long name of plugin */
|
||||
gchar *filename; /* filename it came from */
|
||||
|
||||
GList *types; /* list of types provided */
|
||||
gint numtypes;
|
||||
GList *elements; /* list of elements provided */
|
||||
gint numelements;
|
||||
|
||||
gboolean loaded; /* if the plugin is in memory */
|
||||
};
|
||||
</programlisting>
|
||||
|
||||
<para>
|
||||
You can query a GList of available plugins with:
|
||||
</para>
|
||||
<programlisting>
|
||||
GList *plugins;
|
||||
|
||||
plugins = gst_plugin_get_list ();
|
||||
|
||||
while (plugins) {
|
||||
GstPlugin *plugin = (GstPlugin *)plugins->data;
|
||||
|
||||
g_print ("plugin: %s\n", gst_plugin_get_name (plugin));
|
||||
|
||||
plugins = g_list_next (plugins);
|
||||
}
|
||||
</programlisting>
|
||||
</chapter>
|
||||
|
|
|
@ -15,6 +15,7 @@ $(manualname)/$(htmlname): $(sgml_files) $(png_files)
|
|||
else
|
||||
$(manualname)/$(htmlname): $(sgml_files)
|
||||
endif
|
||||
|
||||
if HAVE_DB2HTML
|
||||
db2html $(manualname).sgml
|
||||
else
|
||||
|
|
|
@ -1,21 +0,0 @@
|
|||
/* GStreamer
|
||||
* Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
|
||||
* 2000 Wim Taymans <wtay@chello.be>
|
||||
*
|
||||
* gstesdsink.c:
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
|
@ -1,76 +0,0 @@
|
|||
/* GStreamer
|
||||
* Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
|
||||
* 2000 Wim Taymans <wtay@chello.be>
|
||||
*
|
||||
* gstesdsink.h:
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __GST_ESDSINK_H__
|
||||
#define __GST_ESDSINK_H__
|
||||
|
||||
|
||||
#include <gst/gstfilter.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
#define GST_TYPE_ESDSINK \
|
||||
(gst_esdsink_get_type())
|
||||
#define GST_ESDSINK(obj) \
|
||||
(GTK_CHECK_CAST((obj),GST_TYPE_ESDSINK,GstEsdSink))
|
||||
#define GST_ESDSINK_CLASS(klass) \
|
||||
(GTK_CHECK_CLASS_CAST((klass),GST_TYPE_ESDSINK,GstEsdSinkClass))
|
||||
#define GST_IS_ESDSINK(obj) \
|
||||
(GTK_CHECK_TYPE((obj),GST_TYPE_ESDSINK))
|
||||
#define GST_IS_ESDSINK_CLASS(obj) \
|
||||
(GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_ESDSINK))
|
||||
|
||||
typedef struct _GstEsdSink GstEsdSink;
|
||||
typedef struct _GstEsdSinkClass GstEsdSinkClass;
|
||||
|
||||
struct _GstEsdSink {
|
||||
GstFilter filter;
|
||||
|
||||
GstPad *sinkpad;
|
||||
|
||||
/* soundcard state */
|
||||
|
||||
int fd;
|
||||
gint format;
|
||||
gint channels;
|
||||
gint frequency;
|
||||
};
|
||||
|
||||
struct _GstEsdSinkClass {
|
||||
GstFilterClass parent_class;
|
||||
|
||||
/* signals */
|
||||
void (*handoff) (GstElement *element,GstPad *pad);
|
||||
};
|
||||
|
||||
GtkType gst_esdsink_get_type(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
#endif /* __GST_ESDSINK_H__ */
|
|
@ -145,7 +145,7 @@ gst_bin_init (GstBin *bin)
|
|||
* Returns: new bin
|
||||
*/
|
||||
GstElement*
|
||||
gst_bin_new (gchar *name)
|
||||
gst_bin_new (const gchar *name)
|
||||
{
|
||||
return gst_elementfactory_make ("bin", name);
|
||||
}
|
||||
|
@ -391,7 +391,7 @@ gst_bin_real_destroy (GtkObject *object)
|
|||
*/
|
||||
GstElement*
|
||||
gst_bin_get_by_name (GstBin *bin,
|
||||
gchar *name)
|
||||
const gchar *name)
|
||||
{
|
||||
GList *children;
|
||||
GstElement *child;
|
||||
|
|
|
@ -109,7 +109,7 @@ struct __GstBinChain {
|
|||
|
||||
|
||||
GtkType gst_bin_get_type (void);
|
||||
GstElement* gst_bin_new (gchar *name);
|
||||
GstElement* gst_bin_new (const gchar *name);
|
||||
#define gst_bin_destroy(bin) gst_object_destroy(GST_OBJECT(bin))
|
||||
|
||||
/* add and remove elements from the bin */
|
||||
|
@ -120,7 +120,7 @@ void gst_bin_remove (GstBin *bin,
|
|||
|
||||
/* retrieve a single element or the list of children */
|
||||
GstElement* gst_bin_get_by_name (GstBin *bin,
|
||||
gchar *name);
|
||||
const gchar *name);
|
||||
GList* gst_bin_get_list (GstBin *bin);
|
||||
|
||||
void gst_bin_create_plan (GstBin *bin);
|
||||
|
|
110
gst/gstcaps.c
110
gst/gstcaps.c
|
@ -35,7 +35,7 @@ _gst_caps_initialize (void)
|
|||
}
|
||||
|
||||
static guint16
|
||||
get_type_for_mime (gchar *mime)
|
||||
get_type_for_mime (const gchar *mime)
|
||||
{
|
||||
guint16 typeid;
|
||||
|
||||
|
@ -62,7 +62,7 @@ get_type_for_mime (gchar *mime)
|
|||
* Returns: a new capability
|
||||
*/
|
||||
GstCaps*
|
||||
gst_caps_new (gchar *name, gchar *mime)
|
||||
gst_caps_new (const gchar *name, const gchar *mime)
|
||||
{
|
||||
GstCaps *caps;
|
||||
|
||||
|
@ -88,7 +88,7 @@ gst_caps_new (gchar *name, gchar *mime)
|
|||
* Returns: a new capability
|
||||
*/
|
||||
GstCaps*
|
||||
gst_caps_new_with_props (gchar *name, gchar *mime, GstProps *props)
|
||||
gst_caps_new_with_props (const gchar *name, const gchar *mime, GstProps *props)
|
||||
{
|
||||
GstCaps *caps;
|
||||
|
||||
|
@ -156,6 +156,110 @@ gst_caps_register_count (GstCapsFactory *factory, guint *counter)
|
|||
return caps;
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_caps_get_name:
|
||||
* @caps: the caps to get the name from
|
||||
*
|
||||
* get the name of a GstCaps structure
|
||||
*
|
||||
* Returns: The name of the caps
|
||||
*/
|
||||
const gchar*
|
||||
gst_caps_get_name (GstCaps *caps)
|
||||
{
|
||||
g_return_val_if_fail (caps != NULL, NULL);
|
||||
|
||||
return (const gchar *)caps->name;
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_caps_set_name:
|
||||
* @caps: the caps to set the name to
|
||||
* @name: the name to set
|
||||
*
|
||||
* set the name of a caps
|
||||
*/
|
||||
void
|
||||
gst_caps_set_name (GstCaps *caps, const gchar *name)
|
||||
{
|
||||
g_return_if_fail (caps != NULL);
|
||||
|
||||
if (caps->name)
|
||||
g_free (caps->name);
|
||||
|
||||
caps->name = g_strdup (name);
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_caps_get_mime:
|
||||
* @caps: the caps to get the mime type from
|
||||
*
|
||||
* get the mime type of the caps as a string
|
||||
*
|
||||
* Returns: The mime type of the caps
|
||||
*/
|
||||
const gchar*
|
||||
gst_caps_get_mime (GstCaps *caps)
|
||||
{
|
||||
GstType *type;
|
||||
|
||||
g_return_val_if_fail (caps != NULL, NULL);
|
||||
|
||||
type = gst_type_find_by_id (caps->id);
|
||||
|
||||
if (type)
|
||||
return type->mime;
|
||||
else
|
||||
return "unknown/unknown";
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_caps_set_mime:
|
||||
* @caps: the caps to set the mime type to
|
||||
* @mime: the mime type to attach to the caps
|
||||
*
|
||||
* set the mime type of the caps as a string
|
||||
*/
|
||||
void
|
||||
gst_caps_set_mime (GstCaps *caps, const gchar *mime)
|
||||
{
|
||||
g_return_if_fail (caps != NULL);
|
||||
g_return_if_fail (mime != NULL);
|
||||
|
||||
caps->id = get_type_for_mime (mime);
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_caps_get_type_id:
|
||||
* @caps: the caps to get the type id from
|
||||
*
|
||||
* get the type id of the caps
|
||||
*
|
||||
* Returns: The type id of the caps
|
||||
*/
|
||||
guint16
|
||||
gst_caps_get_type_id (GstCaps *caps)
|
||||
{
|
||||
g_return_val_if_fail (caps != NULL, 0);
|
||||
|
||||
return caps->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_caps_set_type_id:
|
||||
* @caps: the caps to set the type id to
|
||||
* @typeid: the type id to set
|
||||
*
|
||||
* set the type id of the caps
|
||||
*/
|
||||
void
|
||||
gst_caps_set_type_id (GstCaps *caps, guint16 typeid)
|
||||
{
|
||||
g_return_if_fail (caps != NULL);
|
||||
|
||||
caps->id = typeid;
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_caps_set_props:
|
||||
* @caps: the caps to attach the properties to
|
||||
|
|
|
@ -42,11 +42,20 @@ struct _GstCaps {
|
|||
/* initialize the subsystem */
|
||||
void _gst_caps_initialize (void);
|
||||
|
||||
GstCaps* gst_caps_new (gchar *name, gchar *mime);
|
||||
GstCaps* gst_caps_new_with_props (gchar *name, gchar *mime, GstProps *props);
|
||||
GstCaps* gst_caps_new (const gchar *name, const gchar *mime);
|
||||
GstCaps* gst_caps_new_with_props (const gchar *name, const gchar *mime, GstProps *props);
|
||||
GstCaps* gst_caps_register (GstCapsFactory *factory);
|
||||
GstCaps* gst_caps_register_count (GstCapsFactory *factory, guint *counter);
|
||||
|
||||
const gchar* gst_caps_get_name (GstCaps *caps);
|
||||
void gst_caps_set_name (GstCaps *caps, const gchar *name);
|
||||
|
||||
const gchar* gst_caps_get_mime (GstCaps *caps);
|
||||
void gst_caps_set_mime (GstCaps *caps, const gchar *mime);
|
||||
|
||||
guint16 gst_caps_get_type_id (GstCaps *caps);
|
||||
void gst_caps_set_type_id (GstCaps *caps, guint16 typeid);
|
||||
|
||||
GstCaps* gst_caps_set_props (GstCaps *caps, GstProps *props);
|
||||
GstProps* gst_caps_get_props (GstCaps *caps);
|
||||
|
||||
|
|
|
@ -231,7 +231,7 @@ gst_element_remove_ghost_pad (GstElement *element, GstPad *pad)
|
|||
* Returns: requested pad if found, otherwise NULL.
|
||||
*/
|
||||
GstPad*
|
||||
gst_element_get_pad (GstElement *element, gchar *name)
|
||||
gst_element_get_pad (GstElement *element, const gchar *name)
|
||||
{
|
||||
GList *walk;
|
||||
|
||||
|
@ -315,8 +315,8 @@ gst_element_get_padtemplate_list (GstElement *element)
|
|||
* parents, the connection fails.
|
||||
*/
|
||||
void
|
||||
gst_element_connect (GstElement *src, gchar *srcpadname,
|
||||
GstElement *dest, gchar *destpadname)
|
||||
gst_element_connect (GstElement *src, const gchar *srcpadname,
|
||||
GstElement *dest, const gchar *destpadname)
|
||||
{
|
||||
GstPad *srcpad,*destpad;
|
||||
GstObject *srcparent,*destparent;
|
||||
|
@ -355,6 +355,44 @@ gst_element_connect (GstElement *src, gchar *srcpadname,
|
|||
gst_pad_connect(srcpad,destpad);
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_element_disconnect:
|
||||
* @src: element containing source pad
|
||||
* @srcpadname: name of pad in source element
|
||||
* @dest: element containing destination pad
|
||||
* @destpadname: name of pad in destination element
|
||||
*
|
||||
* Disconnect the two named pads of the source and destination elements.
|
||||
*/
|
||||
void
|
||||
gst_element_disconnect (GstElement *src, const gchar *srcpadname,
|
||||
GstElement *dest, const gchar *destpadname)
|
||||
{
|
||||
GstPad *srcpad,*destpad;
|
||||
|
||||
g_return_if_fail (src != NULL);
|
||||
g_return_if_fail (GST_IS_ELEMENT(src));
|
||||
g_return_if_fail (srcpadname != NULL);
|
||||
g_return_if_fail (dest != NULL);
|
||||
g_return_if_fail (GST_IS_ELEMENT(dest));
|
||||
g_return_if_fail (destpadname != NULL);
|
||||
|
||||
/* obtain the pads requested */
|
||||
srcpad = gst_element_get_pad (src, srcpadname);
|
||||
if (srcpad == NULL) {
|
||||
GST_ERROR(src,"source element has no pad \"%s\"",srcpadname);
|
||||
return;
|
||||
}
|
||||
destpad = gst_element_get_pad (dest, destpadname);
|
||||
if (srcpad == NULL) {
|
||||
GST_ERROR(dest,"destination element has no pad \"%s\"",destpadname);
|
||||
return;
|
||||
}
|
||||
|
||||
/* we're satisified they can be disconnected, let's do it */
|
||||
gst_pad_disconnect(srcpad,destpad);
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_element_error:
|
||||
* @element: Element with the error
|
||||
|
@ -364,7 +402,7 @@ gst_element_connect (GstElement *src, gchar *srcpadname,
|
|||
* condition. It results in the "error" signal.
|
||||
*/
|
||||
void
|
||||
gst_element_error (GstElement *element, gchar *error)
|
||||
gst_element_error (GstElement *element, const gchar *error)
|
||||
{
|
||||
g_error("GstElement: error in element '%s': %s\n", element->name, error);
|
||||
|
||||
|
@ -484,7 +522,7 @@ gst_element_change_state (GstElement *element)
|
|||
* one.
|
||||
*/
|
||||
void
|
||||
gst_element_set_name (GstElement *element, gchar *name)
|
||||
gst_element_set_name (GstElement *element, const gchar *name)
|
||||
{
|
||||
g_return_if_fail (element != NULL);
|
||||
g_return_if_fail (GST_IS_ELEMENT (element));
|
||||
|
|
|
@ -183,21 +183,23 @@ GstElement* gst_element_new (void);
|
|||
void gst_element_set_loop_function (GstElement *element,
|
||||
GstElementLoopFunction loop);
|
||||
|
||||
void gst_element_set_name (GstElement *element, gchar *name);
|
||||
void gst_element_set_name (GstElement *element, const gchar *name);
|
||||
const gchar* gst_element_get_name (GstElement *element);
|
||||
|
||||
void gst_element_set_manager (GstElement *element, GstElement *manager);
|
||||
GstElement* gst_element_get_manager (GstElement *element);
|
||||
|
||||
void gst_element_add_pad (GstElement *element, GstPad *pad);
|
||||
GstPad* gst_element_get_pad (GstElement *element, gchar *name);
|
||||
GstPad* gst_element_get_pad (GstElement *element, const gchar *name);
|
||||
GList* gst_element_get_pad_list (GstElement *element);
|
||||
GList* gst_element_get_padtemplate_list (GstElement *element);
|
||||
void gst_element_add_ghost_pad (GstElement *element, GstPad *pad);
|
||||
void gst_element_remove_ghost_pad (GstElement *element, GstPad *pad);
|
||||
|
||||
void gst_element_connect (GstElement *src, gchar *srcpadname,
|
||||
GstElement *dest, gchar *destpadname);
|
||||
void gst_element_connect (GstElement *src, const gchar *srcpadname,
|
||||
GstElement *dest, const gchar *destpadname);
|
||||
void gst_element_disconnect (GstElement *src, const gchar *srcpadname,
|
||||
GstElement *dest, const gchar *destpadname);
|
||||
|
||||
void gst_element_signal_eos (GstElement *element);
|
||||
|
||||
|
@ -205,7 +207,7 @@ void gst_element_signal_eos (GstElement *element);
|
|||
/* called by the app to set the state of the element */
|
||||
gint gst_element_set_state (GstElement *element, GstElementState state);
|
||||
|
||||
void gst_element_error (GstElement *element, gchar *error);
|
||||
void gst_element_error (GstElement *element, const gchar *error);
|
||||
|
||||
GstElementFactory* gst_element_get_factory (GstElement *element);
|
||||
|
||||
|
@ -219,14 +221,14 @@ GstElement* gst_element_load_thyself (xmlNodePtr parent, GHashTable *elements);
|
|||
* factories stuff
|
||||
*
|
||||
**/
|
||||
GstElementFactory* gst_elementfactory_new (gchar *name,GtkType type,
|
||||
GstElementFactory* gst_elementfactory_new (const gchar *name,GtkType type,
|
||||
GstElementDetails *details);
|
||||
void gst_elementfactory_destroy (GstElementFactory *elementfactory);
|
||||
|
||||
void gst_elementfactory_add_padtemplate (GstElementFactory *elementfactory,
|
||||
GstPadTemplate *temp);
|
||||
|
||||
GstElementFactory* gst_elementfactory_find (gchar *name);
|
||||
GstElementFactory* gst_elementfactory_find (const gchar *name);
|
||||
GList* gst_elementfactory_get_list (void);
|
||||
|
||||
gboolean gst_elementfactory_can_src_caps (GstElementFactory *factory,
|
||||
|
@ -239,9 +241,9 @@ gboolean gst_elementfactory_can_sink_caps_list (GstElementFactory *factory,
|
|||
GList *caps);
|
||||
|
||||
GstElement* gst_elementfactory_create (GstElementFactory *factory,
|
||||
gchar *name);
|
||||
const gchar *name);
|
||||
/* FIXME this name is wrong, probably so is the one above it */
|
||||
GstElement* gst_elementfactory_make (gchar *factoryname, gchar *name);
|
||||
GstElement* gst_elementfactory_make (const gchar *factoryname, const gchar *name);
|
||||
|
||||
xmlNodePtr gst_elementfactory_save_thyself (GstElementFactory *factory, xmlNodePtr parent);
|
||||
GstElementFactory* gst_elementfactory_load_thyself (xmlNodePtr parent);
|
||||
|
|
|
@ -61,7 +61,7 @@ gst_elementfactory_destroy (GstElementFactory *elementfactory)
|
|||
* Returns: #GstElementFactory if found, NULL otherwise
|
||||
*/
|
||||
GstElementFactory*
|
||||
gst_elementfactory_find (gchar *name)
|
||||
gst_elementfactory_find (const gchar *name)
|
||||
{
|
||||
GList *walk;
|
||||
GstElementFactory *factory;
|
||||
|
@ -107,7 +107,7 @@ gst_elementfactory_get_list (void)
|
|||
* Returns: new elementfactory
|
||||
*/
|
||||
GstElementFactory*
|
||||
gst_elementfactory_new (gchar *name, GtkType type,
|
||||
gst_elementfactory_new (const gchar *name, GtkType type,
|
||||
GstElementDetails *details)
|
||||
{
|
||||
GstElementFactory *factory = g_new0(GstElementFactory, 1);
|
||||
|
@ -138,7 +138,7 @@ gst_elementfactory_new (gchar *name, GtkType type,
|
|||
*/
|
||||
GstElement *
|
||||
gst_elementfactory_create (GstElementFactory *factory,
|
||||
gchar *name)
|
||||
const gchar *name)
|
||||
{
|
||||
GstElement *element;
|
||||
GstElementClass *oclass;
|
||||
|
@ -184,7 +184,7 @@ gst_elementfactory_create (GstElementFactory *factory,
|
|||
* Returns: new #GstElement
|
||||
*/
|
||||
GstElement*
|
||||
gst_elementfactory_make (gchar *factoryname, gchar *name)
|
||||
gst_elementfactory_make (const gchar *factoryname, const gchar *name)
|
||||
{
|
||||
GstElementFactory *factory;
|
||||
GstElement *element;
|
||||
|
|
130
gst/gstplugin.c
130
gst/gstplugin.c
|
@ -158,7 +158,7 @@ gst_plugin_load_all(void)
|
|||
* Returns: whether the library was loaded or not
|
||||
*/
|
||||
gboolean
|
||||
gst_library_load (gchar *name)
|
||||
gst_library_load (const gchar *name)
|
||||
{
|
||||
gboolean res;
|
||||
GList *libraries = _gst_libraries;
|
||||
|
@ -173,7 +173,7 @@ gst_library_load (gchar *name)
|
|||
res = gst_plugin_load(name);
|
||||
|
||||
if (res) {
|
||||
_gst_libraries = g_list_prepend(_gst_libraries, name);
|
||||
_gst_libraries = g_list_prepend(_gst_libraries, g_strdup (name));
|
||||
}
|
||||
|
||||
return res;
|
||||
|
@ -205,7 +205,7 @@ gst_plugin_remove (GstPlugin *plugin)
|
|||
* Returns: whether the plugin was loaded or not
|
||||
*/
|
||||
gboolean
|
||||
gst_plugin_load (gchar *name)
|
||||
gst_plugin_load (const gchar *name)
|
||||
{
|
||||
GList *path;
|
||||
gchar *libspath;
|
||||
|
@ -244,7 +244,7 @@ gst_plugin_load (gchar *name)
|
|||
* Returns: whether or not the plugin loaded
|
||||
*/
|
||||
gboolean
|
||||
gst_plugin_load_absolute (gchar *name)
|
||||
gst_plugin_load_absolute (const gchar *name)
|
||||
{
|
||||
GModule *module;
|
||||
GstPluginInitFunc initfunc;
|
||||
|
@ -295,7 +295,7 @@ gst_plugin_load_absolute (gchar *name)
|
|||
* Returns: new plugin
|
||||
*/
|
||||
GstPlugin*
|
||||
gst_plugin_new (gchar *name)
|
||||
gst_plugin_new (const gchar *name)
|
||||
{
|
||||
GstPlugin *plugin;
|
||||
|
||||
|
@ -316,6 +316,40 @@ gst_plugin_new (gchar *name)
|
|||
return plugin;
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_plugin_get_name:
|
||||
* @plugin: plugin to get the name of
|
||||
*
|
||||
* Get the short name of the plugin
|
||||
*
|
||||
* Returns: the name of the plugin
|
||||
*/
|
||||
const gchar*
|
||||
gst_plugin_get_name (GstPlugin *plugin)
|
||||
{
|
||||
g_return_val_if_fail (plugin != NULL, NULL);
|
||||
|
||||
return plugin->name;
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_plugin_set_name:
|
||||
* @plugin: plugin to set name of
|
||||
* @name: new name
|
||||
*
|
||||
* Sets the name (should be short) of the plugin.
|
||||
*/
|
||||
void
|
||||
gst_plugin_set_name (GstPlugin *plugin, const gchar *name)
|
||||
{
|
||||
g_return_if_fail (plugin != NULL);
|
||||
|
||||
if (plugin->name)
|
||||
g_free (plugin->name);
|
||||
|
||||
plugin->name = g_strdup (name);
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_plugin_set_longname:
|
||||
* @plugin: plugin to set long name of
|
||||
|
@ -324,14 +358,65 @@ gst_plugin_new (gchar *name)
|
|||
* Sets the long name (should be descriptive) of the plugin.
|
||||
*/
|
||||
void
|
||||
gst_plugin_set_longname (GstPlugin *plugin, gchar *longname)
|
||||
gst_plugin_set_longname (GstPlugin *plugin, const gchar *longname)
|
||||
{
|
||||
g_return_if_fail(plugin != NULL);
|
||||
|
||||
if (plugin->longname) g_free(plugin->longname);
|
||||
if (plugin->longname)
|
||||
g_free(plugin->longname);
|
||||
|
||||
plugin->longname = g_strdup(longname);
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_plugin_get_longname:
|
||||
* @plugin: plugin to get long name of
|
||||
*
|
||||
* Get the long descriptive name of the plugin
|
||||
*
|
||||
* Returns: the long name of the plugin
|
||||
*/
|
||||
const gchar*
|
||||
gst_plugin_get_longname (GstPlugin *plugin)
|
||||
{
|
||||
g_return_val_if_fail (plugin != NULL, NULL);
|
||||
|
||||
return plugin->longname;
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_plugin_get_filename:
|
||||
* @plugin: plugin to get the filename of
|
||||
*
|
||||
* get the filename of the plugin
|
||||
*
|
||||
* Returns: the filename of the plugin
|
||||
*/
|
||||
const gchar*
|
||||
gst_plugin_get_filename (GstPlugin *plugin)
|
||||
{
|
||||
g_return_val_if_fail (plugin != NULL, NULL);
|
||||
|
||||
return plugin->filename;
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_plugin_is_loaded:
|
||||
* @plugin: plugin to query
|
||||
*
|
||||
* queries if the plugin is loaded into memory
|
||||
*
|
||||
* Returns: TRUE is loaded, FALSE otherwise
|
||||
*/
|
||||
gboolean
|
||||
gst_plugin_is_loaded (GstPlugin *plugin)
|
||||
{
|
||||
g_return_val_if_fail (plugin != NULL, FALSE);
|
||||
|
||||
return plugin->loaded;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* gst_plugin_find:
|
||||
* @name: name of plugin to find
|
||||
|
@ -369,7 +454,7 @@ gst_plugin_find (const gchar *name)
|
|||
* Returns: @GstElementFactory if found, NULL if not
|
||||
*/
|
||||
GstElementFactory*
|
||||
gst_plugin_find_elementfactory (gchar *name)
|
||||
gst_plugin_find_elementfactory (const gchar *name)
|
||||
{
|
||||
GList *plugins, *factories;
|
||||
GstElementFactory *factory;
|
||||
|
@ -400,7 +485,7 @@ gst_plugin_find_elementfactory (gchar *name)
|
|||
* Returns: @GstElementFactory if loaded, NULL if not
|
||||
*/
|
||||
GstElementFactory*
|
||||
gst_plugin_load_elementfactory (gchar *name)
|
||||
gst_plugin_load_elementfactory (const gchar *name)
|
||||
{
|
||||
GList *plugins, *factories;
|
||||
GstElementFactory *factory = NULL;
|
||||
|
@ -447,7 +532,7 @@ gst_plugin_load_elementfactory (gchar *name)
|
|||
* Load a registered typefactory by mime type.
|
||||
*/
|
||||
void
|
||||
gst_plugin_load_typefactory (gchar *mime)
|
||||
gst_plugin_load_typefactory (const gchar *mime)
|
||||
{
|
||||
GList *plugins, *factories;
|
||||
GstTypeFactory *factory;
|
||||
|
@ -649,9 +734,34 @@ gst_plugin_load_thyself (xmlNodePtr parent)
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* gst_plugin_get_factory_list:
|
||||
* @plugin: the plugin to get the factories from
|
||||
*
|
||||
* get a list of all the factories that this plugin provides
|
||||
*
|
||||
* Returns: a GList of factories
|
||||
*/
|
||||
GList*
|
||||
gst_plugin_get_factory_list (GstPlugin *plugin)
|
||||
{
|
||||
g_return_val_if_fail (plugin != NULL, NULL);
|
||||
|
||||
return plugin->elements;
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_plugin_get_type_list:
|
||||
* @plugin: the plugin to get the typefactories from
|
||||
*
|
||||
* get a list of all the typefactories that this plugin provides
|
||||
*
|
||||
* Returns: a GList of factories
|
||||
*/
|
||||
GList*
|
||||
gst_plugin_get_type_list (GstPlugin *plugin)
|
||||
{
|
||||
g_return_val_if_fail (plugin != NULL, NULL);
|
||||
|
||||
return plugin->types;
|
||||
}
|
||||
|
|
|
@ -52,25 +52,34 @@ typedef GstPlugin* (*GstPluginInitFunc) (GModule *module);
|
|||
|
||||
void _gst_plugin_initialize (void);
|
||||
|
||||
GstPlugin* gst_plugin_new (gchar *name);
|
||||
void gst_plugin_set_longname (GstPlugin *plugin, gchar *longname);
|
||||
GstPlugin* gst_plugin_new (const gchar *name);
|
||||
|
||||
const gchar* gst_plugin_get_name (GstPlugin *plugin);
|
||||
void gst_plugin_set_name (GstPlugin *plugin, const gchar *name);
|
||||
const gchar* gst_plugin_get_longname (GstPlugin *plugin);
|
||||
void gst_plugin_set_longname (GstPlugin *plugin, const gchar *longname);
|
||||
|
||||
const gchar* gst_plugin_get_filename (GstPlugin *plugin);
|
||||
gboolean gst_plugin_is_loaded (GstPlugin *plugin);
|
||||
|
||||
GList* gst_plugin_get_type_list (GstPlugin *plugin);
|
||||
GList* gst_plugin_get_factory_list (GstPlugin *plugin);
|
||||
|
||||
void gst_plugin_load_all (void);
|
||||
gboolean gst_plugin_load (gchar *name);
|
||||
gboolean gst_plugin_load_absolute (gchar *name);
|
||||
gboolean gst_library_load (gchar *name);
|
||||
gboolean gst_plugin_load (const gchar *name);
|
||||
gboolean gst_plugin_load_absolute (const gchar *name);
|
||||
gboolean gst_library_load (const gchar *name);
|
||||
|
||||
void gst_plugin_add_factory (GstPlugin *plugin, GstElementFactory *factory);
|
||||
void gst_plugin_add_type (GstPlugin *plugin, GstTypeFactory *factory);
|
||||
GList* gst_plugin_get_factory_list (GstPlugin *plugin);
|
||||
|
||||
GstPlugin* gst_plugin_find (const gchar *name);
|
||||
GList* gst_plugin_get_list (void);
|
||||
|
||||
GstElementFactory* gst_plugin_find_elementfactory (gchar *name);
|
||||
GstElementFactory* gst_plugin_find_elementfactory (const gchar *name);
|
||||
|
||||
GstElementFactory* gst_plugin_load_elementfactory (gchar *name);
|
||||
void gst_plugin_load_typefactory (gchar *mime);
|
||||
GstElementFactory* gst_plugin_load_elementfactory (const gchar *name);
|
||||
void gst_plugin_load_typefactory (const gchar *mime);
|
||||
|
||||
xmlNodePtr gst_plugin_save_thyself (xmlNodePtr parent);
|
||||
void gst_plugin_load_thyself (xmlNodePtr parent);
|
||||
|
|
|
@ -97,7 +97,7 @@ gst_type_register (GstTypeFactory *factory)
|
|||
}
|
||||
|
||||
static
|
||||
guint16 gst_type_find_by_mime_func (gchar *mime)
|
||||
guint16 gst_type_find_by_mime_func (const gchar *mime)
|
||||
{
|
||||
GList *walk;
|
||||
GstType *type;
|
||||
|
@ -143,7 +143,7 @@ guint16 gst_type_find_by_mime_func (gchar *mime)
|
|||
* Returns: the type id
|
||||
*/
|
||||
guint16
|
||||
gst_type_find_by_mime (gchar *mime)
|
||||
gst_type_find_by_mime (const gchar *mime)
|
||||
{
|
||||
return gst_type_find_by_mime_func (mime);
|
||||
}
|
||||
|
@ -157,7 +157,7 @@ gst_type_find_by_mime (gchar *mime)
|
|||
* Returns: the type id
|
||||
*/
|
||||
guint16
|
||||
gst_type_find_by_ext (gchar *ext)
|
||||
gst_type_find_by_ext (const gchar *ext)
|
||||
{
|
||||
//FIXME
|
||||
g_warning ("gsttype: find_by_ext not implemented");
|
||||
|
|
|
@ -58,8 +58,8 @@ void _gst_type_initialize (void);
|
|||
guint16 gst_type_register (GstTypeFactory *factory);
|
||||
|
||||
/* look up a type by mime or extension */
|
||||
guint16 gst_type_find_by_mime (gchar *mime);
|
||||
guint16 gst_type_find_by_ext (gchar *ext);
|
||||
guint16 gst_type_find_by_mime (const gchar *mime);
|
||||
guint16 gst_type_find_by_ext (const gchar *ext);
|
||||
|
||||
/* get GstType by id */
|
||||
GstType* gst_type_find_by_id (guint16 id);
|
||||
|
|
|
@ -1,21 +0,0 @@
|
|||
/* GStreamer
|
||||
* Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
|
||||
* 2000 Wim Taymans <wtay@chello.be>
|
||||
*
|
||||
* gstesdsink.c:
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
|
@ -1,76 +0,0 @@
|
|||
/* GStreamer
|
||||
* Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
|
||||
* 2000 Wim Taymans <wtay@chello.be>
|
||||
*
|
||||
* gstesdsink.h:
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __GST_ESDSINK_H__
|
||||
#define __GST_ESDSINK_H__
|
||||
|
||||
|
||||
#include <gst/gstfilter.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
#define GST_TYPE_ESDSINK \
|
||||
(gst_esdsink_get_type())
|
||||
#define GST_ESDSINK(obj) \
|
||||
(GTK_CHECK_CAST((obj),GST_TYPE_ESDSINK,GstEsdSink))
|
||||
#define GST_ESDSINK_CLASS(klass) \
|
||||
(GTK_CHECK_CLASS_CAST((klass),GST_TYPE_ESDSINK,GstEsdSinkClass))
|
||||
#define GST_IS_ESDSINK(obj) \
|
||||
(GTK_CHECK_TYPE((obj),GST_TYPE_ESDSINK))
|
||||
#define GST_IS_ESDSINK_CLASS(obj) \
|
||||
(GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_ESDSINK))
|
||||
|
||||
typedef struct _GstEsdSink GstEsdSink;
|
||||
typedef struct _GstEsdSinkClass GstEsdSinkClass;
|
||||
|
||||
struct _GstEsdSink {
|
||||
GstFilter filter;
|
||||
|
||||
GstPad *sinkpad;
|
||||
|
||||
/* soundcard state */
|
||||
|
||||
int fd;
|
||||
gint format;
|
||||
gint channels;
|
||||
gint frequency;
|
||||
};
|
||||
|
||||
struct _GstEsdSinkClass {
|
||||
GstFilterClass parent_class;
|
||||
|
||||
/* signals */
|
||||
void (*handoff) (GstElement *element,GstPad *pad);
|
||||
};
|
||||
|
||||
GtkType gst_esdsink_get_type(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
#endif /* __GST_ESDSINK_H__ */
|
Loading…
Reference in a new issue