Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
W
wireplumber
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pkg
wireplumber
Commits
9dac5fda
Commit
9dac5fda
authored
5 years ago
by
Julian Bouzas
Browse files
Options
Downloads
Patches
Plain Diff
parser-streams: add get_lowest_stream API
parent
91e309ba
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
modules/module-config-policy/parser-streams.c
+15
-0
15 additions, 0 deletions
modules/module-config-policy/parser-streams.c
modules/module-config-policy/parser-streams.h
+2
-0
2 additions, 0 deletions
modules/module-config-policy/parser-streams.h
with
17 additions
and
0 deletions
modules/module-config-policy/parser-streams.c
+
15
−
0
View file @
9dac5fda
...
...
@@ -31,6 +31,21 @@ wp_parser_streams_find_stream (const struct WpParserStreamsData *data,
return
NULL
;
}
const
struct
WpParserStreamsStreamData
*
wp_parser_streams_get_lowest_stream
(
const
struct
WpParserStreamsData
*
data
)
{
const
struct
WpParserStreamsStreamData
*
res
=
NULL
;
guint
lowest
=
G_MAXUINT
;
for
(
guint
i
=
0
;
i
<
data
->
n_streams
;
i
++
)
{
const
struct
WpParserStreamsStreamData
*
s
=
data
->
streams
+
i
;
if
(
s
->
priority
<
lowest
)
{
lowest
=
s
->
priority
;
res
=
s
;
}
}
return
res
;
}
static
void
wp_parser_streams_config_parser_init
(
gpointer
iface
,
gpointer
iface_data
);
...
...
This diff is collapsed.
Click to expand it.
modules/module-config-policy/parser-streams.h
+
2
−
0
View file @
9dac5fda
...
...
@@ -32,6 +32,8 @@ struct WpParserStreamsData {
/* Helpers */
const
struct
WpParserStreamsStreamData
*
wp_parser_streams_find_stream
(
const
struct
WpParserStreamsData
*
data
,
const
char
*
name
);
const
struct
WpParserStreamsStreamData
*
wp_parser_streams_get_lowest_stream
(
const
struct
WpParserStreamsData
*
data
);
#define WP_TYPE_PARSER_STREAMS (wp_parser_streams_get_type ())
G_DECLARE_FINAL_TYPE
(
WpParserStreams
,
wp_parser_streams
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment