summaryrefslogtreecommitdiffstats
path: root/sys/v4l2/v4l2_calls.h
diff options
context:
space:
mode:
authorRonald S. Bultje <rbultje@ronald.bitfreak.net>2002-11-13 12:35:56 +0000
committerRonald S. Bultje <rbultje@ronald.bitfreak.net>2002-11-13 12:35:56 +0000
commitbcf4679ab361fa819d806f93e5c7d4a0aa1974b2 (patch)
treeae5b545d89994a2b7c66b3533b79d3663dd09cc7 /sys/v4l2/v4l2_calls.h
parent2c1d8f081487a2148dbd7400e8012a7b7800e259 (diff)
v4l plugins: add open/close signals v4l2 plugins: add open/close signals move source format enumeration from v4l2elem...
Original commit message from CVS: v4l plugins: * add open/close signals v4l2 plugins: * add open/close signals * move source format enumeration from v4l2element to v4l2src * adapt to the final v4l2 API in kernel 2.5 (patches for 2.4 on http://bytesex.org/patches) * small tweaks
Diffstat (limited to 'sys/v4l2/v4l2_calls.h')
-rw-r--r--sys/v4l2/v4l2_calls.h23
1 files changed, 12 insertions, 11 deletions
diff --git a/sys/v4l2/v4l2_calls.h b/sys/v4l2/v4l2_calls.h
index de0bbc9e..db9adc08 100644
--- a/sys/v4l2/v4l2_calls.h
+++ b/sys/v4l2/v4l2_calls.h
@@ -32,11 +32,11 @@
(v4l2element->buffer != NULL)
#define GST_V4L2_IS_OVERLAY(v4l2element) \
- (v4l2element->vcap.flags & V4L2_FLAG_PREVIEW)
+ (v4l2element->vcap.capabilities & V4L2_CAP_VIDEO_OVERLAY)
/* checks whether the current v4lelement has already been open()'ed or not */
#define GST_V4L2_CHECK_OPEN(v4l2element) \
- if (v4l2element->video_fd <= 0) \
+ if (!GST_V4L2_IS_OPEN(v4l2element)) \
{ \
gst_element_error(GST_ELEMENT(v4l2element), \
"Device is not open"); \
@@ -45,7 +45,7 @@
/* checks whether the current v4lelement is close()'ed or whether it is still open */
#define GST_V4L2_CHECK_NOT_OPEN(v4l2element) \
- if (v4l2element->video_fd != -1) \
+ if (GST_V4L2_IS_OPEN(v4l2element)) \
{ \
gst_element_error(GST_ELEMENT(v4l2element), \
"Device is open"); \
@@ -54,16 +54,16 @@
/* checks whether the current v4lelement does video overlay */
#define GST_V4L2_CHECK_OVERLAY(v4l2element) \
- if (!(v4l2element->vcap.flags & V4L2_FLAG_PREVIEW)) \
- { \
- gst_element_error(GST_ELEMENT(v4l2element), \
- "Device doesn't do overlay"); \
- return FALSE; \
+ if (!GST_V4L2_IS_OVERLAY(v4l2element)) \
+ { \
+ gst_element_error(GST_ELEMENT(v4l2element), \
+ "Device doesn't do overlay"); \
+ return FALSE; \
}
/* checks whether we're in capture mode or not */
#define GST_V4L2_CHECK_ACTIVE(v4l2element) \
- if (v4l2element->buffer == NULL) \
+ if (!GST_V4L2_IS_ACTIVE(v4l2element)) \
{ \
gst_element_error(GST_ELEMENT(v4l2element), \
"Device is not in streaming mode"); \
@@ -72,7 +72,7 @@
/* checks whether we're out of capture mode or not */
#define GST_V4L2_CHECK_NOT_ACTIVE(v4l2element) \
- if (v4l2element->buffer != NULL) \
+ if (GST_V4L2_IS_ACTIVE(v4l2element)) \
{ \
gst_element_error(GST_ELEMENT(v4l2element), \
"Device is in streaming mode"); \
@@ -102,7 +102,8 @@ gboolean gst_v4l2_set_output (GstV4l2Element *v4l2element,
GList * gst_v4l2_get_output_names (GstV4l2Element *v4l2element);
/* frequency control */
-gboolean gst_v4l2_has_tuner (GstV4l2Element *v4l2element);
+gboolean gst_v4l2_has_tuner (GstV4l2Element *v4l2element,
+ gint *tuner_num);
gboolean gst_v4l2_get_frequency (GstV4l2Element *v4l2element,
gulong *frequency);
gboolean gst_v4l2_set_frequency (GstV4l2Element *v4l2element,