mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 17:20:36 +00:00
vorbisdec: port to audiodecoder
This commit is contained in:
parent
37c629fcc6
commit
f63f09483f
3 changed files with 131 additions and 795 deletions
|
@ -28,7 +28,8 @@ plugin_LTLIBRARIES += libgstivorbisdec.la
|
||||||
|
|
||||||
libgstivorbisdec_la_SOURCES = gstivorbisdec.c \
|
libgstivorbisdec_la_SOURCES = gstivorbisdec.c \
|
||||||
gstvorbisdec.c gstvorbisdeclib.c gstvorbiscommon.c
|
gstvorbisdec.c gstvorbisdeclib.c gstvorbiscommon.c
|
||||||
libgstivorbisdec_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) \
|
libgstivorbisdec_la_CFLAGS = -DGST_USE_UNSTABLE_API \
|
||||||
|
$(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) \
|
||||||
-DTREMOR $(IVORBIS_CFLAGS)
|
-DTREMOR $(IVORBIS_CFLAGS)
|
||||||
libgstivorbisdec_la_LIBADD = \
|
libgstivorbisdec_la_LIBADD = \
|
||||||
$(top_builddir)/gst-libs/gst/tag/libgsttag-@GST_MAJORMINOR@.la \
|
$(top_builddir)/gst-libs/gst/tag/libgsttag-@GST_MAJORMINOR@.la \
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -27,6 +27,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
|
#include <gst/audio/gstaudiodecoder.h>
|
||||||
#include "gstvorbisdeclib.h"
|
#include "gstvorbisdeclib.h"
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
@ -51,15 +52,11 @@ typedef struct _GstVorbisDecClass GstVorbisDecClass;
|
||||||
* Opaque data structure.
|
* Opaque data structure.
|
||||||
*/
|
*/
|
||||||
struct _GstVorbisDec {
|
struct _GstVorbisDec {
|
||||||
GstElement element;
|
GstAudioDecoder element;
|
||||||
|
|
||||||
GstPad *sinkpad;
|
|
||||||
GstPad *srcpad;
|
|
||||||
|
|
||||||
vorbis_dsp_state vd;
|
vorbis_dsp_state vd;
|
||||||
vorbis_info vi;
|
vorbis_info vi;
|
||||||
vorbis_comment vc;
|
vorbis_comment vc;
|
||||||
|
|
||||||
#ifndef USE_TREMOLO
|
#ifndef USE_TREMOLO
|
||||||
vorbis_block vb;
|
vorbis_block vb;
|
||||||
#endif
|
#endif
|
||||||
|
@ -67,26 +64,13 @@ struct _GstVorbisDec {
|
||||||
gboolean initialized;
|
gboolean initialized;
|
||||||
guint width;
|
guint width;
|
||||||
|
|
||||||
/* list of buffers that need timestamps */
|
|
||||||
GList *queued;
|
|
||||||
/* gather/decode queues for reverse playback */
|
|
||||||
GList *gather;
|
|
||||||
GList *decode;
|
|
||||||
|
|
||||||
GstSegment segment;
|
|
||||||
gboolean discont;
|
|
||||||
guint32 seqnum;
|
|
||||||
|
|
||||||
GstClockTime last_timestamp;
|
|
||||||
|
|
||||||
GList *pendingevents;
|
|
||||||
GstTagList *taglist;
|
GstTagList *taglist;
|
||||||
|
|
||||||
CopySampleFunc copy_samples;
|
CopySampleFunc copy_samples;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstVorbisDecClass {
|
struct _GstVorbisDecClass {
|
||||||
GstElementClass parent_class;
|
GstAudioDecoderClass parent_class;
|
||||||
};
|
};
|
||||||
|
|
||||||
GType gst_vorbis_dec_get_type(void);
|
GType gst_vorbis_dec_get_type(void);
|
||||||
|
|
Loading…
Reference in a new issue