[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gstreamer-cvs
Subject:    [gst-cvs] gst-plugins-bad: ivfparse: fix up macros and function
From:       tpm () kemper ! freedesktop ! org (Tim Müller)
Date:       2010-07-28 16:44:59
Message-ID: 20100728164459.A8F6710056 () kemper ! freedesktop ! org
[Download RAW message or body]

Module: gst-plugins-bad
Branch: master
Commit: e12ca273db30fb75d51728ee4cdc98dd20e0ed07
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=e12ca273db30fb75d51728ee4cdc98dd20e0ed07


Author: Tim-Philipp Müller <tim.muller@collabora.co.uk>
Date:   Wed Jul 28 17:46:53 2010 +0200

ivfparse: fix up macros and function names to match guidelines

---

 gst/ivfparse/gstivfparse.c |   46 ++++++++++++++++++++++----------------------
 gst/ivfparse/gstivfparse.h |   32 +++++++++++++++---------------
 2 files changed, 39 insertions(+), 39 deletions(-)

diff --git a/gst/ivfparse/gstivfparse.c b/gst/ivfparse/gstivfparse.c
index da5efa7..7e62441 100644
--- a/gst/ivfparse/gstivfparse.c
+++ b/gst/ivfparse/gstivfparse.c
@@ -51,8 +51,8 @@
 
 #include "gstivfparse.h"
 
-GST_DEBUG_CATEGORY_STATIC (gst_ivfparse_debug);
-#define GST_CAT_DEFAULT gst_ivfparse_debug
+GST_DEBUG_CATEGORY_STATIC (gst_ivf_parse_debug);
+#define GST_CAT_DEFAULT gst_ivf_parse_debug
 
 /* sink and src pad templates */
 static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink",
@@ -67,15 +67,15 @@ static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE \
("src",  GST_STATIC_CAPS ("ANY")
     );
 
-GST_BOILERPLATE (GstIvfParse, gst_ivfparse, GstElement, GST_TYPE_ELEMENT);
+GST_BOILERPLATE (GstIvfParse, gst_ivf_parse, GstElement, GST_TYPE_ELEMENT);
 
-static void gst_ivfparse_dispose (GObject * object);
-static GstFlowReturn gst_ivfparse_chain (GstPad * pad, GstBuffer * buf);
+static void gst_ivf_parse_dispose (GObject * object);
+static GstFlowReturn gst_ivf_parse_chain (GstPad * pad, GstBuffer * buf);
 
 /* GObject vmethod implementations */
 
 static void
-gst_ivfparse_base_init (gpointer gclass)
+gst_ivf_parse_base_init (gpointer gclass)
 {
   GstElementClass *element_class = GST_ELEMENT_CLASS (gclass);
 
@@ -92,7 +92,7 @@ gst_ivfparse_base_init (gpointer gclass)
 
 /* initialize the ivfparse's class */
 static void
-gst_ivfparse_class_init (GstIvfParseClass * klass)
+gst_ivf_parse_class_init (GstIvfParseClass * klass)
 {
   GObjectClass *gobject_class;
   GstElementClass *gstelement_class;
@@ -100,18 +100,18 @@ gst_ivfparse_class_init (GstIvfParseClass * klass)
   gobject_class = (GObjectClass *) klass;
   gstelement_class = (GstElementClass *) klass;
 
-  gobject_class->dispose = gst_ivfparse_dispose;
+  gobject_class->dispose = gst_ivf_parse_dispose;
 }
 
 static void
-gst_ivfparse_reset (GstIvfParse * ivf)
+gst_ivf_parse_reset (GstIvfParse * ivf)
 {
   if (ivf->adapter) {
     gst_adapter_clear (ivf->adapter);
     g_object_unref (ivf->adapter);
     ivf->adapter = NULL;
   }
-  ivf->state = GST_IVFPARSE_START;
+  ivf->state = GST_IVF_PARSE_START;
   ivf->rate_num = 0;
   ivf->rate_den = 0;
 }
@@ -122,12 +122,12 @@ gst_ivfparse_reset (GstIvfParse * ivf)
  * initialize instance structure
  */
 static void
-gst_ivfparse_init (GstIvfParse * ivf, GstIvfParseClass * gclass)
+gst_ivf_parse_init (GstIvfParse * ivf, GstIvfParseClass * gclass)
 {
   /* sink pad */
   ivf->sinkpad = gst_pad_new_from_static_template (&sink_factory, "sink");
   gst_pad_set_chain_function (ivf->sinkpad,
-      GST_DEBUG_FUNCPTR (gst_ivfparse_chain));
+      GST_DEBUG_FUNCPTR (gst_ivf_parse_chain));
 
   /* src pad */
   ivf->srcpad = gst_pad_new_from_static_template (&src_factory, "src");
@@ -137,16 +137,16 @@ gst_ivfparse_init (GstIvfParse * ivf, GstIvfParseClass * \
gclass)  gst_element_add_pad (GST_ELEMENT (ivf), ivf->srcpad);
 
   /* reset */
-  gst_ivfparse_reset (ivf);
+  gst_ivf_parse_reset (ivf);
 }
 
 static void
-gst_ivfparse_dispose (GObject * object)
+gst_ivf_parse_dispose (GObject * object)
 {
-  GstIvfParse *ivf = GST_IVFPARSE (object);
+  GstIvfParse *ivf = GST_IVF_PARSE (object);
 
   GST_DEBUG_OBJECT (ivf, "disposing");
-  gst_ivfparse_reset (ivf);
+  gst_ivf_parse_reset (ivf);
 
   G_OBJECT_CLASS (parent_class)->dispose (object);
 }
@@ -157,9 +157,9 @@ gst_ivfparse_dispose (GObject * object)
  * this function does the actual processing
  */
 static GstFlowReturn
-gst_ivfparse_chain (GstPad * pad, GstBuffer * buf)
+gst_ivf_parse_chain (GstPad * pad, GstBuffer * buf)
 {
-  GstIvfParse *ivf = GST_IVFPARSE (GST_OBJECT_PARENT (pad));
+  GstIvfParse *ivf = GST_IVF_PARSE (GST_OBJECT_PARENT (pad));
   gboolean res;
 
   /* lazy creation of the adapter */
@@ -175,7 +175,7 @@ gst_ivfparse_chain (GstPad * pad, GstBuffer * buf)
   res = GST_FLOW_OK;
 
   switch (ivf->state) {
-    case GST_IVFPARSE_START:
+    case GST_IVF_PARSE_START:
       if (gst_adapter_available (ivf->adapter) >= 32) {
         GstCaps *caps;
 
@@ -222,7 +222,7 @@ gst_ivfparse_chain (GstPad * pad, GstBuffer * buf)
                 GST_FORMAT_TIME, 0, -1, 0));
 
         /* move along */
-        ivf->state = GST_IVFPARSE_DATA;
+        ivf->state = GST_IVF_PARSE_DATA;
       } else {
         GST_LOG_OBJECT (ivf, "Header data not yet available.");
         break;
@@ -230,7 +230,7 @@ gst_ivfparse_chain (GstPad * pad, GstBuffer * buf)
 
       /* fall through */
 
-    case GST_IVFPARSE_DATA:
+    case GST_IVF_PARSE_DATA:
       while (gst_adapter_available (ivf->adapter) > 12) {
         const guint8 *data = gst_adapter_peek (ivf->adapter, 12);
         guint32 frame_size = GST_READ_UINT32_LE (data);
@@ -284,11 +284,11 @@ static gboolean
 ivfparse_init (GstPlugin * ivfparse)
 {
   /* debug category for filtering log messages */
-  GST_DEBUG_CATEGORY_INIT (gst_ivfparse_debug, "ivfparse", 0, "IVF parser");
+  GST_DEBUG_CATEGORY_INIT (gst_ivf_parse_debug, "ivfparse", 0, "IVF parser");
 
   /* register parser element */
   if (!gst_element_register (ivfparse, "ivfparse", GST_RANK_PRIMARY,
-          GST_TYPE_IVFPARSE))
+          GST_TYPE_IVF_PARSE))
     return FALSE;
 
   return TRUE;
diff --git a/gst/ivfparse/gstivfparse.h b/gst/ivfparse/gstivfparse.h
index 7fcdd17..6cfb012 100644
--- a/gst/ivfparse/gstivfparse.h
+++ b/gst/ivfparse/gstivfparse.h
@@ -19,28 +19,28 @@
  * Boston, MA 02111-1307, USA.
  */
 
-#ifndef __GST_IVFPARSE_H__
-#define __GST_IVFPARSE_H__
+#ifndef __GST_IVF_PARSE_H__
+#define __GST_IVF_PARSE_H__
 
 #include <gst/gst.h>
 #include <gst/base/gstadapter.h>
 
 G_BEGIN_DECLS
 
-#define GST_TYPE_IVFPARSE \
-  (gst_ivfparse_get_type())
-#define GST_IVFPARSE(obj) \
-  (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_IVFPARSE,GstIvfParse))
-#define GST_IVFPARSE_CLASS(klass) \
-  (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_IVFPARSE,GstIvfParseClass))
-#define GST_IS_IVFPARSE(obj) \
-  (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_IVFPARSE))
-#define GST_IS_IVFPARSE_CLASS(klass) \
-  (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_IVFPARSE))
+#define GST_TYPE_IVF_PARSE \
+  (gst_ivf_parse_get_type())
+#define GST_IVF_PARSE(obj) \
+  (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_IVF_PARSE,GstIvfParse))
+#define GST_IVF_PARSE_CLASS(klass) \
+  (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_IVF_PARSE,GstIvfParseClass))
+#define GST_IS_IVF_PARSE(obj) \
+  (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_IVF_PARSE))
+#define GST_IS_IVF_PARSE_CLASS(klass) \
+  (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_IVF_PARSE))
 
 typedef enum {
-  GST_IVFPARSE_START,
-  GST_IVFPARSE_DATA
+  GST_IVF_PARSE_START,
+  GST_IVF_PARSE_DATA
 } GstIvfParseState;
 
 typedef struct _GstIvfParse GstIvfParse;
@@ -66,8 +66,8 @@ struct _GstIvfParseClass
   GstElementClass parent_class;
 };
 
-GType gst_ivfparse_get_type (void);
+GType gst_ivf_parse_get_type (void);
 
 G_END_DECLS
 
-#endif /* __GST_IVFPARSE_H__ */
+#endif /* __GST_IVF_PARSE_H__ */



------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm

_______________________________________________
gstreamer-cvs mailing list
gstreamer-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gstreamer-cvs


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic