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
015d61cc
Commit
015d61cc
authored
4 years ago
by
George Kiagiadakis
Browse files
Options
Downloads
Patches
Plain Diff
si-softdsp-endpoint: fix issues with the activation transition
parent
ba81c1e6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/module-si-audio-softdsp-endpoint.c
+30
-19
30 additions, 19 deletions
modules/module-si-audio-softdsp-endpoint.c
with
30 additions
and
19 deletions
modules/module-si-audio-softdsp-endpoint.c
+
30
−
19
View file @
015d61cc
...
...
@@ -11,8 +11,8 @@
enum
{
STEP_VERIFY_CONFIG
=
WP_TRANSITION_STEP_CUSTOM_START
,
STEP_
ENSUR
E_ADAPTER
_FEATURES
,
STEP_
ENSURE_CONVERT_FEATURE
S
,
STEP_
ACTIVAT
E_ADAPTER
,
STEP_
ACTIVATE_STREAM
S
,
};
struct
_WpSiAudioSoftdspEndpoint
...
...
@@ -162,18 +162,27 @@ static guint
si_audio_softdsp_endpoint_activate_get_next_step
(
WpSessionItem
*
item
,
WpTransition
*
transition
,
guint
step
)
{
WpSiAudioSoftdspEndpoint
*
self
=
wp_transition_get_data
(
transition
);
switch
(
step
)
{
case
WP_TRANSITION_STEP_NONE
:
return
STEP_VERIFY_CONFIG
;
case
STEP_VERIFY_CONFIG
:
return
STEP_
ENSUR
E_ADAPTER
_FEATURES
;
return
STEP_
ACTIVAT
E_ADAPTER
;
case
STEP_ENSURE_ADAPTER_FEATURES
:
return
STEP_ENSURE_CONVERT_FEATURES
;
case
STEP_ACTIVATE_ADAPTER
:
if
(
wp_session_bin_get_n_children
(
WP_SESSION_BIN
(
self
))
>
1
)
return
STEP_ACTIVATE_STREAMS
;
else
return
WP_TRANSITION_STEP_NONE
;
case
STEP_ENSURE_CONVERT_FEATURES
:
return
WP_TRANSITION_STEP_NONE
;
case
STEP_ACTIVATE_STREAMS
:
if
((
self
->
activated_streams
+
1
)
<
wp_session_bin_get_n_children
(
WP_SESSION_BIN
(
self
)))
return
STEP_ACTIVATE_STREAMS
;
else
return
WP_TRANSITION_STEP_NONE
;
default:
return
WP_TRANSITION_STEP_ERROR
;
...
...
@@ -185,9 +194,11 @@ on_adapter_activated (WpSessionItem * item, GAsyncResult * res,
WpTransition
*
transition
)
{
g_autoptr
(
GError
)
error
=
NULL
;
gboolean
activate_ret
=
wp_session_item_activate_finish
(
item
,
res
,
&
error
);
g_return_if_fail
(
error
==
NULL
);
g_return_if_fail
(
activate_ret
);
if
(
!
wp_session_item_activate_finish
(
item
,
res
,
&
error
))
{
wp_transition_return_error
(
transition
,
g_steal_pointer
(
&
error
));
return
;
}
wp_transition_advance
(
transition
);
}
...
...
@@ -198,13 +209,13 @@ on_convert_activated (WpSessionItem * item, GAsyncResult * res,
WpSiAudioSoftdspEndpoint
*
self
=
wp_transition_get_data
(
transition
);
g_autoptr
(
GError
)
error
=
NULL
;
gboolean
activate_ret
=
wp_session_item_activate_finish
(
item
,
res
,
&
error
);
g_return_if_fail
(
error
==
NULL
);
g_return_if_fail
(
activate_ret
);
if
(
!
wp_session_item_activate_finish
(
item
,
res
,
&
error
))
{
wp_transition_return_error
(
transition
,
g_steal_pointer
(
&
error
));
return
;
}
self
->
activated_streams
++
;
if
(
self
->
activated_streams
>=
self
->
num_streams
)
wp_transition_advance
(
transition
);
wp_transition_advance
(
transition
);
}
static
void
...
...
@@ -226,13 +237,13 @@ si_audio_softdsp_endpoint_activate_execute_step (WpSessionItem * item,
wp_transition_advance
(
transition
);
break
;
case
STEP_
ENSUR
E_ADAPTER
_FEATURES
:
case
STEP_
ACTIVAT
E_ADAPTER
:
g_return_if_fail
(
self
->
activated_streams
==
0
);
wp_session_item_activate
(
self
->
adapter
,
(
GAsyncReadyCallback
)
on_adapter_activated
,
transition
);
(
GAsyncReadyCallback
)
on_adapter_activated
,
transition
);
break
;
case
STEP_
ENSURE_CONVERT_FEATURE
S
:
case
STEP_
ACTIVATE_STREAM
S
:
{
g_autoptr
(
WpIterator
)
it
=
wp_session_bin_iterate
(
WP_SESSION_BIN
(
self
));
g_auto
(
GValue
)
val
=
G_VALUE_INIT
;
...
...
@@ -241,7 +252,7 @@ si_audio_softdsp_endpoint_activate_execute_step (WpSessionItem * item,
if
(
item
==
self
->
adapter
)
continue
;
wp_session_item_activate
(
item
,
(
GAsyncReadyCallback
)
on_convert_activated
,
transition
);
(
GAsyncReadyCallback
)
on_convert_activated
,
transition
);
}
break
;
}
...
...
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