mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 01:30:38 +00:00
d3dvideosink: fix compiler warnings and build failure with mingw
shared.d3ddev was removed a while back, not sure how this still compiles for anyone (tpm). https://bugzilla.gnome.org/show_bug.cgi?id=653718 https://bugzilla.gnome.org/show_bug.cgi?id=670143 https://bugzilla.gnome.org/show_bug.cgi?id=656905
This commit is contained in:
parent
0b8fb8b587
commit
740c3101ac
3 changed files with 12 additions and 10 deletions
|
@ -63,7 +63,7 @@ struct _GstD3DVideoSinkHookData
|
|||
static GstD3DVideoSinkShared shared;
|
||||
/* Define a shared lock to synchronize the creation/destruction of the d3d device */
|
||||
static GStaticMutex shared_d3d_lock = G_STATIC_MUTEX_INIT;
|
||||
static GStaticMutex shared_d3d_dev_lock = G_STATIC_MUTEX_INIT;
|
||||
static G_GNUC_UNUSED GStaticMutex shared_d3d_dev_lock = G_STATIC_MUTEX_INIT;
|
||||
static GStaticMutex shared_d3d_hook_lock = G_STATIC_MUTEX_INIT;
|
||||
/* Hold a reference to our dll's HINSTANCE */
|
||||
static HINSTANCE g_hinstDll = NULL;
|
||||
|
@ -156,7 +156,7 @@ static void gst_d3dvideosink_remove_window_for_renderer (GstD3DVideoSink *
|
|||
static gboolean gst_d3dvideosink_initialize_direct3d (GstD3DVideoSink * sink);
|
||||
static gboolean gst_d3dvideosink_initialize_d3d_device (GstD3DVideoSink * sink);
|
||||
static gboolean gst_d3dvideosink_resize_swap_chain (GstD3DVideoSink * sink,
|
||||
gint width, gint height);
|
||||
gint width, gint height) G_GNUC_UNUSED;
|
||||
static gboolean gst_d3dvideosink_notify_device_init (GstD3DVideoSink * sink);
|
||||
static gboolean gst_d3dvideosink_notify_device_lost (GstD3DVideoSink * sink);
|
||||
static gboolean gst_d3dvideosink_notify_device_reset (GstD3DVideoSink * sink);
|
||||
|
@ -468,11 +468,13 @@ gst_d3dvideosink_get_caps (GstBaseSink * basesink)
|
|||
GstStructure *stru = gst_caps_get_structure (c, i);
|
||||
if (!gst_structure_has_name (stru, "video/x-raw-rgb")) {
|
||||
gst_structure_get_fourcc (stru, "format", (guint32 *) & d3dfourcc);
|
||||
switch (d3dfourcc) {
|
||||
switch ((guint32) d3dfourcc) {
|
||||
case GST_MAKE_FOURCC ('Y', 'V', '1', '2'):
|
||||
case GST_MAKE_FOURCC ('I', '4', '2', '0'):
|
||||
d3dfourcc = (D3DFORMAT) MAKEFOURCC ('Y', 'V', '1', '2');
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (d3dfourcc && SUCCEEDED (IDirect3D9_CheckDeviceFormat (shared.d3d,
|
||||
D3DADAPTER_DEFAULT,
|
||||
|
@ -529,10 +531,10 @@ gst_d3dvideosink_create_shared_hidden_window (GstD3DVideoSink * sink)
|
|||
goto failed;
|
||||
|
||||
CloseHandle (shared.hidden_window_created_signal);
|
||||
|
||||
/*
|
||||
if (!shared.d3ddev)
|
||||
goto failed;
|
||||
|
||||
*/
|
||||
GST_DEBUG ("Successfully created Direct3D hidden window, handle: %p",
|
||||
shared.hidden_window_handle);
|
||||
|
||||
|
@ -1567,7 +1569,7 @@ gst_d3dvideosink_flush_gpu (GstD3DVideoSink * sink)
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
static G_GNUC_UNUSED void
|
||||
gst_d3dvideosink_wait_for_vsync (GstD3DVideoSink * sink)
|
||||
{
|
||||
if (sink->d3dpp.PresentationInterval == D3DPRESENT_INTERVAL_IMMEDIATE) {
|
||||
|
|
|
@ -33,8 +33,8 @@ G_BEGIN_DECLS
|
|||
#define WM_DIRECTX_D3D_RESIZE WM_DIRECTX + 5
|
||||
|
||||
#define DIRECTX_D3D_API(version, dispatch_table, init_function, create_function, resize_function, device_lost_function, notify_device_reset_function, release_function) \
|
||||
static gpointer DIRECTX_API_COMPONENT_D3D_ ## version ## _DISPATCH_TABLE = &dispatch_table; \
|
||||
static DirectXAPIComponentD3D DIRECTX_API_COMPONENT_D3D_ ## version ## _INIT = { \
|
||||
static gpointer G_GNUC_UNUSED DIRECTX_API_COMPONENT_D3D_ ## version ## _DISPATCH_TABLE = &dispatch_table; \
|
||||
static DirectXAPIComponentD3D G_GNUC_UNUSED DIRECTX_API_COMPONENT_D3D_ ## version ## _INIT = { \
|
||||
create_function /*create_function*/ \
|
||||
, resize_function /*resize_function*/ \
|
||||
, device_lost_function /*device_lost_function*/ \
|
||||
|
@ -42,7 +42,7 @@ G_BEGIN_DECLS
|
|||
, release_function /*release_function*/ \
|
||||
, NULL /*private_data*/ \
|
||||
}; \
|
||||
static void init_directx_api_component_d3d_ ## version ## _(const DirectXAPI* api) { \
|
||||
static void G_GNUC_UNUSED init_directx_api_component_d3d_ ## version ## _(const DirectXAPI* api) { \
|
||||
gpointer private_data = &DIRECTX_API_COMPONENT_D3D_ ## version ## _INIT; \
|
||||
gpointer vtable = DIRECTX_API_COMPONENT_D3D_ ## version ## _DISPATCH_TABLE; \
|
||||
DIRECTX_SET_COMPONENT_INIT(DIRECTX_D3D(api), init_function); \
|
||||
|
|
|
@ -111,7 +111,7 @@ typedef enum
|
|||
, &DIRECTX_ ## version ## _DIRECTCOMPUTE_COMPONENT \
|
||||
, {NULL, NULL, NULL} /*reserved*/ \
|
||||
}; \
|
||||
static void init_directx_ ## version ## _supported_api(void) { \
|
||||
static void G_GNUC_UNUSED init_directx_ ## version ## _supported_api(void) { \
|
||||
DirectXAPI* api; \
|
||||
api = &DIRECTX_ ## version ## _API; \
|
||||
api->d3d->api = api; \
|
||||
|
|
Loading…
Reference in a new issue