mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	context: improve properties
This commit is contained in:
		
							parent
							
								
									520a9831e7
								
							
						
					
					
						commit
						6a4da8a6b3
					
				
					 3 changed files with 11 additions and 11 deletions
				
			
		| 
						 | 
				
			
			@ -325,7 +325,6 @@ pa_context *pa_context_new_with_proplist(pa_mainloop_api *mainloop, const char *
 | 
			
		|||
	if (r == NULL)
 | 
			
		||||
		return NULL;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
	c = pw_remote_get_user_data(r);
 | 
			
		||||
	c->loop = loop;
 | 
			
		||||
	c->core = core;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -164,8 +164,7 @@ const char *pa_proplist_iterate(pa_proplist *p, void **state)
 | 
			
		|||
char *pa_proplist_to_string(pa_proplist *p)
 | 
			
		||||
{
 | 
			
		||||
	spa_assert(p);
 | 
			
		||||
	pw_log_warn("Not Implemented");
 | 
			
		||||
	return NULL;
 | 
			
		||||
	return pa_proplist_to_string_sep(p, ",");
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
char *pa_proplist_to_string_sep(pa_proplist *p, const char *sep)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										18
									
								
								src/stream.c
									
										
									
									
									
								
							
							
						
						
									
										18
									
								
								src/stream.c
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -504,6 +504,7 @@ pa_stream* stream_new(pa_context *c, const char *name,
 | 
			
		|||
	pa_stream *s;
 | 
			
		||||
	char str[1024];
 | 
			
		||||
	int i;
 | 
			
		||||
	struct pw_properties *props;
 | 
			
		||||
 | 
			
		||||
	spa_assert(c);
 | 
			
		||||
	spa_assert(c->refcount >= 1);
 | 
			
		||||
| 
						 | 
				
			
			@ -517,11 +518,16 @@ pa_stream* stream_new(pa_context *c, const char *name,
 | 
			
		|||
	if (s == NULL)
 | 
			
		||||
		return NULL;
 | 
			
		||||
 | 
			
		||||
	s->proplist = p ? pa_proplist_copy(p) : pa_proplist_new();
 | 
			
		||||
	if (name)
 | 
			
		||||
		pa_proplist_sets(s->proplist, PA_PROP_MEDIA_NAME, name);
 | 
			
		||||
	else
 | 
			
		||||
		name = pa_proplist_gets(p, PA_PROP_MEDIA_NAME);
 | 
			
		||||
 | 
			
		||||
	s->stream = pw_stream_new(c->remote, name,
 | 
			
		||||
			pw_properties_new(
 | 
			
		||||
				"client.api", "pulseaudio",
 | 
			
		||||
				NULL));
 | 
			
		||||
	props = pw_properties_new("client.api", "pulseaudio",
 | 
			
		||||
				NULL);
 | 
			
		||||
 | 
			
		||||
	s->stream = pw_stream_new(c->remote, name, props);
 | 
			
		||||
	s->refcount = 1;
 | 
			
		||||
	s->context = c;
 | 
			
		||||
	spa_list_init(&s->pending);
 | 
			
		||||
| 
						 | 
				
			
			@ -554,10 +560,6 @@ pa_stream* stream_new(pa_context *c, const char *name,
 | 
			
		|||
 | 
			
		||||
	s->direct_on_input = PA_INVALID_INDEX;
 | 
			
		||||
 | 
			
		||||
	s->proplist = p ? pa_proplist_copy(p) : pa_proplist_new();
 | 
			
		||||
	if (name)
 | 
			
		||||
		pa_proplist_sets(s->proplist, PA_PROP_MEDIA_NAME, name);
 | 
			
		||||
 | 
			
		||||
	s->stream_index = PA_INVALID_INDEX;
 | 
			
		||||
 | 
			
		||||
	s->buffer_attr.maxlength = (uint32_t) -1;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue