v4l2: actually pass the device path to the node

This commit is contained in:
Wim Taymans 2018-12-17 10:16:06 +01:00
parent fb54de0dd0
commit 52368091e3

View file

@ -73,6 +73,7 @@ static int emit_info(struct impl *this)
{
int res;
struct spa_dict_item items[6];
struct spa_dict dict;
if ((res = spa_v4l2_open(&this->dev, this->props.device)) < 0)
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[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);
dict = SPA_DICT_INIT(items, 6);
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 (spa_v4l2_is_capture(&this->dev)) {
this->callbacks->add(this->callbacks_data, 0,
&spa_v4l2_source_factory,
SPA_TYPE_INTERFACE_Node,
&SPA_DICT_INIT(items, 1));
SPA_TYPE_INTERFACE_Node, &dict);
}
}