clean up types

This commit is contained in:
Wim Taymans 2017-03-23 21:15:52 +01:00
parent d9a51b5d14
commit acedfe71c0
64 changed files with 756 additions and 752 deletions

View file

@ -307,7 +307,7 @@ registry_event_global (void *object,
pinos_log_debug ("got global %u %s", id, type);
if (!strcmp (type, PINOS_NODE_URI)) {
if (!strcmp (type, PINOS_TYPE__Node)) {
proxy = pinos_proxy_new (this,
SPA_ID_INVALID,
this->uri.node);
@ -315,7 +315,7 @@ registry_event_global (void *object,
goto no_mem;
proxy->implementation = &node_events;
} else if (!strcmp (type, PINOS_MODULE_URI)) {
} else if (!strcmp (type, PINOS_TYPE__Module)) {
proxy = pinos_proxy_new (this,
SPA_ID_INVALID,
this->uri.module);
@ -323,7 +323,7 @@ registry_event_global (void *object,
goto no_mem;
proxy->implementation = &module_events;
} else if (!strcmp (type, PINOS_CLIENT_URI)) {
} else if (!strcmp (type, PINOS_TYPE__Client)) {
proxy = pinos_proxy_new (this,
SPA_ID_INVALID,
this->uri.client);
@ -331,7 +331,7 @@ registry_event_global (void *object,
goto no_mem;
proxy->implementation = &client_events;
} else if (!strcmp (type, PINOS_LINK_URI)) {
} else if (!strcmp (type, PINOS_TYPE__Link)) {
proxy = pinos_proxy_new (this,
SPA_ID_INVALID,
this->uri.link);

View file

@ -354,12 +354,12 @@ send_need_input (PinosStream *stream)
{
#if 0
PinosStreamImpl *impl = SPA_CONTAINER_OF (stream, PinosStreamImpl, this);
SpaNodeEventNeedInput ni;
SpaEventNodeNeedInput ni;
uint64_t cmd = 1;
pinos_log_debug ("stream %p: need input", stream);
ni.event.type = SPA_NODE_EVENT_NEED_INPUT;
ni.event.type = SPA_EVENT_NODE_NEED_INPUT;
ni.event.size = sizeof (ni);
pinos_transport_add_event (impl->trans, &ni.event);
write (impl->rtfd, &cmd, 8);
@ -371,12 +371,12 @@ send_have_output (PinosStream *stream)
{
#if 0
PinosStreamImpl *impl = SPA_CONTAINER_OF (stream, PinosStreamImpl, this);
SpaNodeEventHaveOutput ho;
SpaEventNodeHaveOutput ho;
uint64_t cmd = 1;
pinos_log_debug ("stream %p: have output", stream);
ho.event.type = SPA_NODE_EVENT_HAVE_OUTPUT;
ho.event.type = SPA_EVENT_NODE_HAVE_OUTPUT;
ho.event.size = sizeof (ho);
pinos_transport_add_event (impl->trans, &ho.event);
write (impl->rtfd, &cmd, 8);
@ -387,9 +387,9 @@ static void
add_request_clock_update (PinosStream *stream, bool flush)
{
PinosStreamImpl *impl = SPA_CONTAINER_OF (stream, PinosStreamImpl, this);
SpaNodeEventRequestClockUpdate rcu =
SPA_NODE_EVENT_REQUEST_CLOCK_UPDATE_INIT (stream->context->uri.node_events.RequestClockUpdate,
SPA_NODE_EVENT_REQUEST_CLOCK_UPDATE_TIME, 0, 0);
SpaEventNodeRequestClockUpdate rcu =
SPA_EVENT_NODE_REQUEST_CLOCK_UPDATE_INIT (stream->context->uri.event_node.RequestClockUpdate,
SPA_EVENT_NODE_REQUEST_CLOCK_UPDATE_TIME, 0, 0);
pinos_client_node_do_event (impl->node_proxy, (SpaEvent*)&rcu);
}
@ -401,8 +401,8 @@ add_async_complete (PinosStream *stream,
bool flush)
{
PinosStreamImpl *impl = SPA_CONTAINER_OF (stream, PinosStreamImpl, this);
SpaNodeEventAsyncComplete ac =
SPA_NODE_EVENT_ASYNC_COMPLETE_INIT (stream->context->uri.node_events.AsyncComplete,
SpaEventNodeAsyncComplete ac =
SPA_EVENT_NODE_ASYNC_COMPLETE_INIT (stream->context->uri.event_node.AsyncComplete,
seq, res);
pinos_client_node_do_event (impl->node_proxy, (SpaEvent*)&ac);
}
@ -470,7 +470,7 @@ handle_rtnode_event (PinosStream *stream,
PinosStreamImpl *impl = SPA_CONTAINER_OF (stream, PinosStreamImpl, this);
PinosContext *context = impl->this.context;
if (SPA_EVENT_TYPE (event) == context->uri.node_events.HaveOutput) {
if (SPA_EVENT_TYPE (event) == context->uri.event_node.HaveOutput) {
int i;
//pinos_log_debug ("stream %p: have output", stream);
@ -486,12 +486,12 @@ handle_rtnode_event (PinosStream *stream,
}
send_need_input (stream);
}
else if (SPA_EVENT_TYPE (event) == context->uri.node_events.NeedInput) {
else if (SPA_EVENT_TYPE (event) == context->uri.event_node.NeedInput) {
//pinos_log_debug ("stream %p: need input", stream);
pinos_signal_emit (&stream->need_buffer, stream);
}
else if (SPA_EVENT_TYPE (event) == context->uri.node_events.ReuseBuffer) {
SpaNodeEventReuseBuffer *p = (SpaNodeEventReuseBuffer *) event;
else if (SPA_EVENT_TYPE (event) == context->uri.event_node.ReuseBuffer) {
SpaEventNodeReuseBuffer *p = (SpaEventNodeReuseBuffer *) event;
BufferId *bid;
if (p->body.port_id.value != impl->port_id)
@ -580,14 +580,14 @@ handle_node_command (PinosStream *stream,
PinosStreamImpl *impl = SPA_CONTAINER_OF (stream, PinosStreamImpl, this);
PinosContext *context = stream->context;
if (SPA_COMMAND_TYPE (command) == context->uri.node_commands.Pause) {
if (SPA_COMMAND_TYPE (command) == context->uri.command_node.Pause) {
pinos_log_debug ("stream %p: pause %d", stream, seq);
add_state_change (stream, SPA_NODE_STATE_PAUSED, false);
add_async_complete (stream, seq, SPA_RESULT_OK, true);
stream_set_state (stream, PINOS_STREAM_STATE_PAUSED, NULL);
}
else if (SPA_COMMAND_TYPE (command) == context->uri.node_commands.Start) {
else if (SPA_COMMAND_TYPE (command) == context->uri.command_node.Start) {
pinos_log_debug ("stream %p: start %d", stream, seq);
add_state_change (stream, SPA_NODE_STATE_STREAMING, false);
add_async_complete (stream, seq, SPA_RESULT_OK, true);
@ -597,9 +597,9 @@ handle_node_command (PinosStream *stream,
stream_set_state (stream, PINOS_STREAM_STATE_STREAMING, NULL);
}
else if (SPA_COMMAND_TYPE (command) == context->uri.node_commands.ClockUpdate) {
SpaNodeCommandClockUpdate *cu = (SpaNodeCommandClockUpdate *) command;
if (cu->body.flags.value & SPA_NODE_COMMAND_CLOCK_UPDATE_FLAG_LIVE) {
else if (SPA_COMMAND_TYPE (command) == context->uri.command_node.ClockUpdate) {
SpaCommandNodeClockUpdate *cu = (SpaCommandNodeClockUpdate *) command;
if (cu->body.flags.value & SPA_COMMAND_NODE_CLOCK_UPDATE_FLAG_LIVE) {
pinos_properties_set (stream->properties,
"pinos.latency.is-live", "1");
pinos_properties_setf (stream->properties,
@ -1125,7 +1125,7 @@ pinos_stream_recycle_buffer (PinosStream *stream,
uint32_t id)
{
PinosStreamImpl *impl = SPA_CONTAINER_OF (stream, PinosStreamImpl, this);
SpaNodeEventReuseBuffer rb = SPA_NODE_EVENT_REUSE_BUFFER_INIT (stream->context->uri.node_events.ReuseBuffer,
SpaEventNodeReuseBuffer rb = SPA_EVENT_NODE_REUSE_BUFFER_INIT (stream->context->uri.event_node.ReuseBuffer,
impl->port_id, id);
uint64_t cmd = 1;

View file

@ -26,21 +26,23 @@
extern "C" {
#endif
#define PINOS_CORE_URI "http://pinos.org/ns/core"
#define PINOS_CORE_PREFIX PINOS_CORE_URI "#"
#define PINOS_CORE_REGISTRY PINOS_CORE_PREFIX "Registry"
#define PINOS_TYPE__Core "Pinos:Object:Core"
#define PINOS_TYPE_CORE_BASE PINOS_TYPE__Core ":"
#define PINOS_NODE_URI "http://pinos.org/ns/node"
#define PINOS_NODE_PREFIX PINOS_NODE_URI "#"
#define PINOS_TYPE__Registry "Pinos:Object:Registry"
#define PINOS_TYPE_REGISYRY_BASE PINOS_TYPE__Registry ":"
#define PINOS_CLIENT_URI "http://pinos.org/ns/client"
#define PINOS_CLIENT_PREFIX PINOS_CLIENT_URI "#"
#define PINOS_TYPE__Node "Pinos:Object:Node"
#define PINOS_TYPE_NODE_BASE PINOS_TYPE__Node ":"
#define PINOS_LINK_URI "http://pinos.org/ns/link"
#define PINOS_LINK_PREFIX PINOS_LINK_URI "#"
#define PINOS_TYPE__Client "Pinos:Object:Client"
#define PINOS_TYPE_CLIENT_BASE PINOS_TYPE__Client ":"
#define PINOS_MODULE_URI "http://pinos.org/ns/module"
#define PINOS_MODULE_PREFIX PINOS_MODULE_URI "#"
#define PINOS_TYPE__Link "Pinos:Object:Link"
#define PINOS_TYPE_LINK_BASE PINOS_TYPE__Link ":"
#define PINOS_TYPE__Module "Pinos:Object:Module"
#define PINOS_TYPE_MODULE_BASE PINOS_TYPE__Module ":"
typedef enum {
PINOS_SUBSCRIPTION_EVENT_NEW = 0,

View file

@ -36,21 +36,21 @@ pinos_uri_init (PinosURI *uri)
{
uri->map = pinos_id_map_get_default();
uri->core = spa_id_map_get_id (uri->map, PINOS_CORE_URI);
uri->registry = spa_id_map_get_id (uri->map, PINOS_CORE_REGISTRY);
uri->node = spa_id_map_get_id (uri->map, PINOS_NODE_URI);
uri->node_factory = spa_id_map_get_id (uri->map, PINOS_NODE_FACTORY_URI);
uri->link = spa_id_map_get_id (uri->map, PINOS_LINK_URI);
uri->client = spa_id_map_get_id (uri->map, PINOS_CLIENT_URI);
uri->client_node = spa_id_map_get_id (uri->map, PINOS_CLIENT_NODE_URI);
uri->module = spa_id_map_get_id (uri->map, PINOS_MODULE_URI);
uri->core = spa_id_map_get_id (uri->map, PINOS_TYPE__Core);
uri->registry = spa_id_map_get_id (uri->map, PINOS_TYPE__Registry);
uri->node = spa_id_map_get_id (uri->map, PINOS_TYPE__Node);
uri->node_factory = spa_id_map_get_id (uri->map, PINOS_TYPE__NodeFactory);
uri->link = spa_id_map_get_id (uri->map, PINOS_TYPE__Link);
uri->client = spa_id_map_get_id (uri->map, PINOS_TYPE__Client);
uri->client_node = spa_id_map_get_id (uri->map, PINOS_TYPE__ClientNode);
uri->module = spa_id_map_get_id (uri->map, PINOS_TYPE__Module);
uri->spa_node = spa_id_map_get_id (uri->map, SPA_NODE_URI);
uri->spa_clock = spa_id_map_get_id (uri->map, SPA_CLOCK_URI);
uri->spa_monitor = spa_id_map_get_id (uri->map, SPA_MONITOR_URI);
uri->spa_node = spa_id_map_get_id (uri->map, SPA_TYPE__Node);
uri->spa_clock = spa_id_map_get_id (uri->map, SPA_TYPE__Clock);
uri->spa_monitor = spa_id_map_get_id (uri->map, SPA_TYPE__Monitor);
spa_node_events_map (uri->map, &uri->node_events);
spa_node_commands_map (uri->map, &uri->node_commands);
spa_event_node_map (uri->map, &uri->event_node);
spa_command_node_map (uri->map, &uri->command_node);
spa_monitor_types_map (uri->map, &uri->monitor_types);
spa_alloc_param_buffers_map (uri->map, &uri->alloc_param_buffers);
spa_alloc_param_meta_enable_map (uri->map, &uri->alloc_param_meta_enable);

View file

@ -24,8 +24,8 @@
extern "C" {
#endif
#define PINOS_URI_URI "http://pinos.org/ns/uri"
#define PINOS_URI_PREFIX PINOS_URI_URI "#"
#define PINOS_TYPE__Uri "Pinos:Object:Uri"
#define PINOS_TYPE_URI_BASE PINOS_TYPE__Uri ":"
#include <pinos/client/map.h>
#include <spa/include/spa/id-map.h>
@ -55,8 +55,8 @@ struct _PinosURI {
uint32_t spa_clock;
uint32_t spa_monitor;
SpaNodeEvents node_events;
SpaNodeCommands node_commands;
SpaEventNode event_node;
SpaCommandNode command_node;
SpaMonitorTypes monitor_types;
SpaAllocParamBuffers alloc_param_buffers;
SpaAllocParamMetaEnable alloc_param_meta_enable;

View file

@ -52,7 +52,7 @@ ensure_types (void)
{
SpaIDMap *map = spa_id_map_get_default ();
format_type = spa_id_map_get_id (map, SPA_FORMAT_URI);
format_type = spa_id_map_get_id (map, SPA_TYPE__Format);
spa_media_types_fill (&media_types, map);
spa_media_subtypes_map (map, &media_subtypes);
spa_media_subtypes_video_map (map, &media_subtypes_video);
@ -602,7 +602,7 @@ gst_caps_from_format (const SpaFormat *format)
const char * str = spa_id_map_get_uri (spa_id_map_get_default (), f.info.raw.format);
res = gst_caps_new_simple ("video/x-raw",
"format", G_TYPE_STRING, strstr (str, "#") + 1,
"format", G_TYPE_STRING, rindex (str, ':') + 1,
"width", G_TYPE_INT, f.info.raw.size.width,
"height", G_TYPE_INT, f.info.raw.size.height,
"framerate", GST_TYPE_FRACTION, f.info.raw.framerate.num, f.info.raw.framerate.denom,
@ -634,7 +634,7 @@ gst_caps_from_format (const SpaFormat *format)
const char * str = spa_id_map_get_uri (spa_id_map_get_default (), f.info.raw.format);
res = gst_caps_new_simple ("audio/x-raw",
"format", G_TYPE_STRING, strstr (str, "#") + 1,
"format", G_TYPE_STRING, rindex (str, ':') + 1,
"layout", G_TYPE_STRING, "interleaved",
"rate", G_TYPE_INT, f.info.raw.rate,
"channels", G_TYPE_INT, f.info.raw.channels,

View file

@ -40,9 +40,9 @@ setup_video_node (PinosCore *core, SpaNode *spa_node, PinosProperties *pinos_pro
/* Retrieve pattern property */
pattern = pinos_properties_get (pinos_props, "pattern");
if (strcmp (pattern, "smpte-snow") == 0) {
pattern_uri = SPA_PROPS__patternType ":smpte-snow";
pattern_uri = SPA_TYPE_PROPS__patternType ":smpte-snow";
} else if (strcmp (pattern, "snow") == 0) {
pattern_uri = SPA_PROPS__patternType ":snow";
pattern_uri = SPA_TYPE_PROPS__patternType ":snow";
} else {
pinos_log_debug ("Unrecognized pattern");
return SPA_RESULT_ERROR;
@ -53,7 +53,7 @@ setup_video_node (PinosCore *core, SpaNode *spa_node, PinosProperties *pinos_pro
return SPA_RESULT_ERROR;
}
if ((prop = spa_pod_object_find_prop (props, spa_id_map_get_id (core->uri.map, SPA_PROPS__patternType)))) {
if ((prop = spa_pod_object_find_prop (props, spa_id_map_get_id (core->uri.map, SPA_TYPE_PROPS__patternType)))) {
if (prop->body.value.type == SPA_POD_TYPE_URI)
SPA_POD_VALUE (SpaPODURI, &prop->body.value) = spa_id_map_get_id (core->uri.map, pattern_uri);
}

View file

@ -163,7 +163,7 @@ remove_item (PinosSpaMonitor *this, SpaMonitorItem *item)
static void
on_monitor_event (SpaMonitor *monitor,
SpaMonitorEvent *event,
SpaEventMonitor *event,
void *user_data)
{
PinosSpaMonitor *this = user_data;

View file

@ -24,8 +24,8 @@
extern "C" {
#endif
#define PINOS_ACCESS_URI "http://pinos.org/ns/access"
#define PINOS_ACCESS_PREFIX PINOS_ACCESS_URI "#"
#define PINOS_TYPE__Access "Pinos:Object:Access"
#define PINOS_TYPE_ACCESS_BASE PINOS_TYPE__Access ":"
#include <pinos/client/sig.h>

View file

@ -93,7 +93,7 @@ struct _SpaProxy
SpaLoop *main_loop;
SpaLoop *data_loop;
SpaNodeEventCallback event_cb;
SpaEventNodeCallback event_cb;
void *user_data;
PinosResource *resource;
@ -130,7 +130,7 @@ static void
send_async_complete (SpaProxy *this, uint32_t seq, SpaResult res)
{
PinosCore *core = this->pnode->core;
SpaNodeEventAsyncComplete ac = SPA_NODE_EVENT_ASYNC_COMPLETE_INIT (core->uri.node_events.AsyncComplete,
SpaEventNodeAsyncComplete ac = SPA_EVENT_NODE_ASYNC_COMPLETE_INIT (core->uri.event_node.AsyncComplete,
seq, res);
this->event_cb (&this->node, (SpaEvent *)&ac, this->user_data);
}
@ -166,7 +166,7 @@ static void
send_need_input (SpaProxy *this)
{
PinosNode *pnode = this->pnode;
SpaEvent event = SPA_EVENT_INIT (pnode->core->uri.node_events.NeedInput);
SpaEvent event = SPA_EVENT_INIT (pnode->core->uri.event_node.NeedInput);
uint64_t cmd = 1;
pinos_transport_add_event (pnode->transport, &event);
@ -177,7 +177,7 @@ static void
send_have_output (SpaProxy *this)
{
PinosNode *pnode = this->pnode;
SpaEvent event = SPA_EVENT_INIT (pnode->core->uri.node_events.HaveOutput);
SpaEvent event = SPA_EVENT_INIT (pnode->core->uri.event_node.HaveOutput);
uint64_t cmd = 1;
pinos_transport_add_event (pnode->transport, &event);
@ -202,7 +202,7 @@ spa_proxy_node_send_command (SpaNode *node,
core = this->pnode->core;
if (SPA_COMMAND_TYPE (command) == core->uri.node_commands.ClockUpdate) {
if (SPA_COMMAND_TYPE (command) == core->uri.command_node.ClockUpdate) {
pinos_client_node_notify_node_command (this->resource,
this->seq++,
command);
@ -212,7 +212,7 @@ spa_proxy_node_send_command (SpaNode *node,
pinos_client_node_notify_node_command (this->resource,
this->seq,
command);
if (SPA_COMMAND_TYPE (command) == core->uri.node_commands.Start)
if (SPA_COMMAND_TYPE (command) == core->uri.command_node.Start)
send_need_input (this);
res = SPA_RESULT_RETURN_ASYNC (this->seq++);
@ -222,7 +222,7 @@ spa_proxy_node_send_command (SpaNode *node,
static SpaResult
spa_proxy_node_set_event_callback (SpaNode *node,
SpaNodeEventCallback event,
SpaEventNodeCallback event,
void *user_data)
{
SpaProxy *this;
@ -770,7 +770,7 @@ spa_proxy_node_port_reuse_buffer (SpaNode *node,
return SPA_RESULT_INVALID_PORT;
{
SpaNodeEventReuseBuffer rb = SPA_NODE_EVENT_REUSE_BUFFER_INIT (pnode->core->uri.node_events.ReuseBuffer,
SpaEventNodeReuseBuffer rb = SPA_EVENT_NODE_REUSE_BUFFER_INIT (pnode->core->uri.event_node.ReuseBuffer,
port_id, buffer_id);
pinos_transport_add_event (pnode->transport, (SpaEvent *)&rb);
//write (this->data_source.fd, &cmd, 8);
@ -999,11 +999,11 @@ proxy_init (SpaProxy *this,
uint32_t i;
for (i = 0; i < n_support; i++) {
if (strcmp (support[i].uri, SPA_LOG_URI) == 0)
if (strcmp (support[i].uri, SPA_TYPE__Log) == 0)
this->log = support[i].data;
else if (strcmp (support[i].uri, SPA_LOOP__MainLoop) == 0)
else if (strcmp (support[i].uri, SPA_TYPE_LOOP__MainLoop) == 0)
this->main_loop = support[i].data;
else if (strcmp (support[i].uri, SPA_LOOP__DataLoop) == 0)
else if (strcmp (support[i].uri, SPA_TYPE_LOOP__DataLoop) == 0)
this->data_loop = support[i].data;
}
if (this->data_loop == NULL) {

View file

@ -26,8 +26,8 @@
extern "C" {
#endif
#define PINOS_CLIENT_NODE_URI "http://pinos.org/ns/client-node"
#define PINOS_CLIENT_NODE_PREFIX PINOS_CLIENT_NODE_URI "#"
#define PINOS_TYPE__ClientNode "Pinos:Object:ClientNode"
#define PINOS_TYPE_CLIENT_NODE_BASE PINOS_TYPE__ClientNode ":"
typedef struct _PinosClientNode PinosClientNode;

View file

@ -295,13 +295,13 @@ pinos_core_new (PinosMainLoop *main_loop,
pinos_access_init (&this->access);
pinos_map_init (&this->objects, 128, 32);
impl->support[0].uri = SPA_ID_MAP_URI;
impl->support[0].uri = SPA_TYPE__IDMap;
impl->support[0].data = this->uri.map;
impl->support[1].uri = SPA_LOG_URI;
impl->support[1].uri = SPA_TYPE__Log;
impl->support[1].data = pinos_log_get ();
impl->support[2].uri = SPA_LOOP__DataLoop;
impl->support[2].uri = SPA_TYPE_LOOP__DataLoop;
impl->support[2].data = this->data_loop->loop->loop;
impl->support[3].uri = SPA_LOOP__MainLoop;
impl->support[3].uri = SPA_TYPE_LOOP__MainLoop;
impl->support[3].data = this->main_loop->loop->loop;
this->support = impl->support;
this->n_support = 4;

View file

@ -24,8 +24,8 @@
extern "C" {
#endif
#define PINOS_NODE_FACTORY_URI "http://pinos.org/ns/node-factory"
#define PINOS_NODE_FACTORY_PREFIX PINOS_NODE_FACTORY_URI "#"
#define PINOS_TYPE__NodeFactory "Pinos:Object:NodeFactory"
#define PINOS_TYPE_NODE_FACTORY_BASE PINOS_TYPE__NodeFactory ":"
typedef struct _PinosNodeFactory PinosNodeFactory;

View file

@ -169,7 +169,7 @@ pause_node (PinosNode *this)
pinos_log_debug ("node %p: pause node", this);
{
SpaCommand cmd = SPA_COMMAND_INIT (this->core->uri.node_commands.Pause);
SpaCommand cmd = SPA_COMMAND_INIT (this->core->uri.command_node.Pause);
if ((res = spa_node_send_command (this->node, &cmd)) < 0)
pinos_log_debug ("got error %d", res);
}
@ -183,7 +183,7 @@ start_node (PinosNode *this)
pinos_log_debug ("node %p: start node", this);
{
SpaCommand cmd = SPA_COMMAND_INIT (this->core->uri.node_commands.Start);
SpaCommand cmd = SPA_COMMAND_INIT (this->core->uri.command_node.Start);
if ((res = spa_node_send_command (this->node, &cmd)) < 0)
pinos_log_debug ("got error %d", res);
}
@ -224,13 +224,13 @@ static void
send_clock_update (PinosNode *this)
{
SpaResult res;
SpaNodeCommandClockUpdate cu =
SPA_NODE_COMMAND_CLOCK_UPDATE_INIT(
this->core->uri.node_commands.ClockUpdate,
SPA_NODE_COMMAND_CLOCK_UPDATE_TIME |
SPA_NODE_COMMAND_CLOCK_UPDATE_SCALE |
SPA_NODE_COMMAND_CLOCK_UPDATE_STATE |
SPA_NODE_COMMAND_CLOCK_UPDATE_LATENCY, /* change_mask */
SpaCommandNodeClockUpdate cu =
SPA_COMMAND_NODE_CLOCK_UPDATE_INIT(
this->core->uri.command_node.ClockUpdate,
SPA_COMMAND_NODE_CLOCK_UPDATE_TIME |
SPA_COMMAND_NODE_CLOCK_UPDATE_SCALE |
SPA_COMMAND_NODE_CLOCK_UPDATE_STATE |
SPA_COMMAND_NODE_CLOCK_UPDATE_LATENCY, /* change_mask */
1, /* rate */
0, /* ticks */
0, /* monotonic_time */
@ -241,7 +241,7 @@ send_clock_update (PinosNode *this)
0); /* latency */
if (this->clock && this->live) {
cu.body.flags.value = SPA_NODE_COMMAND_CLOCK_UPDATE_FLAG_LIVE;
cu.body.flags.value = SPA_COMMAND_NODE_CLOCK_UPDATE_FLAG_LIVE;
res = spa_clock_get_time (this->clock,
&cu.body.rate.value,
&cu.body.ticks.value,
@ -258,15 +258,15 @@ on_node_event (SpaNode *node, SpaEvent *event, void *user_data)
PinosNode *this = user_data;
PinosNodeImpl *impl = SPA_CONTAINER_OF (this, PinosNodeImpl, this);
if (SPA_EVENT_TYPE (event) == this->core->uri.node_events.AsyncComplete) {
SpaNodeEventAsyncComplete *ac = (SpaNodeEventAsyncComplete *) event;
if (SPA_EVENT_TYPE (event) == this->core->uri.event_node.AsyncComplete) {
SpaEventNodeAsyncComplete *ac = (SpaEventNodeAsyncComplete *) event;
pinos_log_debug ("node %p: async complete event %d %d", this, ac->body.seq.value, ac->body.res.value);
if (!pinos_work_queue_complete (impl->work, this, ac->body.seq.value, ac->body.res.value)) {
pinos_signal_emit (&this->async_complete, this, ac->body.seq.value, ac->body.res.value);
}
}
else if (SPA_EVENT_TYPE (event) == this->core->uri.node_events.NeedInput) {
else if (SPA_EVENT_TYPE (event) == this->core->uri.event_node.NeedInput) {
SpaResult res;
int i;
bool processed = false;
@ -310,7 +310,7 @@ on_node_event (SpaNode *node, SpaEvent *event, void *user_data)
pinos_log_warn ("node %p: got process input %d", this, res);
}
}
else if (SPA_EVENT_TYPE (event) == this->core->uri.node_events.HaveOutput) {
else if (SPA_EVENT_TYPE (event) == this->core->uri.event_node.HaveOutput) {
SpaResult res;
int i;
bool processed = false;
@ -353,7 +353,7 @@ on_node_event (SpaNode *node, SpaEvent *event, void *user_data)
pinos_log_warn ("node %p: got process output %d", this, res);
}
}
else if (SPA_EVENT_TYPE (event) == this->core->uri.node_events.RequestClockUpdate) {
else if (SPA_EVENT_TYPE (event) == this->core->uri.event_node.RequestClockUpdate) {
send_clock_update (this);
}
}

View file

@ -24,8 +24,8 @@
extern "C" {
#endif
#define PINOS_NODE_URI "http://pinos.org/ns/node"
#define PINOS_NODE_PREFIX PINOS_NODE_URI "#"
#define PINOS_TYPE__Node "Pinos:Object:Node"
#define PINOS_TYPE_NODE_BASE PINOS_TYPE__Node ":"
typedef struct _PinosNode PinosNode;

View file

@ -206,7 +206,7 @@ no_mem:
static SpaResult
pinos_port_pause (PinosPort *port)
{
SpaCommand cmd = SPA_COMMAND_INIT (port->node->core->uri.node_commands.Pause);
SpaCommand cmd = SPA_COMMAND_INIT (port->node->core->uri.command_node.Pause);
return spa_node_port_send_command (port->node->node,
port->direction,
port->port_id,

View file

@ -24,8 +24,8 @@
extern "C" {
#endif
#define PINOS_PORT_URI "http://pinos.org/ns/port"
#define PINOS_PORT_PREFIX PINOS_PORT_URI "#"
#define PINOS_TYPE__Port "Pinos:Object:Port"
#define PINOS_TYPE_PORT_BASE PINOS_TYPE__Port ":"
typedef struct _PinosPort PinosPort;

View file

@ -24,8 +24,8 @@
extern "C" {
#endif
#define PINOS_RESOURCE_URI "http://pinos.org/ns/resource"
#define PINOS_RESOURCE_PREFIX PINOS_RESOURCE_URI "#"
#define PINOS_TYPE__Resource "Pinos:Object:Resource"
#define PINOS_TYPE_RESOURCE_BASE PINOS_TYPE__Resource ":"
typedef struct _PinosResource PinosResource;

View file

@ -65,7 +65,7 @@ dump_core_info (PinosContext *c,
return;
printf ("\tid: %u\n", info->id);
printf ("\ttype: %s\n", PINOS_CORE_URI);
printf ("\ttype: %s\n", PINOS_TYPE__Core);
if (data->print_all) {
printf ("%c\tuser-name: \"%s\"\n", MARK_CHANGE (0), info->user_name);
printf ("%c\thost-name: \"%s\"\n", MARK_CHANGE (1), info->host_name);
@ -88,7 +88,7 @@ dump_client_info (PinosContext *c,
return;
printf ("\tid: %u\n", info->id);
printf ("\ttype: %s\n", PINOS_CLIENT_URI);
printf ("\ttype: %s\n", PINOS_TYPE__Client);
if (data->print_all) {
print_properties (info->props, MARK_CHANGE (0));
}
@ -109,7 +109,7 @@ dump_node_info (PinosContext *c,
}
printf ("\tid: %u\n", info->id);
printf ("\ttype: %s\n", PINOS_NODE_URI);
printf ("\ttype: %s\n", PINOS_TYPE__Node);
if (data->print_all) {
int i;
@ -148,7 +148,7 @@ dump_module_info (PinosContext *c,
}
printf ("\tid: %u\n", info->id);
printf ("\ttype: %s\n", PINOS_MODULE_URI);
printf ("\ttype: %s\n", PINOS_TYPE__Module);
if (data->print_all) {
printf ("%c\tname: \"%s\"\n", MARK_CHANGE (0), info->name);
printf ("%c\tfilename: \"%s\"\n", MARK_CHANGE (1), info->filename);
@ -172,7 +172,7 @@ dump_link_info (PinosContext *c,
}
printf ("\tid: %u\n", info->id);
printf ("\ttype: %s\n", PINOS_LINK_URI);
printf ("\ttype: %s\n", PINOS_TYPE__Link);
if (data->print_all) {
printf ("%c\toutput-node-id: %u\n", MARK_CHANGE (0), info->output_node_id);
printf ("%c\toutput-port-id: %u\n", MARK_CHANGE (1), info->output_port_id);