Trouble with writing Gstreamer Plugin: missing ')'

Viewed 11

I am writing a GStreamer plugin to perform some filtering function. I have hit a block with this MACRO function

GST_ELEMENT_REGISTER_DEFINE(audiovoice,"audiovoice",GST_RANK_NONE, GST_TYPE_AUDIO_VOICE);

It gives an error as error: expected ‘)’ before string constant

I am wondering what is wrong. I have thought of a possible avenues that lead to this error

  • that I might have named the arguement for the macro wrongly (Glib accepts strict formatting and wording), so i changed from audiovoice to audio_voice

    GST_ELEMENT_REGISTER_DEFINE(audio_voice,"audio_voice",GST_RANK_NONE, GST_TYPE_AUDIO_VOICE);

    and also in the h file

    GST_ELEMENT_REGISTER_DECLARE (audio_voice);

    However, the error still persist

The h file is referenced here:

#ifndef __GST_AUDIO_VOICE_H__
#define __GST_AUDIO_VOICE_H__

#include <gst/gst.h>
#include <gst/base/gstbasetransform.h>
#include <gst/audio/audio.h>
#include <gst/audio/gstaudiofilter.h>

G_BEGIN_DECLS  //// extern c
#define GST_TYPE_AUDIO_VOICE              (gst_audio_voice_get_type())
#define GST_AUDIO_VOICE(obj)              (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_AUDIO_VOICE,GstAudioVoice))
#define GST_IS_AUDIO_VOICE(obj)           (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_AUDIO_VOICE))
#define GST_AUDIO_VOICE_CLASS(klass)      (G_TYPE_CHECK_CLASS_CAST((klass) ,GST_TYPE_AUDIO_VOICE,GstAudioVoiceClass))
#define GST_IS_AUDIO_VOICE_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE((klass) ,GST_TYPE_AUDIO_VOICE))
#define GST_AUDIO_VOICE_GET_CLASS(obj)    (G_TYPE_INSTANCE_GET_CLASS((obj) ,GST_TYPE_AUDIO_VOICE,GstAudioVoiceClass))
typedef struct _GstAudioVoice GstAudioVoice;
typedef struct _GstAudioVoiceClass GstAudioVoiceClass;

typedef void (*GstAudioVoiceProcessFunc) (GstAudioVoice *, guint8 *, guint);

struct _GstAudioVoice
{
  GstAudioFilter audiofilter;

  /* properties */
  gfloat level;
  gfloat mono_level;
  gfloat filter_band;
  gfloat filter_width;

  /* filter coef */
  gfloat A, B;
  gfloat y1, y2;
  gfloat x1, x2, x3;

  /* < private > */
  GstAudioVoiceProcessFunc process;
};

struct _GstAudioVoiceClass
{
  GstAudioFilterClass parent;
};

GType gst_audio_voice_get_type (void);

//// Macro declaring new element
GST_ELEMENT_REGISTER_DECLARE (audiovoice);

G_END_DECLS
#endif /* __GST_AUDIO_VOICE_H__ */

Thanks

0 Answers
Related