"rate", GST_TYPE_INT_RANGE, 1, G_MAXINT,
"channels", GST_TYPE_INT_RANGE, 1, G_MAXINT,
"parsed", G_TYPE_BOOLEAN, TRUE, NULL);
- gst_caps_append_structure (ret, tmp);
+ gst_caps_merge_structure (ret, tmp);
} else if (strcmp (type->mime, "audio/3gpp") == 0) {
GstStructure *tmp;
tmp = gst_structure_new ("audio/AMR",
"rate", GST_TYPE_INT_RANGE, 1, G_MAXINT,
"channels", GST_TYPE_INT_RANGE, 1, G_MAXINT, NULL);
- gst_caps_append_structure (ret, tmp);
+ gst_caps_merge_structure (ret, tmp);
} else if (strcmp (type->mime, "audio/amr-wb") == 0) {
GstStructure *tmp;
tmp = gst_structure_new ("audio/AMR-WB",
"rate", GST_TYPE_INT_RANGE, 1, G_MAXINT,
"channels", GST_TYPE_INT_RANGE, 1, G_MAXINT, NULL);
- gst_caps_append_structure (ret, tmp);
+ gst_caps_merge_structure (ret, tmp);
} else if (strcmp (type->mime, "audio/mp4a-latm") == 0) {
gint j;
GstStructure *tmp, *tmp2;
tmp2 = gst_structure_copy (tmp);
gst_structure_set (tmp2, "profile", G_TYPE_STRING, profile, NULL);
- gst_caps_append_structure (ret, tmp2);
+ gst_caps_merge_structure (ret, tmp2);
have_profile = TRUE;
}
if (!have_profile) {
- gst_caps_append_structure (ret, tmp);
+ gst_caps_merge_structure (ret, tmp);
} else {
gst_structure_free (tmp);
}
tmp = gst_structure_new ("audio/x-alaw",
"rate", GST_TYPE_INT_RANGE, 1, G_MAXINT,
"channels", GST_TYPE_INT_RANGE, 1, G_MAXINT, NULL);
- gst_caps_append_structure (ret, tmp);
+ gst_caps_merge_structure (ret, tmp);
} else if (strcmp (type->mime, "audio/g711-mlaw") == 0) {
GstStructure *tmp;
tmp = gst_structure_new ("audio/x-mulaw",
"rate", GST_TYPE_INT_RANGE, 1, G_MAXINT,
"channels", GST_TYPE_INT_RANGE, 1, G_MAXINT, NULL);
- gst_caps_append_structure (ret, tmp);
+ gst_caps_merge_structure (ret, tmp);
} else if (strcmp (type->mime, "audio/vorbis") == 0) {
GstStructure *tmp;
tmp = gst_structure_new ("audio/x-vorbis",
"rate", GST_TYPE_INT_RANGE, 1, G_MAXINT,
"channels", GST_TYPE_INT_RANGE, 1, G_MAXINT, NULL);
- gst_caps_append_structure (ret, tmp);
+ gst_caps_merge_structure (ret, tmp);
} else if (strcmp (type->mime, "audio/flac") == 0) {
GstStructure *tmp;
"rate", GST_TYPE_INT_RANGE, 1, G_MAXINT,
"channels", GST_TYPE_INT_RANGE, 1, G_MAXINT,
"framed", G_TYPE_BOOLEAN, TRUE, NULL);
- gst_caps_append_structure (ret, tmp);
+ gst_caps_merge_structure (ret, tmp);
} else if (strcmp (type->mime, "audio/mpeg-L2") == 0) {
GstStructure *tmp;
"rate", GST_TYPE_INT_RANGE, 1, G_MAXINT,
"channels", GST_TYPE_INT_RANGE, 1, G_MAXINT,
"parsed", G_TYPE_BOOLEAN, TRUE, NULL);
- gst_caps_append_structure (ret, tmp);
+ gst_caps_merge_structure (ret, tmp);
} else {
GST_WARNING ("Unsupported mimetype '%s'", type->mime);
}
gst_structure_set_value (tmp2, "level", &va);
g_value_unset (&va);
g_value_unset (&v);
- gst_caps_append_structure (ret, tmp2);
+ gst_caps_merge_structure (ret, tmp2);
have_profile_level = TRUE;
}
if (!have_profile_level) {
- gst_caps_append_structure (ret, tmp);
+ gst_caps_merge_structure (ret, tmp);
} else {
gst_structure_free (tmp);
}
gst_structure_set_value (tmp2, "level", &va);
g_value_unset (&va);
g_value_unset (&v);
- gst_caps_append_structure (ret, tmp2);
+ gst_caps_merge_structure (ret, tmp2);
have_profile_level = TRUE;
}
if (!have_profile_level) {
- gst_caps_append_structure (ret, tmp);
+ gst_caps_merge_structure (ret, tmp);
} else {
gst_structure_free (tmp);
}
if (!alternative)
g_value_unset (&va);
g_value_unset (&v);
- gst_caps_append_structure (ret, tmp2);
+ gst_caps_merge_structure (ret, tmp2);
if (alternative) {
tmp2 = gst_structure_copy (tmp);
gst_structure_set (tmp2, "profile", G_TYPE_STRING, alternative, NULL);
gst_structure_set_value (tmp2, "level", &va);
g_value_unset (&va);
- gst_caps_append_structure (ret, tmp2);
+ gst_caps_merge_structure (ret, tmp2);
}
have_profile_level = TRUE;
}
if (!have_profile_level) {
- gst_caps_append_structure (ret, tmp);
+ gst_caps_merge_structure (ret, tmp);
} else {
gst_structure_free (tmp);
}
"height", GST_TYPE_INT_RANGE, 16, 4096,
"framerate", GST_TYPE_FRACTION_RANGE, 0, 1, G_MAXINT, 1, NULL);
- gst_caps_append_structure (ret, tmp);
+ gst_caps_merge_structure (ret, tmp);
} else if (strcmp (type->mime, "video/mpeg2") == 0) {
GstStructure *tmp;
"systemstream", G_TYPE_BOOLEAN, FALSE,
"parsed", G_TYPE_BOOLEAN, TRUE, NULL);
- gst_caps_append_structure (ret, tmp);
+ gst_caps_merge_structure (ret, tmp);
} else {
GST_WARNING ("Unsupported mimetype '%s'", type->mime);
}
continue;
}
tmp = gst_video_format_new_template_caps (format);
- gst_caps_append (ret, tmp);
+ gst_caps_merge (ret, tmp);
}
}