mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	source-output: Log the format negotiation result
This makes the source output code match the sink input code.
This commit is contained in:
		
							parent
							
								
									b705e38a79
								
							
						
					
					
						commit
						1997f43644
					
				
					 1 changed files with 13 additions and 2 deletions
				
			
		| 
						 | 
					@ -220,7 +220,7 @@ int pa_source_output_new(
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    pa_source_output *o;
 | 
					    pa_source_output *o;
 | 
				
			||||||
    pa_resampler *resampler = NULL;
 | 
					    pa_resampler *resampler = NULL;
 | 
				
			||||||
    char st[PA_SAMPLE_SPEC_SNPRINT_MAX], cm[PA_CHANNEL_MAP_SNPRINT_MAX];
 | 
					    char st[PA_SAMPLE_SPEC_SNPRINT_MAX], cm[PA_CHANNEL_MAP_SNPRINT_MAX], fmt[PA_FORMAT_INFO_SNPRINT_MAX];
 | 
				
			||||||
    pa_channel_map original_cm;
 | 
					    pa_channel_map original_cm;
 | 
				
			||||||
    int r;
 | 
					    int r;
 | 
				
			||||||
    char *pt;
 | 
					    char *pt;
 | 
				
			||||||
| 
						 | 
					@ -276,7 +276,18 @@ int pa_source_output_new(
 | 
				
			||||||
    if (!data->format && data->nego_formats && !pa_idxset_isempty(data->nego_formats))
 | 
					    if (!data->format && data->nego_formats && !pa_idxset_isempty(data->nego_formats))
 | 
				
			||||||
        data->format = pa_format_info_copy(pa_idxset_first(data->nego_formats, NULL));
 | 
					        data->format = pa_format_info_copy(pa_idxset_first(data->nego_formats, NULL));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    pa_return_val_if_fail(data->format, -PA_ERR_NOTSUPPORTED);
 | 
					    if (PA_LIKELY(data->format)) {
 | 
				
			||||||
 | 
					        pa_log_debug("Negotiated format: %s", pa_format_info_snprint(fmt, sizeof(fmt), data->format));
 | 
				
			||||||
 | 
					    } else {
 | 
				
			||||||
 | 
					        pa_format_info *format;
 | 
				
			||||||
 | 
					        uint32_t idx;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        pa_log_info("Source does not support any requested format:");
 | 
				
			||||||
 | 
					        PA_IDXSET_FOREACH(format, data->req_formats, idx)
 | 
				
			||||||
 | 
					            pa_log_info(" -- %s", pa_format_info_snprint(fmt, sizeof(fmt), format));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        return -PA_ERR_NOTSUPPORTED;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /* Now populate the sample spec and format according to the final
 | 
					    /* Now populate the sample spec and format according to the final
 | 
				
			||||||
     * format that we've negotiated */
 | 
					     * format that we've negotiated */
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue