2004-11-07 18:30:06 +00:00
|
|
|
/* GStreamer Musepack decoder plugin
|
|
|
|
* Copyright (C) 2004 Ronald Bultje <rbultje@ronald.bitfreak.net>
|
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __GST_MUSEPACK_DEC_H__
|
|
|
|
#define __GST_MUSEPACK_DEC_H__
|
|
|
|
|
2008-04-24 22:19:48 +00:00
|
|
|
#ifdef MPC_IS_OLD_API
|
2005-11-22 15:09:28 +00:00
|
|
|
#include <mpcdec/mpcdec.h>
|
2008-04-24 22:19:48 +00:00
|
|
|
#else
|
|
|
|
#include <mpc/mpcdec.h>
|
|
|
|
#endif
|
|
|
|
|
2008-01-26 14:35:22 +00:00
|
|
|
#include <gst/gst.h>
|
2004-11-07 18:30:06 +00:00
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
|
|
|
#define GST_TYPE_MUSEPACK_DEC \
|
|
|
|
(gst_musepackdec_get_type ())
|
|
|
|
#define GST_MUSEPACK_DEC(obj) \
|
|
|
|
(G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_MUSEPACK_DEC, \
|
|
|
|
GstMusepackDec))
|
|
|
|
#define GST_MUSEPACK_DEC_CLASS(klass) \
|
|
|
|
(G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_MUSEPACK_DEC, \
|
|
|
|
GstMusepackDecClass))
|
|
|
|
#define GST_IS_MUSEPACK_DEC(obj) \
|
|
|
|
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_MUSEPACK_DEC))
|
ext/musepack/: Fix seeking in musepack files (it's still incredibly slow, but I don't think that is our plugin's faul...
Original commit message from CVS:
* ext/musepack/gstmusepackdec.c: (gst_musepackdec_base_init),
(gst_musepackdec_class_init), (gst_musepackdec_init),
(gst_musepackdec_send_newsegment),
(gst_musepackdec_handle_seek_event), (gst_musepackdec_src_event),
(gst_musepackdec_src_query), (gst_musepackdec_src_convert),
(gst_musepack_stream_init), (gst_musepackdec_sink_activate_pull),
(gst_musepackdec_loop), (gst_musepackdec_change_state):
* ext/musepack/gstmusepackdec.h:
* ext/musepack/gstmusepackreader.c: (gst_musepack_reader_peek),
(gst_musepack_reader_seek), (gst_musepack_reader_tell),
(gst_musepack_reader_get_size):
* ext/musepack/gstmusepackreader.h:
Fix seeking in musepack files (it's still incredibly slow, but I
don't think that is our plugin's fault). Clean up code and get
rid of old cruft. Post tags with all kind of neat information like
replay gain and such on the bus, if it is available. Add a
'musepackdec' debug category.
2006-01-24 21:33:25 +00:00
|
|
|
#define GST_IS_MUSEPACK_DEC_CLASS(klass) \
|
2004-11-07 18:30:06 +00:00
|
|
|
(G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_MUSEPACK_DEC))
|
|
|
|
|
|
|
|
typedef struct _GstMusepackDec {
|
2006-03-06 13:15:04 +00:00
|
|
|
GstElement element;
|
2004-11-07 18:30:06 +00:00
|
|
|
|
2006-03-06 13:15:04 +00:00
|
|
|
GstPad *srcpad;
|
|
|
|
GstPad *sinkpad;
|
|
|
|
guint64 offset;
|
2004-11-07 18:30:06 +00:00
|
|
|
|
|
|
|
/* MUSEPACK_DEC object */
|
2008-04-24 22:19:48 +00:00
|
|
|
#ifdef MPC_IS_OLD_API
|
2006-03-06 13:15:04 +00:00
|
|
|
mpc_decoder *d;
|
2008-04-24 22:19:48 +00:00
|
|
|
#else
|
|
|
|
mpc_demux *d;
|
|
|
|
#endif
|
2006-03-06 13:15:04 +00:00
|
|
|
mpc_reader *r;
|
2004-11-07 18:30:06 +00:00
|
|
|
|
2006-03-06 13:15:04 +00:00
|
|
|
gint bps; /* bytes per sample */ /* ATOMIC */
|
|
|
|
gint rate; /* sample rate */ /* ATOMIC */
|
2004-11-07 18:30:06 +00:00
|
|
|
|
2006-03-06 13:15:04 +00:00
|
|
|
GstSegment segment; /* configured segment in samples (DEFAULT format) */
|
2004-11-07 18:30:06 +00:00
|
|
|
} GstMusepackDec;
|
|
|
|
|
|
|
|
typedef struct _GstMusepackDecClass {
|
|
|
|
GstElementClass parent_class;
|
|
|
|
} GstMusepackDecClass;
|
|
|
|
|
|
|
|
GType gst_musepackdec_get_type (void);
|
|
|
|
|
|
|
|
G_END_DECLS
|
|
|
|
|
|
|
|
#endif /* __GST_MUSEPACK_DEC_H__ */
|