Cast away const from GstMetaInfo in *_get_meta_info() functions

MSVC warns about the const in the implicit argument conversion in the
calls to g_once_init_{enter,leave}. It's OK so explicitly cast it.

https://bugzilla.gnome.org/show_bug.cgi?id=774293
This commit is contained in:
Scott D Phillips 2016-11-14 16:48:16 -08:00 committed by Sebastian Dröge
parent 364a45267e
commit 6e71583d07
4 changed files with 24 additions and 18 deletions

View file

@ -189,13 +189,14 @@ gst_audio_downmix_meta_get_info (void)
{
static const GstMetaInfo *audio_downmix_meta_info = NULL;
if (g_once_init_enter (&audio_downmix_meta_info)) {
if (g_once_init_enter ((GstMetaInfo **) & audio_downmix_meta_info)) {
const GstMetaInfo *meta =
gst_meta_register (GST_AUDIO_DOWNMIX_META_API_TYPE,
"GstAudioDownmixMeta", sizeof (GstAudioDownmixMeta),
gst_audio_downmix_meta_init, gst_audio_downmix_meta_free,
gst_audio_downmix_meta_transform);
g_once_init_leave (&audio_downmix_meta_info, meta);
g_once_init_leave ((GstMetaInfo **) & audio_downmix_meta_info,
(GstMetaInfo *) meta);
}
return audio_downmix_meta_info;
}
@ -291,13 +292,14 @@ gst_audio_clipping_meta_get_info (void)
{
static const GstMetaInfo *audio_clipping_meta_info = NULL;
if (g_once_init_enter (&audio_clipping_meta_info)) {
if (g_once_init_enter ((GstMetaInfo **) & audio_clipping_meta_info)) {
const GstMetaInfo *meta =
gst_meta_register (GST_AUDIO_CLIPPING_META_API_TYPE,
"GstAudioClippingMeta", sizeof (GstAudioClippingMeta),
gst_audio_clipping_meta_init, NULL,
gst_audio_clipping_meta_transform);
g_once_init_leave (&audio_clipping_meta_info, meta);
g_once_init_leave ((GstMetaInfo **) & audio_clipping_meta_info,
(GstMetaInfo *) meta);
}
return audio_clipping_meta_info;
}

View file

@ -84,7 +84,7 @@ gst_video_affine_transformation_meta_get_info (void)
{
static const GstMetaInfo *info = NULL;
if (g_once_init_enter (&info)) {
if (g_once_init_enter ((GstMetaInfo **) & info)) {
const GstMetaInfo *meta =
gst_meta_register (GST_VIDEO_AFFINE_TRANSFORMATION_META_API_TYPE,
"GstVideoAffineTransformationMeta",
@ -92,7 +92,7 @@ gst_video_affine_transformation_meta_get_info (void)
gst_video_affine_transformation_meta_init,
NULL,
gst_video_affine_transformation_meta_transform);
g_once_init_leave (&info, meta);
g_once_init_leave ((GstMetaInfo **) & info, (GstMetaInfo *) meta);
}
return info;
}

View file

@ -128,12 +128,13 @@ gst_video_meta_get_info (void)
{
static const GstMetaInfo *video_meta_info = NULL;
if (g_once_init_enter (&video_meta_info)) {
if (g_once_init_enter ((GstMetaInfo **) & video_meta_info)) {
const GstMetaInfo *meta =
gst_meta_register (GST_VIDEO_META_API_TYPE, "GstVideoMeta",
sizeof (GstVideoMeta), (GstMetaInitFunction) gst_video_meta_init,
(GstMetaFreeFunction) NULL, gst_video_meta_transform);
g_once_init_leave (&video_meta_info, meta);
g_once_init_leave ((GstMetaInfo **) & video_meta_info,
(GstMetaInfo *) meta);
}
return video_meta_info;
}
@ -457,13 +458,14 @@ gst_video_crop_meta_get_info (void)
{
static const GstMetaInfo *video_crop_meta_info = NULL;
if (g_once_init_enter (&video_crop_meta_info)) {
if (g_once_init_enter ((GstMetaInfo **) & video_crop_meta_info)) {
const GstMetaInfo *meta =
gst_meta_register (GST_VIDEO_CROP_META_API_TYPE, "GstVideoCropMeta",
sizeof (GstVideoCropMeta),
(GstMetaInitFunction) gst_video_crop_meta_init,
(GstMetaFreeFunction) NULL, gst_video_crop_meta_transform);
g_once_init_leave (&video_crop_meta_info, meta);
g_once_init_leave ((GstMetaInfo **) & video_crop_meta_info,
(GstMetaInfo *) meta);
}
return video_crop_meta_info;
}
@ -574,7 +576,7 @@ gst_video_gl_texture_upload_meta_get_info (void)
{
static const GstMetaInfo *info = NULL;
if (g_once_init_enter (&info)) {
if (g_once_init_enter ((GstMetaInfo **) & info)) {
const GstMetaInfo *meta =
gst_meta_register (GST_VIDEO_GL_TEXTURE_UPLOAD_META_API_TYPE,
"GstVideoGLTextureUploadMeta",
@ -582,7 +584,7 @@ gst_video_gl_texture_upload_meta_get_info (void)
gst_video_gl_texture_upload_meta_init,
gst_video_gl_texture_upload_meta_free,
gst_video_gl_texture_upload_meta_transform);
g_once_init_leave (&info, meta);
g_once_init_leave ((GstMetaInfo **) & info, (GstMetaInfo *) meta);
}
return info;
}
@ -748,7 +750,7 @@ gst_video_region_of_interest_meta_get_info (void)
{
static const GstMetaInfo *meta_info = NULL;
if (g_once_init_enter (&meta_info)) {
if (g_once_init_enter ((GstMetaInfo **) & meta_info)) {
const GstMetaInfo *mi =
gst_meta_register (GST_VIDEO_REGION_OF_INTEREST_META_API_TYPE,
"GstVideoRegionOfInterestMeta",
@ -756,7 +758,7 @@ gst_video_region_of_interest_meta_get_info (void)
gst_video_region_of_interest_meta_init,
gst_video_region_of_interest_meta_free,
gst_video_region_of_interest_meta_transform);
g_once_init_leave (&meta_info, mi);
g_once_init_leave ((GstMetaInfo **) & meta_info, (GstMetaInfo *) mi);
}
return meta_info;
}
@ -912,7 +914,7 @@ gst_video_time_code_meta_get_info (void)
{
static const GstMetaInfo *meta_info = NULL;
if (g_once_init_enter (&meta_info)) {
if (g_once_init_enter ((GstMetaInfo **) & meta_info)) {
const GstMetaInfo *mi =
gst_meta_register (GST_VIDEO_TIME_CODE_META_API_TYPE,
"GstVideoTimeCodeMeta",
@ -920,7 +922,7 @@ gst_video_time_code_meta_get_info (void)
gst_video_time_code_meta_init,
gst_video_time_code_meta_free,
gst_video_time_code_meta_transform);
g_once_init_leave (&meta_info, mi);
g_once_init_leave ((GstMetaInfo **) & meta_info, (GstMetaInfo *) mi);
}
return meta_info;
}

View file

@ -260,7 +260,8 @@ gst_video_overlay_composition_meta_get_info (void)
{
static const GstMetaInfo *video_overlay_composition_meta_info = NULL;
if (g_once_init_enter (&video_overlay_composition_meta_info)) {
if (g_once_init_enter ((GstMetaInfo **) &
video_overlay_composition_meta_info)) {
const GstMetaInfo *meta =
gst_meta_register (GST_VIDEO_OVERLAY_COMPOSITION_META_API_TYPE,
"GstVideoOverlayCompositionMeta",
@ -269,7 +270,8 @@ gst_video_overlay_composition_meta_get_info (void)
(GstMetaFreeFunction) gst_video_overlay_composition_meta_free,
(GstMetaTransformFunction)
gst_video_overlay_composition_meta_transform);
g_once_init_leave (&video_overlay_composition_meta_info, meta);
g_once_init_leave ((GstMetaInfo **) & video_overlay_composition_meta_info,
(GstMetaInfo *) meta);
}
return video_overlay_composition_meta_info;
}