summaryrefslogtreecommitdiff
path: root/sys/directsound
diff options
context:
space:
mode:
authorSebastian Dröge <slomo@circular-chaos.org>2013-08-22 17:32:17 +0200
committerSebastian Dröge <slomo@circular-chaos.org>2013-08-22 17:32:17 +0200
commit6f4f84fea0e737e08a165e3631064e6603be307c (patch)
tree77b63c9b39ec3cb90bd36b40f13c52bcdede2c34 /sys/directsound
parent4b30e11a2d223744a7b762bf464a661cfa458c7c (diff)
downloadgstreamer-plugins-bad-6f4f84fea0e737e08a165e3631064e6603be307c.tar.gz
directsoundsrc: Remove unused variable
Diffstat (limited to 'sys/directsound')
-rw-r--r--sys/directsound/gstdirectsoundsrc.c35
1 files changed, 16 insertions, 19 deletions
diff --git a/sys/directsound/gstdirectsoundsrc.c b/sys/directsound/gstdirectsoundsrc.c
index 86b94a1d9..2cc89f380 100644
--- a/sys/directsound/gstdirectsoundsrc.c
+++ b/sys/directsound/gstdirectsoundsrc.c
@@ -139,8 +139,8 @@ gst_directsound_src_finalize (GObject * object)
g_mutex_clear (&dsoundsrc->dsound_lock);
- g_free(dsoundsrc->device_name);
- g_free(dsoundsrc->device_guid);
+ g_free (dsoundsrc->device_name);
+ g_free (dsoundsrc->device_guid);
G_OBJECT_CLASS (parent_class)->finalize (object);
}
@@ -192,8 +192,7 @@ gst_directsound_src_class_init (GstDirectSoundSrcClass * klass)
g_object_class_install_property
(gobject_class, PROP_DEVICE_NAME,
g_param_spec_string ("device-name", "Device name",
- "Human-readable name of the sound device", NULL,
- G_PARAM_READWRITE));
+ "Human-readable name of the sound device", NULL, G_PARAM_READWRITE));
}
static GstCaps *
@@ -269,23 +268,23 @@ gst_directsound_src_init (GstDirectSoundSrc * src)
* Gets the GUID of request audio device
*/
static BOOL CALLBACK
-gst_directsound_enum_callback( GUID* pGUID, TCHAR* strDesc, TCHAR* strDrvName,
- VOID* pContext )
+gst_directsound_enum_callback (GUID * pGUID, TCHAR * strDesc,
+ TCHAR * strDrvName, VOID * pContext)
{
GstDirectSoundSrc *dsoundsrc = GST_DIRECTSOUND_SRC (pContext);
- if ( pGUID && dsoundsrc && dsoundsrc->device_name &&
- !g_strcmp0(dsoundsrc->device_name, strDesc)) {
- g_free(dsoundsrc->device_guid);
- dsoundsrc->device_guid = (GUID *) g_malloc0(sizeof(GUID));
- memcpy( dsoundsrc->device_guid, pGUID, sizeof(GUID));
- GST_INFO_OBJECT(dsoundsrc, "found the requested audio device :%s",
- dsoundsrc->device_name);
+ if (pGUID && dsoundsrc && dsoundsrc->device_name &&
+ !g_strcmp0 (dsoundsrc->device_name, strDesc)) {
+ g_free (dsoundsrc->device_guid);
+ dsoundsrc->device_guid = (GUID *) g_malloc0 (sizeof (GUID));
+ memcpy (dsoundsrc->device_guid, pGUID, sizeof (GUID));
+ GST_INFO_OBJECT (dsoundsrc, "found the requested audio device :%s",
+ dsoundsrc->device_name);
return FALSE;
}
- GST_INFO_OBJECT(dsoundsrc, "sound device names: %s, %s, requested device:%s",
- strDesc, strDrvName, dsoundsrc->device_name);
+ GST_INFO_OBJECT (dsoundsrc, "sound device names: %s, %s, requested device:%s",
+ strDesc, strDrvName, dsoundsrc->device_name);
return TRUE;
}
@@ -295,7 +294,6 @@ gst_directsound_src_open (GstAudioSrc * asrc)
{
GstDirectSoundSrc *dsoundsrc;
HRESULT hRes; /* Result for windows functions */
- LPGUID guid;
GST_DEBUG_OBJECT (asrc, "opening directsoundsrc");
@@ -317,9 +315,8 @@ gst_directsound_src_open (GstAudioSrc * asrc)
goto capture_function;
}
- hRes =
- DirectSoundCaptureEnumerate((LPDSENUMCALLBACK)gst_directsound_enum_callback,
- (VOID*)dsoundsrc);
+ hRes = DirectSoundCaptureEnumerate ((LPDSENUMCALLBACK)
+ gst_directsound_enum_callback, (VOID *) dsoundsrc);
if (FAILED (hRes)) {
goto capture_enumerate;
}