Fetching GstBuffer Flags in GStreamer1



I have an application that sends a video stream to a client over a custom protocol. When the client first connects, we need to wait until the next keyframe so the client can decode it sensibly.  Alternatively, the client could read a flag in the protocol and wait for a keyframe on its end.  Either way, we need to check the GstBuffer flags for a keyframe.

The C code to do this would be:

if(!GST_BUFFER_FLAG_IS_SET(buffer, GST_BUFFER_FLAG_DELTA_UNIT)) {
    // it's a keyframe
}

GstBufferFlags is itself an enum.  The issue is that GST_BUFFER_FLAG_IS_SET() is itself a C macro rather than a straight function.  So is GST_BUFFER_FLAGS().  There doesn't seem to be any other mechanisim in GstBuffer for checking the flags.  I'm not sure how the introspection bindings would have picked up the macros.

Thanks,
Timm


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]