Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
PipeWire
pipewire
Commits
2efdb782
Commit
2efdb782
authored
Feb 17, 2021
by
P V
Committed by
Wim Taymans
Feb 18, 2021
Browse files
media-session: save and restore latencyOffsetNsec
parent
ed961407
Pipeline
#272801
passed with stages
in 1 minute and 8 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/examples/media-session/default-routes.c
View file @
2efdb782
...
...
@@ -291,6 +291,13 @@ static char *serialize_props(struct device *dev, const struct spa_pod *param)
fprintf
(
f
,
" ]"
);
break
;
}
case
SPA_PROP_latencyOffsetNsec
:
{
int64_t
delay
;
spa_pod_get_long
(
&
prop
->
value
,
&
delay
);
fprintf
(
f
,
"%s
\"
latencyOffsetNsec
\"
: %"
PRIi64
,
(
comma
?
","
:
""
),
delay
);
break
;
}
default:
continue
;
}
...
...
@@ -377,6 +384,13 @@ static int restore_route_params(struct device *dev, const char *val, uint32_t in
spa_pod_builder_prop
(
&
b
,
SPA_PROP_channelMap
,
0
);
spa_pod_builder_array
(
&
b
,
sizeof
(
uint32_t
),
SPA_TYPE_Id
,
n_ch
,
map
);
}
else
if
(
strcmp
(
key
,
"latencyOffsetNsec"
)
==
0
)
{
float
delay
;
if
(
spa_json_get_float
(
&
it
[
1
],
&
delay
)
<=
0
)
continue
;
spa_pod_builder_prop
(
&
b
,
SPA_PROP_latencyOffsetNsec
,
0
);
spa_pod_builder_long
(
&
b
,
(
int64_t
)
SPA_CLAMP
(
delay
,
INT64_MIN
,
INT64_MAX
));
}
else
{
if
(
spa_json_next
(
&
it
[
1
],
&
value
)
<=
0
)
break
;
...
...
PLYSHKA
@Meister1593
mentioned in issue
#781
·
Feb 20, 2021
mentioned in issue
#781
mentioned in issue #781
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment