mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-06 13:30:01 -05:00
Rework transport protocol
Use a more simple tranport protocol for the realtime data. Use a piece of shared memory and a socket where we use a 1byte read/write to trigger remote actions. Also use a ringbuffer for events.
This commit is contained in:
parent
7e46f9e3ad
commit
b774b99db5
22 changed files with 797 additions and 364 deletions
|
|
@ -1,53 +0,0 @@
|
|||
/* Pinos
|
||||
* 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 __PINOS_UTILS_H__
|
||||
#define __PINOS_UTILS_H__
|
||||
|
||||
#include <glib-object.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
typedef struct _PinosMemblock PinosMemblock;
|
||||
|
||||
typedef enum {
|
||||
PINOS_MEMBLOCK_FLAG_NONE = 0,
|
||||
PINOS_MEMBLOCK_FLAG_WITH_FD = (1 << 0),
|
||||
PINOS_MEMBLOCK_FLAG_MAP_READ = (1 << 1),
|
||||
PINOS_MEMBLOCK_FLAG_MAP_WRITE = (1 << 2),
|
||||
PINOS_MEMBLOCK_FLAG_SEAL = (1 << 3),
|
||||
} PinosMemblockFlags;
|
||||
|
||||
#define PINOS_MEMBLOCK_FLAG_MAP_READWRITE (PINOS_MEMBLOCK_FLAG_MAP_READ | PINOS_MEMBLOCK_FLAG_MAP_WRITE)
|
||||
|
||||
struct _PinosMemblock {
|
||||
PinosMemblockFlags flags;
|
||||
int fd;
|
||||
gpointer *ptr;
|
||||
gsize size;
|
||||
};
|
||||
|
||||
gboolean pinos_memblock_alloc (PinosMemblockFlags flags,
|
||||
gsize size,
|
||||
PinosMemblock *mem);
|
||||
void pinos_memblock_free (PinosMemblock *mem);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __PINOS_UTILS_H__ */
|
||||
Loading…
Add table
Add a link
Reference in a new issue