2002-12-16 19:49:42 +00:00
|
|
|
/* GStreamer
|
|
|
|
* Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
|
|
|
|
*
|
|
|
|
* 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
|
2012-11-04 00:07:18 +00:00
|
|
|
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
|
|
|
* Boston, MA 02110-1301, USA.
|
2002-12-16 19:49:42 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
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.
2006-04-05 18:27:22 +00:00
|
|
|
#ifndef __GST_SPEEX_DEC_H__
|
|
|
|
#define __GST_SPEEX_DEC_H__
|
2002-12-16 19:49:42 +00:00
|
|
|
|
|
|
|
#include <gst/gst.h>
|
2011-09-29 15:21:22 +00:00
|
|
|
#include <gst/audio/gstaudiodecoder.h>
|
|
|
|
|
2004-10-04 14:54:49 +00:00
|
|
|
#include <speex/speex.h>
|
|
|
|
#include <speex/speex_callbacks.h>
|
|
|
|
#include <speex/speex_header.h>
|
|
|
|
#include <speex/speex_stereo.h>
|
2002-12-16 19:49:42 +00:00
|
|
|
|
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.
2006-04-05 18:27:22 +00:00
|
|
|
G_BEGIN_DECLS
|
2002-12-16 19:49:42 +00:00
|
|
|
|
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.
2006-04-05 18:27:22 +00:00
|
|
|
#define GST_TYPE_SPEEX_DEC \
|
ext/speex/: Rewrote speex encoder, make sure it can be embedded in ogg.
Original commit message from CVS:
* ext/speex/gstspeex.c: (plugin_init):
* ext/speex/gstspeexdec.c: (gst_speex_dec_base_init),
(gst_speex_dec_class_init), (speex_dec_get_formats),
(speex_get_event_masks), (speex_get_query_types),
(gst_speex_dec_init), (speex_dec_convert), (speex_dec_src_query),
(speex_dec_src_event), (speex_dec_event), (speex_dec_chain),
(gst_speexdec_get_property), (gst_speexdec_set_property),
(speex_dec_change_state):
* ext/speex/gstspeexdec.h:
* ext/speex/gstspeexenc.c: (gst_speexenc_get_formats),
(gst_speexenc_get_type), (speex_caps_factory), (raw_caps_factory),
(gst_speexenc_base_init), (gst_speexenc_class_init),
(gst_speexenc_sinkconnect), (gst_speexenc_convert_src),
(gst_speexenc_convert_sink), (gst_speexenc_get_query_types),
(gst_speexenc_src_query), (gst_speexenc_init),
(gst_speexenc_get_tag_value), (comment_init), (comment_add),
(gst_speexenc_metadata_set1), (gst_speexenc_set_metadata),
(gst_speexenc_setup), (gst_speexenc_buffer_from_data),
(gst_speexenc_push_buffer), (gst_speexenc_set_header_on_caps),
(gst_speexenc_chain), (gst_speexenc_get_property),
(gst_speexenc_set_property), (gst_speexenc_change_state):
* ext/speex/gstspeexenc.h:
Rewrote speex encoder, make sure it can be embedded in ogg.
Implemented speex decoder.
2004-09-28 16:44:12 +00:00
|
|
|
(gst_speex_dec_get_type())
|
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.
2006-04-05 18:27:22 +00:00
|
|
|
#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))
|
2002-12-16 19:49:42 +00:00
|
|
|
|
2004-03-15 16:32:54 +00:00
|
|
|
typedef struct _GstSpeexDec GstSpeexDec;
|
|
|
|
typedef struct _GstSpeexDecClass GstSpeexDecClass;
|
2002-12-16 19:49:42 +00:00
|
|
|
|
2004-03-15 16:32:54 +00:00
|
|
|
struct _GstSpeexDec {
|
2011-09-29 15:21:22 +00:00
|
|
|
GstAudioDecoder element;
|
2004-12-23 14:45:25 +00:00
|
|
|
|
2005-12-06 19:44:58 +00:00
|
|
|
void *state;
|
2010-03-15 13:16:58 +00:00
|
|
|
SpeexStereoState *stereo;
|
2004-12-23 14:45:25 +00:00
|
|
|
#ifdef SPEEX_1_0
|
2005-12-06 19:44:58 +00:00
|
|
|
SpeexMode *mode;
|
2004-12-23 14:45:25 +00:00
|
|
|
#else
|
2005-12-06 19:44:58 +00:00
|
|
|
const SpeexMode *mode;
|
2004-12-23 14:45:25 +00:00
|
|
|
#endif
|
2005-12-06 19:44:58 +00:00
|
|
|
SpeexHeader *header;
|
|
|
|
SpeexCallback callback;
|
|
|
|
SpeexBits bits;
|
2004-12-23 14:45:25 +00:00
|
|
|
|
2005-12-06 19:44:58 +00:00
|
|
|
gboolean enh;
|
2004-12-23 14:45:25 +00:00
|
|
|
|
2005-12-06 19:44:58 +00:00
|
|
|
gint frame_size;
|
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.
2006-04-05 18:27:22 +00:00
|
|
|
GstClockTime frame_duration;
|
2005-12-06 19:44:58 +00:00
|
|
|
guint64 packetno;
|
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.
2006-04-05 18:27:22 +00:00
|
|
|
|
2011-03-23 15:34:16 +00:00
|
|
|
GstBuffer *streamheader;
|
|
|
|
GstBuffer *vorbiscomment;
|
2004-03-15 16:32:54 +00:00
|
|
|
};
|
2002-12-16 19:49:42 +00:00
|
|
|
|
2004-03-15 16:32:54 +00:00
|
|
|
struct _GstSpeexDecClass {
|
2011-09-29 15:21:22 +00:00
|
|
|
GstAudioDecoderClass parent_class;
|
2004-03-15 16:32:54 +00:00
|
|
|
};
|
2002-12-16 19:49:42 +00:00
|
|
|
|
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.
2006-04-05 18:27:22 +00:00
|
|
|
GType gst_speex_dec_get_type (void);
|
2002-12-16 19:49:42 +00:00
|
|
|
|
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.
2006-04-05 18:27:22 +00:00
|
|
|
G_END_DECLS
|
2002-12-16 19:49:42 +00:00
|
|
|
|
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.
2006-04-05 18:27:22 +00:00
|
|
|
#endif /* __GST_SPEEX_DEC_H__ */
|