From 6bd84629ed16855d11771bab63eebdbe7247c28a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 12 Jul 2011 08:53:15 +0200 Subject: [PATCH] omxh264dec: Rename from omxh264videodec to omxh264dec --- omx/Makefile.am | 4 +- omx/gstomx.c | 6 +-- omx/{gstomxh264videodec.c => gstomxh264dec.c} | 46 ++++++++++---------- omx/gstomxh264dec.h | 60 +++++++++++++++++++++++++++ omx/gstomxh264videodec.h | 60 --------------------------- 5 files changed, 87 insertions(+), 89 deletions(-) rename omx/{gstomxh264videodec.c => gstomxh264dec.c} (65%) create mode 100644 omx/gstomxh264dec.h delete mode 100644 omx/gstomxh264videodec.h diff --git a/omx/Makefile.am b/omx/Makefile.am index 88c599a..3a58222 100644 --- a/omx/Makefile.am +++ b/omx/Makefile.am @@ -4,7 +4,7 @@ libgstomx_la_SOURCES = \ gstomx.c \ gstomxvideodec.c \ gstomxmpeg4videodec.c \ - gstomxh264videodec.c \ + gstomxh264dec.c \ gstbasevideocodec.c \ gstbasevideodecoder.c \ gstbasevideoencoder.c \ @@ -13,7 +13,7 @@ libgstomx_la_SOURCES = \ noinst_HEADERS = \ gstomxvideodec.h \ gstomxmpeg4videodec.h \ - gstomxh264videodec.h \ + gstomxh264dec.h \ gstbasevideocodec.h \ gstbasevideodecoder.h \ gstbasevideoencoder.h \ diff --git a/omx/gstomx.c b/omx/gstomx.c index dc1c4e3..33dc72a 100644 --- a/omx/gstomx.c +++ b/omx/gstomx.c @@ -27,7 +27,7 @@ #include "gstomx.h" #include "gstomxmpeg4videodec.h" -#include "gstomxh264videodec.h" +#include "gstomxh264dec.h" GST_DEBUG_CATEGORY (gstomx_debug); #define GST_CAT_DEFAULT gstomx_debug @@ -1445,8 +1445,8 @@ plugin_init (GstPlugin * plugin) GST_TYPE_OMX_MPEG4_VIDEO_DEC); ret |= - gst_element_register (plugin, "omxh264videodec", GST_RANK_PRIMARY, - GST_TYPE_OMX_H264_VIDEO_DEC); + gst_element_register (plugin, "omxh264dec", GST_RANK_PRIMARY, + GST_TYPE_OMX_H264_DEC); return ret; } diff --git a/omx/gstomxh264videodec.c b/omx/gstomxh264dec.c similarity index 65% rename from omx/gstomxh264videodec.c rename to omx/gstomxh264dec.c index bd552fc..91a656f 100644 --- a/omx/gstomxh264videodec.c +++ b/omx/gstomxh264dec.c @@ -24,16 +24,16 @@ #include -#include "gstomxh264videodec.h" +#include "gstomxh264dec.h" -GST_DEBUG_CATEGORY_STATIC (gst_omx_h264_video_dec_debug_category); -#define GST_CAT_DEFAULT gst_omx_h264_video_dec_debug_category +GST_DEBUG_CATEGORY_STATIC (gst_omx_h264_dec_debug_category); +#define GST_CAT_DEFAULT gst_omx_h264_dec_debug_category /* prototypes */ -static void gst_omx_h264_video_dec_finalize (GObject * object); -static gboolean gst_omx_h264_video_dec_is_format_change (GstOMXVideoDec * dec, +static void gst_omx_h264_dec_finalize (GObject * object); +static gboolean gst_omx_h264_dec_is_format_change (GstOMXVideoDec * dec, GstOMXPort * port, GstVideoState * state); -static gboolean gst_omx_h264_video_dec_set_format (GstOMXVideoDec * dec, +static gboolean gst_omx_h264_dec_set_format (GstOMXVideoDec * dec, GstOMXPort * port, GstVideoState * state); enum @@ -44,13 +44,13 @@ enum /* class initialization */ #define DEBUG_INIT(bla) \ - GST_DEBUG_CATEGORY_INIT (gst_omx_h264_video_dec_debug_category, "omxh264videodec", 0, \ + GST_DEBUG_CATEGORY_INIT (gst_omx_h264_dec_debug_category, "omxh264dec", 0, \ "debug category for gst-omx video decoder base class"); -GST_BOILERPLATE_FULL (GstOMXH264VideoDec, gst_omx_h264_video_dec, +GST_BOILERPLATE_FULL (GstOMXH264Dec, gst_omx_h264_dec, GstOMXVideoDec, GST_TYPE_OMX_VIDEO_DEC, DEBUG_INIT); -static GstStaticPadTemplate gst_omx_h264_video_dec_sink_template = +static GstStaticPadTemplate gst_omx_h264_dec_sink_template = GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, @@ -59,7 +59,7 @@ GST_STATIC_PAD_TEMPLATE ("sink", "alignment=(string)au, " "stream-format=(string) {avc, byte-stream}") ); -static GstStaticPadTemplate gst_omx_h264_video_dec_src_template = +static GstStaticPadTemplate gst_omx_h264_dec_src_template = GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC, GST_PAD_ALWAYS, @@ -67,14 +67,14 @@ GST_STATIC_PAD_TEMPLATE ("src", ); static void -gst_omx_h264_video_dec_base_init (gpointer g_class) +gst_omx_h264_dec_base_init (gpointer g_class) { GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_omx_h264_video_dec_src_template)); + gst_static_pad_template_get (&gst_omx_h264_dec_src_template)); gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_omx_h264_video_dec_sink_template)); + gst_static_pad_template_get (&gst_omx_h264_dec_sink_template)); gst_element_class_set_details_simple (element_class, "OpenMAX H264 Video Decoder", @@ -84,12 +84,12 @@ gst_omx_h264_video_dec_base_init (gpointer g_class) } static void -gst_omx_h264_video_dec_class_init (GstOMXH264VideoDecClass * klass) +gst_omx_h264_dec_class_init (GstOMXH264DecClass * klass) { GObjectClass *gobject_class = G_OBJECT_CLASS (klass); GstOMXVideoDecClass *videodec_class = GST_OMX_VIDEO_DEC_CLASS (klass); - gobject_class->finalize = gst_omx_h264_video_dec_finalize; + gobject_class->finalize = gst_omx_h264_dec_finalize; /* TODO: Make this configurable */ videodec_class->core_name = "/usr/local/lib/libomxil-bellagio.so.0"; @@ -98,34 +98,32 @@ gst_omx_h264_video_dec_class_init (GstOMXH264VideoDecClass * klass) videodec_class->out_port_index = 1; videodec_class->is_format_change = - GST_DEBUG_FUNCPTR (gst_omx_h264_video_dec_is_format_change); - videodec_class->set_format = - GST_DEBUG_FUNCPTR (gst_omx_h264_video_dec_set_format); + GST_DEBUG_FUNCPTR (gst_omx_h264_dec_is_format_change); + videodec_class->set_format = GST_DEBUG_FUNCPTR (gst_omx_h264_dec_set_format); } static void -gst_omx_h264_video_dec_init (GstOMXH264VideoDec * self, - GstOMXH264VideoDecClass * klass) +gst_omx_h264_dec_init (GstOMXH264Dec * self, GstOMXH264DecClass * klass) { } static void -gst_omx_h264_video_dec_finalize (GObject * object) +gst_omx_h264_dec_finalize (GObject * object) { - /* GstOMXH264VideoDec *self = GST_OMX_H264_VIDEO_DEC (object); */ + /* GstOMXH264Dec *self = GST_OMX_H264_DEC (object); */ G_OBJECT_CLASS (parent_class)->finalize (object); } static gboolean -gst_omx_h264_video_dec_is_format_change (GstOMXVideoDec * dec, +gst_omx_h264_dec_is_format_change (GstOMXVideoDec * dec, GstOMXPort * port, GstVideoState * state) { return FALSE; } static gboolean -gst_omx_h264_video_dec_set_format (GstOMXVideoDec * dec, GstOMXPort * port, +gst_omx_h264_dec_set_format (GstOMXVideoDec * dec, GstOMXPort * port, GstVideoState * state) { gboolean ret; diff --git a/omx/gstomxh264dec.h b/omx/gstomxh264dec.h new file mode 100644 index 0000000..4c0ea1f --- /dev/null +++ b/omx/gstomxh264dec.h @@ -0,0 +1,60 @@ +/* + * Copyright (C) 2011, Hewlett-Packard Development Company, L.P. + * Author: Sebastian Dröge , Collabora Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation + * version 2.1 of the License. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#ifndef __GST_OMX_H264_DEC_H__ +#define __GST_OMX_H264_DEC_H__ + +#include +#include "gstomxvideodec.h" + +G_BEGIN_DECLS + +#define GST_TYPE_OMX_H264_DEC \ + (gst_omx_h264_dec_get_type()) +#define GST_OMX_H264_DEC(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_OMX_H264_DEC,GstOMXH264Dec)) +#define GST_OMX_H264_DEC_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_OMX_H264_DEC,GstOMXH264DecClass)) +#define GST_OMX_H264_DEC_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS((obj),GST_TYPE_OMX_H264_DEC,GstOMXH264DecClass)) +#define GST_IS_OMX_H264_DEC(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_OMX_H264_DEC)) +#define GST_IS_OMX_H264_DEC_CLASS(obj) \ + (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_OMX_H264_DEC)) + +typedef struct _GstOMXH264Dec GstOMXH264Dec; +typedef struct _GstOMXH264DecClass GstOMXH264DecClass; + +struct _GstOMXH264Dec +{ + GstOMXVideoDec parent; +}; + +struct _GstOMXH264DecClass +{ + GstOMXVideoDecClass parent_class; +}; + +GType gst_omx_h264_dec_get_type (void); + +G_END_DECLS + +#endif /* __GST_OMX_H264_DEC_H__ */ + diff --git a/omx/gstomxh264videodec.h b/omx/gstomxh264videodec.h deleted file mode 100644 index 6cbefc3..0000000 --- a/omx/gstomxh264videodec.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (C) 2011, Hewlett-Packard Development Company, L.P. - * Author: Sebastian Dröge , Collabora Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation - * version 2.1 of the License. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#ifndef __GST_OMX_H264_VIDEO_DEC_H__ -#define __GST_OMX_H264_VIDEO_DEC_H__ - -#include -#include "gstomxvideodec.h" - -G_BEGIN_DECLS - -#define GST_TYPE_OMX_H264_VIDEO_DEC \ - (gst_omx_h264_video_dec_get_type()) -#define GST_OMX_H264_VIDEO_DEC(obj) \ - (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_OMX_H264_VIDEO_DEC,GstOMXH264VideoDec)) -#define GST_OMX_H264_VIDEO_DEC_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_OMX_H264_VIDEO_DEC,GstOMXH264VideoDecClass)) -#define GST_OMX_H264_VIDEO_DEC_GET_CLASS(obj) \ - (G_TYPE_INSTANCE_GET_CLASS((obj),GST_TYPE_OMX_H264_VIDEO_DEC,GstOMXH264VideoDecClass)) -#define GST_IS_OMX_H264_VIDEO_DEC(obj) \ - (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_OMX_H264_VIDEO_DEC)) -#define GST_IS_OMX_H264_VIDEO_DEC_CLASS(obj) \ - (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_OMX_H264_VIDEO_DEC)) - -typedef struct _GstOMXH264VideoDec GstOMXH264VideoDec; -typedef struct _GstOMXH264VideoDecClass GstOMXH264VideoDecClass; - -struct _GstOMXH264VideoDec -{ - GstOMXVideoDec parent; -}; - -struct _GstOMXH264VideoDecClass -{ - GstOMXVideoDecClass parent_class; -}; - -GType gst_omx_h264_video_dec_get_type (void); - -G_END_DECLS - -#endif /* __GST_OMX_H264_VIDEO_DEC_H__ */ - -- 2.7.4