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:
David Svensson Fors 2016-06-23 19:22:44 +02:00 committed by Wim Taymans
parent 649882f42a
commit 00ff707208
4 changed files with 134 additions and 0 deletions

View file

@ -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;