summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian.droege@collabora.co.uk>2013-03-18 16:34:21 +0100
committerSebastian Dröge <sebastian.droege@collabora.co.uk>2013-03-18 16:34:51 +0100
commit36e76faa05b82d715a18450bd8cc12abca17e080 (patch)
treebe5caa9657272afcd49b184d256b44f5e778e798
parentd9d46263c67ac6f5068ca909d8d696326e6eef67 (diff)
downloadgst-omx-36e76faa05b82d715a18450bd8cc12abca17e080.tar.gz
omx: Rename MPEG2 decoder for consistency everywhere
-rw-r--r--config/rpi/gstomx.conf2
-rw-r--r--omx/Makefile.am4
-rw-r--r--omx/gstomx.c4
-rw-r--r--omx/gstomxmpeg2dec.h59
-rw-r--r--omx/gstomxmpeg2videodec.c (renamed from omx/gstomxmpeg2dec.c)27
-rw-r--r--omx/gstomxmpeg2videodec.h59
6 files changed, 78 insertions, 77 deletions
diff --git a/config/rpi/gstomx.conf b/config/rpi/gstomx.conf
index 1cbf23e..7450531 100644
--- a/config/rpi/gstomx.conf
+++ b/config/rpi/gstomx.conf
@@ -1,5 +1,5 @@
[omxmpeg2videodec]
-type-name=GstOMXMPEG2Dec
+type-name=GstOMXMPEG2VideoDec
core-name=/opt/vc/lib/libopenmaxil.so
component-name=OMX.broadcom.video_decode
rank=256
diff --git a/omx/Makefile.am b/omx/Makefile.am
index 2e16f7c..96dea1b 100644
--- a/omx/Makefile.am
+++ b/omx/Makefile.am
@@ -12,7 +12,7 @@ libgstomx_la_SOURCES = \
gstomxaudioenc.c \
gstomxmjpegdec.c \
gstomxmpeg4videodec.c \
- gstomxmpeg2dec.c \
+ gstomxmpeg2videodec.c \
gstomxh264dec.c \
gstomxh263dec.c \
$(VP8_C_FILES) \
@@ -28,7 +28,7 @@ noinst_HEADERS = \
gstomxvideoenc.h \
gstomxaudioenc.h \
gstomxmjpegdec.h \
- gstomxmpeg2dec.h \
+ gstomxmpeg2videodec.h \
gstomxmpeg4videodec.h \
gstomxh264dec.h \
gstomxh263dec.h \
diff --git a/omx/gstomx.c b/omx/gstomx.c
index 61618b5..4691d51 100644
--- a/omx/gstomx.c
+++ b/omx/gstomx.c
@@ -29,7 +29,7 @@
#include "gstomx.h"
#include "gstomxmjpegdec.h"
-#include "gstomxmpeg2dec.h"
+#include "gstomxmpeg2videodec.h"
#include "gstomxmpeg4videodec.h"
#include "gstomxh264dec.h"
#include "gstomxh263dec.h"
@@ -2323,7 +2323,7 @@ done:
typedef GType (*GGetTypeFunction) (void);
static const GGetTypeFunction types[] = {
- gst_omx_mpeg2_dec_get_type, gst_omx_mpeg4_video_dec_get_type,
+ gst_omx_mpeg2_video_dec_get_type, gst_omx_mpeg4_video_dec_get_type,
gst_omx_h264_dec_get_type, gst_omx_h263_dec_get_type,
gst_omx_wmv_dec_get_type, gst_omx_mpeg4_video_enc_get_type,
gst_omx_h264_enc_get_type, gst_omx_h263_enc_get_type,
diff --git a/omx/gstomxmpeg2dec.h b/omx/gstomxmpeg2dec.h
deleted file mode 100644
index d05beff..0000000
--- a/omx/gstomxmpeg2dec.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (C) 2011, Hewlett-Packard Development Company, L.P.
- * Author: Sebastian Dröge <sebastian.droege@collabora.co.uk>, 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_MPEG2_DEC_H__
-#define __GST_OMX_MPEG2_DEC_H__
-
-#include <gst/gst.h>
-#include "gstomxvideodec.h"
-
-G_BEGIN_DECLS
-
-#define GST_TYPE_OMX_MPEG2_DEC \
- (gst_omx_mpeg2_dec_get_type())
-#define GST_OMX_MPEG2_DEC(obj) \
- (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_OMX_MPEG2_DEC,GstOMXMPEG2Dec))
-#define GST_OMX_MPEG2_DEC_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_OMX_MPEG2_DEC,GstOMXMPEG2DecClass))
-#define GST_OMX_MPEG2_DEC_GET_CLASS(obj) \
- (G_TYPE_INSTANCE_GET_CLASS((obj),GST_TYPE_OMX_MPEG2_DEC,GstOMXMPEG2DecClass))
-#define GST_IS_OMX_MPEG2_DEC(obj) \
- (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_OMX_MPEG2_DEC))
-#define GST_IS_OMX_MPEG2_DEC_CLASS(obj) \
- (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_OMX_MPEG2_DEC))
-
-typedef struct _GstOMXMPEG2Dec GstOMXMPEG2Dec;
-typedef struct _GstOMXMPEG2DecClass GstOMXMPEG2DecClass;
-
-struct _GstOMXMPEG2Dec
-{
- GstOMXVideoDec parent;
-};
-
-struct _GstOMXMPEG2DecClass
-{
- GstOMXVideoDecClass parent_class;
-};
-
-GType gst_omx_mpeg2_dec_get_type (void);
-
-G_END_DECLS
-
-#endif /* __GST_OMX_MPEG2_DEC_H__ */
diff --git a/omx/gstomxmpeg2dec.c b/omx/gstomxmpeg2videodec.c
index 539782c..a3cfd83 100644
--- a/omx/gstomxmpeg2dec.c
+++ b/omx/gstomxmpeg2videodec.c
@@ -24,15 +24,15 @@
#include <gst/gst.h>
-#include "gstomxmpeg2dec.h"
+#include "gstomxmpeg2videodec.h"
-GST_DEBUG_CATEGORY_STATIC (gst_omx_mpeg2_dec_debug_category);
-#define GST_CAT_DEFAULT gst_omx_mpeg2_dec_debug_category
+GST_DEBUG_CATEGORY_STATIC (gst_omx_mpeg2_video_dec_debug_category);
+#define GST_CAT_DEFAULT gst_omx_mpeg2_video_dec_debug_category
/* prototypes */
-static gboolean gst_omx_mpeg2_dec_is_format_change (GstOMXVideoDec * dec,
+static gboolean gst_omx_mpeg2_video_dec_is_format_change (GstOMXVideoDec * dec,
GstOMXPort * port, GstVideoCodecState * state);
-static gboolean gst_omx_mpeg2_dec_set_format (GstOMXVideoDec * dec,
+static gboolean gst_omx_mpeg2_video_dec_set_format (GstOMXVideoDec * dec,
GstOMXPort * port, GstVideoCodecState * state);
enum
@@ -43,21 +43,22 @@ enum
/* class initialization */
#define DEBUG_INIT \
- GST_DEBUG_CATEGORY_INIT (gst_omx_mpeg2_dec_debug_category, "omxmpeg2dec", 0, \
+ GST_DEBUG_CATEGORY_INIT (gst_omx_mpeg2_video_dec_debug_category, "omxmpeg2dec", 0, \
"debug category for gst-omx video decoder base class");
-G_DEFINE_TYPE_WITH_CODE (GstOMXMPEG2Dec, gst_omx_mpeg2_dec,
+G_DEFINE_TYPE_WITH_CODE (GstOMXMPEG2VideoDec, gst_omx_mpeg2_video_dec,
GST_TYPE_OMX_VIDEO_DEC, DEBUG_INIT);
static void
-gst_omx_mpeg2_dec_class_init (GstOMXMPEG2DecClass * klass)
+gst_omx_mpeg2_video_dec_class_init (GstOMXMPEG2VideoDecClass * klass)
{
GstOMXVideoDecClass *videodec_class = GST_OMX_VIDEO_DEC_CLASS (klass);
GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
videodec_class->is_format_change =
- GST_DEBUG_FUNCPTR (gst_omx_mpeg2_dec_is_format_change);
- videodec_class->set_format = GST_DEBUG_FUNCPTR (gst_omx_mpeg2_dec_set_format);
+ GST_DEBUG_FUNCPTR (gst_omx_mpeg2_video_dec_is_format_change);
+ videodec_class->set_format =
+ GST_DEBUG_FUNCPTR (gst_omx_mpeg2_video_dec_set_format);
videodec_class->cdata.default_sink_template_caps = "video/mpeg, "
"mpegversion=(int) [1, 2], "
@@ -73,19 +74,19 @@ gst_omx_mpeg2_dec_class_init (GstOMXMPEG2DecClass * klass)
}
static void
-gst_omx_mpeg2_dec_init (GstOMXMPEG2Dec * self)
+gst_omx_mpeg2_video_dec_init (GstOMXMPEG2VideoDec * self)
{
}
static gboolean
-gst_omx_mpeg2_dec_is_format_change (GstOMXVideoDec * dec,
+gst_omx_mpeg2_video_dec_is_format_change (GstOMXVideoDec * dec,
GstOMXPort * port, GstVideoCodecState * state)
{
return FALSE;
}
static gboolean
-gst_omx_mpeg2_dec_set_format (GstOMXVideoDec * dec, GstOMXPort * port,
+gst_omx_mpeg2_video_dec_set_format (GstOMXVideoDec * dec, GstOMXPort * port,
GstVideoCodecState * state)
{
gboolean ret;
diff --git a/omx/gstomxmpeg2videodec.h b/omx/gstomxmpeg2videodec.h
new file mode 100644
index 0000000..ff86bcd
--- /dev/null
+++ b/omx/gstomxmpeg2videodec.h
@@ -0,0 +1,59 @@
+/*
+ * Copyright (C) 2011, Hewlett-Packard Development Company, L.P.
+ * Author: Sebastian Dröge <sebastian.droege@collabora.co.uk>, 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_MPEG2_VIDEO_DEC_H__
+#define __GST_OMX_MPEG2_VIDEO_DEC_H__
+
+#include <gst/gst.h>
+#include "gstomxvideodec.h"
+
+G_BEGIN_DECLS
+
+#define GST_TYPE_OMX_MPEG2_VIDEO_DEC \
+ (gst_omx_mpeg2_video_get_type())
+#define GST_OMX_MPEG2_VIDEO_DEC(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_OMX_MPEG2_VIDEO_DEC,GstOMXMPEG2VideoDec))
+#define GST_OMX_MPEG2_VIDEO_DEC_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_OMX_MPEG2_VIDEO_DEC,GstOMXMPEG2VideoDecClass))
+#define GST_OMX_MPEG2_VIDEO_DEC_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS((obj),GST_TYPE_OMX_MPEG2_VIDEO_DEC,GstOMXMPEG2VideoDecClass))
+#define GST_IS_OMX_MPEG2_VIDEO_DEC(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_OMX_MPEG2_VIDEO_DEC))
+#define GST_IS_OMX_MPEG2_VIDEO_DEC_CLASS(obj) \
+ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_OMX_MPEG2_VIDEO_DEC))
+
+typedef struct _GstOMXMPEG2VideoDec GstOMXMPEG2VideoDec;
+typedef struct _GstOMXMPEG2VideoDecClass GstOMXMPEG2VideoDecClass;
+
+struct _GstOMXMPEG2VideoDec
+{
+ GstOMXVideoDec parent;
+};
+
+struct _GstOMXMPEG2VideoDecClass
+{
+ GstOMXVideoDecClass parent_class;
+};
+
+GType gst_omx_mpeg2_video_dec_get_type (void);
+
+G_END_DECLS
+
+#endif /* __GST_OMX_MPEG2_VIDEO_DEC_H__ */