feat(pj_base): align VideoFrame proto to Foxglove + zero-copy view decode#111
Merged
Conversation
… push_message slot Rename the runtime-host vtable tail slot push_message_v2 -> push_message and remove the now-redundant eager push_raw_message slot, leaving one definitive push entry point. The C++ SDK wrapper pushMessage is unchanged, so plugin sources that go through it are unaffected; only code that wires the vtable slot by name needs the new name. Dropping a slot reduces the vtable, so this is an ABI-breaking change and the layout sentinel asserts are updated accordingly. Contents: - data_source_protocol.h: rename push_message_v2 -> push_message; drop the push_raw_message slot - sdk/data_source_host_views.hpp: align the guard/call/strings with push_message; drop the raw-message path - sdk/data_source_patterns.hpp: update the slot reference - pj_base/CMakeLists.txt + rename push_message_v2_test.cpp -> push_message_test.cpp - abi_layout_sentinels_test.cpp: update the tail-slot asserts for the reduced vtable - docs (USER_GUIDE, ARCHITECTURE, data-source-guide, message-parser-guide), mock_data_source, and the affected library/file-source tests
…w decode Swap PJ.VideoFrame field numbers to match foxglove.CompressedVideo (timestamp=1, frame_id=2, data=3, format=4) so a single decoder serves both the canonical and Foxglove video schemas. Add deserializeVideoFrameView(), which returns a frame whose `data` aliases the input buffer (no copy of the H.264/H.265 bitstream) and carries the caller-supplied anchor; the owning deserializeVideoFrame() is unchanged. BREAKING (wire format): canonical PJ.VideoFrame payloads written before this change (format=3, data=4) are no longer read correctly and must be regenerated. The C++ sdk::VideoFrame struct layout is unchanged, so abidiff stays clean. Per the versioning policy a canonical-schema wire-format change is a MAJOR; the maintainer should cut the corresponding release on merge. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
c526dff to
2b7d775
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Align the canonical
PJ.VideoFrameproto to Foxglove'sCompressedVideoand add a zero-copy decode entry point, so one decoder serves both schemas.timestamp=1, frame_id=2, data=3, format=4(wasformat=3, data=4) — now wire-identical tofoxglove.CompressedVideo.deserializeVideoFrameView(data, size, anchor): returns aVideoFramewhose.dataaliases the input buffer (no copy of the H.264/H.265 bitstream) and carries the caller-suppliedanchor. The owningdeserializeVideoFrame()is unchanged.video_frame_codec_testupdated (golden-bytes Foxglove-layout lock + view-aliasing assertion).Why
Lets PlotJuggler 4 load + render canonical video end-to-end (companion PRs in
PJ4andpj-official-plugins). One wire layout → a single decoder handlesPJ.VideoFrameandfoxglove.CompressedVideo.Changing a canonical-object wire format is a MAJOR per the versioning policy. The C++
sdk::VideoFramestruct layout is unchanged, soabidiffstays clean andabi/baseline.abiis untouched. Old-layoutPJ.VideoFramepayloads must be regenerated. I did not bumpconanfile.py/PJ_PACKAGE_VERSION— proposing the maintainer cut the corresponding release on merge (the plugins PR pins it).Test
./build.sh && ./test.shgreen.🤖 Generated with Claude Code