summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier CrĂȘte <olivier.crete@collabora.co.uk>2009-02-10 17:55:47 +0000
committerEdward Hervey <bilboed@bilboed.com>2009-02-17 19:29:59 +0100
commitd1c9b30adae04fcbfe74399c00e91c5073c6dc72 (patch)
treeba29aad4f6c4f3af76f52c94447e4919a904a4e1
parent06b1c78adeef13ac30f486d09a16ff775d355448 (diff)
downloadgst-plugins-bad-d1c9b30adae04fcbfe74399c00e91c5073c6dc72.tar.gz
gst-plugins-bad-d1c9b30adae04fcbfe74399c00e91c5073c6dc72.tar.bz2
gst-plugins-bad-d1c9b30adae04fcbfe74399c00e91c5073c6dc72.zip
Re-indent valve in gst style
-rw-r--r--gst/valve/gstvalve.c57
-rw-r--r--gst/valve/gstvalve.h13
2 files changed, 32 insertions, 38 deletions
diff --git a/gst/valve/gstvalve.c b/gst/valve/gstvalve.c
index a61e009e..a939259c 100644
--- a/gst/valve/gstvalve.c
+++ b/gst/valve/gstvalve.c
@@ -35,11 +35,10 @@ GST_DEBUG_CATEGORY (valve_debug);
/* elementfactory information */
static const GstElementDetails gst_valve_details =
-GST_ELEMENT_DETAILS (
- "Valve element",
- "Filter",
- "This element drops all packets when drop is TRUE",
- "Olivier Crete <olivier.crete@collabora.co.uk>");
+GST_ELEMENT_DETAILS ("Valve element",
+ "Filter",
+ "This element drops all packets when drop is TRUE",
+ "Olivier Crete <olivier.crete@collabora.co.uk>");
static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
@@ -68,22 +67,21 @@ enum
-static void gst_valve_set_property (GObject *object,
+static void gst_valve_set_property (GObject * object,
guint prop_id, const GValue * value, GParamSpec * pspec);
-static void gst_valve_get_property (GObject *object,
- guint prop_id, GValue *value, GParamSpec *pspec);
+static void gst_valve_get_property (GObject * object,
+ guint prop_id, GValue * value, GParamSpec * pspec);
-static gboolean gst_valve_event (GstPad *pad, GstEvent *event);
+static gboolean gst_valve_event (GstPad * pad, GstEvent * event);
static GstFlowReturn gst_valve_buffer_alloc (GstPad * pad, guint64 offset,
guint size, GstCaps * caps, GstBuffer ** buf);
-static GstFlowReturn gst_valve_chain (GstPad *pad, GstBuffer *buffer);
-static GstCaps *gst_valve_getcaps (GstPad *pad);
+static GstFlowReturn gst_valve_chain (GstPad * pad, GstBuffer * buffer);
+static GstCaps *gst_valve_getcaps (GstPad * pad);
static void
_do_init (GType type)
{
- GST_DEBUG_CATEGORY_INIT
- (valve_debug, "valve", 0, "Valve");
+ GST_DEBUG_CATEGORY_INIT (valve_debug, "valve", 0, "Valve");
}
GST_BOILERPLATE_FULL (GstValve, gst_valve, GstElement,
@@ -103,7 +101,7 @@ gst_valve_base_init (gpointer klass)
}
static void
-gst_valve_class_init (GstValveClass *klass)
+gst_valve_class_init (GstValveClass * klass)
{
GObjectClass *gobject_class;
@@ -114,15 +112,15 @@ gst_valve_class_init (GstValveClass *klass)
g_object_class_install_property (gobject_class, ARG_DROP,
g_param_spec_boolean ("drop",
- "Drops all buffers if TRUE",
- "If this property if TRUE, the element will drop all buffers, if its FALSE, it will let them through",
+ "Drops all buffers if TRUE",
+ "If this property if TRUE, the element will drop all buffers, if its FALSE, it will let them through",
FALSE, G_PARAM_READWRITE));
parent_class = g_type_class_peek_parent (klass);
}
static void
-gst_valve_init (GstValve *valve, GstValveClass *klass)
+gst_valve_init (GstValve * valve, GstValveClass * klass)
{
valve->drop = FALSE;
valve->discont = FALSE;
@@ -146,8 +144,8 @@ gst_valve_init (GstValve *valve, GstValveClass *klass)
static void
-gst_valve_set_property (GObject *object,
- guint prop_id, const GValue *value, GParamSpec *pspec)
+gst_valve_set_property (GObject * object,
+ guint prop_id, const GValue * value, GParamSpec * pspec)
{
GstValve *valve = GST_VALVE (object);
@@ -164,8 +162,8 @@ gst_valve_set_property (GObject *object,
}
static void
-gst_valve_get_property (GObject *object,
- guint prop_id, GValue *value, GParamSpec *pspec)
+gst_valve_get_property (GObject * object,
+ guint prop_id, GValue * value, GParamSpec * pspec)
{
GstValve *valve = GST_VALVE (object);
@@ -182,7 +180,7 @@ gst_valve_get_property (GObject *object,
}
static GstFlowReturn
-gst_valve_chain (GstPad *pad, GstBuffer *buffer)
+gst_valve_chain (GstPad * pad, GstBuffer * buffer)
{
GstValve *valve = GST_VALVE (gst_pad_get_parent_element (pad));
GstFlowReturn ret = GST_FLOW_OK;
@@ -191,8 +189,7 @@ gst_valve_chain (GstPad *pad, GstBuffer *buffer)
GST_OBJECT_LOCK (GST_OBJECT (valve));
drop = valve->drop;
- if (!drop && valve->discont)
- {
+ if (!drop && valve->discont) {
buffer = gst_buffer_make_metadata_writable (buffer);
GST_BUFFER_FLAG_SET (buffer, GST_BUFFER_FLAG_DISCONT);
valve->discont = FALSE;
@@ -217,7 +214,7 @@ gst_valve_chain (GstPad *pad, GstBuffer *buffer)
static gboolean
-gst_valve_event (GstPad *pad, GstEvent *event)
+gst_valve_event (GstPad * pad, GstEvent * event)
{
GstValve *valve = GST_VALVE (gst_pad_get_parent_element (pad));
gboolean ret = TRUE;
@@ -243,7 +240,7 @@ gst_valve_event (GstPad *pad, GstEvent *event)
static GstFlowReturn
gst_valve_buffer_alloc (GstPad * pad, guint64 offset, guint size,
- GstCaps * caps, GstBuffer ** buf)
+ GstCaps * caps, GstBuffer ** buf)
{
GstValve *valve = GST_VALVE (gst_pad_get_parent_element (pad));
GstFlowReturn ret = GST_FLOW_OK;
@@ -270,7 +267,7 @@ gst_valve_buffer_alloc (GstPad * pad, guint64 offset, guint size,
gboolean
-gst_valve_plugin_init (GstPlugin *plugin)
+gst_valve_plugin_init (GstPlugin * plugin)
{
return gst_element_register (plugin, "fsvalve",
GST_RANK_MARGINAL, GST_TYPE_VALVE);
@@ -280,10 +277,10 @@ GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
GST_VERSION_MINOR,
"fsvalve",
"Valve",
- gst_valve_plugin_init, VERSION, "LGPL", "Farsight", "http://farsight.sf.net")
+ gst_valve_plugin_init, VERSION, "LGPL", "Farsight",
+ "http://farsight.sf.net")
-static GstCaps *
-gst_valve_getcaps (GstPad *pad)
+ static GstCaps *gst_valve_getcaps (GstPad * pad)
{
GstValve *valve = GST_VALVE (gst_pad_get_parent (pad));
GstCaps *caps;
diff --git a/gst/valve/gstvalve.h b/gst/valve/gstvalve.h
index a0a09d81..06ab2072 100644
--- a/gst/valve/gstvalve.h
+++ b/gst/valve/gstvalve.h
@@ -28,7 +28,6 @@
#include <gst/gst.h>
G_BEGIN_DECLS
-
/* #define's don't like whitespacey bits */
#define GST_TYPE_VALVE \
(gst_valve_get_type())
@@ -42,7 +41,6 @@ G_BEGIN_DECLS
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_VALVE))
#define GST_IS_VALVE_CLASS(obj) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_VALVE))
-
typedef struct _GstValve GstValve;
typedef struct _GstValveClass GstValveClass;
typedef struct _GstValvePrivate GstValvePrivate;
@@ -52,13 +50,13 @@ struct _GstValve
GstElement parent;
/* Protected by the object lock */
- gboolean drop;
+ gboolean drop;
- /* Protected by the stream lock*/
- gboolean discont;
+ /* Protected by the stream lock */
+ gboolean discont;
- GstPad *srcpad;
- GstPad *sinkpad;
+ GstPad *srcpad;
+ GstPad *sinkpad;
/*< private > */
gpointer _gst_reserved[GST_PADDING];
@@ -75,5 +73,4 @@ struct _GstValveClass
GType gst_valve_get_type (void);
G_END_DECLS
-
#endif /* __GST_VALVE_H__ */