mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	capture: Add the passthrough format negotiation to capture streams.
This helps to keep the API more symmetrical and also potentially allows support for passthrough monitor sources at some point in the future.
This commit is contained in:
		
							parent
							
								
									30597b7c27
								
							
						
					
					
						commit
						5d35375aa7
					
				
					 18 changed files with 406 additions and 104 deletions
				
			
		| 
						 | 
				
			
			@ -108,31 +108,35 @@ struct pa_source {
 | 
			
		|||
     * context. If this is NULL a PA_SOURCE_MESSAGE_GET_VOLUME message
 | 
			
		||||
     * will be sent to the IO thread instead. If refresh_volume is
 | 
			
		||||
     * FALSE neither this function is called nor a message is sent. */
 | 
			
		||||
    void (*get_volume)(pa_source *s);         /* dito */
 | 
			
		||||
    void (*get_volume)(pa_source *s);         /* ditto */
 | 
			
		||||
 | 
			
		||||
    /* Called when the volume shall be changed. Called from main loop
 | 
			
		||||
     * context. If this is NULL a PA_SOURCE_MESSAGE_SET_VOLUME message
 | 
			
		||||
     * will be sent to the IO thread instead. */
 | 
			
		||||
    void (*set_volume)(pa_source *s);         /* dito */
 | 
			
		||||
    void (*set_volume)(pa_source *s);         /* ditto */
 | 
			
		||||
 | 
			
		||||
    /* Called when the mute setting is queried. Called from main loop
 | 
			
		||||
     * context. If this is NULL a PA_SOURCE_MESSAGE_GET_MUTE message
 | 
			
		||||
     * will be sent to the IO thread instead. If refresh_mute is
 | 
			
		||||
     * FALSE neither this function is called nor a message is sent.*/
 | 
			
		||||
    void (*get_mute)(pa_source *s);           /* dito */
 | 
			
		||||
    void (*get_mute)(pa_source *s);           /* ditto */
 | 
			
		||||
 | 
			
		||||
    /* Called when the mute setting shall be changed. Called from main
 | 
			
		||||
     * loop context. If this is NULL a PA_SOURCE_MESSAGE_SET_MUTE
 | 
			
		||||
     * message will be sent to the IO thread instead. */
 | 
			
		||||
    void (*set_mute)(pa_source *s);           /* dito */
 | 
			
		||||
    void (*set_mute)(pa_source *s);           /* ditto */
 | 
			
		||||
 | 
			
		||||
    /* Called when a the requested latency is changed. Called from IO
 | 
			
		||||
     * thread context. */
 | 
			
		||||
    void (*update_requested_latency)(pa_source *s); /* dito */
 | 
			
		||||
    void (*update_requested_latency)(pa_source *s); /* ditto */
 | 
			
		||||
 | 
			
		||||
    /* Called whenever the port shall be changed. Called from main
 | 
			
		||||
     * thread. */
 | 
			
		||||
    int (*set_port)(pa_source *s, pa_device_port *port); /*dito */
 | 
			
		||||
    int (*set_port)(pa_source *s, pa_device_port *port); /*ditto */
 | 
			
		||||
 | 
			
		||||
    /* Called to get the list of formats supported by the source, sorted
 | 
			
		||||
     * in descending order of preference. */
 | 
			
		||||
    pa_idxset* (*get_formats)(pa_source *s); /* ditto */
 | 
			
		||||
 | 
			
		||||
    /* Contains copies of the above data so that the real-time worker
 | 
			
		||||
     * thread can work without access locking */
 | 
			
		||||
| 
						 | 
				
			
			@ -265,6 +269,10 @@ int pa_source_update_status(pa_source*s);
 | 
			
		|||
int pa_source_suspend(pa_source *s, pa_bool_t suspend, pa_suspend_cause_t cause);
 | 
			
		||||
int pa_source_suspend_all(pa_core *c, pa_bool_t suspend, pa_suspend_cause_t cause);
 | 
			
		||||
 | 
			
		||||
/* Is the source in passthrough mode? (that is, is this a monitor source for a sink
 | 
			
		||||
 * that has a passthrough sink input connected to it. */
 | 
			
		||||
pa_bool_t pa_source_is_passthrough(pa_source *s);
 | 
			
		||||
 | 
			
		||||
void pa_source_set_volume(pa_source *source, const pa_cvolume *volume, pa_bool_t save);
 | 
			
		||||
const pa_cvolume *pa_source_get_volume(pa_source *source, pa_bool_t force_refresh);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -285,6 +293,10 @@ pa_queue *pa_source_move_all_start(pa_source *s, pa_queue *q);
 | 
			
		|||
void pa_source_move_all_finish(pa_source *s, pa_queue *q, pa_bool_t save);
 | 
			
		||||
void pa_source_move_all_fail(pa_queue *q);
 | 
			
		||||
 | 
			
		||||
pa_idxset* pa_source_get_formats(pa_source *s);
 | 
			
		||||
pa_bool_t pa_source_check_format(pa_source *s, pa_format_info *f);
 | 
			
		||||
pa_idxset* pa_source_check_formats(pa_source *s, pa_idxset *in_formats);
 | 
			
		||||
 | 
			
		||||
/*** To be called exclusively by the source driver, from IO context */
 | 
			
		||||
 | 
			
		||||
void pa_source_post(pa_source*s, const pa_memchunk *chunk);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue