mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-22 07:08:23 +00:00
gst/gstghostpad.c: Filter the proxied caps against the padtemplate if we have one.
Original commit message from CVS: 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.
This commit is contained in:
parent
ec3194dc54
commit
bae90f5955
3 changed files with 33 additions and 5 deletions
11
ChangeLog
11
ChangeLog
|
@ -1,3 +1,14 @@
|
||||||
|
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>
|
2006-10-02 Wim Taymans <wim@fluendo.com>
|
||||||
|
|
||||||
Patch by: Alessandro Decina <alessandro at nnva org>
|
Patch by: Alessandro Decina <alessandro at nnva org>
|
||||||
|
|
|
@ -45,6 +45,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "gst_private.h"
|
#include "gst_private.h"
|
||||||
|
#include "gstinfo.h"
|
||||||
|
|
||||||
#include "gstghostpad.h"
|
#include "gstghostpad.h"
|
||||||
|
|
||||||
|
@ -218,16 +219,30 @@ gst_proxy_pad_do_getcaps (GstPad * pad)
|
||||||
{
|
{
|
||||||
GstPad *target = gst_proxy_pad_get_target (pad);
|
GstPad *target = gst_proxy_pad_get_target (pad);
|
||||||
GstCaps *res;
|
GstCaps *res;
|
||||||
|
GstPadTemplate *templ = GST_PAD_PAD_TEMPLATE (pad);
|
||||||
|
|
||||||
if (target) {
|
if (target) {
|
||||||
/* if we have a real target, proxy the call */
|
/* if we have a real target, proxy the call */
|
||||||
GST_DEBUG_OBJECT (pad, "get caps of target");
|
|
||||||
res = gst_pad_get_caps (target);
|
res = gst_pad_get_caps (target);
|
||||||
gst_object_unref (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) {
|
if (templ) {
|
||||||
res = GST_PAD_TEMPLATE_CAPS (templ);
|
res = GST_PAD_TEMPLATE_CAPS (templ);
|
||||||
GST_DEBUG_OBJECT (pad,
|
GST_DEBUG_OBJECT (pad,
|
||||||
|
|
|
@ -59,8 +59,10 @@
|
||||||
* Last reviewed on 2006-02-14 (0.10.4)
|
* Last reviewed on 2006-02-14 (0.10.4)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "gst_private.h"
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
#include "gst_private.h"
|
||||||
|
#include "gstinfo.h"
|
||||||
#include "gstquery.h"
|
#include "gstquery.h"
|
||||||
#include "gstvalue.h"
|
#include "gstvalue.h"
|
||||||
#include "gstenumtypes.h"
|
#include "gstenumtypes.h"
|
||||||
|
|
Loading…
Reference in a new issue