Loading...
Searching...
No Matches
impl-factory.h
Go to the documentation of this file.
/* PipeWire */
/* SPDX-FileCopyrightText: Copyright © 2018 Wim Taymans */
/* SPDX-License-Identifier: MIT */
#ifndef PIPEWIRE_IMPL_FACTORY_H
#define PIPEWIRE_IMPL_FACTORY_H
#ifdef __cplusplus
extern "C" {
#endif
struct pw_impl_factory;
#include <pipewire/context.h>
#include <pipewire/impl-client.h>
#include <pipewire/global.h>
#include <pipewire/properties.h>
#include <pipewire/resource.h>
struct pw_impl_factory_events {
#define PW_VERSION_IMPL_FACTORY_EVENTS 0
uint32_t version;
void (*destroy) (void *data);
void (*free) (void *data);
void (*initialized) (void *data);
};
struct pw_impl_factory_implementation {
#define PW_VERSION_IMPL_FACTORY_IMPLEMENTATION 0
uint32_t version;
void *(*create_object) (void *data,
struct pw_resource *resource,
const char *type,
uint32_t version,
struct pw_properties *properties,
uint32_t new_id);
};
struct pw_impl_factory *pw_context_create_factory(struct pw_context *context,
const char *name,
const char *type,
uint32_t version,
struct pw_properties *properties,
size_t user_data_size);
const struct pw_properties *pw_impl_factory_get_properties(struct pw_impl_factory *factory);
const struct pw_factory_info *pw_impl_factory_get_info(struct pw_impl_factory *factory);
int pw_impl_factory_update_properties(struct pw_impl_factory *factory, const struct spa_dict *dict);
int pw_impl_factory_register(struct pw_impl_factory *factory,
struct pw_properties *properties);
void pw_impl_factory_destroy(struct pw_impl_factory *factory);
void *pw_impl_factory_get_user_data(struct pw_impl_factory *factory);
struct pw_global *pw_impl_factory_get_global(struct pw_impl_factory *factory);
void pw_impl_factory_add_listener(struct pw_impl_factory *factory,
struct spa_hook *listener,
const struct pw_impl_factory_events *events,
void *data);
void pw_impl_factory_set_implementation(struct pw_impl_factory *factory,
const struct pw_impl_factory_implementation *implementation,
void *data);
void *pw_impl_factory_create_object(struct pw_impl_factory *factory,
struct pw_resource *resource,
const char *type,
uint32_t version,
struct pw_properties *properties,
uint32_t new_id);
struct pw_impl_factory *
pw_context_find_factory(struct pw_context *context ,
const char *name );
#ifdef __cplusplus
}
#endif
#endif /* PIPEWIRE_IMPL_FACTORY_H */
global.h
pipewire/global.h
pw_impl_factory_destroy
void pw_impl_factory_destroy(struct pw_impl_factory *factory)
Definition impl-factory.c:66
pw_impl_factory_update_properties
int pw_impl_factory_update_properties(struct pw_impl_factory *factory, const struct spa_dict *dict)
Update the factory properties.
Definition impl-factory.c:137
pw_impl_factory_get_info
const struct pw_factory_info * pw_impl_factory_get_info(struct pw_impl_factory *factory)
Get the factory info.
Definition impl-factory.c:217
pw_impl_factory_set_implementation
void pw_impl_factory_set_implementation(struct pw_impl_factory *factory, const struct pw_impl_factory_implementation *implementation, void *data)
Definition impl-factory.c:238
pw_impl_factory_create_object
void * pw_impl_factory_create_object(struct pw_impl_factory *factory, struct pw_resource *resource, const char *type, uint32_t version, struct pw_properties *properties, uint32_t new_id)
Definition impl-factory.c:246
pw_context_create_factory
struct pw_impl_factory * pw_context_create_factory(struct pw_context *context, const char *name, const char *type, uint32_t version, struct pw_properties *properties, size_t user_data_size)
Definition impl-factory.c:22
pw_impl_factory_register
int pw_impl_factory_register(struct pw_impl_factory *factory, struct pw_properties *properties)
Definition impl-factory.c:159
pw_impl_factory_add_listener
void pw_impl_factory_add_listener(struct pw_impl_factory *factory, struct spa_hook *listener, const struct pw_impl_factory_events *events, void *data)
Add an event listener.
Definition impl-factory.c:229
pw_context_find_factory
struct pw_impl_factory * pw_context_find_factory(struct pw_context *context, const char *name)
Find a factory by name.
Definition impl-factory.c:272
pw_impl_factory_get_global
struct pw_global * pw_impl_factory_get_global(struct pw_impl_factory *factory)
Get the global of this factory.
Definition impl-factory.c:223
pw_impl_factory_get_user_data
void * pw_impl_factory_get_user_data(struct pw_impl_factory *factory)
Definition impl-factory.c:211
pw_impl_factory_get_properties
const struct pw_properties * pw_impl_factory_get_properties(struct pw_impl_factory *factory)
Get the factory properties.
Definition impl-factory.c:131
impl-client.h
pipewire/impl-client.h
properties.h
pipewire/properties.h
resource.h
pipewire/resource.h
context.h
pipewire/context.h
pw_context
pw_factory_info
The factory information.
Definition factory.h:49
pw_global
pw_impl_factory_events
Factory events, listen to them with pw_impl_factory_add_listener.
Definition impl-factory.h:35
pw_impl_factory_events::version
uint32_t version
Definition impl-factory.h:38
pw_impl_factory_events::initialized
void(* initialized)(void *data)
the factory is initialized
Definition impl-factory.h:45
pw_impl_factory_events::destroy
void(* destroy)(void *data)
the factory is destroyed
Definition impl-factory.h:41
pw_impl_factory_implementation
Definition impl-factory.h:48
pw_impl_factory_implementation::version
uint32_t version
Definition impl-factory.h:51
pw_impl_factory
pw_properties
Definition properties.h:39
pw_resource
spa_dict
Definition dict.h:51
spa_hook
A hook, contains the structure with functions and the data passed to the functions.
Definition hook.h:427