mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-10 13:30:05 -05:00
Remove dynamic types
Do not use dynamic types anymore. The reason is that it's difficult: - to maintain a shared type database over a network. - the extra overhead when translating between processes and for maintaining the translation tables. - race conditions in translating in RT-threads, this is a problem because we want to make event streams. We now have simple enums with types and extension points for all types. This is also nicer to use in general. We don't need the mapper anymore or pass strings around as types. There is a parallel type info system to get more info about ids and enums and their hierarchy. It can also be used for debugging.
This commit is contained in:
parent
e6977fa178
commit
fca3e1d85d
162 changed files with 5200 additions and 7461 deletions
36
spa/include/spa/pod/command-types.h
Normal file
36
spa/include/spa/pod/command-types.h
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
/* Simple Plugin API
|
||||
* Copyright (C) 2016 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 __SPA_COMMAND_TYPES_H__
|
||||
#define __SPA_COMMAND_TYPES_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <spa/utils/type-info.h>
|
||||
|
||||
#define SPA_TYPE__Command SPA_TYPE_POD_OBJECT_BASE "Command"
|
||||
#define SPA_TYPE_COMMAND_BASE SPA_TYPE__Command ":"
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif /* __SPA_COMMAND_TYPES_H__ */
|
||||
|
|
@ -27,9 +27,6 @@ extern "C" {
|
|||
#include <spa/utils/defs.h>
|
||||
#include <spa/pod/pod.h>
|
||||
|
||||
#define SPA_TYPE__Command SPA_TYPE_POD_OBJECT_BASE "Command"
|
||||
#define SPA_TYPE_COMMAND_BASE SPA_TYPE__Command ":"
|
||||
|
||||
struct spa_command_body {
|
||||
struct spa_pod_object_body body;
|
||||
};
|
||||
|
|
|
|||
36
spa/include/spa/pod/event-types.h
Normal file
36
spa/include/spa/pod/event-types.h
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
/* Simple Plugin API
|
||||
* Copyright (C) 2016 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 __SPA_EVENT_TYPES_H__
|
||||
#define __SPA_EVENT_TYPES_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <spa/pod/pod-types.h>
|
||||
|
||||
#define SPA_TYPE__Event SPA_TYPE_POD_OBJECT_BASE "Event"
|
||||
#define SPA_TYPE_EVENT_BASE SPA_TYPE__Event ":"
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif /* __SPA_EVENT_TYPES_H__ */
|
||||
|
|
@ -26,9 +26,6 @@ extern "C" {
|
|||
|
||||
#include <spa/pod/pod.h>
|
||||
|
||||
#define SPA_TYPE__Event SPA_TYPE_POD_OBJECT_BASE "Event"
|
||||
#define SPA_TYPE_EVENT_BASE SPA_TYPE__Event ":"
|
||||
|
||||
struct spa_event_body {
|
||||
struct spa_pod_object_body body;
|
||||
};
|
||||
|
|
|
|||
43
spa/include/spa/pod/pod-types.h
Normal file
43
spa/include/spa/pod/pod-types.h
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
/* Simple Plugin API
|
||||
* Copyright (C) 2017 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 __SPA_POD_TYPES_H__
|
||||
#define __SPA_POD_TYPES_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <spa/utils/type-info.h>
|
||||
#include <spa/pod/pod.h>
|
||||
|
||||
#define SPA_TYPE__POD SPA_TYPE_BASE "POD"
|
||||
#define SPA_TYPE_POD_BASE SPA_TYPE__POD ":"
|
||||
|
||||
#define SPA_TYPE_POD__Object SPA_TYPE_POD_BASE "Object"
|
||||
#define SPA_TYPE_POD_OBJECT_BASE SPA_TYPE_POD__Object ":"
|
||||
|
||||
#define SPA_TYPE_POD__Struct SPA_TYPE_POD_BASE "Struct"
|
||||
#define SPA_TYPE_POD_STRUCT_BASE SPA_TYPE_POD__Struct ":"
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif /* __SPA_POD_TYPES_H__ */
|
||||
|
|
@ -28,15 +28,6 @@ extern "C" {
|
|||
|
||||
#include <spa/utils/defs.h>
|
||||
|
||||
#define SPA_TYPE__POD SPA_TYPE_BASE "POD"
|
||||
#define SPA_TYPE_POD_BASE SPA_TYPE__POD ":"
|
||||
|
||||
#define SPA_TYPE_POD__Object SPA_TYPE_POD_BASE "Object"
|
||||
#define SPA_TYPE_POD_OBJECT_BASE SPA_TYPE_POD__Object ":"
|
||||
|
||||
#define SPA_TYPE_POD__Struct SPA_TYPE_POD_BASE "Struct"
|
||||
#define SPA_TYPE_POD_STRUCT_BASE SPA_TYPE_POD__Struct ":"
|
||||
|
||||
#ifndef SPA_POD_MAX_DEPTH
|
||||
#define SPA_POD_MAX_DEPTH 16
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue