mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 18:21:04 +00:00
wasapi: Don't cast GstDeviceProvider to GstElement
The GstDeviceProvider isn't subclass of GstElement. (gst-device-monitor-1.0:49356): GLib-GObject-WARNING **: 20:21:18.651: invalid cast from 'GstWasapiDeviceProvider' to 'GstElement'
This commit is contained in:
parent
f218ec2794
commit
baaa965ebc
3 changed files with 5 additions and 5 deletions
|
@ -63,7 +63,7 @@ gst_wasapi_device_provider_probe (GstDeviceProvider * provider)
|
|||
GstWasapiDeviceProvider *self = GST_WASAPI_DEVICE_PROVIDER (provider);
|
||||
GList *devices = NULL;
|
||||
|
||||
if (!gst_wasapi_util_get_devices (GST_ELEMENT (self), TRUE, &devices))
|
||||
if (!gst_wasapi_util_get_devices (GST_OBJECT (self), TRUE, &devices))
|
||||
GST_ERROR_OBJECT (self, "Failed to enumerate devices");
|
||||
|
||||
return devices;
|
||||
|
|
|
@ -313,7 +313,7 @@ gst_wasapi_util_hresult_to_string (HRESULT hr)
|
|||
}
|
||||
|
||||
static IMMDeviceEnumerator *
|
||||
gst_wasapi_util_get_device_enumerator (GstElement * self)
|
||||
gst_wasapi_util_get_device_enumerator (GstObject * self)
|
||||
{
|
||||
HRESULT hr;
|
||||
IMMDeviceEnumerator *enumerator = NULL;
|
||||
|
@ -326,7 +326,7 @@ gst_wasapi_util_get_device_enumerator (GstElement * self)
|
|||
}
|
||||
|
||||
gboolean
|
||||
gst_wasapi_util_get_devices (GstElement * self, gboolean active,
|
||||
gst_wasapi_util_get_devices (GstObject * self, gboolean active,
|
||||
GList ** devices)
|
||||
{
|
||||
gboolean res = FALSE;
|
||||
|
@ -550,7 +550,7 @@ gst_wasapi_util_get_device_client (GstElement * self,
|
|||
IMMDevice *device = NULL;
|
||||
IAudioClient *client = NULL;
|
||||
|
||||
if (!(enumerator = gst_wasapi_util_get_device_enumerator (self)))
|
||||
if (!(enumerator = gst_wasapi_util_get_device_enumerator (GST_OBJECT (self))))
|
||||
goto beach;
|
||||
|
||||
if (!device_strid) {
|
||||
|
|
|
@ -92,7 +92,7 @@ gint gst_wasapi_erole_to_device_role (gint erole);
|
|||
|
||||
gchar *gst_wasapi_util_hresult_to_string (HRESULT hr);
|
||||
|
||||
gboolean gst_wasapi_util_get_devices (GstElement * element, gboolean active,
|
||||
gboolean gst_wasapi_util_get_devices (GstObject * element, gboolean active,
|
||||
GList ** devices);
|
||||
|
||||
gboolean gst_wasapi_util_get_device_client (GstElement * element,
|
||||
|
|
Loading…
Reference in a new issue