summaryrefslogtreecommitdiffstats
path: root/sys/v4l2/gstv4l2src.h
diff options
context:
space:
mode:
authorStefan Kost <ensonic@users.sf.net>2009-09-11 22:24:47 +0300
committerStefan Kost <ensonic@users.sf.net>2009-09-11 22:24:47 +0300
commit00ffa9c2dde5361017f7d523970921cfb1937199 (patch)
treee1415c0782719e758384ef8027c4dbdddbf08921 /sys/v4l2/gstv4l2src.h
parent1a945a32ccae14b2828cacdd5d11560039df5d74 (diff)
v4l2src: add a function pointer for get_frame function and optimize a bit
Use a function-pointer for mmap/read, as this can't change during capture. Also sprinkle a few G_LIKELY/UNLIKELY to improve the error-less code path.
Diffstat (limited to 'sys/v4l2/gstv4l2src.h')
-rw-r--r--sys/v4l2/gstv4l2src.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/v4l2/gstv4l2src.h b/sys/v4l2/gstv4l2src.h
index fef3f108..68f45d97 100644
--- a/sys/v4l2/gstv4l2src.h
+++ b/sys/v4l2/gstv4l2src.h
@@ -45,7 +45,7 @@ G_BEGIN_DECLS
typedef struct _GstV4l2Src GstV4l2Src;
typedef struct _GstV4l2SrcClass GstV4l2SrcClass;
-
+typedef GstFlowReturn (*GstV4l2SrcGetFunc)(GstV4l2Src * v4l2src, GstBuffer ** buf);
/**
* GstV4l2Src:
@@ -80,6 +80,8 @@ struct _GstV4l2Src
guint64 offset;
gint fps_d, fps_n; /* framerate if device is open */
+
+ GstV4l2SrcGetFunc get_frame;
};
struct _GstV4l2SrcClass