mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-10 13:30:05 -05:00
mainloop: add threaded mainloop
Add a mainloop wrapper that runs the mainloop in a separate thread and has some synchronization primitives. Use new mainloop in gstreamer source and sink elements
This commit is contained in:
parent
a3505fb880
commit
cbeee04809
9 changed files with 710 additions and 195 deletions
|
|
@ -23,9 +23,7 @@
|
|||
#include <gst/gst.h>
|
||||
#include <gst/base/gstbasesink.h>
|
||||
|
||||
#include <client/context.h>
|
||||
#include <client/stream.h>
|
||||
#include <client/introspect.h>
|
||||
#include <client/pinos.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
|
|
@ -59,15 +57,10 @@ struct _GstPinosSink {
|
|||
gboolean negotiated;
|
||||
|
||||
GMainContext *context;
|
||||
GMainLoop *loop;
|
||||
GThread *thread;
|
||||
PinosMainLoop *loop;
|
||||
PinosContext *ctx;
|
||||
PinosStream *stream;
|
||||
GstAllocator *allocator;
|
||||
|
||||
GPollFunc poll_func;
|
||||
GMutex lock;
|
||||
GCond cond;
|
||||
};
|
||||
|
||||
struct _GstPinosSinkClass {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue