1 /* GStreamer PCM/A-Law conversions
3 * This library is free software; you can redistribute it and/or
4 * modify it under the terms of the GNU Library General Public
5 * License as published by the Free Software Foundation; either
6 * version 2.1 of the License, or (at your option) any later version.
8 * This library is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * Library General Public License for more details.
13 * You should have received a copy of the GNU Library General Public
14 * License along with this library; if not, write to the
15 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
16 * Boston, MA 02110-1301, USA.
23 #include <gst/audio/audio.h>
25 #include "alaw-encode.h"
26 #include "alaw-decode.h"
28 GstStaticPadTemplate alaw_dec_src_factory = GST_STATIC_PAD_TEMPLATE ("src",
31 GST_STATIC_CAPS ("audio/x-raw, "
32 "format = (string) " GST_AUDIO_NE (S16) ", "
33 "layout = (string) interleaved, "
34 "rate = (int) [ 8000, 192000 ], " "channels = (int) [ 1, 2 ]")
37 GstStaticPadTemplate alaw_dec_sink_factory = GST_STATIC_PAD_TEMPLATE ("sink",
40 GST_STATIC_CAPS ("audio/x-alaw, "
41 "rate = [ 8000 , 192000 ], " "channels = [ 1 , 2 ]")
44 GstStaticPadTemplate alaw_enc_sink_factory = GST_STATIC_PAD_TEMPLATE ("sink",
47 GST_STATIC_CAPS ("audio/x-raw, "
48 "format = (string) " GST_AUDIO_NE (S16) ", "
49 "layout = (string) interleaved, "
50 "rate = (int) [ 8000, 192000 ], " "channels = (int) [ 1, 2 ]")
53 GstStaticPadTemplate alaw_enc_src_factory = GST_STATIC_PAD_TEMPLATE ("src",
56 GST_STATIC_CAPS ("audio/x-alaw, "
57 "rate = [ 8000 , 192000 ], " "channels = [ 1 , 2 ]")
61 plugin_init (GstPlugin * plugin)
63 if (!gst_element_register (plugin, "alawenc",
64 GST_RANK_PRIMARY, GST_TYPE_ALAW_ENC) ||
65 !gst_element_register (plugin, "alawdec",
66 GST_RANK_PRIMARY, GST_TYPE_ALAW_DEC))
72 /* FIXME 0.11: merge alaw and mulaw into one plugin? */
73 GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
76 "ALaw audio conversion routines",
77 plugin_init, VERSION, GST_LICENSE, GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)