diff options
author | Tim-Philipp Müller <tim@centricular.net> | 2006-04-05 18:27:22 +0000 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.net> | 2006-04-05 18:27:22 +0000 |
commit | 67878834b919b4c8e0cddcba01160c523d1496b8 (patch) | |
tree | a68319a65552059912779b69ca8aaf7398d8658d /ext/speex/gstspeexdec.h | |
parent | 490f1c0132a02d0db547e7e19d913c517f8a9470 (diff) |
ext/speex/: Fix seeking and duration queries (#337033); clean up and refactor a bit.
Original commit message from CVS:
* ext/speex/gstspeex.c: (plugin_init):
* ext/speex/gstspeexdec.c: (gst_speex_dec_class_init),
(gst_speex_dec_reset), (gst_speex_dec_init), (speex_dec_convert),
(speex_get_sink_query_types), (speex_dec_sink_query),
(speex_get_src_query_types), (speex_dec_src_query),
(speex_dec_src_event), (speex_dec_sink_event),
(speex_dec_chain_parse_header), (speex_dec_chain_parse_comments),
(speex_dec_chain_parse_data), (speex_dec_chain),
(gst_speex_dec_get_property), (gst_speex_dec_set_property),
(speex_dec_change_state):
* ext/speex/gstspeexdec.h:
Fix seeking and duration queries (#337033); clean up and
refactor a bit.
Diffstat (limited to 'ext/speex/gstspeexdec.h')
-rw-r--r-- | ext/speex/gstspeexdec.h | 45 |
1 files changed, 21 insertions, 24 deletions
diff --git a/ext/speex/gstspeexdec.h b/ext/speex/gstspeexdec.h index cae005b0..18ba8d5b 100644 --- a/ext/speex/gstspeexdec.h +++ b/ext/speex/gstspeexdec.h @@ -18,8 +18,8 @@ */ -#ifndef __GST_SPEEXDEC_H__ -#define __GST_SPEEXDEC_H__ +#ifndef __GST_SPEEX_DEC_H__ +#define __GST_SPEEX_DEC_H__ #include <gst/gst.h> #include <speex/speex.h> @@ -27,20 +27,18 @@ #include <speex/speex_header.h> #include <speex/speex_stereo.h> -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ +G_BEGIN_DECLS -#define GST_TYPE_SPEEXDEC \ +#define GST_TYPE_SPEEX_DEC \ (gst_speex_dec_get_type()) -#define GST_SPEEXDEC(obj) \ - (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_SPEEXDEC,GstSpeexDec)) -#define GST_SPEEXDEC_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_SPEEXDEC,GstSpeexDec)) -#define GST_IS_SPEEXDEC(obj) \ - (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_SPEEXDEC)) -#define GST_IS_SPEEXDEC_CLASS(obj) \ - (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_SPEEXDEC)) +#define GST_SPEEX_DEC(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_SPEEX_DEC,GstSpeexDec)) +#define GST_SPEEX_DEC_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_SPEEX_DEC,GstSpeexDecClass)) +#define GST_IS_SPEEX_DEC(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_SPEEX_DEC)) +#define GST_IS_SPEEX_DEC_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_SPEEX_DEC)) typedef struct _GstSpeexDec GstSpeexDec; typedef struct _GstSpeexDecClass GstSpeexDecClass; @@ -51,8 +49,8 @@ struct _GstSpeexDec { GstElement element; /* pads */ - GstPad *sinkpad, - *srcpad; + GstPad *sinkpad; + GstPad *srcpad; void *state; SpeexStereoState stereo; @@ -70,20 +68,19 @@ struct _GstSpeexDec { gboolean enh; gint frame_size; - guint64 samples_out; + GstClockTime frame_duration; guint64 packetno; + + GstSegment segment; /* STREAM LOCK */ + gint64 granulepos; /* -1 = needs to be set from current time */ }; struct _GstSpeexDecClass { GstElementClass parent_class; }; -GType gst_speex_dec_get_type(void); - - -#ifdef __cplusplus -} -#endif /* __cplusplus */ +GType gst_speex_dec_get_type (void); +G_END_DECLS -#endif /* __GST_SPEEXDEC_H__ */ +#endif /* __GST_SPEEX_DEC_H__ */ |