#include "gstdvdsubparse.h"
#include <string.h>
+GST_DEBUG_CATEGORY_STATIC (gst_dvd_sub_dec_debug);
+#define GST_CAT_DEFAULT (gst_dvd_sub_dec_debug)
+
#define gst_dvd_sub_dec_parent_class parent_class
G_DEFINE_TYPE (GstDvdSubDec, gst_dvd_sub_dec, GST_TYPE_ELEMENT);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (dvdsubdec, "dvdsubdec", GST_RANK_NONE,
+ GST_TYPE_DVD_SUB_DEC, GST_DEBUG_CATEGORY_INIT (gst_dvd_sub_dec_debug,
+ "dvdsubdec", 0, "DVD subtitle decoder"));
static gboolean gst_dvd_sub_dec_src_event (GstPad * srcpad, GstObject * parent,
GstEvent * event);
GST_STATIC_CAPS ("subpicture/x-dvd")
);
-GST_DEBUG_CATEGORY_STATIC (gst_dvd_sub_dec_debug);
-#define GST_CAT_DEFAULT (gst_dvd_sub_dec_debug)
enum
{
static gboolean
plugin_init (GstPlugin * plugin)
{
- if (!gst_element_register (plugin, "dvdsubdec", GST_RANK_NONE,
- GST_TYPE_DVD_SUB_DEC) ||
- !gst_element_register (plugin, "dvdsubparse", GST_RANK_NONE,
- GST_TYPE_DVD_SUB_PARSE)) {
- return FALSE;
- }
+ gboolean ret = FALSE;
- GST_DEBUG_CATEGORY_INIT (gst_dvd_sub_dec_debug, "dvdsubdec", 0,
- "DVD subtitle decoder");
+ ret |= GST_ELEMENT_REGISTER (dvdsubdec, plugin);
+ ret |= GST_ELEMENT_REGISTER (dvdsubparse, plugin);
- return TRUE;
+ return ret;
}
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
+#ifndef __GST_DVDSUBDEC_H__
+#define __GST_DVDSUBDEC_H__
#include <gst/gst.h>
#include <gst/video/video.h>
+G_BEGIN_DECLS
+
#define GST_TYPE_DVD_SUB_DEC (gst_dvd_sub_dec_get_type())
#define GST_DVD_SUB_DEC(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_DVD_SUB_DEC,GstDvdSubDec))
#define GST_DVD_SUB_DEC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_DVD_SUB_DEC,GstDvdSubDecClass))
};
GType gst_dvd_sub_dec_get_type (void);
+GST_ELEMENT_REGISTER_DECLARE (dvdsubdec);
+
+G_END_DECLS
+
+#endif /* __GST_DVDSUBDEC_H__ */
#define gst_dvd_sub_parse_parent_class parent_class
G_DEFINE_TYPE (GstDvdSubParse, gst_dvd_sub_parse, GST_TYPE_ELEMENT);
+GST_ELEMENT_REGISTER_DEFINE (dvdsubparse, "dvdsubparse", GST_RANK_NONE,
+ GST_TYPE_DVD_SUB_PARSE);
static void
gst_dvd_sub_parse_class_init (GstDvdSubParseClass * klass)