rtpvp8: include config.h and minor style fixes
authorTim-Philipp Müller <tim@centricular.net>
Thu, 1 Nov 2012 21:09:56 +0000 (21:09 +0000)
committerTim-Philipp Müller <tim@centricular.net>
Thu, 1 Nov 2012 21:10:21 +0000 (21:10 +0000)
gst/rtp/gstrtpvp8depay.c
gst/rtp/gstrtpvp8depay.h
gst/rtp/gstrtpvp8pay.c
gst/rtp/gstrtpvp8pay.h

index 9d7e5e6..2538a3d 100644 (file)
@@ -1,5 +1,4 @@
-/*
- * gstrtpvp8depay.c - Source for GstRtpVP8Depay
+/* gstrtpvp8depay.c - Source for GstRtpVP8Depay
  * Copyright (C) 2011 Sjoerd Simons <sjoerd@luon.net>
  * Copyright (C) 2011 Collabora Ltd.
  *   Contact: Youness Alaoui <youness.alaoui@collabora.co.uk>
@@ -19,7 +18,6 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-
 #ifdef HAVE_CONFIG_H
 # include "config.h"
 #endif
 GST_DEBUG_CATEGORY_STATIC (gst_rtp_vp8_depay_debug);
 #define GST_CAT_DEFAULT gst_rtp_vp8_depay_debug
 
+static void gst_rtp_vp8_depay_dispose (GObject * object);
+static GstBuffer *gst_rtp_vp8_depay_process (GstRTPBaseDepayload * depayload,
+    GstBuffer * buf);
+static gboolean gst_rtp_vp8_depay_set_caps (GstRTPBaseDepayload * depayload,
+    GstCaps * caps);
+
 G_DEFINE_TYPE (GstRtpVP8Depay, gst_rtp_vp8_depay, GST_TYPE_RTP_BASE_DEPAYLOAD);
 
 static GstStaticPadTemplate gst_rtp_vp8_depay_src_template =
@@ -54,12 +58,6 @@ gst_rtp_vp8_depay_init (GstRtpVP8Depay * self)
   self->started = FALSE;
 }
 
-static void gst_rtp_vp8_depay_dispose (GObject * object);
-static GstBuffer *gst_rtp_vp8_depay_process (GstRTPBaseDepayload * depayload,
-    GstBuffer * buf);
-static gboolean gst_rtp_vp8_depay_set_caps (GstRTPBaseDepayload * depayload,
-    GstCaps * caps);
-
 static void
 gst_rtp_vp8_depay_class_init (GstRtpVP8DepayClass * gst_rtp_vp8_depay_class)
 {
index 5cd5f43..f10b563 100644 (file)
 #ifndef __GST_RTP_VP8_DEPAY_H__
 #define __GST_RTP_VP8_DEPAY_H__
 
-#include <glib-object.h>
 #include <gst/base/gstadapter.h>
 #include <gst/rtp/gstrtpbasedepayload.h>
 
-G_BEGIN_DECLS typedef struct _GstRtpVP8Depay GstRtpVP8Depay;
-typedef struct _GstRtpVP8DepayClass GstRtpVP8DepayClass;
-
-struct _GstRtpVP8DepayClass
-{
-  GstRTPBaseDepayloadClass parent_class;
-};
-
-struct _GstRtpVP8Depay
-{
-  GstRTPBaseDepayload parent;
-  GstAdapter *adapter;
-  gboolean started;
-};
-
-GType gst_rtp_vp8_depay_get_type (void);
+G_BEGIN_DECLS
 
-/* TYPE MACROS */
 #define GST_TYPE_RTP_VP8_DEPAY \
   (gst_rtp_vp8_depay_get_type())
 #define GST_RTP_VP8_DEPAY(obj) \
@@ -57,7 +40,25 @@ GType gst_rtp_vp8_depay_get_type (void);
   (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_RTP_VP8_DEPAY, \
     GstRtpVP8DepayClass))
 
+typedef struct _GstRtpVP8Depay GstRtpVP8Depay;
+typedef struct _GstRtpVP8DepayClass GstRtpVP8DepayClass;
+
+struct _GstRtpVP8DepayClass
+{
+  GstRTPBaseDepayloadClass parent_class;
+};
+
+struct _GstRtpVP8Depay
+{
+  GstRTPBaseDepayload parent;
+  GstAdapter *adapter;
+  gboolean started;
+};
+
+GType gst_rtp_vp8_depay_get_type (void);
+
 gboolean gst_rtp_vp8_depay_plugin_init (GstPlugin * plugin);
 
 G_END_DECLS
+
 #endif /* #ifndef __GST_RTP_VP8_DEPAY_H__ */
index 29d41c2..988d55d 100644 (file)
@@ -19,6 +19,9 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -35,6 +38,13 @@ GST_DEBUG_CATEGORY_STATIC (gst_rtp_vp8_pay_debug);
 
 #define DEFAULT_PICTURE_ID_MODE VP8_PAY_PICTURE_ID_7BITS
 
+static GstFlowReturn gst_rtp_vp8_pay_handle_buffer (GstRTPBasePayload * payload,
+    GstBuffer * buffer);
+static gboolean gst_rtp_vp8_pay_sink_event (GstRTPBasePayload * payload,
+    GstEvent * event);
+static gboolean gst_rtp_vp8_pay_set_caps (GstRTPBasePayload * payload,
+    GstCaps * caps);
+
 G_DEFINE_TYPE (GstRtpVP8Pay, gst_rtp_vp8_pay, GST_TYPE_RTP_BASE_PAYLOAD);
 
 static GstStaticPadTemplate gst_rtp_vp8_pay_src_template =
@@ -62,14 +72,6 @@ gst_rtp_vp8_pay_init (GstRtpVP8Pay * obj)
     obj->picture_id = g_random_int_range (0, G_MAXUINT16) & 0x7FFF;
 }
 
-static GstFlowReturn gst_rtp_vp8_pay_handle_buffer (GstRTPBasePayload * payload,
-    GstBuffer * buffer);
-static gboolean gst_rtp_vp8_pay_sink_event (GstRTPBasePayload * payload,
-    GstEvent * event);
-static gboolean gst_rtp_vp8_pay_set_caps (GstRTPBasePayload * payload,
-    GstCaps * caps);
-
-
 static void
 gst_rtp_vp8_pay_class_init (GstRtpVP8PayClass * gst_rtp_vp8_pay_class)
 {
@@ -297,11 +299,11 @@ gst_rtp_vp8_calc_header_len (GstRtpVP8Pay * self)
   }
 }
 
-
 static gsize
 gst_rtp_vp8_calc_payload_len (GstRtpVP8Pay * self)
 {
   GstRTPBasePayload *payload = GST_RTP_BASE_PAYLOAD (self);
+
   return gst_rtp_buffer_calc_payload_len (GST_RTP_BASE_PAYLOAD_MTU (payload) -
       gst_rtp_vp8_calc_header_len (self), 0, 0);
 }
index 2715a9e..2472060 100644 (file)
 #ifndef __GST_RTP_VP8_PAY_H__
 #define __GST_RTP_VP8_PAY_H__
 
-#include <glib-object.h>
-#include <gst/base/gstadapter.h>
 #include <gst/rtp/gstrtpbasepayload.h>
 
-G_BEGIN_DECLS typedef struct _GstRtpVP8Pay GstRtpVP8Pay;
+G_BEGIN_DECLS
+
+#define GST_TYPE_RTP_VP8_PAY \
+  (gst_rtp_vp8_pay_get_type())
+#define GST_RTP_VP8_PAY(obj) \
+  (G_TYPE_CHECK_INSTANCE_CAST((obj), GST_TYPE_RTP_VP8_PAY, GstRtpVP8Pay))
+#define GST_RTP_VP8_PAY_CLASS(klass) \
+  (G_TYPE_CHECK_CLASS_CAST((klass), GST_TYPE_RTP_VP8_PAY, GstRtpVP8PayClass))
+#define GST_IS_RTP_VP8_PAY(obj) \
+  (G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_TYPE_RTP_VP8_PAY))
+#define GST_IS_RTP_VP8_PAY_CLASS(klass) \
+  (G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_RTP_VP8_PAY))
+#define GST_RTP_VP8_PAY_GET_CLASS(obj) \
+  (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_RTP_VP8_PAY, GstRtpVP8PayClass))
+
+typedef struct _GstRtpVP8Pay GstRtpVP8Pay;
 typedef struct _GstRtpVP8PayClass GstRtpVP8PayClass;
 typedef enum _PictureIDMode PictureIDMode;
 
@@ -54,21 +67,8 @@ struct _GstRtpVP8Pay
 
 GType gst_rtp_vp8_pay_get_type (void);
 
-/* TYPE MACROS */
-#define GST_TYPE_RTP_VP8_PAY \
-  (gst_rtp_vp8_pay_get_type())
-#define GST_RTP_VP8_PAY(obj) \
-  (G_TYPE_CHECK_INSTANCE_CAST((obj), GST_TYPE_RTP_VP8_PAY, GstRtpVP8Pay))
-#define GST_RTP_VP8_PAY_CLASS(klass) \
-  (G_TYPE_CHECK_CLASS_CAST((klass), GST_TYPE_RTP_VP8_PAY, GstRtpVP8PayClass))
-#define GST_IS_RTP_VP8_PAY(obj) \
-  (G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_TYPE_RTP_VP8_PAY))
-#define GST_IS_RTP_VP8_PAY_CLASS(klass) \
-  (G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_RTP_VP8_PAY))
-#define GST_RTP_VP8_PAY_GET_CLASS(obj) \
-  (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_RTP_VP8_PAY, GstRtpVP8PayClass))
-
 gboolean gst_rtp_vp8_pay_plugin_init (GstPlugin * plugin);
 
 G_END_DECLS
+
 #endif /* #ifndef __GST_RTP_VP8_PAY_H__ */