Commit e8bcd41d authored by Mark Nauwelaerts's avatar Mark Nauwelaerts
Browse files

flacenc: port to audioencoder

parent 671b56f9
plugin_LTLIBRARIES = libgstflac.la
libgstflac_la_SOURCES = gstflac.c gstflacdec.c gstflacenc.c gstflactag.c
libgstflac_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS) $(FLAC_CFLAGS)
libgstflac_la_CFLAGS = -DGST_USE_UNSTABLE_API \
$(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS) $(FLAC_CFLAGS)
libgstflac_la_LIBADD = \
$(GST_PLUGINS_BASE_LIBS) -lgsttag-$(GST_MAJORMINOR) \
-lgstaudio-$(GST_MAJORMINOR) \
......
This diff is collapsed.
......@@ -22,6 +22,7 @@
#define __GST_FLAC_ENC_H__
#include <gst/gst.h>
#include <gst/audio/gstaudioencoder.h>
#include <FLAC/all.h>
......@@ -37,19 +38,15 @@ typedef struct _GstFlacEnc GstFlacEnc;
typedef struct _GstFlacEncClass GstFlacEncClass;
struct _GstFlacEnc {
GstElement element;
GstAudioEncoder element;
/* < private > */
GstPad *sinkpad;
GstPad *srcpad;
GstFlowReturn last_flow; /* save flow from last push so we can pass the
* correct flow return upstream in case the push
* fails for some reason */
guint64 offset;
guint64 samples_written;
gint channels;
gint width;
gint depth;
......@@ -68,18 +65,14 @@ struct _GstFlacEnc {
GstTagList * tags;
gboolean eos;
/* queue headers until we have them all so we can add streamheaders to caps */
gboolean got_headers;
GList *headers;
/* Timestamp and granulepos tracking */
GstClockTime start_ts;
GstClockTime next_ts;
guint64 granulepos_offset;
};
struct _GstFlacEncClass {
GstElementClass parent_class;
GstAudioEncoderClass parent_class;
};
GType gst_flac_enc_get_type(void);
......
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