From e5d298f4f449cc4bfe8005b58e41e13ac248f6b9 Mon Sep 17 00:00:00 2001 From: Thomas Vander Stichele Date: Wed, 31 Aug 2005 15:27:55 +0000 Subject: [PATCH] docs/faq/gst-uninstalled: add -good Original commit message from CVS: * docs/faq/gst-uninstalled: add -good * gst/gstevent.c: * gst/gstevent.h: remove wrong docs * gst/gstutils.c: (gst_element_link_filtered): * gst/gstutils.h: add gst_element_link_filtered --- ChangeLog | 11 +++++++++++ docs/faq/gst-uninstalled | 2 +- gst/gstevent.c | 4 ++-- gst/gstevent.h | 21 --------------------- gst/gstutils.c | 21 +++++++++++++++++++++ gst/gstutils.h | 3 +++ 6 files changed, 38 insertions(+), 24 deletions(-) diff --git a/ChangeLog b/ChangeLog index b7079a2ab8..69788ac553 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2005-08-31 Thomas Vander Stichele + + * docs/faq/gst-uninstalled: + add -good + * gst/gstevent.c: + * gst/gstevent.h: + remove wrong docs + * gst/gstutils.c: (gst_element_link_filtered): + * gst/gstutils.h: + add gst_element_link_filtered + 2005-08-31 Stefan Kost * docs/gst/gstreamer-docs.sgml: diff --git a/docs/faq/gst-uninstalled b/docs/faq/gst-uninstalled index f5c33b1a48..55237be1a2 100755 --- a/docs/faq/gst-uninstalled +++ b/docs/faq/gst-uninstalled @@ -43,7 +43,7 @@ PATH=$GST/gstreamer/tools:$GST/gst-plugins/tools:$GST/gst-player/src:$GST/gst-ed # /some/path: makes the dynamic linker look in . too, so avoid this export LD_LIBRARY_PATH=$GST/prefix/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} export PKG_CONFIG_PATH=$GST/prefix/lib/pkgconfig:$GST/gstreamer/pkgconfig:$GST/gst-plugins/pkgconfig:$GST/gst-plugins-base/pkgconfig:$GST/gst-python/pkgconfig:$PKG_CONFIG_PATH -export GST_PLUGIN_PATH=$GST/gstreamer:$GST/gst-plugins:$GST/gst-plugins-base:$GST/gst-ffmpeg:$GST/gst-monkeysaudio:$GST/plugins:$GST_PLUGIN_PATH +export GST_PLUGIN_PATH=$GST/gstreamer:$GST/gst-plugins:$GST/gst-plugins-base:$GST/gst-plugins-good:$GST/gst-plugins-ugly:$GST/gst-ffmpeg:$GST/gst-monkeysaudio:$GST/plugins:$GST_PLUGIN_PATH export MANPATH=$GST/gstreamer/tools:$GST/prefix/share/man:$MANPATH pythonver=`python -c "import sys; print sys.version[:3]"` export PYTHONPATH=$GST/gst-python:$GST/prefix/lib/python$pythonver/site-packages:$PYTHONPATH diff --git a/gst/gstevent.c b/gst/gstevent.c index 76189883c3..e323998ddc 100644 --- a/gst/gstevent.c +++ b/gst/gstevent.c @@ -31,7 +31,7 @@ * provided macros. The event should be unreferenced with gst_event_unref(). * * gst_event_new_seek() is a usually used to create a seek event and it takes - * the needed parameters for a seek event. + * the needed parameters for a seek event. * * gst_event_new_flush() creates a new flush event. */ @@ -489,7 +489,7 @@ gst_event_parse_qos (GstEvent * event, gdouble * proportion, * * Allocate a new seek event with the given parameters. * - * The seek event configures playback of the pipeline from + * The seek event configures playback of the pipeline from * @cur to @stop at the speed given in @rate. * The @cur and @stop values are expressed in format @format. * diff --git a/gst/gstevent.h b/gst/gstevent.h index 82384b1d11..5c99ce2c2a 100644 --- a/gst/gstevent.h +++ b/gst/gstevent.h @@ -156,27 +156,6 @@ typedef struct _GstEventClass GstEventClass; * a seek method and optional flags are OR-ed together. The seek event is then * inserted into the graph with #gst_pad_send_event() or * #gst_element_send_event(). - - * Following example illustrates how to insert a seek event (1 second in the stream) - * in a pipeline. - * - * Insertion of a seek event into a pipeline - * - * gboolean res; - * GstEvent *event; - * - * event = gst_event_new_seek ( - * GST_FORMAT_TIME | // seek on time - * GST_SEEK_METHOD_SET | // set the absolute position - * GST_SEEK_FLAG_FLUSH, // flush any pending data - * 1 * GST_SECOND); // the seek offset (1 second) - * - * res = gst_element_send_event (GST_ELEMENT (osssink), event); - * if (!res) { - * g_warning ("seek failed"); - * } - * - * */ typedef enum { /* one of these */ diff --git a/gst/gstutils.c b/gst/gstutils.c index 05bb0f33bc..f217e2c54f 100644 --- a/gst/gstutils.c +++ b/gst/gstutils.c @@ -1374,6 +1374,27 @@ gst_element_link_many (GstElement * element_1, GstElement * element_2, ...) return TRUE; } +/** + * gst_element_link_filtered: + * @src: a #GstElement containing the source pad. + * @dest: the #GstElement containing the destination pad. + * @filter: the #GstCaps to filter the link, or #NULL for no filter. + * + * Links @src to @dest using the given caps as filtercaps. + * The link must be from source to + * destination; the other direction will not be tried. The function looks for + * existing pads that aren't linked yet. It will request new pads if necessary. + * If multiple links are possible, only one is established. + * + * Returns: TRUE if the pads could be linked, FALSE otherwise. + */ +gboolean +gst_element_link_filtered (GstElement * src, GstElement * dest, + GstCaps * filter) +{ + return gst_element_link_pads_filtered (src, NULL, dest, NULL, filter); +} + /** * gst_element_unlink_pads: * @src: a #GstElement containing the source pad. diff --git a/gst/gstutils.h b/gst/gstutils.h index 501b855243..777e3de5b6 100644 --- a/gst/gstutils.h +++ b/gst/gstutils.h @@ -297,6 +297,9 @@ G_CONST_RETURN gchar* gst_element_state_get_name (GstElementState state); gboolean gst_element_link (GstElement *src, GstElement *dest); gboolean gst_element_link_many (GstElement *element_1, GstElement *element_2, ...); +gboolean gst_element_link_filtered (GstElement * src, + GstElement * dest, + GstCaps *filter); void gst_element_unlink (GstElement *src, GstElement *dest); void gst_element_unlink_many (GstElement *element_1, GstElement *element_2, ...);