pipewire/pinos/server/link.h

84 lines
2.3 KiB
C
Raw Normal View History

/* Pinos
* Copyright (C) 2015 Wim Taymans <wim.taymans@gmail.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#ifndef __PINOS_LINK_H__
#define __PINOS_LINK_H__
#include <glib-object.h>
G_BEGIN_DECLS
2016-11-14 12:42:00 +01:00
typedef struct _PinosLink PinosLink;
#define PINOS_LINK_URI "http://pinos.org/ns/link"
#define PINOS_LINK_PREFIX PINOS_LINK_URI "#"
#include <spa/include/spa/ringbuffer.h>
#include <pinos/client/mem.h>
#include <pinos/client/object.h>
#include <pinos/server/daemon.h>
#include <pinos/server/main-loop.h>
/**
* PinosLink:
*
2016-11-10 15:42:14 +01:00
* Pinos link interface.
*/
struct _PinosLink {
2016-11-14 12:42:00 +01:00
PinosCore *core;
SpaList list;
PinosGlobal *global;
2016-11-10 15:42:14 +01:00
PinosProperties *properties;
2016-11-10 15:42:14 +01:00
PinosLinkState state;
GError *error;
2016-11-14 12:42:00 +01:00
PINOS_SIGNAL (destroy_signal, (PinosListener *,
PinosLink *));
PinosPort *output;
PinosPort *input;
uint32_t queue[64];
SpaRingbuffer ringbuffer;
gint in_ready;
};
2016-11-14 12:42:00 +01:00
PinosLink * pinos_link_new (PinosCore *core,
PinosPort *output,
PinosPort *input,
GPtrArray *format_filter,
PinosProperties *properties);
void pinos_link_destroy (PinosLink *link);
bool pinos_link_activate (PinosLink *link);
bool pinos_link_deactivate (PinosLink *link);
const gchar * pinos_link_get_object_path (PinosLink *link);
G_END_DECLS
#endif /* __PINOS_LINK_H__ */