From 9107cd5b6fc4ebac2587ca16ba7a695fcd641194 Mon Sep 17 00:00:00 2001 From: James Doc Livingston Date: Wed, 3 May 2006 11:27:42 +0000 Subject: Port MusicBrainz TRM plugin (#336898). Original commit message from CVS: Patch by: James "Doc" Livingston * configure.ac: * ext/musicbrainz/Makefile.am: * ext/musicbrainz/gsttrm.c: (gst_trm_base_init), (gst_trm_class_init), (gst_trm_init), (gst_trm_setcaps), (gst_trm_chain), (gst_trm_emit_signature), (gst_trm_set_property), (gst_trm_get_property), (gst_trm_change_state), (plugin_init): * ext/musicbrainz/gsttrm.h: Port MusicBrainz TRM plugin (#336898). --- ext/musicbrainz/gsttrm.h | 71 ++++++++++++++++++------------------------------ 1 file changed, 27 insertions(+), 44 deletions(-) (limited to 'ext/musicbrainz/gsttrm.h') diff --git a/ext/musicbrainz/gsttrm.h b/ext/musicbrainz/gsttrm.h index ec9b9db5..9194180c 100644 --- a/ext/musicbrainz/gsttrm.h +++ b/ext/musicbrainz/gsttrm.h @@ -18,68 +18,51 @@ */ -#ifndef __GST_MUSICBRAINZ_H__ -#define __GST_MUSICBRAINZ_H__ +#ifndef __GST_TRM_H__ +#define __GST_TRM_H__ #include +#include +#include #include -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ +G_BEGIN_DECLS +#define GST_TYPE_TRM (gst_trm_get_type()) +#define GST_TRM(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_TRM,GstTRM)) +#define GST_TRM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_TRM,GstTRMClass)) +#define GST_IS_TRM(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_TRM)) +#define GST_IS_TRM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_TRM)) -#define GST_TYPE_MUSICBRAINZ \ - (gst_musicbrainz_get_type()) -#define GST_MUSICBRAINZ(obj) \ - (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_MUSICBRAINZ,GstMusicBrainz)) -#define GST_MUSICBRAINZ_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_MUSICBRAINZ,GstMusicBrainz)) -#define GST_IS_MUSICBRAINZ(obj) \ - (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_MUSICBRAINZ)) -#define GST_IS_MUSICBRAINZ_CLASS(obj) \ - (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_MUSICBRAINZ)) +typedef struct _GstTRM GstTRM; +typedef struct _GstTRMClass GstTRMClass; - -typedef struct _GstMusicBrainz GstMusicBrainz; -typedef struct _GstMusicBrainzClass GstMusicBrainzClass; - -struct _GstMusicBrainz { +struct _GstTRM { GstElement element; - GstPad *sinkpad; - GstPad *srcpad; - const GstCaps *caps; + GstPad *sinkpad; + GstPad *srcpad; + + trm_t trm; - trm_t trm; - gchar signature[17]; - gchar ascii_signature[37]; + gchar *proxy_address; + guint proxy_port; - gchar *proxy_address; - guint proxy_port; + gint depth; + gint rate; + gint channels; - guint depth; - guint rate; - guint channels; - gboolean linked; - gboolean data_available; - gboolean signature_available; - guint64 total_time; + gboolean data_available; + gboolean signature_available; }; -struct _GstMusicBrainzClass { +struct _GstTRMClass { GstElementClass parent_class; - - /* signals */ - void (*signature_available) (GstElement *element); }; GType gst_musicbrainz_get_type(void); -#ifdef __cplusplus -} -#endif /* __cplusplus */ - +G_END_DECLS -#endif /* __GST_MUSICBRAINZE_H__ */ +#endif /* __GST_TRM_H__ */ -- cgit v1.2.1