Hi Laurent, hi List,

back in October last year you wrote and send me the drop-incomplete patch. I 
still have to apply this patch to the latest uvcvideo revision (v173). 
Without this patch I can hardly grap a stream from the cam for longer than a 
few seconds.

I would like to raise the question if there a other users affected by this 
problem too and if there are plans to integrate this patch or a similar feature 
into trunk?

Best Regards,
Jörg




        __________________________________  Ihr erstes Baby? Holen Sie sich 
Tipps von anderen Eltern.  www.yahoo.de/clever
Index: uvc_queue.c
===================================================================
--- uvc_queue.c	(revision 130)
+++ uvc_queue.c	(working copy)
@@ -396,6 +396,12 @@
 	struct uvc_buffer *nextbuf;
 	unsigned long flags;
 
+	if (queue->drop_incomplete && buf->buf.length != buf->buf.bytesused) {
+		buf->state = UVC_BUF_STATE_QUEUED;
+		buf->buf.bytesused = 0;
+		return buf;
+	}
+
 	spin_lock_irqsave(&queue->irqlock, flags);
 	list_del(&buf->queue);
 	if (!list_empty(&queue->irqqueue))
Index: uvc_v4l2.c
===================================================================
--- uvc_v4l2.c	(revision 130)
+++ uvc_v4l2.c	(working copy)
@@ -825,6 +825,10 @@
 		if ((ret = uvc_alloc_buffers(&video->queue, rb->count, bufsize)) < 0)
 			return ret;
 
+		video->queue.drop_incomplete =
+			video->streaming->cur_format->flags &
+				UVC_FMT_FLAG_COMPRESSED ? 0 : 1;
+
 		rb->count = ret;
 		ret = 0;
 	}
Index: uvcvideo.h
===================================================================
--- uvcvideo.h	(revision 130)
+++ uvcvideo.h	(working copy)
@@ -547,7 +547,8 @@
 struct uvc_video_queue {
 	void *mem;
 	unsigned int streaming : 1,
-		     frozen : 1;
+		     frozen : 1,
+		     drop_incomplete : 1;
 	__u32 sequence;
 	__u8 last_fid;
 
_______________________________________________
Linux-uvc-devel mailing list
Linux-uvc-devel@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/linux-uvc-devel

Reply via email to