ext/: ext/ogg/gstoggdemux.c (gst_ogg_demux_perform_seek) (gst_ogg_demux_read_chain...
authorAndy Wingo <wingo@pobox.com>
Mon, 9 May 2005 07:03:13 +0000 (07:03 +0000)
committerAndy Wingo <wingo@pobox.com>
Mon, 9 May 2005 07:03:13 +0000 (07:03 +0000)
Original commit message from CVS:
2005-05-09  Andy Wingo  <wingo@pobox.com>

* ext/alsa/gstalsasink.h:
* ext/gnomevfs/gstgnomevfssrc.c:
(gst_gnomevfssrc_get_icy_metadata):
* ext/ogg/gstoggdemux.c (gst_ogg_demux_perform_seek)
(gst_ogg_demux_read_chain, gst_ogg_demux_read_end_chain)
* ext/theora/theoradec.c (theora_dec_src_query)
(theora_dec_src_event, theora_dec_sink_event)
(theora_handle_comment_packet, theora_handle_data_packet):
* ext/theora/theoraenc.c (theora_enc_chain):
* ext/vorbis/vorbisdec.c (vorbis_dec_src_event)
(vorbis_dec_sink_event, vorbis_handle_comment_packet):
* gst/audioconvert/gstaudioconvert.c (gst_audio_convert_getcaps):
* gst/typefind/gsttypefindfunctions.c (mp3_type_find)
(qt_type_find):
* gst/videotestsrc/videotestsrc.c (paint_setup_I420)
(paint_setup_YV12, paint_setup_YUY2, paint_setup_UYVY)
(paint_setup_YVYU, paint_setup_IYU2, paint_setup_Y41B)
(paint_setup_Y42B, paint_setup_Y800, paint_setup_IMC1)
(paint_setup_IMC2, paint_setup_IMC3, paint_setup_IMC4)
(paint_setup_YVU9, paint_setup_YUV9, paint_setup_xRGB8888)
(paint_setup_xBGR8888, paint_setup_RGBx8888)
(paint_setup_BGRx8888, paint_setup_RGB888, paint_setup_BGR888)
(paint_setup_RGB565, paint_setup_xRGB1555):
* gst/videotestsrc/videotestsrc.h:
* sys/ximage/ximagesink.c (gst_ximagesink_buffer_alloc):
* sys/xvimage/xvimagesink.c (gst_xvimagesink_get_xv_support)
(gst_xvimagesink_setcaps, gst_xvimagesink_buffer_alloc):
GCC4 fixes.

* ext/ogg/gstoggdemux.c (gst_ogg_demux_find_chains): Use the new
gst_pad_query_position. Fixes oggdemux.

12 files changed:
ChangeLog
ext/alsa/gstalsasink.h
ext/gnomevfs/gstgnomevfssrc.c
ext/ogg/gstoggdemux.c
ext/theora/theoradec.c
ext/theora/theoraenc.c
ext/vorbis/vorbisdec.c
gst/typefind/gsttypefindfunctions.c
gst/videotestsrc/videotestsrc.c
gst/videotestsrc/videotestsrc.h
sys/ximage/ximagesink.c
sys/xvimage/xvimagesink.c

index 68c947c2e868a5298bec925dd83aafe217f9e9b7..d9d2174936255a6d10ff2caac2a9953afa676588 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,37 @@
+2005-05-09  Andy Wingo  <wingo@pobox.com>
+
+       * ext/alsa/gstalsasink.h:
+       * ext/gnomevfs/gstgnomevfssrc.c:
+       (gst_gnomevfssrc_get_icy_metadata):
+       * ext/ogg/gstoggdemux.c (gst_ogg_demux_perform_seek)
+       (gst_ogg_demux_read_chain, gst_ogg_demux_read_end_chain)
+       * ext/theora/theoradec.c (theora_dec_src_query)
+       (theora_dec_src_event, theora_dec_sink_event)
+       (theora_handle_comment_packet, theora_handle_data_packet):
+       * ext/theora/theoraenc.c (theora_enc_chain):
+       * ext/vorbis/vorbisdec.c (vorbis_dec_src_event)
+       (vorbis_dec_sink_event, vorbis_handle_comment_packet):
+       * gst/audioconvert/gstaudioconvert.c (gst_audio_convert_getcaps):
+       * gst/typefind/gsttypefindfunctions.c (mp3_type_find)
+       (qt_type_find):
+       * gst/videotestsrc/videotestsrc.c (paint_setup_I420)
+       (paint_setup_YV12, paint_setup_YUY2, paint_setup_UYVY)
+       (paint_setup_YVYU, paint_setup_IYU2, paint_setup_Y41B)
+       (paint_setup_Y42B, paint_setup_Y800, paint_setup_IMC1)
+       (paint_setup_IMC2, paint_setup_IMC3, paint_setup_IMC4)
+       (paint_setup_YVU9, paint_setup_YUV9, paint_setup_xRGB8888)
+       (paint_setup_xBGR8888, paint_setup_RGBx8888)
+       (paint_setup_BGRx8888, paint_setup_RGB888, paint_setup_BGR888)
+       (paint_setup_RGB565, paint_setup_xRGB1555):
+       * gst/videotestsrc/videotestsrc.h:
+       * sys/ximage/ximagesink.c (gst_ximagesink_buffer_alloc):
+       * sys/xvimage/xvimagesink.c (gst_xvimagesink_get_xv_support)
+       (gst_xvimagesink_setcaps, gst_xvimagesink_buffer_alloc):
+       GCC4 fixes.
+       
+       * ext/ogg/gstoggdemux.c (gst_ogg_demux_find_chains): Use the new
+       gst_pad_query_position. Fixes oggdemux.
+
 2005-05-08  David Schleef  <ds@schleef.org>
 
        * configure.ac: Require liboil.
index f5336597f12460bc495a1977afa3925bd105b988..f6ff7f07c0a8805fd1024d1ca94f2a344e3313fc 100644 (file)
@@ -57,8 +57,8 @@ struct _GstAlsaSink {
 
   guint buffer_time;
   guint period_time;
-  snd_pcm_sframes_t buffer_size;
-  snd_pcm_sframes_t period_size;
+  snd_pcm_uframes_t buffer_size;
+  snd_pcm_uframes_t period_size;
 };
 
 struct _GstAlsaSinkClass {
index 5a48452e512c4de6fcf1d3176a879e7d4c0c0dab..09d0b30a08d3c6e0679bd6673b57416364a16d79 100644 (file)
@@ -876,7 +876,7 @@ gst_gnomevfssrc_get_icy_metadata (GstGnomeVFSSrc * src)
   if (metadata_length == 0)
     return;
 
-  data = g_new (gchar, metadata_length + 1);
+  data = g_new (guchar, metadata_length + 1);
   pos = data;
 
   while (pos - data < metadata_length) {
@@ -892,7 +892,7 @@ gst_gnomevfssrc_get_icy_metadata (GstGnomeVFSSrc * src)
   }
 
   data[metadata_length] = 0;
-  tags = g_strsplit (data, "';", 0);
+  tags = g_strsplit ((gchar *) data, "';", 0);
 
   for (i = 0; tags[i]; i++) {
     if (!g_ascii_strncasecmp (tags[i], "StreamTitle=", 12)) {
index 8c2276dbb3bfa808d598c647a9008919cc175b5b..8bb1096742b6aaac342ba8016d3354a642810dac 100644 (file)
@@ -1339,7 +1339,7 @@ gst_ogg_demux_perform_seek (GstOggDemux * ogg, gint64 pos)
           continue;
 
         gst_pad_convert (pad->elem_pad,
-            GST_FORMAT_DEFAULT, granulepos, &format, &granuletime);
+            GST_FORMAT_DEFAULT, granulepos, &format, (gint64 *) & granuletime);
 
         GST_DEBUG_OBJECT (ogg,
             "found page with granule %" G_GINT64_FORMAT " and time %"
@@ -1578,7 +1578,8 @@ gst_ogg_demux_read_chain (GstOggDemux * ogg)
     GstFormat target = GST_FORMAT_TIME;
 
     gst_pad_convert (pad->elem_pad,
-        GST_FORMAT_DEFAULT, pad->first_granule, &target, &pad->first_time);
+        GST_FORMAT_DEFAULT, pad->first_granule, &target,
+        (gint64 *) & pad->first_time);
 
     pad->mode = GST_OGG_PAD_MODE_STREAMING;
     pad->packetno = 0;
@@ -1639,7 +1640,8 @@ gst_ogg_demux_read_end_chain (GstOggDemux * ogg, GstOggChain * chain)
     GstFormat target = GST_FORMAT_TIME;
 
     gst_pad_convert (pad->elem_pad,
-        GST_FORMAT_DEFAULT, pad->last_granule, &target, &pad->last_time);
+        GST_FORMAT_DEFAULT, pad->last_granule, &target,
+        (gint64 *) & pad->last_time);
   }
   return 0;
 }
@@ -1703,7 +1705,7 @@ gst_ogg_demux_find_chains (GstOggDemux * ogg)
 
   /* find length to read last page, we store this for later use. */
   format = GST_FORMAT_BYTES;
-  res = gst_pad_query (peer, GST_QUERY_TOTAL, &format, &ogg->length);
+  res = gst_pad_query_position (peer, &format, NULL, &ogg->length);
   gst_object_unref (GST_OBJECT (peer));
   if (!res)
     goto no_length;
index 1128c0119264e2d9ea0de2eeb1157a429ed5766b..e2d8b2663b61a3b8d050b58fafb48085768b83cf 100644 (file)
@@ -415,7 +415,7 @@ theora_dec_src_query (GstPad * pad, GstQueryType query, GstFormat * format,
    * intermediate step */
   my_format = GST_FORMAT_TIME;
   if (!theora_dec_sink_convert (dec->sinkpad, GST_FORMAT_DEFAULT, granulepos,
-          &my_format, &time))
+          &my_format, (gint64 *) & time))
     return FALSE;
   if (!gst_pad_convert (pad, my_format, time, format, value))
     return FALSE;
@@ -438,7 +438,7 @@ theora_dec_src_event (GstPad * pad, GstEvent * event)
 
   switch (GST_EVENT_TYPE (event)) {
     case GST_EVENT_SEEK:{
-      guint64 value;
+      gint64 value;
       GstEvent *real_seek;
 
       /* we have to ask our peer to seek to time here as we know
@@ -477,7 +477,7 @@ theora_dec_src_event (GstPad * pad, GstEvent * event)
 static gboolean
 theora_dec_sink_event (GstPad * pad, GstEvent * event)
 {
-  guint64 start_value, end_value, time, bytes;
+  gint64 start_value, end_value, time, bytes;
   gboolean ret = TRUE;
   GstTheoraDec *dec;
 
@@ -560,7 +560,8 @@ theora_handle_comment_packet (GstTheoraDec * dec, ogg_packet * packet)
   GST_BUFFER_DATA (buf) = packet->packet;
   GST_BUFFER_FLAG_SET (buf, GST_BUFFER_DONTFREE);
 
-  list = gst_tag_list_from_vorbiscomment_buffer (buf, "\201theora", 7,
+  list =
+      gst_tag_list_from_vorbiscomment_buffer (buf, (guint8 *) "\201theora", 7,
       &encoder);
 
   gst_buffer_unref (buf);
@@ -748,11 +749,11 @@ theora_handle_data_packet (GstTheoraDec * dec, ogg_packet * packet,
    * offset or size is odd (see above).
    */
   {
-    guint8 *dest_y, *src_y;
-    guint8 *dest_u, *src_u;
-    guint8 *dest_v, *src_v;
+    char *dest_y, *src_y;
+    char *dest_u, *src_u;
+    char *dest_v, *src_v;
 
-    dest_y = GST_BUFFER_DATA (out);
+    dest_y = (char *) GST_BUFFER_DATA (out);
     dest_u = dest_y + stride_y * height;
     dest_v = dest_u + stride_uv * cheight;
 
index 99c43ef12b12ca274a5fdd77a30367c6f2fd17bc..de2889304115270ac3ccbf1963d47d72e36d9d7d 100644 (file)
@@ -546,15 +546,15 @@ theora_enc_chain (GstPad * pad, GstBuffer * buffer)
       /* easy case, no cropping/conversion needed */
       pixels = GST_BUFFER_DATA (buffer);
 
-      yuv.y = pixels;
+      yuv.y = (char *) pixels;
       yuv.u = yuv.y + y_size;
       yuv.v = yuv.u + y_size / 4;
     } else {
       GstBuffer *newbuf;
       gint i;
-      guint8 *dest_y, *src_y;
-      guint8 *dest_u, *src_u;
-      guint8 *dest_v, *src_v;
+      char *dest_y, *src_y;
+      char *dest_u, *src_u;
+      char *dest_v, *src_v;
       gint src_y_stride, src_uv_stride;
       gint dst_y_stride, dst_uv_stride;
       gint width, height;
@@ -579,11 +579,11 @@ theora_enc_chain (GstPad * pad, GstBuffer * buffer)
       newbuf = gst_pad_alloc_buffer (enc->srcpad,
           GST_BUFFER_OFFSET_NONE, y_size * 3 / 2, GST_PAD_CAPS (enc->srcpad));
 
-      dest_y = yuv.y = GST_BUFFER_DATA (newbuf);
+      dest_y = yuv.y = (char *) GST_BUFFER_DATA (newbuf);
       dest_u = yuv.u = yuv.y + y_size;
       dest_v = yuv.v = yuv.u + y_size / 4;
 
-      src_y = GST_BUFFER_DATA (buffer);
+      src_y = (char *) GST_BUFFER_DATA (buffer);
       src_u = src_y + src_y_stride * ROUND_UP_2 (height);
       src_v = src_u + src_uv_stride * ROUND_UP_2 (height) / 2;
 
index 82a8cafd2b0660e9d47a943bcd0ae74362ae4d00..4e1dc8182df5e9eb870f0d926c9258992ddb062b 100644 (file)
@@ -265,7 +265,7 @@ vorbis_dec_src_event (GstPad * pad, GstEvent * event)
 
   switch (GST_EVENT_TYPE (event)) {
     case GST_EVENT_SEEK:{
-      guint64 value;
+      gint64 value;
       GstFormat my_format = GST_FORMAT_TIME;
 
       /* convert to time */
@@ -292,7 +292,7 @@ vorbis_dec_src_event (GstPad * pad, GstEvent * event)
 static gboolean
 vorbis_dec_sink_event (GstPad * pad, GstEvent * event)
 {
-  guint64 start_value, end_value, time, bytes;
+  gint64 start_value, end_value, time, bytes;
   gboolean ret = TRUE;
   GstVorbisDec *dec;
 
@@ -376,7 +376,8 @@ vorbis_handle_comment_packet (GstVorbisDec * vd, ogg_packet * packet)
   GST_BUFFER_DATA (buf) = packet->packet;
   GST_BUFFER_FLAG_SET (buf, GST_BUFFER_DONTFREE);
 
-  list = gst_tag_list_from_vorbiscomment_buffer (buf, "\003vorbis", 7,
+  list =
+      gst_tag_list_from_vorbiscomment_buffer (buf, (guint8 *) "\003vorbis", 7,
       &encoder);
 
   gst_buffer_unref (buf);
index c7ef5676b18c01de597cbe7d46bf5419a06bb691..107d6262c9a77e141ad5de5994042d41a3ee8fd9 100644 (file)
@@ -420,7 +420,7 @@ mp3_type_find (GstTypeFind * tf, gpointer unused)
       }
       if (*data == 0xFF) {
         guint8 *head_data = NULL;
-        guint layer, bitrate, samplerate, channels;
+        guint layer = 0, bitrate, samplerate, channels;
         guint found = 0;        /* number of valid headers found */
         guint64 offset = skipped;
 
@@ -440,6 +440,7 @@ mp3_type_find (GstTypeFind * tf, gpointer unused)
           head = GST_READ_UINT32_BE (head_data);
           if (!(length = mp3_type_frame_length_from_header (head, &layer,
                       &channels, &bitrate, &samplerate))) {
+
             GST_LOG ("%d. header at offset %" G_GUINT64_FORMAT
                 " (0x%X) was not an mp3 header", found + 1, offset,
                 (guint) offset);
@@ -837,6 +838,8 @@ mpeg_video_stream_type_find (GstTypeFind * tf, gpointer unused)
 static GstStaticCaps qt_caps = GST_STATIC_CAPS ("video/quicktime");
 
 #define QT_CAPS gst_static_caps_get(&qt_caps)
+#define STRNCMP(x,y,z) (strncmp ((char*)(x), (char*)(y), z))
+
 static void
 qt_type_find (GstTypeFind * tf, gpointer unused)
 {
@@ -846,14 +849,14 @@ qt_type_find (GstTypeFind * tf, gpointer unused)
   guint64 size;
 
   while ((data = gst_type_find_peek (tf, offset, 8)) != NULL) {
-    if (strncmp (&data[4], "wide", 4) != 0 &&
-        strncmp (&data[4], "moov", 4) != 0 &&
-        strncmp (&data[4], "mdat", 4) != 0 &&
-        strncmp (&data[4], "pnot", 4) != 0 &&
-        strncmp (&data[4], "PICT", 4) != 0 &&
-        strncmp (&data[4], "ftyp", 4) != 0 &&
-        strncmp (&data[4], "free", 4) != 0 &&
-        strncmp (&data[4], "skip", 4) != 0) {
+    if (STRNCMP (&data[4], "wide", 4) != 0 &&
+        STRNCMP (&data[4], "moov", 4) != 0 &&
+        STRNCMP (&data[4], "mdat", 4) != 0 &&
+        STRNCMP (&data[4], "pnot", 4) != 0 &&
+        STRNCMP (&data[4], "PICT", 4) != 0 &&
+        STRNCMP (&data[4], "ftyp", 4) != 0 &&
+        STRNCMP (&data[4], "free", 4) != 0 &&
+        STRNCMP (&data[4], "skip", 4) != 0) {
       tip = 0;
       break;
     }
@@ -1578,7 +1581,7 @@ start_with_type_find (GstTypeFind * tf, gpointer private)
 #define TYPE_FIND_REGISTER_START_WITH(plugin,name,rank,ext,_data,_size,_probability)\
 G_BEGIN_DECLS{                                                                 \
   GstTypeFindData *sw_data = g_new (GstTypeFindData, 1);                       \
-  sw_data->data = _data;                                                       \
+  sw_data->data = (gpointer)_data;                                             \
   sw_data->size = _size;                                                       \
   sw_data->probability = _probability;                                         \
   sw_data->caps = gst_caps_new_simple (name, NULL);                    \
@@ -1604,7 +1607,7 @@ riff_type_find (GstTypeFind * tf, gpointer private)
 #define TYPE_FIND_REGISTER_RIFF(plugin,name,rank,ext,_data)                    \
 G_BEGIN_DECLS{                                                                 \
   GstTypeFindData *sw_data = g_new (GstTypeFindData, 1);                       \
-  sw_data->data = _data;                                                       \
+  sw_data->data = (gpointer)_data;                                             \
   sw_data->size = 4;                                                           \
   sw_data->probability = GST_TYPE_FIND_MAXIMUM;                                        \
   sw_data->caps = gst_caps_new_simple (name, NULL);                    \
index afc5dcc919d7580f41ec6e17e557fa5a5dca19f5..f60cadd466a642630fa9c3312930da381fedb54a 100644 (file)
@@ -248,32 +248,32 @@ static int b_colors[] = { 255, 0, 255, 0, 255, 0, 255, 0, 128, 255, 0, 32 };
 #endif
 
 
-static void paint_setup_I420 (paintinfo * p, char *dest);
-static void paint_setup_YV12 (paintinfo * p, char *dest);
-static void paint_setup_YUY2 (paintinfo * p, char *dest);
-static void paint_setup_UYVY (paintinfo * p, char *dest);
-static void paint_setup_YVYU (paintinfo * p, char *dest);
-static void paint_setup_IYU2 (paintinfo * p, char *dest);
-static void paint_setup_Y41B (paintinfo * p, char *dest);
-static void paint_setup_Y42B (paintinfo * p, char *dest);
-static void paint_setup_Y800 (paintinfo * p, char *dest);
+static void paint_setup_I420 (paintinfo * p, unsigned char *dest);
+static void paint_setup_YV12 (paintinfo * p, unsigned char *dest);
+static void paint_setup_YUY2 (paintinfo * p, unsigned char *dest);
+static void paint_setup_UYVY (paintinfo * p, unsigned char *dest);
+static void paint_setup_YVYU (paintinfo * p, unsigned char *dest);
+static void paint_setup_IYU2 (paintinfo * p, unsigned char *dest);
+static void paint_setup_Y41B (paintinfo * p, unsigned char *dest);
+static void paint_setup_Y42B (paintinfo * p, unsigned char *dest);
+static void paint_setup_Y800 (paintinfo * p, unsigned char *dest);
 
 #if 0
-static void paint_setup_IMC1 (paintinfo * p, char *dest);
-static void paint_setup_IMC2 (paintinfo * p, char *dest);
-static void paint_setup_IMC3 (paintinfo * p, char *dest);
-static void paint_setup_IMC4 (paintinfo * p, char *dest);
+static void paint_setup_IMC1 (paintinfo * p, unsigned char *dest);
+static void paint_setup_IMC2 (paintinfo * p, unsigned char *dest);
+static void paint_setup_IMC3 (paintinfo * p, unsigned char *dest);
+static void paint_setup_IMC4 (paintinfo * p, unsigned char *dest);
 #endif
-static void paint_setup_YUV9 (paintinfo * p, char *dest);
-static void paint_setup_YVU9 (paintinfo * p, char *dest);
-static void paint_setup_xRGB8888 (paintinfo * p, char *dest);
-static void paint_setup_xBGR8888 (paintinfo * p, char *dest);
-static void paint_setup_RGBx8888 (paintinfo * p, char *dest);
-static void paint_setup_BGRx8888 (paintinfo * p, char *dest);
-static void paint_setup_RGB888 (paintinfo * p, char *dest);
-static void paint_setup_BGR888 (paintinfo * p, char *dest);
-static void paint_setup_RGB565 (paintinfo * p, char *dest);
-static void paint_setup_xRGB1555 (paintinfo * p, char *dest);
+static void paint_setup_YUV9 (paintinfo * p, unsigned char *dest);
+static void paint_setup_YVU9 (paintinfo * p, unsigned char *dest);
+static void paint_setup_xRGB8888 (paintinfo * p, unsigned char *dest);
+static void paint_setup_xBGR8888 (paintinfo * p, unsigned char *dest);
+static void paint_setup_RGBx8888 (paintinfo * p, unsigned char *dest);
+static void paint_setup_BGRx8888 (paintinfo * p, unsigned char *dest);
+static void paint_setup_RGB888 (paintinfo * p, unsigned char *dest);
+static void paint_setup_BGR888 (paintinfo * p, unsigned char *dest);
+static void paint_setup_RGB565 (paintinfo * p, unsigned char *dest);
+static void paint_setup_xRGB1555 (paintinfo * p, unsigned char *dest);
 
 static void paint_hline_I420 (paintinfo * p, int x, int y, int w);
 static void paint_hline_YUY2 (paintinfo * p, int x, int y, int w);
@@ -684,7 +684,7 @@ gst_videotestsrc_black (GstVideotestsrc * v, unsigned char *dest, int w, int h)
 #define ROUND_UP_8(x)  (((x)+7)&~7)
 
 static void
-paint_setup_I420 (paintinfo * p, char *dest)
+paint_setup_I420 (paintinfo * p, unsigned char *dest)
 {
   p->yp = dest;
   p->ystride = ROUND_UP_4 (p->width);
@@ -709,7 +709,7 @@ paint_hline_I420 (paintinfo * p, int x, int y, int w)
 }
 
 static void
-paint_setup_YV12 (paintinfo * p, char *dest)
+paint_setup_YV12 (paintinfo * p, unsigned char *dest)
 {
   p->yp = dest;
   p->ystride = ROUND_UP_4 (p->width);
@@ -721,7 +721,7 @@ paint_setup_YV12 (paintinfo * p, char *dest)
 }
 
 static void
-paint_setup_YUY2 (paintinfo * p, char *dest)
+paint_setup_YUY2 (paintinfo * p, unsigned char *dest)
 {
   p->yp = dest;
   p->up = dest + 1;
@@ -731,7 +731,7 @@ paint_setup_YUY2 (paintinfo * p, char *dest)
 }
 
 static void
-paint_setup_UYVY (paintinfo * p, char *dest)
+paint_setup_UYVY (paintinfo * p, unsigned char *dest)
 {
   p->yp = dest + 1;
   p->up = dest;
@@ -741,7 +741,7 @@ paint_setup_UYVY (paintinfo * p, char *dest)
 }
 
 static void
-paint_setup_YVYU (paintinfo * p, char *dest)
+paint_setup_YVYU (paintinfo * p, unsigned char *dest)
 {
   p->yp = dest;
   p->up = dest + 3;
@@ -764,7 +764,7 @@ paint_hline_YUY2 (paintinfo * p, int x, int y, int w)
 }
 
 static void
-paint_setup_IYU2 (paintinfo * p, char *dest)
+paint_setup_IYU2 (paintinfo * p, unsigned char *dest)
 {
   /* untested */
   p->yp = dest + 1;
@@ -786,7 +786,7 @@ paint_hline_IYU2 (paintinfo * p, int x, int y, int w)
 }
 
 static void
-paint_setup_Y41B (paintinfo * p, char *dest)
+paint_setup_Y41B (paintinfo * p, unsigned char *dest)
 {
   p->yp = dest;
   p->ystride = ROUND_UP_4 (p->width);
@@ -811,7 +811,7 @@ paint_hline_Y41B (paintinfo * p, int x, int y, int w)
 }
 
 static void
-paint_setup_Y42B (paintinfo * p, char *dest)
+paint_setup_Y42B (paintinfo * p, unsigned char *dest)
 {
   p->yp = dest;
   p->ystride = ROUND_UP_4 (p->width);
@@ -836,7 +836,7 @@ paint_hline_Y42B (paintinfo * p, int x, int y, int w)
 }
 
 static void
-paint_setup_Y800 (paintinfo * p, char *dest)
+paint_setup_Y800 (paintinfo * p, unsigned char *dest)
 {
   /* untested */
   p->yp = dest;
@@ -854,7 +854,7 @@ paint_hline_Y800 (paintinfo * p, int x, int y, int w)
 
 #if 0
 static void
-paint_setup_IMC1 (paintinfo * p, char *dest)
+paint_setup_IMC1 (paintinfo * p, unsigned char *dest)
 {
   p->yp = dest;
   p->up = dest + p->width * p->height;
@@ -862,7 +862,7 @@ paint_setup_IMC1 (paintinfo * p, char *dest)
 }
 
 static void
-paint_setup_IMC2 (paintinfo * p, char *dest)
+paint_setup_IMC2 (paintinfo * p, unsigned char *dest)
 {
   p->yp = dest;
   p->vp = dest + p->width * p->height;
@@ -870,7 +870,7 @@ paint_setup_IMC2 (paintinfo * p, char *dest)
 }
 
 static void
-paint_setup_IMC3 (paintinfo * p, char *dest)
+paint_setup_IMC3 (paintinfo * p, unsigned char *dest)
 {
   p->yp = dest;
   p->up = dest + p->width * p->height + p->width * p->height / 2;
@@ -878,7 +878,7 @@ paint_setup_IMC3 (paintinfo * p, char *dest)
 }
 
 static void
-paint_setup_IMC4 (paintinfo * p, char *dest)
+paint_setup_IMC4 (paintinfo * p, unsigned char *dest)
 {
   p->yp = dest;
   p->vp = dest + p->width * p->height + p->width / 2;
@@ -900,7 +900,7 @@ paint_hline_IMC1 (paintinfo * p, int x, int y, int w)
 #endif
 
 static void
-paint_setup_YVU9 (paintinfo * p, char *dest)
+paint_setup_YVU9 (paintinfo * p, unsigned char *dest)
 {
   int h = ROUND_UP_4 (p->height);
 
@@ -914,7 +914,7 @@ paint_setup_YVU9 (paintinfo * p, char *dest)
 }
 
 static void
-paint_setup_YUV9 (paintinfo * p, char *dest)
+paint_setup_YUV9 (paintinfo * p, unsigned char *dest)
 {
   /* untested */
   int h = ROUND_UP_4 (p->height);
@@ -942,7 +942,7 @@ paint_hline_YUV9 (paintinfo * p, int x, int y, int w)
 }
 
 static void
-paint_setup_xRGB8888 (paintinfo * p, char *dest)
+paint_setup_xRGB8888 (paintinfo * p, unsigned char *dest)
 {
   p->yp = dest + 1;
   p->up = dest + 2;
@@ -952,7 +952,7 @@ paint_setup_xRGB8888 (paintinfo * p, char *dest)
 }
 
 static void
-paint_setup_xBGR8888 (paintinfo * p, char *dest)
+paint_setup_xBGR8888 (paintinfo * p, unsigned char *dest)
 {
   p->yp = dest + 3;
   p->up = dest + 2;
@@ -962,7 +962,7 @@ paint_setup_xBGR8888 (paintinfo * p, char *dest)
 }
 
 static void
-paint_setup_RGBx8888 (paintinfo * p, char *dest)
+paint_setup_RGBx8888 (paintinfo * p, unsigned char *dest)
 {
   p->yp = dest + 0;
   p->up = dest + 1;
@@ -972,7 +972,7 @@ paint_setup_RGBx8888 (paintinfo * p, char *dest)
 }
 
 static void
-paint_setup_BGRx8888 (paintinfo * p, char *dest)
+paint_setup_BGRx8888 (paintinfo * p, unsigned char *dest)
 {
   p->yp = dest + 2;
   p->up = dest + 1;
@@ -982,7 +982,7 @@ paint_setup_BGRx8888 (paintinfo * p, char *dest)
 }
 
 static void
-paint_setup_RGB888 (paintinfo * p, char *dest)
+paint_setup_RGB888 (paintinfo * p, unsigned char *dest)
 {
   p->yp = dest + 0;
   p->up = dest + 1;
@@ -992,7 +992,7 @@ paint_setup_RGB888 (paintinfo * p, char *dest)
 }
 
 static void
-paint_setup_BGR888 (paintinfo * p, char *dest)
+paint_setup_BGR888 (paintinfo * p, unsigned char *dest)
 {
   p->yp = dest + 2;
   p->up = dest + 1;
@@ -1022,7 +1022,7 @@ paint_hline_str3 (paintinfo * p, int x, int y, int w)
 }
 
 static void
-paint_setup_RGB565 (paintinfo * p, char *dest)
+paint_setup_RGB565 (paintinfo * p, unsigned char *dest)
 {
   p->yp = dest;
   p->ystride = ROUND_UP_4 (p->width * 2);
@@ -1048,7 +1048,7 @@ paint_hline_RGB565 (paintinfo * p, int x, int y, int w)
 }
 
 static void
-paint_setup_xRGB1555 (paintinfo * p, char *dest)
+paint_setup_xRGB1555 (paintinfo * p, unsigned char *dest)
 {
   p->yp = dest;
   p->ystride = ROUND_UP_4 (p->width * 2);
index 56680ab26433fe173b96b94222ad55e7e9f23dec..ae757598e6eaeb68a0a7715aaf29159a38a4e8e3 100644 (file)
@@ -48,7 +48,7 @@ struct fourcc_list_struct
   char *fourcc;
   char *name;
   int bitspp;
-  void (*paint_setup) (paintinfo * p, char *dest);
+  void (*paint_setup) (paintinfo * p, unsigned char *dest);
   void (*paint_hline) (paintinfo * p, int x, int y, int w);
   int ext_caps;
   int depth;
index 71975472c14e1875dd340cb9d3dc2235a9a34770..aa1b7bbdfacc4c3ee730a13a3f2ebed4026cf016 100644 (file)
@@ -1282,7 +1282,7 @@ gst_ximagesink_buffer_alloc (GstBaseSink * bsink, guint64 offset, guint size,
     /* Storing some pointers in the buffer */
     GST_BUFFER_PRIVATE (buffer) = ximage;
 
-    GST_BUFFER_DATA (buffer) = ximage->ximage->data;
+    GST_BUFFER_DATA (buffer) = (guchar *) ximage->ximage->data;
     GST_BUFFER_FREE_DATA_FUNC (buffer) = gst_ximagesink_buffer_free;
     GST_BUFFER_SIZE (buffer) = ximage->size;
     return buffer;
index 735d8e7b466ee2beb992a34f3439c1bebc6cbc73..86c8041992edda50566172870a6e05b253c6d1ae 100644 (file)
@@ -684,7 +684,8 @@ static GstCaps *
 gst_xvimagesink_get_xv_support (GstXvImageSink * xvimagesink,
     GstXContext * xcontext)
 {
-  gint i, nb_adaptors;
+  gint i;
+  guint nb_adaptors;
   XvAdaptorInfo *adaptors;
   gint nb_formats;
   XvImageFormatValues *formats = NULL;
@@ -709,7 +710,7 @@ gst_xvimagesink_get_xv_support (GstXvImageSink * xvimagesink,
 
   xcontext->xv_port_id = 0;
 
-  GST_DEBUG ("Found %d XV adaptor(s)", nb_adaptors);
+  GST_DEBUG ("Found %u XV adaptor(s)", nb_adaptors);
 
   /* Now search for an adaptor that supports XvImageMask */
   for (i = 0; i < nb_adaptors && !xcontext->xv_port_id; i++) {
@@ -1196,7 +1197,7 @@ gst_xvimagesink_setcaps (GstBaseSink * bsink, GstCaps * caps)
 {
   GstXvImageSink *xvimagesink;
   GstStructure *structure;
-  gint im_format = 0;
+  guint32 im_format = 0;
   gboolean ret;
   gint video_width, video_height;
   gint video_par_n, video_par_d;        /* video's PAR */
@@ -1527,7 +1528,7 @@ gst_xvimagesink_buffer_alloc (GstBaseSink * bsink, guint64 offset, guint size,
     /* Storing some pointers in the buffer */
     GST_BUFFER_PRIVATE (buffer) = xvimage;
 
-    GST_BUFFER_DATA (buffer) = xvimage->xvimage->data;
+    GST_BUFFER_DATA (buffer) = (guchar *) xvimage->xvimage->data;
     GST_BUFFER_FREE_DATA_FUNC (buffer) = gst_xvimagesink_buffer_free;
     GST_BUFFER_SIZE (buffer) = xvimage->size;
     gst_buffer_set_caps (buffer, caps);