stream: fix driver mode

This commit is contained in:
Wim Taymans 2018-05-02 11:42:04 +02:00
parent 7c4baf88ea
commit b160d81d2f
4 changed files with 5 additions and 5 deletions

View file

@ -219,8 +219,7 @@ static void on_state_changed(void *_data, enum pw_remote_state old, enum pw_remo
printf("remote state: \"%s\"\n",
pw_remote_state_as_string(state));
data->stream = pw_stream_new(remote, "video-src",
pw_properties_new("node.driver", "true", NULL));
data->stream = pw_stream_new(remote, "video-src", NULL);
params[0] = spa_pod_builder_object(&b,
data->t->param.idEnumFormat, data->t->spa_format,

View file

@ -21,7 +21,6 @@
#define __PIPEWIRE_CLIENT_STREAM_H__
#include <pipewire/node.h>
#include <extensions/client-stream.h>
#ifdef __cplusplus
extern "C" {

View file

@ -464,8 +464,6 @@ struct pw_node *pw_node_new(struct pw_core *core,
this->enabled = true;
this->properties = properties;
check_properties(this);
impl->work = pw_work_queue_new(this->core->main_loop);
this->info.name = strdup(name);
@ -506,6 +504,8 @@ struct pw_node *pw_node_new(struct pw_core *core,
spa_graph_node_init(&this->rt.node, &impl->node_activation.state);
spa_graph_node_add(&impl->graph, &this->rt.node);
check_properties(this);
return this;
no_mem:

View file

@ -1149,6 +1149,8 @@ pw_stream_connect(struct pw_stream *stream,
if (flags & PW_STREAM_FLAG_AUTOCONNECT)
pw_properties_set(stream->properties, PW_NODE_PROP_AUTOCONNECT, "1");
pw_properties_set(stream->properties, "node.stream", "1");
if (flags & PW_STREAM_FLAG_DRIVER)
pw_properties_set(stream->properties, "node.driver", "1");
state = pw_remote_get_state(stream->remote, NULL);
if (state == PW_REMOTE_STATE_UNCONNECTED ||