daemon-conf: Add conf file parsing

Support to parse configuration files. By default, the default conf file
is parsed ({sysconfdir}/pinos/pinos.conf), but that can be changed with
an environment variable (PINOS_CONFIG_FILE). The file can contain
commands and assignments (no assignment supported this far).

Support for command module-load is added.
This commit is contained in:
Linus Svensson 2016-08-29 18:29:07 +02:00 committed by Wim Taymans
parent d654a1bcd6
commit 7d8e2d53f7
14 changed files with 729 additions and 59 deletions

View file

@ -0,0 +1,36 @@
/* Pinos
* Copyright (C) 2016 Axis Communications <dev-gstreamer@axis.com>
* @author Linus Svensson <linus.svensson@axis.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#include <server/daemon.h>
#include <server/module.h>
#include "spa-alsa-sink.h"
#include "spa-v4l2-source.h"
gboolean pinos__module_init (PinosModule *module, const gchar * args);
G_MODULE_EXPORT gboolean
pinos__module_init (PinosModule * module, G_GNUC_UNUSED const gchar * args)
{
pinos_spa_alsa_sink_new (module->daemon, "alsa-sink", NULL);
pinos_spa_v4l2_source_new (module->daemon, "v4l2-source", NULL);
return TRUE;
}