diff options
author | Jan Schmidt <thaytan@mad.scientist.com> | 2004-05-12 14:53:58 +0000 |
---|---|---|
committer | Jan Schmidt <thaytan@mad.scientist.com> | 2004-05-12 14:53:58 +0000 |
commit | 3b47dd30d634d9797a170b372c765a22897aa3c3 (patch) | |
tree | 89ca148d3a0d4e29b94ca6f79a05f36ee5d84903 /gst/videodrop | |
parent | cbc28f86f9621ac9a902b0a98d6301b20e46d21d (diff) | |
download | gst-plugins-bad-3b47dd30d634d9797a170b372c765a22897aa3c3.tar.gz gst-plugins-bad-3b47dd30d634d9797a170b372c765a22897aa3c3.tar.bz2 gst-plugins-bad-3b47dd30d634d9797a170b372c765a22897aa3c3.zip |
ext/audiofile/gstafsrc.c: Remove old debug output
Original commit message from CVS:
* ext/audiofile/gstafsrc.c: (gst_afsrc_get):
Remove old debug output
* ext/dv/gstdvdec.c: (gst_dvdec_quality_get_type),
(gst_dvdec_class_init), (gst_dvdec_loop), (gst_dvdec_change_state),
(gst_dvdec_set_property), (gst_dvdec_get_property):
Change the quality setting to an enum, so it works from gst-launch
Don't renegotiate a non-linked pad. Allows audio only decoding.
* gst/deinterlace/gstdeinterlace.c: (gst_deinterlace_getcaps),
(gst_deinterlace_link), (gst_deinterlace_init):
* gst/videodrop/gstvideodrop.c: (gst_videodrop_getcaps),
(gst_videodrop_link):
Some caps negotiation fixes
Diffstat (limited to 'gst/videodrop')
-rw-r--r-- | gst/videodrop/gstvideodrop.c | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/gst/videodrop/gstvideodrop.c b/gst/videodrop/gstvideodrop.c index e4f2e4ec..447a1bc7 100644 --- a/gst/videodrop/gstvideodrop.c +++ b/gst/videodrop/gstvideodrop.c @@ -162,9 +162,9 @@ gst_videodrop_getcaps (GstPad * pad) gst_structure_set (structure, "framerate", GST_TYPE_DOUBLE_RANGE, 0.0, G_MAXDOUBLE, NULL); } - if (negotiated) { - for (i = 0; i < gst_caps_get_size (caps); i++) { - structure = gst_caps_get_structure (caps, i); + if ((negotiated) && (videodrop->speed != 1.0)) { + for (i = 0; i < gst_caps_get_size (copy2); i++) { + structure = gst_caps_get_structure (copy2, i); gst_structure_set (structure, "framerate", G_TYPE_DOUBLE, otherfps * videodrop->speed, NULL); @@ -195,14 +195,30 @@ gst_videodrop_link (GstPad * pad, const GstCaps * caps) ret = gst_structure_get_double (structure, "framerate", &fps); if (!ret) return GST_PAD_LINK_REFUSED; + if (pad == videodrop->srcpad) { - videodrop->from_fps = fps; - } else { videodrop->to_fps = fps; + } else { + videodrop->from_fps = fps; } if (gst_pad_is_negotiated (otherpad)) { - gst_pad_renegotiate (otherpad); + /* + * Ensure that the other side talks the format we're trying to set + */ + GstCaps *newcaps = gst_caps_copy (caps); + + if (pad == videodrop->srcpad) { + gst_caps_set_simple (newcaps, + "framerate", G_TYPE_DOUBLE, videodrop->from_fps, NULL); + } else { + gst_caps_set_simple (newcaps, + "framerate", G_TYPE_DOUBLE, videodrop->to_fps, NULL); + } + ret = gst_pad_try_set_caps (otherpad, newcaps); + if (GST_PAD_LINK_FAILED (ret)) { + return GST_PAD_LINK_REFUSED; + } } return GST_PAD_LINK_OK; |