Skip to content

rtmp-services: Fix bugs blocking WHIP services #12033

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion plugins/rtmp-services/data/schema/service-schema-v5.json
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@
},
{
"$comment": "Require recommended output field if protocol field is not RTMP(S)",
"if": { "required": ["protocol"], "properties": { "protocol": { "pattern": "^(HLS|SRT|RIST|WHIP)$" } } },
"if": { "required": ["protocol"], "properties": { "protocol": { "pattern": "^(HLS|SRT|RIST)$" } } },
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This removes the requirement of the recommended field for services using WHIP. Why?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Never mind. I have re-read the change and the PR description. It's removing the requirement for the output key within the recommended key. I would have to investigate more to better understand what is "best" here.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mentioned that as point #2 in my description - that field is deprecated and there's no appropriate value for WHIP services. The existing options are:

"rtmp_output",
"ffmpeg_hls_muxer",
"ffmpeg_mpegts_muxer"

WHIP is none of those. I could certainly add a value called whip_output in there, but it would be an additional enum on a deprecated field used by nothing and read by nobody. What's the point?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oop, missed your reply, all good :)

"then": { "properties": { "recommended": { "required": ["output"] } } }
}
]
Expand Down
10 changes: 8 additions & 2 deletions plugins/rtmp-services/rtmp-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -1137,8 +1137,14 @@ static const char *rtmp_common_get_connect_info(void *data, uint32_t type)

break;
}
case OBS_SERVICE_CONNECT_INFO_BEARER_TOKEN:
return NULL;
case OBS_SERVICE_CONNECT_INFO_BEARER_TOKEN: {
const char *protocol = rtmp_common_get_protocol(data);

if ((strcmp(protocol, "WHIP") == 0))
return rtmp_common_key(data);

break;
}
}

return NULL;
Expand Down
Loading