mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-05 17:09:48 +00:00
Constify some static arrays everywhere
This commit is contained in:
parent
d854cfff9d
commit
d5aab81a77
11 changed files with 21 additions and 19 deletions
|
@ -229,8 +229,8 @@ gst_smpte_time_code_get_timestamp (GstSMPTETimeCodeSystem system,
|
||||||
g_return_val_if_fail (time_code != NULL, GST_CLOCK_TIME_NONE);
|
g_return_val_if_fail (time_code != NULL, GST_CLOCK_TIME_NONE);
|
||||||
|
|
||||||
if (gst_smpte_time_code_get_frame_number (system, &frame_number, time_code)) {
|
if (gst_smpte_time_code_get_frame_number (system, &frame_number, time_code)) {
|
||||||
static int framerate_n[3] = { 3000, 25, 24 };
|
static const int framerate_n[3] = { 3000, 25, 24 };
|
||||||
static int framerate_d[3] = { 1001, 1, 1 };
|
static const int framerate_d[3] = { 1001, 1, 1 };
|
||||||
|
|
||||||
return gst_util_uint64_scale (frame_number,
|
return gst_util_uint64_scale (frame_number,
|
||||||
GST_SECOND * framerate_d[system], framerate_n[system]);
|
GST_SECOND * framerate_d[system], framerate_n[system]);
|
||||||
|
|
|
@ -113,7 +113,8 @@ gboolean
|
||||||
Fam_CheckType (GstBuffer * buf)
|
Fam_CheckType (GstBuffer * buf)
|
||||||
{
|
{
|
||||||
gchar *data;
|
gchar *data;
|
||||||
static unsigned char FARSIG[4 + 3] = { 'F', 'A', 'R', 0xfe, 13, 10, 26 };
|
static const unsigned char FARSIG[4 + 3] =
|
||||||
|
{ 'F', 'A', 'R', 0xfe, 13, 10, 26 };
|
||||||
|
|
||||||
data = GST_BUFFER_DATA (buf);
|
data = GST_BUFFER_DATA (buf);
|
||||||
|
|
||||||
|
|
|
@ -110,7 +110,7 @@ static void
|
||||||
gst_audio_dynamic_transform_soft_knee_expander_float (GstAudioDynamic * filter,
|
gst_audio_dynamic_transform_soft_knee_expander_float (GstAudioDynamic * filter,
|
||||||
gfloat * data, guint num_samples);
|
gfloat * data, guint num_samples);
|
||||||
|
|
||||||
static GstAudioDynamicProcessFunc process_functions[] = {
|
static const GstAudioDynamicProcessFunc process_functions[] = {
|
||||||
(GstAudioDynamicProcessFunc)
|
(GstAudioDynamicProcessFunc)
|
||||||
gst_audio_dynamic_transform_hard_knee_compressor_int,
|
gst_audio_dynamic_transform_hard_knee_compressor_int,
|
||||||
(GstAudioDynamicProcessFunc)
|
(GstAudioDynamicProcessFunc)
|
||||||
|
|
|
@ -139,7 +139,7 @@ static GstFlowReturn gst_audio_panorama_transform (GstBaseTransform * base,
|
||||||
|
|
||||||
|
|
||||||
/* Table with processing functions: [channels][format][method] */
|
/* Table with processing functions: [channels][format][method] */
|
||||||
static GstAudioPanoramaProcessFunc panorama_process_functions[2][2][2] = {
|
static const GstAudioPanoramaProcessFunc panorama_process_functions[2][2][2] = {
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
(GstAudioPanoramaProcessFunc) gst_audio_panorama_m2s_int,
|
(GstAudioPanoramaProcessFunc) gst_audio_panorama_m2s_int,
|
||||||
|
|
|
@ -131,7 +131,7 @@ enum
|
||||||
#define RATIO 0.95
|
#define RATIO 0.95
|
||||||
|
|
||||||
static guint32 palettes[COLORS * PATTERN];
|
static guint32 palettes[COLORS * PATTERN];
|
||||||
static gint swap_tab[] = { 2, 1, 0, 3 };
|
static const gint swap_tab[] = { 2, 1, 0, 3 };
|
||||||
|
|
||||||
#define gst_radioactv_parent_class parent_class
|
#define gst_radioactv_parent_class parent_class
|
||||||
G_DEFINE_TYPE (GstRadioacTV, gst_radioactv, GST_TYPE_VIDEO_FILTER);
|
G_DEFINE_TYPE (GstRadioacTV, gst_radioactv, GST_TYPE_VIDEO_FILTER);
|
||||||
|
|
|
@ -4704,7 +4704,7 @@ build_uuid_xmp_atom (GstBuffer * xmp_data)
|
||||||
{
|
{
|
||||||
AtomUUID *uuid;
|
AtomUUID *uuid;
|
||||||
gsize size;
|
gsize size;
|
||||||
static guint8 xmp_uuid[] = { 0xBE, 0x7A, 0xCF, 0xCB,
|
static const guint8 xmp_uuid[] = { 0xBE, 0x7A, 0xCF, 0xCB,
|
||||||
0x97, 0xA9, 0x42, 0xE8,
|
0x97, 0xA9, 0x42, 0xE8,
|
||||||
0x9C, 0x71, 0x99, 0x94,
|
0x9C, 0x71, 0x99, 0x94,
|
||||||
0x91, 0xE3, 0xAF, 0xAC
|
0x91, 0xE3, 0xAF, 0xAC
|
||||||
|
|
|
@ -284,14 +284,15 @@ gst_qt_mux_map_format_to_header (GstQTMuxFormat format, GstBuffer ** _prefix,
|
||||||
guint32 * _major, guint32 * _version, GList ** _compatible, AtomMOOV * moov,
|
guint32 * _major, guint32 * _version, GList ** _compatible, AtomMOOV * moov,
|
||||||
GstClockTime longest_chunk, gboolean faststart)
|
GstClockTime longest_chunk, gboolean faststart)
|
||||||
{
|
{
|
||||||
static guint32 qt_brands[] = { 0 };
|
static const guint32 qt_brands[] = { 0 };
|
||||||
static guint32 mp4_brands[] = { FOURCC_mp41, FOURCC_isom, FOURCC_iso2, 0 };
|
static const guint32 mp4_brands[] =
|
||||||
static guint32 isml_brands[] = { FOURCC_iso2, 0 };
|
{ FOURCC_mp41, FOURCC_isom, FOURCC_iso2, 0 };
|
||||||
static guint32 gpp_brands[] = { FOURCC_isom, FOURCC_iso2, 0 };
|
static const guint32 isml_brands[] = { FOURCC_iso2, 0 };
|
||||||
static guint32 mjp2_brands[] = { FOURCC_isom, FOURCC_iso2, 0 };
|
static const guint32 gpp_brands[] = { FOURCC_isom, FOURCC_iso2, 0 };
|
||||||
static guint8 mjp2_prefix[] =
|
static const guint32 mjp2_brands[] = { FOURCC_isom, FOURCC_iso2, 0 };
|
||||||
|
static const guint8 mjp2_prefix[] =
|
||||||
{ 0, 0, 0, 12, 'j', 'P', ' ', ' ', 0x0D, 0x0A, 0x87, 0x0A };
|
{ 0, 0, 0, 12, 'j', 'P', ' ', ' ', 0x0D, 0x0A, 0x87, 0x0A };
|
||||||
guint32 *comp = NULL;
|
const guint32 *comp = NULL;
|
||||||
guint32 major = 0, version = 0;
|
guint32 major = 0, version = 0;
|
||||||
GstBuffer *prefix = NULL;
|
GstBuffer *prefix = NULL;
|
||||||
GList *result = NULL;
|
GList *result = NULL;
|
||||||
|
|
|
@ -2269,12 +2269,12 @@ qtdemux_handle_xmp_taglist (GstQTDemux * qtdemux, GstTagList * taglist)
|
||||||
static void
|
static void
|
||||||
qtdemux_parse_uuid (GstQTDemux * qtdemux, const guint8 * buffer, gint length)
|
qtdemux_parse_uuid (GstQTDemux * qtdemux, const guint8 * buffer, gint length)
|
||||||
{
|
{
|
||||||
static guint8 xmp_uuid[] = { 0xBE, 0x7A, 0xCF, 0xCB,
|
static const guint8 xmp_uuid[] = { 0xBE, 0x7A, 0xCF, 0xCB,
|
||||||
0x97, 0xA9, 0x42, 0xE8,
|
0x97, 0xA9, 0x42, 0xE8,
|
||||||
0x9C, 0x71, 0x99, 0x94,
|
0x9C, 0x71, 0x99, 0x94,
|
||||||
0x91, 0xE3, 0xAF, 0xAC
|
0x91, 0xE3, 0xAF, 0xAC
|
||||||
};
|
};
|
||||||
static guint8 playready_uuid[] = {
|
static const guint8 playready_uuid[] = {
|
||||||
0xd0, 0x8a, 0x4f, 0x18, 0x10, 0xf3, 0x4a, 0x82,
|
0xd0, 0x8a, 0x4f, 0x18, 0x10, 0xf3, 0x4a, 0x82,
|
||||||
0xb6, 0xc8, 0x32, 0xd8, 0xab, 0xa1, 0x83, 0xd3
|
0xb6, 0xc8, 0x32, 0xd8, 0xab, 0xa1, 0x83, 0xd3
|
||||||
};
|
};
|
||||||
|
|
|
@ -5853,7 +5853,7 @@ no_setup:
|
||||||
|
|
||||||
/* masks to be kept in sync with the hardcoded protocol order of preference
|
/* masks to be kept in sync with the hardcoded protocol order of preference
|
||||||
* in code below */
|
* in code below */
|
||||||
static guint protocol_masks[] = {
|
static const guint protocol_masks[] = {
|
||||||
GST_RTSP_LOWER_TRANS_UDP,
|
GST_RTSP_LOWER_TRANS_UDP,
|
||||||
GST_RTSP_LOWER_TRANS_UDP_MCAST,
|
GST_RTSP_LOWER_TRANS_UDP_MCAST,
|
||||||
GST_RTSP_LOWER_TRANS_TCP,
|
GST_RTSP_LOWER_TRANS_TCP,
|
||||||
|
|
|
@ -110,7 +110,7 @@ gst_videotemplate_get_type (void)
|
||||||
return videotemplate_type;
|
return videotemplate_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstVideofilterFormat gst_videotemplate_formats[] = {
|
static const GstVideofilterFormat gst_videotemplate_formats[] = {
|
||||||
{"I420", 12, gst_videotemplate_planar411,},
|
{"I420", 12, gst_videotemplate_planar411,},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -2447,7 +2447,7 @@ gst_wavparse_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||||
static const GstFormat *
|
static const GstFormat *
|
||||||
gst_wavparse_get_formats (GstPad * pad)
|
gst_wavparse_get_formats (GstPad * pad)
|
||||||
{
|
{
|
||||||
static GstFormat formats[] = {
|
static const GstFormat formats[] = {
|
||||||
GST_FORMAT_TIME,
|
GST_FORMAT_TIME,
|
||||||
GST_FORMAT_BYTES,
|
GST_FORMAT_BYTES,
|
||||||
GST_FORMAT_DEFAULT, /* a "frame", ie a set of samples per Hz */
|
GST_FORMAT_DEFAULT, /* a "frame", ie a set of samples per Hz */
|
||||||
|
|
Loading…
Reference in a new issue