mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 17:50:36 +00:00
rtpsbcpay: Fixes gstreamer caps and code cleanup.
This commit is contained in:
parent
a4f9624261
commit
687400ecf4
1 changed files with 9 additions and 3 deletions
|
@ -79,7 +79,7 @@ GST_ELEMENT_DETAILS ("RTP packet payloader",
|
||||||
|
|
||||||
static GstStaticPadTemplate gst_rtp_sbc_pay_sink_factory =
|
static GstStaticPadTemplate gst_rtp_sbc_pay_sink_factory =
|
||||||
GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK, GST_PAD_ALWAYS,
|
GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK, GST_PAD_ALWAYS,
|
||||||
GST_STATIC_CAPS ("audio/x-sbc, " /* FIXME remove those caps? */
|
GST_STATIC_CAPS ("audio/x-sbc, "
|
||||||
"rate = (int) { 16000, 32000, 44100, 48000 }, "
|
"rate = (int) { 16000, 32000, 44100, 48000 }, "
|
||||||
"channels = (int) [ 1, 2 ], "
|
"channels = (int) [ 1, 2 ], "
|
||||||
"mode = (string) { mono, dual, stereo, joint }, "
|
"mode = (string) { mono, dual, stereo, joint }, "
|
||||||
|
@ -91,7 +91,11 @@ static GstStaticPadTemplate gst_rtp_sbc_pay_sink_factory =
|
||||||
|
|
||||||
static GstStaticPadTemplate gst_rtp_sbc_pay_src_factory =
|
static GstStaticPadTemplate gst_rtp_sbc_pay_src_factory =
|
||||||
GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC, GST_PAD_ALWAYS,
|
GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC, GST_PAD_ALWAYS,
|
||||||
GST_STATIC_CAPS ("application/x-rtp") /* FIXME put things here */
|
GST_STATIC_CAPS ("application/x-rtp, "
|
||||||
|
"media = (string) \"audio\","
|
||||||
|
"payload = (int) " GST_RTP_PAYLOAD_DYNAMIC_STRING ", "
|
||||||
|
"clock-rate = (int) { 16000, 32000, 44100, 48000 },"
|
||||||
|
"encoding-name = (string) \"SBC\"")
|
||||||
);
|
);
|
||||||
|
|
||||||
static void gst_rtp_sbc_pay_set_property (GObject * object, guint prop_id,
|
static void gst_rtp_sbc_pay_set_property (GObject * object, guint prop_id,
|
||||||
|
@ -150,7 +154,7 @@ gst_rtp_sbc_pay_set_caps (GstBaseRTPPayload * payload, GstCaps * caps)
|
||||||
|
|
||||||
sbcpay->frame_length = frame_len;
|
sbcpay->frame_length = frame_len;
|
||||||
|
|
||||||
gst_basertppayload_set_options (payload, "audio", FALSE, "SBC", rate);
|
gst_basertppayload_set_options (payload, "audio", TRUE, "SBC", rate);
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (payload, "calculated frame length: %d ", frame_len);
|
GST_DEBUG_OBJECT (payload, "calculated frame length: %d ", frame_len);
|
||||||
|
|
||||||
|
@ -210,6 +214,8 @@ gst_rtp_sbc_pay_handle_buffer (GstBaseRTPPayload * payload, GstBuffer * buffer)
|
||||||
GstRtpSBCPay *sbcpay;
|
GstRtpSBCPay *sbcpay;
|
||||||
guint available;
|
guint available;
|
||||||
|
|
||||||
|
/* FIXME check for negotiation */
|
||||||
|
|
||||||
sbcpay = GST_RTP_SBC_PAY (payload);
|
sbcpay = GST_RTP_SBC_PAY (payload);
|
||||||
gst_adapter_push (sbcpay->adapter, gst_buffer_copy (buffer));
|
gst_adapter_push (sbcpay->adapter, gst_buffer_copy (buffer));
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue