mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-06 13:30:01 -05:00
Use mapper to make object id
Reuse object ids by using a mapper Simpify the uri struct a little.
This commit is contained in:
parent
f42268b9a5
commit
e7cae649aa
14 changed files with 61 additions and 64 deletions
60
pinos/server/uri.h
Normal file
60
pinos/server/uri.h
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
/* 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_URI_H__
|
||||
#define __PINOS_URI_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define PINOS_URI_URI "http://pinos.org/ns/uri"
|
||||
#define PINOS_URI_PREFIX PINOS_URI_URI "#"
|
||||
|
||||
#include <pinos/client/map.h>
|
||||
#include <spa/include/spa/id-map.h>
|
||||
|
||||
typedef struct _PinosURI PinosURI;
|
||||
|
||||
/**
|
||||
* PinosURI:
|
||||
*
|
||||
* Pinos URI support struct.
|
||||
*/
|
||||
struct _PinosURI {
|
||||
SpaIDMap *map;
|
||||
|
||||
uint32_t node;
|
||||
uint32_t node_factory;
|
||||
uint32_t link;
|
||||
uint32_t client;
|
||||
uint32_t client_node;
|
||||
|
||||
uint32_t spa_node;
|
||||
uint32_t spa_clock;
|
||||
uint32_t spa_monitor;
|
||||
};
|
||||
|
||||
void pinos_uri_init (PinosURI *uri);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __PINOS_URI_H__ */
|
||||
Loading…
Add table
Add a link
Reference in a new issue