mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-05-01 22:14:48 +00:00
omega: you agreed on starting rate from 1000, which is really neeeded for Apps like mine(zchat)
Original commit message from CVS: omega: you agreed on starting rate from 1000, which is really neeeded for Apps like mine(zchat)
This commit is contained in:
parent
42cc21cd97
commit
c7bb41195e
3 changed files with 22 additions and 4 deletions
|
@ -32,7 +32,7 @@ GST_CAPS_FACTORY (gsm_caps_factory,
|
|||
GST_CAPS_NEW (
|
||||
"gsm_gsm",
|
||||
"audio/x-gsm",
|
||||
"rate", GST_PROPS_INT_RANGE (4000, 48000)
|
||||
"rate", GST_PROPS_INT_RANGE (1000, 48000)
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -46,7 +46,7 @@ GST_CAPS_FACTORY (raw_caps_factory,
|
|||
"signed", GST_PROPS_BOOLEAN (TRUE),
|
||||
"width", GST_PROPS_INT (16),
|
||||
"depth", GST_PROPS_INT (16),
|
||||
"rate", GST_PROPS_INT_RANGE (4000, 48000),
|
||||
"rate", GST_PROPS_INT_RANGE (1000, 48000),
|
||||
"channels", GST_PROPS_INT (1)
|
||||
)
|
||||
)
|
||||
|
|
|
@ -108,7 +108,6 @@ gst_gsmdec_newcaps (GstPad *pad, GstCaps *caps)
|
|||
GstGSMDec *gsmdec;
|
||||
|
||||
gsmdec = GST_GSMDEC (gst_pad_get_parent (pad));
|
||||
|
||||
gst_pad_set_caps (gsmdec->srcpad, GST_CAPS_NEW (
|
||||
"gsm_raw",
|
||||
"audio/raw",
|
||||
|
|
|
@ -46,6 +46,17 @@ enum {
|
|||
/* FILL ME */
|
||||
};
|
||||
|
||||
GST_PADTEMPLATE_FACTORY (src_factory,
|
||||
"src",
|
||||
GST_PAD_SRC,
|
||||
GST_PAD_ALWAYS,
|
||||
GST_CAPS_NEW (
|
||||
"gsm_enc",
|
||||
"audio/x-gsm",
|
||||
"rate", GST_PROPS_INT_RANGE (1000, 48000)
|
||||
)
|
||||
);
|
||||
|
||||
static void gst_gsmenc_class_init (GstGSMEnc *klass);
|
||||
static void gst_gsmenc_init (GstGSMEnc *gsmenc);
|
||||
|
||||
|
@ -121,7 +132,6 @@ gst_gsmenc_newcaps (GstPad *pad, GstCaps *caps)
|
|||
gsmenc = GST_GSMENC (gst_pad_get_parent (pad));
|
||||
|
||||
gsmenc->rate = gst_caps_get_int (caps, "rate");
|
||||
|
||||
gst_pad_set_caps (gsmenc->srcpad, GST_CAPS_NEW (
|
||||
"gsm_gsm",
|
||||
"audio/x-gsm",
|
||||
|
@ -142,6 +152,15 @@ gst_gsmenc_chain (GstPad *pad, GstBuffer *buf)
|
|||
|
||||
gsmenc = GST_GSMENC (GST_OBJECT_PARENT (pad));
|
||||
|
||||
if (!GST_PAD_CAPS (gsmenc->srcpad)) {
|
||||
gst_pad_set_caps (gsmenc->srcpad,
|
||||
GST_CAPS_NEW (
|
||||
"gsm_enc",
|
||||
"audio/x-gsm",
|
||||
"rate", GST_PROPS_INT (gsmenc->rate)
|
||||
));
|
||||
}
|
||||
|
||||
data = (gsm_signal*) GST_BUFFER_DATA (buf);
|
||||
size = GST_BUFFER_SIZE (buf) / sizeof (gsm_signal);
|
||||
|
||||
|
|
Loading…
Reference in a new issue