gstreamer/gst/audiotestsrc/gstaudiotestsrc.h
Stefan Kost 9be025e197 add new plugin and element
Original commit message from CVS:
* configure.ac:
* docs/plugins/gst-plugins-base-plugins-docs.sgml:
* docs/plugins/gst-plugins-base-plugins-sections.txt:
* gst/audioscale/gstaudioscale.c: (gst_audioscale_method_get_type):
* gst/audiotestsrc/Makefile.am:
* gst/audiotestsrc/gstaudiotestsrc.c:
(gst_audiostestsrc_wave_get_type), (gst_audiotestsrc_base_init),
(gst_audiotestsrc_class_init), (gst_audiotestsrc_init),
(gst_audiotestsrc_src_fixate), (gst_audiotestsrc_setcaps),
(gst_audiotestsrc_get_query_types), (gst_audiotestsrc_src_query),
(gst_audiotestsrc_wait), (gst_audiotestsrc_unlock),
(gst_audiotestsrc_create_sine), (gst_audiotestsrc_create_square),
(gst_audiotestsrc_create_saw), (gst_audiotestsrc_create_triangle),
(gst_audiotestsrc_create_silence),
(gst_audiotestsrc_create_white_noise),
(gst_audiotestsrc_change_wave), (gst_audiotestsrc_create),
(gst_audiotestsrc_set_property), (gst_audiotestsrc_get_property),
(gst_audiotestsrc_start), (plugin_init):
* gst/audiotestsrc/gstaudiotestsrc.h:
add new plugin and element
* gst/sine/gstsinesrc.c: (gst_sinesrc_class_init):
use gobject_class
2005-10-09 18:34:44 +00:00

93 lines
2.4 KiB
C

/* GStreamer
* Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
* 2000 Wim Taymans <wtay@chello.be>
*
* gstsinesrc.h:
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifndef __GST_AUDIOTESTSRC_H__
#define __GST_AUDIOTESTSRC_H__
#include <gst/gst.h>
#include <gst/base/gstbasesrc.h>
G_BEGIN_DECLS
#define GST_TYPE_AUDIOTESTSRC \
(gst_audiotestsrc_get_type())
#define GST_AUDIOTESTSRC(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_AUDIOTESTSRC,GstAudioTestSrc))
#define GST_AUDIOTESTSRC_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_AUDIOTESTSRC,GstAudioTestSrcClass))
#define GST_IS_AUDIOTESTSRC(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_AUDIOTESTSRC))
#define GST_IS_AUDIOTESTSRC_CLASS(obj) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_AUDIOTESTSRC))
typedef enum {
GST_AUDIOTESTSRC_WAVE_SINE,
GST_AUDIOTESTSRC_WAVE_SQUARE,
GST_AUDIOTESTSRC_WAVE_SAW,
GST_AUDIOTESTSRC_WAVE_TRIANGLE,
GST_AUDIOTESTSRC_WAVE_SILENCE,
GST_AUDIOTESTSRC_WAVE_WHITE_NOISE,
} GstAudioTestSrcWaves;
typedef struct _GstAudioTestSrc GstAudioTestSrc;
typedef struct _GstAudioTestSrcClass GstAudioTestSrcClass;
struct _GstAudioTestSrc {
GstBaseSrc parent;
void (*process)(GstAudioTestSrc*, gint16 *);
/* parameters */
GstAudioTestSrcWaves wave;
gdouble volume;
gdouble freq;
/* audio parameters */
gint samplerate;
gint samples_per_buffer;
guint64 timestamp;
guint64 offset;
gdouble accumulator;
gboolean tags_pushed;
GstClockID clock_id;
GstClockTimeDiff timestamp_offset;
};
struct _GstAudioTestSrcClass {
GstBaseSrcClass parent_class;
};
GType gst_audiotestsrc_get_type(void);
gboolean gst_audiotestsrc_factory_init (GstElementFactory *factory);
G_END_DECLS
#endif /* __GST_AUDIOTESTSRC_H__ */