mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	
		
			
				
	
	
		
			29 lines
		
	
	
	
		
			625 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			29 lines
		
	
	
	
		
			625 B
		
	
	
	
		
			C
		
	
	
	
	
	
/* Spa Volume plugin */
 | 
						|
/* SPDX-FileCopyrightText: Copyright © 2018 Wim Taymans */
 | 
						|
/* SPDX-License-Identifier: MIT */
 | 
						|
 | 
						|
#include <errno.h>
 | 
						|
 | 
						|
#include <spa/support/plugin.h>
 | 
						|
#include <spa/support/log.h>
 | 
						|
 | 
						|
extern const struct spa_handle_factory spa_volume_factory;
 | 
						|
 | 
						|
SPA_LOG_TOPIC_ENUM_DEFINE_REGISTERED;
 | 
						|
 | 
						|
SPA_EXPORT
 | 
						|
int spa_handle_factory_enum(const struct spa_handle_factory **factory, uint32_t *index)
 | 
						|
{
 | 
						|
	spa_return_val_if_fail(factory != NULL, -EINVAL);
 | 
						|
	spa_return_val_if_fail(index != NULL, -EINVAL);
 | 
						|
 | 
						|
	switch (*index) {
 | 
						|
	case 0:
 | 
						|
		*factory = &spa_volume_factory;
 | 
						|
		break;
 | 
						|
	default:
 | 
						|
		return 0;
 | 
						|
	}
 | 
						|
	(*index)++;
 | 
						|
	return 1;
 | 
						|
}
 |