Skip to content

feat: add rgba8 support - #109

Open
spurnvoj wants to merge 2 commits into
ros-drivers:ros2from
fly4future:ros2
Open

feat: add rgba8 support#109
spurnvoj wants to merge 2 commits into
ros-drivers:ros2from
fly4future:ros2

Conversation

@spurnvoj

Copy link
Copy Markdown

Summary

  • What changed:
    Adds rgba8 support to the image_encoding parameter: a new whitelist entry in GSCam::configure() and a matching "format", "RGBA" caps branch in GSCam::init_stream(). publish_stream() needed no changes since it already derives frame size/step generically via numChannels(image_encoding_).
  • Why:
    Jetson's nvvidconv only natively outputs 4-byte-aligned formats (RGBA/BGRx) or YUV, never plain RGB/BGR. Without this, a pipeline ending in nvvidconv ! video/x-raw,format=RGBA had no caps gscam's appsink would accept, and failed with cannot link outelement(...) -> sink.
  • Notes for reviewers:
    Same shape as add MONO16 / GRAY16_LE support #70 (MONO16/GRAY16_LE) - additive only, no changes to the generic publish path.

Impact

  • Affected areas: src/gscam.cpp (configure(), init_stream()), README.md
  • Breaking changes: No

Testing status

  • What was tested:

    • Build/test passes
    • Tests updated if needed
    • Tested in simulation
    • Tested on real HW
  • How to repeat tests:

colcon build --packages-select gscam
Verified two ways:
- On a Jetson Orin NX with an ArduCam (imx219): gscam_config ending in nvvidconv ! video/x-raw,format=RGBA, image_encoding: "rgba8" - pipeline links and publishes correctly.
- Hardware-independent repro for reviewers without Jetson hardware: gscam_config: "videotestsrc is-live=true ! video/x-raw,format=RGBA,width=64,height=64,framerate=10/1", image_encoding: "rgba8" - confirms the same caps-negotiation path without needing any Tegra-specific elements.

@clydemcqueen clydemcqueen left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM

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