bump
git-svn-id: https://svn.disconnected-by-peer.at/svn/linamh/trunk/linamh@2911 6952d904-891a-0410-993b-d76249ca496b
This commit is contained in:
49
media-gfx/sane-backends/files/libv4l_conflict.patch
Normal file
49
media-gfx/sane-backends/files/libv4l_conflict.patch
Normal file
@@ -0,0 +1,49 @@
|
||||
--- sane-backends-1.0.22/backend/v4l.h.deconflict-v4l 2010-12-01 15:49:58.000000000 -0800
|
||||
+++ sane-backends-1.0.22/backend/v4l.h 2011-04-01 21:44:18.797102300 -0700
|
||||
@@ -29,6 +29,8 @@
|
||||
#ifndef v4l_h
|
||||
#define v4l_h
|
||||
|
||||
+#include <libv4l1-videodev.h>
|
||||
+
|
||||
/* Kernel interface */
|
||||
/* Only the stuff we need. For more features, more defines are needed */
|
||||
|
||||
@@ -46,7 +48,7 @@
|
||||
#define VID_TYPE_MPEG_ENCODER 2048 /* Can encode MPEG streams */
|
||||
#define VID_TYPE_MJPEG_DECODER 4096 /* Can decode MJPEG streams */
|
||||
#define VID_TYPE_MJPEG_ENCODER 8192 /* Can encode MJPEG streams */
|
||||
-
|
||||
+#if 0
|
||||
struct video_capability
|
||||
{
|
||||
char name[32];
|
||||
@@ -58,7 +60,6 @@
|
||||
int minwidth; /* Supported width */
|
||||
int minheight; /* And height */
|
||||
};
|
||||
-
|
||||
struct video_picture
|
||||
{
|
||||
__u16 brightness;
|
||||
@@ -102,9 +103,10 @@
|
||||
/* bitmap is 1024x625, a '1' bit represents a clipped pixel */
|
||||
#define VIDEO_CLIPMAP_SIZE (128 * 625)
|
||||
};
|
||||
-
|
||||
+#endif
|
||||
#define VIDEO_MAX_FRAME 32
|
||||
|
||||
+#if 0
|
||||
struct video_mbuf
|
||||
{
|
||||
int size; /* Total memory to map */
|
||||
@@ -132,7 +134,7 @@
|
||||
#define VIDEO_TYPE_CAMERA 2
|
||||
__u16 norm; /* Norm set by channel */
|
||||
};
|
||||
-
|
||||
+#endif
|
||||
#define VIDIOCGCAP _IOR('v',1,struct video_capability) /* Get capabilities */
|
||||
#define VIDIOCGCHAN _IOWR('v',2,struct video_channel) /* Get channel info (sources) */
|
||||
#define VIDIOCSCHAN _IOW('v',3,struct video_channel) /* Set channel */
|
||||
@@ -0,0 +1,73 @@
|
||||
From 5ea227caeacd504b64eef301e83fa63e0a25b3f7 Mon Sep 17 00:00:00 2001
|
||||
From: Alex Belkin <abc@telekom.ru>
|
||||
Date: Tue, 8 Mar 2011 17:57:19 +0300
|
||||
Subject: [PATCH] keep usb device by default (correct for bug introduced by tcp sub-backend
|
||||
|
||||
---
|
||||
backend/xerox_mfp.c | 27 +++++++++++----------------
|
||||
1 files changed, 11 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/backend/xerox_mfp.c b/backend/xerox_mfp.c
|
||||
index e08b50f..d4672a7 100644
|
||||
--- a/backend/xerox_mfp.c
|
||||
+++ b/backend/xerox_mfp.c
|
||||
@@ -37,10 +37,10 @@
|
||||
static const SANE_Device **devlist = NULL; /* sane_get_devices array */
|
||||
static struct device *devices_head = NULL; /* sane_get_devices list */
|
||||
|
||||
-transport available_transports[] = {
|
||||
+enum { TRANSPORT_USB, TRANSPORT_TCP, TRANSPORTS_MAX };
|
||||
+transport available_transports[TRANSPORTS_MAX] = {
|
||||
{ "usb", usb_dev_request, usb_dev_open, usb_dev_close, usb_configure_device },
|
||||
{ "tcp", tcp_dev_request, tcp_dev_open, tcp_dev_close, tcp_configure_device },
|
||||
- { 0 }
|
||||
};
|
||||
|
||||
static int resolv_state(int state)
|
||||
@@ -824,7 +824,13 @@ free_devices (void)
|
||||
devices_head = NULL;
|
||||
}
|
||||
|
||||
-/* SANE API ignores return code of this callback */
|
||||
+static transport *tr_from_devname(SANE_String_Const devname)
|
||||
+{
|
||||
+ if (strncmp("tcp", devname, 3) == 0)
|
||||
+ return &available_transports[TRANSPORT_TCP];
|
||||
+ return &available_transports[TRANSPORT_USB];
|
||||
+}
|
||||
+
|
||||
static SANE_Status
|
||||
list_one_device (SANE_String_Const devname)
|
||||
{
|
||||
@@ -839,12 +845,7 @@ list_one_device (SANE_String_Const devname)
|
||||
return SANE_STATUS_GOOD;
|
||||
}
|
||||
|
||||
- for (tr = available_transports; tr->ttype; tr++) {
|
||||
- if (!strncmp (devname, tr->ttype, strlen(tr->ttype)))
|
||||
- break;
|
||||
- }
|
||||
- if (!tr->ttype)
|
||||
- return SANE_STATUS_INVAL;
|
||||
+ tr = tr_from_devname(devname);
|
||||
|
||||
dev = calloc (1, sizeof (struct device));
|
||||
if (dev == NULL)
|
||||
@@ -878,13 +879,7 @@ list_one_device (SANE_String_Const devname)
|
||||
static SANE_Status
|
||||
list_conf_devices (UNUSED (SANEI_Config * config), const char *devname)
|
||||
{
|
||||
- transport *tr;
|
||||
-
|
||||
- for (tr = available_transports; tr->ttype; tr++) {
|
||||
- if (!strncmp (devname, tr->ttype, strlen(tr->ttype)))
|
||||
- return tr->configure_device(devname, list_one_device);
|
||||
- }
|
||||
- return SANE_STATUS_INVAL;
|
||||
+ return tr_from_devname(devname)->configure_device(devname, list_one_device);
|
||||
}
|
||||
|
||||
SANE_Status
|
||||
--
|
||||
1.7.1
|
||||
|
||||
Reference in New Issue
Block a user