mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
module-rtp: add framecount to the SDP
Required for RAVENNA hardware. Co-authored-by: Dewi Seignard <dewiweb@gmail.com>
This commit is contained in:
parent
8c4cfa57b6
commit
533161a766
2 changed files with 13 additions and 1 deletions
|
|
@ -183,6 +183,7 @@ struct sdp_info {
|
|||
uint32_t channels;
|
||||
|
||||
float ptime;
|
||||
uint32_t framecount;
|
||||
|
||||
uint32_t ts_offset;
|
||||
char *ts_refclk;
|
||||
|
|
@ -568,6 +569,10 @@ static int send_sap(struct impl *impl, struct session *sess, bool bye)
|
|||
spa_strbuf_append(&buf,
|
||||
"a=ptime:%.6g\n", sdp->ptime);
|
||||
|
||||
if (sdp->framecount > 0)
|
||||
spa_strbuf_append(&buf,
|
||||
"a=framecount:%u\n", sdp->framecount);
|
||||
|
||||
if (sdp->ts_refclk != NULL) {
|
||||
spa_strbuf_append(&buf,
|
||||
"a=ts-refclk:%s\n"
|
||||
|
|
@ -691,6 +696,10 @@ static struct session *session_new_announce(struct impl *impl, struct node *node
|
|||
if (!spa_atof(str, &sdp->ptime))
|
||||
sdp->ptime = 0.0;
|
||||
|
||||
if ((str = pw_properties_get(props, "rtp.framecount")) != NULL)
|
||||
if (!spa_atou32(str, &sdp->framecount))
|
||||
sdp->framecount = 0;
|
||||
|
||||
if ((str = pw_properties_get(props, "rtp.media")) != NULL)
|
||||
sdp->media_type = strdup(str);
|
||||
if ((str = pw_properties_get(props, "rtp.mime")) != NULL)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue