Add -Wwrite-strings to configure

Fixes for the code included
This commit is contained in:
Benjamin Otte 2010-03-15 22:49:53 +01:00
parent 5e21fa5e0e
commit 3bd4aa26ff
34 changed files with 170 additions and 166 deletions

View file

@ -308,10 +308,10 @@ dnl set location of plugin directory
AG_GST_SET_PLUGINDIR
dnl define an ERROR_CFLAGS Makefile variable
AG_GST_SET_ERROR_CFLAGS($GST_GIT, [-Wmissing-declarations -Wmissing-prototypes -Wredundant-decls -Wundef])
AG_GST_SET_ERROR_CFLAGS($GST_GIT, [-Wmissing-declarations -Wmissing-prototypes -Wredundant-decls -Wundef -Wwrite-strings])
dnl define an ERROR_CXXFLAGS Makefile variable
AG_GST_SET_ERROR_CXXFLAGS($GST_GIT, [-Wmissing-declarations -Wmissing-prototypes -Wredundant-decls -Wundef])
AG_GST_SET_ERROR_CXXFLAGS($GST_GIT, [-Wmissing-declarations -Wmissing-prototypes -Wredundant-decls -Wundef -Wwrite-strings])
dnl define correct level for debugging messages
AG_GST_SET_LEVEL_DEFAULT($GST_GIT)

View file

@ -683,10 +683,11 @@ gst_visual_chain (GstPad * pad, GstBuffer * buffer)
visual_audio_samplepool_input_channel (visual->audio->samplepool,
lbuf,
rate, VISUAL_AUDIO_SAMPLE_FORMAT_S16, VISUAL_AUDIO_CHANNEL_LEFT);
visual_audio_samplepool_input_channel (visual->audio->samplepool,
rbuf,
rate, VISUAL_AUDIO_SAMPLE_FORMAT_S16, VISUAL_AUDIO_CHANNEL_RIGHT);
rate, VISUAL_AUDIO_SAMPLE_FORMAT_S16,
(char *) VISUAL_AUDIO_CHANNEL_LEFT);
visual_audio_samplepool_input_channel (visual->audio->samplepool, rbuf,
rate, VISUAL_AUDIO_SAMPLE_FORMAT_S16,
(char *) VISUAL_AUDIO_CHANNEL_RIGHT);
visual_object_unref (VISUAL_OBJECT (lbuf));
visual_object_unref (VISUAL_OBJECT (rbuf));

View file

@ -433,7 +433,7 @@ theora_enc_get_supported_formats (void)
struct
{
th_pixel_fmt pixelformat;
char *fourcc;
const char *fourcc;
} formats[] = {
{
TH_PF_420, "I420"}, {

View file

@ -1345,7 +1345,7 @@ gst_app_sink_uri_get_type (void)
static gchar **
gst_app_sink_uri_get_protocols (void)
{
static gchar *protocols[] = { "appsink", NULL };
static gchar *protocols[] = { (char *) "appsink", NULL };
return protocols;
}

View file

@ -1639,7 +1639,7 @@ gst_app_src_uri_get_type (void)
static gchar **
gst_app_src_uri_get_protocols (void)
{
static gchar *protocols[] = { "appsrc", NULL };
static gchar *protocols[] = { (char *) "appsrc", NULL };
return protocols;
}

View file

@ -922,7 +922,7 @@ gst_cdda_base_src_uri_get_type (void)
static gchar **
gst_cdda_base_src_uri_get_protocols (void)
{
static gchar *protocols[] = { "cdda", NULL };
static gchar *protocols[] = { (char *) "cdda", NULL };
return protocols;
}

View file

@ -514,7 +514,7 @@ gst_mixer_volume_changed (GstMixer * mixer,
*/
void
gst_mixer_option_changed (GstMixer * mixer,
GstMixerOptions * opts, gchar * value)
GstMixerOptions * opts, const gchar * value)
{
GstStructure *s;
GstMessage *m;

View file

@ -197,7 +197,7 @@ void gst_mixer_volume_changed (GstMixer *mixer,
gint *volumes);
void gst_mixer_option_changed (GstMixer *mixer,
GstMixerOptions *opts,
gchar *value);
const gchar *value);
void gst_mixer_mixer_changed (GstMixer *mixer);

View file

@ -208,7 +208,7 @@ static struct rtsp_header rtsp_headers[] = {
};
#define DEF_STATUS(c, t) \
g_hash_table_insert (statuses, GUINT_TO_POINTER(c), t)
g_hash_table_insert (statuses, GUINT_TO_POINTER(c), (gpointer) t)
static GHashTable *
rtsp_init_status (void)

View file

@ -329,10 +329,10 @@ gchar *
gst_rtsp_url_get_request_uri (const GstRTSPUrl * url)
{
gchar *uri;
gchar *pre_host;
gchar *post_host;
gchar *pre_query;
gchar *query;
const gchar *pre_host;
const gchar *post_host;
const gchar *pre_query;
const gchar *query;
g_return_val_if_fail (url != NULL, NULL);

View file

@ -291,7 +291,7 @@ gst_tag_freeform_string_to_utf8 (const gchar * data, gint size,
/* check for and use byte-order-mark for UTF-16/32 cases */
if (size >= 2) {
gchar *c = NULL;
const gchar *c = NULL;
gint prefix, ssize;
if (size >= 4) {

View file

@ -537,7 +537,7 @@ check_queue_event (GstPad * pad, GstEvent * event, gpointer user_data)
switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_EOS:
GST_DEBUG ("EOS event, mark EOS");
g_object_set_data (G_OBJECT (queue), "eos", "1");
g_object_set_data (G_OBJECT (queue), "eos", GINT_TO_POINTER (1));
break;
case GST_EVENT_FLUSH_STOP:
GST_DEBUG ("FLUSH_STOP event, remove EOS");
@ -656,7 +656,6 @@ static void
queue_threshold_reached (GstElement * queue, GstPlayBaseBin * play_base_bin)
{
GstPlayBaseGroup *group;
gpointer data;
gint n;
GST_DEBUG_OBJECT (play_base_bin, "running signal received from queue %s",
@ -666,8 +665,7 @@ queue_threshold_reached (GstElement * queue, GstPlayBaseBin * play_base_bin)
g_signal_handlers_disconnect_by_func (queue,
(gpointer) queue_threshold_reached, play_base_bin);
data = g_object_get_data (G_OBJECT (queue), "eos");
if (data) {
if (g_object_get_data (G_OBJECT (queue), "eos")) {
GST_DEBUG_OBJECT (play_base_bin, "disable min threshold time, we are EOS");
g_object_set (queue, "min-threshold-time", (guint64) 0, NULL);
} else {
@ -2008,7 +2006,7 @@ make_decoder (GstPlayBaseBin * play_base_bin)
G_CALLBACK (no_more_pads), play_base_bin);
g_signal_connect (G_OBJECT (decoder),
"unknown-type", G_CALLBACK (unknown_type), play_base_bin);
g_object_set_data (G_OBJECT (decoder), "pending", "1");
g_object_set_data (G_OBJECT (decoder), "pending", GINT_TO_POINTER (1));
play_base_bin->pending++;
GST_DEBUG_OBJECT (play_base_bin, "created decodebin, %d pending",
@ -2119,7 +2117,7 @@ setup_source (GstPlayBaseBin * play_base_bin)
G_CALLBACK (sub_no_more_pads), play_base_bin);
g_signal_connect (G_OBJECT (db), "unknown-type",
G_CALLBACK (unknown_type), play_base_bin);
g_object_set_data (G_OBJECT (db), "pending", "1");
g_object_set_data (G_OBJECT (db), "pending", GINT_TO_POINTER (1));
play_base_bin->pending++;
GST_DEBUG_OBJECT (play_base_bin, "we have subtitles, %d pending",
@ -2209,7 +2207,8 @@ setup_source (GstPlayBaseBin * play_base_bin)
play_base_bin->src_nmp_sig_id =
g_signal_connect (G_OBJECT (play_base_bin->source), "no-more-pads",
G_CALLBACK (source_no_more_pads), play_base_bin);
g_object_set_data (G_OBJECT (play_base_bin->source), "pending", "1");
g_object_set_data (G_OBJECT (play_base_bin->source), "pending",
GINT_TO_POINTER (1));
play_base_bin->pending++;
GST_DEBUG_OBJECT (play_base_bin,
"Source has dynamic output pads, %d pending", play_base_bin->pending);

View file

@ -837,7 +837,7 @@ gen_video_element (GstPlayBin * play_bin)
goto no_sinks;
}
gst_object_ref (sink);
g_hash_table_insert (play_bin->cache, "video_sink", sink);
g_hash_table_insert (play_bin->cache, (gpointer) "video_sink", sink);
/* create a bin to hold objects, as we create them we add them to this bin so
* that when something goes wrong we only need to unref the bin */
@ -875,7 +875,7 @@ gen_video_element (GstPlayBin * play_bin)
/* since we're gonna add it to a bin but don't want to lose it,
* we keep a reference. */
gst_object_ref (element);
g_hash_table_insert (play_bin->cache, "vbin", element);
g_hash_table_insert (play_bin->cache, (gpointer) "vbin", element);
return element;
@ -1106,7 +1106,7 @@ gen_audio_element (GstPlayBin * play_bin)
}
gst_object_ref (sink);
g_hash_table_insert (play_bin->cache, "audio_sink", sink);
g_hash_table_insert (play_bin->cache, (gpointer) "audio_sink", sink);
element = gst_bin_new ("abin");
gst_bin_add (GST_BIN_CAST (element), sink);
@ -1143,7 +1143,7 @@ gen_audio_element (GstPlayBin * play_bin)
/* since we're gonna add it to a bin but don't want to lose it,
* we keep a reference. */
gst_object_ref (element);
g_hash_table_insert (play_bin->cache, "abin", element);
g_hash_table_insert (play_bin->cache, (gpointer) "abin", element);
return element;

View file

@ -2221,7 +2221,7 @@ static void
selector_active_pad_changed (GObject * selector, GParamSpec * pspec,
GstPlayBin * playbin)
{
gchar *property;
const gchar *property;
GstSourceGroup *group;
GstSourceSelect *select = NULL;
int i;

View file

@ -1382,7 +1382,7 @@ make_decoder (GstURIDecodeBin * decoder)
}
}
g_object_set_data (G_OBJECT (decodebin), "pending", "1");
g_object_set_data (G_OBJECT (decodebin), "pending", GINT_TO_POINTER (1));
g_object_set (decodebin, "subtitle-encoding", decoder->encoding, NULL);
decoder->pending++;
GST_LOG_OBJECT (decoder, "have %d pending dynamic objects", decoder->pending);
@ -1702,7 +1702,8 @@ setup_source (GstURIDecodeBin * decoder)
decoder->src_nmp_sig_id =
g_signal_connect (decoder->source, "no-more-pads",
G_CALLBACK (source_no_more_pads), decoder);
g_object_set_data (G_OBJECT (decoder->source), "pending", "1");
g_object_set_data (G_OBJECT (decoder->source), "pending",
GINT_TO_POINTER (1));
decoder->pending++;
} else {
if (decoder->is_stream) {

View file

@ -410,7 +410,7 @@ gst_sub_parse_get_property (GObject * object, guint prop_id,
GST_OBJECT_UNLOCK (subparse);
}
static gchar *
static const gchar *
gst_sub_parse_get_format_description (GstSubParseFormat format)
{
switch (format) {
@ -446,9 +446,10 @@ gst_convert_to_utf8 (const gchar * str, gsize len, const gchar * encoding,
gchar *ret = NULL;
*consumed = 0;
/* The char cast is necessary in glib < 2.24 */
ret =
g_convert_with_fallback (str, len, "UTF-8", encoding, "*", consumed, NULL,
err);
g_convert_with_fallback (str, len, "UTF-8", encoding, (char *) "*",
consumed, NULL, err);
if (ret == NULL)
return ret;
@ -1858,14 +1859,13 @@ gst_subparse_type_find (GstTypeFind * tf, gpointer private)
static gboolean
plugin_init (GstPlugin * plugin)
{
static gchar *sub_exts[] = { "srt", "sub", "mpsub", "mdvd", "smi", "txt",
"dks", NULL
};
static const gchar *sub_exts[] =
{ "srt", "sub", "mpsub", "mdvd", "smi", "txt", "dks", NULL };
GST_DEBUG_CATEGORY_INIT (sub_parse_debug, "subparse", 0, ".sub parser");
if (!gst_type_find_register (plugin, "subparse_typefind", GST_RANK_MARGINAL,
gst_subparse_type_find, sub_exts, SUB_CAPS, NULL, NULL))
gst_subparse_type_find, (gchar **) sub_exts, SUB_CAPS, NULL, NULL))
return FALSE;
if (!gst_element_register (plugin, "subparse",

View file

@ -166,7 +166,7 @@ handle_start_font (GstSamiContext * sctx, const xmlChar ** atts)
* sami files.
* It will fix hex color value that start without '#'
*/
gchar *sharp = "";
const gchar *sharp = "";
int len = xmlStrlen (value);
if (!(*value == '#' && len == 7)) {

View file

@ -3504,7 +3504,7 @@ G_BEGIN_DECLS{ \
sw_data->probability = _probability; \
sw_data->caps = gst_caps_new_simple (name, NULL); \
if (!gst_type_find_register (plugin, name, rank, start_with_type_find,\
ext, sw_data->caps, sw_data, \
(char **) ext, sw_data->caps, sw_data, \
(GDestroyNotify) (sw_data_destroy))) { \
gst_caps_unref (sw_data->caps); \
g_free (sw_data); \
@ -3534,7 +3534,7 @@ G_BEGIN_DECLS{ \
sw_data->probability = GST_TYPE_FIND_MAXIMUM; \
sw_data->caps = gst_caps_new_simple (name, NULL); \
if (!gst_type_find_register (plugin, name, rank, riff_type_find, \
ext, sw_data->caps, sw_data, \
(char **) ext, sw_data->caps, sw_data, \
(GDestroyNotify) (sw_data_destroy))) { \
gst_caps_unref (sw_data->caps); \
g_free (sw_data); \
@ -3546,7 +3546,7 @@ G_BEGIN_DECLS{ \
#define TYPE_FIND_REGISTER(plugin,name,rank,func,ext,caps,priv,notify) \
G_BEGIN_DECLS{\
if (!gst_type_find_register (plugin, name, rank, func, ext, caps, priv, notify))\
if (!gst_type_find_register (plugin, name, rank, func, (char **) ext, caps, priv, notify))\
return FALSE; \
}G_END_DECLS
@ -3561,107 +3561,107 @@ plugin_init (GstPlugin * plugin)
this requires gstreamer/gst/gsttypefind::gst_type_find_register()
to have define the parameter as const
*/
static gchar *asf_exts[] = { "asf", "wm", "wma", "wmv", NULL };
static gchar *au_exts[] = { "au", "snd", NULL };
static gchar *avi_exts[] = { "avi", NULL };
static gchar *qcp_exts[] = { "qcp", NULL };
static gchar *cdxa_exts[] = { "dat", NULL };
static gchar *flac_exts[] = { "flac", NULL };
static gchar *flx_exts[] = { "flc", "fli", NULL };
static gchar *id3_exts[] =
static const gchar *asf_exts[] = { "asf", "wm", "wma", "wmv", NULL };
static const gchar *au_exts[] = { "au", "snd", NULL };
static const gchar *avi_exts[] = { "avi", NULL };
static const gchar *qcp_exts[] = { "qcp", NULL };
static const gchar *cdxa_exts[] = { "dat", NULL };
static const gchar *flac_exts[] = { "flac", NULL };
static const gchar *flx_exts[] = { "flc", "fli", NULL };
static const gchar *id3_exts[] =
{ "mp3", "mp2", "mp1", "mpga", "ogg", "flac", "tta", NULL };
static gchar *apetag_exts[] = { "ape", "mpc", "wv", NULL }; /* and mp3 and wav? */
static gchar *tta_exts[] = { "tta", NULL };
static gchar *mod_exts[] = { "669", "amf", "dsm", "gdm", "far", "imf",
static const gchar *apetag_exts[] = { "ape", "mpc", "wv", NULL }; /* and mp3 and wav? */
static const gchar *tta_exts[] = { "tta", NULL };
static const gchar *mod_exts[] = { "669", "amf", "dsm", "gdm", "far", "imf",
"it", "med", "mod", "mtm", "okt", "sam",
"s3m", "stm", "stx", "ult", "xm", NULL
};
static gchar *mp3_exts[] = { "mp3", "mp2", "mp1", "mpga", NULL };
static gchar *ac3_exts[] = { "ac3", NULL };
static gchar *gsm_exts[] = { "gsm", NULL };
static gchar *musepack_exts[] = { "mpc", "mpp", "mp+", NULL };
static gchar *mpeg_sys_exts[] = { "mpe", "mpeg", "mpg", NULL };
static gchar *mpeg_video_exts[] = { "mpv", "mpeg", "mpg", NULL };
static gchar *mpeg_ts_exts[] = { "ts", NULL };
static gchar *ogg_exts[] = { "anx", "ogg", "ogm", NULL };
static gchar *qt_exts[] = { "mov", NULL };
static gchar *qtif_exts[] = { "qif", "qtif", "qti", NULL };
static gchar *mj2_exts[] = { "mj2", NULL };
static gchar *jp2_exts[] = { "jp2", NULL };
static gchar *rm_exts[] = { "ra", "ram", "rm", "rmvb", NULL };
static gchar *swf_exts[] = { "swf", "swfl", NULL };
static gchar *utf8_exts[] = { "txt", NULL };
static gchar *wav_exts[] = { "wav", NULL };
static gchar *aiff_exts[] = { "aiff", "aif", "aifc", NULL };
static gchar *svx_exts[] = { "iff", "svx", NULL };
static gchar *paris_exts[] = { "paf", NULL };
static gchar *nist_exts[] = { "nist", NULL };
static gchar *voc_exts[] = { "voc", NULL };
static gchar *sds_exts[] = { "sds", NULL };
static gchar *ircam_exts[] = { "sf", NULL };
static gchar *w64_exts[] = { "w64", NULL };
static gchar *shn_exts[] = { "shn", NULL };
static gchar *ape_exts[] = { "ape", NULL };
static gchar *uri_exts[] = { "ram", NULL };
static gchar *sdp_exts[] = { "sdp", NULL };
static gchar *smil_exts[] = { "smil", NULL };
static gchar *html_exts[] = { "htm", "html", NULL };
static gchar *xml_exts[] = { "xml", NULL };
static gchar *jpeg_exts[] = { "jpg", "jpe", "jpeg", NULL };
static gchar *gif_exts[] = { "gif", NULL };
static gchar *png_exts[] = { "png", NULL };
static gchar *bmp_exts[] = { "bmp", NULL };
static gchar *tiff_exts[] = { "tif", "tiff", NULL };
static gchar *matroska_exts[] = { "mkv", "mka", NULL };
static gchar *mve_exts[] = { "mve", NULL };
static gchar *dv_exts[] = { "dv", "dif", NULL };
static gchar *amr_exts[] = { "amr", NULL };
static gchar *ilbc_exts[] = { "ilbc", NULL };
static gchar *sid_exts[] = { "sid", NULL };
static gchar *xcf_exts[] = { "xcf", NULL };
static gchar *mng_exts[] = { "mng", NULL };
static gchar *jng_exts[] = { "jng", NULL };
static gchar *xpm_exts[] = { "xpm", NULL };
static gchar *pnm_exts[] = { "pnm", "ppm", "pgm", "pbm", NULL };
static gchar *ras_exts[] = { "ras", NULL };
static gchar *bz2_exts[] = { "bz2", NULL };
static gchar *gz_exts[] = { "gz", NULL };
static gchar *zip_exts[] = { "zip", NULL };
static gchar *compress_exts[] = { "Z", NULL };
static gchar *m4a_exts[] = { "m4a", NULL };
static gchar *q3gp_exts[] = { "3gp", NULL };
static gchar *aac_exts[] = { "aac", NULL };
static gchar *spc_exts[] = { "spc", NULL };
static gchar *wavpack_exts[] = { "wv", "wvp", NULL };
static gchar *wavpack_correction_exts[] = { "wvc", NULL };
static gchar *rar_exts[] = { "rar", NULL };
static gchar *tar_exts[] = { "tar", NULL };
static gchar *ar_exts[] = { "a", NULL };
static gchar *msdos_exts[] = { "dll", "exe", "ocx", "sys", "scr",
static const gchar *mp3_exts[] = { "mp3", "mp2", "mp1", "mpga", NULL };
static const gchar *ac3_exts[] = { "ac3", NULL };
static const gchar *gsm_exts[] = { "gsm", NULL };
static const gchar *musepack_exts[] = { "mpc", "mpp", "mp+", NULL };
static const gchar *mpeg_sys_exts[] = { "mpe", "mpeg", "mpg", NULL };
static const gchar *mpeg_video_exts[] = { "mpv", "mpeg", "mpg", NULL };
static const gchar *mpeg_ts_exts[] = { "ts", NULL };
static const gchar *ogg_exts[] = { "anx", "ogg", "ogm", NULL };
static const gchar *qt_exts[] = { "mov", NULL };
static const gchar *qtif_exts[] = { "qif", "qtif", "qti", NULL };
static const gchar *mj2_exts[] = { "mj2", NULL };
static const gchar *jp2_exts[] = { "jp2", NULL };
static const gchar *rm_exts[] = { "ra", "ram", "rm", "rmvb", NULL };
static const gchar *swf_exts[] = { "swf", "swfl", NULL };
static const gchar *utf8_exts[] = { "txt", NULL };
static const gchar *wav_exts[] = { "wav", NULL };
static const gchar *aiff_exts[] = { "aiff", "aif", "aifc", NULL };
static const gchar *svx_exts[] = { "iff", "svx", NULL };
static const gchar *paris_exts[] = { "paf", NULL };
static const gchar *nist_exts[] = { "nist", NULL };
static const gchar *voc_exts[] = { "voc", NULL };
static const gchar *sds_exts[] = { "sds", NULL };
static const gchar *ircam_exts[] = { "sf", NULL };
static const gchar *w64_exts[] = { "w64", NULL };
static const gchar *shn_exts[] = { "shn", NULL };
static const gchar *ape_exts[] = { "ape", NULL };
static const gchar *uri_exts[] = { "ram", NULL };
static const gchar *sdp_exts[] = { "sdp", NULL };
static const gchar *smil_exts[] = { "smil", NULL };
static const gchar *html_exts[] = { "htm", "html", NULL };
static const gchar *xml_exts[] = { "xml", NULL };
static const gchar *jpeg_exts[] = { "jpg", "jpe", "jpeg", NULL };
static const gchar *gif_exts[] = { "gif", NULL };
static const gchar *png_exts[] = { "png", NULL };
static const gchar *bmp_exts[] = { "bmp", NULL };
static const gchar *tiff_exts[] = { "tif", "tiff", NULL };
static const gchar *matroska_exts[] = { "mkv", "mka", NULL };
static const gchar *mve_exts[] = { "mve", NULL };
static const gchar *dv_exts[] = { "dv", "dif", NULL };
static const gchar *amr_exts[] = { "amr", NULL };
static const gchar *ilbc_exts[] = { "ilbc", NULL };
static const gchar *sid_exts[] = { "sid", NULL };
static const gchar *xcf_exts[] = { "xcf", NULL };
static const gchar *mng_exts[] = { "mng", NULL };
static const gchar *jng_exts[] = { "jng", NULL };
static const gchar *xpm_exts[] = { "xpm", NULL };
static const gchar *pnm_exts[] = { "pnm", "ppm", "pgm", "pbm", NULL };
static const gchar *ras_exts[] = { "ras", NULL };
static const gchar *bz2_exts[] = { "bz2", NULL };
static const gchar *gz_exts[] = { "gz", NULL };
static const gchar *zip_exts[] = { "zip", NULL };
static const gchar *compress_exts[] = { "Z", NULL };
static const gchar *m4a_exts[] = { "m4a", NULL };
static const gchar *q3gp_exts[] = { "3gp", NULL };
static const gchar *aac_exts[] = { "aac", NULL };
static const gchar *spc_exts[] = { "spc", NULL };
static const gchar *wavpack_exts[] = { "wv", "wvp", NULL };
static const gchar *wavpack_correction_exts[] = { "wvc", NULL };
static const gchar *rar_exts[] = { "rar", NULL };
static const gchar *tar_exts[] = { "tar", NULL };
static const gchar *ar_exts[] = { "a", NULL };
static const gchar *msdos_exts[] = { "dll", "exe", "ocx", "sys", "scr",
"msstyles", "cpl", NULL
};
static gchar *flv_exts[] = { "flv", NULL };
static gchar *m4v_exts[] = { "m4v", NULL };
static gchar *h264_exts[] = { "h264", "x264", "264", NULL };
static gchar *nuv_exts[] = { "nuv", NULL };
static gchar *vivo_exts[] = { "viv", NULL };
static gchar *nsf_exts[] = { "nsf", NULL };
static gchar *gym_exts[] = { "gym", NULL };
static gchar *ay_exts[] = { "ay", NULL };
static gchar *gbs_exts[] = { "gbs", NULL };
static gchar *kss_exts[] = { "kss", NULL };
static gchar *sap_exts[] = { "sap", NULL };
static gchar *vgm_exts[] = { "vgm", NULL };
static gchar *mid_exts[] = { "mid", "midi", NULL };
static gchar *mxmf_exts[] = { "mxmf", NULL };
static gchar *imelody_exts[] = { "imy", "ime", "imelody", NULL };
static gchar *pdf_exts[] = { "pdf", NULL };
static gchar *ps_exts[] = { "ps", NULL };
static gchar *svg_exts[] = { "svg", NULL };
static gchar *mxf_exts[] = { "mxf", NULL };
static gchar *msword_exts[] = { "doc", NULL };
static gchar *dsstore_exts[] = { "DS_Store", NULL };
static gchar *psd_exts[] = { "psd", NULL };
static const gchar *flv_exts[] = { "flv", NULL };
static const gchar *m4v_exts[] = { "m4v", NULL };
static const gchar *h264_exts[] = { "h264", "x264", "264", NULL };
static const gchar *nuv_exts[] = { "nuv", NULL };
static const gchar *vivo_exts[] = { "viv", NULL };
static const gchar *nsf_exts[] = { "nsf", NULL };
static const gchar *gym_exts[] = { "gym", NULL };
static const gchar *ay_exts[] = { "ay", NULL };
static const gchar *gbs_exts[] = { "gbs", NULL };
static const gchar *kss_exts[] = { "kss", NULL };
static const gchar *sap_exts[] = { "sap", NULL };
static const gchar *vgm_exts[] = { "vgm", NULL };
static const gchar *mid_exts[] = { "mid", "midi", NULL };
static const gchar *mxmf_exts[] = { "mxmf", NULL };
static const gchar *imelody_exts[] = { "imy", "ime", "imelody", NULL };
static const gchar *pdf_exts[] = { "pdf", NULL };
static const gchar *ps_exts[] = { "ps", NULL };
static const gchar *svg_exts[] = { "svg", NULL };
static const gchar *mxf_exts[] = { "mxf", NULL };
static const gchar *msword_exts[] = { "doc", NULL };
static const gchar *dsstore_exts[] = { "DS_Store", NULL };
static const gchar *psd_exts[] = { "psd", NULL };
GST_DEBUG_CATEGORY_INIT (type_find_debug, "typefindfunctions",
GST_DEBUG_FG_GREEN | GST_DEBUG_BG_RED, "generic type find functions");

View file

@ -528,7 +528,7 @@ paintinfo_find_by_structure (const GstStructure * structure)
}
}
} else if (strcmp (media_type, "video/x-raw-yuv") == 0) {
char *s;
const char *s;
int fourcc;
guint32 format;
@ -600,7 +600,7 @@ paintrect_find_fourcc (int find_fourcc)
int i;
for (i = 0; i < n_fourccs; i++) {
char *s;
const char *s;
int fourcc;
s = fourcc_list[i].fourcc;

View file

@ -65,8 +65,8 @@ struct paintinfo_struct
struct fourcc_list_struct
{
int type;
char *fourcc;
char *name;
const char *fourcc;
const char *name;
int bitspp;
void (*paint_setup) (paintinfo * p, unsigned char *dest);
void (*paint_hline) (paintinfo * p, int x, int y, int w);

View file

@ -932,7 +932,8 @@ volume_transform_ip (GstBaseTransform * base, GstBuffer * outbuf)
}
if (mute_csource) {
GstValueArray va = { "mute", nsamples, interval, (gpointer) self->mutes };
GstValueArray va =
{ (char *) "mute", nsamples, interval, (gpointer) self->mutes };
if (!gst_control_source_get_value_array (mute_csource, ts, &va))
goto controller_failure;
@ -947,7 +948,7 @@ volume_transform_ip (GstBaseTransform * base, GstBuffer * outbuf)
if (volume_csource) {
GstValueArray va =
{ "volume", nsamples, interval, (gpointer) self->volumes };
{ (char *) "volume", nsamples, interval, (gpointer) self->volumes };
if (!gst_control_source_get_value_array (volume_csource, ts, &va))
goto controller_failure;

View file

@ -179,7 +179,7 @@ static gboolean
gst_v4l_class_probe_devices (GstV4lElementClass * klass, gboolean check)
{
if (!check) {
gchar *dev_base[] = { "/dev/video", "/dev/v4l/video", NULL };
const gchar *dev_base[] = { "/dev/video", "/dev/v4l/video", NULL };
gint base, n, fd;
while (devices) {

View file

@ -1766,7 +1766,7 @@ gst_xvimagesink_xcontext_get (GstXvImageSink * xvimagesink)
gint nb_formats = 0, i, j, N_attr;
XvAttribute *xv_attr;
Atom prop_atom;
char *channels[4] = { "XV_HUE", "XV_SATURATION",
const char *channels[4] = { "XV_HUE", "XV_SATURATION",
"XV_BRIGHTNESS", "XV_CONTRAST"
};

View file

@ -119,7 +119,7 @@ cleanup_audioconvert (GstElement * audioconvert)
/* returns a newly allocated caps */
static GstCaps *
get_int_caps (guint channels, gchar * endianness, guint width,
get_int_caps (guint channels, const gchar * endianness, guint width,
guint depth, gboolean signedness)
{
GstCaps *caps;
@ -143,7 +143,7 @@ get_int_caps (guint channels, gchar * endianness, guint width,
/* returns a newly allocated caps */
static GstCaps *
get_float_caps (guint channels, gchar * endianness, guint width)
get_float_caps (guint channels, const gchar * endianness, guint width)
{
GstCaps *caps;
gchar *string;
@ -395,7 +395,7 @@ set_channel_positions (GstCaps * caps, int channels,
* ones. Only implemented for channels between 1 and 6.
*/
static GstCaps *
get_float_mc_caps (guint channels, gchar * endianness, guint width,
get_float_mc_caps (guint channels, const gchar * endianness, guint width,
gboolean mixed_up_layout)
{
GstCaps *caps = get_float_caps (channels, endianness, width);
@ -411,7 +411,7 @@ get_float_mc_caps (guint channels, gchar * endianness, guint width,
}
static GstCaps *
get_int_mc_caps (guint channels, gchar * endianness, guint width,
get_int_mc_caps (guint channels, const gchar * endianness, guint width,
guint depth, gboolean signedness, gboolean mixed_up_layout)
{
GstCaps *caps = get_int_caps (channels, endianness, width, depth, signedness);

View file

@ -94,7 +94,7 @@ cleanup_gdpdepay (GstElement * gdpdepay)
}
static void
gdpdepay_push_per_byte (gchar * reason, guint8 * bytes, guint length)
gdpdepay_push_per_byte (const gchar * reason, guint8 * bytes, guint length)
{
int i;
GstBuffer *inbuffer;

View file

@ -406,7 +406,7 @@ gst_red_video_src_uri_get_type (void)
static gchar **
gst_red_video_src_uri_get_protocols (void)
{
static gchar *protocols[] = { "redvideo", NULL };
static gchar *protocols[] = { (char *) "redvideo", NULL };
return protocols;
}
@ -515,7 +515,7 @@ gst_codec_src_uri_get_type (void)
static gchar **
gst_codec_src_uri_get_protocols (void)
{
static gchar *protocols[] = { "codec", NULL };
static gchar *protocols[] = { (char *) "codec", NULL };
return protocols;
}

View file

@ -475,7 +475,7 @@ gst_red_video_src_uri_get_type (void)
static gchar **
gst_red_video_src_uri_get_protocols (void)
{
static gchar *protocols[] = { "redvideo", NULL };
static gchar *protocols[] = { (char *) "redvideo", NULL };
return protocols;
}
@ -584,7 +584,7 @@ gst_codec_src_uri_get_type (void)
static gchar **
gst_codec_src_uri_get_protocols (void)
{
static gchar *protocols[] = { "codec", NULL };
static gchar *protocols[] = { (char *) "codec", NULL };
return protocols;
}

View file

@ -79,7 +79,7 @@ static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
);
static void
assert_videorate_stats (GstElement * videorate, gchar * reason,
assert_videorate_stats (GstElement * videorate, const gchar * reason,
guint64 xin, guint64 xout, guint64 xdropped, guint64 xduplicated)
{
guint64 in, out, dropped, duplicated;

View file

@ -549,8 +549,9 @@ GST_START_TEST (test_pb_utils_install_plugins)
{
GstInstallPluginsContext *ctx;
GstInstallPluginsReturn ret;
gchar *details[] = { "detail1", "detail2", NULL };
gchar *details_multi[] = { "detail1", "detail1", "detail2", NULL };
gchar *details[] = { (char *) "detail1", (char *) "detail2", NULL };
gchar *details_multi[] =
{ (char *) "detail1", (char *) "detail1", (char *) "detail2", NULL };
ctx = gst_install_plugins_context_new ();

View file

@ -52,8 +52,8 @@ struct paintinfo_struct
struct fourcc_list_struct
{
char *fourcc;
char *name;
const char *fourcc;
const char *name;
int bitspp;
void (*paint_setup) (paintinfo * p, unsigned char *dest);
};

View file

@ -106,7 +106,7 @@ done:
GST_START_TEST (test_element_negotiation)
{
gchar *s;
const gchar *s;
/* Ensures that filtering buffers with unknown caps down to fixed-caps
* will apply those caps to the buffers.

View file

@ -50,7 +50,7 @@ typedef struct
dyn_link;
static GstElement *
gst_element_factory_make_or_warn (gchar * type, gchar * name)
gst_element_factory_make_or_warn (const gchar * type, const gchar * name)
{
GstElement *element = gst_element_factory_make (type, name);
@ -423,7 +423,7 @@ bus_message (GstBus * bus, GstMessage * message, gpointer data)
typedef struct
{
gchar *name;
const gchar *name;
GstElement *(*func) (const gchar * location);
}
Pipeline;

View file

@ -155,7 +155,7 @@ typedef struct
dyn_link;
static GstElement *
gst_element_factory_make_or_warn (gchar * type, gchar * name)
gst_element_factory_make_or_warn (const gchar * type, const gchar * name)
{
GstElement *element = gst_element_factory_make (type, name);
@ -973,7 +973,7 @@ make_parselaunch_pipeline (const gchar * description)
typedef struct
{
gchar *name;
const gchar *name;
GstElement *(*func) (const gchar * location);
}
Pipeline;

View file

@ -113,7 +113,7 @@ main (int argc, char **argv)
g_option_context_free (ctx);
if (!bin)
bin = "playbin";
bin = g_strdup ("playbin");
if (strcmp (bin, "playbin") && strcmp (bin, "playbin2")) {
g_print ("Please provide a valid playbin argument; playbin | playbin2");
@ -150,6 +150,7 @@ main (int argc, char **argv)
}
g_strfreev (args);
g_free (bin);
g_timer_destroy (timer);
return 0;