gst/base/gstbasesrc.c (gst_base_src_unlock): Comment a bit in lieu of real docs...

Original commit message from CVS:
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.
This commit is contained in:
Andy Wingo 2005-09-28 13:05:12 +00:00
parent 99d855fdc9
commit 5111420fa2
5 changed files with 29 additions and 50 deletions

View file

@ -1,3 +1,10 @@
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> 2005-09-28 Tim-Philipp Müller <tim at centricular dot net>
* gst/elements/gstcapsfilter.c: * gst/elements/gstcapsfilter.c:

View file

@ -727,6 +727,9 @@ error:
} }
} }
/* 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 static gboolean
gst_base_src_unlock (GstBaseSrc * basesrc) gst_base_src_unlock (GstBaseSrc * basesrc)
{ {

View file

@ -73,19 +73,10 @@ static GstElementDetails gst_fdsrc_details = GST_ELEMENT_DETAILS ("Disk Source",
"Erik Walthinsen <omega@cse.ogi.edu>"); "Erik Walthinsen <omega@cse.ogi.edu>");
/* FdSrc signals and args */
enum enum
{ {
SIGNAL_TIMEOUT, PROP_0,
LAST_SIGNAL PROP_FD,
};
enum
{
ARG_0,
ARG_FD,
ARG_BLOCKSIZE,
ARG_TIMEOUT
}; };
#define _do_init(bla) \ #define _do_init(bla) \
@ -114,6 +105,7 @@ gst_fdsrc_base_init (gpointer g_class)
gst_static_pad_template_get (&srctemplate)); gst_static_pad_template_get (&srctemplate));
gst_element_class_set_details (gstelement_class, &gst_fdsrc_details); gst_element_class_set_details (gstelement_class, &gst_fdsrc_details);
} }
static void static void
gst_fdsrc_class_init (GstFdSrcClass * klass) gst_fdsrc_class_init (GstFdSrcClass * klass)
{ {
@ -132,7 +124,7 @@ gst_fdsrc_class_init (GstFdSrcClass * klass)
gobject_class->set_property = gst_fdsrc_set_property; gobject_class->set_property = gst_fdsrc_set_property;
gobject_class->get_property = gst_fdsrc_get_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", g_param_spec_int ("fd", "fd", "An open file descriptor to read from",
0, G_MAXINT, 0, G_PARAM_READWRITE)); 0, G_MAXINT, 0, G_PARAM_READWRITE));
@ -154,7 +146,6 @@ gst_fdsrc_init (GstFdSrc * fdsrc, GstFdSrcClass * klass)
fdsrc->curoffset = 0; fdsrc->curoffset = 0;
} }
static gboolean static gboolean
gst_fdsrc_start (GstBaseSrc * bsrc) gst_fdsrc_start (GstBaseSrc * bsrc)
{ {
@ -208,14 +199,10 @@ static void
gst_fdsrc_set_property (GObject * object, guint prop_id, const GValue * value, gst_fdsrc_set_property (GObject * object, guint prop_id, const GValue * value,
GParamSpec * pspec) GParamSpec * pspec)
{ {
GstFdSrc *src; GstFdSrc *src = GST_FDSRC (object);
g_return_if_fail (GST_IS_FDSRC (object));
src = GST_FDSRC (object);
switch (prop_id) { switch (prop_id) {
case ARG_FD: case PROP_FD:
src->fd = g_value_get_int (value); src->fd = g_value_get_int (value);
break; break;
default: default:
@ -228,14 +215,10 @@ static void
gst_fdsrc_get_property (GObject * object, guint prop_id, GValue * value, gst_fdsrc_get_property (GObject * object, guint prop_id, GValue * value,
GParamSpec * pspec) GParamSpec * pspec)
{ {
GstFdSrc *src; GstFdSrc *src = GST_FDSRC (object);
g_return_if_fail (GST_IS_FDSRC (object));
src = GST_FDSRC (object);
switch (prop_id) { switch (prop_id) {
case ARG_FD: case PROP_FD:
g_value_set_int (value, src->fd); g_value_set_int (value, src->fd);
break; break;
default: default:

View file

@ -727,6 +727,9 @@ error:
} }
} }
/* 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 static gboolean
gst_base_src_unlock (GstBaseSrc * basesrc) gst_base_src_unlock (GstBaseSrc * basesrc)
{ {

View file

@ -73,19 +73,10 @@ static GstElementDetails gst_fdsrc_details = GST_ELEMENT_DETAILS ("Disk Source",
"Erik Walthinsen <omega@cse.ogi.edu>"); "Erik Walthinsen <omega@cse.ogi.edu>");
/* FdSrc signals and args */
enum enum
{ {
SIGNAL_TIMEOUT, PROP_0,
LAST_SIGNAL PROP_FD,
};
enum
{
ARG_0,
ARG_FD,
ARG_BLOCKSIZE,
ARG_TIMEOUT
}; };
#define _do_init(bla) \ #define _do_init(bla) \
@ -114,6 +105,7 @@ gst_fdsrc_base_init (gpointer g_class)
gst_static_pad_template_get (&srctemplate)); gst_static_pad_template_get (&srctemplate));
gst_element_class_set_details (gstelement_class, &gst_fdsrc_details); gst_element_class_set_details (gstelement_class, &gst_fdsrc_details);
} }
static void static void
gst_fdsrc_class_init (GstFdSrcClass * klass) gst_fdsrc_class_init (GstFdSrcClass * klass)
{ {
@ -132,7 +124,7 @@ gst_fdsrc_class_init (GstFdSrcClass * klass)
gobject_class->set_property = gst_fdsrc_set_property; gobject_class->set_property = gst_fdsrc_set_property;
gobject_class->get_property = gst_fdsrc_get_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", g_param_spec_int ("fd", "fd", "An open file descriptor to read from",
0, G_MAXINT, 0, G_PARAM_READWRITE)); 0, G_MAXINT, 0, G_PARAM_READWRITE));
@ -154,7 +146,6 @@ gst_fdsrc_init (GstFdSrc * fdsrc, GstFdSrcClass * klass)
fdsrc->curoffset = 0; fdsrc->curoffset = 0;
} }
static gboolean static gboolean
gst_fdsrc_start (GstBaseSrc * bsrc) gst_fdsrc_start (GstBaseSrc * bsrc)
{ {
@ -208,14 +199,10 @@ static void
gst_fdsrc_set_property (GObject * object, guint prop_id, const GValue * value, gst_fdsrc_set_property (GObject * object, guint prop_id, const GValue * value,
GParamSpec * pspec) GParamSpec * pspec)
{ {
GstFdSrc *src; GstFdSrc *src = GST_FDSRC (object);
g_return_if_fail (GST_IS_FDSRC (object));
src = GST_FDSRC (object);
switch (prop_id) { switch (prop_id) {
case ARG_FD: case PROP_FD:
src->fd = g_value_get_int (value); src->fd = g_value_get_int (value);
break; break;
default: default:
@ -228,14 +215,10 @@ static void
gst_fdsrc_get_property (GObject * object, guint prop_id, GValue * value, gst_fdsrc_get_property (GObject * object, guint prop_id, GValue * value,
GParamSpec * pspec) GParamSpec * pspec)
{ {
GstFdSrc *src; GstFdSrc *src = GST_FDSRC (object);
g_return_if_fail (GST_IS_FDSRC (object));
src = GST_FDSRC (object);
switch (prop_id) { switch (prop_id) {
case ARG_FD: case PROP_FD:
g_value_set_int (value, src->fd); g_value_set_int (value, src->fd);
break; break;
default: default: