summaryrefslogtreecommitdiff
path: root/gst/gstpad.c
diff options
context:
space:
mode:
Diffstat (limited to 'gst/gstpad.c')
-rw-r--r--gst/gstpad.c270
1 files changed, 135 insertions, 135 deletions
diff --git a/gst/gstpad.c b/gst/gstpad.c
index ab7e3d0857..5ad57fdd99 100644
--- a/gst/gstpad.c
+++ b/gst/gstpad.c
@@ -32,7 +32,7 @@
#include "gstvalue.h"
/* FIXME */
-#define gst_caps2_debug(a,b) GST_DEBUG_CAPS(b,a)
+#define gst_caps_debug(a,b) GST_DEBUG_CAPS(b,a)
enum {
@@ -52,10 +52,10 @@ static void gst_pad_init (GstPad *pad);
static void gst_pad_dispose (GObject *object);
static gboolean gst_pad_try_relink_filtered_func (GstRealPad *srcpad, GstRealPad *sinkpad,
- const GstCaps2 *caps, gboolean clear);
+ const GstCaps *caps, gboolean clear);
static void gst_pad_set_pad_template (GstPad *pad, GstPadTemplate *templ);
-static GstCaps2 * _gst_pad_try_fixate_caps (GstRealPad *pad, GstCaps2 *caps);
-static GstCaps2 * _gst_pad_default_fixate_func (GstPad *pad, GstCaps2 *caps, gpointer unused);
+static GstCaps * _gst_pad_try_fixate_caps (GstRealPad *pad, GstCaps *caps);
+static GstCaps * _gst_pad_default_fixate_func (GstPad *pad, GstCaps *caps, gpointer unused);
#ifndef GST_DISABLE_LOADSAVE
static xmlNodePtr gst_pad_save_thyself (GstObject *object, xmlNodePtr parent);
@@ -177,7 +177,7 @@ gst_real_pad_class_init (GstRealPadClass *klass)
g_signal_new ("caps_nego_failed", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GstRealPadClass, caps_nego_failed), NULL, NULL,
gst_marshal_VOID__OBJECT, G_TYPE_NONE, 1,
- GST_TYPE_CAPS2);
+ GST_TYPE_CAPS);
gst_real_pad_signals[REAL_LINKED] =
g_signal_new ("linked", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GstRealPadClass, linked), NULL, NULL,
@@ -196,7 +196,7 @@ gst_real_pad_class_init (GstRealPadClass *klass)
TRUE, G_PARAM_READWRITE));
g_object_class_install_property (G_OBJECT_CLASS (klass), REAL_ARG_CAPS,
g_param_spec_boxed ("caps", "Caps", "The capabilities of the pad",
- GST_TYPE_CAPS2, G_PARAM_READABLE));
+ GST_TYPE_CAPS, G_PARAM_READABLE));
#ifndef GST_DISABLE_LOADSAVE
gstobject_class->save_thyself = GST_DEBUG_FUNCPTR (gst_pad_save_thyself);
@@ -953,7 +953,7 @@ gst_pad_check_schedulers (GstRealPad *realsrc, GstRealPad *realsink)
* gst_pad_can_link_filtered:
* @srcpad: the source #GstPad to link.
* @sinkpad: the sink #GstPad to link.
- * @filtercaps: the filter #GstCaps2.
+ * @filtercaps: the filter #GstCaps.
*
* Checks if the source pad and the sink pad can be linked when constrained
* by the given filter caps.
@@ -962,7 +962,7 @@ gst_pad_check_schedulers (GstRealPad *realsrc, GstRealPad *realsink)
*/
gboolean
gst_pad_can_link_filtered (GstPad *srcpad, GstPad *sinkpad,
- const GstCaps2 *filtercaps)
+ const GstCaps *filtercaps)
{
GstRealPad *realsrc, *realsink;
@@ -1015,7 +1015,7 @@ gst_pad_can_link (GstPad *srcpad, GstPad *sinkpad)
* gst_pad_link_filtered:
* @srcpad: the source #GstPad to link.
* @sinkpad: the sink #GstPad to link.
- * @filtercaps: the filter #GstCaps2.
+ * @filtercaps: the filter #GstCaps.
*
* Links the source pad and the sink pad, constrained
* by the given filter caps. This function sinks the caps.
@@ -1024,7 +1024,7 @@ gst_pad_can_link (GstPad *srcpad, GstPad *sinkpad)
*/
gboolean
gst_pad_link_filtered (GstPad *srcpad, GstPad *sinkpad,
- const GstCaps2 *filtercaps)
+ const GstCaps *filtercaps)
{
GstRealPad *realsrc, *realsink;
GstScheduler *src_sched, *sink_sched;
@@ -1339,9 +1339,9 @@ gst_pad_get_ghost_pad_list (GstPad *pad)
* 3. sets fixed caps on the pad.
*/
static GstPadLinkReturn
-gst_pad_try_set_caps_func (GstRealPad *pad, GstCaps2 *caps, gboolean notify)
+gst_pad_try_set_caps_func (GstRealPad *pad, GstCaps *caps, gboolean notify)
{
- GstCaps2 *allowed = NULL;
+ GstCaps *allowed = NULL;
GstElement *parent = GST_PAD_PARENT (pad);
g_return_val_if_fail (pad != NULL, GST_PAD_LINK_REFUSED);
@@ -1363,24 +1363,24 @@ gst_pad_try_set_caps_func (GstRealPad *pad, GstCaps2 *caps, gboolean notify)
/* do we have to check the caps against something? */
if (allowed) {
- GstCaps2 *intersection;
+ GstCaps *intersection;
/* check against calculated caps */
- intersection = gst_caps2_intersect (caps, allowed);
+ intersection = gst_caps_intersect (caps, allowed);
/* oops, empty intersection, caps don't have anything in common */
- if (gst_caps2_is_empty (intersection)) {
+ if (gst_caps_is_empty (intersection)) {
GST_CAT_INFO (GST_CAT_CAPS, "caps did not intersect with %s:%s's allowed caps",
GST_DEBUG_PAD_NAME (pad));
- gst_caps2_debug (caps, "caps themselves (attemped to set)");
- gst_caps2_debug (allowed,
+ gst_caps_debug (caps, "caps themselves (attemped to set)");
+ gst_caps_debug (allowed,
"allowed caps that did not agree with caps");
- gst_caps2_free (allowed);
+ gst_caps_free (allowed);
return GST_PAD_LINK_REFUSED;
}
/* caps checks out fine, we can unref the intersection now */
- gst_caps2_free (intersection);
- gst_caps2_free (allowed);
+ gst_caps_free (intersection);
+ gst_caps_free (allowed);
/* given that the caps are fixed, we know that their intersection with the
* padtemplate caps is the same as caps itself */
}
@@ -1392,7 +1392,7 @@ gst_pad_try_set_caps_func (GstRealPad *pad, GstCaps2 *caps, gboolean notify)
gboolean negotiating;
gchar *s;
- s = gst_caps2_to_string (caps);
+ s = gst_caps_to_string (caps);
GST_CAT_INFO (GST_CAT_CAPS, "calling link function on pad %s:%s with caps %s",
GST_DEBUG_PAD_NAME (pad), s);
g_free (s);
@@ -1446,12 +1446,12 @@ gst_pad_try_set_caps_func (GstRealPad *pad, GstCaps2 *caps, gboolean notify)
}
}
/* we can only set caps on the pad if they are fixed */
- if (gst_caps2_is_fixed (caps)) {
+ if (gst_caps_is_fixed (caps)) {
GST_CAT_INFO (GST_CAT_CAPS, "setting caps on pad %s:%s",
GST_DEBUG_PAD_NAME (pad));
/* if we got this far all is ok, remove the old caps, set the new one */
- gst_caps2_replace (&GST_PAD_CAPS (pad), gst_caps2_copy (caps));
+ gst_caps_replace (&GST_PAD_CAPS (pad), gst_caps_copy (caps));
g_object_notify (G_OBJECT (pad), "caps");
}
@@ -1465,16 +1465,16 @@ gst_pad_try_set_caps_func (GstRealPad *pad, GstCaps2 *caps, gboolean notify)
return GST_PAD_LINK_OK;
}
-static GstCaps2 *
-_gst_pad_try_fixate_caps (GstRealPad *pad, GstCaps2 *caps)
+static GstCaps *
+_gst_pad_try_fixate_caps (GstRealPad *pad, GstCaps *caps)
{
GstRealPad *srcpad;
GstRealPad *sinkpad;
GstPadFixateFunction app_fixate = NULL;
- GstCaps2 *newcaps;
+ GstCaps *newcaps;
g_return_val_if_fail (caps != NULL, NULL);
- g_return_val_if_fail (!gst_caps2_is_empty(caps), NULL);
+ g_return_val_if_fail (!gst_caps_is_empty(caps), NULL);
if (GST_PAD_IS_SRC (pad)) {
srcpad = pad;
@@ -1484,7 +1484,7 @@ _gst_pad_try_fixate_caps (GstRealPad *pad, GstCaps2 *caps)
srcpad = GST_RPAD_PEER (pad);
}
- while (!gst_caps2_is_fixed (caps)) {
+ while (!gst_caps_is_fixed (caps)) {
if (app_fixate) {
newcaps = (app_fixate) (GST_PAD (srcpad), caps, NULL);
if (newcaps) {
@@ -1543,29 +1543,29 @@ _gst_pad_default_fixate_foreach (GQuark field_id, GValue *value,
return TRUE;
}
-static GstCaps2 *
-_gst_pad_default_fixate_func (GstPad *pad, GstCaps2 *caps, gpointer unused)
+static GstCaps *
+_gst_pad_default_fixate_func (GstPad *pad, GstCaps *caps, gpointer unused)
{
- static GstStaticCaps2 octetcaps = GST_STATIC_CAPS (
+ static GstStaticCaps octetcaps = GST_STATIC_CAPS (
"application/octet-stream");
GstStructure *structure;
g_return_val_if_fail (pad != NULL, NULL);
g_return_val_if_fail (caps != NULL, NULL);
- g_return_val_if_fail (!gst_caps2_is_empty (caps), NULL);
+ g_return_val_if_fail (!gst_caps_is_empty (caps), NULL);
- if (gst_caps2_is_any (caps)) {
- gst_caps2_free (caps);
- return gst_caps2_copy (gst_static_caps2_get (&octetcaps));
+ if (gst_caps_is_any (caps)) {
+ gst_caps_free (caps);
+ return gst_caps_copy (gst_static_caps_get (&octetcaps));
}
if (caps->structs->len > 1) {
- GstCaps2 *retcaps = gst_caps2_copy_1 (caps);
- gst_caps2_free (caps);
+ GstCaps *retcaps = gst_caps_copy_1 (caps);
+ gst_caps_free (caps);
return retcaps;
}
- structure = gst_caps2_get_nth_cap (caps, 0);
+ structure = gst_caps_get_structure (caps, 0);
gst_structure_foreach (structure, _gst_pad_default_fixate_foreach,
structure);
@@ -1575,7 +1575,7 @@ _gst_pad_default_fixate_func (GstPad *pad, GstCaps2 *caps, gpointer unused)
/**
* gst_pad_try_set_caps:
* @pad: a #GstPad to try to set the caps on.
- * @caps: the #GstCaps2 to set.
+ * @caps: the #GstCaps to set.
*
* Tries to set the caps on the given pad. Ownership is always taken
* of the caps, so you will need to unref non-floating caps.
@@ -1584,10 +1584,10 @@ _gst_pad_default_fixate_func (GstPad *pad, GstCaps2 *caps, gpointer unused)
* could be set.
*/
GstPadLinkReturn
-gst_pad_try_set_caps (GstPad *pad, const GstCaps2 *caps)
+gst_pad_try_set_caps (GstPad *pad, const GstCaps *caps)
{
GstRealPad *peer, *realpad;
- GstCaps2 *mycaps;
+ GstCaps *mycaps;
GstPadLinkReturn set_retval;
realpad = GST_PAD_REALIZE (pad);
@@ -1596,20 +1596,20 @@ gst_pad_try_set_caps (GstPad *pad, const GstCaps2 *caps)
GST_CAT_INFO (GST_CAT_CAPS, "trying to set caps %p on pad %s:%s",
caps, GST_DEBUG_PAD_NAME (realpad));
- gst_caps2_debug (caps, "caps that we are trying to set");
+ gst_caps_debug (caps, "caps that we are trying to set");
/* try to take ownership */
- mycaps = gst_caps2_copy (caps);
+ mycaps = gst_caps_copy (caps);
/* setting non fixed caps on a pad is not allowed */
- if (!gst_caps2_is_fixed (mycaps)) {
+ if (!gst_caps_is_fixed (mycaps)) {
GST_CAT_INFO (GST_CAT_CAPS,
"trying to set unfixed caps on pad %s:%s, not allowed",
GST_DEBUG_PAD_NAME (realpad));
g_warning ("trying to set non fixed caps on pad %s:%s, not allowed",
GST_DEBUG_PAD_NAME (realpad));
- gst_caps2_debug (mycaps, "unfixed caps");
+ gst_caps_debug (mycaps, "unfixed caps");
set_retval = GST_PAD_LINK_DELAYED;
goto done;
}
@@ -1636,7 +1636,7 @@ gst_pad_try_set_caps (GstPad *pad, const GstCaps2 *caps)
done:
/* if we took ownership, the caps will be freed */
- //gst_caps2_free (caps);
+ //gst_caps_free (caps);
return set_retval;
}
@@ -1652,10 +1652,10 @@ done:
*/
static gboolean
gst_pad_try_relink_filtered_func (GstRealPad *srcpad, GstRealPad *sinkpad,
- const GstCaps2 *filtercaps, gboolean clear)
+ const GstCaps *filtercaps, gboolean clear)
{
- GstCaps2 *srccaps, *sinkcaps;
- GstCaps2 *intersection = NULL;
+ GstCaps *srccaps, *sinkcaps;
+ GstCaps *intersection = NULL;
GstRealPad *realsrc, *realsink;
realsrc = GST_PAD_REALIZE (srcpad);
@@ -1670,57 +1670,57 @@ gst_pad_try_relink_filtered_func (GstRealPad *srcpad, GstRealPad *sinkpad,
"start relink filtered %s:%s and %s:%s, clearing caps",
GST_DEBUG_PAD_NAME (realsrc), GST_DEBUG_PAD_NAME (realsink));
- gst_caps2_replace (&GST_PAD_CAPS (GST_PAD (realsrc)), NULL);
- gst_caps2_replace (&GST_PAD_CAPS (GST_PAD (realsink)), NULL);
+ gst_caps_replace (&GST_PAD_CAPS (GST_PAD (realsrc)), NULL);
+ gst_caps_replace (&GST_PAD_CAPS (GST_PAD (realsink)), NULL);
}
else {
GST_CAT_INFO (GST_CAT_PADS, "start relink filtered %s:%s and %s:%s",
GST_DEBUG_PAD_NAME (realsrc), GST_DEBUG_PAD_NAME (realsink));
}
- srccaps = gst_caps2_copy(gst_pad_get_caps (GST_PAD (realsrc)));
+ srccaps = gst_caps_copy(gst_pad_get_caps (GST_PAD (realsrc)));
GST_CAT_DEBUG (GST_CAT_PADS, "dumping caps of pad %s:%s",
GST_DEBUG_PAD_NAME (realsrc));
- gst_caps2_debug (srccaps, "caps of src pad (pre-relink)");
- sinkcaps = gst_caps2_copy(gst_pad_get_caps (GST_PAD (realsink)));
+ gst_caps_debug (srccaps, "caps of src pad (pre-relink)");
+ sinkcaps = gst_caps_copy(gst_pad_get_caps (GST_PAD (realsink)));
GST_CAT_DEBUG (GST_CAT_PADS, "dumping caps of pad %s:%s",
GST_DEBUG_PAD_NAME (realsink));
- gst_caps2_debug (sinkcaps, "caps of sink pad (pre-relink)");
+ gst_caps_debug (sinkcaps, "caps of sink pad (pre-relink)");
/* first take the intersection of the pad caps */
- intersection = gst_caps2_intersect (srccaps, sinkcaps);
- gst_caps2_debug (intersection, "caps of intersection");
+ intersection = gst_caps_intersect (srccaps, sinkcaps);
+ gst_caps_debug (intersection, "caps of intersection");
/* if we have no intersection but one of the caps was not NULL.. */
- if (gst_caps2_is_empty(intersection)) {
+ if (gst_caps_is_empty(intersection)) {
/* the intersection is EMPTY, they have no common format */
GST_CAT_INFO (GST_CAT_PADS, "pads %s:%s and %s:%s have no common type",
GST_DEBUG_PAD_NAME (realsrc), GST_DEBUG_PAD_NAME (realsink));
/* make sure any floating caps from gst_pad_get_caps are freed here */
- gst_caps2_free (srccaps);
- gst_caps2_free (sinkcaps);
+ gst_caps_free (srccaps);
+ gst_caps_free (sinkcaps);
return FALSE;
} else {
GST_CAT_INFO (GST_CAT_PADS, "pads %s:%s and %s:%s intersected to %s caps",
GST_DEBUG_PAD_NAME (realsrc), GST_DEBUG_PAD_NAME (realsink),
(intersection ?
- (gst_caps2_is_fixed (intersection) ? "fixed" : "variable") :
+ (gst_caps_is_fixed (intersection) ? "fixed" : "variable") :
"NULL"));
/* we don't need those anymore, as the caps can be floating */
- gst_caps2_free (srccaps);
- gst_caps2_free (sinkcaps);
+ gst_caps_free (srccaps);
+ gst_caps_free (sinkcaps);
/* then filter this against the app filter */
if (filtercaps) {
- GstCaps2 *filtered_intersection;
+ GstCaps *filtered_intersection;
GST_DEBUG_CAPS ("filter caps are ", filtercaps);
- filtered_intersection = gst_caps2_intersect (intersection, filtercaps);
+ filtered_intersection = gst_caps_intersect (intersection, filtercaps);
- gst_caps2_free (intersection);
+ gst_caps_free (intersection);
- if (gst_caps2_is_empty(filtered_intersection)) {
+ if (gst_caps_is_empty(filtered_intersection)) {
GST_CAT_INFO (GST_CAT_PADS,
"filtered link between pads %s:%s and %s:%s is empty",
GST_DEBUG_PAD_NAME (realsrc), GST_DEBUG_PAD_NAME (realsink));
@@ -1729,16 +1729,16 @@ gst_pad_try_relink_filtered_func (GstRealPad *srcpad, GstRealPad *sinkpad,
intersection = filtered_intersection;
/* keep a reference to the app caps */
- gst_caps2_replace (&GST_RPAD_APPFILTER (realsink),
- gst_caps2_copy (filtercaps));
- gst_caps2_replace (&GST_RPAD_APPFILTER (realsrc),
- gst_caps2_copy (filtercaps));
+ gst_caps_replace (&GST_RPAD_APPFILTER (realsink),
+ gst_caps_copy (filtercaps));
+ gst_caps_replace (&GST_RPAD_APPFILTER (realsrc),
+ gst_caps_copy (filtercaps));
}
}
GST_CAT_DEBUG (GST_CAT_CAPS, "setting filter for link to:");
- gst_caps2_debug (intersection, "filter for link");
+ gst_caps_debug (intersection, "filter for link");
- gst_caps2_free (intersection);
+ gst_caps_free (intersection);
return gst_pad_perform_negotiate (GST_PAD (realsrc), GST_PAD (realsink));
}
@@ -1755,9 +1755,9 @@ gst_pad_try_relink_filtered_func (GstRealPad *srcpad, GstRealPad *sinkpad,
gboolean
gst_pad_perform_negotiate (GstPad *srcpad, GstPad *sinkpad)
{
- GstCaps2 *intersection, *filtered_intersection;
+ GstCaps *intersection, *filtered_intersection;
GstRealPad *realsrc, *realsink;
- GstCaps2 *srccaps, *sinkcaps, *filter;
+ GstCaps *srccaps, *sinkcaps, *filter;
gboolean res = TRUE;
GstElement *parent;
@@ -1789,36 +1789,36 @@ gst_pad_perform_negotiate (GstPad *srcpad, GstPad *sinkpad)
GST_DEBUG_PAD_NAME (realsrc), GST_DEBUG_PAD_NAME (realsink));
filter = GST_RPAD_APPFILTER (realsrc);
- if (filter == NULL) filter = gst_caps2_new_any ();
+ if (filter == NULL) filter = gst_caps_new_any ();
if (filter) {
GST_CAT_INFO (GST_CAT_PADS, "dumping filter for link %s:%s-%s:%s",
GST_DEBUG_PAD_NAME (realsrc), GST_DEBUG_PAD_NAME (realsink));
- gst_caps2_debug (filter, "link filter caps");
+ gst_caps_debug (filter, "link filter caps");
}
/* calculate the new caps here */
srccaps = gst_pad_get_caps (GST_PAD (realsrc));
GST_CAT_DEBUG (GST_CAT_PADS, "dumping caps of pad %s:%s",
GST_DEBUG_PAD_NAME (realsrc));
- gst_caps2_debug (srccaps,
+ gst_caps_debug (srccaps,
"src caps, awaiting negotiation, before applying filter");
sinkcaps = gst_pad_get_caps (GST_PAD (realsink));
GST_CAT_DEBUG (GST_CAT_PADS, "dumping caps of pad %s:%s",
GST_DEBUG_PAD_NAME (realsink));
- gst_caps2_debug (sinkcaps,
+ gst_caps_debug (sinkcaps,
"sink caps, awaiting negotiation, before applying filter");
- intersection = gst_caps2_intersect (srccaps, sinkcaps);
- gst_caps2_debug (intersection, "intersection of srccaps and sinkcaps");
- filtered_intersection = gst_caps2_intersect (intersection, filter);
- gst_caps2_free (intersection);
+ intersection = gst_caps_intersect (srccaps, sinkcaps);
+ gst_caps_debug (intersection, "intersection of srccaps and sinkcaps");
+ filtered_intersection = gst_caps_intersect (intersection, filter);
+ gst_caps_free (intersection);
- gst_caps2_debug (filtered_intersection,
+ gst_caps_debug (filtered_intersection,
"intersection of srccaps, sinkcaps, and filter");
- if (!gst_caps2_is_fixed (filtered_intersection)) {
- GstCaps2 *newcaps = _gst_pad_try_fixate_caps (realsrc, filtered_intersection);
+ if (!gst_caps_is_fixed (filtered_intersection)) {
+ GstCaps *newcaps = _gst_pad_try_fixate_caps (realsrc, filtered_intersection);
if (newcaps == NULL) {
- gst_caps2_free (filtered_intersection);
+ gst_caps_free (filtered_intersection);
g_critical("caps are not fixed, refusing");
GST_CAT_INFO (GST_CAT_CAPS, "caps are not fixed, refusing");
return GST_PAD_LINK_REFUSED;
@@ -1827,7 +1827,7 @@ gst_pad_perform_negotiate (GstPad *srcpad, GstPad *sinkpad)
}
/* no negotiation is performed if the pads have filtercaps */
- if (!gst_caps2_is_empty(filtered_intersection)) {
+ if (!gst_caps_is_empty(filtered_intersection)) {
GstPadLinkReturn link_res;
link_res = gst_pad_try_set_caps_func (realsrc, filtered_intersection, TRUE);
@@ -1849,9 +1849,9 @@ gst_pad_perform_negotiate (GstPad *srcpad, GstPad *sinkpad)
success:
cleanup:
- gst_caps2_free (srccaps);
- gst_caps2_free (sinkcaps);
- gst_caps2_free (filtered_intersection);
+ gst_caps_free (srccaps);
+ gst_caps_free (sinkcaps);
+ gst_caps_free (filtered_intersection);
return res;
error:
@@ -1872,7 +1872,7 @@ error:
*/
gboolean
gst_pad_try_relink_filtered (GstPad *srcpad, GstPad *sinkpad,
- const GstCaps2 *filtercaps)
+ const GstCaps *filtercaps)
{
GstRealPad *realsrc, *realsink;
@@ -1903,7 +1903,7 @@ gst_pad_try_relink_filtered (GstPad *srcpad, GstPad *sinkpad,
*/
gboolean
gst_pad_relink_filtered (GstPad *srcpad, GstPad *sinkpad,
- const GstCaps2 *filtercaps)
+ const GstCaps *filtercaps)
{
GstRealPad *realsrc, *realsink;
@@ -1928,17 +1928,17 @@ gst_pad_relink_filtered (GstPad *srcpad, GstPad *sinkpad,
/**
* gst_pad_proxy_link:
* @pad: a #GstPad to proxy to.
- * @caps: the #GstCaps2 to use in proxying.
+ * @caps: the #GstCaps to use in proxying.
*
* Proxies the link function to the specified pad.
*
* Returns: TRUE if the peer pad accepted the caps, FALSE otherwise.
*/
GstPadLinkReturn
-gst_pad_proxy_link (GstPad *pad, const GstCaps2 *caps)
+gst_pad_proxy_link (GstPad *pad, const GstCaps *caps)
{
GstRealPad *peer, *realpad;
- GstCaps2 *mycaps;
+ GstCaps *mycaps;
realpad = GST_PAD_REALIZE (pad);
@@ -1947,7 +1947,7 @@ gst_pad_proxy_link (GstPad *pad, const GstCaps2 *caps)
GST_CAT_INFO (GST_CAT_CAPS, "proxy link to pad %s:%s",
GST_DEBUG_PAD_NAME (realpad));
- mycaps = gst_caps2_copy(caps);
+ mycaps = gst_caps_copy(caps);
if (peer && gst_pad_try_set_caps_func (peer, mycaps, TRUE) < 0)
return GST_PAD_LINK_REFUSED;
@@ -1963,10 +1963,10 @@ gst_pad_proxy_link (GstPad *pad, const GstCaps2 *caps)
*
* Gets the capabilities of this pad.
*
- * Returns: the #GstCaps2 of this pad. This function returns a new caps, so use
- * gst_caps2_free to get rid of it.
+ * Returns: the #GstCaps of this pad. This function returns a new caps, so use
+ * gst_caps_free to get rid of it.
*/
-GstCaps2*
+GstCaps*
gst_pad_get_caps (GstPad *pad)
{
GstRealPad *realpad;
@@ -1980,7 +1980,7 @@ gst_pad_get_caps (GstPad *pad)
GST_DEBUG_PAD_NAME (realpad), realpad);
if (GST_RPAD_GETCAPSFUNC (realpad)) {
- GstCaps2 *caps;
+ GstCaps *caps;
GST_CAT_DEBUG (GST_CAT_CAPS, "using pad get function");
caps = GST_RPAD_GETCAPSFUNC (realpad) (GST_PAD (realpad));
@@ -1989,7 +1989,7 @@ gst_pad_get_caps (GstPad *pad)
g_critical ("pad %s:%s returned NULL caps from getcaps function\n",
GST_ELEMENT_NAME(GST_PAD_PARENT(GST_PAD (realpad))),
GST_PAD_NAME(realpad));
- caps = gst_caps2_new_any ();
+ caps = gst_caps_new_any ();
}
return caps;
@@ -1997,7 +1997,7 @@ gst_pad_get_caps (GstPad *pad)
GstPadTemplate *templ = GST_PAD_PAD_TEMPLATE (realpad);
GST_CAT_DEBUG (GST_CAT_CAPS, "using pad template %p with caps %p",
templ, GST_PAD_TEMPLATE_CAPS (templ));
- return gst_caps2_copy (GST_PAD_TEMPLATE_CAPS (templ));
+ return gst_caps_copy (GST_PAD_TEMPLATE_CAPS (templ));
}
GST_CAT_DEBUG (GST_CAT_CAPS, "pad has no caps");
@@ -2007,7 +2007,7 @@ gst_pad_get_caps (GstPad *pad)
GST_DEBUG_PAD_NAME (realpad), realpad);
#endif
- return gst_caps2_new_any();
+ return gst_caps_new_any();
}
/**
@@ -2016,13 +2016,13 @@ gst_pad_get_caps (GstPad *pad)
*
* Gets the template capabilities of this pad.
*
- * Returns: the template #GstCaps2 of this pad, unref the caps
+ * Returns: the template #GstCaps of this pad, unref the caps
* if you no longer need it.
*/
-const GstCaps2*
+const GstCaps*
gst_pad_get_pad_template_caps (GstPad *pad)
{
- static GstStaticCaps2 anycaps = GST_STATIC_CAPS ("ANY");
+ static GstStaticCaps anycaps = GST_STATIC_CAPS ("ANY");
g_return_val_if_fail (pad != NULL, NULL);
g_return_val_if_fail (GST_IS_PAD (pad), NULL);
@@ -2035,7 +2035,7 @@ gst_pad_get_pad_template_caps (GstPad *pad)
GST_DEBUG_PAD_NAME (realpad), realpad);
#endif
- return gst_static_caps2_get(&anycaps);
+ return gst_static_caps_get(&anycaps);
}
/**
@@ -2045,13 +2045,13 @@ gst_pad_get_pad_template_caps (GstPad *pad)
*
* Gets the capability with the given name from this pad template.
*
- * Returns: the #GstCaps2, or NULL if not found or in case of an error. unref
+ * Returns: the #GstCaps, or NULL if not found or in case of an error. unref
* the caps if you no longer need it.
*/
-const GstCaps2*
+const GstCaps*
gst_pad_template_get_caps_by_name (GstPadTemplate *templ, const gchar *name)
{
- GstCaps2 *caps;
+ GstCaps *caps;
g_return_val_if_fail (templ != NULL, NULL);
@@ -2060,7 +2060,7 @@ gst_pad_template_get_caps_by_name (GstPadTemplate *templ, const gchar *name)
return NULL;
/* FIXME */
- //return gst_caps2_copy (gst_caps2_get_by_name (caps, name));
+ //return gst_caps_copy (gst_caps_get_by_name (caps, name));
return NULL;
}
@@ -2083,7 +2083,7 @@ gst_pad_check_compatibility (GstPad *srcpad, GstPad *sinkpad)
g_return_val_if_fail (GST_IS_PAD (sinkpad), FALSE);
if (GST_PAD_CAPS (srcpad) && GST_PAD_CAPS (sinkpad)) {
- if (!gst_caps2_is_always_compatible (GST_PAD_CAPS (srcpad),
+ if (!gst_caps_is_always_compatible (GST_PAD_CAPS (srcpad),
GST_PAD_CAPS (sinkpad))) {
return FALSE;
}
@@ -2124,17 +2124,17 @@ gst_pad_get_peer (GstPad *pad)
* Gets the capabilities of the allowed media types that can
* flow through this pad. The caller must free the resulting caps.
*
- * Returns: the allowed #GstCaps2 of the pad link. Free the caps when
+ * Returns: the allowed #GstCaps of the pad link. Free the caps when
* you no longer need it.
*/
-GstCaps2*
+GstCaps*
gst_pad_get_allowed_caps (GstPad *pad)
{
GstRealPad *realpad;
- GstCaps2 *mycaps;
- GstCaps2 *caps;
- GstCaps2 *filtercaps;
- GstCaps2 *peercaps;
+ GstCaps *mycaps;
+ GstCaps *caps;
+ GstCaps *filtercaps;
+ GstCaps *peercaps;
g_return_val_if_fail (pad != NULL, NULL);
g_return_val_if_fail (GST_IS_PAD (pad), NULL);
@@ -2150,15 +2150,15 @@ gst_pad_get_allowed_caps (GstPad *pad)
}
peercaps = gst_pad_get_caps (GST_PAD_PEER (realpad));
- caps = gst_caps2_intersect (mycaps, peercaps);
- gst_caps2_free (mycaps);
- gst_caps2_free (peercaps);
+ caps = gst_caps_intersect (mycaps, peercaps);
+ gst_caps_free (mycaps);
+ gst_caps_free (peercaps);
filtercaps = GST_RPAD_APPFILTER (realpad);
if (filtercaps) {
- return gst_caps2_intersect (caps, filtercaps);
+ return gst_caps_intersect (caps, filtercaps);
} else {
- return gst_caps2_copy (caps);
+ return gst_caps_copy (caps);
}
}
@@ -2184,7 +2184,7 @@ gst_pad_caps_change_notify (GstPad *pad)
* on the console and returns FALSE otherwise.
*/
gboolean
-gst_pad_recover_caps_error (GstPad *pad, const GstCaps2 *allowed)
+gst_pad_recover_caps_error (GstPad *pad, const GstCaps *allowed)
{
GstElement *parent;
@@ -2195,7 +2195,7 @@ gst_pad_recover_caps_error (GstPad *pad, const GstCaps2 *allowed)
gst_real_pad_signals[REAL_CAPS_NEGO_FAILED], 0, FALSE))
{
/* clear pad caps first */
- gst_caps2_replace (&GST_PAD_CAPS (pad), NULL);
+ gst_caps_replace (&GST_PAD_CAPS (pad), NULL);
/* lets hope some signal manages to set the caps again */
g_signal_emit (G_OBJECT (pad), gst_real_pad_signals[REAL_CAPS_NEGO_FAILED], 0, allowed);
@@ -2283,8 +2283,8 @@ gst_real_pad_dispose (GObject *object)
g_list_free (GST_REAL_PAD(pad)->ghostpads);
}
- gst_caps2_replace (&GST_PAD_CAPS (pad), NULL);
- gst_caps2_replace (&GST_RPAD_APPFILTER (pad), NULL);
+ gst_caps_replace (&GST_PAD_CAPS (pad), NULL);
+ gst_caps_replace (&GST_RPAD_APPFILTER (pad), NULL);
if (GST_IS_ELEMENT (GST_OBJECT_PARENT (pad))) {
GST_CAT_DEBUG (GST_CAT_REFCOUNTING, "removing pad from element '%s'",
@@ -2690,7 +2690,7 @@ gst_pad_template_dispose (GObject *object)
g_free (GST_PAD_TEMPLATE_NAME_TEMPLATE (templ));
if (GST_PAD_TEMPLATE_CAPS (templ)) {
- gst_caps2_free (GST_PAD_TEMPLATE_CAPS (templ));
+ gst_caps_free (GST_PAD_TEMPLATE_CAPS (templ));
}
G_OBJECT_CLASS (padtemplate_parent_class)->dispose (object);
@@ -2762,8 +2762,8 @@ gst_static_pad_template_get (GstStaticPadTemplate *pad_template)
GST_PAD_TEMPLATE_DIRECTION (new) = pad_template->direction;
GST_PAD_TEMPLATE_PRESENCE (new) = pad_template->presence;
- GST_PAD_TEMPLATE_CAPS (new) = gst_caps2_copy (
- gst_static_caps2_get (&pad_template->static_caps));
+ GST_PAD_TEMPLATE_CAPS (new) = gst_caps_copy (
+ gst_static_caps_get (&pad_template->static_caps));
return new;
}
@@ -2773,7 +2773,7 @@ gst_static_pad_template_get (GstStaticPadTemplate *pad_template)
* @name_template: the name template.
* @direction: the #GstPadDirection of the template.
* @presence: the #GstPadPresence of the pad.
- * @caps: a #GstCaps2 set for the template. The caps are taken ownership of.
+ * @caps: a #GstCaps set for the template. The caps are taken ownership of.
*
* Creates a new pad template with a name according to the given template
* and with the given arguments. This functions takes ownership of the provided
@@ -2784,7 +2784,7 @@ gst_static_pad_template_get (GstStaticPadTemplate *pad_template)
GstPadTemplate*
gst_pad_template_new (const gchar *name_template,
GstPadDirection direction, GstPadPresence presence,
- GstCaps2 *caps)
+ GstCaps *caps)
{
GstPadTemplate *new;
@@ -2811,10 +2811,10 @@ gst_pad_template_new (const gchar *name_template,
*
* Gets the capabilities of the pad template.
*
- * Returns: the #GstCaps2 of the pad template. unref the caps
+ * Returns: the #GstCaps of the pad template. unref the caps
* after use.
*/
-const GstCaps2*
+const GstCaps*
gst_pad_template_get_caps (GstPadTemplate *templ)
{
g_return_val_if_fail (templ != NULL, NULL);