mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	v4l2: actually pass the device path to the node
This commit is contained in:
		
							parent
							
								
									fb54de0dd0
								
							
						
					
					
						commit
						52368091e3
					
				
					 1 changed files with 4 additions and 3 deletions
				
			
		| 
						 | 
					@ -73,6 +73,7 @@ static int emit_info(struct impl *this)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	int res;
 | 
						int res;
 | 
				
			||||||
	struct spa_dict_item items[6];
 | 
						struct spa_dict_item items[6];
 | 
				
			||||||
 | 
						struct spa_dict dict;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if ((res = spa_v4l2_open(&this->dev, this->props.device)) < 0)
 | 
						if ((res = spa_v4l2_open(&this->dev, this->props.device)) < 0)
 | 
				
			||||||
		return res;
 | 
							return res;
 | 
				
			||||||
| 
						 | 
					@ -83,16 +84,16 @@ static int emit_info(struct impl *this)
 | 
				
			||||||
	items[3] = SPA_DICT_ITEM_INIT("v4l2.driver", (char *)this->dev.cap.driver);
 | 
						items[3] = SPA_DICT_ITEM_INIT("v4l2.driver", (char *)this->dev.cap.driver);
 | 
				
			||||||
	items[4] = SPA_DICT_ITEM_INIT("v4l2.card", (char *)this->dev.cap.card);
 | 
						items[4] = SPA_DICT_ITEM_INIT("v4l2.card", (char *)this->dev.cap.card);
 | 
				
			||||||
	items[5] = SPA_DICT_ITEM_INIT("v4l2.bus", (char *)this->dev.cap.bus_info);
 | 
						items[5] = SPA_DICT_ITEM_INIT("v4l2.bus", (char *)this->dev.cap.bus_info);
 | 
				
			||||||
 | 
						dict = SPA_DICT_INIT(items, 6);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (this->callbacks->info)
 | 
						if (this->callbacks->info)
 | 
				
			||||||
		this->callbacks->info(this->callbacks_data, &SPA_DICT_INIT(items, 6));
 | 
							this->callbacks->info(this->callbacks_data, &dict);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (this->callbacks->add) {
 | 
						if (this->callbacks->add) {
 | 
				
			||||||
		if (spa_v4l2_is_capture(&this->dev)) {
 | 
							if (spa_v4l2_is_capture(&this->dev)) {
 | 
				
			||||||
			this->callbacks->add(this->callbacks_data, 0,
 | 
								this->callbacks->add(this->callbacks_data, 0,
 | 
				
			||||||
				&spa_v4l2_source_factory,
 | 
									&spa_v4l2_source_factory,
 | 
				
			||||||
				SPA_TYPE_INTERFACE_Node,
 | 
									SPA_TYPE_INTERFACE_Node, &dict);
 | 
				
			||||||
				&SPA_DICT_INIT(items, 1));
 | 
					 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue