Skip to content

Add the source@v1 protocol layer - #112

Draft
chrisuthe wants to merge 1 commit into
mainfrom
source-role/01-protocol
Draft

Add the source@v1 protocol layer#112
chrisuthe wants to merge 1 commit into
mainfrom
source-role/01-protocol

Conversation

@chrisuthe

Copy link
Copy Markdown
Member

Part 1/6 of the source@v1 stack (tracker: #95). Each part is based on the previous one.

What it adds: the source@v1 protocol layer — the source role/binary ids (chunk type 12), the client-stream/start / client-stream/end serializers, server/command source parsing, and shared big-endian 64-bit read/write helpers (the player/artwork/visualizer readers now use them).

How it's used: nothing calls the new pieces yet; part 3's source role uses them to announce and frame its outbound audio. The be64 dedup is a pure refactor covered by the existing suites.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

A new test comment violates the repository’s documentation convention by recording transient external implementation history.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Adds the internal source@v1 protocol foundation for issue #95.

Changes:

  • Adds source role identifiers, messages, serialization, and command parsing.
  • Centralizes big-endian 64-bit timestamp helpers.
  • Adds protocol coverage for source messages and timestamp encoding.
File summaries
File Description
src/protocol_messages.h Defines source protocol types and endian helpers.
src/protocol.cpp Parses and serializes source messages.
src/player_role.cpp Uses shared timestamp decoding.
src/artwork_role.cpp Uses shared timestamp decoding.
src/visualizer_role.cpp Uses shared timestamp decoding.
tests/test_protocol.cpp Tests source protocol and endian behavior.
Review details
  • Files reviewed: 6/6 changed files
  • Comments generated: 1
  • Review effort level: Balanced

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread tests/test_protocol.cpp
Comment on lines +829 to +830
// Exact-field assertions, including the hyphenated "client-stream/start" type string (the
// reference Python implementation still sends an underscore and must not be copied).
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