mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	module-rtp: set default sess.media in properties
Set a default sess.media in properties because we will use it later.
This commit is contained in:
		
							parent
							
								
									fb5c9688a2
								
							
						
					
					
						commit
						d3896d290e
					
				
					 1 changed files with 3 additions and 4 deletions
				
			
		| 
						 | 
					@ -1710,6 +1710,9 @@ int pipewire__module_init(struct pw_impl_module *module, const char *args)
 | 
				
			||||||
	impl->loop = pw_context_get_main_loop(context);
 | 
						impl->loop = pw_context_get_main_loop(context);
 | 
				
			||||||
	impl->data_loop = pw_data_loop_get_loop(pw_context_get_data_loop(context));
 | 
						impl->data_loop = pw_data_loop_get_loop(pw_context_get_data_loop(context));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (pw_properties_get(props, "sess.media") == NULL)
 | 
				
			||||||
 | 
							pw_properties_set(props, "sess.media", "midi");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if ((str = pw_properties_get(props, "stream.props")) != NULL)
 | 
						if ((str = pw_properties_get(props, "stream.props")) != NULL)
 | 
				
			||||||
		pw_properties_update_string(stream_props, str, strlen(str));
 | 
							pw_properties_update_string(stream_props, str, strlen(str));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1735,10 +1738,6 @@ int pipewire__module_init(struct pw_impl_module *module, const char *args)
 | 
				
			||||||
	impl->ttl = pw_properties_get_uint32(props, "net.ttl", DEFAULT_TTL);
 | 
						impl->ttl = pw_properties_get_uint32(props, "net.ttl", DEFAULT_TTL);
 | 
				
			||||||
	impl->mcast_loop = pw_properties_get_bool(props, "net.loop", DEFAULT_LOOP);
 | 
						impl->mcast_loop = pw_properties_get_bool(props, "net.loop", DEFAULT_LOOP);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if ((str = pw_properties_get(stream_props, "sess.media")) == NULL) {
 | 
					 | 
				
			||||||
		str = "midi";
 | 
					 | 
				
			||||||
		pw_properties_set(stream_props, "sess.media", str);
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	if (spa_streq(str, "audio")) {
 | 
						if (spa_streq(str, "audio")) {
 | 
				
			||||||
		struct spa_dict_item items[] = {
 | 
							struct spa_dict_item items[] = {
 | 
				
			||||||
			{ "audio.format", DEFAULT_FORMAT },
 | 
								{ "audio.format", DEFAULT_FORMAT },
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue