4 #include "alaw-encode.h"
5 #include "alaw-decode.h"
10 return gst_caps_new_simple ("audio/x-alaw",
11 "rate", GST_TYPE_INT_RANGE, 8000, 192000,
12 "channels", GST_TYPE_INT_RANGE, 1, 2, NULL);
18 return gst_caps_new_simple ("audio/x-raw-int",
19 "width", G_TYPE_INT, 16,
20 "depth", G_TYPE_INT, 16,
21 "endianness", G_TYPE_INT, G_BYTE_ORDER,
22 "signed", G_TYPE_BOOLEAN, TRUE,
23 "rate", GST_TYPE_INT_RANGE, 8000, 192000,
24 "channels", GST_TYPE_INT_RANGE, 1, 2, NULL);
27 GstPadTemplate *alawenc_src_template, *alawenc_sink_template;
28 GstPadTemplate *alawdec_src_template, *alawdec_sink_template;
31 plugin_init (GstPlugin * plugin)
33 GstCaps *alaw_caps, *linear_caps;
35 alaw_caps = alaw_factory ();
36 linear_caps = linear_factory ();
38 alawenc_src_template =
39 gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS, alaw_caps);
40 alawenc_sink_template =
41 gst_pad_template_new ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, linear_caps);
43 alawdec_src_template =
44 gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS, linear_caps);
45 alawdec_sink_template =
46 gst_pad_template_new ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, alaw_caps);
48 if (!gst_element_register (plugin, "alawenc",
49 GST_RANK_NONE, GST_TYPE_ALAWENC) ||
50 !gst_element_register (plugin, "alawdec",
51 GST_RANK_PRIMARY, GST_TYPE_ALAWDEC))
57 GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
60 "ALaw audio conversion routines",
61 plugin_init, VERSION, GST_LICENSE, GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)