Skip to content

Metadata buffer not receiving user-defined Data Type (0x30) on RPi4 (raspiraw + FPGA bridge) #82

@mutantQ

Description

@mutantQ

Hi, I know it’s not ideal to ask for help in a deprecated repo, but my team depends on raspiraw because it’s the only simple C-based rawcam app that’s easy to tinker with. Sorry in advance for bothering you here.

I’ve installed Buster on an RPi4 and managed to get raspiraw working — capture runs fine even with our FPGA bridge board (Trion T20). The problem is: we’re not receiving any metadata.
• We’re sending custom metadata using Data Type = 0x30 (user-defined byte-based, 0x30–0x37).
• We know 0x12 should be used for embedded data lines, but our FPGA cannot generate embedded lines and only passes them through directly.
• Based on prior issues and forum posts, any Data Identifier not matching the one in Unicam’s IDI0 (0x108) should be routed to the second buffer (flagged with MMAL_BUFFER_HEADER_FLAG_CODECSIDEINFO).
• However, packets appear to be dropped — console diffs between “with metadata” vs “without metadata” show no difference so far. I added a bunch of print statements, and you can check it out on the codingJang/raspiraw fork.
• I also noticed that bcm2835-unicam’s formats[] list doesn’t include 0x30–0x37, which makes me wonder if MMAL / Unicam simply doesn’t support user-defined byte-based Data Types.

Related question: In raspiraw’s callback(), can we rely on buffer ordering? We want to send alternating image data + metadata from our FPGA. From what I gather, vc.ril.rawcam produces two buffers per Frame End (same timestamp: one image, one metadata). Does that guarantee ordering across frames? In other words, will image/metadata callbacks always arrive in correct pairs, or can they interleave?

EDIT: I'm also interested in whether the metadata generated from
(a) the IMX219 sensor (with data type 0x12 and embedded data format code 0x0a), and
(b) the custom metadata we're sending (set to data type 0x30 and embedded data format code 0x0b)
can be mixed up / interleaved / etc.

Thanks a lot for your time, and for maintaining this tool that’s still really useful even now.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions