summaryrefslogtreecommitdiff
path: root/v4l2-apps/test
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2006-12-01 13:42:08 -0200
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-12-01 13:42:08 -0200
commitad73f471bd66efa67cbc9e3ad3aa5a16dc85413e (patch)
treebdd75f2e2a0d09611431ba0404432cb9e3d955d1 /v4l2-apps/test
parent92bbb7a3c00cf0966188e833c86cb09e37c0839c (diff)
downloadmediapointer-dvb-s2-ad73f471bd66efa67cbc9e3ad3aa5a16dc85413e.tar.gz
mediapointer-dvb-s2-ad73f471bd66efa67cbc9e3ad3aa5a16dc85413e.tar.bz2
Start adding mmap streaming into driver-test
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'v4l2-apps/test')
-rw-r--r--v4l2-apps/test/driver-test.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/v4l2-apps/test/driver-test.c b/v4l2-apps/test/driver-test.c
index 809ee170c..32b676836 100644
--- a/v4l2-apps/test/driver-test.c
+++ b/v4l2-apps/test/driver-test.c
@@ -16,6 +16,8 @@
#include "../lib/v4l2_driver.h"
#include <stdio.h>
+#include <string.h>
+#include <unistd.h>
int main(void)
{
@@ -58,6 +60,8 @@ int main(void)
/* Tries all formats */
for (cur=drv.fmt_caps;cur!=NULL;cur=cur->next) {
struct v4l2_format fmt;
+ memset (&fmt,0,sizeof(fmt));
+
uint32_t pixelformat=((struct v4l2_fmtdesc *)cur->curr)->pixelformat;
if (cur->curr) {
if (v4l2_gettryset_fmt_cap (&drv,V4L2_SET,&fmt, 640, 480,
@@ -72,6 +76,13 @@ int main(void)
v4l2_mmap_bufs(&drv, 2);
+// v4l2_start_streaming(&drv);
+
+//sleep (1);
+
+// v4l2_stop_streaming(&drv);
+
+
if (v4l2_close (&drv)<0) {
perror("close");
return -1;