From 530560838bc36868fcb25f089f73220fc398bb53 Mon Sep 17 00:00:00 2001 From: David Schleef Date: Fri, 27 Feb 2004 23:36:43 +0000 Subject: [PATCH] patches from jmmv@menta.net (Julio M. Merino Vidal) Original commit message from CVS: patches from jmmv@menta.net (Julio M. Merino Vidal) * gst/interleave/deinterleave.c: (deinterleave_chain): Fix GST_ELEMENT_ERROR call (bug #135634) * gst/interleave/interleave.c: (interleave_buffered_loop), (interleave_bytestream_loop): Don't use alloca() (bug #135640) * sys/cdrom/gstcdplayer_ioctl_bsd.h: Fix ioctls on NetBSD (bug #135645) * sys/oss/gstosssink.c: (gst_osssink_get_delay), (gst_osssink_chain): Fix ioctls on NetBSD. (bug #135644) * sys/v4l/v4lmjpegsrc_calls.c: (gst_v4lmjpegsrc_sync_next_frame), (gst_v4lmjpegsrc_set_capture), (gst_v4lmjpegsrc_set_capture_m), (gst_v4lmjpegsrc_capture_init), (gst_v4lmjpegsrc_requeue_frame): Fix GST_ELEMENT_ERROR call. * sys/v4l/v4lsrc_calls.c: (gst_v4lsrc_try_palette): Fix GST_ELEMENT_ERROR call. --- ChangeLog | 18 ++++++++++++++++++ sys/v4l/v4lmjpegsrc_calls.c | 30 +++++++++++++++++------------- sys/v4l/v4lsrc_calls.c | 2 +- 3 files changed, 36 insertions(+), 14 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0b36fb8..1a6806d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,21 @@ +2004-02-27 David Schleef + + patches from jmmv@menta.net (Julio M. Merino Vidal) + + * gst/interleave/deinterleave.c: (deinterleave_chain): Fix + GST_ELEMENT_ERROR call (bug #135634) + * gst/interleave/interleave.c: (interleave_buffered_loop), + (interleave_bytestream_loop): Don't use alloca() (bug #135640) + * sys/cdrom/gstcdplayer_ioctl_bsd.h: Fix ioctls on NetBSD (bug #135645) + * sys/oss/gstosssink.c: (gst_osssink_get_delay), + (gst_osssink_chain): Fix ioctls on NetBSD. (bug #135644) + * sys/v4l/v4lmjpegsrc_calls.c: (gst_v4lmjpegsrc_sync_next_frame), + (gst_v4lmjpegsrc_set_capture), (gst_v4lmjpegsrc_set_capture_m), + (gst_v4lmjpegsrc_capture_init), (gst_v4lmjpegsrc_requeue_frame): + Fix GST_ELEMENT_ERROR call. + * sys/v4l/v4lsrc_calls.c: (gst_v4lsrc_try_palette): Fix + GST_ELEMENT_ERROR call. + 2004-02-27 Benjamin Otte * gst-libs/gst/audio/audio.h: diff --git a/sys/v4l/v4lmjpegsrc_calls.c b/sys/v4l/v4lmjpegsrc_calls.c index 525ddd0..93d974f 100644 --- a/sys/v4l/v4lmjpegsrc_calls.c +++ b/sys/v4l/v4lmjpegsrc_calls.c @@ -99,7 +99,7 @@ gst_v4lmjpegsrc_sync_next_frame (GstV4lMjpegSrc *v4lmjpegsrc, while (ioctl(GST_V4LELEMENT(v4lmjpegsrc)->video_fd, MJPIOC_SYNC, &(v4lmjpegsrc->bsync)) < 0) { if (errno != EINTR) { - GST_ELEMENT_ERROR (v4lmjpegsrc, RESOURCE, SYNC, NULL, GST_ERROR_SYSTEM); + GST_ELEMENT_ERROR (v4lmjpegsrc, RESOURCE, SYNC, (NULL), GST_ERROR_SYSTEM); return FALSE; } DEBUG("Sync got interrupted"); @@ -161,7 +161,8 @@ gst_v4lmjpegsrc_set_capture (GstV4lMjpegSrc *v4lmjpegsrc, /* Query params for capture */ if (ioctl(GST_V4LELEMENT(v4lmjpegsrc)->video_fd, MJPIOC_G_PARAMS, &bparm) < 0) { - GST_ELEMENT_ERROR (v4lmjpegsrc, RESOURCE, SETTINGS, NULL, GST_ERROR_SYSTEM); + GST_ELEMENT_ERROR (v4lmjpegsrc, RESOURCE, SETTINGS, (NULL), + GST_ERROR_SYSTEM); return FALSE; } @@ -187,7 +188,8 @@ gst_v4lmjpegsrc_set_capture (GstV4lMjpegSrc *v4lmjpegsrc, /* Set params for capture */ if (ioctl(GST_V4LELEMENT(v4lmjpegsrc)->video_fd, MJPIOC_S_PARAMS, &bparm) < 0) { - GST_ELEMENT_ERROR (v4lmjpegsrc, RESOURCE, SETTINGS, NULL, GST_ERROR_SYSTEM); + GST_ELEMENT_ERROR (v4lmjpegsrc, RESOURCE, SETTINGS, (NULL), + GST_ERROR_SYSTEM); return FALSE; } @@ -231,7 +233,8 @@ gboolean gst_v4lmjpegsrc_set_capture_m (GstV4lMjpegSrc *v4lmjpegsrc, /* Query params for capture */ if (ioctl(GST_V4LELEMENT(v4lmjpegsrc)->video_fd, MJPIOC_G_PARAMS, &bparm) < 0) { - GST_ELEMENT_ERROR (v4lmjpegsrc, RESOURCE, SETTINGS, NULL, GST_ERROR_SYSTEM); + GST_ELEMENT_ERROR (v4lmjpegsrc, RESOURCE, SETTINGS, (NULL), + GST_ERROR_SYSTEM); return FALSE; } @@ -266,21 +269,21 @@ gboolean gst_v4lmjpegsrc_set_capture_m (GstV4lMjpegSrc *v4lmjpegsrc, if (width + x_offset > maxwidth) { - GST_ELEMENT_ERROR (v4lmjpegsrc, RESOURCE, TOO_LAZY, NULL, + GST_ELEMENT_ERROR (v4lmjpegsrc, RESOURCE, TOO_LAZY, (NULL), ("Image width+offset (%d) bigger than maximum (%d)", width + x_offset, maxwidth)); return FALSE; } if ((width%(bparm.HorDcm*16))!=0) { - GST_ELEMENT_ERROR (v4lmjpegsrc, STREAM, FORMAT, NULL, + GST_ELEMENT_ERROR (v4lmjpegsrc, STREAM, FORMAT, (NULL), ("Image width (%d) not multiple of %d (required for JPEG)", width, bparm.HorDcm*16)); return FALSE; } if (height + y_offset > (norm==VIDEO_MODE_NTSC ? 480 : 576)) { - GST_ELEMENT_ERROR (v4lmjpegsrc, RESOURCE, TOO_LAZY, NULL, + GST_ELEMENT_ERROR (v4lmjpegsrc, RESOURCE, TOO_LAZY, (NULL), ("Image height+offset (%d) bigger than maximum (%d)", height + y_offset, (norm==VIDEO_MODE_NTSC ? 480 : 576))); return FALSE; @@ -290,7 +293,7 @@ gboolean gst_v4lmjpegsrc_set_capture_m (GstV4lMjpegSrc *v4lmjpegsrc, */ if ((height%(bparm.VerDcm*16))!=0) { - GST_ELEMENT_ERROR (v4lmjpegsrc, STREAM, FORMAT, NULL, + GST_ELEMENT_ERROR (v4lmjpegsrc, STREAM, FORMAT, (NULL), ("Image height (%d) not multiple of %d (required for JPEG)", height, bparm.VerDcm*16)); return FALSE; @@ -313,7 +316,8 @@ gboolean gst_v4lmjpegsrc_set_capture_m (GstV4lMjpegSrc *v4lmjpegsrc, /* Set params for capture */ if (ioctl(GST_V4LELEMENT(v4lmjpegsrc)->video_fd, MJPIOC_S_PARAMS, &bparm) < 0) { - GST_ELEMENT_ERROR (v4lmjpegsrc, RESOURCE, SETTINGS, NULL, GST_ERROR_SYSTEM); + GST_ELEMENT_ERROR (v4lmjpegsrc, RESOURCE, SETTINGS, (NULL), + GST_ERROR_SYSTEM); return FALSE; } @@ -338,13 +342,13 @@ gst_v4lmjpegsrc_capture_init (GstV4lMjpegSrc *v4lmjpegsrc) if (ioctl(GST_V4LELEMENT(v4lmjpegsrc)->video_fd, MJPIOC_REQBUFS, &(v4lmjpegsrc->breq)) < 0) { - GST_ELEMENT_ERROR (v4lmjpegsrc, RESOURCE, READ, NULL, GST_ERROR_SYSTEM); + GST_ELEMENT_ERROR (v4lmjpegsrc, RESOURCE, READ, (NULL), GST_ERROR_SYSTEM); return FALSE; } if (v4lmjpegsrc->breq.count < MIN_BUFFERS_QUEUED) { - GST_ELEMENT_ERROR (v4lmjpegsrc, RESOURCE, READ, NULL, + GST_ELEMENT_ERROR (v4lmjpegsrc, RESOURCE, READ, (NULL), ("Too little buffers. We got %ld, we want at least %d", v4lmjpegsrc->breq.count, MIN_BUFFERS_QUEUED)); return FALSE; @@ -371,7 +375,7 @@ gst_v4lmjpegsrc_capture_init (GstV4lMjpegSrc *v4lmjpegsrc) PROT_READ|PROT_WRITE, MAP_SHARED, GST_V4LELEMENT(v4lmjpegsrc)->video_fd, 0); if (GST_V4LELEMENT(v4lmjpegsrc)->buffer == MAP_FAILED) { - GST_ELEMENT_ERROR (v4lmjpegsrc, RESOURCE, TOO_LAZY, NULL, + GST_ELEMENT_ERROR (v4lmjpegsrc, RESOURCE, TOO_LAZY, (NULL), ("Error mapping video buffers: %s", g_strerror (errno))); GST_V4LELEMENT(v4lmjpegsrc)->buffer = NULL; return FALSE; @@ -513,7 +517,7 @@ gst_v4lmjpegsrc_requeue_frame (GstV4lMjpegSrc *v4lmjpegsrc, g_mutex_lock(v4lmjpegsrc->mutex_queue_state); if (v4lmjpegsrc->frame_queue_state[num] != QUEUE_STATE_SYNCED) { - GST_ELEMENT_ERROR (v4lmjpegsrc, RESOURCE, TOO_LAZY, NULL, + GST_ELEMENT_ERROR (v4lmjpegsrc, RESOURCE, TOO_LAZY, (NULL), ("Invalid state %d (expected %d), can't requeue", v4lmjpegsrc->frame_queue_state[num], QUEUE_STATE_SYNCED)); diff --git a/sys/v4l/v4lsrc_calls.c b/sys/v4l/v4lsrc_calls.c index d9d3738..6a60207 100644 --- a/sys/v4l/v4lsrc_calls.c +++ b/sys/v4l/v4lsrc_calls.c @@ -497,7 +497,7 @@ gst_v4lsrc_try_palette (GstV4lSrc *v4lsrc, if (ioctl(GST_V4LELEMENT(v4lsrc)->video_fd, VIDIOCSYNC, &frame) < 0) { - GST_ELEMENT_ERROR (v4lsrc, RESOURCE, SYNC, NULL, GST_ERROR_SYSTEM); + GST_ELEMENT_ERROR (v4lsrc, RESOURCE, SYNC, (NULL), GST_ERROR_SYSTEM); munmap(buffer, vmbuf.size); return FALSE; } -- 2.7.4