From 1cf253d07503c254a59b1b0022d317ac112d89fa Mon Sep 17 00:00:00 2001 From: "Ronald S. Bultje" Date: Wed, 13 Feb 2002 18:40:15 +0000 Subject: [PATCH] Get rid of the gst_element_info() and replace it with g_message() Original commit message from CVS: Get rid of the gst_element_info() and replace it with g_message() --- sys/v4l/v4l_calls.c | 5 ++--- sys/v4l/v4lmjpegsink_calls.c | 8 ++++---- sys/v4l/v4lmjpegsrc_calls.c | 12 ++++-------- sys/v4l/v4lsrc_calls.c | 5 ++--- 4 files changed, 12 insertions(+), 18 deletions(-) diff --git a/sys/v4l/v4l_calls.c b/sys/v4l/v4l_calls.c index b2bdcaf413..93df52f938 100644 --- a/sys/v4l/v4l_calls.c +++ b/sys/v4l/v4l_calls.c @@ -83,7 +83,7 @@ gst_v4l_open (GstV4lElement *v4lelement) v4lelement->videodev = g_strdup("/dev/video"); /* open the device */ - v4lelement->video_fd = open(v4lelement->videodev, O_RDONLY); + v4lelement->video_fd = open(v4lelement->videodev, O_RDWR); if (!GST_V4L_IS_OPEN(v4lelement)) { gst_element_error(GST_ELEMENT(v4lelement), @@ -100,8 +100,7 @@ gst_v4l_open (GstV4lElement *v4lelement) return FALSE; } - gst_element_info(GST_ELEMENT(v4lelement), - "Opened device \'%s\' (\'%s\') successfully", + g_message("Opened device \'%s\' (\'%s\') successfully\n", v4lelement->vcap.name, v4lelement->videodev); return TRUE; diff --git a/sys/v4l/v4lmjpegsink_calls.c b/sys/v4l/v4lmjpegsink_calls.c index 77f3a4f0e0..c6ae247636 100644 --- a/sys/v4l/v4lmjpegsink_calls.c +++ b/sys/v4l/v4lmjpegsink_calls.c @@ -99,8 +99,9 @@ gst_v4lmjpegsink_sync_thread (void *arg) } end: - gst_element_info(GST_ELEMENT(v4lmjpegsink), - "Sync thread got signalled to exit"); +#ifdef DEBUG + fprintf(stderr, "Sync thread got signalled to exit\n"); +#endif pthread_exit(NULL); } @@ -362,8 +363,7 @@ gst_v4lmjpegsink_playback_init (GstV4lMjpegSink *v4lmjpegsink) return FALSE; } - gst_element_info(GST_ELEMENT(v4lmjpegsink), - "Got %ld buffers of size %ld KB", + g_message("Got %ld buffers of size %ld KB\n", v4lmjpegsink->breq.count, v4lmjpegsink->breq.size/1024); /* Map the buffers */ diff --git a/sys/v4l/v4lmjpegsrc_calls.c b/sys/v4l/v4lmjpegsrc_calls.c index 8bb70a3eb1..34e72b047c 100644 --- a/sys/v4l/v4lmjpegsrc_calls.c +++ b/sys/v4l/v4lmjpegsrc_calls.c @@ -120,8 +120,7 @@ gst_v4lmjpegsrc_set_input_norm (GstV4lMjpegSrc *v4lmjpegsrc, for (n=V4L_MJPEG_INPUT_COMPOSITE;nnorm = norm; } @@ -438,8 +435,7 @@ gst_v4lmjpegsrc_capture_init (GstV4lMjpegSrc *v4lmjpegsrc) return FALSE; } - gst_element_info(GST_ELEMENT(v4lmjpegsrc), - "Got %ld buffers of size %ld KB", + g_message("Got %ld buffers of size %ld KB\n", v4lmjpegsrc->breq.count, v4lmjpegsrc->breq.size/1024); /* Map the buffers */ diff --git a/sys/v4l/v4lsrc_calls.c b/sys/v4l/v4lsrc_calls.c index 5c592e7bf2..cd0eb9c5fe 100644 --- a/sys/v4l/v4lsrc_calls.c +++ b/sys/v4l/v4lsrc_calls.c @@ -292,8 +292,7 @@ gst_v4lsrc_capture_init (GstV4lSrc *v4lsrc) return FALSE; } - gst_element_info(GST_ELEMENT(v4lsrc), - "Got %d buffers (\'%s\') of size %d KB", + g_message("Got %d buffers (\'%s\') of size %d KB\n", v4lsrc->mbuf.frames, palette_name[v4lsrc->mmap.format], v4lsrc->mbuf.size/(v4lsrc->mbuf.frames*1024)); @@ -347,7 +346,7 @@ gst_v4lsrc_capture_init (GstV4lSrc *v4lsrc) /* Map the buffers */ GST_V4LELEMENT(v4lsrc)->buffer = mmap(0, v4lsrc->mbuf.size, - PROT_READ, MAP_SHARED, GST_V4LELEMENT(v4lsrc)->video_fd, 0); + PROT_READ|PROT_WRITE, MAP_SHARED, GST_V4LELEMENT(v4lsrc)->video_fd, 0); if (GST_V4LELEMENT(v4lsrc)->buffer == MAP_FAILED) { gst_element_error(GST_ELEMENT(v4lsrc),