summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'media-video/webcamstudio-module/files/webcamstudio-module-0.9.1-webcamstudio.patch')
-rw-r--r--media-video/webcamstudio-module/files/webcamstudio-module-0.9.1-webcamstudio.patch234
1 files changed, 234 insertions, 0 deletions
diff --git a/media-video/webcamstudio-module/files/webcamstudio-module-0.9.1-webcamstudio.patch b/media-video/webcamstudio-module/files/webcamstudio-module-0.9.1-webcamstudio.patch
new file mode 100644
index 0000000..cdb3b40
--- /dev/null
+++ b/media-video/webcamstudio-module/files/webcamstudio-module-0.9.1-webcamstudio.patch
@@ -0,0 +1,234 @@
+--- Makefile.orig
++++ Makefile
+@@ -1,7 +1,7 @@
+ KERNELRELEASE ?= `uname -r`
+ KERNEL_DIR ?= /lib/modules/$(KERNELRELEASE)/build
+ PWD := $(shell pwd)
+-obj-m := v4l2loopback.o
++obj-m := webcamstudio.o
+
+ PREFIX ?= /usr/local
+ BINDIR = $(PREFIX)/bin
+@@ -30,16 +30,16 @@ MODULE_OPTIONS = devices=2
+
+ .PHONY: all install clean distclean
+ .PHONY: install-all install-utils install-man
+-.PHONY: modprobe v4l2loopback
++.PHONY: modprobe webcamstudio
+
+ # we don't control the .ko file dependencies, as it is done by kernel
+-# makefiles. therefore v4l2loopback.ko is a phony target actually
+-.PHONY: v4l2loopback.ko
++# makefiles. therefore webcamstudio.ko is a phony target actually
++.PHONY: webcamstudio.ko
+
+-all: v4l2loopback.ko
+-v4l2loopback: v4l2loopback.ko
+-v4l2loopback.ko:
+- @echo "Building v4l2-loopback driver..."
++all: webcamstudio.ko
++webcamstudio: webcamstudio.ko
++webcamstudio.ko:
++ @echo "Building webcamstudio driver..."
+ $(MAKE) -C $(KERNEL_DIR) M=$(PWD) modules
+
+ install-all: install install-utils install-man
+@@ -47,11 +47,11 @@ install:
+ $(MAKE) -C $(KERNEL_DIR) M=$(PWD) modules_install
+ depmod -a $(KERNELRELEASE)
+
+-install-utils: utils/v4l2loopback-ctl
++install-utils: utils/webcamstudio-ctl
+ $(INSTALL_DIR) "$(DESTDIR)$(BINDIR)"
+ $(INSTALL_PROGRAM) $< "$(DESTDIR)$(BINDIR)"
+
+-install-man: man/v4l2loopback-ctl.1
++install-man: man/webcamstudio-ctl.1
+ $(INSTALL_DIR) "$(DESTDIR)$(MAN1DIR)"
+ $(INSTALL_DATA) $< "$(DESTDIR)$(MAN1DIR)"
+
+@@ -61,13 +61,13 @@ clean:
+ $(MAKE) -C $(KERNEL_DIR) M=$(PWD) clean
+
+ distclean: clean
+- rm -f man/v4l2loopback-ctl.1
++ rm -f man/webcamstudio-ctl.1
+
+-modprobe: v4l2loopback.ko
+- chmod a+r v4l2loopback.ko
++modprobe: webcamstudio.ko
++ chmod a+r webcamstudio.ko
+ sudo modprobe videodev
+- -sudo rmmod v4l2loopback
+- sudo insmod ./v4l2loopback.ko $(MODULE_OPTIONS)
++ -sudo rmmod webcamstudio
++ sudo insmod ./webcamstudio.ko $(MODULE_OPTIONS)
+
+-man/v4l2loopback-ctl.1: utils/v4l2loopback-ctl
+- help2man -N --name "control v4l2 loopback devices" $^ > $@
++man/webcamstudio-ctl.1: utils/webcamstudio-ctl
++ help2man -N --name "control webcamstudio loopback devices" $^ > $@
+--- v4l2loopback.c.orig
++++ v4l2loopback.c
+@@ -38,12 +38,13 @@
+
+ #define V4L2LOOPBACK_VERSION_CODE KERNEL_VERSION(0, 9, 1)
+
+-MODULE_DESCRIPTION("V4L2 loopback video device");
++MODULE_DESCRIPTION("Webcamstudio loopback video device");
+ MODULE_AUTHOR("Vasily Levin, " \
+ "IOhannes m zmoelnig <zmoelnig@iem.at>," \
+ "Stefan Diewald," \
+ "Anton Novikov" \
+ "et al." \
++ "Modified by Dustin Polke <DuPol@gmx.de>" \
+ );
+ MODULE_LICENSE("GPL");
+
+@@ -55,7 +56,7 @@ MODULE_LICENSE("GPL");
+
+ #define dprintk(fmt, args...) \
+ do { if (debug > 0) { \
+- printk(KERN_INFO "v4l2-loopback[" STRINGIFY2(__LINE__) "]: " fmt, ##args); \
++ printk(KERN_INFO "webcamstudio[" STRINGIFY2(__LINE__) "]: " fmt, ##args); \
+ } } while (0)
+
+ #define MARK() \
+@@ -65,7 +66,7 @@ MODULE_LICENSE("GPL");
+
+ #define dprintkrw(fmt, args...) \
+ do { if (debug > 2) { \
+- printk(KERN_INFO "v4l2-loopback[" STRINGIFY2(__LINE__)"]: " fmt, ##args); \
++ printk(KERN_INFO "webcamstudio[" STRINGIFY2(__LINE__)"]: " fmt, ##args); \
+ } } while (0)
+
+ /*
+@@ -575,7 +576,7 @@ static struct v4l2_loopback_device *v4l2
+ int nr = ptr->devicenr;
+
+ if (nr < 0 || nr >= devices) {
+- printk(KERN_ERR "v4l2-loopback: illegal device %d\n", nr);
++ printk(KERN_ERR "webcamstudio: illegal device %d\n", nr);
+ return NULL;
+ }
+ return devs[nr];
+@@ -589,7 +590,7 @@ static struct v4l2_loopback_device *v4l2
+ int nr = ptr->devicenr;
+
+ if (nr < 0 || nr >= devices) {
+- printk(KERN_ERR "v4l2-loopback: illegal device %d\n", nr);
++ printk(KERN_ERR "webcamstudio: illegal device %d\n", nr);
+ return NULL;
+ }
+ return devs[nr];
+@@ -634,15 +635,15 @@ static int vidioc_querycap(struct file *
+ struct v4l2_loopback_device *dev = v4l2loopback_getdevice(file);
+ int devnr = ((struct v4l2loopback_private *)video_get_drvdata(dev->vdev))->devicenr;
+
+- strlcpy(cap->driver, "v4l2 loopback", sizeof(cap->driver));
++ strlcpy(cap->driver, "webcamstudio", sizeof(cap->driver));
+
+ if (card_label[devnr] != NULL) {
+ snprintf(cap->card, sizeof(cap->card), card_label[devnr]);
+ } else {
+- snprintf(cap->card, sizeof(cap->card), "Dummy video device (0x%04X)", devnr);
++ snprintf(cap->card, sizeof(cap->card), "Webcamstudio video device (0x%04X)", devnr);
+ }
+
+- snprintf(cap->bus_info, sizeof(cap->bus_info), "platform:v4l2loopback-%03d", devnr);
++ snprintf(cap->bus_info, sizeof(cap->bus_info), "platform:webcamstudio-%03d", devnr);
+
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 1, 0)
+ /* since 3.1.0, the v4l2-core system is supposed to set the version */
+@@ -1876,7 +1877,7 @@ static ssize_t v4l2_loopback_read(struct
+ if (copy_to_user((void *)buf, (void *)(dev->image +
+ dev->buffers[read_index].buffer.m.offset), count)) {
+ printk(KERN_ERR
+- "v4l2-loopback: failed copy_from_user() in write buf\n");
++ "webcamstudio: failed copy_from_user() in write buf\n");
+ return -EFAULT;
+ }
+ dprintkrw("leave v4l2_loopback_read()\n");
+@@ -1912,7 +1913,7 @@ static ssize_t v4l2_loopback_write(struc
+
+ if (copy_from_user((void *)(dev->image + b->m.offset), (void *)buf, count)) {
+ printk(KERN_ERR
+- "v4l2-loopback: failed copy_from_user() in write buf, could not write %zu\n",
++ "webcamstudio: failed copy_from_user() in write buf, could not write %zu\n",
+ count);
+ return -EFAULT;
+ }
+@@ -2045,7 +2046,7 @@ static int allocate_timeout_image(struct
+ static void init_vdev(struct video_device *vdev, int nr)
+ {
+ MARK();
+- snprintf(vdev->name, sizeof(vdev->name), "Loopback video device %X", nr);
++ snprintf(vdev->name, sizeof(vdev->name), "Webcamstudio video device %X", nr);
+
+ #ifdef V4L2LOOPBACK_WITH_STD
+ vdev->tvnorms = V4L2_STD_ALL;
+@@ -2132,7 +2133,7 @@ static int v4l2_loopback_init(struct v4l
+ int ret;
+ struct v4l2_ctrl_handler *hdl = &dev->ctrl_handler;
+ snprintf(dev->v4l2_dev.name, sizeof(dev->v4l2_dev.name),
+- "v4l2loopback-%03d", nr);
++ "webcamstudio-%03d", nr);
+ ret = v4l2_device_register(NULL, &dev->v4l2_dev);
+ if (ret)
+ return ret;
+@@ -2343,31 +2344,31 @@ int __init init_module(void)
+
+ if (devices > MAX_DEVICES) {
+ devices = MAX_DEVICES;
+- printk(KERN_INFO "v4l2loopback: number of devices is limited to: %d\n", MAX_DEVICES);
++ printk(KERN_INFO "webcamstudio: number of devices is limited to: %d\n", MAX_DEVICES);
+ }
+
+ if (max_buffers > MAX_BUFFERS) {
+ max_buffers = MAX_BUFFERS;
+- printk(KERN_INFO "v4l2loopback: number of buffers is limited to: %d\n", MAX_BUFFERS);
++ printk(KERN_INFO "webcamstudio: number of buffers is limited to: %d\n", MAX_BUFFERS);
+ }
+
+ if (max_openers < 0) {
+- printk(KERN_INFO "v4l2loopback: allowing %d openers rather than %d\n", 2, max_openers);
++ printk(KERN_INFO "webcamstudio: allowing %d openers rather than %d\n", 2, max_openers);
+ max_openers = 2;
+ }
+
+ if (max_width < 1) {
+ max_width = V4L2LOOPBACK_SIZE_MAX_WIDTH;
+- printk(KERN_INFO "v4l2loopback: using max_width %d\n", max_width);
++ printk(KERN_INFO "webcamstudio: using max_width %d\n", max_width);
+ }
+ if (max_height < 1) {
+ max_height = V4L2LOOPBACK_SIZE_MAX_HEIGHT;
+- printk(KERN_INFO "v4l2loopback: using max_height %d\n", max_height);
++ printk(KERN_INFO "webcamstudio: using max_height %d\n", max_height);
+ }
+
+ /* kfree on module release */
+ for (i = 0; i < devices; i++) {
+- dprintk("creating v4l2loopback-device #%d\n", i);
++ dprintk("creating webcamstudio-device #%d\n", i);
+ devs[i] = kzalloc(sizeof(*devs[i]), GFP_KERNEL);
+ if (devs[i] == NULL) {
+ free_devices();
+@@ -2381,7 +2382,7 @@ int __init init_module(void)
+ /* register the device -> it creates /dev/video* */
+ if (video_register_device(devs[i]->vdev, VFL_TYPE_GRABBER, video_nr[i]) < 0) {
+ video_device_release(devs[i]->vdev);
+- printk(KERN_ERR "v4l2loopback: failed video_register_device()\n");
++ printk(KERN_ERR "webcamstudio: failed video_register_device()\n");
+ free_devices();
+ return -EFAULT;
+ }
+@@ -2390,7 +2391,7 @@ int __init init_module(void)
+
+ dprintk("module installed\n");
+
+- printk(KERN_INFO "v4l2loopback driver version %d.%d.%d loaded\n",
++ printk(KERN_INFO "webcamstudio driver version %d.%d.%d loaded\n",
+ (V4L2LOOPBACK_VERSION_CODE >> 16) & 0xff,
+ (V4L2LOOPBACK_VERSION_CODE >> 8) & 0xff,
+ (V4L2LOOPBACK_VERSION_CODE) & 0xff);