mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
rtp, rtpmanager: Address unused but set variables
GCC 4.6.x spits warnings about variables that are unused but set. Such
variables have been removed where trivial but with comments left behind
for informational purposes in some cases.
gst_rtp_session_chain_recv_rtcp () was changed in commit 490113d4
to always return GST_FLOW_OK instead of the return value of
rtp_session_process_rtcp (), so we'll keep it that way.
This commit is contained in:
parent
1c6e8682ec
commit
5b18c652fb
13 changed files with 10 additions and 55 deletions
|
@ -290,7 +290,6 @@ gst_rtp_amr_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf)
|
|||
* no robust sorting, no interleaving data is to be depayloaded */
|
||||
{
|
||||
guint8 *payload, *p, *dp;
|
||||
guint8 CMR;
|
||||
gint i, num_packets, num_nonempty_packets;
|
||||
gint amr_len;
|
||||
gint ILL, ILP;
|
||||
|
@ -311,7 +310,7 @@ gst_rtp_amr_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf)
|
|||
* | CMR |R|R|R|R|
|
||||
* +-+-+-+-+-+-+-+-+
|
||||
*/
|
||||
CMR = (payload[0] & 0xf0) >> 4;
|
||||
/* CMR = (payload[0] & 0xf0) >> 4; */
|
||||
|
||||
/* strip CMR header now, pack FT and the data for the decoder */
|
||||
payload_len -= 1;
|
||||
|
|
|
@ -75,10 +75,8 @@ gst_rtp_bv_depay_base_init (gpointer klass)
|
|||
static void
|
||||
gst_rtp_bv_depay_class_init (GstRTPBVDepayClass * klass)
|
||||
{
|
||||
GObjectClass *gobject_class;
|
||||
GstBaseRTPDepayloadClass *gstbasertpdepayload_class;
|
||||
|
||||
gobject_class = (GObjectClass *) klass;
|
||||
gstbasertpdepayload_class = (GstBaseRTPDepayloadClass *) klass;
|
||||
|
||||
gstbasertpdepayload_class->process = gst_rtp_bv_depay_process;
|
||||
|
|
|
@ -93,10 +93,8 @@ gst_rtp_bv_pay_class_init (GstRTPBVPayClass * klass)
|
|||
static void
|
||||
gst_rtp_bv_pay_init (GstRTPBVPay * rtpbvpay, GstRTPBVPayClass * klass)
|
||||
{
|
||||
GstBaseRTPPayload *basertppayload;
|
||||
GstBaseRTPAudioPayload *basertpaudiopayload;
|
||||
|
||||
basertppayload = GST_BASE_RTP_PAYLOAD (rtpbvpay);
|
||||
basertpaudiopayload = GST_BASE_RTP_AUDIO_PAYLOAD (rtpbvpay);
|
||||
|
||||
rtpbvpay->mode = -1;
|
||||
|
|
|
@ -190,10 +190,6 @@ gst_rtp_g722_pay_getcaps (GstBaseRTPPayload * rtppayload, GstPad * pad)
|
|||
|
||||
if (otherpadcaps) {
|
||||
if (!gst_caps_is_empty (otherpadcaps)) {
|
||||
GstStructure *structure;
|
||||
|
||||
structure = gst_caps_get_structure (otherpadcaps, 0);
|
||||
|
||||
gst_caps_set_simple (caps, "channels", G_TYPE_INT, 1, NULL);
|
||||
gst_caps_set_simple (caps, "rate", G_TYPE_INT, 16000, NULL);
|
||||
}
|
||||
|
|
|
@ -183,7 +183,6 @@ gst_rtp_gst_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf)
|
|||
GstBuffer *subbuf, *outbuf = NULL;
|
||||
gint payload_len;
|
||||
guint8 *payload;
|
||||
guint16 frag_offset;
|
||||
guint CV;
|
||||
|
||||
rtpgstdepay = GST_RTP_GST_DEPAY (depayload);
|
||||
|
@ -210,8 +209,9 @@ gst_rtp_gst_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf)
|
|||
* | Frag_offset |
|
||||
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
*/
|
||||
frag_offset =
|
||||
(payload[4] << 24) | (payload[5] << 16) | (payload[6] << 8) | payload[7];
|
||||
/* frag_offset =
|
||||
* (payload[4] << 24) | (payload[5] << 16) | (payload[6] << 8) | payload[7];
|
||||
*/
|
||||
|
||||
/* subbuffer skipping the 8 header bytes */
|
||||
subbuf = gst_rtp_buffer_get_payload_subbuffer (buf, 8, -1);
|
||||
|
|
|
@ -68,8 +68,6 @@ GST_STATIC_PAD_TEMPLATE ("src",
|
|||
"clock-rate = (int) 90000, " "encoding-name = (string) \"X-GST\"")
|
||||
);
|
||||
|
||||
static void gst_rtp_gst_pay_finalize (GObject * object);
|
||||
|
||||
static gboolean gst_rtp_gst_pay_setcaps (GstBaseRTPPayload * payload,
|
||||
GstCaps * caps);
|
||||
static GstFlowReturn gst_rtp_gst_pay_handle_buffer (GstBaseRTPPayload * payload,
|
||||
|
@ -96,14 +94,10 @@ GST_BOILERPLATE (GstRtpGSTPay, gst_rtp_gst_pay, GstBaseRTPPayload,
|
|||
static void
|
||||
gst_rtp_gst_pay_class_init (GstRtpGSTPayClass * klass)
|
||||
{
|
||||
GObjectClass *gobject_class;
|
||||
GstBaseRTPPayloadClass *gstbasertppayload_class;
|
||||
|
||||
gobject_class = (GObjectClass *) klass;
|
||||
gstbasertppayload_class = (GstBaseRTPPayloadClass *) klass;
|
||||
|
||||
gobject_class->finalize = gst_rtp_gst_pay_finalize;
|
||||
|
||||
gstbasertppayload_class->set_caps = gst_rtp_gst_pay_setcaps;
|
||||
gstbasertppayload_class->handle_buffer = gst_rtp_gst_pay_handle_buffer;
|
||||
}
|
||||
|
@ -113,16 +107,6 @@ gst_rtp_gst_pay_init (GstRtpGSTPay * rtpgstpay, GstRtpGSTPayClass * klass)
|
|||
{
|
||||
}
|
||||
|
||||
static void
|
||||
gst_rtp_gst_pay_finalize (GObject * object)
|
||||
{
|
||||
GstRtpGSTPay *rtpgstpay;
|
||||
|
||||
rtpgstpay = GST_RTP_GST_PAY (object);
|
||||
|
||||
G_OBJECT_CLASS (parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gst_rtp_gst_pay_setcaps (GstBaseRTPPayload * payload, GstCaps * caps)
|
||||
{
|
||||
|
|
|
@ -134,11 +134,9 @@ static void
|
|||
gst_rtp_j2k_pay_class_init (GstRtpJ2KPayClass * klass)
|
||||
{
|
||||
GObjectClass *gobject_class;
|
||||
GstElementClass *gstelement_class;
|
||||
GstBaseRTPPayloadClass *gstbasertppayload_class;
|
||||
|
||||
gobject_class = (GObjectClass *) klass;
|
||||
gstelement_class = (GstElementClass *) klass;
|
||||
gstbasertppayload_class = (GstBaseRTPPayloadClass *) klass;
|
||||
|
||||
gobject_class->set_property = gst_rtp_j2k_pay_set_property;
|
||||
|
|
|
@ -451,11 +451,8 @@ gst_rtp_mp4g_pay_flush (GstRtpMP4GPay * rtpmp4gpay)
|
|||
guint avail, total;
|
||||
GstBuffer *outbuf;
|
||||
GstFlowReturn ret;
|
||||
gboolean fragmented;
|
||||
guint mtu;
|
||||
|
||||
fragmented = FALSE;
|
||||
|
||||
/* the data available in the adapter is either smaller
|
||||
* than the MTU or bigger. In the case it is smaller, the complete
|
||||
* adapter contents can be put in one packet. In the case the
|
||||
|
@ -544,7 +541,6 @@ gst_rtp_mp4g_pay_flush (GstRtpMP4GPay * rtpmp4gpay)
|
|||
ret = gst_basertppayload_push (GST_BASE_RTP_PAYLOAD (rtpmp4gpay), outbuf);
|
||||
|
||||
avail -= payload_len;
|
||||
fragmented = TRUE;
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
|
|
@ -141,8 +141,6 @@ gst_rtp_mp4v_pay_class_init (GstRtpMP4VPayClass * klass)
|
|||
static void
|
||||
gst_rtp_mp4v_pay_init (GstRtpMP4VPay * rtpmp4vpay, GstRtpMP4VPayClass * klass)
|
||||
{
|
||||
GstPad *sinkpad;
|
||||
|
||||
rtpmp4vpay->adapter = gst_adapter_new ();
|
||||
rtpmp4vpay->rate = 90000;
|
||||
rtpmp4vpay->profile = 1;
|
||||
|
@ -153,8 +151,6 @@ gst_rtp_mp4v_pay_init (GstRtpMP4VPay * rtpmp4vpay, GstRtpMP4VPayClass * klass)
|
|||
rtpmp4vpay->last_config = -1;
|
||||
|
||||
rtpmp4vpay->config = NULL;
|
||||
|
||||
sinkpad = GST_BASE_RTP_PAYLOAD_SINKPAD (rtpmp4vpay);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -127,8 +127,6 @@ gst_rtp_mpa_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf)
|
|||
|
||||
{
|
||||
gint payload_len;
|
||||
guint8 *payload;
|
||||
guint16 frag_offset;
|
||||
gboolean marker;
|
||||
|
||||
payload_len = gst_rtp_buffer_get_payload_len (buf);
|
||||
|
@ -136,7 +134,6 @@ gst_rtp_mpa_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf)
|
|||
if (payload_len <= 4)
|
||||
goto empty_packet;
|
||||
|
||||
payload = gst_rtp_buffer_get_payload (buf);
|
||||
/* strip off header
|
||||
*
|
||||
* 0 1 2 3
|
||||
|
@ -145,7 +142,7 @@ gst_rtp_mpa_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf)
|
|||
* | MBZ | Frag_offset |
|
||||
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
*/
|
||||
frag_offset = (payload[2] << 8) | payload[3];
|
||||
/* frag_offset = (payload[2] << 8) | payload[3]; */
|
||||
|
||||
/* subbuffer skipping the 4 header bytes */
|
||||
outbuf = gst_rtp_buffer_get_payload_subbuffer (buf, 4, -1);
|
||||
|
|
|
@ -118,7 +118,7 @@ static void
|
|||
gst_rtp_qcelp_depay_init (GstRtpQCELPDepay * rtpqcelpdepay,
|
||||
GstRtpQCELPDepayClass * klass)
|
||||
{
|
||||
GstBaseRTPDepayload *depayload;
|
||||
GstBaseRTPDepayload G_GNUC_UNUSED *depayload;
|
||||
|
||||
depayload = GST_BASE_RTP_DEPAYLOAD (rtpqcelpdepay);
|
||||
}
|
||||
|
@ -144,11 +144,8 @@ static gboolean
|
|||
gst_rtp_qcelp_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps)
|
||||
{
|
||||
GstCaps *srccaps;
|
||||
GstRtpQCELPDepay *rtpqcelpdepay;
|
||||
gboolean res;
|
||||
|
||||
rtpqcelpdepay = GST_RTP_QCELP_DEPAY (depayload);
|
||||
|
||||
srccaps = gst_caps_new_simple ("audio/qcelp",
|
||||
"channels", G_TYPE_INT, 1, "rate", G_TYPE_INT, 8000, NULL);
|
||||
res = gst_pad_set_caps (GST_BASE_RTP_DEPAYLOAD_SRCPAD (depayload), srccaps);
|
||||
|
@ -263,7 +260,7 @@ gst_rtp_qcelp_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf)
|
|||
GstClockTime timestamp;
|
||||
guint payload_len, offset, index;
|
||||
guint8 *payload;
|
||||
guint RR, LLL, NNN;
|
||||
guint LLL, NNN;
|
||||
|
||||
depay = GST_RTP_QCELP_DEPAY (depayload);
|
||||
|
||||
|
@ -281,7 +278,7 @@ gst_rtp_qcelp_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf)
|
|||
* |RR | LLL | NNN |
|
||||
* +-+-+-+-+-+-+-+-+
|
||||
*/
|
||||
RR = payload[0] >> 6;
|
||||
/* RR = payload[0] >> 6; */
|
||||
LLL = (payload[0] & 0x38) >> 3;
|
||||
NNN = (payload[0] & 0x07);
|
||||
|
||||
|
|
|
@ -1144,10 +1144,8 @@ static gboolean
|
|||
gst_rtp_jitter_buffer_sink_rtcp_event (GstPad * pad, GstEvent * event)
|
||||
{
|
||||
GstRtpJitterBuffer *jitterbuffer;
|
||||
GstRtpJitterBufferPrivate *priv;
|
||||
|
||||
jitterbuffer = GST_RTP_JITTER_BUFFER (gst_pad_get_parent (pad));
|
||||
priv = jitterbuffer->priv;
|
||||
|
||||
GST_DEBUG_OBJECT (jitterbuffer, "received %s", GST_EVENT_TYPE_NAME (event));
|
||||
|
||||
|
|
|
@ -1597,7 +1597,6 @@ gst_rtp_session_chain_recv_rtcp (GstPad * pad, GstBuffer * buffer)
|
|||
GstRtpSessionPrivate *priv;
|
||||
GstClockTime current_time;
|
||||
guint64 ntpnstime;
|
||||
GstFlowReturn ret;
|
||||
|
||||
rtpsession = GST_RTP_SESSION (gst_pad_get_parent (pad));
|
||||
priv = rtpsession->priv;
|
||||
|
@ -1607,12 +1606,11 @@ gst_rtp_session_chain_recv_rtcp (GstPad * pad, GstBuffer * buffer)
|
|||
current_time = gst_clock_get_time (priv->sysclock);
|
||||
get_current_times (rtpsession, NULL, &ntpnstime);
|
||||
|
||||
ret =
|
||||
rtp_session_process_rtcp (priv->session, buffer, current_time, ntpnstime);
|
||||
rtp_session_process_rtcp (priv->session, buffer, current_time, ntpnstime);
|
||||
|
||||
gst_object_unref (rtpsession);
|
||||
|
||||
return GST_FLOW_OK;
|
||||
return GST_FLOW_OK; /* always return OK */
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
|
Loading…
Reference in a new issue