How can I check that the cap is "video/x-raw(memory:D3D11Memory)"?


I would like to check whether the cap is “video/x-raw” or “video/x-raw(memory:D3D11Memory)”.

I used “gst_structure_get_name”, but it return “video/x-raw” even if caps is “video/x-raw(memory:D3D11Memory)”.

If anyone knows of a better method, I would appreciate it if you could let me know.

Best regards,

This is an example code

  auto features = gst_caps_get_features (caps, 0);
  // defined in gstd3d11memory.h 
  // #define GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY "memory:D3D11Memory"
  if (gst_caps_features_contains (features, GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY)) {
    // this is d3d11 caps

Hello seungha.

Thank you for your quick answer!

I am able to check “video/x-raw(memory:D3D11Memory)” now.