diff --git a/ext/lame/gstlame.h b/ext/lame/gstlame.h
index 73e690edd032155769e741649c931626695f92e7..6755e718aab12325c37606866d0ca896fd3081fd 100644 (file)
--- a/ext/lame/gstlame.h
+++ b/ext/lame/gstlame.h
#include <gst/gst.h>
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
+G_BEGIN_DECLS
#include <lame/lame.h>
+#include <gst/audio/gstaudioencoder.h>
#define GST_TYPE_LAME \
(gst_lame_get_type())
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_LAME,GstLameClass))
#define GST_IS_LAME(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_LAME))
-#define GST_IS_LAME_CLASS(obj) \
+#define GST_IS_LAME_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_LAME))
-typedef enum {
- GST_LAME_OPEN = GST_ELEMENT_FLAG_LAST,
-
- GST_LAME_FLAG_LAST = GST_ELEMENT_FLAG_LAST+2,
-} GstLameFlags;
-
typedef struct _GstLame GstLame;
typedef struct _GstLameClass GstLameClass;
+/**
+ * GstLame:
+ *
+ * Opaque data structure.
+ */
struct _GstLame {
- GstElement element;
- /* pads */
- GstPad *srcpad, *sinkpad;
+ GstAudioEncoder element;
+
+ /*< private >*/
gint samplerate;
gint num_channels;
- gboolean initialized;
+ gboolean setup;
gint bitrate;
gfloat compression_ratio;
gint quality;
- gint mode;
+ gint mode; /* actual mode in use now */
+ gint requested_mode; /* requested mode by user/app */
gboolean force_ms;
gboolean free_format;
gboolean copyright;
gboolean original;
gboolean error_protection;
- gint padding_type;
gboolean extension;
gboolean strict_iso;
gboolean disable_reservoir;
gboolean no_ath;
gint ath_type;
gint ath_lower;
- gint cwlimit;
gboolean allow_diff_short;
gboolean no_short_blocks;
gboolean emphasis;
- gboolean xingheader;
+ gint preset;
lame_global_flags *lgf;
-
- GstTagList *tags;
-
- /* time tracker */
- guint64 last_ts, last_offs, last_duration;
};
struct _GstLameClass {
- GstElementClass parent_class;
+ GstAudioEncoderClass parent_class;
};
GType gst_lame_get_type(void);
+gboolean gst_lame_register (GstPlugin * plugin);
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
+G_END_DECLS
#endif /* __GST_LAME_H__ */