Commit ffa57063 authored by Benjamin Otte's avatar Benjamin Otte

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.
parent d528c24b
common @ 2a3efdc2
Subproject commit 4e379694ae9ff9843d65cf08928642eea44abdf8
Subproject commit 2a3efdc282fb1ecfd2720dea40523b3441f10fed
......@@ -968,8 +968,6 @@ dnl ######################################################################
dnl # Check command line parameters, and set shell variables accordingly #
dnl ######################################################################
GST_DEBUGINFO
AC_ARG_ENABLE(libmmx,
AC_HELP_STRING([--enable-libmmx],[use libmmx, if available]),
[case "${enableval}" in
......
......@@ -19,6 +19,9 @@
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <sys/time.h>
#include "gstalsa.h"
......@@ -1013,7 +1016,7 @@ gst_alsa_src_set_caps (GstAlsaSrc *src, gboolean aggressive)
for (i = 0; i < GST_ELEMENT (src)->numpads; i++) {
all_caps = gst_caps_intersect (all_caps, gst_pad_get_caps (this->pad[i]));
if (all_caps == NULL) {
GST_DEBUG (GST_CAT_NEGOTIATION, "No compatible caps found in alsasrc (%s)", GST_ELEMENT_NAME (this));
GST_DEBUG ("No compatible caps found in alsasrc (%s)", GST_ELEMENT_NAME (this));
return FALSE;
}
}
......@@ -1054,7 +1057,7 @@ gst_alsa_src_set_caps (GstAlsaSrc *src, gboolean aggressive)
gst_caps_set (caps, "rate", GST_PROPS_INT (rate));
for (channels = aggressive ? max_channels : MIN (max_channels, 2); channels >= min_channels; channels--) {
gst_caps_set (caps, "channels", GST_PROPS_INT (channels));
GST_DEBUG (0, "trying new caps: law %d, %ssigned, endianness: %d, width %d, depth %d, channels %d, rate %d\n",
GST_DEBUG ("trying new caps: law %d, %ssigned, endianness: %d, width %d, depth %d, channels %d, rate %d\n",
law, sign ? "" : "un", endian, width, depth, channels, rate);
if (gst_pad_try_set_caps (this->pad[0], caps) != GST_PAD_LINK_REFUSED)
gst_alsa_link (this->pad[0], caps);
......@@ -1534,7 +1537,7 @@ gst_alsa_link (GstPad *pad, GstCaps *caps)
if (format == NULL)
return GST_PAD_LINK_DELAYED;
GST_DEBUG (GST_CAT_CAPS, "found format %s\n", snd_pcm_format_name (format->format));
GST_DEBUG ("found format %s\n", snd_pcm_format_name (format->format));
if (!GST_FLAG_IS_SET (this, GST_ALSA_CAPS_NEGO)) {
gint i;
......@@ -1813,7 +1816,7 @@ gst_alsa_pcm_wait (GstAlsa *this)
if ((err = snd_pcm_wait (this->handle, 1000)) < 0) {
if (err == EINTR) {
/* happens mostly when run under gdb, or when exiting due to a signal */
GST_DEBUG (GST_CAT_PLUGIN_INFO, "got interrupted while waiting");
GST_DEBUG ("got interrupted while waiting");
if (gst_element_interrupt (GST_ELEMENT (this))) {
return TRUE;
} else {
......@@ -1834,7 +1837,7 @@ gst_alsa_pcm_wait (GstAlsa *this)
inline static gboolean
gst_alsa_start (GstAlsa *this)
{
GST_DEBUG (GST_CAT_PLUGIN_INFO, "Setting state to RUNNING");
GST_DEBUG ("Setting state to RUNNING");
switch (snd_pcm_state(this->handle)) {
case SND_PCM_STATE_XRUN:
......@@ -1916,7 +1919,7 @@ gst_alsa_open_audio (GstAlsa *this)
g_assert (this != NULL);
g_assert (this->handle == NULL);
GST_INFO (GST_CAT_PLUGIN_INFO, "Opening alsa device \"%s\"...\n", this->device);
GST_INFO ( "Opening alsa device \"%s\"...\n", this->device);
ERROR_CHECK (snd_output_stdio_attach (&this->out, stderr, 0),
"error opening log output: %s");
......@@ -1940,7 +1943,7 @@ gst_alsa_probe_hw_params (GstAlsa *this, GstAlsaFormat *format)
g_return_val_if_fail (this != NULL, FALSE);
g_return_val_if_fail (format != NULL, FALSE);
GST_INFO (GST_CAT_PLUGIN_INFO, "Probing format: %s %dHz, %d channels\n",
GST_INFO ( "Probing format: %s %dHz, %d channels\n",
snd_pcm_format_name (format->format), format->rate, format->channels);
snd_pcm_hw_params_alloca (&hw_params);
......@@ -1985,10 +1988,10 @@ gst_alsa_set_hw_params (GstAlsa *this)
g_return_val_if_fail (this->handle != NULL, FALSE);
if (this->format) {
GST_INFO (GST_CAT_PLUGIN_INFO, "Preparing format: %s %dHz, %d channels",
GST_INFO ( "Preparing format: %s %dHz, %d channels",
snd_pcm_format_name (this->format->format), this->format->rate, this->format->channels);
} else {
GST_INFO (GST_CAT_PLUGIN_INFO, "Preparing format: (none)");
GST_INFO ( "Preparing format: (none)");
}
snd_pcm_hw_params_alloca (&hw_params);
......@@ -2087,7 +2090,7 @@ gst_alsa_drain_audio (GstAlsa *this)
g_assert (this != NULL);
g_return_val_if_fail (this->handle != NULL, FALSE);
GST_DEBUG (GST_CAT_PLUGIN_INFO, "stopping alsa");
GST_DEBUG ("stopping alsa");
switch (snd_pcm_state (this->handle)) {
case SND_PCM_STATE_XRUN:
......@@ -2114,7 +2117,7 @@ gst_alsa_stop_audio (GstAlsa *this)
g_assert (this != NULL);
g_return_val_if_fail (this->handle != NULL, FALSE);
GST_DEBUG (GST_CAT_PLUGIN_INFO, "stopping alsa, skipping pending frames");
GST_DEBUG ("stopping alsa, skipping pending frames");
switch (snd_pcm_state (this->handle)) {
case SND_PCM_STATE_XRUN:
......@@ -2284,7 +2287,7 @@ gst_alsa_clock_wait (GstClock *clock, GstClockEntry *entry)
target = entry_time + diff;
GST_DEBUG (GST_CAT_CLOCK, "real_target %" G_GUINT64_FORMAT
GST_DEBUG ("real_target %" G_GUINT64_FORMAT
" target %" G_GUINT64_FORMAT
" now %" G_GUINT64_FORMAT,
target, GST_CLOCK_ENTRY_TIME (entry), entry_time);
......
......@@ -20,6 +20,9 @@
/* #define GST_DEBUG_ENABLED */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
......@@ -451,7 +454,7 @@ cdparanoia_get (GstPad *pad)
/* stop things apropriatly */
if (src->cur_sector > src->segment_end_sector) {
GST_DEBUG (0, "setting EOS");
GST_DEBUG ("setting EOS");
buf = GST_BUFFER (gst_event_new (GST_EVENT_EOS));
gst_element_set_eos (GST_ELEMENT (src));
......@@ -607,7 +610,7 @@ cdparanoia_open (CDParanoia *src)
g_return_val_if_fail (!GST_FLAG_IS_SET (src, CDPARANOIA_OPEN), FALSE);
GST_DEBUG_ENTER ("(\"%s\",...)", gst_element_get_name (GST_ELEMENT (src)));
GST_DEBUG_OBJECT (src, "trying to open device...");
/* find the device */
if (src->generic_device != NULL) {
......@@ -622,7 +625,7 @@ cdparanoia_open (CDParanoia *src)
/* fail if the device couldn't be found */
if (src->d == NULL) {
GST_DEBUG (0, "couldn't open device");
GST_DEBUG ("couldn't open device");
return FALSE;
}
......@@ -637,7 +640,7 @@ cdparanoia_open (CDParanoia *src)
/* open the disc */
if (cdda_open (src->d)) {
GST_DEBUG (0, "couldn't open disc");
GST_DEBUG ("couldn't open disc");
cdda_close (src->d);
src->d = NULL;
return FALSE;
......@@ -676,7 +679,7 @@ cdparanoia_open (CDParanoia *src)
/* create the paranoia struct and set it up */
src->p = paranoia_init (src->d);
if (src->p == NULL) {
GST_DEBUG (0, "couldn't create paranoia struct");
GST_DEBUG ("couldn't create paranoia struct");
return FALSE;
}
......@@ -692,7 +695,7 @@ cdparanoia_open (CDParanoia *src)
src->cur_sector = src->first_sector;
paranoia_seek (src->p, src->cur_sector, SEEK_SET);
GST_DEBUG (0, "successfully seek'd to beginning of disk");
GST_DEBUG ("successfully seek'd to beginning of disk");
GST_FLAG_SET (src, CDPARANOIA_OPEN);
......@@ -700,7 +703,7 @@ cdparanoia_open (CDParanoia *src)
add_index_associations (src);
}
GST_DEBUG_LEAVE ("");
GST_DEBUG_OBJECT (src, "device successfully openend");
return TRUE;
}
......@@ -818,7 +821,7 @@ cdparanoia_event (GstPad *pad, GstEvent *event)
}
if (!res) {
GST_DEBUG (0, "could not convert offsets to sectors");
GST_DEBUG ("could not convert offsets to sectors");
goto error;
}
......@@ -851,7 +854,7 @@ cdparanoia_event (GstPad *pad, GstEvent *event)
src->first_sector, src->last_sector);
if (paranoia_seek (src->p, seg_start_sector, SEEK_SET) > -1) {
GST_DEBUG (0, "seeked to %" G_GINT64_FORMAT, seg_start_sector);
GST_DEBUG ("seeked to %" G_GINT64_FORMAT, seg_start_sector);
src->segment_start_sector = seg_start_sector;;
src->cur_sector = src->segment_start_sector;
......@@ -865,7 +868,7 @@ cdparanoia_event (GstPad *pad, GstEvent *event)
src->first_sector, src->last_sector);
src->segment_end_sector = seg_end_sector;;
}
GST_DEBUG (GST_CAT_PLUGIN_INFO, "configured for %d -> %d sectors\n",
GST_DEBUG ("configured for %d -> %d sectors\n",
src->segment_start_sector,
src->segment_end_sector);
break;
......
......@@ -22,6 +22,9 @@
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <gst/gst.h>
#include <libgnomevfs/gnome-vfs.h>
#include <string.h>
......@@ -256,7 +259,7 @@ gst_gnomevfssink_open_file (GstGnomeVFSSink *sink)
GNOME_VFS_OPEN_WRITE, sink->erase,
GNOME_VFS_PERM_USER_READ | GNOME_VFS_PERM_USER_WRITE
| GNOME_VFS_PERM_GROUP_READ);
GST_DEBUG (0, "open: %s", gnome_vfs_result_to_string(result));
GST_DEBUG ("open: %s", gnome_vfs_result_to_string(result));
if (result != GNOME_VFS_OK) {
if (sink->erase == FALSE) {
g_signal_emit (G_OBJECT (sink),
......@@ -318,7 +321,7 @@ gst_gnomevfssink_chain (GstPad *pad, GstBuffer *buf)
if (GST_FLAG_IS_SET (sink, GST_GNOMEVFSSINK_OPEN))
{
result = gnome_vfs_write(sink->handle, GST_BUFFER_DATA(buf), GST_BUFFER_SIZE (buf), &bytes_written);
GST_DEBUG (0, "write: %s, written_bytes: %" G_GUINT64_FORMAT, gnome_vfs_result_to_string(result), bytes_written);
GST_DEBUG ("write: %s, written_bytes: %" G_GUINT64_FORMAT, gnome_vfs_result_to_string(result), bytes_written);
if (bytes_written < GST_BUFFER_SIZE (buf))
{
printf ("gnomevfssink : Warning : %d bytes should be written, only %" G_GUINT64_FORMAT " bytes written\n",
......
......@@ -26,6 +26,10 @@
#define BROKEN_SIG 1
/*#undef BROKEN_SIG */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/time.h>
......@@ -486,7 +490,7 @@ static int audiocast_init(GstGnomeVFSSrc *src)
GError *error = NULL;
if (!src->iradio_mode)
return TRUE;
GST_DEBUG (0,"audiocast: registering listener");
GST_DEBUG ("audiocast: registering listener");
if (audiocast_register_listener(&src->audiocast_port, &src->audiocast_fd) < 0)
{
gst_element_error(GST_ELEMENT(src),
......@@ -496,7 +500,7 @@ static int audiocast_init(GstGnomeVFSSrc *src)
close(src->audiocast_fd);
return FALSE;
}
GST_DEBUG (0,"audiocast: creating pipe");
GST_DEBUG ("audiocast: creating pipe");
src->audiocast_notify_queue = NULL;
if (pipe(pipefds) < 0)
{
......@@ -505,7 +509,7 @@ static int audiocast_init(GstGnomeVFSSrc *src)
}
src->audiocast_thread_die_infd = pipefds[0];
src->audiocast_thread_die_outfd = pipefds[1];
GST_DEBUG (0,"audiocast: creating audiocast thread");
GST_DEBUG ("audiocast: creating audiocast thread");
src->audiocast_thread = g_thread_create((GThreadFunc) audiocast_thread_run, src, TRUE, &error);
if (error != NULL) {
gst_element_error(GST_ELEMENT(src),
......@@ -524,7 +528,7 @@ static int audiocast_register_listener(gint *port, gint *fd)
int sock;
socklen_t sinlen = sizeof (struct sockaddr_in);
GST_DEBUG (0,"audiocast: estabilishing UDP listener");
GST_DEBUG ("audiocast: estabilishing UDP listener");
if ((sock = socket(AF_INET, SOCK_DGRAM, 0)) < 0)
goto lose;
......@@ -540,7 +544,7 @@ static int audiocast_register_listener(gint *port, gint *fd)
if (getsockname(sock, (struct sockaddr *)&sin, &sinlen) < 0)
goto lose_and_close;
GST_DEBUG (0,"audiocast: listening on local %s:%d", inet_ntoa(sin.sin_addr), g_ntohs(sin.sin_port));
GST_DEBUG ("audiocast: listening on local %s:%d", inet_ntoa(sin.sin_addr), g_ntohs(sin.sin_port));
*port = g_ntohs(sin.sin_port);
*fd = sock;
......@@ -582,7 +586,7 @@ static gpointer audiocast_thread_run(GstGnomeVFSSrc *src)
while (1)
{
GST_DEBUG (0,"audiocast thread: dropping into select");
GST_DEBUG ("audiocast thread: dropping into select");
readset = fdset;
if (select(FD_SETSIZE, &readset, NULL, NULL, NULL) < 0) {
perror("select");
......@@ -590,13 +594,13 @@ static gpointer audiocast_thread_run(GstGnomeVFSSrc *src)
}
if (FD_ISSET(src->audiocast_thread_die_infd, &readset)) {
char buf[1];
GST_DEBUG (0,"audiocast thread: got die character");
GST_DEBUG ("audiocast thread: got die character");
read(src->audiocast_thread_die_infd, buf, 1);
close(src->audiocast_thread_die_infd);
close(src->audiocast_fd);
return NULL;
}
GST_DEBUG (0,"audiocast thread: reading data");
GST_DEBUG ("audiocast thread: reading data");
len = recvfrom(src->audiocast_fd, buf, sizeof(buf) - 1, 0, (struct sockaddr *) &from, &fromlen);
if (len < 0 && errno == EAGAIN)
continue;
......@@ -640,7 +644,7 @@ static gpointer audiocast_thread_run(GstGnomeVFSSrc *src)
g_mutex_lock(src->audiocast_queue_mutex);
src->audiocast_notify_queue = g_list_append(src->audiocast_notify_queue, "iradio-title");
GST_DEBUG(0,"audiocast title: %s\n", src->iradio_title);
GST_DEBUG ("audiocast title: %s\n", src->iradio_title);
g_mutex_unlock(src->audiocast_queue_mutex);
} else if (!strncmp(lines[i], "x-audiocast-streamurl", 21)) {
g_mutex_lock(src->audiocast_udpdata_mutex);
......@@ -650,7 +654,7 @@ static gpointer audiocast_thread_run(GstGnomeVFSSrc *src)
g_mutex_lock(src->audiocast_queue_mutex);
src->audiocast_notify_queue = g_list_append(src->audiocast_notify_queue, "iradio-url");
GST_DEBUG(0,"audiocast url: %s\n", src->iradio_title);
GST_DEBUG ("audiocast url: %s\n", src->iradio_title);
g_mutex_unlock(src->audiocast_queue_mutex);
} else if (!strncmp(lines[i], "x-audiocast-udpseqnr", 20)) {
gchar outbuf[120];
......@@ -662,7 +666,7 @@ static gpointer audiocast_thread_run(GstGnomeVFSSrc *src)
g_print("Error sending response to server: %s\n", strerror(errno));
continue;
}
GST_DEBUG(0,"sent audiocast ack: %s\n", outbuf);
GST_DEBUG ("sent audiocast ack: %s\n", outbuf);
}
}
g_strfreev(lines);
......@@ -682,10 +686,10 @@ static void audiocast_thread_kill(GstGnomeVFSSrc *src)
metadata, then we don't need the
audiocast metadata too.
*/
GST_DEBUG (0,"audiocast: writing die character");
GST_DEBUG ("audiocast: writing die character");
write(src->audiocast_thread_die_outfd, "q", 1);
close(src->audiocast_thread_die_outfd);
GST_DEBUG (0,"audiocast: joining thread");
GST_DEBUG ("audiocast: joining thread");
g_thread_join(src->audiocast_thread);
src->audiocast_thread = NULL;
}
......@@ -703,7 +707,7 @@ gst_gnomevfssrc_send_additional_headers_callback (gconstpointer in,
if (!src->iradio_mode)
return;
GST_DEBUG(0,"sending headers\n");
GST_DEBUG ("sending headers\n");
out_args->headers = g_list_append (out_args->headers,
g_strdup ("icy-metadata:1\r\n"));
......@@ -745,7 +749,7 @@ gst_gnomevfssrc_received_headers_callback (gconstpointer in,
{
sscanf (data + 12, "%d", &icy_metaint);
src->icy_metaint = icy_metaint;
GST_DEBUG (0,"got icy-metaint %d, killing audiocast thread",
GST_DEBUG ("got icy-metaint %d, killing audiocast thread",
src->icy_metaint);
audiocast_thread_kill(src);
continue;
......@@ -758,7 +762,7 @@ gst_gnomevfssrc_received_headers_callback (gconstpointer in,
else
continue;
GST_DEBUG (0,"key: %s", key);
GST_DEBUG ("key: %s", key);
if (!strncmp (key, "name", 4)) {
g_free (src->iradio_name);
src->iradio_name = gst_gnomevfssrc_unicodify (value);
......@@ -784,7 +788,7 @@ gst_gnomevfssrc_push_callbacks (GstGnomeVFSSrc *gnomevfssrc)
if (gnomevfssrc->http_callbacks_pushed)
return;
GST_DEBUG (0,"pushing callbacks");
GST_DEBUG ("pushing callbacks");
gnome_vfs_module_callback_push (GNOME_VFS_MODULE_CALLBACK_HTTP_SEND_ADDITIONAL_HEADERS,
gst_gnomevfssrc_send_additional_headers_callback,
gnomevfssrc,
......@@ -803,7 +807,7 @@ gst_gnomevfssrc_pop_callbacks (GstGnomeVFSSrc *gnomevfssrc)
if (!gnomevfssrc->http_callbacks_pushed)
return;
GST_DEBUG (0,"popping callbacks");
GST_DEBUG ("popping callbacks");
gnome_vfs_module_callback_pop (GNOME_VFS_MODULE_CALLBACK_HTTP_SEND_ADDITIONAL_HEADERS);
gnome_vfs_module_callback_pop (GNOME_VFS_MODULE_CALLBACK_HTTP_RECEIVED_HEADERS);
}
......@@ -820,7 +824,7 @@ gst_gnomevfssrc_get_icy_metadata (GstGnomeVFSSrc *src)
gchar **tags;
int i;
GST_DEBUG (0,"reading icecast metadata");
GST_DEBUG ("reading icecast metadata");
while (length == 0) {
res = gnome_vfs_read (src->handle, &foobyte, 1, &length);
......@@ -860,7 +864,7 @@ gst_gnomevfssrc_get_icy_metadata (GstGnomeVFSSrc *src)
src->iradio_title = gst_gnomevfssrc_unicodify (tags[i]+13);
if (src->iradio_title)
{
GST_DEBUG(0, "sending notification on icecast title");
GST_DEBUG ("sending notification on icecast title");
g_object_notify (G_OBJECT (src), "iradio-title");
}
else
......@@ -874,7 +878,7 @@ gst_gnomevfssrc_get_icy_metadata (GstGnomeVFSSrc *src)
src->iradio_url = gst_gnomevfssrc_unicodify (tags[i]+11);
if (src->iradio_url)
{
GST_DEBUG(0, "sending notification on icecast url");
GST_DEBUG ("sending notification on icecast url");
g_object_notify (G_OBJECT (src), "iradio-url");
}
else
......@@ -931,7 +935,7 @@ static GstBuffer *gst_gnomevfssrc_get(GstPad *pad)
* bytes of data so that mp3 typefinding will work. */
do
{
GST_DEBUG (0,"doing read: icy_count: %" G_GINT64_FORMAT, src->icy_count);
GST_DEBUG ("doing read: icy_count: %" G_GINT64_FORMAT, src->icy_count);
result = gnome_vfs_read (src->handle, data,
src->icy_metaint - src->icy_count,
&readbytes);
......@@ -968,10 +972,10 @@ static GstBuffer *gst_gnomevfssrc_get(GstPad *pad)
GstEvent *event;
gst_buffer_unref (buf);
GST_DEBUG (0,"new seek %" G_GINT64_FORMAT, src->curoffset);
GST_DEBUG ("new seek %" G_GINT64_FORMAT, src->curoffset);
src->new_seek = FALSE;
GST_DEBUG (GST_CAT_EVENT, "gnomevfssrc sending discont");
GST_DEBUG ("gnomevfssrc sending discont");
event = gst_event_new_discontinuous (FALSE, GST_FORMAT_BYTES, src->curoffset, NULL);
src->need_flush = FALSE;
......@@ -981,7 +985,7 @@ static GstBuffer *gst_gnomevfssrc_get(GstPad *pad)
result = gnome_vfs_read(src->handle, GST_BUFFER_DATA(buf),
src->bytes_per_read, &readbytes);
GST_DEBUG(0, "read: %s, readbytes: %" G_GINT64_FORMAT,
GST_DEBUG ("read: %s, readbytes: %" G_GINT64_FORMAT,
gnome_vfs_result_to_string(result), readbytes);
/* deal with EOS */
if (readbytes == 0)
......@@ -1048,15 +1052,15 @@ static gboolean gst_gnomevfssrc_open_file(GstGnomeVFSSrc *src)
src->size = info->size;
}
else
GST_DEBUG (0, "getting info failed: %s", gnome_vfs_result_to_string (result));
GST_DEBUG ("getting info failed: %s", gnome_vfs_result_to_string (result));
gnome_vfs_file_info_unref(info);
GST_DEBUG(0, "size %" G_GINT64_FORMAT, src->size);
GST_DEBUG ("size %" G_GINT64_FORMAT, src->size);
audiocast_do_notifications(src);
GST_DEBUG(0, "open result: %s", gnome_vfs_result_to_string (result));
GST_DEBUG ("open result: %s", gnome_vfs_result_to_string (result));
src->in_first_get = TRUE;
......@@ -1188,7 +1192,7 @@ gst_gnomevfssrc_srcpad_event (GstPad *pad, GstEvent *event)
result = gnome_vfs_seek(src->handle,
GNOME_VFS_SEEK_START, desired_offset);
GST_DEBUG(0, "new_seek: %s",
GST_DEBUG ("new_seek: %s",
gnome_vfs_result_to_string(result));
if (result != GNOME_VFS_OK) {
......
......@@ -17,6 +17,9 @@
* Boston, MA 02111-1307, USA.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <string.h>
#include <sys/soundcard.h>
......@@ -156,7 +159,7 @@ gst_vorbisdec_pull (VorbisDec * vorbisdec, ogg_sync_state * oy)
GstBuffer *buf;
do {
GST_DEBUG (0, "vorbisdec: pull ");
GST_DEBUG ("vorbisdec: pull ");
buf = gst_pad_pull (vorbisdec->sinkpad);
......@@ -176,7 +179,7 @@ gst_vorbisdec_pull (VorbisDec * vorbisdec, ogg_sync_state * oy)
} while (buf == NULL);
end:
GST_DEBUG (0, "vorbisdec: pull done");
GST_DEBUG ("vorbisdec: pull done");
return buf;
}
......@@ -221,7 +224,7 @@ gst_vorbisdec_loop (GstElement * element)
buf = gst_vorbisdec_pull (vorbisdec, &oy);
if (!buf) {
eos = 1;
GST_DEBUG (0, "vorbisdec: pulled NULL");
GST_DEBUG ("vorbisdec: pulled NULL");
break;
}
......@@ -440,9 +443,9 @@ gst_vorbisdec_loop (GstElement * element)
}
}
GST_DEBUG (0, "vorbisdec: push");
GST_DEBUG ("vorbisdec: push");
gst_pad_push (vorbisdec->srcpad, outbuf);
GST_DEBUG (0, "vorbisdec: push done");
GST_DEBUG ("vorbisdec: push done");
vorbis_synthesis_read (&vd, bout); /* tell libvorbis how
many samples we
......@@ -452,7 +455,7 @@ gst_vorbisdec_loop (GstElement * element)
}
if (ogg_page_eos (&og)) {
eos = 1;
GST_DEBUG (0, "vorbisdec: page_eos");
GST_DEBUG ("vorbisdec: page_eos");
}
}
}
......@@ -469,17 +472,17 @@ gst_vorbisdec_loop (GstElement * element)
ogg_sync_wrote (&oy, bytes);
if (bytes == 0) {
eos = 1;
GST_DEBUG (0, "vorbisdec: wrote 0 bytes");
GST_DEBUG ("vorbisdec: wrote 0 bytes");
}
}
else {
eos = 1;
GST_DEBUG (0, "vorbisdec: pulled NULL");
GST_DEBUG ("vorbisdec: pulled NULL");
}
}
}
GST_DEBUG (0, "vorbisdec: eos flag set");
GST_DEBUG ("vorbisdec: eos flag set");
/* clean up this logical bitstream; before exit we see if we're
followed by another [chained] */
......@@ -493,7 +496,7 @@ gst_vorbisdec_loop (GstElement * element)
vorbis_info_clear (&vorbisdec->vi); /* must be called last */
}
end:
GST_DEBUG (0, "vorbisdec: in end");
GST_DEBUG ("vorbisdec: in end");
gst_pad_push (vorbisdec->srcpad, GST_BUFFER (gst_event_new (GST_EVENT_EOS)));
gst_element_set_eos (GST_ELEMENT (vorbisdec));
......
......@@ -18,6 +18,9 @@
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <stdlib.h>
#include <string.h>
#include <time.h>
......@@ -647,7 +650,7 @@ gst_vorbisenc_write_page (VorbisEnc *vorbisenc, ogg_page *page)
page->body,
page->body_len);
GST_DEBUG (0, "vorbisenc: encoded buffer of %d bytes",
GST_DEBUG ("vorbisenc: encoded buffer of %d bytes",
GST_BUFFER_SIZE (outbuf));
vorbisenc->bytes_out += GST_BUFFER_SIZE (outbuf);
......
......@@ -17,6 +17,9 @@
* Boston, MA 02111-1307, USA.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <string.h>
#include <gst/gst.h>
#include <vorbis/codec.h>
......@@ -240,7 +243,7 @@ gst_vorbisfile_read (void *ptr, size_t size, size_t nmemb, void *datasource)
VorbisFile *vorbisfile = GST_VORBISFILE (datasource);
GST_DEBUG (0, "read %d", read_size);
GST_DEBUG ("read %d", read_size);
/* make sure we don't go to EOS */
if (!vorbisfile->may_eos && vorbisfile->total_bytes &&
......@@ -255,7 +258,7 @@ gst_vorbisfile_read (void *ptr, size_t size, size_t nmemb, void *datasource)
do {
got_bytes = gst_bytestream_peek_bytes (vorbisfile->bs, &data, read_size);
GST_DEBUG (0, "peek returned %d", got_bytes);
GST_DEBUG ("peek returned %d", got_bytes);
if (got_bytes == 0) {
GstEvent *event;
......@@ -265,22 +268,22 @@ gst_vorbisfile_read (void *ptr, size_t size, size_t nmemb, void *datasource)
switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_EOS:
GST_DEBUG (0, "eos");
GST_DEBUG ("eos");
vorbisfile->eos = TRUE;
gst_event_unref (event);
goto done;
case GST_EVENT_DISCONTINUOUS:
GST_DEBUG (0, "discont");
GST_DEBUG ("discont");
vorbisfile->need_discont = TRUE;
default:
GST_DEBUG (0, "unknown event %d", GST_EVENT_TYPE (event));
GST_DEBUG ("unknown event %d", GST_EVENT_TYPE (event));
break;
}
gst_event_unref (event);
}
} while (got_bytes == 0);
GST_DEBUG (0, "read %d got %d bytes", read_size, got_bytes);
GST_DEBUG ("read %d got %d bytes", read_size, got_bytes);
memcpy (ptr, data, got_bytes);
gst_bytestream_flush_fast (vorbisfile->bs, got_bytes);
......@@ -303,7 +306,7 @@ gst_vorbisfile_seek (void *datasource, int64_t offset, int whence)
return -1;
}
GST_DEBUG (0, "seek %" G_GINT64_FORMAT " %d", offset, whence);
GST_DEBUG ("seek %" G_GINT64_FORMAT " %d", offset, whence);
if (whence == SEEK_SET) {
method = GST_SEEK_METHOD_SET;
......@@ -335,7 +338,7 @@ gst_vorbisfile_seek (void *datasource, int64_t offset, int whence)
static int
gst_vorbisfile_close (void *datasource)
{
GST_DEBUG (0, "close");
GST_DEBUG ("close");
return 0;
}
......@@ -347,7 +350,7 @@ gst_vorbisfile_tell (void *datasource)
result = gst_bytestream_tell (vorbisfile->bs);
GST_DEBUG (0, "tell %ld", result);
GST_DEBUG ("tell %ld", result);
return result;
}
......@@ -501,7 +504,7 @@ gst_vorbisfile_loop (GstElement *element)
vorbisfile->may_eos = FALSE;
vorbisfile->vf.seekable = gst_bytestream_seek (vorbisfile->bs, 0,
GST_SEEK_METHOD_SET);
GST_DEBUG (GST_CAT_PLUGIN_INFO, "vorbisfile: seekable: %s",
GST_DEBUG ("vorbisfile: seekable: %s",
vorbisfile->vf.seekable ? "yes" : "no");
/* open our custom vorbisfile data object with the callbacks we provide */
......@@ -583,7 +586,7 @@ gst_vorbisfile_loop (GstElement *element)
sizeof (gint16), 1, &link);
if (ret == 0) {
GST_DEBUG (0, "eos");
GST_DEBUG ("eos");
/* send EOS event */
/*ov_clear (&vorbisfile->vf);*/
vorbisfile->restart = TRUE;
......@@ -958,11 +961,11 @@ gst_vorbisfile_src_event (GstPad *pad, GstEvent *event)
vorbis_info *vi;
GstFormat format;
GST_DEBUG (GST_CAT_EVENT, "vorbisfile: handling seek event on pad %s:%s",
GST_DEBUG ("vorbisfile: handling seek event on pad %s:%s",
GST_DEBUG_PAD_NAME (pad));
if (!vorbisfile->vf.seekable) {
gst_event_unref (event);
GST_DEBUG (GST_CAT_EVENT, "vorbis stream is not seekable");
GST_DEBUG ("vorbis stream is not seekable");
return FALSE;
}
......@@ -980,7 +983,7 @@ gst_vorbisfile_src_event (GstPad *pad, GstEvent *event)
case GST_FORMAT_BYTES:
vi = ov_info (&vorbisfile->vf, -1);
if (vi->channels == 0) {
GST_DEBUG (GST_CAT_EVENT, "vorbis stream has 0 channels ?");
GST_DEBUG ("vorbis stream has 0 channels ?");
res = FALSE;
goto done;
}
......@@ -1003,7 +1006,7 @@ gst_vorbisfile_src_event (GstPad *pad, GstEvent *event)
}
else
{
GST_DEBUG (GST_CAT_EVENT, "unhandled seek format");
GST_DEBUG ("unhandled seek format");
res = FALSE;
}
break;
......
D2003.06.09.22.00.00
2003-06-09 22:00 GMT
......@@ -53,38 +53,38 @@ GstIDCT *gst_idct_new(GstIDCTMethod method)
switch (method) {
case GST_IDCT_FAST_INT:
GST_INFO (GST_CAT_PLUGIN_INFO, "using fast_int_idct");
GST_INFO ( "using fast_int_idct");
gst_idct_init_fast_int_idct();
new->convert = gst_idct_fast_int_idct;
break;
case GST_IDCT_INT:
GST_INFO (GST_CAT_PLUGIN_INFO, "using int_idct");
GST_INFO ( "using int_idct");
new->convert = gst_idct_int_idct;
break;
case GST_IDCT_FLOAT:
GST_INFO (GST_CAT_PLUGIN_INFO, "using float_idct");
GST_INFO ( "using float_idct");
gst_idct_init_float_idct();
new->convert = gst_idct_float_idct;
break