Fixes to get 'make check' working again.

Original commit message from CVS:
Fixes to get 'make check' working again.
This commit is contained in:
David Schleef 2003-12-21 22:04:45 +00:00
parent d229104260
commit e1eb5e2d92
15 changed files with 157 additions and 137 deletions

View file

@ -600,6 +600,9 @@ gchar *gst_caps2_to_string (const GstCaps2 *caps)
/* FIXME does this leak? */
if (caps == NULL) {
return g_strdup("NULL");
}
if(gst_caps2_is_any(caps)){
return g_strdup("ANY");
}
@ -688,13 +691,17 @@ static void _gst_caps2_value_init (GValue *value)
static void _gst_caps2_value_free (GValue *value)
{
gst_caps2_free (value->data[0].v_pointer);
if (value->data[0].v_pointer) gst_caps2_free (value->data[0].v_pointer);
}
static void _gst_caps2_value_copy (const GValue *src, GValue *dest)
{
gst_caps2_free (dest->data[0].v_pointer);
dest->data[0].v_pointer = gst_caps2_copy (src->data[0].v_pointer);
if (dest->data[0].v_pointer) {
gst_caps2_free (dest->data[0].v_pointer);
dest->data[0].v_pointer = gst_caps2_copy (src->data[0].v_pointer);
} else {
dest->data[0].v_pointer = NULL;
}
}
static gpointer _gst_caps2_value_peek_pointer (const GValue *value)

View file

@ -2689,7 +2689,9 @@ gst_pad_template_dispose (GObject *object)
GstPadTemplate *templ = GST_PAD_TEMPLATE (object);
g_free (GST_PAD_TEMPLATE_NAME_TEMPLATE (templ));
gst_caps2_free (GST_PAD_TEMPLATE_CAPS (templ));
if (GST_PAD_TEMPLATE_CAPS (templ)) {
gst_caps2_free (GST_PAD_TEMPLATE_CAPS (templ));
}
G_OBJECT_CLASS (padtemplate_parent_class)->dispose (object);
}

View file

@ -806,7 +806,8 @@ gst_value_intersect_list (GValue *dest, const GValue *value1, const GValue *valu
} else {
GValue temp = {0, };
g_value_copy (&temp, dest);
g_value_init (&temp, G_VALUE_TYPE(dest));
g_value_copy (dest, &temp);
g_value_unset (dest);
gst_value_list_concat (dest, &temp, &intersection);
}

View file

@ -172,7 +172,7 @@ gst_bstest_class_init (GstBsTestClass * klass)
}
static GstCaps2 *
gst_bstest_getcaps (GstPad *pad, const GstCaps2 *caps)
gst_bstest_getcaps (GstPad *pad)
{
GstBsTest *bstest = GST_BSTEST (gst_pad_get_parent (pad));
GstPad *otherpad;

View file

@ -3,60 +3,60 @@
/* these caps all have a non empty intersection */
GstStaticCaps2 sinkcaps = GST_STATIC_CAPS(
"video/mpeg, "
"mpegtype:int=(1,2)"
"mpegtype=(int)[1,2]"
);
GstStaticCaps2 mp1parsecaps = GST_STATIC_CAPS(
"video/mpeg, "
"mpegtype:int=(1)"
"mpegtype=(int)1"
);
GstStaticCaps2 rawcaps = GST_STATIC_CAPS(
"video/raw, "
"fourcc:fourcc=(\"YV12\", \"YUY2\"), "
"width:int=[16,4096], "
"height:int=[16,4096]"
"fourcc=(fourcc){YV12,YUY2}, "
"width=(int)[16,4096], "
"height=(int)[16,4096]"
);
GstStaticCaps2 rawcaps2 = GST_STATIC_CAPS(
"video/raw, "
"fourcc:fourcc=(\"YUY2\"), "
"height:int=[16,256]"
"fourcc=(fourcc)YUY2, "
"height=(int)[16,256]"
);
GstStaticCaps2 rawcaps3 = GST_STATIC_CAPS(
"video/raw, "
"fourcc:fourcc=(\"YV12\", \"YUY2\"), "
"height:int=[16,4096]"
"fourcc=(fourcc){YV12,YUY2}, "
"height=(int)[16,4096]"
);
#if 0
/* these caps aren't used yet */
GstStaticCaps2 rawcaps4 = GST_STATIC_CAPS(
"video/raw, "
"fourcc:fourcc=(\"YV12\", \"YUYV\"), "
"height:int=[16,4096]"
"fourcc=(fourcc){\"YV12\", \"YUYV\"}, "
"height=(int)[16,4096]"
);
GstStaticCaps2 rawcaps4 = GST_STATIC_CAPS(
"video/raw, "
"fourcc:fourcc=(\"YUYV\", \"YUY2\"), "
"height:int=[16,4096]"
"fourcc=(fourcc){\"YUYV\", \"YUY2\"}, "
"height=(int)[16,4096]"
);
#endif
GstStaticCaps2 rawcaps6 = GST_STATIC_CAPS(
"video/raw, "
"format:fourcc=\"I420\"; "
"format=(fourcc)\"I420\"; "
"video/raw, "
"format:fourcc=\"YUYV\""
"format=(fourcc)\"YUYV\""
);
GstStaticCaps2 rawcaps7 = GST_STATIC_CAPS(
"video/raw, "
"format:fourcc=\"I420\"; "
"format=(fourcc)\"I420\"; "
"video/raw, "
"format:fourcc=\"YV12\""
"format=(fourcc)\"YV12\""
);

View file

@ -3,63 +3,63 @@
/* these caps all have a non empty intersection */
GstStaticCaps2 sinkcaps = GST_STATIC_CAPS (
"video/mpeg, "
"mpegtype:int=1, "
"foo1:int=[20,40], "
"foo2:int=[20,40], "
"foo3:int=[10,20]"
"mpegtype=(int)1, "
"foo1=(int)[20,40], "
"foo2=(int)[20,40], "
"foo3=(int)[10,20]"
);
GstStaticCaps2 mp1parsecaps = GST_STATIC_CAPS (
"video/mpeg, "
"mpegtype:int=1, "
"foo1:int=30, "
"foo2:int=[20,30], "
"foo3:int=[20,30]"
"mpegtype=(int)1, "
"foo1=(int)30, "
"foo2=(int)[20,30], "
"foo3=(int)[20,30]"
);
GstStaticCaps2 rawcaps = GST_STATIC_CAPS (
"video/raw, "
"width:int=[16,4096], "
"height:int=[16,4096]"
"width=(int)[16,4096], "
"height=(int)[16,4096]"
);
GstStaticCaps2 rawcaps2 = GST_STATIC_CAPS (
"video/raw, "
"height:int=[16,256], "
"depth:int=16"
"height=(int)[16,256], "
"depth=(int)16"
);
GstStaticCaps2 rawcaps3 = GST_STATIC_CAPS (
"video/raw, "
"fourcc:fourcc=(\"YUY2\", \"YV12\" ), "
"height:int=[16,4096]"
"fourcc=(fourcc){\"YUY2\", \"YV12\" }, "
"height=(int)[16,4096]"
);
GstStaticCaps2 rawcaps4 = GST_STATIC_CAPS (
"video/raw, "
"fourcc:fourcc=(\"YUY2\",\"YV12\",\"YUYV\" ), "
"height:int=[16,4096]"
"fourcc=(fourcc){\"YUY2\",\"YV12\",\"YUYV\" }, "
"height=(int)[16,4096]"
);
GstStaticCaps2 rawcaps5 = GST_STATIC_CAPS (
"video/raw, "
"fourcc:fourcc=(\"YUYV\",\"YUY2\"), "
"height:int=[16,4096]"
"fourcc=(fourcc){\"YUYV\",\"YUY2\"}, "
"height=(int)[16,4096]"
);
GstStaticCaps2 rawcaps6 = GST_STATIC_CAPS (
"video/raw, "
"fourcc:fourcc=\"YUYV\", "
"height:int=640, "
"width:int=480, "
"framerate:double=30.0; "
"fourcc=(fourcc)\"YUYV\", "
"height=(int)640, "
"width=(int)480, "
"framerate=(double)30.0; "
"video/raw, "
"fourcc:fourcc=\"I420\", "
"height:int=640, "
"width:int=480, "
"framerate:double=30.0; "
"fourcc=(fourcc)\"I420\", "
"height=(int)640, "
"width=(int)480, "
"framerate=(double)30.0"
);
int

View file

@ -3,44 +3,44 @@
/* these caps all have a non empty intersection */
GstStaticCaps2 sinkcaps = GST_STATIC_CAPS (
"video/mpeg, "
"fourcc:fourcc={\"YV12\",\"YUY2\"}, "
"foo1:int=[20,40], "
"foo2:int=[20,40], "
"foo3:int=[10,20]"
"fourcc=(fourcc){\"YV12\",\"YUY2\"}, "
"foo1=(int)[20,40], "
"foo2=(int)[20,40], "
"foo3=(int)[10,20]"
);
GstStaticCaps2 mp1parsecaps = GST_STATIC_CAPS (
"video/mpeg, "
"fourcc:fourcc={\"YV12\",\"YUY2\"}, "
"foo4:fourcc={\"YV12\",\"YUY2\"}"
"fourcc=(fourcc){\"YV12\",\"YUY2\"}, "
"foo4=(fourcc){\"YV12\",\"YUY2\"}"
);
GstStaticCaps2 rawcaps = GST_STATIC_CAPS (
"video/raw, "
"width:int=[16,4096], "
"height:int=[16,4096], "
"fourcc:fourcc={\"YV12\",\"YUY2\"}"
"width=(int)[16,4096], "
"height=(int)[16,4096], "
"fourcc=(fourcc){\"YV12\",\"YUY2\"}"
);
GstStaticCaps2 rawcaps2 = GST_STATIC_CAPS (
"video/raw, "
"width:int=[16,256], "
"height:int=16; "
"width=(int)[16,256], "
"height=(int)16; "
"video/raw, "
"width:int=[16,256], "
"height:int=16"
"width=(int)[16,256], "
"height=(int)16"
);
GstStaticCaps2 rawcaps3 = GST_STATIC_CAPS (
"video/raw, "
"width:int=[16,256], "
"height:int=16; "
"width=(int)[16,256], "
"height=(int)16; "
"video/raw, "
"width:int=[16,256], "
"height:int=16; "
"width=(int)[16,256], "
"height=(int)16; "
"video/raw, "
"fourcc:fourcc={\"YV12\",\"YUY2\"}"
"height:int=[16,4096]"
"fourcc=(fourcc){\"YV12\",\"YUY2\"}, "
"height=(int)[16,4096]"
);
/* defined, not used

View file

@ -2,7 +2,7 @@ include ../Rules
tests_pass = \
value_compare value_intersect caps structure
value_compare value_intersect caps
tests_fail =

View file

@ -112,8 +112,13 @@ main (int argc, char *argv[])
/* now iterate and see if it proxies caps ok */
gst_bin_iterate (GST_BIN (pipeline));
sink_caps = gst_pad_get_caps (gst_element_get_pad (sink1, "sink"));
structure = gst_caps2_get_nth_cap (sink_caps, 0);
if (structure != NULL && ! (gst_structure_has_field (structure, "rate"))) {
if (sink_caps && gst_caps2_is_fixed (sink_caps)) {
structure = gst_caps2_get_nth_cap (sink_caps, 0);
}else {
structure = NULL;
g_print ("sink_caps is not fixed\n");
}
if (structure == NULL || !(gst_structure_has_field (structure, "rate"))) {
g_print ("Hm, rate has not been propagated to sink1.\n");
return 1;
} else {

View file

@ -172,7 +172,7 @@ gst_bstest_class_init (GstBsTestClass * klass)
}
static GstCaps2 *
gst_bstest_getcaps (GstPad *pad, const GstCaps2 *caps)
gst_bstest_getcaps (GstPad *pad)
{
GstBsTest *bstest = GST_BSTEST (gst_pad_get_parent (pad));
GstPad *otherpad;

View file

@ -3,60 +3,60 @@
/* these caps all have a non empty intersection */
GstStaticCaps2 sinkcaps = GST_STATIC_CAPS(
"video/mpeg, "
"mpegtype:int=(1,2)"
"mpegtype=(int)[1,2]"
);
GstStaticCaps2 mp1parsecaps = GST_STATIC_CAPS(
"video/mpeg, "
"mpegtype:int=(1)"
"mpegtype=(int)1"
);
GstStaticCaps2 rawcaps = GST_STATIC_CAPS(
"video/raw, "
"fourcc:fourcc=(\"YV12\", \"YUY2\"), "
"width:int=[16,4096], "
"height:int=[16,4096]"
"fourcc=(fourcc){YV12,YUY2}, "
"width=(int)[16,4096], "
"height=(int)[16,4096]"
);
GstStaticCaps2 rawcaps2 = GST_STATIC_CAPS(
"video/raw, "
"fourcc:fourcc=(\"YUY2\"), "
"height:int=[16,256]"
"fourcc=(fourcc)YUY2, "
"height=(int)[16,256]"
);
GstStaticCaps2 rawcaps3 = GST_STATIC_CAPS(
"video/raw, "
"fourcc:fourcc=(\"YV12\", \"YUY2\"), "
"height:int=[16,4096]"
"fourcc=(fourcc){YV12,YUY2}, "
"height=(int)[16,4096]"
);
#if 0
/* these caps aren't used yet */
GstStaticCaps2 rawcaps4 = GST_STATIC_CAPS(
"video/raw, "
"fourcc:fourcc=(\"YV12\", \"YUYV\"), "
"height:int=[16,4096]"
"fourcc=(fourcc){\"YV12\", \"YUYV\"}, "
"height=(int)[16,4096]"
);
GstStaticCaps2 rawcaps4 = GST_STATIC_CAPS(
"video/raw, "
"fourcc:fourcc=(\"YUYV\", \"YUY2\"), "
"height:int=[16,4096]"
"fourcc=(fourcc){\"YUYV\", \"YUY2\"}, "
"height=(int)[16,4096]"
);
#endif
GstStaticCaps2 rawcaps6 = GST_STATIC_CAPS(
"video/raw, "
"format:fourcc=\"I420\"; "
"format=(fourcc)\"I420\"; "
"video/raw, "
"format:fourcc=\"YUYV\""
"format=(fourcc)\"YUYV\""
);
GstStaticCaps2 rawcaps7 = GST_STATIC_CAPS(
"video/raw, "
"format:fourcc=\"I420\"; "
"format=(fourcc)\"I420\"; "
"video/raw, "
"format:fourcc=\"YV12\""
"format=(fourcc)\"YV12\""
);

View file

@ -3,63 +3,63 @@
/* these caps all have a non empty intersection */
GstStaticCaps2 sinkcaps = GST_STATIC_CAPS (
"video/mpeg, "
"mpegtype:int=1, "
"foo1:int=[20,40], "
"foo2:int=[20,40], "
"foo3:int=[10,20]"
"mpegtype=(int)1, "
"foo1=(int)[20,40], "
"foo2=(int)[20,40], "
"foo3=(int)[10,20]"
);
GstStaticCaps2 mp1parsecaps = GST_STATIC_CAPS (
"video/mpeg, "
"mpegtype:int=1, "
"foo1:int=30, "
"foo2:int=[20,30], "
"foo3:int=[20,30]"
"mpegtype=(int)1, "
"foo1=(int)30, "
"foo2=(int)[20,30], "
"foo3=(int)[20,30]"
);
GstStaticCaps2 rawcaps = GST_STATIC_CAPS (
"video/raw, "
"width:int=[16,4096], "
"height:int=[16,4096]"
"width=(int)[16,4096], "
"height=(int)[16,4096]"
);
GstStaticCaps2 rawcaps2 = GST_STATIC_CAPS (
"video/raw, "
"height:int=[16,256], "
"depth:int=16"
"height=(int)[16,256], "
"depth=(int)16"
);
GstStaticCaps2 rawcaps3 = GST_STATIC_CAPS (
"video/raw, "
"fourcc:fourcc=(\"YUY2\", \"YV12\" ), "
"height:int=[16,4096]"
"fourcc=(fourcc){\"YUY2\", \"YV12\" }, "
"height=(int)[16,4096]"
);
GstStaticCaps2 rawcaps4 = GST_STATIC_CAPS (
"video/raw, "
"fourcc:fourcc=(\"YUY2\",\"YV12\",\"YUYV\" ), "
"height:int=[16,4096]"
"fourcc=(fourcc){\"YUY2\",\"YV12\",\"YUYV\" }, "
"height=(int)[16,4096]"
);
GstStaticCaps2 rawcaps5 = GST_STATIC_CAPS (
"video/raw, "
"fourcc:fourcc=(\"YUYV\",\"YUY2\"), "
"height:int=[16,4096]"
"fourcc=(fourcc){\"YUYV\",\"YUY2\"}, "
"height=(int)[16,4096]"
);
GstStaticCaps2 rawcaps6 = GST_STATIC_CAPS (
"video/raw, "
"fourcc:fourcc=\"YUYV\", "
"height:int=640, "
"width:int=480, "
"framerate:double=30.0; "
"fourcc=(fourcc)\"YUYV\", "
"height=(int)640, "
"width=(int)480, "
"framerate=(double)30.0; "
"video/raw, "
"fourcc:fourcc=\"I420\", "
"height:int=640, "
"width:int=480, "
"framerate:double=30.0; "
"fourcc=(fourcc)\"I420\", "
"height=(int)640, "
"width=(int)480, "
"framerate=(double)30.0"
);
int

View file

@ -3,44 +3,44 @@
/* these caps all have a non empty intersection */
GstStaticCaps2 sinkcaps = GST_STATIC_CAPS (
"video/mpeg, "
"fourcc:fourcc={\"YV12\",\"YUY2\"}, "
"foo1:int=[20,40], "
"foo2:int=[20,40], "
"foo3:int=[10,20]"
"fourcc=(fourcc){\"YV12\",\"YUY2\"}, "
"foo1=(int)[20,40], "
"foo2=(int)[20,40], "
"foo3=(int)[10,20]"
);
GstStaticCaps2 mp1parsecaps = GST_STATIC_CAPS (
"video/mpeg, "
"fourcc:fourcc={\"YV12\",\"YUY2\"}, "
"foo4:fourcc={\"YV12\",\"YUY2\"}"
"fourcc=(fourcc){\"YV12\",\"YUY2\"}, "
"foo4=(fourcc){\"YV12\",\"YUY2\"}"
);
GstStaticCaps2 rawcaps = GST_STATIC_CAPS (
"video/raw, "
"width:int=[16,4096], "
"height:int=[16,4096], "
"fourcc:fourcc={\"YV12\",\"YUY2\"}"
"width=(int)[16,4096], "
"height=(int)[16,4096], "
"fourcc=(fourcc){\"YV12\",\"YUY2\"}"
);
GstStaticCaps2 rawcaps2 = GST_STATIC_CAPS (
"video/raw, "
"width:int=[16,256], "
"height:int=16; "
"width=(int)[16,256], "
"height=(int)16; "
"video/raw, "
"width:int=[16,256], "
"height:int=16"
"width=(int)[16,256], "
"height=(int)16"
);
GstStaticCaps2 rawcaps3 = GST_STATIC_CAPS (
"video/raw, "
"width:int=[16,256], "
"height:int=16; "
"width=(int)[16,256], "
"height=(int)16; "
"video/raw, "
"width:int=[16,256], "
"height:int=16; "
"width=(int)[16,256], "
"height=(int)16; "
"video/raw, "
"fourcc:fourcc={\"YV12\",\"YUY2\"}"
"height:int=[16,4096]"
"fourcc=(fourcc){\"YV12\",\"YUY2\"}, "
"height=(int)[16,4096]"
);
/* defined, not used

View file

@ -2,7 +2,7 @@ include ../Rules
tests_pass = \
value_compare value_intersect caps structure
value_compare value_intersect caps
tests_fail =

View file

@ -112,8 +112,13 @@ main (int argc, char *argv[])
/* now iterate and see if it proxies caps ok */
gst_bin_iterate (GST_BIN (pipeline));
sink_caps = gst_pad_get_caps (gst_element_get_pad (sink1, "sink"));
structure = gst_caps2_get_nth_cap (sink_caps, 0);
if (structure != NULL && ! (gst_structure_has_field (structure, "rate"))) {
if (sink_caps && gst_caps2_is_fixed (sink_caps)) {
structure = gst_caps2_get_nth_cap (sink_caps, 0);
}else {
structure = NULL;
g_print ("sink_caps is not fixed\n");
}
if (structure == NULL || !(gst_structure_has_field (structure, "rate"))) {
g_print ("Hm, rate has not been propagated to sink1.\n");
return 1;
} else {