mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 18:21:04 +00:00
directsoundsrc: Remove unused variable
This commit is contained in:
parent
4b30e11a2d
commit
6f4f84fea0
1 changed files with 16 additions and 19 deletions
|
@ -139,8 +139,8 @@ gst_directsound_src_finalize (GObject * object)
|
||||||
|
|
||||||
g_mutex_clear (&dsoundsrc->dsound_lock);
|
g_mutex_clear (&dsoundsrc->dsound_lock);
|
||||||
|
|
||||||
g_free(dsoundsrc->device_name);
|
g_free (dsoundsrc->device_name);
|
||||||
g_free(dsoundsrc->device_guid);
|
g_free (dsoundsrc->device_guid);
|
||||||
|
|
||||||
G_OBJECT_CLASS (parent_class)->finalize (object);
|
G_OBJECT_CLASS (parent_class)->finalize (object);
|
||||||
}
|
}
|
||||||
|
@ -192,8 +192,7 @@ gst_directsound_src_class_init (GstDirectSoundSrcClass * klass)
|
||||||
g_object_class_install_property
|
g_object_class_install_property
|
||||||
(gobject_class, PROP_DEVICE_NAME,
|
(gobject_class, PROP_DEVICE_NAME,
|
||||||
g_param_spec_string ("device-name", "Device name",
|
g_param_spec_string ("device-name", "Device name",
|
||||||
"Human-readable name of the sound device", NULL,
|
"Human-readable name of the sound device", NULL, G_PARAM_READWRITE));
|
||||||
G_PARAM_READWRITE));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstCaps *
|
static GstCaps *
|
||||||
|
@ -269,22 +268,22 @@ gst_directsound_src_init (GstDirectSoundSrc * src)
|
||||||
* Gets the GUID of request audio device
|
* Gets the GUID of request audio device
|
||||||
*/
|
*/
|
||||||
static BOOL CALLBACK
|
static BOOL CALLBACK
|
||||||
gst_directsound_enum_callback( GUID* pGUID, TCHAR* strDesc, TCHAR* strDrvName,
|
gst_directsound_enum_callback (GUID * pGUID, TCHAR * strDesc,
|
||||||
VOID* pContext )
|
TCHAR * strDrvName, VOID * pContext)
|
||||||
{
|
{
|
||||||
GstDirectSoundSrc *dsoundsrc = GST_DIRECTSOUND_SRC (pContext);
|
GstDirectSoundSrc *dsoundsrc = GST_DIRECTSOUND_SRC (pContext);
|
||||||
|
|
||||||
if ( pGUID && dsoundsrc && dsoundsrc->device_name &&
|
if (pGUID && dsoundsrc && dsoundsrc->device_name &&
|
||||||
!g_strcmp0(dsoundsrc->device_name, strDesc)) {
|
!g_strcmp0 (dsoundsrc->device_name, strDesc)) {
|
||||||
g_free(dsoundsrc->device_guid);
|
g_free (dsoundsrc->device_guid);
|
||||||
dsoundsrc->device_guid = (GUID *) g_malloc0(sizeof(GUID));
|
dsoundsrc->device_guid = (GUID *) g_malloc0 (sizeof (GUID));
|
||||||
memcpy( dsoundsrc->device_guid, pGUID, sizeof(GUID));
|
memcpy (dsoundsrc->device_guid, pGUID, sizeof (GUID));
|
||||||
GST_INFO_OBJECT(dsoundsrc, "found the requested audio device :%s",
|
GST_INFO_OBJECT (dsoundsrc, "found the requested audio device :%s",
|
||||||
dsoundsrc->device_name);
|
dsoundsrc->device_name);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_INFO_OBJECT(dsoundsrc, "sound device names: %s, %s, requested device:%s",
|
GST_INFO_OBJECT (dsoundsrc, "sound device names: %s, %s, requested device:%s",
|
||||||
strDesc, strDrvName, dsoundsrc->device_name);
|
strDesc, strDrvName, dsoundsrc->device_name);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -295,7 +294,6 @@ gst_directsound_src_open (GstAudioSrc * asrc)
|
||||||
{
|
{
|
||||||
GstDirectSoundSrc *dsoundsrc;
|
GstDirectSoundSrc *dsoundsrc;
|
||||||
HRESULT hRes; /* Result for windows functions */
|
HRESULT hRes; /* Result for windows functions */
|
||||||
LPGUID guid;
|
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (asrc, "opening directsoundsrc");
|
GST_DEBUG_OBJECT (asrc, "opening directsoundsrc");
|
||||||
|
|
||||||
|
@ -317,9 +315,8 @@ gst_directsound_src_open (GstAudioSrc * asrc)
|
||||||
goto capture_function;
|
goto capture_function;
|
||||||
}
|
}
|
||||||
|
|
||||||
hRes =
|
hRes = DirectSoundCaptureEnumerate ((LPDSENUMCALLBACK)
|
||||||
DirectSoundCaptureEnumerate((LPDSENUMCALLBACK)gst_directsound_enum_callback,
|
gst_directsound_enum_callback, (VOID *) dsoundsrc);
|
||||||
(VOID*)dsoundsrc);
|
|
||||||
if (FAILED (hRes)) {
|
if (FAILED (hRes)) {
|
||||||
goto capture_enumerate;
|
goto capture_enumerate;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue