ext/: ext/ogg/gstoggdemux.c (gst_ogg_demux_perform_seek) (gst_ogg_demux_read_chain, gst_ogg_demux_read_end_chain) ext...

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.
This commit is contained in:
Andy Wingo 2005-05-09 07:03:13 +00:00
parent b355a0c389
commit 276f6fe559
12 changed files with 130 additions and 88 deletions

View file

@ -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.

View 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 {

View 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)) {

View 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;

View 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;

View 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;

View 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);

View 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); \

View 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);

View 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;

View 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;

View 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);