Remove redundant fields from PortInfo

This commit is contained in:
Wim Taymans 2017-05-22 18:02:31 +02:00
parent d1a6d6e03f
commit f12a5ffc80
5 changed files with 0 additions and 15 deletions

View file

@ -65,15 +65,8 @@ typedef struct {
* SpaPortInfo
* @flags: extra port flags
* @rate: rate of sequence number increment per second of media data
* @n_params: number of elements in @params;
* @params: type ids of params that can be queried
* @maxbuffering: the maximum amount of bytes that the element will keep
* around internally
* @latency: latency on this port in nanoseconds
*/
typedef struct {
uint32_t direction;
uint32_t port_id;
#define SPA_PORT_INFO_FLAG_REMOVABLE (1<<0) /* port can be removed */
#define SPA_PORT_INFO_FLAG_OPTIONAL (1<<1) /* processing on port is optional */
#define SPA_PORT_INFO_FLAG_CAN_ALLOC_BUFFERS (1<<2) /* the port can allocate buffer data */

View file

@ -310,8 +310,6 @@ spa_alsa_sink_node_port_set_format (SpaNode *node,
}
if (this->have_format) {
this->info.direction = direction;
this->info.port_id = port_id;
this->info.flags = SPA_PORT_INFO_FLAG_CAN_USE_BUFFERS |
SPA_PORT_INFO_FLAG_LIVE;
this->info.rate = this->rate;

View file

@ -356,8 +356,6 @@ spa_alsa_source_node_port_set_format (SpaNode *node,
}
if (this->have_format) {
this->info.direction = direction;
this->info.port_id = port_id;
this->info.flags = SPA_PORT_INFO_FLAG_CAN_USE_BUFFERS |
SPA_PORT_INFO_FLAG_LIVE;
this->info.rate = this->rate;

View file

@ -608,8 +608,6 @@ spa_audiotestsrc_node_port_set_format (SpaNode *node,
}
if (this->have_format) {
this->info.direction = direction;
this->info.port_id = port_id;
this->info.rate = this->current_format.info.raw.rate;
}

View file

@ -898,8 +898,6 @@ spa_v4l2_set_format (SpaV4l2Source *this, SpaVideoInfo *format, bool try_only)
framerate->denom = streamparm.parm.capture.timeperframe.numerator;
state->fmt = fmt;
state->info.direction = SPA_DIRECTION_OUTPUT;
state->info.port_id = 0;
state->info.flags = (state->export_buf ? SPA_PORT_INFO_FLAG_CAN_ALLOC_BUFFERS : 0) |
SPA_PORT_INFO_FLAG_CAN_USE_BUFFERS |
SPA_PORT_INFO_FLAG_LIVE;