vorbisenc: port to audioencoder
This commit is contained in:
parent
be39ab28c3
commit
f3cb93fc0c
@ -11,7 +11,8 @@ libgstvorbis_la_SOURCES = gstvorbis.c \
|
|||||||
gstvorbistag.c \
|
gstvorbistag.c \
|
||||||
gstvorbiscommon.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
|
## AM_PATH_VORBIS also sets VORBISENC_LIBS
|
||||||
libgstvorbis_la_LIBADD = \
|
libgstvorbis_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
@ -23,6 +23,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
|
#include <gst/audio/gstaudioencoder.h>
|
||||||
|
|
||||||
#include <vorbis/codec.h>
|
#include <vorbis/codec.h>
|
||||||
|
|
||||||
@ -48,14 +49,11 @@ typedef struct _GstVorbisEncClass GstVorbisEncClass;
|
|||||||
* Opaque data structure.
|
* Opaque data structure.
|
||||||
*/
|
*/
|
||||||
struct _GstVorbisEnc {
|
struct _GstVorbisEnc {
|
||||||
GstElement element;
|
GstAudioEncoder element;
|
||||||
|
|
||||||
GstPad *sinkpad;
|
|
||||||
GstPad *srcpad;
|
|
||||||
|
|
||||||
GstCaps *srccaps;
|
|
||||||
GstCaps *sinkcaps;
|
GstCaps *sinkcaps;
|
||||||
|
|
||||||
|
/* codec */
|
||||||
vorbis_info vi; /* struct that stores all the static vorbis bitstream
|
vorbis_info vi; /* struct that stores all the static vorbis bitstream
|
||||||
settings */
|
settings */
|
||||||
vorbis_comment vc; /* struct that stores all the user comments */
|
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_dsp_state vd; /* central working state for the packet->PCM decoder */
|
||||||
vorbis_block vb; /* local working space for packet->PCM decode */
|
vorbis_block vb; /* local working space for packet->PCM decode */
|
||||||
|
|
||||||
|
/* properties */
|
||||||
gboolean managed;
|
gboolean managed;
|
||||||
gint bitrate;
|
gint bitrate;
|
||||||
gint min_bitrate;
|
gint min_bitrate;
|
||||||
@ -74,14 +73,8 @@ struct _GstVorbisEnc {
|
|||||||
gint frequency;
|
gint frequency;
|
||||||
|
|
||||||
guint64 samples_in;
|
guint64 samples_in;
|
||||||
|
guint64 samples_out;
|
||||||
guint64 bytes_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;
|
GstTagList * tags;
|
||||||
|
|
||||||
@ -91,7 +84,7 @@ struct _GstVorbisEnc {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct _GstVorbisEncClass {
|
struct _GstVorbisEncClass {
|
||||||
GstElementClass parent_class;
|
GstAudioEncoderClass parent_class;
|
||||||
};
|
};
|
||||||
|
|
||||||
GType gst_vorbis_enc_get_type(void);
|
GType gst_vorbis_enc_get_type(void);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user