summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim.muller@collabora.co.uk>2010-09-06 14:40:02 +0100
committerTim-Philipp Müller <tim.muller@collabora.co.uk>2010-09-06 14:40:02 +0100
commit22560c473d8b1c2ed345afdbae87a9dbf5690dd0 (patch)
tree631fa3e0917392de1081b5ea49305a2ab6f0fea9
parent2953801a5f49d80b0deaaafb06aa6fb8f9891f80 (diff)
rtp: mark constant tables as const
-rw-r--r--gst/rtp/gstrtpamrdepay.c6
-rw-r--r--gst/rtp/gstrtpamrpay.c6
-rw-r--r--gst/rtp/gstrtph263pay.c16
-rw-r--r--gst/rtp/gstrtpmp4apay.c2
-rw-r--r--gst/rtp/gstrtpmp4gpay.c2
-rw-r--r--gst/rtp/gstrtpqcelpdepay.c2
6 files changed, 17 insertions, 17 deletions
diff --git a/gst/rtp/gstrtpamrdepay.c b/gst/rtp/gstrtpamrdepay.c
index 5a3c7f5f9..c08c40688 100644
--- a/gst/rtp/gstrtpamrdepay.c
+++ b/gst/rtp/gstrtpamrdepay.c
@@ -260,12 +260,12 @@ invalid_mode:
}
/* -1 is invalid */
-static gint nb_frame_size[16] = {
+static const gint nb_frame_size[16] = {
12, 13, 15, 17, 19, 20, 26, 31,
5, -1, -1, -1, -1, -1, -1, 0
};
-static gint wb_frame_size[16] = {
+static const gint wb_frame_size[16] = {
17, 23, 32, 36, 40, 46, 50, 58,
60, 5, -1, -1, -1, -1, -1, 0
};
@@ -274,9 +274,9 @@ static GstBuffer *
gst_rtp_amr_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf)
{
GstRtpAMRDepay *rtpamrdepay;
+ const gint *frame_size;
GstBuffer *outbuf = NULL;
gint payload_len;
- gint *frame_size;
rtpamrdepay = GST_RTP_AMR_DEPAY (depayload);
diff --git a/gst/rtp/gstrtpamrpay.c b/gst/rtp/gstrtpamrpay.c
index ded5cfe98..07ebd0fa3 100644
--- a/gst/rtp/gstrtpamrpay.c
+++ b/gst/rtp/gstrtpamrpay.c
@@ -217,12 +217,12 @@ gst_rtp_amr_pay_recalc_rtp_time (GstRtpAMRPay * rtpamrpay,
}
/* -1 is invalid */
-static gint nb_frame_size[16] = {
+static const gint nb_frame_size[16] = {
12, 13, 15, 17, 19, 20, 26, 31,
5, -1, -1, -1, -1, -1, -1, 0
};
-static gint wb_frame_size[16] = {
+static const gint wb_frame_size[16] = {
17, 23, 32, 36, 40, 46, 50, 58,
60, 5, -1, -1, -1, -1, -1, 0
};
@@ -232,6 +232,7 @@ gst_rtp_amr_pay_handle_buffer (GstBaseRTPPayload * basepayload,
GstBuffer * buffer)
{
GstRtpAMRPay *rtpamrpay;
+ const gint *frame_size;
GstFlowReturn ret;
guint size, payload_len;
GstBuffer *outbuf;
@@ -240,7 +241,6 @@ gst_rtp_amr_pay_handle_buffer (GstBaseRTPPayload * basepayload,
guint packet_len, mtu;
gint i, num_packets, num_nonempty_packets;
gint amr_len;
- gint *frame_size;
gboolean sid = FALSE;
rtpamrpay = GST_RTP_AMR_PAY (basepayload);
diff --git a/gst/rtp/gstrtph263pay.c b/gst/rtp/gstrtph263pay.c
index adf6eef3e..5ce62afc9 100644
--- a/gst/rtp/gstrtph263pay.c
+++ b/gst/rtp/gstrtph263pay.c
@@ -49,7 +49,7 @@ typedef enum
GST_H263_PAYLOAD_PICTURE_FORMAT_PLUS = 7
} GstRtpH263PayPictureFormat;
-static guint format_props[8][2] = { {254, 254},
+static const guint format_props[8][2] = { {254, 254},
{6, 8},
{9, 11},
{18, 22},
@@ -64,7 +64,7 @@ static guint format_props[8][2] = { {254, 254},
*/
#define MCBPC_I_LEN 9
#define MCBPC_I_WID 6
-static guint32 mcbpc_I[9][6] = {
+static const guint32 mcbpc_I[9][6] = {
{0x8000, 0x8000, 1, 0, 0, 3},
{0x2000, 0xe000, 3, 0, 1, 3},
{0x4000, 0xe000, 3, 1, 0, 3},
@@ -81,7 +81,7 @@ static guint32 mcbpc_I[9][6] = {
*/
#define MCBPC_P_LEN 21
#define MCBPC_P_WID 6
-static guint16 mcbpc_P[21][6] = {
+static const guint16 mcbpc_P[21][6] = {
{0x8000, 0x8000, 1, 0, 0, 0},
{0x3000, 0xf000, 4, 0, 1, 0},
{0x2000, 0xf000, 4, 1, 0, 0},
@@ -110,7 +110,7 @@ static guint16 mcbpc_P[21][6] = {
*/
#define CBPY_LEN 16
#define CBPY_WID 7
-static guint8 cbpy_I[16][7] = {
+static const guint8 cbpy_I[16][7] = {
{0x30, 0xf0, 4, 0, 0, 0, 0},
{0x28, 0xf8, 5, 0, 0, 0, 1},
{0x20, 0xf8, 5, 0, 0, 1, 0},
@@ -132,7 +132,7 @@ static guint8 cbpy_I[16][7] = {
/*
* P-frame CBPY (code, mask, nbits, Y0, Y1, Y2, Y3)
*/
-static guint8 cbpy_P[16][7] = {
+static const guint8 cbpy_P[16][7] = {
{0x30, 0xf0, 4, 1, 1, 1, 1},
{0x28, 0xf8, 5, 1, 1, 1, 0},
{0x20, 0xf8, 5, 1, 1, 0, 1},
@@ -156,7 +156,7 @@ static guint8 cbpy_P[16][7] = {
*/
#define TCOEF_LEN 103
#define TCOEF_WID 6
-static guint16 tcoef[103][6] = {
+static const guint16 tcoef[103][6] = {
{0x8000, 0xc000, 3, 0, 0, 1},
{0xf000, 0xf000, 5, 0, 0, 2},
{0x5400, 0xfc00, 7, 0, 0, 3},
@@ -267,7 +267,7 @@ static guint16 tcoef[103][6] = {
*/
#define MVD_LEN 64
#define MVD_WID 5
-static guint16 mvd[64][5] = {
+static const guint16 mvd[64][5] = {
{0x0028, 0xfff8, 13, 0x0060, 0x0020},
{0x0038, 0xfff8, 13, 0x0061, 0x0021},
{0x0050, 0xfff0, 12, 0x0062, 0x0022},
@@ -785,7 +785,7 @@ gst_rtp_h263_pay_decode_mcbpc_P (guint32 value)
* decode CBPY and return index in table or -1 if not found
*/
static gint
-gst_rtp_h263_pay_decode_cbpy (guint32 value, guint8 cbpy_table[16][7])
+gst_rtp_h263_pay_decode_cbpy (guint32 value, const guint8 cbpy_table[16][7])
{
gint i;
diff --git a/gst/rtp/gstrtpmp4apay.c b/gst/rtp/gstrtpmp4apay.c
index 32360f03a..b30b3c955 100644
--- a/gst/rtp/gstrtpmp4apay.c
+++ b/gst/rtp/gstrtpmp4apay.c
@@ -127,7 +127,7 @@ gst_rtp_mp4a_pay_finalize (GObject * object)
G_OBJECT_CLASS (parent_class)->finalize (object);
}
-static unsigned sampling_table[16] = {
+static const unsigned int sampling_table[16] = {
96000, 88200, 64000, 48000, 44100, 32000, 24000, 22050,
16000, 12000, 11025, 8000, 7350, 0, 0, 0
};
diff --git a/gst/rtp/gstrtpmp4gpay.c b/gst/rtp/gstrtpmp4gpay.c
index e2e77ac6f..cd988c80c 100644
--- a/gst/rtp/gstrtpmp4gpay.c
+++ b/gst/rtp/gstrtpmp4gpay.c
@@ -168,7 +168,7 @@ gst_rtp_mp4g_pay_finalize (GObject * object)
G_OBJECT_CLASS (parent_class)->finalize (object);
}
-static unsigned sampling_table[16] = {
+static const unsigned int sampling_table[16] = {
96000, 88200, 64000, 48000, 44100, 32000, 24000, 22050,
16000, 12000, 11025, 8000, 7350, 0, 0, 0
};
diff --git a/gst/rtp/gstrtpqcelpdepay.c b/gst/rtp/gstrtpqcelpdepay.c
index f370c9ff6..5499e307c 100644
--- a/gst/rtp/gstrtpqcelpdepay.c
+++ b/gst/rtp/gstrtpqcelpdepay.c
@@ -157,7 +157,7 @@ gst_rtp_qcelp_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps)
return res;
}
-static gint frame_size[16] = {
+static const gint frame_size[16] = {
1, 4, 8, 17, 35, -8, 0, 0,
0, 0, 0, 0, 0, 0, 1, 0
};