mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-28 19:20:35 +00:00
ext/gnomevfs/: Fix URI interface implementation return type.
Original commit message from CVS: 2006-10-10 Zaheer Abbas Merali <zaheerabbas at merali dot org> Patch by: Josep Torre Valles <josep@fluendo.com> * 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.
This commit is contained in:
parent
667ba9284c
commit
4de10dacb6
18 changed files with 80 additions and 28 deletions
44
ChangeLog
44
ChangeLog
|
@ -1,3 +1,47 @@
|
|||
2006-10-10 Zaheer Abbas Merali <zaheerabbas at merali dot org>
|
||||
|
||||
Patch by: Josep Torre Valles <josep@fluendo.com>
|
||||
|
||||
* 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 <tim at centricular dot net>
|
||||
|
||||
Patch by: Ferenc Gerlits <fgerlits at gmail com>
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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. */
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue