+2005-09-28 Andy Wingo <wingo@pobox.com>
+
+ * gst/base/gstbasesrc.c (gst_base_src_unlock): Comment a bit in
+ lieu of real docs...
+
+ * gst/elements/gstfdsrc.c: Cleaned up a bit.
+
2005-09-28 Tim-Philipp Müller <tim at centricular dot net>
* gst/elements/gstcapsfilter.c:
}
}
+/* this will always be called between start() and stop(). So you can rely on
+ resources allocated by start() and freed from stop(). This needs to be added
+ to the docs at some point. */
static gboolean
gst_base_src_unlock (GstBaseSrc * basesrc)
{
"Erik Walthinsen <omega@cse.ogi.edu>");
-/* FdSrc signals and args */
enum
{
- SIGNAL_TIMEOUT,
- LAST_SIGNAL
-};
-
-enum
-{
- ARG_0,
- ARG_FD,
- ARG_BLOCKSIZE,
- ARG_TIMEOUT
+ PROP_0,
+ PROP_FD,
};
#define _do_init(bla) \
gst_static_pad_template_get (&srctemplate));
gst_element_class_set_details (gstelement_class, &gst_fdsrc_details);
}
+
static void
gst_fdsrc_class_init (GstFdSrcClass * klass)
{
gobject_class->set_property = gst_fdsrc_set_property;
gobject_class->get_property = gst_fdsrc_get_property;
- g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_FD,
+ g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_FD,
g_param_spec_int ("fd", "fd", "An open file descriptor to read from",
0, G_MAXINT, 0, G_PARAM_READWRITE));
fdsrc->curoffset = 0;
}
-
static gboolean
gst_fdsrc_start (GstBaseSrc * bsrc)
{
gst_fdsrc_set_property (GObject * object, guint prop_id, const GValue * value,
GParamSpec * pspec)
{
- GstFdSrc *src;
-
- g_return_if_fail (GST_IS_FDSRC (object));
-
- src = GST_FDSRC (object);
+ GstFdSrc *src = GST_FDSRC (object);
switch (prop_id) {
- case ARG_FD:
+ case PROP_FD:
src->fd = g_value_get_int (value);
break;
default:
gst_fdsrc_get_property (GObject * object, guint prop_id, GValue * value,
GParamSpec * pspec)
{
- GstFdSrc *src;
-
- g_return_if_fail (GST_IS_FDSRC (object));
-
- src = GST_FDSRC (object);
+ GstFdSrc *src = GST_FDSRC (object);
switch (prop_id) {
- case ARG_FD:
+ case PROP_FD:
g_value_set_int (value, src->fd);
break;
default:
}
}
+/* this will always be called between start() and stop(). So you can rely on
+ resources allocated by start() and freed from stop(). This needs to be added
+ to the docs at some point. */
static gboolean
gst_base_src_unlock (GstBaseSrc * basesrc)
{
"Erik Walthinsen <omega@cse.ogi.edu>");
-/* FdSrc signals and args */
enum
{
- SIGNAL_TIMEOUT,
- LAST_SIGNAL
-};
-
-enum
-{
- ARG_0,
- ARG_FD,
- ARG_BLOCKSIZE,
- ARG_TIMEOUT
+ PROP_0,
+ PROP_FD,
};
#define _do_init(bla) \
gst_static_pad_template_get (&srctemplate));
gst_element_class_set_details (gstelement_class, &gst_fdsrc_details);
}
+
static void
gst_fdsrc_class_init (GstFdSrcClass * klass)
{
gobject_class->set_property = gst_fdsrc_set_property;
gobject_class->get_property = gst_fdsrc_get_property;
- g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_FD,
+ g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_FD,
g_param_spec_int ("fd", "fd", "An open file descriptor to read from",
0, G_MAXINT, 0, G_PARAM_READWRITE));
fdsrc->curoffset = 0;
}
-
static gboolean
gst_fdsrc_start (GstBaseSrc * bsrc)
{
gst_fdsrc_set_property (GObject * object, guint prop_id, const GValue * value,
GParamSpec * pspec)
{
- GstFdSrc *src;
-
- g_return_if_fail (GST_IS_FDSRC (object));
-
- src = GST_FDSRC (object);
+ GstFdSrc *src = GST_FDSRC (object);
switch (prop_id) {
- case ARG_FD:
+ case PROP_FD:
src->fd = g_value_get_int (value);
break;
default:
gst_fdsrc_get_property (GObject * object, guint prop_id, GValue * value,
GParamSpec * pspec)
{
- GstFdSrc *src;
-
- g_return_if_fail (GST_IS_FDSRC (object));
-
- src = GST_FDSRC (object);
+ GstFdSrc *src = GST_FDSRC (object);
switch (prop_id) {
- case ARG_FD:
+ case PROP_FD:
g_value_set_int (value, src->fd);
break;
default: