mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	format: Export pa_format_info_is_compatible in API
This allows clients to perform checks between formats as well.
This commit is contained in:
		
							parent
							
								
									53091cc5f0
								
							
						
					
					
						commit
						13a33abf45
					
				
					 4 changed files with 11 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -163,6 +163,7 @@ pa_ext_stream_restore_test;
 | 
			
		|||
pa_ext_stream_restore_write;
 | 
			
		||||
pa_format_info_copy;
 | 
			
		||||
pa_format_info_free;
 | 
			
		||||
pa_format_info_is_compatible;
 | 
			
		||||
pa_format_info_is_pcm;
 | 
			
		||||
pa_format_info_new;
 | 
			
		||||
pa_format_info_snprint;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -115,7 +115,7 @@ char *pa_format_info_snprint(char *s, size_t l, const pa_format_info *f) {
 | 
			
		|||
    return s;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
pa_bool_t pa_format_info_is_compatible(pa_format_info *first, pa_format_info *second) {
 | 
			
		||||
int pa_format_info_is_compatible(pa_format_info *first, pa_format_info *second) {
 | 
			
		||||
    const char *key;
 | 
			
		||||
    void *state = NULL;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -83,6 +83,15 @@ int pa_format_info_valid(const pa_format_info *f);
 | 
			
		|||
/** Returns non-zero when the format info structure represents a PCM (i.e. uncompressed data) format */
 | 
			
		||||
int pa_format_info_is_pcm(const pa_format_info *f);
 | 
			
		||||
 | 
			
		||||
/** Returns non-zero if the format represented \a first is a subset of
 | 
			
		||||
 * the format represented by \second. This means that \a second must
 | 
			
		||||
 * have all the fields that \a first does, but the reverse need not
 | 
			
		||||
 * be true. This is typically expected to be used to check if a
 | 
			
		||||
 * stream's format is compatible with a given sink. In such a case,
 | 
			
		||||
 * \a first would be the sink's format and \a second would be the
 | 
			
		||||
 * stream's.*/
 | 
			
		||||
int pa_format_info_is_compatible(pa_format_info *first, pa_format_info *second);
 | 
			
		||||
 | 
			
		||||
/** Maximum required string length for
 | 
			
		||||
 * pa_format_info_snprint(). Please note that this value can change
 | 
			
		||||
 * with any release without warning and without being considered API
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -297,7 +297,6 @@ void pa_ext_device_manager_command(pa_context *c, uint32_t tag, pa_tagstruct *t)
 | 
			
		|||
void pa_ext_stream_restore_command(pa_context *c, uint32_t tag, pa_tagstruct *t);
 | 
			
		||||
 | 
			
		||||
void pa_format_info_free2(pa_format_info *f, void *userdata);
 | 
			
		||||
pa_bool_t pa_format_info_is_compatible(pa_format_info *first, pa_format_info *second);
 | 
			
		||||
pa_format_info* pa_format_info_from_sample_spec(pa_sample_spec *ss, pa_channel_map *map);
 | 
			
		||||
pa_bool_t pa_format_info_to_sample_spec(pa_format_info *f, pa_sample_spec *ss, pa_channel_map *map);
 | 
			
		||||
pa_bool_t pa_format_info_to_sample_spec_fake(pa_format_info *f, pa_sample_spec *ss);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue