mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	pw_core -> pw_context
The proxy API is the one that we would like to expose for applications and the other API is used internally when implementing modules or factories. The current pw_core object is really a context for all objects so name it that way. It also makes it possible to rename pw_core_proxy to pw_proxy later.
This commit is contained in:
		
							parent
							
								
									42103a8218
								
							
						
					
					
						commit
						8ea78c2e3f
					
				
					 113 changed files with 905 additions and 906 deletions
				
			
		| 
						 | 
				
			
			@ -28,7 +28,7 @@
 | 
			
		|||
#include <spa/utils/result.h>
 | 
			
		||||
 | 
			
		||||
#include <pipewire/pipewire.h>
 | 
			
		||||
#include <pipewire/core.h>
 | 
			
		||||
#include <pipewire/context.h>
 | 
			
		||||
#include <pipewire/module.h>
 | 
			
		||||
 | 
			
		||||
#include "config.h"
 | 
			
		||||
| 
						 | 
				
			
			@ -54,7 +54,7 @@ static void show_help(const char *name)
 | 
			
		|||
 | 
			
		||||
int main(int argc, char *argv[])
 | 
			
		||||
{
 | 
			
		||||
	struct pw_core *core;
 | 
			
		||||
	struct pw_context *context;
 | 
			
		||||
	struct pw_main_loop *loop;
 | 
			
		||||
	struct pw_daemon_config *config;
 | 
			
		||||
	struct pw_properties *properties;
 | 
			
		||||
| 
						 | 
				
			
			@ -114,15 +114,15 @@ int main(int argc, char *argv[])
 | 
			
		|||
	pw_loop_add_signal(pw_main_loop_get_loop(loop), SIGINT, do_quit, loop);
 | 
			
		||||
	pw_loop_add_signal(pw_main_loop_get_loop(loop), SIGTERM, do_quit, loop);
 | 
			
		||||
 | 
			
		||||
	core = pw_core_new(pw_main_loop_get_loop(loop),
 | 
			
		||||
	context = pw_context_new(pw_main_loop_get_loop(loop),
 | 
			
		||||
			properties, 0);
 | 
			
		||||
 | 
			
		||||
	if (core == NULL) {
 | 
			
		||||
		pw_log_error("failed to create core: %m");
 | 
			
		||||
	if (context == NULL) {
 | 
			
		||||
		pw_log_error("failed to create context: %m");
 | 
			
		||||
		return -1;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if ((res = pw_daemon_config_run_commands(config, core)) < 0) {
 | 
			
		||||
	if ((res = pw_daemon_config_run_commands(config, context)) < 0) {
 | 
			
		||||
		pw_log_error("failed to run config commands: %s", spa_strerror(res));
 | 
			
		||||
		return -1;
 | 
			
		||||
	}
 | 
			
		||||
| 
						 | 
				
			
			@ -132,7 +132,7 @@ int main(int argc, char *argv[])
 | 
			
		|||
	pw_log_info("leave main loop");
 | 
			
		||||
 | 
			
		||||
	pw_daemon_config_free(config);
 | 
			
		||||
	pw_core_destroy(core);
 | 
			
		||||
	pw_context_destroy(context);
 | 
			
		||||
	pw_main_loop_destroy(loop);
 | 
			
		||||
 | 
			
		||||
	return 0;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue