diff --git a/ext/mplex/Makefile.am b/ext/mplex/Makefile.am index 741b0d8934..84243ffeab 100644 --- a/ext/mplex/Makefile.am +++ b/ext/mplex/Makefile.am @@ -9,7 +9,8 @@ libgstmplex_la_SOURCES = \ libgstmplex_la_CXXFLAGS = \ $(GST_PLUGINS_BAD_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(GST_CXXFLAGS) $(MPLEX_CFLAGS) libgstmplex_la_LIBADD = \ - $(GST_PLUGINS_BASE_LIBS) $(GST_BASE_LIBS) $(GST_LIBS) $(MPLEX_LIBS) + $(GST_PLUGINS_BASE_LIBS) $(GST_BASE_LIBS) -lgstaudio-$(GST_MAJORMINOR) \ + $(GST_LIBS) $(MPLEX_LIBS) libgstmplex_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) $(MPLEX_LDFLAGS) libgstmplex_la_LIBTOOLFLAGS = --tag=disable-static diff --git a/ext/mplex/gstmplex.cc b/ext/mplex/gstmplex.cc index 2c9328d177..ba461e6e51 100644 --- a/ext/mplex/gstmplex.cc +++ b/ext/mplex/gstmplex.cc @@ -54,6 +54,8 @@ #include #include +#include + #include "gstmplex.hh" #include "gstmplexoutputstream.hh" #include "gstmplexibitstream.hh" @@ -93,11 +95,8 @@ static GstStaticPadTemplate audio_sink_templ = "audio/x-ac3, " COMMON_AUDIO_CAPS "; " "audio/x-dts; " - "audio/x-raw-int, " - "endianness = (int) BIG_ENDIAN, " - "signed = (boolean) TRUE, " - "width = (int) { 16, 20, 24 }, " - "depth = (int) { 16, 20, 24 }, " + "audio/x-raw, " + "format = (string) { S16BE, S20BE, S24BE }, " "rate = (int) { 48000, 96000 }, " "channels = (int) [ 1, 6 ]") ); @@ -324,20 +323,22 @@ gst_mplex_setcaps (GstPad * pad, GstCaps * caps) type = AC3_AUDIO; } else if (!strcmp (mime, "audio/x-dts")) { type = DTS_AUDIO; - } else if (!strcmp (mime, "audio/x-raw-int")) { + } else if (!strcmp (mime, "audio/x-raw")) { LpcmParams *params; gint bits, chans, rate; - gboolean result = TRUE; + GstAudioInfo info; type = LPCM_AUDIO; - /* set LPCM params */ - result &= gst_structure_get_int (structure, "depth", &bits); - result &= gst_structure_get_int (structure, "rate", &rate); - result &= gst_structure_get_int (structure, "channels", &chans); - if (!result) + gst_audio_info_init (&info); + if (!gst_audio_info_from_caps (&info, caps)) goto refuse_caps; + rate = GST_AUDIO_INFO_RATE (&info); + chans = GST_AUDIO_INFO_CHANNELS (&info); + bits = GST_AUDIO_INFO_DEPTH (&info); + + /* set LPCM params */ params = LpcmParams::Checked (rate, chans, bits); mplex->job->lpcm_param.push_back (params); diff --git a/gst/camerabin2/gstviewfinderbin.c b/gst/camerabin2/gstviewfinderbin.c index 90c78d5abf..1f87eb993a 100644 --- a/gst/camerabin2/gstviewfinderbin.c +++ b/gst/camerabin2/gstviewfinderbin.c @@ -57,7 +57,7 @@ enum static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, - GST_STATIC_CAPS ("video/x-raw-yuv; video/x-raw-rgb") + GST_STATIC_CAPS ("video/x-raw") ); /* class initialization */