diff --git a/ChangeLog b/ChangeLog index df2bf312c2..deca9d2102 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,47 @@ +2006-10-10 Zaheer Abbas Merali + + Patch by: Josep Torre Valles + + * ext/gnomevfs/gstgnomevfssink.c: + * ext/gnomevfs/gstgnomevfssrc.c: + Fix URI interface implementation return type. + * ext/pango/gsttextoverlay.c: (gst_text_overlay_set_property): + Fix what looks like a copy/paste issue when assigning values. + * gst-libs/gst/audio/gstaudiofiltertemplate.c: + (gst_audio_filter_template_get_type): + Cast to prevent Forte warnings. + * gst-libs/gst/cdda/gstcddabasesrc.c: (gst_cdda_base_src_create): + Fix URI interface implementation return type. + gst_pad_query_position requires a signed integer pointer as + 3rd parameter, GstClockTime is unsigned. + * gst/audioconvert/audioconvert.c: + Fix integer overflow when treated as signed. + * gst/audioresample/resample.c: (resample_add_input_data): + Cast to prevent warnings on Forte. + * gst/ffmpegcolorspace/imgconvert.c: (build_rgb_palette): + Fix integer overflow when treated as signed. + * gst/ffmpegcolorspace/imgconvert_template.h: + Fix integer overflow when treated as signed. RGBA_OUT shifts bits. + * gst/playback/gstdecodebin.c: (queue_filled_cb), + (cleanup_decodebin): + Who initialises a guint to -1! + Cast function pointers to prevent warnings on Forte. + * gst/playback/gstplaybasebin.c: (queue_deadlock_check), + (queue_threshold_reached): + Cast function pointers correctly to prevent warnings on Forte. + * gst/playback/gststreaminfo.c: (gst_stream_info_dispose): + Cast function pointers correctly to prevent warnings on Forte. + * gst/subparse/gstssaparse.c: (gst_ssa_parse_setcaps): + Obvious change to unsigned, 0xEF > max signed char. + * gst/tcp/gstmultifdsink.c: (get_buffers_max), (count_burst_unit): + GstClockTime is unsigned, initialise correctly. + * gst/tcp/gsttcp.c: (gst_tcp_socket_write): + Cast so pointer arithemetic doesn't cause warnings on Forte. + * gst/videorate/gstvideorate.c: + Use correct return value. + * tests/examples/seek/scrubby.c: + GstClockTime is unsigned, initialise correctly. + 2006-10-10 Tim-Philipp Müller Patch by: Ferenc Gerlits diff --git a/ext/gnomevfs/gstgnomevfssink.c b/ext/gnomevfs/gstgnomevfssink.c index 51c7d74d66..b454d86bb6 100644 --- a/ext/gnomevfs/gstgnomevfssink.c +++ b/ext/gnomevfs/gstgnomevfssink.c @@ -583,7 +583,7 @@ gst_gnome_vfs_sink_render (GstBaseSink * basesink, GstBuffer * buf) /*** GSTURIHANDLER INTERFACE *************************************************/ -static guint +static GstURIType gst_gnome_vfs_sink_uri_get_type (void) { return GST_URI_SINK; diff --git a/ext/gnomevfs/gstgnomevfssrc.c b/ext/gnomevfs/gstgnomevfssrc.c index 6e82ffd8c1..4b44b0f006 100644 --- a/ext/gnomevfs/gstgnomevfssrc.c +++ b/ext/gnomevfs/gstgnomevfssrc.c @@ -339,7 +339,7 @@ gst_gnome_vfs_src_finalize (GObject * object) * URI interface support. */ -static guint +static GstURIType gst_gnome_vfs_src_uri_get_type (void) { return GST_URI_SRC; diff --git a/ext/pango/gsttextoverlay.c b/ext/pango/gsttextoverlay.c index e1d35cc148..b7537dd7af 100644 --- a/ext/pango/gsttextoverlay.c +++ b/ext/pango/gsttextoverlay.c @@ -576,11 +576,11 @@ gst_text_overlay_set_property (GObject * object, guint prop_id, const gchar *s = g_value_get_string (value); if (s && g_ascii_strcasecmp (s, "left") == 0) - overlay->valign = GST_TEXT_OVERLAY_HALIGN_LEFT; + overlay->halign = GST_TEXT_OVERLAY_HALIGN_LEFT; else if (s && g_ascii_strcasecmp (s, "center") == 0) - overlay->valign = GST_TEXT_OVERLAY_HALIGN_CENTER; + overlay->halign = GST_TEXT_OVERLAY_HALIGN_CENTER; else if (s && g_ascii_strcasecmp (s, "right") == 0) - overlay->valign = GST_TEXT_OVERLAY_HALIGN_RIGHT; + overlay->halign = GST_TEXT_OVERLAY_HALIGN_RIGHT; else g_warning ("Invalid value '%s' for textoverlay property 'halign'", GST_STR_NULL (s)); diff --git a/gst-libs/gst/audio/gstaudiofiltertemplate.c b/gst-libs/gst/audio/gstaudiofiltertemplate.c index c671c043b7..7e0b8b6021 100644 --- a/gst-libs/gst/audio/gstaudiofiltertemplate.c +++ b/gst-libs/gst/audio/gstaudiofiltertemplate.c @@ -108,7 +108,7 @@ gst_audio_filter_template_get_type (void) NULL, gst_audio_filter_template_class_init, NULL, - gst_audio_filter_template_init, + (gpointer) gst_audio_filter_template_init, sizeof (GstAudioFilterTemplate), 0, NULL, diff --git a/gst-libs/gst/cdda/gstcddabasesrc.c b/gst-libs/gst/cdda/gstcddabasesrc.c index 5c00db1845..adc0c29a6f 100644 --- a/gst-libs/gst/cdda/gstcddabasesrc.c +++ b/gst-libs/gst/cdda/gstcddabasesrc.c @@ -884,7 +884,7 @@ gst_cdda_base_src_handle_event (GstBaseSrc * basesrc, GstEvent * event) return ret; } -static guint +static GstURIType gst_cdda_base_src_uri_get_type (void) { return GST_URI_SRC; @@ -1481,6 +1481,7 @@ gst_cdda_base_src_stop (GstBaseSrc * basesrc) return TRUE; } + static GstFlowReturn gst_cdda_base_src_create (GstPushSrc * pushsrc, GstBuffer ** buffer) { @@ -1489,8 +1490,10 @@ gst_cdda_base_src_create (GstPushSrc * pushsrc, GstBuffer ** buffer) GstBuffer *buf; GstFormat format; gboolean eos; - gint64 position = GST_CLOCK_TIME_NONE; - gint64 duration = GST_CLOCK_TIME_NONE; + + GstClockTime position = GST_CLOCK_TIME_NONE; + GstClockTime duration = GST_CLOCK_TIME_NONE; + gint64 qry_position; g_assert (klass->read_sector != NULL); @@ -1544,12 +1547,14 @@ gst_cdda_base_src_create (GstPushSrc * pushsrc, GstBuffer ** buffer) } format = GST_FORMAT_TIME; - if (gst_pad_query_position (GST_BASE_SRC_PAD (src), &format, &position)) { + if (gst_pad_query_position (GST_BASE_SRC_PAD (src), &format, &qry_position)) { + position = (GstClockTime) qry_position; + gint64 next_ts = 0; ++src->cur_sector; if (gst_pad_query_position (GST_BASE_SRC_PAD (src), &format, &next_ts)) { - duration = next_ts - position; + duration = (GstClockTime) (next_ts - qry_position); } --src->cur_sector; } diff --git a/gst/audioconvert/audioconvert.c b/gst/audioconvert/audioconvert.c index 5a78ca56ab..6ec254ca56 100644 --- a/gst/audioconvert/audioconvert.c +++ b/gst/audioconvert/audioconvert.c @@ -32,7 +32,7 @@ #define INT2FLOAT(i) (4.6566128752457969e-10 * ((gfloat)i)) /* sign bit in the intermediate format */ -#define SIGNED (1<<31) +#define SIGNED (1U<<31) /*** * unpack code diff --git a/gst/audioresample/resample.c b/gst/audioresample/resample.c index 8ad22e8529..8a73de31b4 100644 --- a/gst/audioresample/resample.c +++ b/gst/audioresample/resample.c @@ -114,7 +114,7 @@ resample_add_input_data (ResampleState * r, void *data, int size, buffer = audioresample_buffer_new_with_data (data, size); buffer->free = resample_buffer_free; - buffer->priv2 = free_func; + buffer->priv2 = (void *) free_func; buffer->priv = closure; audioresample_buffer_queue_push (r->queue, buffer); diff --git a/gst/ffmpegcolorspace/imgconvert.c b/gst/ffmpegcolorspace/imgconvert.c index 4fb4efb781..c82e2ae77f 100644 --- a/gst/ffmpegcolorspace/imgconvert.c +++ b/gst/ffmpegcolorspace/imgconvert.c @@ -1468,7 +1468,7 @@ build_rgb_palette (uint8_t * palette, int has_alpha) for (r = 0; r < 6; r++) { for (g = 0; g < 6; g++) { for (b = 0; b < 6; b++) { - pal[i++] = (0xff << 24) | (pal_value[r] << 16) | + pal[i++] = (0xffU << 24) | (pal_value[r] << 16) | (pal_value[g] << 8) | pal_value[b]; } } diff --git a/gst/ffmpegcolorspace/imgconvert_template.h b/gst/ffmpegcolorspace/imgconvert_template.h index 5b27fdc964..225f754075 100644 --- a/gst/ffmpegcolorspace/imgconvert_template.h +++ b/gst/ffmpegcolorspace/imgconvert_template.h @@ -18,7 +18,7 @@ */ #ifndef RGB_OUT -#define RGB_OUT(d, r, g, b) RGBA_OUT(d, r, g, b, 0xff) +#define RGB_OUT(d, r, g, b) RGBA_OUT(d, r, g, b, 0xffU) #endif static void glue(yuv420p_to_, RGB_NAME)(AVPicture *dst, const AVPicture *src, diff --git a/gst/playback/gstdecodebin.c b/gst/playback/gstdecodebin.c index 55267b233b..efbf23695b 100644 --- a/gst/playback/gstdecodebin.c +++ b/gst/playback/gstdecodebin.c @@ -1161,7 +1161,7 @@ queue_filled_cb (GstElement * queue, GstDecodeBin * decode_bin) * we need to enlarge @queue */ for (tmp = decode_bin->queues; tmp; tmp = g_list_next (tmp)) { GstElement *aqueue = GST_ELEMENT (tmp->data); - guint levelbytes = -1; + guint levelbytes = 0; if (aqueue != queue) { g_object_get (G_OBJECT (aqueue), "current-level-bytes", &levelbytes, @@ -1503,7 +1503,8 @@ cleanup_decodebin (GstDecodeBin * decode_bin) typefind_pad = gst_element_get_pad (decode_bin->typefind, "src"); if (GST_IS_PAD (typefind_pad)) { - g_signal_handlers_block_by_func (typefind_pad, unlinked, decode_bin); + g_signal_handlers_block_by_func (typefind_pad, (gpointer) unlinked, + decode_bin); } elem_it = gst_bin_iterate_elements (GST_BIN (decode_bin)); @@ -1514,7 +1515,8 @@ cleanup_decodebin (GstDecodeBin * decode_bin) case GST_ITERATOR_OK: if (element != decode_bin->typefind && element != decode_bin->fakesink) { GST_DEBUG_OBJECT (element, "removing autoplugged element"); - g_signal_handlers_disconnect_by_func (element, unlinked, decode_bin); + g_signal_handlers_disconnect_by_func (element, (gpointer) unlinked, + decode_bin); gst_element_set_state (element, GST_STATE_NULL); gst_bin_remove (GST_BIN (decode_bin), element); } @@ -1562,7 +1564,8 @@ cleanup_decodebin (GstDecodeBin * decode_bin) gst_iterator_free (gpad_it); if (GST_IS_PAD (typefind_pad)) { - g_signal_handlers_unblock_by_func (typefind_pad, unlinked, decode_bin); + g_signal_handlers_unblock_by_func (typefind_pad, (gpointer) unlinked, + decode_bin); gst_object_unref (typefind_pad); } } diff --git a/gst/playback/gstplaybasebin.c b/gst/playback/gstplaybasebin.c index 78a797e048..b611c27fdc 100644 --- a/gst/playback/gstplaybasebin.c +++ b/gst/playback/gstplaybasebin.c @@ -560,7 +560,7 @@ queue_deadlock_check (GstElement * queue, GstPlayBaseBin * play_base_bin) /* bytes limit is removed, we cannot deadlock anymore */ g_signal_handlers_disconnect_by_func (queue, - G_CALLBACK (queue_deadlock_check), play_base_bin); + (gpointer) queue_deadlock_check, play_base_bin); } else { GST_DEBUG_OBJECT (play_base_bin, "no deadlock"); } @@ -598,7 +598,7 @@ queue_threshold_reached (GstElement * queue, GstPlayBaseBin * play_base_bin) /* we disconnect the signal so that we don't get called for every buffer. */ g_signal_handlers_disconnect_by_func (queue, - G_CALLBACK (queue_threshold_reached), play_base_bin); + (gpointer) queue_threshold_reached, play_base_bin); /* now place the limits at the low threshold. When we hit this limit, the * underrun signal will be called. The underrun signal is always connected. */ diff --git a/gst/playback/gststreaminfo.c b/gst/playback/gststreaminfo.c index 3d2f7530f0..d86ce509e9 100644 --- a/gst/playback/gststreaminfo.c +++ b/gst/playback/gststreaminfo.c @@ -249,7 +249,7 @@ gst_stream_info_dispose (GObject * object) GST_PAD_CAST (stream_info->object)); if (parent != NULL) { g_signal_handlers_disconnect_by_func (parent, - G_CALLBACK (stream_info_change_state), stream_info); + (gpointer) stream_info_change_state, stream_info); gst_object_unref (parent); } diff --git a/gst/subparse/gstssaparse.c b/gst/subparse/gstssaparse.c index 4471e5d964..94e83ab48a 100644 --- a/gst/subparse/gstssaparse.c +++ b/gst/subparse/gstssaparse.c @@ -138,7 +138,7 @@ gst_ssa_parse_setcaps (GstPad * sinkpad, GstCaps * caps) GstSsaParse *parse = GST_SSA_PARSE (GST_PAD_PARENT (sinkpad)); const GValue *val; GstStructure *s; - const gchar bom_utf8[] = { 0xEF, 0xBB, 0xBF }; + const guchar bom_utf8[] = { 0xEF, 0xBB, 0xBF }; GstBuffer *priv; gchar *data; guint size; diff --git a/gst/tcp/gstmultifdsink.c b/gst/tcp/gstmultifdsink.c index f923e5239b..e48f24013b 100644 --- a/gst/tcp/gstmultifdsink.c +++ b/gst/tcp/gstmultifdsink.c @@ -1293,7 +1293,7 @@ get_buffers_max (GstMultiFdSink * sink, gint64 max) int i; int len; gint64 diff; - GstClockTime first = -1; + GstClockTime first = GST_CLOCK_TIME_NONE; len = sink->bufqueue->len; @@ -1492,7 +1492,7 @@ count_burst_unit (GstMultiFdSink * sink, gint * min_idx, GstUnitType min_unit, { gint bytes_min = -1, buffers_min = -1; gint bytes_max = -1, buffers_max = -1; - GstClockTime time_min = -1, time_max = -1; + GstClockTime time_min = GST_CLOCK_TIME_NONE, time_max = GST_CLOCK_TIME_NONE; assign_value (min_unit, min_value, &bytes_min, &buffers_min, &time_min); assign_value (max_unit, max_value, &bytes_max, &buffers_max, &time_max); diff --git a/gst/tcp/gsttcp.c b/gst/tcp/gsttcp.c index 73f30066c8..f9fa0ee155 100644 --- a/gst/tcp/gsttcp.c +++ b/gst/tcp/gsttcp.c @@ -107,7 +107,7 @@ gst_tcp_socket_write (int socket, const void *buf, size_t count) size_t bytes_written = 0; while (bytes_written < count) { - ssize_t wrote = send (socket, buf + bytes_written, + ssize_t wrote = send (socket, (const char *) buf + bytes_written, count - bytes_written, MSG_NOSIGNAL); if (wrote <= 0) { diff --git a/gst/videorate/gstvideorate.c b/gst/videorate/gstvideorate.c index 3a31fa83af..d6d7417295 100644 --- a/gst/videorate/gstvideorate.c +++ b/gst/videorate/gstvideorate.c @@ -478,7 +478,7 @@ gst_video_rate_swap_prev (GstVideoRate * videorate, GstBuffer * buffer, videorate->prev_ts = time; } -static GstFlowReturn +static gboolean gst_video_rate_event (GstPad * pad, GstEvent * event) { GstVideoRate *videorate; diff --git a/tests/examples/seek/scrubby.c b/tests/examples/seek/scrubby.c index f7121b87ce..43da052c17 100644 --- a/tests/examples/seek/scrubby.c +++ b/tests/examples/seek/scrubby.c @@ -35,7 +35,7 @@ static guint schanged_id = 0; #define UPDATE_INTERVAL 500 gdouble prev_range = -1.0; -GstClockTime prev_time = -1; +GstClockTime prev_time = GST_CLOCK_TIME_NONE; gdouble cur_range; GstClockTime cur_time; GstClockTimeDiff diff;