mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-21 08:56:56 -05:00
module-rtp-sap: parse ptime from incoming streams
This commit is contained in:
parent
6a64ec8b8f
commit
2525a99b97
1 changed files with 12 additions and 0 deletions
|
|
@ -1081,6 +1081,16 @@ static int parse_sdp_a_rtpmap(struct impl *impl, char *c, struct sdp_info *info)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int parse_sdp_a_ptime(struct impl *impl, char *c, struct sdp_info *info)
|
||||||
|
{
|
||||||
|
if (!spa_strstartswith(c, "a=ptime:"))
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
c += strlen("a=ptime:");
|
||||||
|
spa_atof(c, &info->ptime);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
static int parse_sdp_a_mediaclk(struct impl *impl, char *c, struct sdp_info *info)
|
static int parse_sdp_a_mediaclk(struct impl *impl, char *c, struct sdp_info *info)
|
||||||
{
|
{
|
||||||
if (!spa_strstartswith(c, "a=mediaclk:"))
|
if (!spa_strstartswith(c, "a=mediaclk:"))
|
||||||
|
|
@ -1136,6 +1146,8 @@ static int parse_sdp(struct impl *impl, char *sdp, struct sdp_info *info)
|
||||||
res = parse_sdp_m(impl, s, info);
|
res = parse_sdp_m(impl, s, info);
|
||||||
else if (spa_strstartswith(s, "a=rtpmap:"))
|
else if (spa_strstartswith(s, "a=rtpmap:"))
|
||||||
res = parse_sdp_a_rtpmap(impl, s, info);
|
res = parse_sdp_a_rtpmap(impl, s, info);
|
||||||
|
else if (spa_strstartswith(s, "a=ptime:"))
|
||||||
|
res = parse_sdp_a_ptime(impl, s, info);
|
||||||
else if (spa_strstartswith(s, "a=mediaclk:"))
|
else if (spa_strstartswith(s, "a=mediaclk:"))
|
||||||
res = parse_sdp_a_mediaclk(impl, s, info);
|
res = parse_sdp_a_mediaclk(impl, s, info);
|
||||||
else if (spa_strstartswith(s, "a=ts-refclk:"))
|
else if (spa_strstartswith(s, "a=ts-refclk:"))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue