Add new plugin rawparse that contains a base class for raw data parsers and the two...
authorSebastian Dröge <slomo@circular-chaos.org>
Sun, 23 Dec 2007 06:22:32 +0000 (06:22 +0000)
committerSebastian Dröge <slomo@circular-chaos.org>
Sun, 23 Dec 2007 06:22:32 +0000 (06:22 +0000)
Original commit message from CVS:
* configure.ac:
* gst/rawparse/Makefile.am:
* gst/rawparse/README:
* gst/rawparse/gstaudioparse.c: (gst_audio_parse_format_get_type),
(gst_audio_parse_endianness_get_type), (gst_audio_parse_base_init),
(gst_audio_parse_class_init), (gst_audio_parse_init),
(gst_audio_parse_set_property), (gst_audio_parse_get_property),
(gst_audio_parse_update_frame_size), (gst_audio_parse_get_caps):
* gst/rawparse/gstaudioparse.h:
* gst/rawparse/gstrawparse.c: (gst_raw_parse_base_init),
(gst_raw_parse_class_init), (gst_raw_parse_init),
(gst_raw_parse_dispose),
(gst_raw_parse_class_set_src_pad_template),
(gst_raw_parse_class_set_multiple_frames_per_buffer),
(gst_raw_parse_reset), (gst_raw_parse_chain),
(gst_raw_parse_convert), (gst_raw_parse_sink_event),
(gst_raw_parse_src_event), (gst_raw_parse_src_query_type),
(gst_raw_parse_src_query), (gst_raw_parse_set_framesize),
(gst_raw_parse_set_fps), (gst_raw_parse_get_fps),
(gst_raw_parse_is_negotiated):
* gst/rawparse/gstrawparse.h:
* gst/rawparse/gstvideoparse.c: (gst_video_parse_format_get_type),
(gst_video_parse_endianness_get_type), (gst_video_parse_base_init),
(gst_video_parse_class_init), (gst_video_parse_init),
(gst_video_parse_set_property), (gst_video_parse_get_property),
(gst_video_parse_format_to_fourcc),
(gst_video_parse_update_frame_size), (gst_video_parse_get_caps):
* gst/rawparse/gstvideoparse.h:
* gst/rawparse/plugin.c: (plugin_init):
Add new plugin rawparse that contains a base class for raw data
parsers and the two elements audioparse and videoparse that can
be used to parse raw audio and video. These are inspired by the
old videoparse element which the new rawparse plugin deprecates.

gst/rawparse/Makefile.am [new file with mode: 0644]
gst/rawparse/plugin.c [new file with mode: 0644]

diff --git a/gst/rawparse/Makefile.am b/gst/rawparse/Makefile.am
new file mode 100644 (file)
index 0000000..ba235ea
--- /dev/null
@@ -0,0 +1,8 @@
+
+plugin_LTLIBRARIES = libgstrawparse.la
+
+libgstrawparse_la_SOURCES = gstrawparse.c gstaudioparse.c gstvideoparse.c plugin.c
+libgstrawparse_la_CFLAGS = $(GST_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS)
+libgstrawparse_la_LIBADD = $(GST_LIBS) $(GST_BASE_LIBS)
+libgstrawparse_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
+
diff --git a/gst/rawparse/plugin.c b/gst/rawparse/plugin.c
new file mode 100644 (file)
index 0000000..250be6d
--- /dev/null
@@ -0,0 +1,26 @@
+#ifdef HAVE_CONFIG_H
+#  include "config.h"
+#endif
+
+#include <gst/gst.h>
+#include "gstaudioparse.h"
+#include "gstvideoparse.h"
+
+static gboolean
+plugin_init (GstPlugin * plugin)
+{
+  gboolean ret;
+
+  ret = gst_element_register (plugin, "videoparse", GST_RANK_NONE,
+      gst_video_parse_get_type ());
+  ret &= gst_element_register (plugin, "audioparse", GST_RANK_NONE,
+      gst_audio_parse_get_type ());
+
+  return ret;
+}
+
+GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
+    GST_VERSION_MINOR,
+    "rawparse",
+    "Parses byte streams into raw frames",
+    plugin_init, VERSION, "LGPL", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN);