making _set_property warn on unknown properties use GST_TIME_FORMAT for timestamp/duration

Original commit message from CVS:

making _set_property warn on unknown properties
use GST_TIME_FORMAT for timestamp/duration
This commit is contained in:
Thomas Vander Stichele 2004-04-20 16:25:41 +00:00
parent d138a1b78e
commit 5a322ed432
15 changed files with 38 additions and 10 deletions

View file

@ -7,6 +7,20 @@
make sure the state_change function is only called with simple state
transitions
2004-04-20 Thomas Vander Stichele <thomas at apestaart dot org>
* gst/elements/gstfakesink.c: (gst_fakesink_state_error_get_type),
(gst_fakesink_set_property), (gst_fakesink_chain):
* gst/elements/gstfakesrc.c: (gst_fakesrc_set_property):
* gst/elements/gstfdsrc.c: (gst_fdsrc_set_property):
* gst/elements/gstfilesrc.c: (gst_filesrc_set_property):
* gst/elements/gstidentity.c: (gst_identity_chain),
(gst_identity_set_property):
* gst/elements/gstmultifilesrc.c: (gst_multifilesrc_set_property):
* gst/elements/gstpipefilter.c: (gst_pipefilter_set_property):
add warnings to _set_property for unknown arguments
use GST_TIME_FORMAT/GST_TIME_ARGS for timestamp printing
2004-04-20 Thomas Vander Stichele <thomas at apestaart dot org>
* Makefile.am:

View file

@ -255,6 +255,7 @@ gst_fakesink_set_property (GObject * object, guint prop_id,
sink->signal_handoffs = g_value_get_boolean (value);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
@ -346,10 +347,10 @@ gst_fakesink_chain (GstPad * pad, GstData * _data)
fakesink->last_message =
g_strdup_printf ("chain ******* (%s:%s)< (%d bytes, timestamp: %"
G_GINT64_FORMAT ", duration: %" G_GINT64_FORMAT ", offset: %"
GST_TIME_FORMAT ", duration: %" GST_TIME_FORMAT ", offset: %"
G_GINT64_FORMAT ", flags: %d) %p", GST_DEBUG_PAD_NAME (pad),
GST_BUFFER_SIZE (buf), GST_BUFFER_TIMESTAMP (buf),
GST_BUFFER_DURATION (buf), GST_BUFFER_OFFSET (buf),
GST_BUFFER_SIZE (buf), GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf)),
GST_TIME_ARGS (GST_BUFFER_DURATION (buf)), GST_BUFFER_OFFSET (buf),
GST_BUFFER_FLAGS (buf), buf);
g_object_notify (G_OBJECT (fakesink), "last_message");

View file

@ -535,6 +535,7 @@ gst_fakesrc_set_property (GObject * object, guint prop_id, const GValue * value,
src->dump = g_value_get_boolean (value);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}

View file

@ -148,6 +148,7 @@ gst_fdsrc_set_property (GObject * object, guint prop_id, const GValue * value,
src->timeout = g_value_get_uint64 (value);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}

View file

@ -322,6 +322,7 @@ gst_filesrc_set_property (GObject * object, guint prop_id, const GValue * value,
g_object_notify (G_OBJECT (src), "touch");
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}

View file

@ -214,8 +214,8 @@ gst_identity_chain (GstPad * pad, GstData * _data)
g_free (identity->last_message);
identity->last_message =
g_strdup_printf ("chain ******* (%s:%s)i (%d bytes, %"
G_GINT64_FORMAT ")", GST_DEBUG_PAD_NAME (identity->sinkpad),
GST_BUFFER_SIZE (buf), GST_BUFFER_TIMESTAMP (buf));
GST_TIME_FORMAT ")", GST_DEBUG_PAD_NAME (identity->sinkpad),
GST_BUFFER_SIZE (buf), GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf)));
g_object_notify (G_OBJECT (identity), "last-message");
}
@ -299,6 +299,7 @@ gst_identity_set_property (GObject * object, guint prop_id,
identity->drop_probability = g_value_get_float (value);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}

View file

@ -157,6 +157,7 @@ gst_multifilesrc_set_property (GObject * object, guint prop_id,
}
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}

View file

@ -237,6 +237,7 @@ gst_pipefilter_set_property (GObject * object, guint prop_id,
pipefilter->command = g_strsplit (g_value_get_string (value), " ", 0);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}

View file

@ -255,6 +255,7 @@ gst_fakesink_set_property (GObject * object, guint prop_id,
sink->signal_handoffs = g_value_get_boolean (value);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
@ -346,10 +347,10 @@ gst_fakesink_chain (GstPad * pad, GstData * _data)
fakesink->last_message =
g_strdup_printf ("chain ******* (%s:%s)< (%d bytes, timestamp: %"
G_GINT64_FORMAT ", duration: %" G_GINT64_FORMAT ", offset: %"
GST_TIME_FORMAT ", duration: %" GST_TIME_FORMAT ", offset: %"
G_GINT64_FORMAT ", flags: %d) %p", GST_DEBUG_PAD_NAME (pad),
GST_BUFFER_SIZE (buf), GST_BUFFER_TIMESTAMP (buf),
GST_BUFFER_DURATION (buf), GST_BUFFER_OFFSET (buf),
GST_BUFFER_SIZE (buf), GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf)),
GST_TIME_ARGS (GST_BUFFER_DURATION (buf)), GST_BUFFER_OFFSET (buf),
GST_BUFFER_FLAGS (buf), buf);
g_object_notify (G_OBJECT (fakesink), "last_message");

View file

@ -535,6 +535,7 @@ gst_fakesrc_set_property (GObject * object, guint prop_id, const GValue * value,
src->dump = g_value_get_boolean (value);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}

View file

@ -148,6 +148,7 @@ gst_fdsrc_set_property (GObject * object, guint prop_id, const GValue * value,
src->timeout = g_value_get_uint64 (value);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}

View file

@ -322,6 +322,7 @@ gst_filesrc_set_property (GObject * object, guint prop_id, const GValue * value,
g_object_notify (G_OBJECT (src), "touch");
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}

View file

@ -214,8 +214,8 @@ gst_identity_chain (GstPad * pad, GstData * _data)
g_free (identity->last_message);
identity->last_message =
g_strdup_printf ("chain ******* (%s:%s)i (%d bytes, %"
G_GINT64_FORMAT ")", GST_DEBUG_PAD_NAME (identity->sinkpad),
GST_BUFFER_SIZE (buf), GST_BUFFER_TIMESTAMP (buf));
GST_TIME_FORMAT ")", GST_DEBUG_PAD_NAME (identity->sinkpad),
GST_BUFFER_SIZE (buf), GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf)));
g_object_notify (G_OBJECT (identity), "last-message");
}
@ -299,6 +299,7 @@ gst_identity_set_property (GObject * object, guint prop_id,
identity->drop_probability = g_value_get_float (value);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}

View file

@ -157,6 +157,7 @@ gst_multifilesrc_set_property (GObject * object, guint prop_id,
}
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}

View file

@ -237,6 +237,7 @@ gst_pipefilter_set_property (GObject * object, guint prop_id,
pipefilter->command = g_strsplit (g_value_get_string (value), " ", 0);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}