2 * Copyright (C) 1999 Erik Walthinsen <omega@cse.ogi.edu>
3 * Copyright (C) 2005 Stefan Kost <ensonic@users.sf.net> (audiotestsrc)
4 * Copyright (C) 2013 Juan Manuel Borges CaƱo <juanmabcmail@gmail.com>
6 * gstladspasource.h: Header for LADSPA source
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either
11 * version 2 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Library General Public License for more details.
18 * You should have received a copy of the GNU Library General Public
19 * License along with this library; if not, write to the
20 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
21 * Boston, MA 02110-1301, USA.
24 #ifndef __GST_LADSPA_SOURCE_H__
25 #define __GST_LADSPA_SOURCE_H__
28 #include <gst/base/gstbasesrc.h>
29 #include "gstladspautils.h"
33 #define GST_TYPE_LADSPA_SOURCE (gst_ladspa_source_get_type())
34 #define GST_LADSPA_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_LADSPA_SOURCE,GstLADSPASource))
35 #define GST_LADSPA_SOURCE_CAST(obj) ((GstLADSPASource *) (obj))
36 #define GST_LADSPA_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_LADSPA_SOURCE,GstLADSPASourceClass))
37 #define GST_LADSPA_SOURCE_CLASS_CAST(klass) ((GstLADSPASourceClass *) (klass))
38 #define GST_LADSPA_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj),GST_TYPE_LADSPA_SOURCE,GstLADSPASourceClass))
39 #define GST_IS_LADSPA_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_LADSPA_SOURCE))
40 #define GST_IS_LADSPA_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_LADSPA_SOURCE))
42 typedef struct _GstLADSPASource GstLADSPASource;
44 typedef struct _GstLADSPASourceClass GstLADSPASourceClass;
46 struct _GstLADSPASource
52 /* audio parameters */
54 gint samples_per_buffer;
57 gboolean tags_pushed; /* send tags just once ? */
58 GstClockTimeDiff timestamp_offset; /* base offset */
59 GstClockTime next_time; /* next timestamp */
60 gint64 next_sample; /* next sample to send */
61 gint64 next_byte; /* next byte to send */
63 gboolean check_seek_stop;
65 gint generate_samples_per_buffer; /* used to generate a partial buffer */
66 gboolean can_activate_pull;
67 gboolean reverse; /* play backwards */
70 struct _GstLADSPASourceClass
72 GstBaseSrcClass parent_class;
74 GstLADSPAClass ladspa;
78 gst_ladspa_source_get_type (void);
81 ladspa_describe_source_plugin (GstPlugin * plugin,
82 const gchar * filename, const LADSPA_Descriptor * desc);
85 gst_my_base_source_class_add_pad_template (GstBaseSrcClass * base_class,
90 #endif /* __GST_LADSPA_SOURCE_H__ */