mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
rtp: mark constant tables as const
This commit is contained in:
parent
2953801a5f
commit
22560c473d
6 changed files with 17 additions and 17 deletions
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
};
|
||||
|
|
|
@ -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
|
||||
};
|
||||
|
|
|
@ -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
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue