+2006-10-16 Tim-Philipp Müller <tim at centricular dot net>
+
+ Patch by: Josep Torra Valles <josep at fluendo com>
+
+ * ext/cairo/gsttimeoverlay.c: (gst_cairo_time_overlay_transform):
+ * ext/esd/esdsink.c: (gst_esdsink_write):
+ * ext/flac/gstflacdec.c: (gst_flac_dec_length),
+ (gst_flac_dec_read_seekable), (gst_flac_dec_chain),
+ (gst_flac_dec_send_newsegment):
+ * ext/flac/gstflacenc.c: (gst_flac_enc_seek_callback),
+ (gst_flac_enc_tell_callback):
+ * ext/jpeg/smokecodec.c: (find_best_size), (smokecodec_encode),
+ (smokecodec_parse_header), (smokecodec_decode):
+ * gst/avi/gstavimux.c: (gst_avi_mux_write_avix_index):
+ * gst/debug/efence.c: (gst_fenced_buffer_alloc):
+ * gst/goom/Makefile.am:
+ * gst/goom/gstgoom.c:
+ * gst/icydemux/gsticydemux.c: (gst_icydemux_typefind_or_forward):
+ * gst/rtsp/gstrtspsrc.c:
+ * gst/rtsp/rtspconnection.c: (rtsp_connection_read):
+ * gst/udp/gstudpsink.c:
+ * gst/udp/gstudpsrc.c:
+ * gst/wavparse/gstwavparse.c: (gst_wavparse_change_state):
+ * sys/sunaudio/gstsunaudiomixertrack.h:
+ Fix a bunch of problems discovered by the Forte compiler, mostly type
+ mixups and pointer arithmetics with void pointers. Fixes #362603.
+
2006-10-12 Tim-Philipp Müller <tim at centricular dot net>
* ext/speex/gstspeex.c: (plugin_init):
int i, j;
unsigned char *image;
cairo_text_extents_t extents;
- gpointer dest, src;
+ guint8 *dest, *src;
cairo_surface_t *font_surface;
cairo_t *text_cairo;
GstFlowReturn ret = GST_FLOW_OK;
goto write_error;
to_write -= done;
- data += done;
+ data = (char *) data + done;
}
return length;
flacdec = GST_FLAC_DEC (client_data);
if (!(peer = gst_pad_get_peer (flacdec->sinkpad)))
- return FLAC__SEEKABLE_STREAM_DECODER_TELL_STATUS_ERROR;
+ return FLAC__SEEKABLE_STREAM_DECODER_LENGTH_STATUS_ERROR;
gst_pad_query_duration (peer, &fmt, &len);
gst_object_unref (peer);
if (fmt != GST_FORMAT_BYTES || len == -1)
- return FLAC__SEEKABLE_STREAM_DECODER_TELL_STATUS_ERROR;
+ return FLAC__SEEKABLE_STREAM_DECODER_LENGTH_STATUS_ERROR;
*length = len;
if (gst_pad_pull_range (flacdec->sinkpad, flacdec->offset, *bytes,
&buf) != GST_FLOW_OK)
- return FLAC__SEEKABLE_STREAM_DECODER_READ_ERROR;
+ return FLAC__SEEKABLE_STREAM_DECODER_READ_STATUS_ERROR;
GST_DEBUG ("Read %d bytes at %" G_GUINT64_FORMAT,
GST_BUFFER_SIZE (buf), flacdec->offset);
static GstFlowReturn
gst_flac_dec_chain (GstPad * pad, GstBuffer * buf)
{
- FLAC__SeekableStreamDecoderState s;
+ FLAC__StreamDecoderState s;
GstFlacDec *dec;
gboolean got_audio_frame;
{
GstSegment *s = &flacdec->segment;
GstFormat target_format = GST_FORMAT_TIME;
- gint64 stop_time = GST_CLOCK_TIME_NONE;
+ gint64 stop_time = -1;
gint64 start_time = 0;
/* segment is in DEFAULT format, but we want to send a TIME newsegment */
flacenc = GST_FLAC_ENC (client_data);
if (flacenc->stopped)
- return FLAC__STREAM_ENCODER_OK;
+ return FLAC__SEEKABLE_STREAM_ENCODER_SEEK_STATUS_OK;
event = gst_event_new_new_segment (TRUE, 1.0, GST_FORMAT_BYTES,
absolute_byte_offset, GST_BUFFER_OFFSET_NONE, 0);
flacenc->offset = absolute_byte_offset;
- return FLAC__STREAM_ENCODER_OK;
+ return FLAC__SEEKABLE_STREAM_ENCODER_SEEK_STATUS_OK;
}
static FLAC__StreamEncoderWriteStatus
*absolute_byte_offset = flacenc->offset;
- return FLAC__STREAM_ENCODER_OK;
+ return FLAC__SEEKABLE_STREAM_ENCODER_TELL_STATUS_OK;
}
static gboolean
#include "smokecodec.h"
#include "smokeformat.h"
-#ifndef WIN32
-//#define DEBUG(a...) printf( a );
-#define DEBUG(a,...)
-#else
#include <gst/gstinfo.h>
-#define DEBUG GST_DEBUG
-#endif
-
-
struct _SmokeCodecInfo
{
w = sqchng;
h = sqchng;
- DEBUG ("guess: %d %d\n", w, h);
+ GST_DEBUG ("guess: %d %d", w, h);
free = w * h - blocks;
best = free;
bestw = w;
while (w < 256) {
- DEBUG ("current: %d %d\n", w, h);
+ GST_DEBUG ("current: %d %d", w, h);
if (free < best) {
best = free;
bestw = w;
STORE16 (out, IDX_NUM_BLOCKS, blocks);
out[IDX_FLAGS] = (flags & 0xff);
- DEBUG ("blocks %d, encoding %d\n", blocks, encoding);
+ GST_DEBUG ("blocks %d, encoding %d", blocks, encoding);
info->jdest.next_output_byte = &out[blocks * 2 + OFFS_PICT];
info->jdest.free_in_buffer = (*outsize) - OFFS_PICT;
if (!(flags & SMOKECODEC_KEYFRAME))
find_best_size (encoding, &blocks_w, &blocks_h);
- DEBUG ("best: %d %d\n", blocks_w, blocks_h);
+ GST_DEBUG ("best: %d %d", blocks_w, blocks_h);
info->cinfo.image_width = blocks_w * DCTSIZE * 2;
info->cinfo.image_height = blocks_h * DCTSIZE * 2;
info->minquality) * blocks) / max;
}
- DEBUG ("set q %d %d %d\n", quality, encoding, max);
+ GST_DEBUG ("set q %d %d %d", quality, encoding, max);
jpeg_set_quality (&info->cinfo, quality, TRUE);
- DEBUG ("start\n");
+ GST_DEBUG ("start");
jpeg_start_compress (&info->cinfo, TRUE);
for (i = 0; i < encoding; i++) {
put (ip, op, DCTSIZE, DCTSIZE, width / 2, 256 * DCTSIZE);
if ((i % blocks_w) == (blocks_w - 1) || (i == encoding - 1)) {
- DEBUG ("write %d\n", pos);
+ GST_DEBUG ("write %d", pos);
jpeg_write_raw_data (&info->cinfo, info->line, 2 * DCTSIZE);
}
}
- DEBUG ("finish\n");
+ GST_DEBUG ("finish");
jpeg_finish_compress (&info->cinfo);
}
STORE16 (out, IDX_SIZE, size);
*outsize = size + blocks * 2 + OFFS_PICT;
- DEBUG ("outsize %d\n", *outsize);
+ GST_DEBUG ("outsize %d", *outsize);
// and decode in reference frame again
if (info->refdec) {
if (info->width != *width ||
info->height != *height ||
info->fps_num != *fps_num || info->fps_denom != *fps_denom) {
- DEBUG ("new width: %d %d\n", *width, *height);
+ GST_DEBUG ("new width: %d %d", *width, *height);
info->reference = realloc (info->reference, 3 * ((*width) * (*height)) / 2);
info->width = *width;
&fps_num, &fps_denom);
READ16 (in, IDX_NUM_BLOCKS, blocks);
- DEBUG ("blocks %d\n", blocks);
+ GST_DEBUG ("blocks %d", blocks);
if (flags & SMOKECODEC_KEYFRAME)
decoding = width / (DCTSIZE * 2) * height / (DCTSIZE * 2);
info->jsrc.next_input_byte = &in[blocks * 2 + OFFS_PICT];
info->jsrc.bytes_in_buffer = insize - (blocks * 2 + OFFS_PICT);
- DEBUG ("header %02x %d\n", in[blocks * 2 + OFFS_PICT], insize);
+ GST_DEBUG ("header %02x %d", in[blocks * 2 + OFFS_PICT], insize);
res = jpeg_read_header (&info->dinfo, TRUE);
- DEBUG ("header %d %d %d\n", res, info->dinfo.image_width,
+ GST_DEBUG ("header %d %d %d", res, info->dinfo.image_width,
info->dinfo.image_height);
blocks_w = info->dinfo.image_width / (2 * DCTSIZE);
info->dinfo.output_width = info->dinfo.image_width;
info->dinfo.output_height = info->dinfo.image_height;
- DEBUG ("start\n");
+ GST_DEBUG ("start");
info->dinfo.do_fancy_upsampling = FALSE;
info->dinfo.do_block_smoothing = FALSE;
info->dinfo.out_color_space = JCS_YCbCr;
blockptr = 0;
for (i = 0; i < blocks_h; i++) {
- DEBUG ("read\n");
+ GST_DEBUG ("read");
jpeg_read_raw_data (&info->dinfo, info->line, 2 * DCTSIZE);
- DEBUG ("copy %d\n", blocks_w);
+ GST_DEBUG ("copy %d", blocks_w);
for (j = 0; j < blocks_w; j++) {
int pos;
int x, y;
x = pos % (width / (DCTSIZE * 2));
y = pos / (width / (DCTSIZE * 2));
- DEBUG ("block %d %d %d\n", pos, x, y);
+ GST_DEBUG ("block %d %d %d", pos, x, y);
ip = info->compbuf[0] + j * (DCTSIZE * 2);
op = info->reference + (x * (DCTSIZE * 2)) +
(y * DCTSIZE * width / 2);
put (ip, op, DCTSIZE, DCTSIZE, 256 * DCTSIZE, width / 2);
- DEBUG ("block done %d %d %d\n", pos, x, y);
+ GST_DEBUG ("block done %d %d %d", pos, x, y);
blockptr++;
if (blockptr >= decoding)
break;
}
}
- DEBUG ("finish\n");
+ GST_DEBUG ("finish");
jpeg_finish_decompress (&info->dinfo);
}
- DEBUG ("copy\n");
+ GST_DEBUG ("copy");
if (out != info->reference)
memcpy (out, info->reference, 3 * (width * height) / 2);
- DEBUG ("copy done\n");
+ GST_DEBUG ("copy done");
return SMOKECODEC_OK;
}
/* msb is set if not (!) keyframe */
GST_WRITE_UINT32_LE (buffdata + 4, GUINT32_FROM_LE (entry->size)
| (GUINT32_FROM_LE (entry->flags)
- & GST_RIFF_IF_KEYFRAME ? 0 : 1 << 31));
+ & GST_RIFF_IF_KEYFRAME ? 0 : 1U << 31));
buffdata += 8;
}
i--;
fenced_buffer->length = alloc_size - page_size;
#else
mprotect (region, page_size, PROT_NONE);
- mprotect (region + alloc_size - page_size, page_size, PROT_NONE);
+ mprotect ((char *) region + alloc_size - page_size, page_size, PROT_NONE);
fenced_buffer->region = region;
fenced_buffer->length = alloc_size;
/* Align to top of region, but force alignment to 4 bytes */
offset = alloc_size - page_size - length;
offset &= ~0x3;
- return region + offset;
+ return (void *) ((char *) region + offset);
} else {
- return region + page_size;
+ return (void *) ((char *) region + page_size);
}
}
libgstgoom_la_SOURCES = gstgoom.c goom_core.c $(GOOM_FILTER_FILES) graphic.c lines.c
-libgstgoom_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GOOM_FILTER_CFLAGS)
+libgstgoom_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS) $(GOOM_FILTER_CFLAGS)
libgstgoom_la_LIBADD = $(GST_BASE_LIBS) $(GST_LIBS)
libgstgoom_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
static gboolean gst_goom_src_event (GstPad * pad, GstEvent * event);
static gboolean gst_goom_sink_event (GstPad * pad, GstEvent * event);
-static GstPadLinkReturn gst_goom_sink_setcaps (GstPad * pad, GstCaps * caps);
-static GstPadLinkReturn gst_goom_src_setcaps (GstPad * pad, GstCaps * caps);
+static gboolean gst_goom_sink_setcaps (GstPad * pad, GstCaps * caps);
+static gboolean gst_goom_src_setcaps (GstPad * pad, GstCaps * caps);
static GstElementClass *parent_class = NULL;
if (icydemux->typefinding) {
GstBuffer *tf_buf;
GstCaps *caps;
- guint prob;
+ GstTypeFindProbability prob;
if (icydemux->typefind_buf) {
icydemux->typefind_buf = gst_buffer_join (icydemux->typefind_buf, buf);
/*** GSTURIHANDLER INTERFACE *************************************************/
-static guint
+static GstURIType
gst_rtspsrc_uri_get_type (void)
{
return GST_URI_SRC;
* SOFTWARE.
*/
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
#include <stdio.h>
#include <errno.h>
#include <unistd.h>
#include <arpa/inet.h>
#endif
+#ifdef HAVE_FIONREAD_IN_SYS_FILIO
+#include <sys/filio.h>
+#endif
+
#include "rtspconnection.h"
/* the select call is also performed on the control sockets, that way
goto read_error;
} else {
toread -= bytes;
- data += bytes;
+ data = (char *) data + bytes;
}
}
return RTSP_OK;
/*** GSTURIHANDLER INTERFACE *************************************************/
-static guint
+static GstURIType
gst_udpsink_uri_get_type (void)
{
return GST_URI_SINK;
/*** GSTURIHANDLER INTERFACE *************************************************/
-static guint
+static GstURIType
gst_udpsrc_uri_get_type (void)
{
return GST_URI_SRC;
GstStateChangeReturn ret;
GstWavParse *wav = GST_WAVPARSE (element);
- GST_DEBUG_OBJECT (wav, "changing state %s - %s",
- gst_element_state_get_name (GST_STATE_TRANSITION_CURRENT (transition)),
- gst_element_state_get_name (GST_STATE_TRANSITION_NEXT (transition)));
-
switch (transition) {
case GST_STATE_CHANGE_NULL_TO_READY:
break;
} GstSunAudioMixerTrackClass;
GType gst_sunaudiomixer_track_get_type (void);
-GstMixerTrack* gst_sunaudiomixer_track_new (gint track_num, gint max_chans, gint flags);
+GstMixerTrack* gst_sunaudiomixer_track_new (GstSunAudioTrackType track_num, gint max_chans, gint flags);
G_END_DECLS