mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-20 00:31:13 +00:00
further element_error fixes
Original commit message from CVS: further element_error fixes
This commit is contained in:
parent
eefcaf5b9e
commit
34ac635d74
2 changed files with 34 additions and 28 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2004-01-19 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||||
|
|
||||||
|
* sys/v4l/v4l_calls.h:
|
||||||
|
* sys/v4l2/v4l2_calls.h:
|
||||||
|
element_error fixes
|
||||||
|
|
||||||
2004-01-19 Thomas Vander Stichele <thomas at apestaart dot org>
|
2004-01-19 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||||
|
|
||||||
* gst-libs/gst/gst-i18n-plugin.h:
|
* gst-libs/gst/gst-i18n-plugin.h:
|
||||||
|
|
|
@ -29,57 +29,57 @@ extern "C" {
|
||||||
|
|
||||||
|
|
||||||
/* simple check whether the device is open */
|
/* simple check whether the device is open */
|
||||||
#define GST_V4L_IS_OPEN(v4lelement) \
|
#define GST_V4L_IS_OPEN(element) \
|
||||||
(v4lelement->video_fd > 0)
|
(element->video_fd > 0)
|
||||||
|
|
||||||
/* check whether the device is 'active' */
|
/* check whether the device is 'active' */
|
||||||
#define GST_V4L_IS_ACTIVE(v4lelement) \
|
#define GST_V4L_IS_ACTIVE(element) \
|
||||||
(v4lelement->buffer != NULL)
|
(element->buffer != NULL)
|
||||||
|
|
||||||
#define GST_V4L_IS_OVERLAY(v4lelement) \
|
#define GST_V4L_IS_OVERLAY(element) \
|
||||||
(v4lelement->vcap.type & VID_TYPE_OVERLAY)
|
(element->vcap.type & VID_TYPE_OVERLAY)
|
||||||
|
|
||||||
/* checks whether the current v4lelement has already been open()'ed or not */
|
/* checks whether the current v4lelement has already been open()'ed or not */
|
||||||
#define GST_V4L_CHECK_OPEN(v4lelement) \
|
#define GST_V4L_CHECK_OPEN(element) \
|
||||||
if (v4lelement->video_fd <= 0) \
|
if (element->video_fd <= 0) \
|
||||||
{ \
|
{ \
|
||||||
gst_element_error (v4lelement, RESOURCE, TOO_LAZY, \
|
gst_element_error (element, RESOURCE, TOO_LAZY, \
|
||||||
(_("Device is not open")), NULL); \
|
(_("Device is not open")), NULL); \
|
||||||
return FALSE; \
|
return FALSE; \
|
||||||
}
|
}
|
||||||
|
|
||||||
/* checks whether the current v4lelement is close()'ed or whether it is still open */
|
/* checks whether the current v4lelement is close()'ed or whether it is still open */
|
||||||
#define GST_V4L_CHECK_NOT_OPEN(v4lelement) \
|
#define GST_V4L_CHECK_NOT_OPEN(element) \
|
||||||
if (v4lelement->video_fd != -1) \
|
if (element->video_fd != -1) \
|
||||||
{ \
|
{ \
|
||||||
gst_element_error (v4lelement, RESOURCE, TOO_LAZY, \
|
gst_element_error (element, RESOURCE, TOO_LAZY, \
|
||||||
(_("Device is open")), NULL); \
|
(_("Device is open")), NULL); \
|
||||||
return FALSE; \
|
return FALSE; \
|
||||||
}
|
}
|
||||||
|
|
||||||
/* checks whether the current v4lelement does video overlay */
|
/* checks whether the current v4lelement does video overlay */
|
||||||
#define GST_V4L_CHECK_OVERLAY(v4lelement) \
|
#define GST_V4L_CHECK_OVERLAY(element) \
|
||||||
if (!(v4lelement->vcap.type & VID_TYPE_OVERLAY)) \
|
if (!(element->vcap.type & VID_TYPE_OVERLAY)) \
|
||||||
{ \
|
{ \
|
||||||
gst_element_error (v4lelement, RESOURCE, TOO_LAZY, \
|
gst_element_error (element, RESOURCE, TOO_LAZY, \
|
||||||
NULL, ("Device cannot handle overlay")); \
|
NULL, ("Device cannot handle overlay")); \
|
||||||
return FALSE; \
|
return FALSE; \
|
||||||
}
|
}
|
||||||
|
|
||||||
/* checks whether we're in capture mode or not */
|
/* checks whether we're in capture mode or not */
|
||||||
#define GST_V4L_CHECK_ACTIVE(v4lelement) \
|
#define GST_V4L_CHECK_ACTIVE(element) \
|
||||||
if (v4lelement->buffer == NULL) \
|
if (element->buffer == NULL) \
|
||||||
{ \
|
{ \
|
||||||
gst_element_error (v4lelement, RESOURCE, SETTINGS, \
|
gst_element_error (element, RESOURCE, SETTINGS, \
|
||||||
NULL, ("Device is not in streaming mode")); \
|
NULL, ("Device is not in streaming mode")); \
|
||||||
return FALSE; \
|
return FALSE; \
|
||||||
}
|
}
|
||||||
|
|
||||||
/* checks whether we're out of capture mode or not */
|
/* checks whether we're out of capture mode or not */
|
||||||
#define GST_V4L_CHECK_NOT_ACTIVE(v4lelement) \
|
#define GST_V4L_CHECK_NOT_ACTIVE(element) \
|
||||||
if (v4lelement->buffer != NULL) \
|
if (element->buffer != NULL) \
|
||||||
{ \
|
{ \
|
||||||
gst_element_error (v4lelement, RESOURCE, SETTINGS, \
|
gst_element_error (element, RESOURCE, SETTINGS, \
|
||||||
NULL, ("Device is in streaming mode")); \
|
NULL, ("Device is in streaming mode")); \
|
||||||
return FALSE; \
|
return FALSE; \
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue