mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-13 15:12:58 +00:00
cdio: allow per feature registration
Split plugin into features including dynamic types which can be indiviually registered during a static build. More details here: https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199 https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-ugly/-/merge_requests/79>
This commit is contained in:
parent
4873c01b4a
commit
3a42409898
4 changed files with 16 additions and 16 deletions
|
@ -25,6 +25,9 @@
|
|||
#include <gst/gst.h>
|
||||
#include <gst/tag/tag.h>
|
||||
|
||||
GST_DEBUG_CATEGORY_EXTERN (gst_cdio_debug);
|
||||
#define GST_CAT_DEFAULT gst_cdio_debug
|
||||
|
||||
static gboolean plugin_init (GstPlugin * plugin);
|
||||
|
||||
/* cdio headers redefine VERSION etc., so do this here before including them */
|
||||
|
@ -37,10 +40,6 @@ GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
|||
#include "gstcdio.h"
|
||||
#include "gstcdiocddasrc.h"
|
||||
|
||||
#include <cdio/logging.h>
|
||||
|
||||
GST_DEBUG_CATEGORY (gst_cdio_debug);
|
||||
|
||||
void
|
||||
gst_cdio_add_cdtext_field (GstObject * src, cdtext_t * cdtext, track_t track,
|
||||
cdtext_field_t field, const gchar * gst_tag, GstTagList ** p_tags)
|
||||
|
@ -134,7 +133,7 @@ gst_cdio_add_cdtext_album_tags (GstObject * src, CdIo * cdio, GstTagList * tags)
|
|||
GST_DEBUG ("CD-TEXT album tags: %" GST_PTR_FORMAT, tags);
|
||||
}
|
||||
|
||||
static void
|
||||
void
|
||||
gst_cdio_log_handler (cdio_log_level_t level, const char *msg)
|
||||
{
|
||||
const gchar *level_str[] = { "DEBUG", "INFO", "WARN", "ERROR", "ASSERT" };
|
||||
|
@ -147,13 +146,5 @@ gst_cdio_log_handler (cdio_log_level_t level, const char *msg)
|
|||
static gboolean
|
||||
plugin_init (GstPlugin * plugin)
|
||||
{
|
||||
if (!gst_element_register (plugin, "cdiocddasrc", GST_RANK_SECONDARY - 1,
|
||||
GST_TYPE_CDIO_CDDA_SRC))
|
||||
return FALSE;
|
||||
|
||||
cdio_log_set_handler (gst_cdio_log_handler);
|
||||
|
||||
GST_DEBUG_CATEGORY_INIT (gst_cdio_debug, "cdio", 0, "libcdio elements");
|
||||
|
||||
return TRUE;
|
||||
return GST_ELEMENT_REGISTER (cdiocddasrc, plugin);
|
||||
}
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include <gst/gst.h>
|
||||
#include <cdio/cdio.h>
|
||||
#include <cdio/cdtext.h>
|
||||
#include <cdio/logging.h>
|
||||
|
||||
#if LIBCDIO_VERSION_NUM <= 83 && LIBCDIO_VERSION_NUM >= 76
|
||||
#define CDTEXT_FIELD_PERFORMER CDTEXT_PERFORMER
|
||||
|
@ -31,8 +32,6 @@
|
|||
#define CDTEXT_FIELD_TITLE CDTEXT_TITLE
|
||||
#endif
|
||||
|
||||
GST_DEBUG_CATEGORY_EXTERN (gst_cdio_debug);
|
||||
#define GST_CAT_DEFAULT gst_cdio_debug
|
||||
|
||||
void gst_cdio_add_cdtext_field (GstObject * src,
|
||||
cdtext_t * cdtext,
|
||||
|
@ -56,6 +55,7 @@ void gst_cdio_add_cdtext_album_tags (GstObject * src,
|
|||
CdIo * cdio,
|
||||
#endif
|
||||
GstTagList * tags);
|
||||
void gst_cdio_log_handler (cdio_log_level_t level, const char *msg);
|
||||
|
||||
#endif /* __GST_CDIO_H__ */
|
||||
|
||||
|
|
|
@ -85,7 +85,15 @@ enum
|
|||
PROP_READ_SPEED
|
||||
};
|
||||
|
||||
GST_DEBUG_CATEGORY (gst_cdio_debug);
|
||||
|
||||
|
||||
G_DEFINE_TYPE (GstCdioCddaSrc, gst_cdio_cdda_src, GST_TYPE_AUDIO_CD_SRC);
|
||||
#define _do_init \
|
||||
GST_DEBUG_CATEGORY_INIT (gst_cdio_debug, "cdio", 0, "libcdio elements"); \
|
||||
cdio_log_set_handler (gst_cdio_log_handler);
|
||||
GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (cdiocddasrc, "cdiocddasrc",
|
||||
GST_RANK_SECONDARY - 1, GST_TYPE_CDIO_CDDA_SRC, _do_init);
|
||||
|
||||
static void gst_cdio_cdda_src_finalize (GObject * obj);
|
||||
static void gst_cdio_cdda_src_set_property (GObject * object, guint prop_id,
|
||||
|
|
|
@ -49,6 +49,7 @@ struct _GstCdioCddaSrcClass
|
|||
};
|
||||
|
||||
GType gst_cdio_cdda_src_get_type (void);
|
||||
GST_ELEMENT_REGISTER_DECLARE (cdiocddasrc);
|
||||
|
||||
#endif /* __GST_CDIO_CDDA_SRC_H__ */
|
||||
|
||||
|
|
Loading…
Reference in a new issue