Skip to content

INT-8628: Make intercom vstream socket path and stream number configurable - #13

Merged
darshan-verkada merged 1 commit into
intercom/release-2-15from
feature/INT-8628-vstream-configurable
Apr 3, 2026
Merged

INT-8628: Make intercom vstream socket path and stream number configurable#13
darshan-verkada merged 1 commit into
intercom/release-2-15from
feature/INT-8628-vstream-configurable

Conversation

@darshan-verkada

Copy link
Copy Markdown

Summary

  • Switch intercom_codec socket_init() from TCP port 20001 to Unix domain socket
  • Add vstream_sock_path (char[256]) and vstream_stream_num (unsigned) to pjsua_media_config; defaults are empty/sentinel to require explicit app configuration
  • Update pjmedia_codec_intercom_vid_init() to accept the two values; validate with PJ_ASSERT_RETURN — returns PJ_EINVAL if either is unset
  • Add runtime guard in socket_init() as a second line of defense
  • Mirror fields in pjsua2 MediaConfig (vstreamSockPath, vstreamStreamNum) with fromPj/toPj/readObject/writeObject support
  • Pass values from pjsua_var.media_cfg in pjsua_vid.c

Stacked on: #12

Test plan

  • Set vstreamSockPath and vstreamStreamNum in vendpoint.cpp, verify video streams correctly
  • Verify pjsua_init() fails with PJ_EINVAL if either field is left at default sentinel

🤖 Generated with Claude Code

@linear

linear Bot commented Apr 1, 2026

Copy link
Copy Markdown

Comment thread pjmedia/src/pjmedia-codec/intercom_codec.c
@MattMacGregor
MattMacGregor self-requested a review April 3, 2026 01:14
@darshan-verkada
darshan-verkada changed the base branch from feature/INT-8910-srv-resolved-callback to intercom/release-2-15 April 3, 2026 18:34
@MattMacGregor

Copy link
Copy Markdown

Sorry what is the stream num for? My understanding is we were just switching from a hardcoded port to a hardcoded unix socket.

Replace compile-time defines with runtime config passed through pjsua_media_config
so the application controls where video frames come from and which stream to use
for IDR requests, without recompiling the library.

- Switch intercom_codec socket_init() from TCP port 20001 to Unix domain socket
- Add vstream_sock_path (char[256]) and vstream_stream_num (unsigned) to
  pjsua_media_config; defaults are empty/sentinel to force explicit app config
- Update pjmedia_codec_intercom_vid_init() signature to accept the two values;
  validate with PJ_ASSERT_RETURN — PJ_EINVAL if either is unset
- Add runtime guard in socket_init() as a second line of defense
- Mirror fields in pjsua2 MediaConfig (vstreamSockPath, vstreamStreamNum) with
  fromPj/toPj/readObject/writeObject support
- Pass values from pjsua_var.media_cfg in pjsua_vid.c

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@darshan-verkada
darshan-verkada force-pushed the feature/INT-8628-vstream-configurable branch from 8fc96a6 to e5c10d1 Compare April 3, 2026 18:40
@darshan-verkada
darshan-verkada merged commit 442665c into intercom/release-2-15 Apr 3, 2026
25 of 31 checks passed
@darshan-verkada
darshan-verkada deleted the feature/INT-8628-vstream-configurable branch May 11, 2026 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants