mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
module-rtp: add new rtp-session module
The module uses the apple session setup for managing peer connections. Make a generic rtp stream object, make midi and audio implementations.
This commit is contained in:
parent
c36d9bef38
commit
7da031c969
6 changed files with 2401 additions and 0 deletions
38
src/modules/module-rtp/stream.h
Normal file
38
src/modules/module-rtp/stream.h
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
/* PipeWire */
|
||||
/* SPDX-FileCopyrightText: Copyright © 2023 Wim Taymans <wim.taymans@gmail.com> */
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
#ifndef PIPEWIRE_RTP_STREAM_H
|
||||
#define PIPEWIRE_RTP_STREAM_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct rtp_stream;
|
||||
|
||||
struct rtp_stream_events {
|
||||
#define RTP_VERSION_STREAM_EVENTS 0
|
||||
uint32_t version;
|
||||
|
||||
void (*destroy) (void *data);
|
||||
|
||||
void (*state_changed) (void *data, bool started, const char *error);
|
||||
|
||||
void (*send_packet) (void *data, struct iovec *iov, size_t iovlen);
|
||||
};
|
||||
|
||||
struct rtp_stream *rtp_stream_new(struct pw_core *core,
|
||||
enum pw_direction direction, struct pw_properties *props,
|
||||
const struct rtp_stream_events *events, void *data);
|
||||
|
||||
void rtp_stream_destroy(struct rtp_stream *s);
|
||||
|
||||
int rtp_stream_receive_packet(struct rtp_stream *s, uint8_t *buffer, size_t len);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* PIPEWIRE_RTP_STREAM_H */
|
||||
Loading…
Add table
Add a link
Reference in a new issue