Commit c1909c32 authored by Mark Nauwelaerts's avatar Mark Nauwelaerts

speexenc: port to audioencoder

parent e8bcd41d
plugin_LTLIBRARIES = libgstspeex.la
libgstspeex_la_SOURCES = gstspeex.c gstspeexdec.c gstspeexenc.c
libgstspeex_la_CFLAGS = \
libgstspeex_la_CFLAGS = -DGST_USE_UNSTABLE_API \
$(GST_PLUGINS_BASE_CFLAGS) \
$(GST_BASE_CFLAGS) \
$(GST_CFLAGS) \
$(SPEEX_CFLAGS)
libgstspeex_la_LIBADD = \
$(GST_PLUGINS_BASE_LIBS) -lgsttag-$(GST_MAJORMINOR) \
$(GST_PLUGINS_BASE_LIBS) \
-lgsttag-$(GST_MAJORMINOR) -lgstaudio-$(GST_MAJORMINOR) \
$(GST_BASE_LIBS) \
$(GST_LIBS) \
$(SPEEX_LIBS)
......
This diff is collapsed.
......@@ -23,7 +23,7 @@
#include <gst/gst.h>
#include <gst/base/gstadapter.h>
#include <gst/audio/gstaudioencoder.h>
#include <speex/speex.h>
#include <speex/speex_header.h>
......@@ -53,14 +53,7 @@ typedef struct _GstSpeexEnc GstSpeexEnc;
typedef struct _GstSpeexEncClass GstSpeexEncClass;
struct _GstSpeexEnc {
GstElement element;
/* pads */
GstPad *sinkpad,
*srcpad;
gint packet_count;
gint n_packets;
GstAudioEncoder element;
SpeexBits bits;
SpeexHeader header;
......@@ -70,9 +63,9 @@ struct _GstSpeexEnc {
const SpeexMode *speex_mode;
#endif
void *state;
GstSpeexMode mode;
GstAdapter *adapter;
/* properties */
GstSpeexMode mode;
gfloat quality;
gint bitrate;
gboolean vbr;
......@@ -81,37 +74,24 @@ struct _GstSpeexEnc {
gboolean dtx;
gint complexity;
gint nframes;
gint lookahead;
gchar *last_message;
gint channels;
gint rate;
gboolean setup;
gboolean header_sent;
guint64 samples_in;
guint64 bytes_out;
GstTagList *tags;
gchar *last_message;
gint frame_size;
guint64 frameno;
guint64 frameno_out;
gint lookahead;
guint8 *comments;
gint comment_len;
/* Timestamp and granulepos tracking */
GstClockTime start_ts;
GstClockTime next_ts;
guint64 granulepos_offset;
};
struct _GstSpeexEncClass {
GstElementClass parent_class;
GstAudioEncoderClass parent_class;
/* signals */
void (*frame_encoded) (GstElement *element);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment