diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2014-07-11 10:39:23 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2014-07-11 10:39:23 +0200 |
commit | 98dca7e37c70596c7df3a5e1f4297c1318c18fa6 (patch) | |
tree | 43085fd67df0b8f42cfd4acca9cf9470b9b86cf5 /plugins | |
parent | 1bbd5ecf7f548d679a199bb1a301df305ce598a9 (diff) |
Imported Upstream version 1.3.91upstream/1.3.91
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/elements/gstfdsrc.c | 7 | ||||
-rw-r--r-- | plugins/elements/gstfilesrc.c | 2 | ||||
-rw-r--r-- | plugins/elements/gstidentity.c | 23 | ||||
-rw-r--r-- | plugins/elements/gsttee.c | 2 |
4 files changed, 31 insertions, 3 deletions
diff --git a/plugins/elements/gstfdsrc.c b/plugins/elements/gstfdsrc.c index ec7cc35..82b8344 100644 --- a/plugins/elements/gstfdsrc.c +++ b/plugins/elements/gstfdsrc.c @@ -631,13 +631,18 @@ gst_fd_src_uri_set_uri (GstURIHandler * handler, const gchar * uri, protocol = gst_uri_get_protocol (uri); if (strcmp (protocol, "fd") != 0) { + g_set_error (err, GST_URI_ERROR, GST_URI_ERROR_BAD_URI, + "Wrong protocol for fdsrc in uri: '%s'", uri); g_free (protocol); return FALSE; } g_free (protocol); - if (sscanf (uri, "fd://%d", &fd) != 1 || fd < 0) + if (sscanf (uri, "fd://%d", &fd) != 1 || fd < 0) { + g_set_error (err, GST_URI_ERROR, GST_URI_ERROR_BAD_URI, + "Bad file descriptor number in uri: '%s'", uri); return FALSE; + } if ((q = g_strstr_len (uri, -1, "?"))) { gchar *sp; diff --git a/plugins/elements/gstfilesrc.c b/plugins/elements/gstfilesrc.c index 3141883..164e3a9 100644 --- a/plugins/elements/gstfilesrc.c +++ b/plugins/elements/gstfilesrc.c @@ -28,7 +28,7 @@ * <refsect2> * <title>Example launch line</title> * |[ - * gst-launch filesrc location=song.ogg ! decodebin2 ! autoaudiosink + * gst-launch filesrc location=song.ogg ! decodebin ! autoaudiosink * ]| Play a song.ogg from local dir. * </refsect2> */ diff --git a/plugins/elements/gstidentity.c b/plugins/elements/gstidentity.c index 4151dad..dbc9494 100644 --- a/plugins/elements/gstidentity.c +++ b/plugins/elements/gstidentity.c @@ -110,6 +110,8 @@ static gboolean gst_identity_start (GstBaseTransform * trans); static gboolean gst_identity_stop (GstBaseTransform * trans); static GstStateChangeReturn gst_identity_change_state (GstElement * element, GstStateChange transition); +static gboolean gst_identity_accept_caps (GstBaseTransform * base, + GstPadDirection direction, GstCaps * caps); static guint gst_identity_signals[LAST_SIGNAL] = { 0 }; @@ -235,6 +237,8 @@ gst_identity_class_init (GstIdentityClass * klass) GST_DEBUG_FUNCPTR (gst_identity_transform_ip); gstbasetrans_class->start = GST_DEBUG_FUNCPTR (gst_identity_start); gstbasetrans_class->stop = GST_DEBUG_FUNCPTR (gst_identity_stop); + gstbasetrans_class->accept_caps = + GST_DEBUG_FUNCPTR (gst_identity_accept_caps); } static void @@ -745,6 +749,25 @@ gst_identity_stop (GstBaseTransform * trans) return TRUE; } +static gboolean +gst_identity_accept_caps (GstBaseTransform * base, + GstPadDirection direction, GstCaps * caps) +{ + gboolean ret; + GstPad *pad; + + /* Proxy accept-caps */ + + if (direction == GST_PAD_SRC) + pad = GST_BASE_TRANSFORM_SINK_PAD (base); + else + pad = GST_BASE_TRANSFORM_SRC_PAD (base); + + ret = gst_pad_peer_query_accept_caps (pad, caps); + + return ret; +} + static GstStateChangeReturn gst_identity_change_state (GstElement * element, GstStateChange transition) { diff --git a/plugins/elements/gsttee.c b/plugins/elements/gsttee.c index fac7bbb..81fcea7 100644 --- a/plugins/elements/gsttee.c +++ b/plugins/elements/gsttee.c @@ -37,7 +37,7 @@ * <refsect2> * <title>Example launch line</title> * |[ - * gst-launch filesrc location=song.ogg ! decodebin2 ! tee name=t ! queue ! autoaudiosink t. ! queue ! audioconvert ! goom ! videoconvert ! autovideosink + * gst-launch filesrc location=song.ogg ! decodebin ! tee name=t ! queue ! autoaudiosink t. ! queue ! audioconvert ! goom ! videoconvert ! autovideosink * ]| Play a song.ogg from local dir and render visualisations using the goom * element. * </refsect2> |