mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
gst-node-factory: node factory for GstSource nodes
The GstNodeFactory creates GstSource nodes without ports. When an output port is created later, the proper GStreamer element will be created in the node. main.c registers a GstNodeFactory in the daemon, so clients can use it in calls to CreateNode and CreatePort.
This commit is contained in:
parent
649882f42a
commit
00ff707208
4 changed files with 134 additions and 0 deletions
|
|
@ -23,6 +23,7 @@
|
|||
#include <client/pinos.h>
|
||||
#include <server/daemon.h>
|
||||
#include <modules/gst/gst-manager.h>
|
||||
#include <modules/gst/gst-node-factory.h>
|
||||
|
||||
gint
|
||||
main (gint argc, gchar *argv[])
|
||||
|
|
@ -30,6 +31,7 @@ main (gint argc, gchar *argv[])
|
|||
PinosDaemon *daemon;
|
||||
GMainLoop *loop;
|
||||
PinosProperties *props;
|
||||
PinosNodeFactory *factory;
|
||||
|
||||
pinos_init (&argc, &argv);
|
||||
|
||||
|
|
@ -39,12 +41,17 @@ main (gint argc, gchar *argv[])
|
|||
daemon = pinos_daemon_new (props);
|
||||
|
||||
pinos_gst_manager_new (daemon);
|
||||
|
||||
factory = pinos_gst_node_factory_new ("gst-node-factory");
|
||||
pinos_daemon_add_node_factory (daemon, factory);
|
||||
|
||||
pinos_daemon_start (daemon);
|
||||
|
||||
g_main_loop_run (loop);
|
||||
|
||||
pinos_properties_free (props);
|
||||
g_main_loop_unref (loop);
|
||||
g_object_unref (factory);
|
||||
g_object_unref (daemon);
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue