summaryrefslogtreecommitdiffstats
path: root/gst/wavenc/gstwavenc.h
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.net>2006-04-19 15:16:33 +0000
committerTim-Philipp Müller <tim@centricular.net>2006-04-19 15:16:33 +0000
commit7f74c39a109630db0e792396dc90a412959fa3de (patch)
tree61a4d01aba4d753b97cc9a84539e555dec630914 /gst/wavenc/gstwavenc.h
parent9b14d8f398a847233314b45e5a07c112e49fea59 (diff)
gst/wavenc/gstwavenc.*: Set caps on first outgoing buffer, so that it doesn't error out immediately with a non-negoti...
Original commit message from CVS: * gst/wavenc/gstwavenc.c: (gst_wavenc_base_init), (gst_wavenc_class_init), (gst_wavenc_init), (gst_wavenc_create_header_buf), (gst_wavenc_push_header), (gst_wavenc_sink_setcaps), (get_id_from_name), (gst_wavenc_event), (gst_wavenc_chain), (gst_wavenc_change_state): * gst/wavenc/gstwavenc.h: Set caps on first outgoing buffer, so that it doesn't error out immediately with a non-negotiated error (#338716). Rewrite and clean up a bit; fix setcaps function to parse things properly; fix sink caps (8bit audio is unsigned and doesn't have depth); use boilerplate macros; remove unused properties stuff.
Diffstat (limited to 'gst/wavenc/gstwavenc.h')
-rw-r--r--gst/wavenc/gstwavenc.h29
1 files changed, 12 insertions, 17 deletions
diff --git a/gst/wavenc/gstwavenc.h b/gst/wavenc/gstwavenc.h
index 8a19319f..8a34ab57 100644
--- a/gst/wavenc/gstwavenc.h
+++ b/gst/wavenc/gstwavenc.h
@@ -18,8 +18,8 @@
*/
-#ifndef __GST_WAVENC_H__
-#define __GST_WAVENC_H__
+#ifndef __GST_WAV_ENC_H__
+#define __GST_WAV_ENC_H__
#include <gst/gst.h>
@@ -34,31 +34,26 @@ G_BEGIN_DECLS
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_WAVENC,GstWavEncClass))
#define GST_IS_WAVENC(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_WAVENC))
-#define GST_IS_WAVENC_CLASS(obj) \
+#define GST_IS_WAVENC_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_WAVENC))
typedef struct _GstWavEnc GstWavEnc;
typedef struct _GstWavEncClass GstWavEncClass;
-#define WAV_HEADER_LEN 44
-
struct _GstWavEnc {
GstElement element;
- /* pads */
- GstPad *sinkpad,*srcpad;
+ GstPad *sinkpad;
+ GstPad *srcpad;
/* useful audio data */
- guint bits;
- guint rate;
- guint channels;
- guint width;
- guint32 length;
-
- gboolean setup, flush_header, pad_eos;
- guchar header[WAV_HEADER_LEN];
+ guint depth;
+ guint width;
+ guint rate;
+ guint channels;
+ guint32 length;
- guint16 newmediacount;
+ gboolean sent_header;
};
struct _GstWavEncClass {
@@ -67,4 +62,4 @@ struct _GstWavEncClass {
G_END_DECLS
-#endif /* __GST_ENC_H__ */
+#endif /* __GST_WAV_ENC_H__ */