mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-16 07:00:00 -05:00
stream: improve stream API
Simplify the stream API. make just 2 methods to queue and dequeue buffers. Make just one callback when new buffers can be dequeued. Add support for driver nodes such as the video-src. Pass a pw_buffer structure to add/remove_buffer and make it possible to attach metadata to it. This makes it a lot easier to implement the gstreamer pipewire pool. Call the stream process function from the main loop and use a lockfree ringbuffer to pass buffers between the threads. Make it possible to also call process from the RT thread. unmap the buffer data when needed.
This commit is contained in:
parent
97547d726f
commit
f9ceedb714
11 changed files with 451 additions and 508 deletions
|
|
@ -24,6 +24,7 @@
|
|||
#include <gst/base/gstpushsrc.h>
|
||||
|
||||
#include <pipewire/pipewire.h>
|
||||
#include <gst/gstpipewirepool.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
|
|
@ -76,11 +77,9 @@ struct _GstPipeWireSrc {
|
|||
struct pw_stream *stream;
|
||||
struct spa_hook stream_listener;
|
||||
|
||||
GstAllocator *fd_allocator;
|
||||
GstAllocator *dmabuf_allocator;
|
||||
GstStructure *properties;
|
||||
|
||||
GHashTable *buf_ids;
|
||||
GstPipeWirePool *pool;
|
||||
GQueue queue;
|
||||
GstClock *clock;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue