AC_SUBST(FAAD_LIBS)
])
+dnl *** gsm ***
+translit(dnm, m, l) AM_CONDITIONAL(USE_GSM, true)
+GST_CHECK_FEATURE(GSM, [GSM library], gsmenc gsmdec, [
+ GST_CHECK_LIBHEADER(GSM, gsm, gsm_create, , gsm.h, GSM_LIBS="-lgsm")
+ if test $HAVE_GSM != "yes"; then
+ GST_CHECK_LIBHEADER(GSM, gsm, gsm_create, , gsm/gsm.h, GSM_LIBS="-lgsm")
+ if test $HAVE_GSM = "yes"; then
+ AC_DEFINE(GSM_HEADER_IN_SUBDIR, 1, [Define if GSM header in gsm/ subdir])
+ fi
+ fi
+ AC_SUBST(GSM_LIBS)
+])
+
dnl also add builddir include for enumtypes and marshal
GST_CFLAGS="-I\$(top_srcdir)/gst-libs -I\$(top_builddir)/gst-libs $GST_CFLAGS $GST_ERROR"
ext/Makefile
ext/faac/Makefile
ext/faad/Makefile
+ext/gsm/Makefile
common/Makefile
common/m4/Makefile
m4/Makefile
-
plugin_LTLIBRARIES = libgstgsm.la
-libgstgsm_la_SOURCES = gstgsm.c gstgsmdec.c gstgsmenc.c
-libgstgsm_la_CFLAGS = $(GST_CFLAGS)
-libgstgsm_la_LIBADD = $(GSM_LIBS)
+libgstgsm_la_SOURCES = gstgsm.c gstgsmenc.c
+libgstgsm_la_CFLAGS = $(GST_CFLAGS) $(GST_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS)
+libgstgsm_la_LIBADD = $(GSM_LIBS) $(GST_PLUGINS_BASE_LIBS) \
+ -lgstaudio-@GST_MAJORMINOR@
libgstgsm_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
-noinst_HEADERS = gstgsmenc.h gstgsmdec.h
-
-#check_PROGRAMS = test
-
-#test_CFLAGS = $(GSM_CFLAGS)
-#test_LDADD = $(GSM_LIBS) $(top_srcdir)/gst/libgst.la
-#test_SOURCES = test.c
+noinst_HEADERS = gstgsmenc.h
static void gst_gsmenc_class_init (GstGSMEnc * klass);
static void gst_gsmenc_init (GstGSMEnc * gsmenc);
-static void gst_gsmenc_chain (GstPad * pad, GstData * _data);
+static GstFlowReturn gst_gsmenc_chain (GstPad * pad, GstBuffer * buf);
static GstElementClass *parent_class = NULL;
static guint gst_gsmenc_signals[LAST_SIGNAL] = { 0 };
gsmenc->next_ts = 0;
}
-static void
-gst_gsmenc_chain (GstPad * pad, GstData * _data)
+static GstFlowReturn
+gst_gsmenc_chain (GstPad * pad, GstBuffer * buf)
{
GstGSMEnc *gsmenc;
+/*
g_return_if_fail (pad != NULL);
g_return_if_fail (GST_IS_PAD (pad));
g_return_if_fail (_data != NULL);
-
+*/
gsmenc = GST_GSMENC (GST_OBJECT_PARENT (pad));
- if (GST_IS_EVENT (_data)) {
- GstEvent *event = GST_EVENT (_data);
+ if (GST_IS_EVENT (buf)) {
+ GstEvent *event = GST_EVENT (buf);
switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_EOS:{
- gst_element_set_eos (GST_ELEMENT (gsmenc));
- gst_pad_push (gsmenc->srcpad, _data);
+ gst_pad_push_event (gsmenc->srcpad, gst_event_new_eos ());
+ gst_pad_push (gsmenc->srcpad, buf);
break;
}
- case GST_EVENT_DISCONTINUOUS:{
+ case GST_EVENT_NEWSEGMENT:{
/* drop the discontinuity */
break;
}
break;
}
}
- return;
- } else if (GST_IS_BUFFER (_data)) {
- GstBuffer *buf = GST_BUFFER (_data);
+ return GST_FLOW_OK;
+ } else if (GST_IS_BUFFER (buf)) {
gsm_signal *data;
guint size;
gsm_encode (gsmenc->state, gsmenc->buffer,
(gsm_byte *) GST_BUFFER_DATA (outbuf));
- gst_pad_push (gsmenc->srcpad, GST_DATA (outbuf));
+ gst_pad_push (gsmenc->srcpad, outbuf);
size -= (160 - gsmenc->bufsize);
data += (160 - gsmenc->bufsize);
gsm_encode (gsmenc->state, data, (gsm_byte *) GST_BUFFER_DATA (outbuf));
- gst_pad_push (gsmenc->srcpad, GST_DATA (outbuf));
+ gst_pad_push (gsmenc->srcpad, outbuf);
size -= 160;
data += 160;
gsmenc->bufsize += size;
}
- gst_buffer_unref (buf);
- return;
+ /*gst_buffer_unref (buf); */
+ return GST_FLOW_OK;
}
+ return GST_FLOW_OK;
}