mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 14:26:43 +00:00
winscreencap: Warn for deprecated plugin use
This plugin should not be used any more Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3544>
This commit is contained in:
parent
bd8ef7ae3a
commit
1e124682c8
2 changed files with 22 additions and 0 deletions
|
@ -45,6 +45,7 @@
|
|||
|
||||
#include "gstdx9screencapsrc.h"
|
||||
#include <gst/video/video.h>
|
||||
#include <versionhelpers.h>
|
||||
|
||||
GST_DEBUG_CATEGORY_STATIC (dx9screencapsrc_debug);
|
||||
|
||||
|
@ -158,6 +159,8 @@ gst_dx9screencapsrc_class_init (GstDX9ScreenCapSrcClass * klass)
|
|||
static void
|
||||
gst_dx9screencapsrc_init (GstDX9ScreenCapSrc * src)
|
||||
{
|
||||
static gsize deprecated_warn = 0;
|
||||
|
||||
/* Set src element initial values... */
|
||||
src->surface = NULL;
|
||||
src->d3d9_device = NULL;
|
||||
|
@ -177,6 +180,14 @@ gst_dx9screencapsrc_init (GstDX9ScreenCapSrc * src)
|
|||
g_d3d9 = Direct3DCreate9 (D3D_SDK_VERSION);
|
||||
else
|
||||
IDirect3D9_AddRef (g_d3d9);
|
||||
|
||||
if (g_once_init_enter (&deprecated_warn)) {
|
||||
if (IsWindows8OrGreater ()) {
|
||||
g_warning ("\"dx9screencapsrc\" is deprecated and will be removed"
|
||||
"in the future. Use \"d3d11screencapturesrc\" element instead");
|
||||
}
|
||||
g_once_init_leave (&deprecated_warn, 1);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -48,6 +48,7 @@
|
|||
|
||||
#include "gstgdiscreencapsrc.h"
|
||||
#include <gst/video/video.h>
|
||||
#include <versionhelpers.h>
|
||||
|
||||
GST_DEBUG_CATEGORY_STATIC (gdiscreencapsrc_debug);
|
||||
|
||||
|
@ -156,6 +157,8 @@ gst_gdiscreencapsrc_class_init (GstGDIScreenCapSrcClass * klass)
|
|||
static void
|
||||
gst_gdiscreencapsrc_init (GstGDIScreenCapSrc * src)
|
||||
{
|
||||
static gsize deprecated_warn = 0;
|
||||
|
||||
/* Set src element initial values... */
|
||||
src->dibMem = NULL;
|
||||
src->hBitmap = (HBITMAP) INVALID_HANDLE_VALUE;
|
||||
|
@ -170,6 +173,14 @@ gst_gdiscreencapsrc_init (GstGDIScreenCapSrc * src)
|
|||
|
||||
gst_base_src_set_format (GST_BASE_SRC (src), GST_FORMAT_TIME);
|
||||
gst_base_src_set_live (GST_BASE_SRC (src), TRUE);
|
||||
|
||||
if (g_once_init_enter (&deprecated_warn)) {
|
||||
if (IsWindows8OrGreater ()) {
|
||||
g_warning ("\"gdiscreencapsrc\" is deprecated and will be removed"
|
||||
"in the future. Use \"d3d11screencapturesrc\" element instead");
|
||||
}
|
||||
g_once_init_leave (&deprecated_warn, 1);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in a new issue