vorbisenc: port to audioencoder

This commit is contained in:
Mark Nauwelaerts 2011-10-05 15:43:35 +02:00
parent be39ab28c3
commit f3cb93fc0c
3 changed files with 201 additions and 698 deletions

View file

@ -11,7 +11,8 @@ libgstvorbis_la_SOURCES = gstvorbis.c \
gstvorbistag.c \
gstvorbiscommon.c
libgstvorbis_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) $(VORBIS_CFLAGS)
libgstvorbis_la_CFLAGS = -DGST_USE_UNSTABLE_API \
$(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) $(VORBIS_CFLAGS)
## AM_PATH_VORBIS also sets VORBISENC_LIBS
libgstvorbis_la_LIBADD = \
$(top_builddir)/gst-libs/gst/tag/libgsttag-@GST_MAJORMINOR@.la \

File diff suppressed because it is too large Load diff

View file

@ -23,6 +23,7 @@
#include <gst/gst.h>
#include <gst/audio/gstaudioencoder.h>
#include <vorbis/codec.h>
@ -48,14 +49,11 @@ typedef struct _GstVorbisEncClass GstVorbisEncClass;
* Opaque data structure.
*/
struct _GstVorbisEnc {
GstElement element;
GstAudioEncoder element;
GstPad *sinkpad;
GstPad *srcpad;
GstCaps *srccaps;
GstCaps *sinkcaps;
/* codec */
vorbis_info vi; /* struct that stores all the static vorbis bitstream
settings */
vorbis_comment vc; /* struct that stores all the user comments */
@ -63,6 +61,7 @@ struct _GstVorbisEnc {
vorbis_dsp_state vd; /* central working state for the packet->PCM decoder */
vorbis_block vb; /* local working space for packet->PCM decode */
/* properties */
gboolean managed;
gint bitrate;
gint min_bitrate;
@ -74,14 +73,8 @@ struct _GstVorbisEnc {
gint frequency;
guint64 samples_in;
guint64 samples_out;
guint64 bytes_out;
GstClockTime next_ts;
GstClockTime expected_ts;
gboolean next_discont;
guint64 granulepos_offset;
gint64 subgranule_offset;
GstSegment segment;
GstClockTime initial_ts;
GstTagList * tags;
@ -91,7 +84,7 @@ struct _GstVorbisEnc {
};
struct _GstVorbisEncClass {
GstElementClass parent_class;
GstAudioEncoderClass parent_class;
};
GType gst_vorbis_enc_get_type(void);