summaryrefslogtreecommitdiffstats
path: root/ext/esd
diff options
context:
space:
mode:
authorBenjamin Otte <otte@gnome.org>2003-06-29 19:46:12 +0000
committerBenjamin Otte <otte@gnome.org>2003-06-29 19:46:12 +0000
commit90da904f1e435812ce245928b80cfd325785ff37 (patch)
tree308c8167f16721bbfe4a047e6d798ade33aa968e /ext/esd
parent7519af569b22f502f88b9c80e7ce26522e1e9aad (diff)
compatibility fix for new GST_DEBUG stuff.
Original commit message from CVS: compatibility fix for new GST_DEBUG stuff. Includes fixes for missing includes for config.h and unistd.h I only ensured for plugins I can build that they work, so if some of them are still broken, you gotta fix them yourselves unfortunately.
Diffstat (limited to 'ext/esd')
-rw-r--r--ext/esd/esdmon.c18
-rw-r--r--ext/esd/esdsink.c16
2 files changed, 21 insertions, 13 deletions
diff --git a/ext/esd/esdmon.c b/ext/esd/esdmon.c
index 5d8cd9fc..569942db 100644
--- a/ext/esd/esdmon.c
+++ b/ext/esd/esdmon.c
@@ -20,8 +20,12 @@
* Boston, MA 02111-1307, USA.
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
#include <gst/gst.h>
#include <esd.h>
+#include <unistd.h>
#define GST_TYPE_ESDMON \
(gst_esdmon_get_type())
@@ -278,7 +282,7 @@ gst_esdmon_get (GstPad *pad)
g_return_val_if_fail (pad != NULL, NULL);
esdmon = GST_ESDMON(gst_pad_get_parent (pad));
- GST_DEBUG (GST_CAT_PLUGIN_INFO, "attempting to read something from esdmon");
+ GST_DEBUG ("attempting to read something from esdmon");
buf = gst_buffer_new ();
g_return_val_if_fail (buf, NULL);
@@ -324,7 +328,7 @@ gst_esdmon_get (GstPad *pad)
if (esdmon->depth == 16) readsamples /= 2;
esdmon->samples_since_basetime += readsamples;
- GST_DEBUG (GST_CAT_PLUGIN_INFO, "pushed buffer from esdmon of %ld bytes, timestamp %" G_GINT64_FORMAT, readbytes, GST_BUFFER_TIMESTAMP (buf));
+ GST_DEBUG ("pushed buffer from esdmon of %ld bytes, timestamp %" G_GINT64_FORMAT, readbytes, GST_BUFFER_TIMESTAMP (buf));
return buf;
}
@@ -442,21 +446,21 @@ gst_esdmon_open_audio (GstEsdmon *src)
if (src->depth == 16) esdformat |= ESD_BITS16;
else if (src->depth == 8) esdformat |= ESD_BITS8;
else {
- GST_DEBUG (0, "esdmon: invalid bit depth (%d)", src->depth);
+ GST_DEBUG ("esdmon: invalid bit depth (%d)", src->depth);
return FALSE;
}
if (src->channels == 2) esdformat |= ESD_STEREO;
else if (src->channels == 1) esdformat |= ESD_MONO;
else {
- GST_DEBUG (0, "esdmon: invalid number of channels (%d)", src->channels);
+ GST_DEBUG ("esdmon: invalid number of channels (%d)", src->channels);
return FALSE;
}
- GST_DEBUG (0, "esdmon: attempting to open connection to esound server");
+ GST_DEBUG ("esdmon: attempting to open connection to esound server");
src->fd = esd_monitor_stream(esdformat, src->frequency, src->host, connname);
if ( src->fd < 0 ) {
- GST_DEBUG (0, "esdmon: can't open connection to esound server");
+ GST_DEBUG ("esdmon: can't open connection to esound server");
return FALSE;
}
@@ -475,7 +479,7 @@ gst_esdmon_close_audio (GstEsdmon *src)
GST_FLAG_UNSET (src, GST_ESDMON_OPEN);
- GST_DEBUG (0, "esdmon: closed sound device");
+ GST_DEBUG ("esdmon: closed sound device");
}
static GstElementStateReturn
diff --git a/ext/esd/esdsink.c b/ext/esd/esdsink.c
index 673aee6e..af28a1cf 100644
--- a/ext/esd/esdsink.c
+++ b/ext/esd/esdsink.c
@@ -20,8 +20,12 @@
* Boston, MA 02111-1307, USA.
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
#include "esdsink.h"
#include <esd.h>
+#include <unistd.h>
/* elementfactory information */
static GstElementDetails esdsink_details = {
@@ -197,7 +201,7 @@ gst_esdsink_chain (GstPad *pad, GstBuffer *buf)
if (GST_BUFFER_DATA (buf) != NULL) {
if (!esdsink->mute && esdsink->fd >= 0) {
- GST_DEBUG (0, "esdsink: fd=%d data=%p size=%d",
+ GST_DEBUG ("esdsink: fd=%d data=%p size=%d",
esdsink->fd, GST_BUFFER_DATA (buf), GST_BUFFER_SIZE (buf));
write (esdsink->fd, GST_BUFFER_DATA (buf), GST_BUFFER_SIZE (buf));
}
@@ -288,21 +292,21 @@ gst_esdsink_open_audio (GstEsdsink *sink)
if (sink->depth == 16) esdformat |= ESD_BITS16;
else if (sink->depth == 8) esdformat |= ESD_BITS8;
else {
- GST_DEBUG (0, "esdsink: invalid bit depth (%d)", sink->depth);
+ GST_DEBUG ("esdsink: invalid bit depth (%d)", sink->depth);
return FALSE;
}
if (sink->channels == 2) esdformat |= ESD_STEREO;
else if (sink->channels == 1) esdformat |= ESD_MONO;
else {
- GST_DEBUG (0, "esdsink: invalid number of channels (%d)", sink->channels);
+ GST_DEBUG ("esdsink: invalid number of channels (%d)", sink->channels);
return FALSE;
}
- GST_DEBUG (0, "esdsink: attempting to open connection to esound server");
+ GST_DEBUG ("esdsink: attempting to open connection to esound server");
sink->fd = esd_play_stream_fallback(esdformat, sink->frequency, sink->host, connname);
if ( sink->fd < 0 ) {
- GST_DEBUG (0, "esdsink: can't open connection to esound server");
+ GST_DEBUG ("esdsink: can't open connection to esound server");
return FALSE;
}
@@ -318,7 +322,7 @@ gst_esdsink_close_audio (GstEsdsink *sink)
close(sink->fd);
sink->fd = -1;
- GST_DEBUG (0, "esdsink: closed sound device");
+ GST_DEBUG ("esdsink: closed sound device");
}
static GstElementStateReturn