mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 16:50:47 +00:00
dtmfdetect: Only works with rate=8000, fix in caps
This commit is contained in:
parent
72590ad056
commit
dd13e85ca1
2 changed files with 2 additions and 8 deletions
|
@ -74,7 +74,7 @@ static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
|
|||
"width = (int) 16, "
|
||||
"depth = (int) 16, "
|
||||
"endianness = (int) " G_STRINGIFY (G_BYTE_ORDER) ", "
|
||||
"signed = (bool) true, rate = (int) [1, MAX], channels = (int) 1"));
|
||||
"signed = (bool) true, rate = (int) 8000, channels = (int) 1"));
|
||||
|
||||
static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
|
||||
GST_PAD_SRC,
|
||||
|
@ -83,7 +83,7 @@ static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
|
|||
"width = (int) 16, "
|
||||
"depth = (int) 16, "
|
||||
"endianness = (int) " G_STRINGIFY (G_BYTE_ORDER) ", "
|
||||
"signed = (bool) true, rate = (int) [1, MAX], channels = (int) 1"));
|
||||
"signed = (bool) true, rate = (int) 8000, channels = (int) 1"));
|
||||
|
||||
/* signals and args */
|
||||
enum
|
||||
|
@ -155,10 +155,6 @@ gst_dtmf_detect_set_caps (GstBaseTransform * trans, GstCaps * incaps,
|
|||
GstCaps * outcaps)
|
||||
{
|
||||
GstDtmfDetect *self = GST_DTMF_DETECT (trans);
|
||||
GstStructure *s = gst_caps_get_structure (incaps, 0);
|
||||
|
||||
if (!gst_structure_get_int (s, "rate", &self->rate))
|
||||
return FALSE;
|
||||
|
||||
zap_dtmf_detect_init (&self->dtmf_state);
|
||||
|
||||
|
|
|
@ -54,8 +54,6 @@ struct _GstDtmfDetect
|
|||
{
|
||||
GstBaseTransform parent;
|
||||
|
||||
gint rate;
|
||||
|
||||
dtmf_detect_state_t dtmf_state;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue