mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-26 10:10:32 +00:00
Lots of updates to the plugins for caps negotiation.
Original commit message from CVS: Lots of updates to the plugins for caps negotiation. Added YUY2 output to the win32 dlls. Added a colorspace converter in gstplay
This commit is contained in:
parent
406541cec0
commit
335080574f
20 changed files with 373 additions and 220 deletions
|
@ -7,6 +7,7 @@ INCLUDES = -I$(top_srcdir)/gst \
|
||||||
-DGNOMELOCALEDIR=\""$(datadir)/locale"\" \
|
-DGNOMELOCALEDIR=\""$(datadir)/locale"\" \
|
||||||
-DDATADIR=\""$(datadir)"\" \
|
-DDATADIR=\""$(datadir)"\" \
|
||||||
-I$(includedir) \
|
-I$(includedir) \
|
||||||
|
$(shell gnome-config --cflags gnome gnomeui bonobo bonobox) \
|
||||||
$(BONOBOX_TEST_CFLAGS) -Wall -O2
|
$(BONOBOX_TEST_CFLAGS) -Wall -O2
|
||||||
|
|
||||||
bin_PROGRAMS = bonobo-gstmediaplay
|
bin_PROGRAMS = bonobo-gstmediaplay
|
||||||
|
@ -15,14 +16,15 @@ bonobo_gstmediaplay_SOURCES = \
|
||||||
bonobo-gstmediaplay.c
|
bonobo-gstmediaplay.c
|
||||||
|
|
||||||
bonobo_gstmediaplay_CFLAGS = -Wall -O2 \
|
bonobo_gstmediaplay_CFLAGS = -Wall -O2 \
|
||||||
$(shell gnome-config --cflags gnomeui bonobo bonobox) $(shell libglade-config --cflags gnome) \
|
$(shell gnome-config --cflags gnome gnomeui bonobo bonobox) $(shell libglade-config --cflags gnome) \
|
||||||
$(shell gstreamer-config --clfags )
|
$(shell gstreamer-config --clfags )
|
||||||
|
|
||||||
bonobo_gstmediaplay_LDADD = \
|
bonobo_gstmediaplay_LDADD = \
|
||||||
$(top_srcdir)/gstplay/libgstmediaplay.la
|
$(top_srcdir)/gstplay/libgstmediaplay.la \
|
||||||
|
$(top_srcdir)/gst/libgst.la
|
||||||
|
|
||||||
bonobo_gstmediaplay_LDFLAGS = \
|
bonobo_gstmediaplay_LDFLAGS = \
|
||||||
$(shell gnome-config --libs gnomeui bonobo bonobox) $(shell libglade-config --libs gnome) \
|
$(shell gnome-config --libs gnome gnomeui bonobo bonobox) $(shell libglade-config --libs gnome) \
|
||||||
$(shell gstreamer-config --libs )
|
$(shell gstreamer-config --libs )
|
||||||
|
|
||||||
oafdir = $(datadir)/oaf
|
oafdir = $(datadir)/oaf
|
||||||
|
|
|
@ -307,12 +307,16 @@ bonobo_gstmediaplay_factory (BonoboGenericFactory *this, void *data)
|
||||||
|
|
||||||
control_data->play = gst_play_new ();
|
control_data->play = gst_play_new ();
|
||||||
|
|
||||||
|
|
||||||
vbox = gtk_vbox_new (TRUE, 0);
|
vbox = gtk_vbox_new (TRUE, 0);
|
||||||
|
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), GTK_WIDGET (control_data->play),
|
gtk_box_pack_start (GTK_BOX (vbox), GTK_WIDGET (control_data->play),
|
||||||
TRUE, TRUE, 0);
|
TRUE, TRUE, 0);
|
||||||
gtk_widget_show_all (vbox);
|
gtk_widget_show_all (vbox);
|
||||||
|
|
||||||
|
gst_play_set_uri (control_data->play, "/opt/data/armageddon1.mpg");
|
||||||
|
gst_play_play (control_data->play);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Create the BonoboControl object.
|
* Create the BonoboControl object.
|
||||||
*/
|
*/
|
||||||
|
@ -403,6 +407,7 @@ init_server_factory (int argc, char **argv)
|
||||||
int
|
int
|
||||||
main (int argc, char **argv)
|
main (int argc, char **argv)
|
||||||
{
|
{
|
||||||
|
//g_thread_init (NULL);
|
||||||
/*
|
/*
|
||||||
* Setup the factory.
|
* Setup the factory.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -52,8 +52,7 @@ tmpl_sources = \
|
||||||
tmpl/gsttype.sgml \
|
tmpl/gsttype.sgml \
|
||||||
tmpl/gstutils.sgml \
|
tmpl/gstutils.sgml \
|
||||||
tmpl/gstxml.sgml \
|
tmpl/gstxml.sgml \
|
||||||
tmpl/spectrum.sgml \
|
tmpl/spectrum.sgml
|
||||||
tmpl/videoraw.sgml
|
|
||||||
|
|
||||||
gstreamer_docdir = $(HTML_DIR)
|
gstreamer_docdir = $(HTML_DIR)
|
||||||
gstreamer_doc_DATA = \
|
gstreamer_doc_DATA = \
|
||||||
|
|
|
@ -366,6 +366,8 @@ GstPadGetFunction
|
||||||
GstPadGetRegionFunction
|
GstPadGetRegionFunction
|
||||||
GstPadQoSFunction
|
GstPadQoSFunction
|
||||||
GstPadEOSFunction
|
GstPadEOSFunction
|
||||||
|
GstPadNewCapsFunction
|
||||||
|
|
||||||
|
|
||||||
GstPadNegotiateReturn
|
GstPadNegotiateReturn
|
||||||
GstPadNegotiateFunction
|
GstPadNegotiateFunction
|
||||||
|
@ -388,6 +390,7 @@ gst_pad_set_getregion_function
|
||||||
gst_pad_set_negotiate_function
|
gst_pad_set_negotiate_function
|
||||||
gst_pad_set_qos_function
|
gst_pad_set_qos_function
|
||||||
gst_pad_set_eos_function
|
gst_pad_set_eos_function
|
||||||
|
gst_pad_set_newcaps_function
|
||||||
gst_pad_set_caps
|
gst_pad_set_caps
|
||||||
gst_pad_get_caps
|
gst_pad_get_caps
|
||||||
gst_pad_check_compatibility
|
gst_pad_check_compatibility
|
||||||
|
@ -435,6 +438,7 @@ GST_RPAD_PULLREGIONFUNC
|
||||||
GST_RPAD_QOSFUNC
|
GST_RPAD_QOSFUNC
|
||||||
GST_RPAD_EOSFUNC
|
GST_RPAD_EOSFUNC
|
||||||
GST_RPAD_NEGOTIATEFUNC
|
GST_RPAD_NEGOTIATEFUNC
|
||||||
|
GST_RPAD_NEWCAPSFUNC
|
||||||
|
|
||||||
GST_GPAD_REALPAD
|
GST_GPAD_REALPAD
|
||||||
GstGhostPad
|
GstGhostPad
|
||||||
|
|
|
@ -155,6 +155,15 @@ The function that will be called in an EOS case.
|
||||||
@Returns: TRUE if EOS was successful, FALSE otherwise
|
@Returns: TRUE if EOS was successful, FALSE otherwise
|
||||||
|
|
||||||
|
|
||||||
|
<!-- ##### USER_FUNCTION GstPadNewCapsFunction ##### -->
|
||||||
|
<para>
|
||||||
|
|
||||||
|
</para>
|
||||||
|
|
||||||
|
@pad:
|
||||||
|
@caps:
|
||||||
|
|
||||||
|
|
||||||
<!-- ##### ENUM GstPadNegotiateReturn ##### -->
|
<!-- ##### ENUM GstPadNegotiateReturn ##### -->
|
||||||
<para>
|
<para>
|
||||||
The possible results from padnegotiation.
|
The possible results from padnegotiation.
|
||||||
|
@ -171,8 +180,10 @@ The function that will be called when negotiating.
|
||||||
|
|
||||||
@pad: The pad that is being negotiated
|
@pad: The pad that is being negotiated
|
||||||
@caps: The current caps that are being negotiated
|
@caps: The current caps that are being negotiated
|
||||||
@count: A counter to keep track of the negotiation process
|
@data:
|
||||||
@Returns: The result of the negotiation process
|
@Returns: The result of the negotiation process
|
||||||
|
<!-- # Unused Parameters # -->
|
||||||
|
@count: A counter to keep track of the negotiation process
|
||||||
|
|
||||||
|
|
||||||
<!-- ##### USER_FUNCTION GstPadPushFunction ##### -->
|
<!-- ##### USER_FUNCTION GstPadPushFunction ##### -->
|
||||||
|
@ -329,6 +340,15 @@ Destroy the pad.
|
||||||
@eos:
|
@eos:
|
||||||
|
|
||||||
|
|
||||||
|
<!-- ##### FUNCTION gst_pad_set_newcaps_function ##### -->
|
||||||
|
<para>
|
||||||
|
|
||||||
|
</para>
|
||||||
|
|
||||||
|
@pad:
|
||||||
|
@newcaps:
|
||||||
|
|
||||||
|
|
||||||
<!-- ##### FUNCTION gst_pad_set_caps ##### -->
|
<!-- ##### FUNCTION gst_pad_set_caps ##### -->
|
||||||
<para>
|
<para>
|
||||||
|
|
||||||
|
@ -556,9 +576,9 @@ Call the EOS function of the pad
|
||||||
@srcpad:
|
@srcpad:
|
||||||
@destpad:
|
@destpad:
|
||||||
@caps:
|
@caps:
|
||||||
@counter:
|
|
||||||
@Returns:
|
@Returns:
|
||||||
<!-- # Unused Parameters # -->
|
<!-- # Unused Parameters # -->
|
||||||
|
@counter:
|
||||||
@count:
|
@count:
|
||||||
|
|
||||||
|
|
||||||
|
@ -636,6 +656,7 @@ Call the EOS function of the pad
|
||||||
@pullfunc:
|
@pullfunc:
|
||||||
@pullregionfunc:
|
@pullregionfunc:
|
||||||
@negotiatefunc:
|
@negotiatefunc:
|
||||||
|
@newcapsfunc:
|
||||||
@ghostpads:
|
@ghostpads:
|
||||||
|
|
||||||
<!-- ##### MACRO GST_RPAD_DIRECTION ##### -->
|
<!-- ##### MACRO GST_RPAD_DIRECTION ##### -->
|
||||||
|
@ -742,6 +763,14 @@ Get the EOS function of the real pad.
|
||||||
@pad:
|
@pad:
|
||||||
|
|
||||||
|
|
||||||
|
<!-- ##### MACRO GST_RPAD_NEWCAPSFUNC ##### -->
|
||||||
|
<para>
|
||||||
|
|
||||||
|
</para>
|
||||||
|
|
||||||
|
@pad:
|
||||||
|
|
||||||
|
|
||||||
<!-- ##### MACRO GST_GPAD_REALPAD ##### -->
|
<!-- ##### MACRO GST_GPAD_REALPAD ##### -->
|
||||||
<para>
|
<para>
|
||||||
Get the real pad of this ghost pad.
|
Get the real pad of this ghost pad.
|
||||||
|
|
|
@ -67,14 +67,6 @@ Query the element for the current mime type
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
|
||||||
<!-- ##### FUNCTION gst_pad_remove_ghost_parent ##### -->
|
|
||||||
<para>
|
|
||||||
|
|
||||||
</para>
|
|
||||||
|
|
||||||
@pad:
|
|
||||||
@parent:
|
|
||||||
|
|
||||||
<!-- ##### FUNCTION gst_fdsink_chain ##### -->
|
<!-- ##### FUNCTION gst_fdsink_chain ##### -->
|
||||||
<para>
|
<para>
|
||||||
|
|
||||||
|
@ -83,6 +75,14 @@ Query the element for the current mime type
|
||||||
@pad:
|
@pad:
|
||||||
@buf:
|
@buf:
|
||||||
|
|
||||||
|
<!-- ##### FUNCTION gst_pad_remove_ghost_parent ##### -->
|
||||||
|
<para>
|
||||||
|
|
||||||
|
</para>
|
||||||
|
|
||||||
|
@pad:
|
||||||
|
@parent:
|
||||||
|
|
||||||
<!-- ##### FUNCTION gst_identity_chain ##### -->
|
<!-- ##### FUNCTION gst_identity_chain ##### -->
|
||||||
<para>
|
<para>
|
||||||
|
|
||||||
|
@ -91,6 +91,14 @@ Query the element for the current mime type
|
||||||
@pad:
|
@pad:
|
||||||
@buf:
|
@buf:
|
||||||
|
|
||||||
|
<!-- ##### FUNCTION gst_audiosink_chain ##### -->
|
||||||
|
<para>
|
||||||
|
|
||||||
|
</para>
|
||||||
|
|
||||||
|
@pad:
|
||||||
|
@buf:
|
||||||
|
|
||||||
<!-- ##### FUNCTION gst_connection_get_type ##### -->
|
<!-- ##### FUNCTION gst_connection_get_type ##### -->
|
||||||
<para>
|
<para>
|
||||||
|
|
||||||
|
@ -98,14 +106,6 @@ Query the element for the current mime type
|
||||||
|
|
||||||
@Returns:
|
@Returns:
|
||||||
|
|
||||||
<!-- ##### FUNCTION gst_audiosink_chain ##### -->
|
|
||||||
<para>
|
|
||||||
|
|
||||||
</para>
|
|
||||||
|
|
||||||
@pad:
|
|
||||||
@buf:
|
|
||||||
|
|
||||||
<!-- ##### MACRO GST_PIPELINE_CLASS ##### -->
|
<!-- ##### MACRO GST_PIPELINE_CLASS ##### -->
|
||||||
<para>
|
<para>
|
||||||
|
|
||||||
|
@ -349,16 +349,16 @@ subclass use this to start their flag enumeration
|
||||||
@audiosink:
|
@audiosink:
|
||||||
@channels:
|
@channels:
|
||||||
|
|
||||||
<!-- ##### SECTION ./tmpl/gstconnection.sgml:Short_Description ##### -->
|
|
||||||
Generic connection between elements.
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ##### STRUCT GstSinkClass ##### -->
|
<!-- ##### STRUCT GstSinkClass ##### -->
|
||||||
<para>
|
<para>
|
||||||
|
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- ##### SECTION ./tmpl/gstconnection.sgml:Short_Description ##### -->
|
||||||
|
Generic connection between elements.
|
||||||
|
|
||||||
|
|
||||||
<!-- ##### STRUCT GstFilterClass ##### -->
|
<!-- ##### STRUCT GstFilterClass ##### -->
|
||||||
<para>
|
<para>
|
||||||
|
|
||||||
|
@ -632,13 +632,13 @@ Specify the current offset in the file.
|
||||||
@sheight:
|
@sheight:
|
||||||
@bytes_per_line:
|
@bytes_per_line:
|
||||||
|
|
||||||
<!-- ##### SECTION ./tmpl/GstElement.sgml:Long_Description ##### -->
|
<!-- ##### ARG GstAudioSink:format ##### -->
|
||||||
<para>
|
<para>
|
||||||
|
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
|
||||||
<!-- ##### ARG GstAudioSink:format ##### -->
|
<!-- ##### SECTION ./tmpl/GstElement.sgml:Long_Description ##### -->
|
||||||
<para>
|
<para>
|
||||||
|
|
||||||
</para>
|
</para>
|
||||||
|
@ -672,24 +672,17 @@ Specify the current offset in the file.
|
||||||
@name:
|
@name:
|
||||||
@Returns:
|
@Returns:
|
||||||
|
|
||||||
<!-- ##### STRUCT GstConnection ##### -->
|
|
||||||
<para>
|
|
||||||
|
|
||||||
</para>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ##### STRUCT GstQueueClass ##### -->
|
<!-- ##### STRUCT GstQueueClass ##### -->
|
||||||
<para>
|
<para>
|
||||||
|
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
|
||||||
<!-- ##### FUNCTION gst_fakesrc_push ##### -->
|
<!-- ##### STRUCT GstConnection ##### -->
|
||||||
<para>
|
<para>
|
||||||
|
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@src:
|
|
||||||
|
|
||||||
<!-- ##### FUNCTION gst_type_add_sink ##### -->
|
<!-- ##### FUNCTION gst_type_add_sink ##### -->
|
||||||
<para>
|
<para>
|
||||||
|
@ -699,6 +692,13 @@ Specify the current offset in the file.
|
||||||
@id:
|
@id:
|
||||||
@sink:
|
@sink:
|
||||||
|
|
||||||
|
<!-- ##### FUNCTION gst_fakesrc_push ##### -->
|
||||||
|
<para>
|
||||||
|
|
||||||
|
</para>
|
||||||
|
|
||||||
|
@src:
|
||||||
|
|
||||||
<!-- ##### MACRO GST_IS_IDENTITY_CLASS ##### -->
|
<!-- ##### MACRO GST_IS_IDENTITY_CLASS ##### -->
|
||||||
<para>
|
<para>
|
||||||
|
|
||||||
|
@ -1096,13 +1096,6 @@ GstFilter
|
||||||
|
|
||||||
@obj:
|
@obj:
|
||||||
|
|
||||||
<!-- ##### MACRO GST_IS_QUEUE_CLASS ##### -->
|
|
||||||
<para>
|
|
||||||
|
|
||||||
</para>
|
|
||||||
|
|
||||||
@obj:
|
|
||||||
|
|
||||||
<!-- ##### FUNCTION gst_fdsrc_get_type ##### -->
|
<!-- ##### FUNCTION gst_fdsrc_get_type ##### -->
|
||||||
<para>
|
<para>
|
||||||
|
|
||||||
|
@ -1110,6 +1103,13 @@ GstFilter
|
||||||
|
|
||||||
@Returns:
|
@Returns:
|
||||||
|
|
||||||
|
<!-- ##### MACRO GST_IS_QUEUE_CLASS ##### -->
|
||||||
|
<para>
|
||||||
|
|
||||||
|
</para>
|
||||||
|
|
||||||
|
@obj:
|
||||||
|
|
||||||
<!-- ##### FUNCTION gst_pad_get_type_id ##### -->
|
<!-- ##### FUNCTION gst_pad_get_type_id ##### -->
|
||||||
<para>
|
<para>
|
||||||
|
|
||||||
|
@ -1118,13 +1118,6 @@ GstFilter
|
||||||
@pad:
|
@pad:
|
||||||
@Returns:
|
@Returns:
|
||||||
|
|
||||||
<!-- ##### FUNCTION gst_thread_iterate ##### -->
|
|
||||||
<para>
|
|
||||||
|
|
||||||
</para>
|
|
||||||
|
|
||||||
@thread:
|
|
||||||
|
|
||||||
<!-- ##### STRUCT OverlayClip ##### -->
|
<!-- ##### STRUCT OverlayClip ##### -->
|
||||||
<para>
|
<para>
|
||||||
|
|
||||||
|
@ -1135,6 +1128,13 @@ GstFilter
|
||||||
@y1:
|
@y1:
|
||||||
@y2:
|
@y2:
|
||||||
|
|
||||||
|
<!-- ##### FUNCTION gst_thread_iterate ##### -->
|
||||||
|
<para>
|
||||||
|
|
||||||
|
</para>
|
||||||
|
|
||||||
|
@thread:
|
||||||
|
|
||||||
<!-- ##### ENUM GstSrcFlags ##### -->
|
<!-- ##### ENUM GstSrcFlags ##### -->
|
||||||
<para>
|
<para>
|
||||||
Flags for the GstSrc element
|
Flags for the GstSrc element
|
||||||
|
@ -1204,13 +1204,6 @@ GstColorSpace
|
||||||
|
|
||||||
@obj:
|
@obj:
|
||||||
|
|
||||||
<!-- ##### FUNCTION gst_asyncdisksrc_get_type ##### -->
|
|
||||||
<para>
|
|
||||||
|
|
||||||
</para>
|
|
||||||
|
|
||||||
@Returns:
|
|
||||||
|
|
||||||
<!-- ##### MACRO GST_AUDIOSINK_CLASS ##### -->
|
<!-- ##### MACRO GST_AUDIOSINK_CLASS ##### -->
|
||||||
<para>
|
<para>
|
||||||
|
|
||||||
|
@ -1218,6 +1211,13 @@ GstColorSpace
|
||||||
|
|
||||||
@klass:
|
@klass:
|
||||||
|
|
||||||
|
<!-- ##### FUNCTION gst_asyncdisksrc_get_type ##### -->
|
||||||
|
<para>
|
||||||
|
|
||||||
|
</para>
|
||||||
|
|
||||||
|
@Returns:
|
||||||
|
|
||||||
<!-- ##### MACRO GST_SRC_CLASS ##### -->
|
<!-- ##### MACRO GST_SRC_CLASS ##### -->
|
||||||
<para>
|
<para>
|
||||||
|
|
||||||
|
@ -1247,12 +1247,6 @@ GstColorSpace
|
||||||
@pad:
|
@pad:
|
||||||
@Returns:
|
@Returns:
|
||||||
|
|
||||||
<!-- ##### MACRO GST_PROPS_FOURCC_ID ##### -->
|
|
||||||
<para>
|
|
||||||
|
|
||||||
</para>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ##### FUNCTION gst_esdsink_new ##### -->
|
<!-- ##### FUNCTION gst_esdsink_new ##### -->
|
||||||
<para>
|
<para>
|
||||||
|
|
||||||
|
@ -1261,6 +1255,12 @@ GstColorSpace
|
||||||
@name:
|
@name:
|
||||||
@Returns:
|
@Returns:
|
||||||
|
|
||||||
|
<!-- ##### MACRO GST_PROPS_FOURCC_ID ##### -->
|
||||||
|
<para>
|
||||||
|
|
||||||
|
</para>
|
||||||
|
|
||||||
|
|
||||||
<!-- ##### FUNCTION gst_element_request_pad ##### -->
|
<!-- ##### FUNCTION gst_element_request_pad ##### -->
|
||||||
<para>
|
<para>
|
||||||
|
|
||||||
|
@ -1397,16 +1397,16 @@ This macro sets the given flags.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
|
||||||
<!-- ##### SECTION ./tmpl/gstsink.sgml:Title ##### -->
|
|
||||||
GstSink
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ##### MACRO GST_CPU_FLAG_MMX ##### -->
|
<!-- ##### MACRO GST_CPU_FLAG_MMX ##### -->
|
||||||
<para>
|
<para>
|
||||||
A flag indicating that MMX instructions are supported.
|
A flag indicating that MMX instructions are supported.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- ##### SECTION ./tmpl/gstsink.sgml:Title ##### -->
|
||||||
|
GstSink
|
||||||
|
|
||||||
|
|
||||||
<!-- ##### FUNCTION gst_object_get_type ##### -->
|
<!-- ##### FUNCTION gst_object_get_type ##### -->
|
||||||
<para>
|
<para>
|
||||||
|
|
||||||
|
@ -1690,13 +1690,6 @@ or a video card.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
|
||||||
<!-- ##### MACRO GST_IS_BIN_CLASS ##### -->
|
|
||||||
<para>
|
|
||||||
|
|
||||||
</para>
|
|
||||||
|
|
||||||
@obj:
|
|
||||||
|
|
||||||
<!-- ##### FUNCTION gst_esdsink_get_type ##### -->
|
<!-- ##### FUNCTION gst_esdsink_get_type ##### -->
|
||||||
<para>
|
<para>
|
||||||
|
|
||||||
|
@ -1704,6 +1697,13 @@ or a video card.
|
||||||
|
|
||||||
@Returns:
|
@Returns:
|
||||||
|
|
||||||
|
<!-- ##### MACRO GST_IS_BIN_CLASS ##### -->
|
||||||
|
<para>
|
||||||
|
|
||||||
|
</para>
|
||||||
|
|
||||||
|
@obj:
|
||||||
|
|
||||||
<!-- ##### SECTION ./tmpl/GstElement.sgml:See_Also ##### -->
|
<!-- ##### SECTION ./tmpl/GstElement.sgml:See_Also ##### -->
|
||||||
<para>
|
<para>
|
||||||
|
|
||||||
|
@ -1724,12 +1724,6 @@ Query whether this object has multiple input pads.
|
||||||
|
|
||||||
@obj: Element to query for multiple input pads.
|
@obj: Element to query for multiple input pads.
|
||||||
|
|
||||||
<!-- ##### SECTION ./tmpl/gstfilter.sgml:See_Also ##### -->
|
|
||||||
<para>
|
|
||||||
|
|
||||||
</para>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ##### MACRO DEBUG_NOPREFIX ##### -->
|
<!-- ##### MACRO DEBUG_NOPREFIX ##### -->
|
||||||
<para>
|
<para>
|
||||||
|
|
||||||
|
@ -1738,6 +1732,12 @@ Query whether this object has multiple input pads.
|
||||||
@format:
|
@format:
|
||||||
@args...:
|
@args...:
|
||||||
|
|
||||||
|
<!-- ##### SECTION ./tmpl/gstfilter.sgml:See_Also ##### -->
|
||||||
|
<para>
|
||||||
|
|
||||||
|
</para>
|
||||||
|
|
||||||
|
|
||||||
<!-- ##### ARG GstAudioSink:frequency ##### -->
|
<!-- ##### ARG GstAudioSink:frequency ##### -->
|
||||||
<para>
|
<para>
|
||||||
|
|
||||||
|
@ -2117,13 +2117,6 @@ The start point of a filter graph
|
||||||
|
|
||||||
@audiosink:
|
@audiosink:
|
||||||
|
|
||||||
<!-- ##### MACRO GST_IS_FAKESINK ##### -->
|
|
||||||
<para>
|
|
||||||
|
|
||||||
</para>
|
|
||||||
|
|
||||||
@obj:
|
|
||||||
|
|
||||||
<!-- ##### MACRO GST_STATE_UNSET ##### -->
|
<!-- ##### MACRO GST_STATE_UNSET ##### -->
|
||||||
<para>
|
<para>
|
||||||
This macro unsets the given state on the element.
|
This macro unsets the given state on the element.
|
||||||
|
@ -2132,6 +2125,13 @@ This macro unsets the given state on the element.
|
||||||
@obj: Element to unset state of.
|
@obj: Element to unset state of.
|
||||||
@flag: State to unset, can be any number of bits in guint32.
|
@flag: State to unset, can be any number of bits in guint32.
|
||||||
|
|
||||||
|
<!-- ##### MACRO GST_IS_FAKESINK ##### -->
|
||||||
|
<para>
|
||||||
|
|
||||||
|
</para>
|
||||||
|
|
||||||
|
@obj:
|
||||||
|
|
||||||
<!-- ##### MACRO GST_QUEUE_CLASS ##### -->
|
<!-- ##### MACRO GST_QUEUE_CLASS ##### -->
|
||||||
<para>
|
<para>
|
||||||
|
|
||||||
|
@ -2197,6 +2197,13 @@ The number of bytes per read.
|
||||||
|
|
||||||
@obj:
|
@obj:
|
||||||
|
|
||||||
|
<!-- ##### FUNCTION gst_sinesrc_get_type ##### -->
|
||||||
|
<para>
|
||||||
|
|
||||||
|
</para>
|
||||||
|
|
||||||
|
@Returns:
|
||||||
|
|
||||||
<!-- ##### MACRO ERROR_OBJECT ##### -->
|
<!-- ##### MACRO ERROR_OBJECT ##### -->
|
||||||
<para>
|
<para>
|
||||||
|
|
||||||
|
@ -2207,13 +2214,6 @@ The number of bytes per read.
|
||||||
@format:
|
@format:
|
||||||
@args...:
|
@args...:
|
||||||
|
|
||||||
<!-- ##### FUNCTION gst_sinesrc_get_type ##### -->
|
|
||||||
<para>
|
|
||||||
|
|
||||||
</para>
|
|
||||||
|
|
||||||
@Returns:
|
|
||||||
|
|
||||||
<!-- ##### MACRO GST_IS_IDENTITY ##### -->
|
<!-- ##### MACRO GST_IS_IDENTITY ##### -->
|
||||||
<para>
|
<para>
|
||||||
|
|
||||||
|
@ -2318,17 +2318,6 @@ This macro sets the given state on the element.
|
||||||
|
|
||||||
@obj:
|
@obj:
|
||||||
|
|
||||||
<!-- ##### SECTION ./tmpl/videoraw.sgml:Short_Description ##### -->
|
|
||||||
Information about video buffers.
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ##### FUNCTION gst_fdsink_get_type ##### -->
|
|
||||||
<para>
|
|
||||||
|
|
||||||
</para>
|
|
||||||
|
|
||||||
@Returns:
|
|
||||||
|
|
||||||
<!-- ##### FUNCTION gst_src_push_region ##### -->
|
<!-- ##### FUNCTION gst_src_push_region ##### -->
|
||||||
<para>
|
<para>
|
||||||
|
|
||||||
|
@ -2338,6 +2327,17 @@ Information about video buffers.
|
||||||
@offset:
|
@offset:
|
||||||
@size:
|
@size:
|
||||||
|
|
||||||
|
<!-- ##### FUNCTION gst_fdsink_get_type ##### -->
|
||||||
|
<para>
|
||||||
|
|
||||||
|
</para>
|
||||||
|
|
||||||
|
@Returns:
|
||||||
|
|
||||||
|
<!-- ##### SECTION ./tmpl/videoraw.sgml:Short_Description ##### -->
|
||||||
|
Information about video buffers.
|
||||||
|
|
||||||
|
|
||||||
<!-- ##### STRUCT GstPipelineClass ##### -->
|
<!-- ##### STRUCT GstPipelineClass ##### -->
|
||||||
<para>
|
<para>
|
||||||
|
|
||||||
|
@ -2428,13 +2428,13 @@ A flag indicating that SSE instructions are supported.
|
||||||
|
|
||||||
@obj:
|
@obj:
|
||||||
|
|
||||||
<!-- ##### ARG GstAsyncDiskSrc:size ##### -->
|
<!-- ##### STRUCT GstDiskSrcClass ##### -->
|
||||||
<para>
|
<para>
|
||||||
|
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
|
||||||
<!-- ##### STRUCT GstDiskSrcClass ##### -->
|
<!-- ##### ARG GstAsyncDiskSrc:size ##### -->
|
||||||
<para>
|
<para>
|
||||||
|
|
||||||
</para>
|
</para>
|
||||||
|
@ -2577,6 +2577,13 @@ the offset.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- ##### MACRO GST_IS_ASYNCDISKSRC_CLASS ##### -->
|
||||||
|
<para>
|
||||||
|
|
||||||
|
</para>
|
||||||
|
|
||||||
|
@obj:
|
||||||
|
|
||||||
<!-- ##### FUNCTION gst_sinesrc_new ##### -->
|
<!-- ##### FUNCTION gst_sinesrc_new ##### -->
|
||||||
<para>
|
<para>
|
||||||
|
|
||||||
|
@ -2585,13 +2592,6 @@ the offset.
|
||||||
@name:
|
@name:
|
||||||
@Returns:
|
@Returns:
|
||||||
|
|
||||||
<!-- ##### MACRO GST_IS_ASYNCDISKSRC_CLASS ##### -->
|
|
||||||
<para>
|
|
||||||
|
|
||||||
</para>
|
|
||||||
|
|
||||||
@obj:
|
|
||||||
|
|
||||||
<!-- ##### ARG GstAudioSrc:curoffset ##### -->
|
<!-- ##### ARG GstAudioSrc:curoffset ##### -->
|
||||||
<para>
|
<para>
|
||||||
Get the current number of bytes read.
|
Get the current number of bytes read.
|
||||||
|
@ -2640,13 +2640,6 @@ plugin
|
||||||
|
|
||||||
@klass:
|
@klass:
|
||||||
|
|
||||||
<!-- ##### MACRO GST_HTTPSRC_CLASS ##### -->
|
|
||||||
<para>
|
|
||||||
|
|
||||||
</para>
|
|
||||||
|
|
||||||
@klass:
|
|
||||||
|
|
||||||
<!-- ##### MACRO GST_ASYNCDISKSRC ##### -->
|
<!-- ##### MACRO GST_ASYNCDISKSRC ##### -->
|
||||||
<para>
|
<para>
|
||||||
|
|
||||||
|
@ -2654,6 +2647,13 @@ plugin
|
||||||
|
|
||||||
@obj:
|
@obj:
|
||||||
|
|
||||||
|
<!-- ##### MACRO GST_HTTPSRC_CLASS ##### -->
|
||||||
|
<para>
|
||||||
|
|
||||||
|
</para>
|
||||||
|
|
||||||
|
@klass:
|
||||||
|
|
||||||
<!-- ##### ARG GstPad:active ##### -->
|
<!-- ##### ARG GstPad:active ##### -->
|
||||||
<para>
|
<para>
|
||||||
Indicates this pad is active
|
Indicates this pad is active
|
||||||
|
|
|
@ -13,7 +13,7 @@ void eos(GstElement *element)
|
||||||
|
|
||||||
int main(int argc,char *argv[])
|
int main(int argc,char *argv[])
|
||||||
{
|
{
|
||||||
GstElement *bin, *disksrc, *parse, *decoder, *downmix, *mulaw, *osssink;
|
GstElement *bin, *disksrc, *parse, *decoder, *downmix, *mulaw, *mulawdec, *osssink;
|
||||||
|
|
||||||
gst_init(&argc,&argv);
|
gst_init(&argc,&argv);
|
||||||
|
|
||||||
|
@ -36,6 +36,7 @@ int main(int argc,char *argv[])
|
||||||
decoder = gst_elementfactory_make("mpg123","decoder");
|
decoder = gst_elementfactory_make("mpg123","decoder");
|
||||||
downmix = gst_elementfactory_make("stereo2mono","stereo2mono");
|
downmix = gst_elementfactory_make("stereo2mono","stereo2mono");
|
||||||
mulaw = gst_elementfactory_make("mulawencode","mulaw");
|
mulaw = gst_elementfactory_make("mulawencode","mulaw");
|
||||||
|
mulawdec = gst_elementfactory_make("mulawdecode","mulawdec");
|
||||||
/* and an audio sink */
|
/* and an audio sink */
|
||||||
osssink = gst_elementfactory_make("osssink", "play_audio");
|
osssink = gst_elementfactory_make("osssink", "play_audio");
|
||||||
|
|
||||||
|
@ -45,6 +46,7 @@ int main(int argc,char *argv[])
|
||||||
gst_bin_add(GST_BIN(bin), decoder);
|
gst_bin_add(GST_BIN(bin), decoder);
|
||||||
gst_bin_add(GST_BIN(bin), downmix);
|
gst_bin_add(GST_BIN(bin), downmix);
|
||||||
gst_bin_add(GST_BIN(bin), mulaw);
|
gst_bin_add(GST_BIN(bin), mulaw);
|
||||||
|
gst_bin_add(GST_BIN(bin), mulawdec);
|
||||||
gst_bin_add(GST_BIN(bin), osssink);
|
gst_bin_add(GST_BIN(bin), osssink);
|
||||||
|
|
||||||
/* connect src to sink */
|
/* connect src to sink */
|
||||||
|
@ -57,6 +59,8 @@ int main(int argc,char *argv[])
|
||||||
gst_pad_connect(gst_element_get_pad(downmix,"src"),
|
gst_pad_connect(gst_element_get_pad(downmix,"src"),
|
||||||
gst_element_get_pad(mulaw,"sink"));
|
gst_element_get_pad(mulaw,"sink"));
|
||||||
gst_pad_connect(gst_element_get_pad(mulaw,"src"),
|
gst_pad_connect(gst_element_get_pad(mulaw,"src"),
|
||||||
|
gst_element_get_pad(mulawdec,"sink"));
|
||||||
|
gst_pad_connect(gst_element_get_pad(mulawdec,"src"),
|
||||||
gst_element_get_pad(osssink,"sink"));
|
gst_element_get_pad(osssink,"sink"));
|
||||||
|
|
||||||
/* start playing */
|
/* start playing */
|
||||||
|
@ -76,6 +80,7 @@ int main(int argc,char *argv[])
|
||||||
gst_object_destroy(GST_OBJECT(decoder));
|
gst_object_destroy(GST_OBJECT(decoder));
|
||||||
gst_object_destroy(GST_OBJECT(downmix));
|
gst_object_destroy(GST_OBJECT(downmix));
|
||||||
gst_object_destroy(GST_OBJECT(mulaw));
|
gst_object_destroy(GST_OBJECT(mulaw));
|
||||||
|
gst_object_destroy(GST_OBJECT(mulawdec));
|
||||||
gst_object_destroy(GST_OBJECT(disksrc));
|
gst_object_destroy(GST_OBJECT(disksrc));
|
||||||
gst_object_destroy(GST_OBJECT(bin));
|
gst_object_destroy(GST_OBJECT(bin));
|
||||||
|
|
||||||
|
|
|
@ -261,10 +261,10 @@ gst_static_autoplug_to_render (GstAutoplug *autoplug, GstCaps *srccaps, GstEleme
|
||||||
|
|
||||||
while (targetelement) {
|
while (targetelement) {
|
||||||
GList *elements;
|
GList *elements;
|
||||||
GstPad *pad;
|
GstRealPad *pad;
|
||||||
GstPadTemplate *templ;
|
GstPadTemplate *templ;
|
||||||
|
|
||||||
pad = GST_PAD (gst_element_get_pad_list (targetelement)->data);
|
pad = GST_PAD_REALIZE (gst_element_get_pad_list (targetelement)->data);
|
||||||
templ = GST_PAD_PADTEMPLATE (pad);
|
templ = GST_PAD_PADTEMPLATE (pad);
|
||||||
|
|
||||||
caps.sink = GST_PADTEMPLATE_CAPS (templ);
|
caps.sink = GST_PADTEMPLATE_CAPS (templ);
|
||||||
|
|
|
@ -94,6 +94,7 @@ GstProps* gst_caps_get_props (GstCaps *caps);
|
||||||
#define gst_caps_get_int(caps, name) gst_props_get_int ((caps)->properties, name)
|
#define gst_caps_get_int(caps, name) gst_props_get_int ((caps)->properties, name)
|
||||||
#define gst_caps_get_fourcc_int(caps, name) gst_props_get_fourcc_int ((caps)->properties, name)
|
#define gst_caps_get_fourcc_int(caps, name) gst_props_get_fourcc_int ((caps)->properties, name)
|
||||||
#define gst_caps_get_boolean(caps, name) gst_props_get_boolean ((caps)->properties, name)
|
#define gst_caps_get_boolean(caps, name) gst_props_get_boolean ((caps)->properties, name)
|
||||||
|
#define gst_caps_get_string(caps, name) gst_props_get_string ((caps)->properties, name)
|
||||||
|
|
||||||
GstCaps* gst_caps_get_by_name (GstCaps *caps, const gchar *name);
|
GstCaps* gst_caps_get_by_name (GstCaps *caps, const gchar *name);
|
||||||
|
|
||||||
|
|
|
@ -271,10 +271,12 @@ enum {
|
||||||
GST_CAT_PIPELINE, // Pipeline stuff
|
GST_CAT_PIPELINE, // Pipeline stuff
|
||||||
GST_CAT_PLUGIN_LOADING, // Plugin loading
|
GST_CAT_PLUGIN_LOADING, // Plugin loading
|
||||||
GST_CAT_PLUGIN_ERRORS, // Errors during plugin loading
|
GST_CAT_PLUGIN_ERRORS, // Errors during plugin loading
|
||||||
|
GST_CAT_PLUGIN_INFO, // Plugin state information
|
||||||
GST_CAT_PROPERTIES, // Properties
|
GST_CAT_PROPERTIES, // Properties
|
||||||
GST_CAT_THREAD, // Thread creation/management
|
GST_CAT_THREAD, // Thread creation/management
|
||||||
GST_CAT_TYPES, // Typing
|
GST_CAT_TYPES, // Typing
|
||||||
GST_CAT_XML, // XML load/save of everything
|
GST_CAT_XML, // XML load/save of everything
|
||||||
|
GST_CAT_NEGOTIATION, // Caps Negotiation stuff
|
||||||
|
|
||||||
GST_CAT_MAX_CATEGORY,
|
GST_CAT_MAX_CATEGORY,
|
||||||
};
|
};
|
||||||
|
|
116
gst/gstpad.c
116
gst/gstpad.c
|
@ -260,7 +260,6 @@ gst_pad_new_from_template (GstPadTemplate *templ,
|
||||||
|
|
||||||
pad = gst_pad_new (name, templ->direction);
|
pad = gst_pad_new (name, templ->direction);
|
||||||
GST_PAD_PADTEMPLATE(pad) = templ;
|
GST_PAD_PADTEMPLATE(pad) = templ;
|
||||||
//GST_PAD_CAPS (pad) = GST_PADTEMPLATE_CAPS (templ);
|
|
||||||
|
|
||||||
return pad;
|
return pad;
|
||||||
}
|
}
|
||||||
|
@ -430,6 +429,26 @@ gst_pad_set_negotiate_function (GstPad *pad,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gst_pad_set_newcaps_function:
|
||||||
|
* @pad: the pad to set the newcaps function for
|
||||||
|
* @newcaps: the newcaps function
|
||||||
|
*
|
||||||
|
* Set the given newcaps function for the pad.
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
gst_pad_set_newcaps_function (GstPad *pad,
|
||||||
|
GstPadNewCapsFunction newcaps)
|
||||||
|
{
|
||||||
|
g_return_if_fail (pad != NULL);
|
||||||
|
g_return_if_fail (GST_IS_REAL_PAD (pad));
|
||||||
|
|
||||||
|
GST_RPAD_NEWCAPSFUNC (pad) = newcaps;
|
||||||
|
GST_DEBUG (0,"newcapsfunc for %s:%s(@%p) at %p is set to %p\n",
|
||||||
|
GST_DEBUG_PAD_NAME(pad),pad,&GST_RPAD_NEWCAPSFUNC(pad),newcaps);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_pad_push_func(GstPad *pad, GstBuffer *buf)
|
gst_pad_push_func(GstPad *pad, GstBuffer *buf)
|
||||||
|
@ -748,6 +767,7 @@ gst_pad_set_caps (GstPad *pad,
|
||||||
if (GST_PAD_CAPS (pad))
|
if (GST_PAD_CAPS (pad))
|
||||||
gst_caps_unref (GST_PAD_CAPS (pad));
|
gst_caps_unref (GST_PAD_CAPS (pad));
|
||||||
|
|
||||||
|
if (caps)
|
||||||
gst_caps_ref (caps);
|
gst_caps_ref (caps);
|
||||||
GST_PAD_CAPS(pad) = caps;
|
GST_PAD_CAPS(pad) = caps;
|
||||||
|
|
||||||
|
@ -941,18 +961,22 @@ cleanup:
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_pad_renegotiate_func (GstPad *pad, GstPad *peerpad, GstCaps **newcaps, gint *counter)
|
gst_pad_renegotiate_func (GstPad *pad, gpointer *data1, GstPad *peerpad, gpointer *data2, GstCaps **newcaps)
|
||||||
{
|
{
|
||||||
GstRealPad *currentpad, *otherpad;
|
GstRealPad *currentpad, *otherpad;
|
||||||
|
gpointer *currentdata, *otherdata;
|
||||||
GstPadNegotiateReturn result;
|
GstPadNegotiateReturn result;
|
||||||
|
gint counter = 0;
|
||||||
|
|
||||||
g_return_val_if_fail (pad != NULL, FALSE);
|
g_return_val_if_fail (pad != NULL, FALSE);
|
||||||
|
|
||||||
currentpad = GST_PAD_REALIZE (pad);
|
currentpad = GST_PAD_REALIZE (pad);
|
||||||
otherpad = GST_REAL_PAD (peerpad);
|
otherpad = GST_REAL_PAD (peerpad);
|
||||||
|
currentdata = data1;
|
||||||
|
otherdata = data2;
|
||||||
|
|
||||||
GST_DEBUG (GST_CAT_ELEMENT_PADS, "negotiating pad %s:%s and %s:%s counter:%d\n",
|
GST_DEBUG (GST_CAT_NEGOTIATION, "negotiating pad %s:%s and %s:%s data:%p\n",
|
||||||
GST_DEBUG_PAD_NAME(pad), GST_DEBUG_PAD_NAME(peerpad), *counter);
|
GST_DEBUG_PAD_NAME(currentpad), GST_DEBUG_PAD_NAME(otherpad), currentdata);
|
||||||
|
|
||||||
do {
|
do {
|
||||||
gboolean matchtempl;
|
gboolean matchtempl;
|
||||||
|
@ -960,31 +984,47 @@ gst_pad_renegotiate_func (GstPad *pad, GstPad *peerpad, GstCaps **newcaps, gint
|
||||||
if (!*newcaps) {
|
if (!*newcaps) {
|
||||||
if (otherpad->negotiatefunc) {
|
if (otherpad->negotiatefunc) {
|
||||||
GstRealPad *temp;
|
GstRealPad *temp;
|
||||||
|
gpointer *tempdata;
|
||||||
|
|
||||||
otherpad->negotiatefunc (GST_PAD (otherpad), newcaps, *counter);
|
GST_DEBUG (GST_CAT_NEGOTIATION, "requesting other caps from pad %s:%s data:%p\n",
|
||||||
|
GST_DEBUG_PAD_NAME(otherpad), otherdata);
|
||||||
|
otherpad->negotiatefunc (GST_PAD (otherpad), newcaps, otherdata);
|
||||||
|
|
||||||
temp = otherpad;
|
temp = otherpad;
|
||||||
otherpad = currentpad;
|
otherpad = currentpad;
|
||||||
currentpad = temp;
|
currentpad = temp;
|
||||||
|
|
||||||
|
tempdata = otherdata;
|
||||||
|
otherdata = currentdata;
|
||||||
|
currentdata = tempdata;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GST_DEBUG (GST_CAT_NEGOTIATION, "checking compatibility with pad %s:%s\n",
|
||||||
|
GST_DEBUG_PAD_NAME(otherpad));
|
||||||
matchtempl = gst_caps_check_compatibility (*newcaps, gst_pad_get_padtemplate_caps (GST_PAD (otherpad)));
|
matchtempl = gst_caps_check_compatibility (*newcaps, gst_pad_get_padtemplate_caps (GST_PAD (otherpad)));
|
||||||
|
|
||||||
GST_DEBUG (GST_CAT_ELEMENT_PADS, "caps compatibility check %s\n", (matchtempl?"ok":"fail"));
|
GST_DEBUG (GST_CAT_NEGOTIATION, "caps compatibility check %s\n", (matchtempl?"ok":"fail"));
|
||||||
|
|
||||||
if (matchtempl) {
|
if (matchtempl) {
|
||||||
|
GST_DEBUG (GST_CAT_NEGOTIATION, "checking if other pad %s:%s can negotiate data:%p\n",
|
||||||
|
GST_DEBUG_PAD_NAME(otherpad), otherdata);
|
||||||
if (otherpad->negotiatefunc) {
|
if (otherpad->negotiatefunc) {
|
||||||
GstRealPad *temp;
|
GstRealPad *temp;
|
||||||
|
gpointer *tempdata;
|
||||||
|
|
||||||
GST_DEBUG (GST_CAT_ELEMENT_PADS, "switching pad for next phase\n");
|
GST_DEBUG (GST_CAT_NEGOTIATION, "switching pad for next phase\n");
|
||||||
|
|
||||||
temp = currentpad;
|
temp = currentpad;
|
||||||
currentpad = otherpad;
|
currentpad = otherpad;
|
||||||
otherpad = temp;
|
otherpad = temp;
|
||||||
|
|
||||||
|
tempdata = otherdata;
|
||||||
|
otherdata = currentdata;
|
||||||
|
currentdata = tempdata;
|
||||||
}
|
}
|
||||||
else if (gst_caps_check_compatibility (*newcaps, GST_PAD_CAPS (otherpad))) {
|
else if (gst_caps_check_compatibility (*newcaps, GST_PAD_CAPS (otherpad))) {
|
||||||
GST_DEBUG (GST_CAT_ELEMENT_PADS, "negotiation succeeded\n");
|
GST_DEBUG (GST_CAT_NEGOTIATION, "negotiation succeeded\n");
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -997,36 +1037,39 @@ gst_pad_renegotiate_func (GstPad *pad, GstPad *peerpad, GstCaps **newcaps, gint
|
||||||
if (*newcaps) gst_caps_ref(*newcaps);
|
if (*newcaps) gst_caps_ref(*newcaps);
|
||||||
}
|
}
|
||||||
|
|
||||||
(*counter)++;
|
counter++;
|
||||||
|
|
||||||
if (currentpad->negotiatefunc) {
|
if (currentpad->negotiatefunc) {
|
||||||
GST_DEBUG (GST_CAT_ELEMENT_PADS, "calling negotiate function on pad %s:%s counter: %d\n",
|
GST_DEBUG (GST_CAT_NEGOTIATION, "calling negotiate function on pad %s:%s data: %p\n",
|
||||||
GST_DEBUG_PAD_NAME (currentpad), *counter);
|
GST_DEBUG_PAD_NAME (currentpad), currentdata);
|
||||||
result = currentpad->negotiatefunc (GST_PAD (currentpad), newcaps, *counter);
|
result = currentpad->negotiatefunc (GST_PAD (currentpad), newcaps, currentdata);
|
||||||
|
|
||||||
switch (result) {
|
switch (result) {
|
||||||
case GST_PAD_NEGOTIATE_FAIL:
|
case GST_PAD_NEGOTIATE_FAIL:
|
||||||
GST_DEBUG (GST_CAT_ELEMENT_PADS, "negotiation failed\n");
|
GST_DEBUG (GST_CAT_NEGOTIATION, "negotiation failed\n");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
case GST_PAD_NEGOTIATE_AGREE:
|
case GST_PAD_NEGOTIATE_AGREE:
|
||||||
GST_DEBUG (GST_CAT_ELEMENT_PADS, "negotiation succeeded\n");
|
GST_DEBUG (GST_CAT_NEGOTIATION, "negotiation succeeded\n");
|
||||||
return TRUE;
|
return TRUE;
|
||||||
case GST_PAD_NEGOTIATE_TRY:
|
case GST_PAD_NEGOTIATE_TRY:
|
||||||
GST_DEBUG (GST_CAT_ELEMENT_PADS, "try another option\n");
|
GST_DEBUG (GST_CAT_NEGOTIATION, "try another option\n");
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
GST_DEBUG (GST_CAT_NEGOTIATION, "invalid return\n");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
GST_DEBUG (GST_CAT_ELEMENT_PADS, "negotiation failed, no more options\n");
|
GST_DEBUG (GST_CAT_NEGOTIATION, "negotiation failed, no more options\n");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
} while (*counter < 100);
|
} while (counter < 100);
|
||||||
|
|
||||||
g_warning ("negotiation between (%s:%s) and (%s:%s) failed: too many attempts (%d)\n",
|
g_warning ("negotiation between (%s:%s) and (%s:%s) failed: too many attempts (%d)\n",
|
||||||
GST_DEBUG_PAD_NAME(pad), GST_DEBUG_PAD_NAME(peerpad), *counter);
|
GST_DEBUG_PAD_NAME(pad), GST_DEBUG_PAD_NAME(peerpad), counter);
|
||||||
|
|
||||||
GST_DEBUG (GST_CAT_ELEMENT_PADS, "negotiation failed, too many attempts\n");
|
GST_DEBUG (GST_CAT_NEGOTIATION, "negotiation failed, too many attempts\n");
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -1045,7 +1088,7 @@ gst_pad_renegotiate (GstPad *pad)
|
||||||
GstCaps *newcaps = NULL;
|
GstCaps *newcaps = NULL;
|
||||||
GstRealPad *peerpad, *currentpad, *otherpad;
|
GstRealPad *peerpad, *currentpad, *otherpad;
|
||||||
gboolean result;
|
gboolean result;
|
||||||
gint counter = 0;
|
gpointer data1 = NULL, data2 = NULL;
|
||||||
|
|
||||||
g_return_val_if_fail (pad != NULL, FALSE);
|
g_return_val_if_fail (pad != NULL, FALSE);
|
||||||
|
|
||||||
|
@ -1054,26 +1097,31 @@ gst_pad_renegotiate (GstPad *pad)
|
||||||
currentpad = GST_PAD_REALIZE (pad);
|
currentpad = GST_PAD_REALIZE (pad);
|
||||||
|
|
||||||
if (!peerpad) {
|
if (!peerpad) {
|
||||||
GST_DEBUG (GST_CAT_ELEMENT_PADS, "no peer pad for pad %s:%s\n",
|
GST_DEBUG (GST_CAT_NEGOTIATION, "no peer pad for pad %s:%s\n",
|
||||||
GST_DEBUG_PAD_NAME(currentpad));
|
GST_DEBUG_PAD_NAME(currentpad));
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
otherpad = GST_REAL_PAD (peerpad);
|
otherpad = GST_REAL_PAD (peerpad);
|
||||||
|
|
||||||
GST_INFO (GST_CAT_ELEMENT_PADS, "negotiating pad %s:%s and %s:%s",
|
GST_INFO (GST_CAT_NEGOTIATION, "negotiating pad %s:%s and %s:%s",
|
||||||
GST_DEBUG_PAD_NAME(pad), GST_DEBUG_PAD_NAME(peerpad));
|
GST_DEBUG_PAD_NAME(pad), GST_DEBUG_PAD_NAME(peerpad));
|
||||||
|
|
||||||
newcaps = GST_PAD_CAPS (pad);
|
newcaps = GST_PAD_CAPS (pad);
|
||||||
|
|
||||||
result = gst_pad_renegotiate_func (GST_PAD (currentpad), GST_PAD (otherpad), &newcaps, &counter);
|
result = gst_pad_renegotiate_func (GST_PAD (currentpad), &data1, GST_PAD (otherpad), &data2, &newcaps);
|
||||||
|
|
||||||
if (result) {
|
if (result) {
|
||||||
GST_DEBUG (GST_CAT_ELEMENT_PADS, "pads aggreed on caps :)\n");
|
GST_DEBUG (GST_CAT_NEGOTIATION, "pads aggreed on caps :)\n");
|
||||||
|
|
||||||
/* here we have some sort of aggreement of the caps */
|
/* here we have some sort of aggreement of the caps */
|
||||||
GST_PAD_CAPS (currentpad) = newcaps;
|
GST_PAD_CAPS (currentpad) = newcaps;
|
||||||
|
if (GST_RPAD_NEWCAPSFUNC (currentpad))
|
||||||
|
GST_RPAD_NEWCAPSFUNC (currentpad) (GST_PAD (currentpad), newcaps);
|
||||||
|
|
||||||
GST_PAD_CAPS (otherpad) = newcaps;
|
GST_PAD_CAPS (otherpad) = newcaps;
|
||||||
|
if (GST_RPAD_NEWCAPSFUNC (otherpad))
|
||||||
|
GST_RPAD_NEWCAPSFUNC (otherpad) (GST_PAD (otherpad), newcaps);
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
@ -1084,7 +1132,6 @@ gst_pad_renegotiate (GstPad *pad)
|
||||||
* @srcpad: the pad that proxies
|
* @srcpad: the pad that proxies
|
||||||
* @destpad: the pad to proxy the negotiation to
|
* @destpad: the pad to proxy the negotiation to
|
||||||
* @caps: the current caps
|
* @caps: the current caps
|
||||||
* @counter: a counter to keep track of the negotiation process
|
|
||||||
*
|
*
|
||||||
* Proxies the negotiation pad from srcpad to destpad. Further
|
* Proxies the negotiation pad from srcpad to destpad. Further
|
||||||
* negotiation is done on the peers of both pad instead.
|
* negotiation is done on the peers of both pad instead.
|
||||||
|
@ -1092,33 +1139,40 @@ gst_pad_renegotiate (GstPad *pad)
|
||||||
* Returns: the result of the negotiation preocess.
|
* Returns: the result of the negotiation preocess.
|
||||||
*/
|
*/
|
||||||
GstPadNegotiateReturn
|
GstPadNegotiateReturn
|
||||||
gst_pad_negotiate_proxy (GstPad *srcpad, GstPad *destpad, GstCaps **caps, gint counter)
|
gst_pad_negotiate_proxy (GstPad *srcpad, GstPad *destpad, GstCaps **caps)
|
||||||
{
|
{
|
||||||
GstRealPad *srcpeer;
|
GstRealPad *srcpeer;
|
||||||
GstRealPad *destpeer;
|
GstRealPad *destpeer;
|
||||||
gboolean result;
|
gboolean result;
|
||||||
|
gpointer data1 = NULL, data2 = NULL;
|
||||||
|
|
||||||
g_return_val_if_fail (srcpad != NULL, GST_PAD_NEGOTIATE_FAIL);
|
g_return_val_if_fail (srcpad != NULL, GST_PAD_NEGOTIATE_FAIL);
|
||||||
g_return_val_if_fail (destpad != NULL, GST_PAD_NEGOTIATE_FAIL);
|
g_return_val_if_fail (destpad != NULL, GST_PAD_NEGOTIATE_FAIL);
|
||||||
|
|
||||||
GST_DEBUG (GST_CAT_ELEMENT_PADS, "negotiation proxied from pad (%s:%s) to pad (%s:%s)\n",
|
GST_DEBUG (GST_CAT_NEGOTIATION, "negotiation proxied from pad (%s:%s) to pad (%s:%s)\n",
|
||||||
GST_DEBUG_PAD_NAME (srcpad), GST_DEBUG_PAD_NAME (destpad));
|
GST_DEBUG_PAD_NAME (srcpad), GST_DEBUG_PAD_NAME (destpad));
|
||||||
|
|
||||||
srcpeer = GST_RPAD_PEER (srcpad);
|
srcpeer = GST_RPAD_PEER (srcpad);
|
||||||
destpeer = GST_RPAD_PEER (destpad);
|
destpeer = GST_RPAD_PEER (destpad);
|
||||||
|
|
||||||
if (srcpeer && destpeer) {
|
if (srcpeer && destpeer) {
|
||||||
counter--;
|
result = gst_pad_renegotiate_func (GST_PAD (srcpeer), &data1, GST_PAD (destpeer), &data2, caps);
|
||||||
result = gst_pad_renegotiate_func (GST_PAD (srcpeer), GST_PAD (destpeer), caps, &counter);
|
|
||||||
|
|
||||||
if (result) {
|
if (result) {
|
||||||
GST_DEBUG (GST_CAT_ELEMENT_PADS, "pads aggreed on caps :)\n");
|
GST_DEBUG (GST_CAT_NEGOTIATION, "pads (%s:%s) and (%s:%s) aggreed on caps :)\n",
|
||||||
|
GST_DEBUG_PAD_NAME (srcpad), GST_DEBUG_PAD_NAME (destpad));
|
||||||
|
|
||||||
/* here we have some sort of aggreement of the caps */
|
/* here we have some sort of aggreement of the caps */
|
||||||
GST_PAD_CAPS (srcpad) = *caps;
|
GST_PAD_CAPS (destpeer) = *caps;
|
||||||
|
if (GST_RPAD_NEWCAPSFUNC (destpeer))
|
||||||
|
GST_RPAD_NEWCAPSFUNC (destpeer) (GST_PAD (destpeer), *caps);
|
||||||
|
|
||||||
GST_PAD_CAPS (destpad) = *caps;
|
GST_PAD_CAPS (destpad) = *caps;
|
||||||
|
if (GST_RPAD_NEWCAPSFUNC (destpad))
|
||||||
|
GST_RPAD_NEWCAPSFUNC (destpad) (GST_PAD (destpad), *caps);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
GST_DEBUG (GST_CAT_NEGOTIATION, "pads did not aggree on caps :(\n");
|
||||||
return GST_PAD_NEGOTIATE_FAIL;
|
return GST_PAD_NEGOTIATE_FAIL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -98,7 +98,8 @@ typedef void (*GstPadPushFunction) (GstPad *pad, GstBuffer *buf);
|
||||||
typedef GstBuffer* (*GstPadPullFunction) (GstPad *pad);
|
typedef GstBuffer* (*GstPadPullFunction) (GstPad *pad);
|
||||||
typedef GstBuffer* (*GstPadPullRegionFunction) (GstPad *pad, GstRegionType type, guint64 offset, guint64 len);
|
typedef GstBuffer* (*GstPadPullRegionFunction) (GstPad *pad, GstRegionType type, guint64 offset, guint64 len);
|
||||||
typedef gboolean (*GstPadEOSFunction) (GstPad *pad);
|
typedef gboolean (*GstPadEOSFunction) (GstPad *pad);
|
||||||
typedef GstPadNegotiateReturn (*GstPadNegotiateFunction) (GstPad *pad, GstCaps **caps, gint count);
|
typedef GstPadNegotiateReturn (*GstPadNegotiateFunction) (GstPad *pad, GstCaps **caps, gpointer *data);
|
||||||
|
typedef void (*GstPadNewCapsFunction) (GstPad *pad, GstCaps *caps);
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
GST_PAD_UNKNOWN,
|
GST_PAD_UNKNOWN,
|
||||||
|
@ -151,6 +152,7 @@ struct _GstRealPad {
|
||||||
GstPadPullRegionFunction pullregionfunc;
|
GstPadPullRegionFunction pullregionfunc;
|
||||||
|
|
||||||
GstPadNegotiateFunction negotiatefunc;
|
GstPadNegotiateFunction negotiatefunc;
|
||||||
|
GstPadNewCapsFunction newcapsfunc;
|
||||||
|
|
||||||
GList *ghostpads;
|
GList *ghostpads;
|
||||||
};
|
};
|
||||||
|
@ -196,6 +198,7 @@ struct _GstGhostPadClass {
|
||||||
#define GST_RPAD_QOSFUNC(pad) (((GstRealPad *)(pad))->qosfunc)
|
#define GST_RPAD_QOSFUNC(pad) (((GstRealPad *)(pad))->qosfunc)
|
||||||
#define GST_RPAD_EOSFUNC(pad) (((GstRealPad *)(pad))->eosfunc)
|
#define GST_RPAD_EOSFUNC(pad) (((GstRealPad *)(pad))->eosfunc)
|
||||||
#define GST_RPAD_NEGOTIATEFUNC(pad) (((GstRealPad *)(pad))->negotiatefunc)
|
#define GST_RPAD_NEGOTIATEFUNC(pad) (((GstRealPad *)(pad))->negotiatefunc)
|
||||||
|
#define GST_RPAD_NEWCAPSFUNC(pad) (((GstRealPad *)(pad))->newcapsfunc)
|
||||||
|
|
||||||
#define GST_RPAD_REGIONTYPE(pad) (((GstRealPad *)(pad))->regiontype)
|
#define GST_RPAD_REGIONTYPE(pad) (((GstRealPad *)(pad))->regiontype)
|
||||||
#define GST_RPAD_OFFSET(pad) (((GstRealPad *)(pad))->offset)
|
#define GST_RPAD_OFFSET(pad) (((GstRealPad *)(pad))->offset)
|
||||||
|
@ -281,6 +284,7 @@ void gst_pad_set_getregion_function (GstPad *pad, GstPadGetRegionFunction getr
|
||||||
void gst_pad_set_qos_function (GstPad *pad, GstPadQoSFunction qos);
|
void gst_pad_set_qos_function (GstPad *pad, GstPadQoSFunction qos);
|
||||||
void gst_pad_set_eos_function (GstPad *pad, GstPadEOSFunction eos);
|
void gst_pad_set_eos_function (GstPad *pad, GstPadEOSFunction eos);
|
||||||
void gst_pad_set_negotiate_function (GstPad *pad, GstPadNegotiateFunction nego);
|
void gst_pad_set_negotiate_function (GstPad *pad, GstPadNegotiateFunction nego);
|
||||||
|
void gst_pad_set_newcaps_function (GstPad *pad, GstPadNewCapsFunction newcaps);
|
||||||
|
|
||||||
gboolean gst_pad_set_caps (GstPad *pad, GstCaps *caps);
|
gboolean gst_pad_set_caps (GstPad *pad, GstCaps *caps);
|
||||||
GstCaps* gst_pad_get_caps (GstPad *pad);
|
GstCaps* gst_pad_get_caps (GstPad *pad);
|
||||||
|
@ -309,7 +313,7 @@ gboolean gst_pad_connect (GstPad *srcpad, GstPad *sinkpad);
|
||||||
void gst_pad_disconnect (GstPad *srcpad, GstPad *sinkpad);
|
void gst_pad_disconnect (GstPad *srcpad, GstPad *sinkpad);
|
||||||
|
|
||||||
gboolean gst_pad_renegotiate (GstPad *pad);
|
gboolean gst_pad_renegotiate (GstPad *pad);
|
||||||
GstPadNegotiateReturn gst_pad_negotiate_proxy (GstPad *srcpad, GstPad *destpad, GstCaps **caps, gint counter);
|
GstPadNegotiateReturn gst_pad_negotiate_proxy (GstPad *srcpad, GstPad *destpad, GstCaps **caps);
|
||||||
|
|
||||||
#if 1
|
#if 1
|
||||||
void gst_pad_push (GstPad *pad, GstBuffer *buf);
|
void gst_pad_push (GstPad *pad, GstBuffer *buf);
|
||||||
|
|
|
@ -68,7 +68,7 @@ gst_props_debug_entry (GstPropsEntry *entry)
|
||||||
GST_DEBUG (0, "%d\n", entry->data.int_data);
|
GST_DEBUG (0, "%d\n", entry->data.int_data);
|
||||||
break;
|
break;
|
||||||
case GST_PROPS_FOURCC_ID_NUM:
|
case GST_PROPS_FOURCC_ID_NUM:
|
||||||
GST_DEBUG (0, "%s\n", (gchar*)&entry->data.fourcc_data);
|
GST_DEBUG (0, "%4.4s\n", (gchar*)&entry->data.fourcc_data);
|
||||||
break;
|
break;
|
||||||
case GST_PROPS_BOOL_ID_NUM:
|
case GST_PROPS_BOOL_ID_NUM:
|
||||||
GST_DEBUG (0, "%d\n", entry->data.bool_data);
|
GST_DEBUG (0, "%d\n", entry->data.bool_data);
|
||||||
|
@ -563,6 +563,9 @@ gst_props_get_int (GstProps *props, const gchar *name)
|
||||||
GList *lentry;
|
GList *lentry;
|
||||||
GQuark quark;
|
GQuark quark;
|
||||||
|
|
||||||
|
g_return_val_if_fail (props != NULL, 0);
|
||||||
|
g_return_val_if_fail (name != NULL, 0);
|
||||||
|
|
||||||
quark = g_quark_from_string (name);
|
quark = g_quark_from_string (name);
|
||||||
|
|
||||||
lentry = g_list_find_custom (props->properties, GINT_TO_POINTER (quark), props_find_func);
|
lentry = g_list_find_custom (props->properties, GINT_TO_POINTER (quark), props_find_func);
|
||||||
|
@ -593,6 +596,9 @@ gst_props_get_fourcc_int (GstProps *props, const gchar *name)
|
||||||
GList *lentry;
|
GList *lentry;
|
||||||
GQuark quark;
|
GQuark quark;
|
||||||
|
|
||||||
|
g_return_val_if_fail (props != NULL, 0);
|
||||||
|
g_return_val_if_fail (name != NULL, 0);
|
||||||
|
|
||||||
quark = g_quark_from_string (name);
|
quark = g_quark_from_string (name);
|
||||||
|
|
||||||
lentry = g_list_find_custom (props->properties, GINT_TO_POINTER (quark), props_find_func);
|
lentry = g_list_find_custom (props->properties, GINT_TO_POINTER (quark), props_find_func);
|
||||||
|
@ -623,6 +629,9 @@ gst_props_get_boolean (GstProps *props, const gchar *name)
|
||||||
GList *lentry;
|
GList *lentry;
|
||||||
GQuark quark;
|
GQuark quark;
|
||||||
|
|
||||||
|
g_return_val_if_fail (props != NULL, FALSE);
|
||||||
|
g_return_val_if_fail (name != NULL, FALSE);
|
||||||
|
|
||||||
quark = g_quark_from_string (name);
|
quark = g_quark_from_string (name);
|
||||||
|
|
||||||
lentry = g_list_find_custom (props->properties, GINT_TO_POINTER (quark), props_find_func);
|
lentry = g_list_find_custom (props->properties, GINT_TO_POINTER (quark), props_find_func);
|
||||||
|
@ -653,6 +662,9 @@ gst_props_get_string (GstProps *props, const gchar *name)
|
||||||
GList *lentry;
|
GList *lentry;
|
||||||
GQuark quark;
|
GQuark quark;
|
||||||
|
|
||||||
|
g_return_val_if_fail (props != NULL, NULL);
|
||||||
|
g_return_val_if_fail (name != NULL, NULL);
|
||||||
|
|
||||||
quark = g_quark_from_string (name);
|
quark = g_quark_from_string (name);
|
||||||
|
|
||||||
lentry = g_list_find_custom (props->properties, GINT_TO_POINTER (quark), props_find_func);
|
lentry = g_list_find_custom (props->properties, GINT_TO_POINTER (quark), props_find_func);
|
||||||
|
@ -886,7 +898,6 @@ gst_props_check_compatibility (GstProps *fromprops, GstProps *toprops)
|
||||||
g_quark_to_string (entry1->propid));
|
g_quark_to_string (entry1->propid));
|
||||||
gst_props_debug_entry (entry1);
|
gst_props_debug_entry (entry1);
|
||||||
gst_props_debug_entry (entry2);
|
gst_props_debug_entry (entry2);
|
||||||
GST_DEBUG (0, "\n");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sourcelist = g_list_next (sourcelist);
|
sourcelist = g_list_next (sourcelist);
|
||||||
|
|
|
@ -66,8 +66,8 @@ static void gst_queue_set_arg (GtkObject *object, GtkArg *arg, guint id);
|
||||||
static void gst_queue_get_arg (GtkObject *object, GtkArg *arg, guint id);
|
static void gst_queue_get_arg (GtkObject *object, GtkArg *arg, guint id);
|
||||||
|
|
||||||
static gboolean gst_queue_handle_eos (GstPad *pad);
|
static gboolean gst_queue_handle_eos (GstPad *pad);
|
||||||
static GstPadNegotiateReturn gst_queue_handle_negotiate_src (GstPad *pad, GstCaps **caps, gint count);
|
static GstPadNegotiateReturn gst_queue_handle_negotiate_src (GstPad *pad, GstCaps **caps, gpointer *data);
|
||||||
static GstPadNegotiateReturn gst_queue_handle_negotiate_sink (GstPad *pad, GstCaps **caps, gint count);
|
static GstPadNegotiateReturn gst_queue_handle_negotiate_sink (GstPad *pad, GstCaps **caps, gpointer *data);
|
||||||
static void gst_queue_chain (GstPad *pad, GstBuffer *buf);
|
static void gst_queue_chain (GstPad *pad, GstBuffer *buf);
|
||||||
static GstBuffer * gst_queue_get (GstPad *pad);
|
static GstBuffer * gst_queue_get (GstPad *pad);
|
||||||
|
|
||||||
|
@ -153,20 +153,20 @@ gst_queue_init (GstQueue *queue)
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstPadNegotiateReturn
|
static GstPadNegotiateReturn
|
||||||
gst_queue_handle_negotiate_src (GstPad *pad, GstCaps **caps, gint counter)
|
gst_queue_handle_negotiate_src (GstPad *pad, GstCaps **caps, gpointer *data)
|
||||||
{
|
{
|
||||||
GstQueue *queue;
|
GstQueue *queue;
|
||||||
|
|
||||||
queue = GST_QUEUE (GST_OBJECT_PARENT (pad));
|
queue = GST_QUEUE (GST_OBJECT_PARENT (pad));
|
||||||
|
|
||||||
return gst_pad_negotiate_proxy (pad, queue->sinkpad, caps, counter);
|
return gst_pad_negotiate_proxy (pad, queue->sinkpad, caps);
|
||||||
|
|
||||||
|
|
||||||
//return GST_PAD_NEGOTIATE_FAIL;
|
//return GST_PAD_NEGOTIATE_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstPadNegotiateReturn
|
static GstPadNegotiateReturn
|
||||||
gst_queue_handle_negotiate_sink (GstPad *pad, GstCaps **caps, gint counter)
|
gst_queue_handle_negotiate_sink (GstPad *pad, GstCaps **caps, gpointer *data)
|
||||||
{
|
{
|
||||||
GstQueue *queue;
|
GstQueue *queue;
|
||||||
|
|
||||||
|
@ -179,7 +179,7 @@ gst_queue_handle_negotiate_sink (GstPad *pad, GstCaps **caps, gint counter)
|
||||||
}
|
}
|
||||||
if (*caps) {
|
if (*caps) {
|
||||||
*/
|
*/
|
||||||
return gst_pad_negotiate_proxy (pad, queue->srcpad, caps, counter);
|
return gst_pad_negotiate_proxy (pad, queue->srcpad, caps);
|
||||||
/*
|
/*
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,6 +17,7 @@ static void gst_play_get_arg (GtkObject *object,GtkArg *arg,guint id);
|
||||||
static void gst_play_realize (GtkWidget *play);
|
static void gst_play_realize (GtkWidget *play);
|
||||||
|
|
||||||
static void gst_play_frame_displayed (GstElement *element, GstPlay *play);
|
static void gst_play_frame_displayed (GstElement *element, GstPlay *play);
|
||||||
|
static void gst_play_have_size (GstElement *element, guint width, guint height, GstPlay *play);
|
||||||
static void gst_play_audio_handoff (GstElement *element, GstPlay *play);
|
static void gst_play_audio_handoff (GstElement *element, GstPlay *play);
|
||||||
|
|
||||||
/* signals and args */
|
/* signals and args */
|
||||||
|
@ -116,6 +117,7 @@ static void
|
||||||
gst_play_init (GstPlay *play)
|
gst_play_init (GstPlay *play)
|
||||||
{
|
{
|
||||||
GstPlayPrivate *priv = g_new0 (GstPlayPrivate, 1);
|
GstPlayPrivate *priv = g_new0 (GstPlayPrivate, 1);
|
||||||
|
GstElement *colorspace;
|
||||||
|
|
||||||
play->priv = priv;
|
play->priv = priv;
|
||||||
|
|
||||||
|
@ -130,11 +132,24 @@ gst_play_init (GstPlay *play)
|
||||||
gtk_signal_connect (GTK_OBJECT (priv->audio_element), "handoff",
|
gtk_signal_connect (GTK_OBJECT (priv->audio_element), "handoff",
|
||||||
GTK_SIGNAL_FUNC (gst_play_audio_handoff), play);
|
GTK_SIGNAL_FUNC (gst_play_audio_handoff), play);
|
||||||
|
|
||||||
priv->video_element = gst_elementfactory_make ("xvideosink", "show");
|
priv->video_element = gst_elementfactory_make ("bin", "video_bin");
|
||||||
g_return_if_fail (priv->video_element != NULL);
|
|
||||||
|
priv->video_show = gst_elementfactory_make ("xvideosink", "show");
|
||||||
|
g_return_if_fail (priv->video_show != NULL);
|
||||||
//gtk_object_set (GTK_OBJECT (priv->video_element), "xv_enabled", FALSE, NULL);
|
//gtk_object_set (GTK_OBJECT (priv->video_element), "xv_enabled", FALSE, NULL);
|
||||||
gtk_signal_connect (GTK_OBJECT (priv->video_element), "frame_displayed",
|
gtk_signal_connect (GTK_OBJECT (priv->video_show), "frame_displayed",
|
||||||
GTK_SIGNAL_FUNC (gst_play_frame_displayed), play);
|
GTK_SIGNAL_FUNC (gst_play_frame_displayed), play);
|
||||||
|
gtk_signal_connect (GTK_OBJECT (priv->video_show), "have_size",
|
||||||
|
GTK_SIGNAL_FUNC (gst_play_have_size), play);
|
||||||
|
|
||||||
|
colorspace = gst_elementfactory_make ("colorspace", "colorspace");
|
||||||
|
gst_bin_add (GST_BIN (priv->video_element), colorspace);
|
||||||
|
gst_bin_add (GST_BIN (priv->video_element), priv->video_show);
|
||||||
|
|
||||||
|
gst_element_connect (colorspace, "src", priv->video_show, "sink");
|
||||||
|
gst_element_add_ghost_pad (priv->video_element,
|
||||||
|
gst_element_get_pad (colorspace, "sink"),
|
||||||
|
"sink");
|
||||||
|
|
||||||
play->state = GST_PLAY_STOPPED;
|
play->state = GST_PLAY_STOPPED;
|
||||||
play->flags = 0;
|
play->flags = 0;
|
||||||
|
@ -158,10 +173,21 @@ static void
|
||||||
gst_play_eos (GstElement *element,
|
gst_play_eos (GstElement *element,
|
||||||
GstPlay *play)
|
GstPlay *play)
|
||||||
{
|
{
|
||||||
g_print("gstplay: eos reached\n");
|
GST_DEBUG(0, "gstplay: eos reached\n");
|
||||||
gst_play_stop(play);
|
gst_play_stop(play);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
gst_play_have_size (GstElement *element, guint width, guint height,
|
||||||
|
GstPlay *play)
|
||||||
|
{
|
||||||
|
GstPlayPrivate *priv;
|
||||||
|
|
||||||
|
priv = (GstPlayPrivate *)play->priv;
|
||||||
|
|
||||||
|
gtk_widget_set_usize (priv->video_widget, width, height);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_play_frame_displayed (GstElement *element,
|
gst_play_frame_displayed (GstElement *element,
|
||||||
GstPlay *play)
|
GstPlay *play)
|
||||||
|
@ -175,7 +201,7 @@ gst_play_frame_displayed (GstElement *element,
|
||||||
if (!stolen) {
|
if (!stolen) {
|
||||||
gtk_widget_realize (priv->video_widget);
|
gtk_widget_realize (priv->video_widget);
|
||||||
gtk_socket_steal (GTK_SOCKET (priv->video_widget),
|
gtk_socket_steal (GTK_SOCKET (priv->video_widget),
|
||||||
gst_util_get_int_arg (GTK_OBJECT(priv->video_element), "xid"));
|
gst_util_get_int_arg (GTK_OBJECT(priv->video_show), "xid"));
|
||||||
gtk_widget_show (priv->video_widget);
|
gtk_widget_show (priv->video_widget);
|
||||||
stolen = TRUE;
|
stolen = TRUE;
|
||||||
}
|
}
|
||||||
|
@ -214,7 +240,7 @@ gst_play_object_introspect (GstObject *object,
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
*target = element;
|
*target = element;
|
||||||
g_print("gstplay: using element \"%s\" for %s property\n",
|
GST_DEBUG(0, "gstplay: using element \"%s\" for %s property\n",
|
||||||
gst_element_get_name(element), property);
|
gst_element_get_name(element), property);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -396,7 +422,6 @@ gst_play_realize (GtkWidget *widget)
|
||||||
GstPlayPrivate *priv;
|
GstPlayPrivate *priv;
|
||||||
|
|
||||||
g_return_if_fail (GST_IS_PLAY (widget));
|
g_return_if_fail (GST_IS_PLAY (widget));
|
||||||
g_print ("gst_play: realize\n");
|
|
||||||
|
|
||||||
play = GST_PLAY (widget);
|
play = GST_PLAY (widget);
|
||||||
priv = (GstPlayPrivate *)play->priv;
|
priv = (GstPlayPrivate *)play->priv;
|
||||||
|
|
|
@ -14,6 +14,7 @@ struct _GstPlayPrivate {
|
||||||
GstElement *thread;
|
GstElement *thread;
|
||||||
GstElement *bin;
|
GstElement *bin;
|
||||||
GstElement *video_element, *audio_element;
|
GstElement *video_element, *audio_element;
|
||||||
|
GstElement *video_show;
|
||||||
GtkWidget *video_widget;
|
GtkWidget *video_widget;
|
||||||
GstElement *src;
|
GstElement *src;
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
#include <gst/gstcpu.h>
|
#include <gst/gst.h>
|
||||||
#include "gstidct.h"
|
#include "gstidct.h"
|
||||||
#include "dct.h"
|
#include "dct.h"
|
||||||
|
|
||||||
|
@ -53,38 +53,38 @@ GstIDCT *gst_idct_new(GstIDCTMethod method)
|
||||||
|
|
||||||
switch (method) {
|
switch (method) {
|
||||||
case GST_IDCT_FAST_INT:
|
case GST_IDCT_FAST_INT:
|
||||||
g_print("GstIDCT: using fast_int_idct\n");
|
GST_INFO (GST_CAT_PLUGIN_INFO, "GstIDCT: using fast_int_idct\n");
|
||||||
gst_idct_init_fast_int_idct();
|
gst_idct_init_fast_int_idct();
|
||||||
new->convert = gst_idct_fast_int_idct;
|
new->convert = gst_idct_fast_int_idct;
|
||||||
break;
|
break;
|
||||||
case GST_IDCT_INT:
|
case GST_IDCT_INT:
|
||||||
g_print("GstIDCT: using int_idct\n");
|
GST_INFO (GST_CAT_PLUGIN_INFO, "GstIDCT: using int_idct\n");
|
||||||
new->convert = gst_idct_int_idct;
|
new->convert = gst_idct_int_idct;
|
||||||
break;
|
break;
|
||||||
case GST_IDCT_FLOAT:
|
case GST_IDCT_FLOAT:
|
||||||
g_print("GstIDCT: using float_idct\n");
|
GST_INFO (GST_CAT_PLUGIN_INFO, "GstIDCT: using float_idct\n");
|
||||||
gst_idct_init_float_idct();
|
gst_idct_init_float_idct();
|
||||||
new->convert = gst_idct_float_idct;
|
new->convert = gst_idct_float_idct;
|
||||||
break;
|
break;
|
||||||
#ifdef HAVE_LIBMMX
|
#ifdef HAVE_LIBMMX
|
||||||
case GST_IDCT_MMX:
|
case GST_IDCT_MMX:
|
||||||
g_print("GstIDCT: using MMX_idct\n");
|
GST_INFO (GST_CAT_PLUGIN_INFO, "GstIDCT: using MMX_idct\n");
|
||||||
new->convert = gst_idct_mmx_idct;
|
new->convert = gst_idct_mmx_idct;
|
||||||
new->need_transpose = TRUE;
|
new->need_transpose = TRUE;
|
||||||
break;
|
break;
|
||||||
case GST_IDCT_MMX32:
|
case GST_IDCT_MMX32:
|
||||||
g_print("GstIDCT: using MMX32_idct\n");
|
GST_INFO (GST_CAT_PLUGIN_INFO, "GstIDCT: using MMX32_idct\n");
|
||||||
new->convert = gst_idct_mmx32_idct;
|
new->convert = gst_idct_mmx32_idct;
|
||||||
new->need_transpose = TRUE;
|
new->need_transpose = TRUE;
|
||||||
break;
|
break;
|
||||||
case GST_IDCT_SSE:
|
case GST_IDCT_SSE:
|
||||||
g_print("GstIDCT: using SSE_idct\n");
|
GST_INFO (GST_CAT_PLUGIN_INFO, "GstIDCT: using SSE_idct\n");
|
||||||
new->convert = gst_idct_sse_idct;
|
new->convert = gst_idct_sse_idct;
|
||||||
new->need_transpose = TRUE;
|
new->need_transpose = TRUE;
|
||||||
break;
|
break;
|
||||||
#endif /* HAVE_LIBMMX */
|
#endif /* HAVE_LIBMMX */
|
||||||
default:
|
default:
|
||||||
g_print("GstIDCT: method not supported\n");
|
GST_INFO (GST_CAT_PLUGIN_INFO, "GstIDCT: method not supported\n");
|
||||||
g_free(new);
|
g_free(new);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,8 +66,8 @@ static void gst_queue_set_arg (GtkObject *object, GtkArg *arg, guint id);
|
||||||
static void gst_queue_get_arg (GtkObject *object, GtkArg *arg, guint id);
|
static void gst_queue_get_arg (GtkObject *object, GtkArg *arg, guint id);
|
||||||
|
|
||||||
static gboolean gst_queue_handle_eos (GstPad *pad);
|
static gboolean gst_queue_handle_eos (GstPad *pad);
|
||||||
static GstPadNegotiateReturn gst_queue_handle_negotiate_src (GstPad *pad, GstCaps **caps, gint count);
|
static GstPadNegotiateReturn gst_queue_handle_negotiate_src (GstPad *pad, GstCaps **caps, gpointer *data);
|
||||||
static GstPadNegotiateReturn gst_queue_handle_negotiate_sink (GstPad *pad, GstCaps **caps, gint count);
|
static GstPadNegotiateReturn gst_queue_handle_negotiate_sink (GstPad *pad, GstCaps **caps, gpointer *data);
|
||||||
static void gst_queue_chain (GstPad *pad, GstBuffer *buf);
|
static void gst_queue_chain (GstPad *pad, GstBuffer *buf);
|
||||||
static GstBuffer * gst_queue_get (GstPad *pad);
|
static GstBuffer * gst_queue_get (GstPad *pad);
|
||||||
|
|
||||||
|
@ -153,20 +153,20 @@ gst_queue_init (GstQueue *queue)
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstPadNegotiateReturn
|
static GstPadNegotiateReturn
|
||||||
gst_queue_handle_negotiate_src (GstPad *pad, GstCaps **caps, gint counter)
|
gst_queue_handle_negotiate_src (GstPad *pad, GstCaps **caps, gpointer *data)
|
||||||
{
|
{
|
||||||
GstQueue *queue;
|
GstQueue *queue;
|
||||||
|
|
||||||
queue = GST_QUEUE (GST_OBJECT_PARENT (pad));
|
queue = GST_QUEUE (GST_OBJECT_PARENT (pad));
|
||||||
|
|
||||||
return gst_pad_negotiate_proxy (pad, queue->sinkpad, caps, counter);
|
return gst_pad_negotiate_proxy (pad, queue->sinkpad, caps);
|
||||||
|
|
||||||
|
|
||||||
//return GST_PAD_NEGOTIATE_FAIL;
|
//return GST_PAD_NEGOTIATE_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstPadNegotiateReturn
|
static GstPadNegotiateReturn
|
||||||
gst_queue_handle_negotiate_sink (GstPad *pad, GstCaps **caps, gint counter)
|
gst_queue_handle_negotiate_sink (GstPad *pad, GstCaps **caps, gpointer *data)
|
||||||
{
|
{
|
||||||
GstQueue *queue;
|
GstQueue *queue;
|
||||||
|
|
||||||
|
@ -179,7 +179,7 @@ gst_queue_handle_negotiate_sink (GstPad *pad, GstCaps **caps, gint counter)
|
||||||
}
|
}
|
||||||
if (*caps) {
|
if (*caps) {
|
||||||
*/
|
*/
|
||||||
return gst_pad_negotiate_proxy (pad, queue->srcpad, caps, counter);
|
return gst_pad_negotiate_proxy (pad, queue->srcpad, caps);
|
||||||
/*
|
/*
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ void mpeg2parse_newpad(GstElement *parser,GstPad *pad, GstElement *pipeline) {
|
||||||
int main(int argc,char *argv[]) {
|
int main(int argc,char *argv[]) {
|
||||||
GstPipeline *pipeline;
|
GstPipeline *pipeline;
|
||||||
GstElement *src, *parse;
|
GstElement *src, *parse;
|
||||||
GstElement *decode, *show, *thread;
|
GstElement *decode, *show, *thread, *color;
|
||||||
GtkWidget *gtk_socket;
|
GtkWidget *gtk_socket;
|
||||||
|
|
||||||
g_print("have %d args\n",argc);
|
g_print("have %d args\n",argc);
|
||||||
|
@ -75,6 +75,9 @@ int main(int argc,char *argv[]) {
|
||||||
decode = gst_elementfactory_make("mpeg2dec","decode_video");
|
decode = gst_elementfactory_make("mpeg2dec","decode_video");
|
||||||
g_return_val_if_fail(decode != NULL, -1);
|
g_return_val_if_fail(decode != NULL, -1);
|
||||||
|
|
||||||
|
color = gst_elementfactory_make("colorspace","color");
|
||||||
|
g_return_val_if_fail(color != NULL, -1);
|
||||||
|
|
||||||
show = gst_elementfactory_make("xvideosink","show");
|
show = gst_elementfactory_make("xvideosink","show");
|
||||||
//gtk_object_set(GTK_OBJECT(show),"xv_enabled",FALSE,NULL);
|
//gtk_object_set(GTK_OBJECT(show),"xv_enabled",FALSE,NULL);
|
||||||
g_return_val_if_fail(show != NULL, -1);
|
g_return_val_if_fail(show != NULL, -1);
|
||||||
|
@ -97,6 +100,7 @@ int main(int argc,char *argv[]) {
|
||||||
|
|
||||||
//gst_bin_add(GST_BIN(thread),GST_ELEMENT(parse2));
|
//gst_bin_add(GST_BIN(thread),GST_ELEMENT(parse2));
|
||||||
gst_bin_add(GST_BIN(thread),GST_ELEMENT(decode));
|
gst_bin_add(GST_BIN(thread),GST_ELEMENT(decode));
|
||||||
|
gst_bin_add(GST_BIN(thread),GST_ELEMENT(color));
|
||||||
gst_bin_add(GST_BIN(thread),GST_ELEMENT(show));
|
gst_bin_add(GST_BIN(thread),GST_ELEMENT(show));
|
||||||
|
|
||||||
gst_bin_add(GST_BIN(pipeline),GST_ELEMENT(thread));
|
gst_bin_add(GST_BIN(pipeline),GST_ELEMENT(thread));
|
||||||
|
@ -113,6 +117,8 @@ int main(int argc,char *argv[]) {
|
||||||
//gst_pad_connect(gst_element_get_pad(parse2,"src"),
|
//gst_pad_connect(gst_element_get_pad(parse2,"src"),
|
||||||
gst_element_get_pad(decode,"sink"));
|
gst_element_get_pad(decode,"sink"));
|
||||||
gst_pad_connect(gst_element_get_pad(decode,"src"),
|
gst_pad_connect(gst_element_get_pad(decode,"src"),
|
||||||
|
gst_element_get_pad(color,"sink"));
|
||||||
|
gst_pad_connect(gst_element_get_pad(color,"src"),
|
||||||
gst_element_get_pad(show,"sink"));
|
gst_element_get_pad(show,"sink"));
|
||||||
|
|
||||||
gtk_widget_show_all(appwindow);
|
gtk_widget_show_all(appwindow);
|
||||||
|
|
|
@ -13,7 +13,7 @@ void eos(GstElement *element)
|
||||||
|
|
||||||
int main(int argc,char *argv[])
|
int main(int argc,char *argv[])
|
||||||
{
|
{
|
||||||
GstElement *bin, *disksrc, *parse, *decoder, *downmix, *mulaw, *osssink;
|
GstElement *bin, *disksrc, *parse, *decoder, *downmix, *mulaw, *mulawdec, *osssink;
|
||||||
|
|
||||||
gst_init(&argc,&argv);
|
gst_init(&argc,&argv);
|
||||||
|
|
||||||
|
@ -36,6 +36,7 @@ int main(int argc,char *argv[])
|
||||||
decoder = gst_elementfactory_make("mpg123","decoder");
|
decoder = gst_elementfactory_make("mpg123","decoder");
|
||||||
downmix = gst_elementfactory_make("stereo2mono","stereo2mono");
|
downmix = gst_elementfactory_make("stereo2mono","stereo2mono");
|
||||||
mulaw = gst_elementfactory_make("mulawencode","mulaw");
|
mulaw = gst_elementfactory_make("mulawencode","mulaw");
|
||||||
|
mulawdec = gst_elementfactory_make("mulawdecode","mulawdec");
|
||||||
/* and an audio sink */
|
/* and an audio sink */
|
||||||
osssink = gst_elementfactory_make("osssink", "play_audio");
|
osssink = gst_elementfactory_make("osssink", "play_audio");
|
||||||
|
|
||||||
|
@ -45,6 +46,7 @@ int main(int argc,char *argv[])
|
||||||
gst_bin_add(GST_BIN(bin), decoder);
|
gst_bin_add(GST_BIN(bin), decoder);
|
||||||
gst_bin_add(GST_BIN(bin), downmix);
|
gst_bin_add(GST_BIN(bin), downmix);
|
||||||
gst_bin_add(GST_BIN(bin), mulaw);
|
gst_bin_add(GST_BIN(bin), mulaw);
|
||||||
|
gst_bin_add(GST_BIN(bin), mulawdec);
|
||||||
gst_bin_add(GST_BIN(bin), osssink);
|
gst_bin_add(GST_BIN(bin), osssink);
|
||||||
|
|
||||||
/* connect src to sink */
|
/* connect src to sink */
|
||||||
|
@ -57,6 +59,8 @@ int main(int argc,char *argv[])
|
||||||
gst_pad_connect(gst_element_get_pad(downmix,"src"),
|
gst_pad_connect(gst_element_get_pad(downmix,"src"),
|
||||||
gst_element_get_pad(mulaw,"sink"));
|
gst_element_get_pad(mulaw,"sink"));
|
||||||
gst_pad_connect(gst_element_get_pad(mulaw,"src"),
|
gst_pad_connect(gst_element_get_pad(mulaw,"src"),
|
||||||
|
gst_element_get_pad(mulawdec,"sink"));
|
||||||
|
gst_pad_connect(gst_element_get_pad(mulawdec,"src"),
|
||||||
gst_element_get_pad(osssink,"sink"));
|
gst_element_get_pad(osssink,"sink"));
|
||||||
|
|
||||||
/* start playing */
|
/* start playing */
|
||||||
|
@ -76,6 +80,7 @@ int main(int argc,char *argv[])
|
||||||
gst_object_destroy(GST_OBJECT(decoder));
|
gst_object_destroy(GST_OBJECT(decoder));
|
||||||
gst_object_destroy(GST_OBJECT(downmix));
|
gst_object_destroy(GST_OBJECT(downmix));
|
||||||
gst_object_destroy(GST_OBJECT(mulaw));
|
gst_object_destroy(GST_OBJECT(mulaw));
|
||||||
|
gst_object_destroy(GST_OBJECT(mulawdec));
|
||||||
gst_object_destroy(GST_OBJECT(disksrc));
|
gst_object_destroy(GST_OBJECT(disksrc));
|
||||||
gst_object_destroy(GST_OBJECT(bin));
|
gst_object_destroy(GST_OBJECT(bin));
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue