summaryrefslogtreecommitdiffstats
path: root/ext/esd
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2005-08-08 17:27:28 +0000
committerAndy Wingo <wingo@pobox.com>2005-08-08 17:27:28 +0000
commit71de30e469db00586e5c45cd8ae2e10cbbf72151 (patch)
treef5c414f4c2c1f436e3954d2d7279cf3269860c03 /ext/esd
parent568194ce35e3afe61e2e8aa51a9477b2891e5765 (diff)
ext/esd/esdsink.c (gst_esdsink_getcaps): Seems that wierd va_list caps setting function was borked. Fixed esdsink.
Original commit message from CVS: 2005-08-08 Andy Wingo <wingo@pobox.com> * ext/esd/esdsink.c (gst_esdsink_getcaps): Seems that wierd va_list caps setting function was borked. Fixed esdsink.
Diffstat (limited to 'ext/esd')
-rw-r--r--ext/esd/esdsink.c34
1 files changed, 9 insertions, 25 deletions
diff --git a/ext/esd/esdsink.c b/ext/esd/esdsink.c
index 2596317c..5f4836d0 100644
--- a/ext/esd/esdsink.c
+++ b/ext/esd/esdsink.c
@@ -176,34 +176,13 @@ gst_esdsink_dispose (GObject * object)
G_OBJECT_CLASS (parent_class)->dispose (object);
}
-#define IS_WRITABLE(caps) \
- (g_atomic_int_get (&(caps)->refcount) == 1)
-
-void
-gst_caps_set_each (GstCaps * caps, char *field, ...)
-{
- GstStructure *structure;
- va_list var_args;
- int i;
-
- g_return_if_fail (GST_IS_CAPS (caps));
- g_return_if_fail (IS_WRITABLE (caps));
-
- va_start (var_args, field);
- for (i = 0; i < caps->structs->len; i++) {
- structure = gst_caps_get_structure (caps, i);
-
- gst_structure_set_valist (structure, field, var_args);
- }
- va_end (var_args);
-}
-
static GstCaps *
gst_esdsink_getcaps (GstBaseSink * bsink)
{
GstEsdSink *esdsink;
GstPadTemplate *pad_template;
GstCaps *caps = NULL;
+ gint i;
esd_server_info_t *server_info;
GST_DEBUG ("getcaps called");
@@ -221,10 +200,15 @@ gst_esdsink_getcaps (GstBaseSink * bsink)
if (server_info) {
GST_DEBUG ("got server info rate: %i", server_info->rate);
- g_print ("hey\n");
- gst_caps_set_each (caps, "rate", G_TYPE_INT, server_info->rate, NULL);
- g_print ("ho\n");
+ for (i = 0; i < caps->structs->len; i++) {
+ GstStructure *s;
+
+ s = gst_caps_get_structure (caps, i);
+ gst_structure_set (s, "rate", G_TYPE_INT, server_info->rate, NULL);
+ }
+
esd_free_server_info (server_info);
+
return caps;
} else {
GST_WARNING_OBJECT (esdsink, "couldn't get server info!");