feat(pj_plugins): expose parser capability tags on the runtime catalog#83
Open
pabloinigoblasco wants to merge 1 commit intomainfrom
Open
feat(pj_plugins): expose parser capability tags on the runtime catalog#83pabloinigoblasco wants to merge 1 commit intomainfrom
pabloinigoblasco wants to merge 1 commit intomainfrom
Conversation
Propagate the parser capability tags already parsed from the plugin manifest JSON onto the host-visible RuntimeMessageParserPlugin so host code can discover them before instantiating the parser. Changes: - RuntimeMessageParserPlugin gains std::vector<std::string> capabilities, populated by PluginRuntimeCatalog::loadAndRegisterMessageParser from PluginDescriptor::capabilities. - New example DSO mock_media_parser declares '"capabilities":["object"]' in its embedded manifest and exercises the dual-emit path (scalar seq field + opaque blob via objectWriteHost()->pushOwned()). Hosts that need to selectively register optional services (e.g. pj.parser_object_write.v1) before calling parser->bind() can now read the tag list directly from the catalog. The 'object' tag is the first real consumer of this channel; the example DSO doubles as a template for plugin authors that need to emit binary payloads alongside scalar fields.
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.
Summary
Propagate the parser capability tags already parsed from the plugin manifest JSON onto the host-visible
RuntimeMessageParserPluginso host code can discover them before instantiating the parser.What changes
RuntimeMessageParserPlugin(inpj_plugins/include/pj_plugins/host/plugin_runtime_catalog.hpp) gains astd::vector<std::string> capabilitiesfield, populated byPluginRuntimeCatalog::loadAndRegisterMessageParserfromPluginDescriptor::capabilities.mock_media_parser_plugin(pj_plugins/examples/mock_media_parser.cpp) declares"capabilities":["object"]in its embedded manifest and exercises the dual-emit path — scalarseqfield plus opaque blob viaobjectWriteHost()->pushOwned().Why
Hosts need to discover a parser's capability tags before instantiating the parser, so they can selectively register optional services such as
pj.parser_object_write.v1. The"object"tag is the first real consumer of this channel.The example DSO doubles as a template for plugin authors that need to emit binary payloads (images, compressed frames, serialized messages) alongside scalar fields, and as a real plugin that exercises the manifest → catalog → host propagation path end-to-end.
How to test
PJ_BUILD_TESTS=ON; confirmmock_media_parser_plugin.sois produced.plugin_parser_object_write_test(inpj_datastore/tests) — exercises the SDK path that composes scalar + object write hosts from oneparse()call."object"capability surface an emptycapabilitiesvector, which leaves their host-side wiring unchanged.