diff options
author | Stefan Kost <ensonic@users.sourceforge.net> | 2007-05-18 09:35:28 +0000 |
---|---|---|
committer | Stefan Kost <ensonic@users.sourceforge.net> | 2007-05-18 09:35:28 +0000 |
commit | d337dda7363352c89369fcae3bb0db898b092a5b (patch) | |
tree | 22fcdb0916c5445e7cb76d6dbec187ee61c63289 /ext/amrwb/gstamrwbparse.c | |
parent | 0df2cb85cc918ceba8276c54a3d9803696fafe2b (diff) | |
download | gst-plugins-bad-d337dda7363352c89369fcae3bb0db898b092a5b.tar.gz gst-plugins-bad-d337dda7363352c89369fcae3bb0db898b092a5b.tar.bz2 gst-plugins-bad-d337dda7363352c89369fcae3bb0db898b092a5b.zip |
ext/amrwb/gstamrwbdec.c (gst_amrwbdec_debug, GST_CAT_DEFAULT, _do_init, gst_amrwbdec_base_init, gst_amrwbdec_class_in...
Original commit message from CVS:
* ext/amrwb/gstamrwbdec.c (gst_amrwbdec_debug, GST_CAT_DEFAULT,
_do_init, gst_amrwbdec_base_init, gst_amrwbdec_class_init):
* ext/amrwb/gstamrwbenc.c (gst_amrwbenc_debug, GST_CAT_DEFAULT,
_do_init, gst_amrwbenc_base_init, gst_amrwbenc_class_init):
* ext/amrwb/gstamrwbparse.c (gst_amrwbparse_debug, GST_CAT_DEFAULT,
_do_init, gst_amrwbparse_base_init, gst_amrwbparse_class_init):
First round of cleanups, that use GST_BOILERPLATE, GST_ELEMENT_DETAILS,
GST_DEBUG_FUNCPTR and add log-category.
Diffstat (limited to 'ext/amrwb/gstamrwbparse.c')
-rw-r--r-- | ext/amrwb/gstamrwbparse.c | 36 |
1 files changed, 15 insertions, 21 deletions
diff --git a/ext/amrwb/gstamrwbparse.c b/ext/amrwb/gstamrwbparse.c index 615b6390..56be92a5 100644 --- a/ext/amrwb/gstamrwbparse.c +++ b/ext/amrwb/gstamrwbparse.c @@ -22,20 +22,8 @@ #endif #include <string.h> - #include "gstamrwbparse.h" - -GST_DEBUG_CATEGORY_STATIC (amrwbparse_debug); -#define GST_CAT_DEFAULT amrwbparse_debug - -static const GstElementDetails gst_amrwbparse_details = -GST_ELEMENT_DETAILS ("AMR-WB parser", - "Codec/Parser/Audio", - "Adaptive Multi-Rate WideBand audio parser", - "Renato Filho <renato.filho@indt.org.br>"); - - static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC, GST_PAD_ALWAYS, @@ -49,6 +37,9 @@ static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink", GST_STATIC_CAPS ("audio/x-amr-wb-sh") ); +GST_DEBUG_CATEGORY_STATIC (gst_amrwbparse_debug); +#define GST_CAT_DEFAULT gst_amrwbparse_debug + extern const UWord8 block_size[]; static void gst_amrwbparse_base_init (gpointer klass); @@ -67,20 +58,28 @@ static gboolean gst_amrwbparse_sink_activate_pull (GstPad * sinkpad, static GstStateChangeReturn gst_amrwbparse_state_change (GstElement * element, GstStateChange transition); -GST_BOILERPLATE (GstAmrwbParse, gst_amrwbparse, GstElement, GST_TYPE_ELEMENT); +#define _do_init(bla) \ + GST_DEBUG_CATEGORY_INIT (gst_amrwbparse_debug, "amrwbparse", 0, "AMR-WB audio stream parser"); + +GST_BOILERPLATE_FULL (GstAmrwbParse, gst_amrwbparse, GstElement, + GST_TYPE_ELEMENT, _do_init); static void gst_amrwbparse_base_init (gpointer klass) { GstElementClass *element_class = GST_ELEMENT_CLASS (klass); - - gst_element_class_set_details (element_class, &gst_amrwbparse_details); + GstElementDetails details = GST_ELEMENT_DETAILS ("AMR-WB audio stream parser", + "Codec/Parser/Audio", + "Adaptive Multi-Rate WideBand audio parser", + "Renato Filho <renato.filho@indt.org.br>"); gst_element_class_add_pad_template (element_class, gst_static_pad_template_get (&sink_template)); gst_element_class_add_pad_template (element_class, gst_static_pad_template_get (&src_template)); + gst_element_class_set_details (element_class, &details); + } static void @@ -88,12 +87,7 @@ gst_amrwbparse_class_init (GstAmrwbParseClass * klass) { GstElementClass *element_class = GST_ELEMENT_CLASS (klass); - parent_class = g_type_class_peek_parent (klass); - - element_class->change_state = gst_amrwbparse_state_change; - - GST_DEBUG_CATEGORY_INIT (amrwbparse_debug, - "amrwbparse", 0, "AMR-WB stream parsing"); + element_class->change_state = GST_DEBUG_FUNCPTR (gst_amrwbparse_state_change); } static void |