plugin_LTLIBRARIES = libgstd3dvideosink.la
libgstd3dvideosink_la_SOURCES = d3dvideosink.c d3dhelpers.c
-libgstd3dvideosink_la_CFLAGS = $(GST_PLUGINS_BAD_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) $(DIRECT3D_CFLAGS) $(DIRECTX_CFLAGS)
+libgstd3dvideosink_la_CFLAGS = $(GST_PLUGINS_BAD_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) $(DIRECT3D_CFLAGS) $(DIRECTX_CFLAGS) \
+ -DDISABLE_BUFFER_POOL
libgstd3dvideosink_la_LIBADD = $(GST_BASE_LIBS) $(GST_PLUGINS_BASE_LIBS) \
-lgstvideo-$(GST_API_VERSION) \
$(DIRECT3D_LIBS) $(DIRECTX_LDFAGS)
surface = ((GstD3DSurfaceMemory *) mem)->surface;
+#ifndef DISABLE_BUFFER_POOL
/* Need to keep an additional ref until the next buffer
* to make sure it isn't reused until then */
sink->fallback_buffer = buf;
+#else
+ sink->fallback_buffer = NULL;
+#endif
} else {
mem = gst_buffer_peek_memory (buf, 0);
surface = ((GstD3DSurfaceMemory *) mem)->surface;
if (sink->d3d.surface)
IDirect3DSurface9_Release (sink->d3d.surface);
+#ifndef DISABLE_BUFFER_POOL
IDirect3DSurface9_AddRef (surface);
+#endif
sink->d3d.surface = surface;
if (!d3d_present_swap_chain (sink)) {
sink->create_internal_window = DEFAULT_CREATE_RENDER_WINDOW;
sink->stream_stop_on_close = DEFAULT_STREAM_STOP_ON_CLOSE;
sink->enable_navigation_events = DEFAULT_ENABLE_NAVIGATION_EVENTS;
+ sink->d3d.surface = NULL;
g_rec_mutex_init (&sink->lock);
}
if (pool) {
/* we need at least 2 buffer because we hold on to the last one */
+#ifndef DISABLE_BUFFER_POOL
gst_query_add_allocation_pool (query, pool, size, 2, 0);
+#endif
gst_object_unref (pool);
}