• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* GStreamer
2  * Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
3  *                    2000 Wim Taymans <wtay@chello.be>
4  *
5  * gstadder.h: Header for GstAdder element
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Library General Public
9  * License as published by the Free Software Foundation; either
10  * version 2 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15  * Library General Public License for more details.
16  *
17  * You should have received a copy of the GNU Library General Public
18  * License along with this library; if not, write to the
19  * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
20  * Boston, MA 02110-1301, USA.
21  */
22 
23 #ifndef __GST_ADDER_H__
24 #define __GST_ADDER_H__
25 
26 #include <gst/gst.h>
27 #include <gst/base/gstcollectpads.h>
28 #include <gst/audio/audio.h>
29 
30 G_BEGIN_DECLS
31 
32 #define GST_TYPE_ADDER (gst_adder_get_type())
33 G_DECLARE_FINAL_TYPE (GstAdder, gst_adder, GST, ADDER, GstElement)
34 
35 /**
36  * GstAdder:
37  *
38  * The adder object structure.
39  */
40 struct _GstAdder {
41   GstElement      element;
42 
43   GstPad         *srcpad;
44   GstCollectPads *collect;
45   /* pad counter, used for creating unique request pads */
46   gint            padcount;
47 
48   /* the next are valid for both int and float */
49   GstAudioInfo    info;
50 
51   /* counters to keep track of timestamps */
52   gint64          offset;
53 
54   /* sink event handling */
55   GstSegment      segment;
56   gboolean new_segment_pending;
57   gboolean flush_stop_pending;
58 
59   /* current caps */
60   GstCaps *current_caps;
61 
62   /* target caps (set via property) */
63   GstCaps *filter_caps;
64 
65   /* Pending inline events */
66   GList *pending_events;
67 
68   gboolean send_stream_start;
69   gboolean send_caps;
70 };
71 
72 GST_ELEMENT_REGISTER_DECLARE (adder);
73 
74 #define GST_TYPE_ADDER_PAD (gst_adder_pad_get_type())
75 G_DECLARE_FINAL_TYPE (GstAdderPad, gst_adder_pad, GST, ADDER_PAD, GstPad)
76 
77 struct _GstAdderPad {
78   GstPad parent;
79 
80   gdouble volume;
81   gint volume_i32;
82   gint volume_i16;
83   gint volume_i8;
84   gboolean mute;
85 };
86 
87 G_END_DECLS
88 
89 #endif /* __GST_ADDER_H__ */
90