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

Conversation

iameli
Copy link

@iameli iameli commented Apr 6, 2025

Description

Two small changes:

  1. This fixes the code for populating Bearer tokens for WHIP services defined in services.json — previously there was a segfault when attempting to call rtmp_common_get_connect_info(data, OBS_SERVICE_CONNECT_INFO_BEARER_TOKEN). Shoutout to @Sean-Der to making this possible at all and @ImLunaHey for finding the fix!
  2. WHIP services do not have an appropriate value for the deprecated output field. It wouldn't be correct for them to use a value like rtmp_output. I also didn't want to add an incorrect whip_output field to a deprecated enum? So I made output optional for services with protocol: WHIP. Not sure what the right answer is there.

Motivation and Context

Enabling WHIP services to be added to services.json, such as Streamplace.

How Has This Been Tested?

Tested by building and streaming using macOS 15.3.1 (in conjunction with #12032)

Checklist:

  • My code has been run through clang-format.
  • I have read the contributing document.
  • My code is not on the master branch.
  • The code has been tested.
  • All commit messages are properly formatted and commits squashed where appropriate.
  • I have included updates to all appropriate documentation.

@iameli iameli mentioned this pull request Apr 6, 2025
6 tasks
@WizardCM WizardCM added the Bug Fix Non-breaking change which fixes an issue label Apr 6, 2025
@iameli
Copy link
Author

iameli commented Apr 18, 2025

Anything I could do to help get this prioritized?

"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 :)

Copy link
Member

@RytoEX RytoEX left a comment

Choose a reason for hiding this comment

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

Use the commit prefix rtmp-services: for both commits. Use Sentence case for the text after the prefix (Capitalize the first letter of the first word).

@iameli iameli force-pushed the whip-service-bugfix branch from 62212ed to 701eb6a Compare April 18, 2025 21:09
@iameli
Copy link
Author

iameli commented Apr 18, 2025

@RytoEX Done!

@RytoEX RytoEX changed the title rtmp-services: fix bugs blocking WHIP services rtmp-services: Fix bugs blocking WHIP services Apr 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Fix Non-breaking change which fixes an issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants