mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-22 16:26:39 +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)) {
|
||||
case GST_AUDIO_FORMAT_S8:
|
||||
element->func = &bs2b_cross_feed_s8;
|
||||
element->func = (GstBs2bProcessFunc) & bs2b_cross_feed_s8;
|
||||
break;
|
||||
case GST_AUDIO_FORMAT_U8:
|
||||
element->func = &bs2b_cross_feed_u8;
|
||||
element->func = (GstBs2bProcessFunc) & bs2b_cross_feed_u8;
|
||||
break;
|
||||
case GST_AUDIO_FORMAT_S16BE:
|
||||
element->func = &bs2b_cross_feed_s16be;
|
||||
element->func = (GstBs2bProcessFunc) & bs2b_cross_feed_s16be;
|
||||
break;
|
||||
case GST_AUDIO_FORMAT_S16LE:
|
||||
element->func = &bs2b_cross_feed_s16le;
|
||||
element->func = (GstBs2bProcessFunc) & bs2b_cross_feed_s16le;
|
||||
break;
|
||||
case GST_AUDIO_FORMAT_U16BE:
|
||||
element->func = &bs2b_cross_feed_u16be;
|
||||
element->func = (GstBs2bProcessFunc) & bs2b_cross_feed_u16be;
|
||||
break;
|
||||
case GST_AUDIO_FORMAT_U16LE:
|
||||
element->func = &bs2b_cross_feed_u16le;
|
||||
element->func = (GstBs2bProcessFunc) & bs2b_cross_feed_u16le;
|
||||
break;
|
||||
case GST_AUDIO_FORMAT_S24BE:
|
||||
element->func = &bs2b_cross_feed_s24be;
|
||||
element->func = (GstBs2bProcessFunc) & bs2b_cross_feed_s24be;
|
||||
break;
|
||||
case GST_AUDIO_FORMAT_S24LE:
|
||||
element->func = &bs2b_cross_feed_s24le;
|
||||
element->func = (GstBs2bProcessFunc) & bs2b_cross_feed_s24le;
|
||||
break;
|
||||
case GST_AUDIO_FORMAT_U24BE:
|
||||
element->func = &bs2b_cross_feed_u24be;
|
||||
element->func = (GstBs2bProcessFunc) & bs2b_cross_feed_u24be;
|
||||
break;
|
||||
case GST_AUDIO_FORMAT_U24LE:
|
||||
element->func = &bs2b_cross_feed_u24le;
|
||||
element->func = (GstBs2bProcessFunc) & bs2b_cross_feed_u24le;
|
||||
break;
|
||||
case GST_AUDIO_FORMAT_S32BE:
|
||||
element->func = &bs2b_cross_feed_s32be;
|
||||
element->func = (GstBs2bProcessFunc) & bs2b_cross_feed_s32be;
|
||||
break;
|
||||
case GST_AUDIO_FORMAT_S32LE:
|
||||
element->func = &bs2b_cross_feed_s32le;
|
||||
element->func = (GstBs2bProcessFunc) & bs2b_cross_feed_s32le;
|
||||
break;
|
||||
case GST_AUDIO_FORMAT_U32BE:
|
||||
element->func = &bs2b_cross_feed_u32be;
|
||||
element->func = (GstBs2bProcessFunc) & bs2b_cross_feed_u32be;
|
||||
break;
|
||||
case GST_AUDIO_FORMAT_U32LE:
|
||||
element->func = &bs2b_cross_feed_u32le;
|
||||
element->func = (GstBs2bProcessFunc) & bs2b_cross_feed_u32le;
|
||||
break;
|
||||
case GST_AUDIO_FORMAT_F32BE:
|
||||
element->func = &bs2b_cross_feed_fbe;
|
||||
element->func = (GstBs2bProcessFunc) & bs2b_cross_feed_fbe;
|
||||
break;
|
||||
case GST_AUDIO_FORMAT_F32LE:
|
||||
element->func = &bs2b_cross_feed_fle;
|
||||
element->func = (GstBs2bProcessFunc) & bs2b_cross_feed_fle;
|
||||
break;
|
||||
case GST_AUDIO_FORMAT_F64BE:
|
||||
element->func = &bs2b_cross_feed_dbe;
|
||||
element->func = (GstBs2bProcessFunc) & bs2b_cross_feed_dbe;
|
||||
break;
|
||||
case GST_AUDIO_FORMAT_F64LE:
|
||||
element->func = &bs2b_cross_feed_dle;
|
||||
element->func = (GstBs2bProcessFunc) & bs2b_cross_feed_dle;
|
||||
break;
|
||||
default:
|
||||
return FALSE;
|
||||
|
|
|
@ -40,6 +40,7 @@ G_BEGIN_DECLS
|
|||
typedef struct _GstBs2b GstBs2b;
|
||||
typedef struct _GstBs2bClass GstBs2bClass;
|
||||
|
||||
typedef void (*GstBs2bProcessFunc)(t_bs2bdp bs2bdp, void *sample, int n);
|
||||
|
||||
struct _GstBs2b
|
||||
{
|
||||
|
@ -48,7 +49,7 @@ struct _GstBs2b
|
|||
/*< private > */
|
||||
GMutex bs2b_lock;
|
||||
t_bs2bdp bs2bdp;
|
||||
void (*func) ();
|
||||
GstBs2bProcessFunc func;
|
||||
guint bytes_per_sample;
|
||||
};
|
||||
|
||||
|
|
|
@ -34,10 +34,8 @@
|
|||
static gboolean
|
||||
plugin_init (GstPlugin * plugin)
|
||||
{
|
||||
gboolean ret = FALSE;
|
||||
|
||||
ret |= GST_ELEMENT_REGISTER (openalsink, plugin);
|
||||
ret |= GST_ELEMENT_REGISTER (openalsrc, plugin);
|
||||
GST_ELEMENT_REGISTER (openalsink, plugin);
|
||||
GST_ELEMENT_REGISTER (openalsrc, plugin);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
@ -6106,7 +6106,7 @@ mxf_metadata_multiple_descriptor_resolve (MXFMetadataBase * m,
|
|||
{
|
||||
MXFMetadataMultipleDescriptor *self = MXF_METADATA_MULTIPLE_DESCRIPTOR (m);
|
||||
MXFMetadataBase *current = NULL;
|
||||
guint i, have_subdescriptors = 0;
|
||||
guint i;
|
||||
#ifndef GST_DISABLE_GST_DEBUG
|
||||
gchar str[48];
|
||||
#endif
|
||||
|
@ -6122,7 +6122,6 @@ mxf_metadata_multiple_descriptor_resolve (MXFMetadataBase * m,
|
|||
if (current && MXF_IS_METADATA_GENERIC_DESCRIPTOR (current)) {
|
||||
if (mxf_metadata_base_resolve (current, metadata)) {
|
||||
self->sub_descriptors[i] = MXF_METADATA_GENERIC_DESCRIPTOR (current);
|
||||
have_subdescriptors++;
|
||||
} else {
|
||||
GST_ERROR ("Couldn't resolve descriptor %s",
|
||||
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)
|
||||
{
|
||||
gint n = self->num_slices++;
|
||||
gsize slice_size = slice->nalu.size;
|
||||
struct v4l2_ctrl_h264_slice_params *params;
|
||||
|
||||
/* Ensure array is large enough */
|
||||
if (self->slice_params->len < self->num_slices)
|
||||
g_array_set_size (self->slice_params, self->slice_params->len * 2);
|
||||
|
||||
if (needs_start_codes (self))
|
||||
slice_size += 3;
|
||||
|
||||
/* *INDENT-OFF* */
|
||||
params = &g_array_index (self->slice_params, struct v4l2_ctrl_h264_slice_params, n);
|
||||
*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,
|
||||
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,
|
||||
gint width, gint height, guint texture, gfloat center_x, gfloat center_y,
|
||||
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 */
|
||||
target_download_rate =
|
||||
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",
|
||||
demux->bandwidth_target_ratio, target_download_rate);
|
||||
|
|
|
@ -32,10 +32,8 @@
|
|||
static gboolean
|
||||
plugin_init (GstPlugin * plugin)
|
||||
{
|
||||
gboolean ret = FALSE;
|
||||
|
||||
ret |= GST_ELEMENT_REGISTER (osssrc, plugin);
|
||||
ret |= GST_ELEMENT_REGISTER (osssink, plugin);
|
||||
GST_ELEMENT_REGISTER (osssrc, plugin);
|
||||
GST_ELEMENT_REGISTER (osssink, plugin);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
@ -202,7 +202,6 @@ gst_oss_helper_rate_probe_check (GstOssProbe * probe)
|
|||
GQueue *ranges;
|
||||
int exact_rates = 0;
|
||||
gboolean checking_exact_rates = TRUE;
|
||||
int n_checks = 0;
|
||||
gboolean result = TRUE;
|
||||
|
||||
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->min = gst_oss_helper_rate_check_rate (probe, 1000);
|
||||
n_checks++;
|
||||
probe->max = gst_oss_helper_rate_check_rate (probe, 100000);
|
||||
/* a little bug workaround */
|
||||
{
|
||||
|
@ -223,7 +221,6 @@ gst_oss_helper_rate_probe_check (GstOssProbe * probe)
|
|||
probe->max = max;
|
||||
}
|
||||
}
|
||||
n_checks++;
|
||||
if (probe->min == -1 || probe->max == -1) {
|
||||
/* This is a workaround for drivers that return -EINVAL (or another
|
||||
* 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 */
|
||||
GST_DEBUG ("unexpected check_rate error");
|
||||
}
|
||||
n_checks++;
|
||||
|
||||
if (mid == mid_ret && checking_exact_rates) {
|
||||
int max_exact_matches = 20;
|
||||
|
|
|
@ -276,7 +276,7 @@ test_video_profile (const gchar * profile, gint profile_id,
|
|||
switch (i) {
|
||||
case 0:
|
||||
{
|
||||
gint nsize, npos, j, type, next_type;
|
||||
gint nsize, npos, type, next_type;
|
||||
GstMapInfo map;
|
||||
const guint8 *data;
|
||||
gsize size;
|
||||
|
@ -286,7 +286,6 @@ test_video_profile (const gchar * profile, gint profile_id,
|
|||
size = map.size;
|
||||
|
||||
npos = 0;
|
||||
j = 0;
|
||||
/* need SPS first */
|
||||
next_type = 7;
|
||||
/* loop through NALs */
|
||||
|
@ -311,7 +310,6 @@ test_video_profile (const gchar * profile, gint profile_id,
|
|||
default:
|
||||
break;
|
||||
}
|
||||
j++;
|
||||
}
|
||||
npos += nsize + 4;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue