mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	move things around
This commit is contained in:
		
							parent
							
								
									847cef83b6
								
							
						
					
					
						commit
						d1655196c3
					
				
					 130 changed files with 363 additions and 335 deletions
				
			
		
							
								
								
									
										56
									
								
								src/daemon/main.c
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										56
									
								
								src/daemon/main.c
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,56 @@
 | 
			
		|||
/* PipeWire
 | 
			
		||||
 * Copyright (C) 2015 Wim Taymans <wim.taymans@gmail.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 <pipewire/pipewire.h>
 | 
			
		||||
#include <pipewire/core.h>
 | 
			
		||||
#include <pipewire/module.h>
 | 
			
		||||
 | 
			
		||||
#include "daemon-config.h"
 | 
			
		||||
 | 
			
		||||
int main(int argc, char *argv[])
 | 
			
		||||
{
 | 
			
		||||
	struct pw_core *core;
 | 
			
		||||
	struct pw_main_loop *loop;
 | 
			
		||||
	struct pw_daemon_config *config;
 | 
			
		||||
	char *err = NULL;
 | 
			
		||||
 | 
			
		||||
	pw_init(&argc, &argv);
 | 
			
		||||
 | 
			
		||||
	/* parse configuration */
 | 
			
		||||
	config = pw_daemon_config_new();
 | 
			
		||||
	if (!pw_daemon_config_load(config, &err)) {
 | 
			
		||||
		pw_log_error("failed to parse config: %s", err);
 | 
			
		||||
		free(err);
 | 
			
		||||
		return -1;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	loop = pw_main_loop_new();
 | 
			
		||||
 | 
			
		||||
	core = pw_core_new(loop->loop, NULL);
 | 
			
		||||
 | 
			
		||||
	pw_daemon_config_run_commands(config, core);
 | 
			
		||||
 | 
			
		||||
	pw_main_loop_run(loop);
 | 
			
		||||
 | 
			
		||||
	pw_main_loop_destroy(loop);
 | 
			
		||||
 | 
			
		||||
	pw_core_destroy(core);
 | 
			
		||||
 | 
			
		||||
	return 0;
 | 
			
		||||
}
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue