2002-03-20 21:45:03 +00:00
|
|
|
/* GStreamer
|
2001-12-22 23:27:31 +00:00
|
|
|
* Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
|
gst/wavparse/gstwavparse.*: Add push (streaming) mode to wavparse (fixes #337625)
Original commit message from CVS:
* gst/wavparse/gstwavparse.c: (gst_wavparse_base_init),
(gst_wavparse_class_init), (gst_wavparse_dispose),
(gst_wavparse_reset), (gst_wavparse_init),
(gst_wavparse_create_sourcepad), (gst_wavparse_parse_adtl),
(gst_wavparse_parse_cues), (gst_wavparse_parse_file_header),
(gst_wavparse_stream_init), (gst_wavparse_perform_seek),
(gst_wavparse_peek_chunk_info), (gst_wavparse_peek_chunk),
(gst_wavparse_stream_headers), (gst_wavparse_parse_stream_init),
(gst_wavparse_send_event), (gst_wavparse_add_src_pad),
(gst_wavparse_stream_data), (gst_wavparse_loop),
(gst_wavparse_chain), (gst_wavparse_srcpad_event),
(gst_wavparse_sink_activate), (gst_wavparse_sink_activate_pull),
(gst_wavparse_change_state), (plugin_init):
* gst/wavparse/gstwavparse.h:
Add push (streaming) mode to wavparse (fixes #337625)
2006-04-28 23:09:17 +00:00
|
|
|
* Copyright (C) <2006> Nokia Corporation, Stefan Kost <stefan.kost@nokia.com>.
|
2001-12-22 23:27:31 +00:00
|
|
|
*
|
|
|
|
* 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
|
|
|
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
|
|
* Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
2002-01-30 10:20:58 +00:00
|
|
|
#ifndef __GST_WAVPARSE_H__
|
|
|
|
#define __GST_WAVPARSE_H__
|
2001-12-22 23:27:31 +00:00
|
|
|
|
|
|
|
|
|
|
|
#include <gst/gst.h>
|
2004-05-08 00:33:39 +00:00
|
|
|
#include "gst/riff/riff-ids.h"
|
|
|
|
#include "gst/riff/riff-read.h"
|
gst/wavparse/gstwavparse.*: Add push (streaming) mode to wavparse (fixes #337625)
Original commit message from CVS:
* gst/wavparse/gstwavparse.c: (gst_wavparse_base_init),
(gst_wavparse_class_init), (gst_wavparse_dispose),
(gst_wavparse_reset), (gst_wavparse_init),
(gst_wavparse_create_sourcepad), (gst_wavparse_parse_adtl),
(gst_wavparse_parse_cues), (gst_wavparse_parse_file_header),
(gst_wavparse_stream_init), (gst_wavparse_perform_seek),
(gst_wavparse_peek_chunk_info), (gst_wavparse_peek_chunk),
(gst_wavparse_stream_headers), (gst_wavparse_parse_stream_init),
(gst_wavparse_send_event), (gst_wavparse_add_src_pad),
(gst_wavparse_stream_data), (gst_wavparse_loop),
(gst_wavparse_chain), (gst_wavparse_srcpad_event),
(gst_wavparse_sink_activate), (gst_wavparse_sink_activate_pull),
(gst_wavparse_change_state), (plugin_init):
* gst/wavparse/gstwavparse.h:
Add push (streaming) mode to wavparse (fixes #337625)
2006-04-28 23:09:17 +00:00
|
|
|
#include <gst/base/gstadapter.h>
|
2001-12-22 23:27:31 +00:00
|
|
|
|
gst/wavparse/gstwavparse.*: Fix wavparse some more.
Original commit message from CVS:
* gst/wavparse/gstwavparse.c: (gst_wavparse_reset),
(gst_wavparse_init), (gst_wavparse_parse_file_header),
(gst_wavparse_stream_init), (gst_wavparse_handle_seek),
(gst_wavparse_stream_headers), (gst_wavparse_stream_data),
(gst_wavparse_loop), (gst_wavparse_pad_convert),
(gst_wavparse_pad_query), (gst_wavparse_srcpad_event),
(gst_wavparse_change_state):
* gst/wavparse/gstwavparse.h:
Fix wavparse some more.
2005-09-19 16:26:30 +00:00
|
|
|
G_BEGIN_DECLS
|
2001-12-22 23:27:31 +00:00
|
|
|
|
2002-01-30 10:20:58 +00:00
|
|
|
#define GST_TYPE_WAVPARSE \
|
|
|
|
(gst_wavparse_get_type())
|
|
|
|
#define GST_WAVPARSE(obj) \
|
|
|
|
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_WAVPARSE,GstWavParse))
|
|
|
|
#define GST_WAVPARSE_CLASS(klass) \
|
2006-03-23 15:36:27 +00:00
|
|
|
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_WAVPARSE,GstWavParseClass))
|
2002-01-30 10:20:58 +00:00
|
|
|
#define GST_IS_WAVPARSE(obj) \
|
|
|
|
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_WAVPARSE))
|
2006-03-23 15:36:27 +00:00
|
|
|
#define GST_IS_WAVPARSE_CLASS(klass) \
|
2002-01-30 10:20:58 +00:00
|
|
|
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_WAVPARSE))
|
2001-12-22 23:27:31 +00:00
|
|
|
|
2004-05-08 00:33:39 +00:00
|
|
|
typedef enum {
|
|
|
|
GST_WAVPARSE_START,
|
2005-07-20 11:26:05 +00:00
|
|
|
GST_WAVPARSE_HEADER,
|
2006-06-14 08:06:43 +00:00
|
|
|
GST_WAVPARSE_DATA
|
2004-05-08 00:33:39 +00:00
|
|
|
} GstWavParseState;
|
2001-12-22 23:27:31 +00:00
|
|
|
|
2004-03-15 16:32:54 +00:00
|
|
|
typedef struct _GstWavParse GstWavParse;
|
|
|
|
typedef struct _GstWavParseClass GstWavParseClass;
|
|
|
|
|
docs/plugins/: Added wavparse docs.
Original commit message from CVS:
* docs/plugins/Makefile.am:
* docs/plugins/gst-plugins-good-plugins-docs.sgml:
* docs/plugins/gst-plugins-good-plugins-sections.txt:
Added wavparse docs.
* gst/wavparse/gstwavparse.c: (gst_wavparse_class_init),
(gst_wavparse_reset), (gst_wavparse_init),
(gst_wavparse_create_sourcepad), (gst_wavparse_parse_file_header),
(gst_wavparse_stream_init), (gst_wavparse_perform_seek),
(gst_wavparse_stream_headers), (gst_wavparse_send_event),
(gst_wavparse_stream_data), (gst_wavparse_loop),
(gst_wavparse_srcpad_event), (gst_wavparse_sink_activate_pull),
(gst_wavparse_change_state):
* gst/wavparse/gstwavparse.h:
Implement seek in READY (fixes #327658)
Added docs and did some cleanups.
2006-03-03 18:36:53 +00:00
|
|
|
/**
|
|
|
|
* GstWavParse:
|
|
|
|
*
|
|
|
|
* Opaque data structure.
|
|
|
|
*/
|
2004-03-15 16:32:54 +00:00
|
|
|
struct _GstWavParse {
|
2005-07-20 11:26:05 +00:00
|
|
|
GstElement parent;
|
2004-03-15 16:32:54 +00:00
|
|
|
|
|
|
|
/* pads */
|
|
|
|
GstPad *sinkpad,*srcpad;
|
|
|
|
|
2006-03-23 15:36:27 +00:00
|
|
|
/* for delayed source pad creation for when
|
|
|
|
* we have the first chunk of data and know
|
|
|
|
* the format for sure */
|
|
|
|
GstCaps *caps;
|
|
|
|
GstTagList *tags;
|
|
|
|
GstEvent *newsegment;
|
|
|
|
|
2004-03-15 16:32:54 +00:00
|
|
|
/* WAVE decoding state */
|
2004-05-08 00:33:39 +00:00
|
|
|
GstWavParseState state;
|
2004-03-15 16:32:54 +00:00
|
|
|
|
|
|
|
/* format of audio, see defines below */
|
|
|
|
gint format;
|
|
|
|
|
|
|
|
/* useful audio data */
|
2004-05-08 00:33:39 +00:00
|
|
|
guint16 depth;
|
2004-03-15 16:32:54 +00:00
|
|
|
gint rate;
|
2004-05-08 00:33:39 +00:00
|
|
|
guint16 channels;
|
2004-10-01 16:01:51 +00:00
|
|
|
guint16 blockalign;
|
2004-05-08 00:33:39 +00:00
|
|
|
guint16 width;
|
2004-05-16 20:06:35 +00:00
|
|
|
guint32 bps;
|
2006-07-24 13:40:56 +00:00
|
|
|
guint32 fact;
|
2004-03-15 16:32:54 +00:00
|
|
|
|
gst/wavparse/gstwavparse.*: Fix wavparse some more.
Original commit message from CVS:
* gst/wavparse/gstwavparse.c: (gst_wavparse_reset),
(gst_wavparse_init), (gst_wavparse_parse_file_header),
(gst_wavparse_stream_init), (gst_wavparse_handle_seek),
(gst_wavparse_stream_headers), (gst_wavparse_stream_data),
(gst_wavparse_loop), (gst_wavparse_pad_convert),
(gst_wavparse_pad_query), (gst_wavparse_srcpad_event),
(gst_wavparse_change_state):
* gst/wavparse/gstwavparse.h:
Fix wavparse some more.
2005-09-19 16:26:30 +00:00
|
|
|
guint bytes_per_sample;
|
|
|
|
|
2005-12-16 19:32:53 +00:00
|
|
|
/* position in data part */
|
|
|
|
guint64 offset;
|
|
|
|
guint64 end_offset;
|
|
|
|
guint64 dataleft;
|
|
|
|
/* offset/length of data part */
|
|
|
|
guint64 datastart;
|
|
|
|
guint64 datasize;
|
2004-03-15 16:32:54 +00:00
|
|
|
|
docs/plugins/: Added wavparse docs.
Original commit message from CVS:
* docs/plugins/Makefile.am:
* docs/plugins/gst-plugins-good-plugins-docs.sgml:
* docs/plugins/gst-plugins-good-plugins-sections.txt:
Added wavparse docs.
* gst/wavparse/gstwavparse.c: (gst_wavparse_class_init),
(gst_wavparse_reset), (gst_wavparse_init),
(gst_wavparse_create_sourcepad), (gst_wavparse_parse_file_header),
(gst_wavparse_stream_init), (gst_wavparse_perform_seek),
(gst_wavparse_stream_headers), (gst_wavparse_send_event),
(gst_wavparse_stream_data), (gst_wavparse_loop),
(gst_wavparse_srcpad_event), (gst_wavparse_sink_activate_pull),
(gst_wavparse_change_state):
* gst/wavparse/gstwavparse.h:
Implement seek in READY (fixes #327658)
Added docs and did some cleanups.
2006-03-03 18:36:53 +00:00
|
|
|
/* pending seek */
|
2005-07-20 11:26:05 +00:00
|
|
|
GstEvent *seek_event;
|
gst/wavparse/gstwavparse.*: Fix wavparse some more.
Original commit message from CVS:
* gst/wavparse/gstwavparse.c: (gst_wavparse_reset),
(gst_wavparse_init), (gst_wavparse_parse_file_header),
(gst_wavparse_stream_init), (gst_wavparse_handle_seek),
(gst_wavparse_stream_headers), (gst_wavparse_stream_data),
(gst_wavparse_loop), (gst_wavparse_pad_convert),
(gst_wavparse_pad_query), (gst_wavparse_srcpad_event),
(gst_wavparse_change_state):
* gst/wavparse/gstwavparse.h:
Fix wavparse some more.
2005-09-19 16:26:30 +00:00
|
|
|
|
gst/wavparse/gstwavparse.*: Add push (streaming) mode to wavparse (fixes #337625)
Original commit message from CVS:
* gst/wavparse/gstwavparse.c: (gst_wavparse_base_init),
(gst_wavparse_class_init), (gst_wavparse_dispose),
(gst_wavparse_reset), (gst_wavparse_init),
(gst_wavparse_create_sourcepad), (gst_wavparse_parse_adtl),
(gst_wavparse_parse_cues), (gst_wavparse_parse_file_header),
(gst_wavparse_stream_init), (gst_wavparse_perform_seek),
(gst_wavparse_peek_chunk_info), (gst_wavparse_peek_chunk),
(gst_wavparse_stream_headers), (gst_wavparse_parse_stream_init),
(gst_wavparse_send_event), (gst_wavparse_add_src_pad),
(gst_wavparse_stream_data), (gst_wavparse_loop),
(gst_wavparse_chain), (gst_wavparse_srcpad_event),
(gst_wavparse_sink_activate), (gst_wavparse_sink_activate_pull),
(gst_wavparse_change_state), (plugin_init):
* gst/wavparse/gstwavparse.h:
Add push (streaming) mode to wavparse (fixes #337625)
2006-04-28 23:09:17 +00:00
|
|
|
/* For streaming */
|
|
|
|
GstAdapter *adapter;
|
|
|
|
gboolean got_fmt;
|
|
|
|
gboolean streaming;
|
|
|
|
|
docs/plugins/: Added wavparse docs.
Original commit message from CVS:
* docs/plugins/Makefile.am:
* docs/plugins/gst-plugins-good-plugins-docs.sgml:
* docs/plugins/gst-plugins-good-plugins-sections.txt:
Added wavparse docs.
* gst/wavparse/gstwavparse.c: (gst_wavparse_class_init),
(gst_wavparse_reset), (gst_wavparse_init),
(gst_wavparse_create_sourcepad), (gst_wavparse_parse_file_header),
(gst_wavparse_stream_init), (gst_wavparse_perform_seek),
(gst_wavparse_stream_headers), (gst_wavparse_send_event),
(gst_wavparse_stream_data), (gst_wavparse_loop),
(gst_wavparse_srcpad_event), (gst_wavparse_sink_activate_pull),
(gst_wavparse_change_state):
* gst/wavparse/gstwavparse.h:
Implement seek in READY (fixes #327658)
Added docs and did some cleanups.
2006-03-03 18:36:53 +00:00
|
|
|
/* configured segment, start/stop expressed in time */
|
2005-12-16 19:32:53 +00:00
|
|
|
GstSegment segment;
|
|
|
|
gboolean segment_running;
|
gst/wavparse/gstwavparse.*: Add push (streaming) mode to wavparse (fixes #337625)
Original commit message from CVS:
* gst/wavparse/gstwavparse.c: (gst_wavparse_base_init),
(gst_wavparse_class_init), (gst_wavparse_dispose),
(gst_wavparse_reset), (gst_wavparse_init),
(gst_wavparse_create_sourcepad), (gst_wavparse_parse_adtl),
(gst_wavparse_parse_cues), (gst_wavparse_parse_file_header),
(gst_wavparse_stream_init), (gst_wavparse_perform_seek),
(gst_wavparse_peek_chunk_info), (gst_wavparse_peek_chunk),
(gst_wavparse_stream_headers), (gst_wavparse_parse_stream_init),
(gst_wavparse_send_event), (gst_wavparse_add_src_pad),
(gst_wavparse_stream_data), (gst_wavparse_loop),
(gst_wavparse_chain), (gst_wavparse_srcpad_event),
(gst_wavparse_sink_activate), (gst_wavparse_sink_activate_pull),
(gst_wavparse_change_state), (plugin_init):
* gst/wavparse/gstwavparse.h:
Add push (streaming) mode to wavparse (fixes #337625)
2006-04-28 23:09:17 +00:00
|
|
|
|
|
|
|
/* for late pad configuration */
|
|
|
|
gboolean first;
|
2004-03-15 16:32:54 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct _GstWavParseClass {
|
2005-07-20 11:26:05 +00:00
|
|
|
GstElementClass parent_class;
|
2004-03-15 16:32:54 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
GType gst_wavparse_get_type(void);
|
|
|
|
|
gst/wavparse/gstwavparse.*: Fix wavparse some more.
Original commit message from CVS:
* gst/wavparse/gstwavparse.c: (gst_wavparse_reset),
(gst_wavparse_init), (gst_wavparse_parse_file_header),
(gst_wavparse_stream_init), (gst_wavparse_handle_seek),
(gst_wavparse_stream_headers), (gst_wavparse_stream_data),
(gst_wavparse_loop), (gst_wavparse_pad_convert),
(gst_wavparse_pad_query), (gst_wavparse_srcpad_event),
(gst_wavparse_change_state):
* gst/wavparse/gstwavparse.h:
Fix wavparse some more.
2005-09-19 16:26:30 +00:00
|
|
|
G_END_DECLS
|
2001-12-22 23:27:31 +00:00
|
|
|
|
2004-03-15 16:32:54 +00:00
|
|
|
#endif /* __GST_WAVPARSE_H__ */
|