Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4221>
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;
typedef struct _GstBs2b GstBs2b;
typedef struct _GstBs2bClass GstBs2bClass;
+typedef void (*GstBs2bProcessFunc)(t_bs2bdp bs2bdp, void *sample, int n);
struct _GstBs2b
{
/*< private > */
GMutex bs2b_lock;
t_bs2bdp bs2bdp;
- void (*func) ();
+ GstBs2bProcessFunc func;
guint bytes_per_sample;
};
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;
}
{
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
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));
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) {
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);
* 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);
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;
}
GQueue *ranges;
int exact_rates = 0;
gboolean checking_exact_rates = TRUE;
- int n_checks = 0;
gboolean result = TRUE;
ranges = g_queue_new ();
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 */
{
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
/* 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;
switch (i) {
case 0:
{
- gint nsize, npos, j, type, next_type;
+ gint nsize, npos, type, next_type;
GstMapInfo map;
const guint8 *data;
gsize size;
size = map.size;
npos = 0;
- j = 0;
/* need SPS first */
next_type = 7;
/* loop through NALs */
default:
break;
}
- j++;
}
npos += nsize + 4;
}