Code Review
/
staging
/
agl-audio-plugin.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
switch: explicit route support
[staging/agl-audio-plugin.git]
/
node.h
diff --git
a/node.h
b/node.h
index
e46ae62
..
1e37d85
100644
(file)
--- a/
node.h
+++ b/
node.h
@@
-31,14
+31,14
@@
#define APCLASS_DIM (agl_application_class_end - agl_application_class_begin + 1)
#define APCLASS_DIM (agl_application_class_end - agl_application_class_begin + 1)
-struct
pa
_nodeset {
+struct
agl
_nodeset {
pa_idxset *nodes;
pa_hashmap *roles;
pa_hashmap *binaries;
const char *class_name[APCLASS_DIM]; /* as much elements as app.classes (see in "userdata.h") */
};
pa_idxset *nodes;
pa_hashmap *roles;
pa_hashmap *binaries;
const char *class_name[APCLASS_DIM]; /* as much elements as app.classes (see in "userdata.h") */
};
-struct
pa
_nodeset_resdef {
+struct
agl
_nodeset_resdef {
uint32_t priority;
struct {
uint32_t rset;
uint32_t priority;
struct {
uint32_t rset;
@@
-46,19
+46,19
@@
struct pa_nodeset_resdef {
} flags;
};
} flags;
};
-struct
pa
_nodeset_map {
+struct
agl
_nodeset_map {
const char *name;
agl_node_type type;
const char *role;
const char *name;
agl_node_type type;
const char *role;
-
pa
_nodeset_resdef *resdef;
+
agl
_nodeset_resdef *resdef;
};
};
-struct
pa
_node_card {
+struct
agl
_node_card {
uint32_t index;
char *profile;
};
uint32_t index;
char *profile;
};
-struct
pa
_node_rset {
+struct
agl
_node_rset {
char *id; /**< resource set id, if any */
bool grant; /**< permission to play/render etc */
};
char *id; /**< resource set id, if any */
bool grant; /**< permission to play/render etc */
};
@@
-69,8
+69,8
@@
struct agl_node {
agl_direction direction; /**< agl_input | agl_output */
agl_implement implement; /**< agl_device | agl_stream */
pa_client *client; /**< matching client pointer (for agl_input nodes only) */
agl_direction direction; /**< agl_input | agl_output */
agl_implement implement; /**< agl_device | agl_stream */
pa_client *client; /**< matching client pointer (for agl_input nodes only) */
-
pa_null_sink *nullsink;
/**< associated null sink (for agl_input nodes only) */
-
pa_loopnode *loopnode;
/**< associated loopback */
+
agl_null_sink *nullsink;
/**< associated null sink (for agl_input nodes only) */
+
agl_loopnode *loopnode;
/**< associated loopback */
uint32_t channels; /**< number of channels (eg. 1=mono, 2=stereo) */
agl_location location; /**< mir_internal | mir_external */
agl_privacy privacy; /**< mir_public | mir_private */
uint32_t channels; /**< number of channels (eg. 1=mono, 2=stereo) */
agl_location location; /**< mir_internal | mir_external */
agl_privacy privacy; /**< mir_public | mir_private */
@@
-85,27
+85,33
@@
struct agl_node {
uint16_t amid; /**< handle to audiomanager, if any */
const char *paname; /**< sink|source|sink_input|source_output name */
uint32_t paidx; /**< sink|source|sink_input|source_output index*/
uint16_t amid; /**< handle to audiomanager, if any */
const char *paname; /**< sink|source|sink_input|source_output name */
uint32_t paidx; /**< sink|source|sink_input|source_output index*/
-
pa_node_card pacard;
/**< pulse card related data, if any */
+
agl_node_card pacard;
/**< pulse card related data, if any */
const char *paport; /**< sink or source port if applies */
/*pa_muxnode *mux;*/ /**< for multiplexable input streams only */
const char *paport; /**< sink or source port if applies */
/*pa_muxnode *mux;*/ /**< for multiplexable input streams only */
- /*pa_loopnode *loop;*/ /**< for looped back sources only */
agl_dlist rtentries; /**< in device nodes: listhead of nodchain */
agl_dlist rtprilist; /**< in stream nodes: priority link (head is in
pa_router)*/
agl_dlist constrains; /**< listhead of constrains */
/*mir_vlim vlim;*/ /**< volume limit */
agl_dlist rtentries; /**< in device nodes: listhead of nodchain */
agl_dlist rtprilist; /**< in stream nodes: priority link (head is in
pa_router)*/
agl_dlist constrains; /**< listhead of constrains */
/*mir_vlim vlim;*/ /**< volume limit */
-
pa
_node_rset rset; /**< resource set info if applies */
+
agl
_node_rset rset; /**< resource set info if applies */
uint32_t stamp;
/*scripting_node *scripting;*/ /** scripting data, if any */
};
uint32_t stamp;
/*scripting_node *scripting;*/ /** scripting data, if any */
};
-pa_nodeset *pa_nodeset_init (struct userdata *);
-void pa_nodeset_done (struct userdata *);
+agl_nodeset *agl_nodeset_init (struct userdata *);
+void agl_nodeset_done (struct userdata *);
+
+int agl_nodeset_add_role (struct userdata *, const char *, agl_node_type, agl_nodeset_resdef *);
agl_node *agl_node_create (struct userdata *, agl_node *);
agl_node *agl_node_create (struct userdata *, agl_node *);
+void agl_node_destroy (struct userdata *, agl_node *);
+agl_node_type agl_node_type_from_str (const char *);
const char *agl_node_type_str (agl_node_type);
const char *agl_node_type_str (agl_node_type);
+const char *agl_node_direction_str (agl_direction);
agl_node *agl_node_get_from_data (struct userdata *, agl_direction, void *);
agl_node *agl_node_get_from_client (struct userdata *, pa_client *);
agl_node *agl_node_get_from_data (struct userdata *, agl_direction, void *);
agl_node *agl_node_get_from_client (struct userdata *, pa_client *);
+bool agl_node_has_highest_priority (struct userdata *, agl_node *);
+
#endif
#endif