diff options
author | Luiz Augusto von Dentz <luiz.dentz@openbossa.org> | 2008-01-30 14:21:43 +0000 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.dentz@openbossa.org> | 2008-01-30 14:21:43 +0000 |
commit | 3ad6867c8c7251c3192378a1a0e2ed937ee47d1b (patch) | |
tree | 879d3e37febab470e4b46c01f8b627dfd79308ae /audio/gstrtpsbcpay.c | |
parent | a104e5ff05aa758b5499b316d1923f1c83915e55 (diff) |
Fixes gstreamer caps and code cleanup.
Diffstat (limited to 'audio/gstrtpsbcpay.c')
-rw-r--r-- | audio/gstrtpsbcpay.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/audio/gstrtpsbcpay.c b/audio/gstrtpsbcpay.c index 25bf70eb..ba2a4741 100644 --- a/audio/gstrtpsbcpay.c +++ b/audio/gstrtpsbcpay.c @@ -77,7 +77,7 @@ static const GstElementDetails gst_rtp_sbc_pay_details = static GstStaticPadTemplate gst_rtp_sbc_pay_sink_factory = 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 }, " "channels = (int) [ 1, 2 ], " "mode = (string) { mono, dual, stereo, joint }, " @@ -89,7 +89,12 @@ static GstStaticPadTemplate gst_rtp_sbc_pay_sink_factory = static GstStaticPadTemplate gst_rtp_sbc_pay_src_factory = 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, @@ -148,7 +153,7 @@ static gboolean gst_rtp_sbc_pay_set_caps(GstBaseRTPPayload *payload, 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); @@ -209,6 +214,8 @@ static GstFlowReturn gst_rtp_sbc_pay_handle_buffer(GstBaseRTPPayload *payload, GstRtpSBCPay *sbcpay; guint available; + /* FIXME check for negotiation */ + sbcpay = GST_RTP_SBC_PAY(payload); gst_adapter_push(sbcpay->adapter, gst_buffer_copy(buffer)); |