mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-06 13:30:01 -05:00
Use v4l2 monitor
Use the v4l2 monitor to dynamically add and remove nodes. Use the info from the monitor as parameter for the factory init and use it to configure the new node. Add info to the node. Use info from the factory as properties on the PinosNode
This commit is contained in:
parent
9f53eda6cb
commit
6497c82a7d
23 changed files with 542 additions and 315 deletions
|
|
@ -54,7 +54,6 @@ typedef struct {
|
|||
const char *klass;
|
||||
const SpaDict *info;
|
||||
const SpaHandleFactory *factory;
|
||||
const void *config;
|
||||
} SpaMonitorItem;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -154,6 +154,12 @@ struct _SpaNode {
|
|||
/* the total size of this node. This can be used to expand this
|
||||
* structure in the future */
|
||||
size_t size;
|
||||
/**
|
||||
* SpaNode::info
|
||||
*
|
||||
* Extra information about the node
|
||||
*/
|
||||
const SpaDict * info;
|
||||
/**
|
||||
* SpaNode::state:
|
||||
*
|
||||
|
|
|
|||
|
|
@ -102,8 +102,8 @@ struct _SpaHandleFactory {
|
|||
* SpaHandleFactory::init
|
||||
* @factory: a #SpaHandleFactory
|
||||
* @handle: a pointer to memory
|
||||
* @config: extra handle specific config information, usually obtained from
|
||||
* a #SpaMonitor.
|
||||
* @info: extra handle specific information, usually obtained
|
||||
* from a #SpaMonitor. This can be used to configure the handle.
|
||||
*
|
||||
* Initialize an instance of this factory. The caller should allocate
|
||||
* memory at least SpaHandleFactory::size bytes and pass this as @handle.
|
||||
|
|
@ -114,7 +114,7 @@ struct _SpaHandleFactory {
|
|||
*/
|
||||
SpaResult (*init) (const SpaHandleFactory *factory,
|
||||
SpaHandle *handle,
|
||||
const void *config);
|
||||
const SpaDict *info);
|
||||
|
||||
/**
|
||||
* SpaHandle::enum_interface_info:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue