Skip to content

Add talkback receiver factory hook - #564

Open
Naka-Masa19 wants to merge 1 commit into
ikalchev:devfrom
Naka-Masa19:add-talkback-receiver-extension
Open

Naka-Masa19 wants to merge 1 commit into
ikalchev:devfrom
Naka-Masa19:add-talkback-receiver-extension

Conversation

@Naka-Masa19

Copy link
Copy Markdown

Problem

Camera talkback is not extensible in the same way as the outgoing streaming path.

Outgoing streams can already be customized via start_stream / stop_stream. Incoming talkback cannot: set_endpoints always constructs the built-in TalkbackReceiver, which owns the UDP socket, SRTP unprotect, and RTP parse. There is no supported way to plug in a different receive path end-to-end (for example, handing the receive path to an external media pipeline).

Solution

  • Add TalkbackReceiverProtocol (local_port, start, stop) as the receiver contract.
  • Add overridable Camera.create_talkback_receiver(...), which returns the default TalkbackReceiver.
  • Route set_endpoints through that factory instead of hard-coding TalkbackReceiver(...).
  • Document the protocol in the talkback API docs.

Default behavior is unchanged. Subclasses can replace the whole receiver by overriding the factory.

AI assistance

AI-assisted (design discussion / PR text). Code authored and verified by me.

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.

1 participant