goto end; \
}
+#define CHECK_D3D_DEVICE(klass, sink, goto_label) \
+ if(!klass->d3d.d3d || !klass->d3d.device.d3d_device) { \
+ GST_ERROR_OBJECT(sink, "Direct3D device or object does not exist"); \
+ goto goto_label; \
+ }
typedef struct _textured_vertex
{
GST_ERROR_OBJECT (sink, "Failed to release D3D vertex buffer");
}
}
+ CHECK_D3D_DEVICE (klass, sink, error);
hr = IDirect3DDevice9_CreateVertexBuffer (klass->d3d.device.d3d_device, byte_count, /* Length */
D3DUSAGE_WRITEONLY, /* Usage */
tri_fvf, /* FVF */
}
return D3D_OK;
+
+error:
+ return hr;
}
gboolean