mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	Use types with known sizes where we can, easier to serialize
Add iterator for POD and use it to implement some demarshalling.
This commit is contained in:
		
							parent
							
								
									23d09d5b60
								
							
						
					
					
						commit
						f92b68c3c3
					
				
					 77 changed files with 839 additions and 695 deletions
				
			
		| 
						 | 
				
			
			@ -94,7 +94,7 @@ struct _SpaAudioTestSrc {
 | 
			
		|||
  size_t bpf;
 | 
			
		||||
 | 
			
		||||
  ATSBuffer buffers[MAX_BUFFERS];
 | 
			
		||||
  unsigned int n_buffers;
 | 
			
		||||
  uint32_t  n_buffers;
 | 
			
		||||
 | 
			
		||||
  bool started;
 | 
			
		||||
  uint64_t start_time;
 | 
			
		||||
| 
						 | 
				
			
			@ -397,10 +397,10 @@ spa_audiotestsrc_node_set_event_callback (SpaNode              *node,
 | 
			
		|||
 | 
			
		||||
static SpaResult
 | 
			
		||||
spa_audiotestsrc_node_get_n_ports (SpaNode       *node,
 | 
			
		||||
                                   unsigned int  *n_input_ports,
 | 
			
		||||
                                   unsigned int  *max_input_ports,
 | 
			
		||||
                                   unsigned int  *n_output_ports,
 | 
			
		||||
                                   unsigned int  *max_output_ports)
 | 
			
		||||
                                   uint32_t      *n_input_ports,
 | 
			
		||||
                                   uint32_t      *max_input_ports,
 | 
			
		||||
                                   uint32_t      *n_output_ports,
 | 
			
		||||
                                   uint32_t      *max_output_ports)
 | 
			
		||||
{
 | 
			
		||||
  if (node == NULL)
 | 
			
		||||
    return SPA_RESULT_INVALID_ARGUMENTS;
 | 
			
		||||
| 
						 | 
				
			
			@ -419,9 +419,9 @@ spa_audiotestsrc_node_get_n_ports (SpaNode       *node,
 | 
			
		|||
 | 
			
		||||
static SpaResult
 | 
			
		||||
spa_audiotestsrc_node_get_port_ids (SpaNode       *node,
 | 
			
		||||
                                    unsigned int   n_input_ports,
 | 
			
		||||
                                    uint32_t       n_input_ports,
 | 
			
		||||
                                    uint32_t      *input_ids,
 | 
			
		||||
                                    unsigned int   n_output_ports,
 | 
			
		||||
                                    uint32_t       n_output_ports,
 | 
			
		||||
                                    uint32_t      *output_ids)
 | 
			
		||||
{
 | 
			
		||||
  if (node == NULL)
 | 
			
		||||
| 
						 | 
				
			
			@ -455,7 +455,7 @@ spa_audiotestsrc_node_port_enum_formats (SpaNode          *node,
 | 
			
		|||
                                         uint32_t          port_id,
 | 
			
		||||
                                         SpaFormat       **format,
 | 
			
		||||
                                         const SpaFormat  *filter,
 | 
			
		||||
                                         unsigned int      index)
 | 
			
		||||
                                         uint32_t          index)
 | 
			
		||||
{
 | 
			
		||||
  SpaAudioTestSrc *this;
 | 
			
		||||
  SpaResult res;
 | 
			
		||||
| 
						 | 
				
			
			@ -664,7 +664,7 @@ spa_audiotestsrc_node_port_use_buffers (SpaNode         *node,
 | 
			
		|||
                                        uint32_t         n_buffers)
 | 
			
		||||
{
 | 
			
		||||
  SpaAudioTestSrc *this;
 | 
			
		||||
  unsigned int i;
 | 
			
		||||
  uint32_t i;
 | 
			
		||||
 | 
			
		||||
  if (node == NULL)
 | 
			
		||||
    return SPA_RESULT_INVALID_ARGUMENTS;
 | 
			
		||||
| 
						 | 
				
			
			@ -943,10 +943,10 @@ audiotestsrc_init (const SpaHandleFactory  *factory,
 | 
			
		|||
                   SpaHandle               *handle,
 | 
			
		||||
                   const SpaDict           *info,
 | 
			
		||||
                   const SpaSupport        *support,
 | 
			
		||||
                   unsigned int             n_support)
 | 
			
		||||
                   uint32_t                 n_support)
 | 
			
		||||
{
 | 
			
		||||
  SpaAudioTestSrc *this;
 | 
			
		||||
  unsigned int i;
 | 
			
		||||
  uint32_t i;
 | 
			
		||||
 | 
			
		||||
  if (factory == NULL || handle == NULL)
 | 
			
		||||
    return SPA_RESULT_INVALID_ARGUMENTS;
 | 
			
		||||
| 
						 | 
				
			
			@ -1010,7 +1010,7 @@ static const SpaInterfaceInfo audiotestsrc_interfaces[] =
 | 
			
		|||
static SpaResult
 | 
			
		||||
audiotestsrc_enum_interface_info (const SpaHandleFactory  *factory,
 | 
			
		||||
                                  const SpaInterfaceInfo **info,
 | 
			
		||||
                                  unsigned int             index)
 | 
			
		||||
                                  uint32_t                 index)
 | 
			
		||||
{
 | 
			
		||||
  if (factory == NULL || info == NULL)
 | 
			
		||||
    return SPA_RESULT_INVALID_ARGUMENTS;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -24,7 +24,7 @@ extern const SpaHandleFactory spa_audiotestsrc_factory;
 | 
			
		|||
 | 
			
		||||
SpaResult
 | 
			
		||||
spa_enum_handle_factory (const SpaHandleFactory **factory,
 | 
			
		||||
                         unsigned int             index)
 | 
			
		||||
                         uint32_t                 index)
 | 
			
		||||
{
 | 
			
		||||
  if (factory == NULL)
 | 
			
		||||
    return SPA_RESULT_INVALID_ARGUMENTS;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue