v4l2: continue work on the capture device

Remove activate and deactivate commands.
Add STEP property range type for v4l2 frame sizes later
v4l2: implement negotiation and data capture
This commit is contained in:
Wim Taymans 2016-07-06 19:43:37 +02:00
parent beedb65f00
commit a1a27328e2
17 changed files with 976 additions and 308 deletions

View file

@ -30,8 +30,6 @@ typedef struct _SpaCommand SpaCommand;
typedef enum {
SPA_COMMAND_INVALID = 0,
SPA_COMMAND_ACTIVATE,
SPA_COMMAND_DEACTIVATE,
SPA_COMMAND_START,
SPA_COMMAND_STOP,
SPA_COMMAND_FLUSH,

View file

@ -54,6 +54,7 @@ typedef enum {
SPA_RESULT_INVALID_DIRECTION = -23,
SPA_RESULT_TOO_MANY_PORTS = -24,
SPA_RESULT_INVALID_PROPERTY_ACCESS = -25,
SPA_RESULT_UNEXPECTED = -26,
} SpaResult;
typedef enum {

View file

@ -31,8 +31,8 @@ typedef struct _SpaEvent SpaEvent;
/**
* SpaEventType:
* @SPA_EVENT_TYPE_INVALID: invalid event, should be ignored
* @SPA_EVENT_TYPE_ACTIVATED: emited when the ACTIVATE command completes
* @SPA_EVENT_TYPE_DEACTIVATED: emited when the DEACTIVATE command completes
* @SPA_EVENT_TYPE_STARTED: emited when the START command completes
* @SPA_EVENT_TYPE_STOPPED: emited when the STOP command completes
* @SPA_EVENT_TYPE_CAN_PULL_OUTPUT: emited when an async node has output that can be pulled
* @SPA_EVENT_TYPE_CAN_PUSH_INTPUT: emited when more data can be pushed to an async node
* @SPA_EVENT_TYPE_PULL_INPUT: emited when data needs to be provided on an input
@ -46,8 +46,8 @@ typedef struct _SpaEvent SpaEvent;
*/
typedef enum {
SPA_EVENT_TYPE_INVALID = 0,
SPA_EVENT_TYPE_ACTIVATED,
SPA_EVENT_TYPE_DEACTIVATED,
SPA_EVENT_TYPE_STARTED,
SPA_EVENT_TYPE_STOPPED,
SPA_EVENT_TYPE_CAN_PULL_OUTPUT,
SPA_EVENT_TYPE_CAN_PUSH_INTPUT,
SPA_EVENT_TYPE_PULL_INPUT,

View file

@ -265,6 +265,7 @@ struct _SpaNode {
* SpaNode::set_port_format:
* @handle: a #SpaHandle
* @port_id: the port to configure
* @test_only: only check if the format is accepted
* @format: a #SpaFormat with the format
*
* Set a format on @port_id of @node.
@ -282,7 +283,7 @@ struct _SpaNode {
*/
SpaResult (*set_port_format) (SpaHandle *handle,
uint32_t port_id,
int test_only,
bool test_only,
const SpaFormat *format);
/**
* SpaNode::get_port_format:

View file

@ -79,12 +79,14 @@ typedef enum {
/* SpaPropRangeType:
* @SPA_PROP_RANGE_TYPE_NONE: no range specified, full range of type applies
* @SPA_PROP_RANGE_TYPE_MIN_MAX: range contains 2 values, min and max
* @SPA_PROP_RANGE_TYPE_STEP: range contains 3 values, min, max and step
* @SPA_PROP_RANGE_TYPE_ENUM: range contains enum of possible values
* @SPA_PROP_RANGE_TYPE_FLAGS: range contains flags of possible values
*/
typedef enum {
SPA_PROP_RANGE_TYPE_NONE = 0,
SPA_PROP_RANGE_TYPE_MIN_MAX,
SPA_PROP_RANGE_TYPE_STEP,
SPA_PROP_RANGE_TYPE_ENUM,
SPA_PROP_RANGE_TYPE_FLAGS,
} SpaPropRangeType;