Skip to content
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

RSDK-9756-draft #4737

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft

Conversation

nicksanford
Copy link
Member

@nicksanford nicksanford commented Jan 23, 2025

This PR attempts to allow a module to stream a webrtc video track from viam-server's StreamServer.

Currently it doesn't work as the GRPC client a module has for communicating with viam-server goes over unix socket, as opposed to WebRTC.

As a result, the viam-server stream server is unable to add a webrtc track b/c the GRPC communication is happening over unix socket, not webrtc.

Logs:

\_ 2025-01-23T18:16:27.761Z	DEBUG	networking.module-connection.camera-1	camera/client.go:480	SubscribeRTP AddStream hit error	{"subID":"3ab2035e-3c1d-40c6-8350-f20dcd3a0e9c","trackName":"rdk:component:camera/camera-1","err":"rpc error: code = Unknown desc = can only add a stream over a WebRTC based connection"}
2025-01-23T18:16:27.761Z	INFO	rdk.modmanager.local-module-2.local-module-2.StdOut	pexec/managed_process.go:294	
\_ 2025-01-23T18:16:27.761Z	DEBUG	networking.module-connection.camera-1	camera/client.go:436	SubscribeRTP after	{"subID":"3ab2035e-3c1d-40c6-8350-f20dcd3a0e9c","name":"rdk:component:camera/camera-1","bufAndCBByID":"len: 0"}
2025-01-23T18:16:27.761Z	INFO	rdk.modmanager.local-module-2.local-module-2.StdOut	pexec/managed_process.go:294	
\_ 2025-01-23T18:16:27.761Z	DEBUG	networking.module-connection.camera-1	camera/client.go:408	Error subscribing to RTP. Closing passthrough buffer.
2025-01-23T18:16:27.763Z	INFO	rdk:component:camera/camera-2	passthroughcam/passthroughcam.go:76	SubscribeRTP STOP	{"log_ts":"2025-01-23T18:16:27.761Z"}
2025-01-23T18:16:27.763Z	DEBUG	rdk.modmanager	camera/client.go:480	SubscribeRTP AddStream hit error	{"subID":"11d91e54-1bdb-4607-a3f4-152e2f0ea91e","trackName":"rdk:component:camera/camera-2","err":"rpc error: code = Unknown desc = error setting up stream subscription: rpc error: code = Unknown desc = can only add a stream over a WebRTC based connection"}
2025-01-23T18:16:27.764Z	DEBUG	rdk.modmanager	camera/client.go:436	SubscribeRTP after	{"subID":"11d91e54-1bdb-4607-a3f4-152e2f0ea91e","name":"rdk:component:camera/camera-2","bufAndCBByID":"len: 0"}
2025-01-23T18:16:27.764Z	DEBUG	rdk.modmanager	camera/client.go:408	Error subscribing to RTP. Closing passthrough buffer.
2025-01-23T18:16:27.764Z	WARN	rdk.camera-2	state/state.go:296	tick: rtp_passthrough not possible, falling back to GoStream	{"err":"SubscribeRTP failed: rpc error: code = Unknown desc = error setting up stream subscription: rpc error: code = Unknown desc = can only add a stream over a WebRTC based connection"}

``2025-01-23T18:16:27.764Z WARN rdk.camera-2 state/state.go:296 tick: rtp_passthrough not possible, falling back to GoStream {"err":"SubscribeRTP failed: rpc error: code = Unknown desc = error setting up stream subscription: rpc error: code = Unknown desc = can only add a stream over a WebRTC based connection"}`

@viambot viambot added the safe to test This pull request is marked safe to test from a trusted zone label Jan 23, 2025
@nicksanford nicksanford requested a review from dgottlieb January 23, 2025 18:22
@viambot viambot added safe to test This pull request is marked safe to test from a trusted zone and removed safe to test This pull request is marked safe to test from a trusted zone labels Jan 23, 2025
@viambot viambot added safe to test This pull request is marked safe to test from a trusted zone and removed safe to test This pull request is marked safe to test from a trusted zone labels Jan 23, 2025
@viambot viambot added safe to test This pull request is marked safe to test from a trusted zone and removed safe to test This pull request is marked safe to test from a trusted zone labels Jan 24, 2025
@viambot viambot added safe to test This pull request is marked safe to test from a trusted zone and removed safe to test This pull request is marked safe to test from a trusted zone labels Jan 24, 2025
@viambot viambot added safe to test This pull request is marked safe to test from a trusted zone and removed safe to test This pull request is marked safe to test from a trusted zone labels Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
safe to test This pull request is marked safe to test from a trusted zone
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants