mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
Fix some -Wenum-conversion errors
Make pw_direction and spa_direction the same Explicitly cast some enums or use the right enums
This commit is contained in:
parent
6937ec5e63
commit
a5b0553328
6 changed files with 8 additions and 9 deletions
|
|
@ -559,7 +559,7 @@ static void source_callback(struct source_data *d)
|
||||||
pa_source_info i;
|
pa_source_info i;
|
||||||
pa_format_info ii[1];
|
pa_format_info ii[1];
|
||||||
pa_format_info *ip[1];
|
pa_format_info *ip[1];
|
||||||
enum pa_sink_flags flags;
|
enum pa_source_flags flags;
|
||||||
|
|
||||||
flags = PA_SOURCE_LATENCY | PA_SOURCE_DYNAMIC_LATENCY |
|
flags = PA_SOURCE_LATENCY | PA_SOURCE_DYNAMIC_LATENCY |
|
||||||
PA_SOURCE_DECIBEL_VOLUME;
|
PA_SOURCE_DECIBEL_VOLUME;
|
||||||
|
|
|
||||||
|
|
@ -2259,7 +2259,7 @@ impl_init(const struct spa_handle_factory *factory,
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
this->dbus_connection = spa_dbus_get_connection(this->dbus, DBUS_BUS_SYSTEM);
|
this->dbus_connection = spa_dbus_get_connection(this->dbus, SPA_DBUS_TYPE_SYSTEM);
|
||||||
if (this->dbus_connection == NULL) {
|
if (this->dbus_connection == NULL) {
|
||||||
spa_log_error(this->log, "no dbus connection");
|
spa_log_error(this->log, "no dbus connection");
|
||||||
return -EIO;
|
return -EIO;
|
||||||
|
|
|
||||||
|
|
@ -294,7 +294,7 @@ impl_get_connection(void *object,
|
||||||
conn = calloc(1, sizeof(struct connection));
|
conn = calloc(1, sizeof(struct connection));
|
||||||
conn->this = impl_connection;
|
conn->this = impl_connection;
|
||||||
conn->impl = impl;
|
conn->impl = impl;
|
||||||
conn->conn = dbus_bus_get_private(type, &error);
|
conn->conn = dbus_bus_get_private((DBusBusType)type, &error);
|
||||||
if (conn->conn == NULL)
|
if (conn->conn == NULL)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1828,7 +1828,7 @@ int main(int argc, char *argv[])
|
||||||
|
|
||||||
impl.dbus = spa_support_find(support, n_support, SPA_TYPE_INTERFACE_DBus);
|
impl.dbus = spa_support_find(support, n_support, SPA_TYPE_INTERFACE_DBus);
|
||||||
if (impl.dbus)
|
if (impl.dbus)
|
||||||
impl.this.dbus_connection = spa_dbus_get_connection(impl.dbus, DBUS_BUS_SESSION);
|
impl.this.dbus_connection = spa_dbus_get_connection(impl.dbus, SPA_DBUS_TYPE_SESSION);
|
||||||
if (impl.this.dbus_connection == NULL)
|
if (impl.this.dbus_connection == NULL)
|
||||||
pw_log_warn("no dbus connection");
|
pw_log_warn("no dbus connection");
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -1434,7 +1434,7 @@ int pw_filter_set_error(struct pw_filter *filter,
|
||||||
if (filter->proxy)
|
if (filter->proxy)
|
||||||
pw_proxy_error(filter->proxy, res, value);
|
pw_proxy_error(filter->proxy, res, value);
|
||||||
|
|
||||||
filter_set_state(filter, PW_STREAM_STATE_ERROR, value);
|
filter_set_state(filter, PW_FILTER_STATE_ERROR, value);
|
||||||
va_end(args);
|
va_end(args);
|
||||||
free(value);
|
free(value);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -44,10 +44,9 @@ extern "C" {
|
||||||
struct pw_port;
|
struct pw_port;
|
||||||
|
|
||||||
/** \enum pw_direction The direction of a port \memberof pw_introspect */
|
/** \enum pw_direction The direction of a port \memberof pw_introspect */
|
||||||
enum pw_direction {
|
#define pw_direction spa_direction
|
||||||
PW_DIRECTION_INPUT = SPA_DIRECTION_INPUT, /**< an input port direction */
|
#define PW_DIRECTION_INPUT SPA_DIRECTION_INPUT
|
||||||
PW_DIRECTION_OUTPUT = SPA_DIRECTION_OUTPUT /**< an output port direction */
|
#define PW_DIRECTION_OUTPUT SPA_DIRECTION_OUTPUT
|
||||||
};
|
|
||||||
|
|
||||||
/** Convert a \ref pw_direction to a readable string \memberof pw_introspect */
|
/** Convert a \ref pw_direction to a readable string \memberof pw_introspect */
|
||||||
const char * pw_direction_as_string(enum pw_direction direction);
|
const char * pw_direction_as_string(enum pw_direction direction);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue