camorama r369 - in trunk: . src
- From: herzi svn gnome org
- To: svn-commits-list gnome org
- Subject: camorama r369 - in trunk: . src
- Date: Wed, 28 May 2008 16:15:58 +0000 (UTC)
Author: herzi
Date: Wed May 28 16:15:57 2008
New Revision: 369
URL: http://svn.gnome.org/viewvc/camorama?rev=369&view=rev
Log:
2008-05-28 Sven Herzberg <sven imendio com>
Moved set_buffer() into the mmap() based capture implementation
* src/capture-strategy-mmap.c: (set_buffer): landed here
* src/v4l.c: removed
* src/v4l.h: dropped declaration
Modified:
trunk/ChangeLog
trunk/src/capture-strategy-mmap.c
trunk/src/v4l.c
trunk/src/v4l.h
Modified: trunk/src/capture-strategy-mmap.c
==============================================================================
--- trunk/src/capture-strategy-mmap.c (original)
+++ trunk/src/capture-strategy-mmap.c Wed May 28 16:15:57 2008
@@ -55,6 +55,29 @@
CaptureStrategyMmapPrivate);
}
+static
+void set_buffer(cam * cam)
+{
+ char *msg;
+ if(ioctl(cam->dev, VIDIOCGMBUF, &cam->vid_buf) == -1) {
+ msg = g_strdup_printf(_("Could not connect to video device (%s).\nPlease check connection."), cam->video_dev);
+ error_dialog(msg);
+ if(cam->debug == TRUE) {
+ fprintf(stderr, "VIDIOCGMBF -- could not set buffer info, exiting...\n");
+ }
+ g_free(msg);
+ exit(0);
+
+ }
+
+ if(cam->debug == TRUE) {
+ printf("\nVIDIOCGMBUF\n");
+ printf("mb.size = %d\n", cam->vid_buf.size);
+ printf("mb.frames = %d\n", cam->vid_buf.frames);
+ printf("mb.offset = %d\n", cam->vid_buf.offsets[1]);
+ }
+
+}
static void
mmap_constructed (GObject* object)
{
Modified: trunk/src/v4l.c
==============================================================================
--- trunk/src/v4l.c (original)
+++ trunk/src/v4l.c Wed May 28 16:15:57 2008
@@ -234,25 +234,3 @@
}
-void set_buffer(cam * cam)
-{
- char *msg;
- if(ioctl(cam->dev, VIDIOCGMBUF, &cam->vid_buf) == -1) {
- msg = g_strdup_printf(_("Could not connect to video device (%s).\nPlease check connection."), cam->video_dev);
- error_dialog(msg);
- if(cam->debug == TRUE) {
- fprintf(stderr, "VIDIOCGMBF -- could not set buffer info, exiting...\n");
- }
- g_free(msg);
- exit(0);
-
- }
-
- if(cam->debug == TRUE) {
- printf("\nVIDIOCGMBUF\n");
- printf("mb.size = %d\n", cam->vid_buf.size);
- printf("mb.frames = %d\n", cam->vid_buf.frames);
- printf("mb.offset = %d\n", cam->vid_buf.offsets[1]);
- }
-
-}
Modified: trunk/src/v4l.h
==============================================================================
--- trunk/src/v4l.h (original)
+++ trunk/src/v4l.h Wed May 28 16:15:57 2008
@@ -80,7 +80,6 @@
void get_pic_info (cam *);
void set_pic_info (cam *);
void get_win_info (cam *);
-void set_buffer (cam *);
#endif /* !CAMORAMA_V4L_H */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]