#include <gst/gst.h>
+#include <gst/audio/gstaudioencoder.h>
#include <vorbis/codec.h>
* 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 */
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;
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;
gboolean setup;
gboolean header_sent;
gchar *last_message;
+ GSList *headers;
};
struct _GstVorbisEncClass {
- GstElementClass parent_class;
+ GstAudioEncoderClass parent_class;
};
GType gst_vorbis_enc_get_type(void);