gst/base/gstbasesrc.c (gst_base_src_unlock): Comment a bit in lieu of real docs...
authorAndy Wingo <wingo@pobox.com>
Wed, 28 Sep 2005 13:05:12 +0000 (13:05 +0000)
committerAndy Wingo <wingo@pobox.com>
Wed, 28 Sep 2005 13:05:12 +0000 (13:05 +0000)
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.

ChangeLog
gst/base/gstbasesrc.c
gst/elements/gstfdsrc.c
libs/gst/base/gstbasesrc.c
plugins/elements/gstfdsrc.c

index 52639de..15109e1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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>
 
        * gst/elements/gstcapsfilter.c:
index 5fe1a8a..a3b350f 100644 (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
 gst_base_src_unlock (GstBaseSrc * basesrc)
 {
index b248377..2e3b80f 100644 (file)
@@ -73,19 +73,10 @@ static GstElementDetails gst_fdsrc_details = GST_ELEMENT_DETAILS ("Disk Source",
     "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) \
@@ -114,6 +105,7 @@ gst_fdsrc_base_init (gpointer g_class)
       gst_static_pad_template_get (&srctemplate));
   gst_element_class_set_details (gstelement_class, &gst_fdsrc_details);
 }
+
 static void
 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->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));
 
@@ -154,7 +146,6 @@ gst_fdsrc_init (GstFdSrc * fdsrc, GstFdSrcClass * klass)
   fdsrc->curoffset = 0;
 }
 
-
 static gboolean
 gst_fdsrc_start (GstBaseSrc * bsrc)
 {
@@ -208,14 +199,10 @@ static void
 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:
@@ -228,14 +215,10 @@ static void
 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:
index 5fe1a8a..a3b350f 100644 (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
 gst_base_src_unlock (GstBaseSrc * basesrc)
 {
index b248377..2e3b80f 100644 (file)
@@ -73,19 +73,10 @@ static GstElementDetails gst_fdsrc_details = GST_ELEMENT_DETAILS ("Disk Source",
     "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) \
@@ -114,6 +105,7 @@ gst_fdsrc_base_init (gpointer g_class)
       gst_static_pad_template_get (&srctemplate));
   gst_element_class_set_details (gstelement_class, &gst_fdsrc_details);
 }
+
 static void
 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->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));
 
@@ -154,7 +146,6 @@ gst_fdsrc_init (GstFdSrc * fdsrc, GstFdSrcClass * klass)
   fdsrc->curoffset = 0;
 }
 
-
 static gboolean
 gst_fdsrc_start (GstBaseSrc * bsrc)
 {
@@ -208,14 +199,10 @@ static void
 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:
@@ -228,14 +215,10 @@ static void
 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: