spa: make events and commands as objects

So we can serialize and introspect them more easily
This commit is contained in:
Wim Taymans 2017-03-15 16:21:05 +01:00
parent 4c4c0f2a7f
commit c951264fff
26 changed files with 423 additions and 327 deletions

View file

@ -924,7 +924,6 @@ static void
v4l2_on_fd_events (SpaSource *source)
{
SpaV4l2Source *this = source->data;
SpaNodeEvent event;
if (source->rmask & SPA_IO_ERR)
return;
@ -935,9 +934,10 @@ v4l2_on_fd_events (SpaSource *source)
if (mmap_read (this) < 0)
return;
event.type = SPA_NODE_EVENT_TYPE_HAVE_OUTPUT;
event.size = sizeof (event);
this->event_cb (&this->node, &event, this->user_data);
{
SpaNodeEvent event = SPA_NODE_EVENT_INIT (SPA_NODE_EVENT_HAVE_OUTPUT);
this->event_cb (&this->node, &event, this->user_data);
}
}
static SpaResult