mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-25 11:11:08 +00:00
plugins: Fix various trivial clang compiler warnings
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4210>
This commit is contained in:
parent
3851c2da12
commit
ccad9a7338
10 changed files with 29 additions and 42 deletions
|
@ -259,58 +259,58 @@ gst_bs2b_setup (GstAudioFilter * filter, const GstAudioInfo * audio_info)
|
||||||
|
|
||||||
switch (GST_AUDIO_INFO_FORMAT (audio_info)) {
|
switch (GST_AUDIO_INFO_FORMAT (audio_info)) {
|
||||||
case GST_AUDIO_FORMAT_S8:
|
case GST_AUDIO_FORMAT_S8:
|
||||||
element->func = &bs2b_cross_feed_s8;
|
element->func = (GstBs2bProcessFunc) & bs2b_cross_feed_s8;
|
||||||
break;
|
break;
|
||||||
case GST_AUDIO_FORMAT_U8:
|
case GST_AUDIO_FORMAT_U8:
|
||||||
element->func = &bs2b_cross_feed_u8;
|
element->func = (GstBs2bProcessFunc) & bs2b_cross_feed_u8;
|
||||||
break;
|
break;
|
||||||
case GST_AUDIO_FORMAT_S16BE:
|
case GST_AUDIO_FORMAT_S16BE:
|
||||||
element->func = &bs2b_cross_feed_s16be;
|
element->func = (GstBs2bProcessFunc) & bs2b_cross_feed_s16be;
|
||||||
break;
|
break;
|
||||||
case GST_AUDIO_FORMAT_S16LE:
|
case GST_AUDIO_FORMAT_S16LE:
|
||||||
element->func = &bs2b_cross_feed_s16le;
|
element->func = (GstBs2bProcessFunc) & bs2b_cross_feed_s16le;
|
||||||
break;
|
break;
|
||||||
case GST_AUDIO_FORMAT_U16BE:
|
case GST_AUDIO_FORMAT_U16BE:
|
||||||
element->func = &bs2b_cross_feed_u16be;
|
element->func = (GstBs2bProcessFunc) & bs2b_cross_feed_u16be;
|
||||||
break;
|
break;
|
||||||
case GST_AUDIO_FORMAT_U16LE:
|
case GST_AUDIO_FORMAT_U16LE:
|
||||||
element->func = &bs2b_cross_feed_u16le;
|
element->func = (GstBs2bProcessFunc) & bs2b_cross_feed_u16le;
|
||||||
break;
|
break;
|
||||||
case GST_AUDIO_FORMAT_S24BE:
|
case GST_AUDIO_FORMAT_S24BE:
|
||||||
element->func = &bs2b_cross_feed_s24be;
|
element->func = (GstBs2bProcessFunc) & bs2b_cross_feed_s24be;
|
||||||
break;
|
break;
|
||||||
case GST_AUDIO_FORMAT_S24LE:
|
case GST_AUDIO_FORMAT_S24LE:
|
||||||
element->func = &bs2b_cross_feed_s24le;
|
element->func = (GstBs2bProcessFunc) & bs2b_cross_feed_s24le;
|
||||||
break;
|
break;
|
||||||
case GST_AUDIO_FORMAT_U24BE:
|
case GST_AUDIO_FORMAT_U24BE:
|
||||||
element->func = &bs2b_cross_feed_u24be;
|
element->func = (GstBs2bProcessFunc) & bs2b_cross_feed_u24be;
|
||||||
break;
|
break;
|
||||||
case GST_AUDIO_FORMAT_U24LE:
|
case GST_AUDIO_FORMAT_U24LE:
|
||||||
element->func = &bs2b_cross_feed_u24le;
|
element->func = (GstBs2bProcessFunc) & bs2b_cross_feed_u24le;
|
||||||
break;
|
break;
|
||||||
case GST_AUDIO_FORMAT_S32BE:
|
case GST_AUDIO_FORMAT_S32BE:
|
||||||
element->func = &bs2b_cross_feed_s32be;
|
element->func = (GstBs2bProcessFunc) & bs2b_cross_feed_s32be;
|
||||||
break;
|
break;
|
||||||
case GST_AUDIO_FORMAT_S32LE:
|
case GST_AUDIO_FORMAT_S32LE:
|
||||||
element->func = &bs2b_cross_feed_s32le;
|
element->func = (GstBs2bProcessFunc) & bs2b_cross_feed_s32le;
|
||||||
break;
|
break;
|
||||||
case GST_AUDIO_FORMAT_U32BE:
|
case GST_AUDIO_FORMAT_U32BE:
|
||||||
element->func = &bs2b_cross_feed_u32be;
|
element->func = (GstBs2bProcessFunc) & bs2b_cross_feed_u32be;
|
||||||
break;
|
break;
|
||||||
case GST_AUDIO_FORMAT_U32LE:
|
case GST_AUDIO_FORMAT_U32LE:
|
||||||
element->func = &bs2b_cross_feed_u32le;
|
element->func = (GstBs2bProcessFunc) & bs2b_cross_feed_u32le;
|
||||||
break;
|
break;
|
||||||
case GST_AUDIO_FORMAT_F32BE:
|
case GST_AUDIO_FORMAT_F32BE:
|
||||||
element->func = &bs2b_cross_feed_fbe;
|
element->func = (GstBs2bProcessFunc) & bs2b_cross_feed_fbe;
|
||||||
break;
|
break;
|
||||||
case GST_AUDIO_FORMAT_F32LE:
|
case GST_AUDIO_FORMAT_F32LE:
|
||||||
element->func = &bs2b_cross_feed_fle;
|
element->func = (GstBs2bProcessFunc) & bs2b_cross_feed_fle;
|
||||||
break;
|
break;
|
||||||
case GST_AUDIO_FORMAT_F64BE:
|
case GST_AUDIO_FORMAT_F64BE:
|
||||||
element->func = &bs2b_cross_feed_dbe;
|
element->func = (GstBs2bProcessFunc) & bs2b_cross_feed_dbe;
|
||||||
break;
|
break;
|
||||||
case GST_AUDIO_FORMAT_F64LE:
|
case GST_AUDIO_FORMAT_F64LE:
|
||||||
element->func = &bs2b_cross_feed_dle;
|
element->func = (GstBs2bProcessFunc) & bs2b_cross_feed_dle;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
|
@ -40,6 +40,7 @@ G_BEGIN_DECLS
|
||||||
typedef struct _GstBs2b GstBs2b;
|
typedef struct _GstBs2b GstBs2b;
|
||||||
typedef struct _GstBs2bClass GstBs2bClass;
|
typedef struct _GstBs2bClass GstBs2bClass;
|
||||||
|
|
||||||
|
typedef void (*GstBs2bProcessFunc)(t_bs2bdp bs2bdp, void *sample, int n);
|
||||||
|
|
||||||
struct _GstBs2b
|
struct _GstBs2b
|
||||||
{
|
{
|
||||||
|
@ -48,7 +49,7 @@ struct _GstBs2b
|
||||||
/*< private > */
|
/*< private > */
|
||||||
GMutex bs2b_lock;
|
GMutex bs2b_lock;
|
||||||
t_bs2bdp bs2bdp;
|
t_bs2bdp bs2bdp;
|
||||||
void (*func) ();
|
GstBs2bProcessFunc func;
|
||||||
guint bytes_per_sample;
|
guint bytes_per_sample;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -34,10 +34,8 @@
|
||||||
static gboolean
|
static gboolean
|
||||||
plugin_init (GstPlugin * plugin)
|
plugin_init (GstPlugin * plugin)
|
||||||
{
|
{
|
||||||
gboolean ret = FALSE;
|
GST_ELEMENT_REGISTER (openalsink, plugin);
|
||||||
|
GST_ELEMENT_REGISTER (openalsrc, plugin);
|
||||||
ret |= GST_ELEMENT_REGISTER (openalsink, plugin);
|
|
||||||
ret |= GST_ELEMENT_REGISTER (openalsrc, plugin);
|
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -6106,7 +6106,7 @@ mxf_metadata_multiple_descriptor_resolve (MXFMetadataBase * m,
|
||||||
{
|
{
|
||||||
MXFMetadataMultipleDescriptor *self = MXF_METADATA_MULTIPLE_DESCRIPTOR (m);
|
MXFMetadataMultipleDescriptor *self = MXF_METADATA_MULTIPLE_DESCRIPTOR (m);
|
||||||
MXFMetadataBase *current = NULL;
|
MXFMetadataBase *current = NULL;
|
||||||
guint i, have_subdescriptors = 0;
|
guint i;
|
||||||
#ifndef GST_DISABLE_GST_DEBUG
|
#ifndef GST_DISABLE_GST_DEBUG
|
||||||
gchar str[48];
|
gchar str[48];
|
||||||
#endif
|
#endif
|
||||||
|
@ -6122,7 +6122,6 @@ mxf_metadata_multiple_descriptor_resolve (MXFMetadataBase * m,
|
||||||
if (current && MXF_IS_METADATA_GENERIC_DESCRIPTOR (current)) {
|
if (current && MXF_IS_METADATA_GENERIC_DESCRIPTOR (current)) {
|
||||||
if (mxf_metadata_base_resolve (current, metadata)) {
|
if (mxf_metadata_base_resolve (current, metadata)) {
|
||||||
self->sub_descriptors[i] = MXF_METADATA_GENERIC_DESCRIPTOR (current);
|
self->sub_descriptors[i] = MXF_METADATA_GENERIC_DESCRIPTOR (current);
|
||||||
have_subdescriptors++;
|
|
||||||
} else {
|
} else {
|
||||||
GST_ERROR ("Couldn't resolve descriptor %s",
|
GST_ERROR ("Couldn't resolve descriptor %s",
|
||||||
mxf_uuid_to_string (&self->sub_descriptors_uids[i], str));
|
mxf_uuid_to_string (&self->sub_descriptors_uids[i], str));
|
||||||
|
|
|
@ -735,16 +735,12 @@ gst_v4l2_codec_h264_dec_fill_slice_params (GstV4l2CodecH264Dec * self,
|
||||||
GstH264Slice * slice)
|
GstH264Slice * slice)
|
||||||
{
|
{
|
||||||
gint n = self->num_slices++;
|
gint n = self->num_slices++;
|
||||||
gsize slice_size = slice->nalu.size;
|
|
||||||
struct v4l2_ctrl_h264_slice_params *params;
|
struct v4l2_ctrl_h264_slice_params *params;
|
||||||
|
|
||||||
/* Ensure array is large enough */
|
/* Ensure array is large enough */
|
||||||
if (self->slice_params->len < self->num_slices)
|
if (self->slice_params->len < self->num_slices)
|
||||||
g_array_set_size (self->slice_params, self->slice_params->len * 2);
|
g_array_set_size (self->slice_params, self->slice_params->len * 2);
|
||||||
|
|
||||||
if (needs_start_codes (self))
|
|
||||||
slice_size += 3;
|
|
||||||
|
|
||||||
/* *INDENT-OFF* */
|
/* *INDENT-OFF* */
|
||||||
params = &g_array_index (self->slice_params, struct v4l2_ctrl_h264_slice_params, n);
|
params = &g_array_index (self->slice_params, struct v4l2_ctrl_h264_slice_params, n);
|
||||||
*params = (struct v4l2_ctrl_h264_slice_params) {
|
*params = (struct v4l2_ctrl_h264_slice_params) {
|
||||||
|
|
|
@ -75,7 +75,8 @@ static gboolean gst_gl_filter_glass_init_shader (GstGLFilter * filter);
|
||||||
static gboolean gst_gl_filter_glass_filter_texture (GstGLFilter * filter,
|
static gboolean gst_gl_filter_glass_filter_texture (GstGLFilter * filter,
|
||||||
GstGLMemory * in_tex, GstGLMemory * out_tex);
|
GstGLMemory * in_tex, GstGLMemory * out_tex);
|
||||||
|
|
||||||
static void gst_gl_filter_glass_draw_background_gradient ();
|
static void gst_gl_filter_glass_draw_background_gradient (GstGLFilterGlass *
|
||||||
|
glass);
|
||||||
static void gst_gl_filter_glass_draw_video_plane (GstGLFilter * filter,
|
static void gst_gl_filter_glass_draw_video_plane (GstGLFilter * filter,
|
||||||
gint width, gint height, guint texture, gfloat center_x, gfloat center_y,
|
gint width, gint height, guint texture, gfloat center_x, gfloat center_y,
|
||||||
gfloat start_alpha, gfloat stop_alpha, gboolean reversed, gfloat rotation);
|
gfloat start_alpha, gfloat stop_alpha, gboolean reversed, gfloat rotation);
|
||||||
|
|
|
@ -2696,7 +2696,7 @@ gst_adaptive_demux2_stream_update_current_bitrate (GstAdaptiveDemux2Stream *
|
||||||
* fraction of the measured download rate */
|
* fraction of the measured download rate */
|
||||||
target_download_rate =
|
target_download_rate =
|
||||||
CLAMP (stream->current_download_rate, 0,
|
CLAMP (stream->current_download_rate, 0,
|
||||||
G_MAXUINT) * demux->bandwidth_target_ratio;
|
G_MAXUINT) * (gdouble) demux->bandwidth_target_ratio;
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (stream, "Bitrate after target ratio limit (%0.2f): %u",
|
GST_DEBUG_OBJECT (stream, "Bitrate after target ratio limit (%0.2f): %u",
|
||||||
demux->bandwidth_target_ratio, target_download_rate);
|
demux->bandwidth_target_ratio, target_download_rate);
|
||||||
|
|
|
@ -32,10 +32,8 @@
|
||||||
static gboolean
|
static gboolean
|
||||||
plugin_init (GstPlugin * plugin)
|
plugin_init (GstPlugin * plugin)
|
||||||
{
|
{
|
||||||
gboolean ret = FALSE;
|
GST_ELEMENT_REGISTER (osssrc, plugin);
|
||||||
|
GST_ELEMENT_REGISTER (osssink, plugin);
|
||||||
ret |= GST_ELEMENT_REGISTER (osssrc, plugin);
|
|
||||||
ret |= GST_ELEMENT_REGISTER (osssink, plugin);
|
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -202,7 +202,6 @@ gst_oss_helper_rate_probe_check (GstOssProbe * probe)
|
||||||
GQueue *ranges;
|
GQueue *ranges;
|
||||||
int exact_rates = 0;
|
int exact_rates = 0;
|
||||||
gboolean checking_exact_rates = TRUE;
|
gboolean checking_exact_rates = TRUE;
|
||||||
int n_checks = 0;
|
|
||||||
gboolean result = TRUE;
|
gboolean result = TRUE;
|
||||||
|
|
||||||
ranges = g_queue_new ();
|
ranges = g_queue_new ();
|
||||||
|
@ -210,7 +209,6 @@ gst_oss_helper_rate_probe_check (GstOssProbe * probe)
|
||||||
probe->rates = g_array_new (FALSE, FALSE, sizeof (int));
|
probe->rates = g_array_new (FALSE, FALSE, sizeof (int));
|
||||||
|
|
||||||
probe->min = gst_oss_helper_rate_check_rate (probe, 1000);
|
probe->min = gst_oss_helper_rate_check_rate (probe, 1000);
|
||||||
n_checks++;
|
|
||||||
probe->max = gst_oss_helper_rate_check_rate (probe, 100000);
|
probe->max = gst_oss_helper_rate_check_rate (probe, 100000);
|
||||||
/* a little bug workaround */
|
/* a little bug workaround */
|
||||||
{
|
{
|
||||||
|
@ -223,7 +221,6 @@ gst_oss_helper_rate_probe_check (GstOssProbe * probe)
|
||||||
probe->max = max;
|
probe->max = max;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
n_checks++;
|
|
||||||
if (probe->min == -1 || probe->max == -1) {
|
if (probe->min == -1 || probe->max == -1) {
|
||||||
/* This is a workaround for drivers that return -EINVAL (or another
|
/* This is a workaround for drivers that return -EINVAL (or another
|
||||||
* error) for rates outside of [8000,48000]. If this fails, the
|
* error) for rates outside of [8000,48000]. If this fails, the
|
||||||
|
@ -252,7 +249,6 @@ gst_oss_helper_rate_probe_check (GstOssProbe * probe)
|
||||||
/* FIXME ioctl returned an error. do something */
|
/* FIXME ioctl returned an error. do something */
|
||||||
GST_DEBUG ("unexpected check_rate error");
|
GST_DEBUG ("unexpected check_rate error");
|
||||||
}
|
}
|
||||||
n_checks++;
|
|
||||||
|
|
||||||
if (mid == mid_ret && checking_exact_rates) {
|
if (mid == mid_ret && checking_exact_rates) {
|
||||||
int max_exact_matches = 20;
|
int max_exact_matches = 20;
|
||||||
|
|
|
@ -276,7 +276,7 @@ test_video_profile (const gchar * profile, gint profile_id,
|
||||||
switch (i) {
|
switch (i) {
|
||||||
case 0:
|
case 0:
|
||||||
{
|
{
|
||||||
gint nsize, npos, j, type, next_type;
|
gint nsize, npos, type, next_type;
|
||||||
GstMapInfo map;
|
GstMapInfo map;
|
||||||
const guint8 *data;
|
const guint8 *data;
|
||||||
gsize size;
|
gsize size;
|
||||||
|
@ -286,7 +286,6 @@ test_video_profile (const gchar * profile, gint profile_id,
|
||||||
size = map.size;
|
size = map.size;
|
||||||
|
|
||||||
npos = 0;
|
npos = 0;
|
||||||
j = 0;
|
|
||||||
/* need SPS first */
|
/* need SPS first */
|
||||||
next_type = 7;
|
next_type = 7;
|
||||||
/* loop through NALs */
|
/* loop through NALs */
|
||||||
|
@ -311,7 +310,6 @@ test_video_profile (const gchar * profile, gint profile_id,
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
j++;
|
|
||||||
}
|
}
|
||||||
npos += nsize + 4;
|
npos += nsize + 4;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue