+2006-10-02 Wim Taymans <wim@fluendo.com>
+
+ Patch by: mrcgran <mrc.gran at gmail dot com>
+
+ * gst/gstghostpad.c: (gst_proxy_pad_do_getcaps):
+ Filter the proxied caps against the padtemplate if we have one.
+
+ * gst/gstquery.c: (gst_query_new_segment):
+ Add include for gstinfo.h so that compilation with
+ -DGST_DISABLE_GST_DEBUG works again. Fixes #358436.
+
2006-10-02 Wim Taymans <wim@fluendo.com>
Patch by: Alessandro Decina <alessandro at nnva org>
*/
#include "gst_private.h"
+#include "gstinfo.h"
#include "gstghostpad.h"
{
GstPad *target = gst_proxy_pad_get_target (pad);
GstCaps *res;
+ GstPadTemplate *templ = GST_PAD_PAD_TEMPLATE (pad);
if (target) {
/* if we have a real target, proxy the call */
- GST_DEBUG_OBJECT (pad, "get caps of target");
res = gst_pad_get_caps (target);
gst_object_unref (target);
- } else {
- GstPadTemplate *templ = GST_PAD_PAD_TEMPLATE (pad);
- /* else, if we have a template, use that */
+ GST_DEBUG_OBJECT (pad, "get caps of target: %" GST_PTR_FORMAT, res);
+
+ /* filter against the template */
+ if (templ && res) {
+ GstCaps *filt, *tmp;
+
+ filt = GST_PAD_TEMPLATE_CAPS (templ);
+ if (filt) {
+ tmp = gst_caps_intersect (filt, res);
+ gst_caps_unref (res);
+ res = tmp;
+ GST_DEBUG_OBJECT (pad,
+ "filtered against template gives %" GST_PTR_FORMAT, res);
+ }
+ }
+ } else {
+ /* else, if we have a template, use its caps. */
if (templ) {
res = GST_PAD_TEMPLATE_CAPS (templ);
GST_DEBUG_OBJECT (pad,
* Last reviewed on 2006-02-14 (0.10.4)
*/
-#include "gst_private.h"
#include <string.h>
+
+#include "gst_private.h"
+#include "gstinfo.h"
#include "gstquery.h"
#include "gstvalue.h"
#include "gstenumtypes.h"