Skip to content

Working with pointers #344

@chfritz

Description

@chfritz

I know pointers are tricky, but I was hoping that you might have an idea how to work with function like gst_rtcp_buffer_map that are used to fill a variable with content:

gst_rtcp_buffer_map (GstBuffer *buffer, GstMapFlags flags, GstRTCPBuffer *rtcp)

I have a buffer that I got from RTPSession::on-feedback-rtcp and would like to map it to a RTCP buffer so I can read the content. Of course in C you would create a variable and then pass the address:

GstRTCPBuffer rtcp = GST_RTCP_BUFFER_INIT;
gst_rtcp_buffer_map (buf, GST_MAP_READWRITE, &rtcp);

and then do what you want with rtcp. Is there any way I can do the same via node-gtk? I've tried

const rtcp = new GstRtp.RTCPBuffer(1500);
GstRtp.rtcpBufferMap(buffer, 1, rtcp);

But that just throws

(process:3961601): GStreamer-CRITICAL **: 20:55:52.809: gst_object_ref: assertion 'object != NULL' failed

on the first line and then seg fault on the second.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions