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.
This commit is contained in:
Benjamin Otte 2003-06-29 19:46:12 +00:00
parent d528c24b5b
commit ffa5706370
33 changed files with 249 additions and 192 deletions

2
common

@ -1 +1 @@
Subproject commit 4e379694ae9ff9843d65cf08928642eea44abdf8 Subproject commit 2a3efdc282fb1ecfd2720dea40523b3441f10fed

View file

@ -968,8 +968,6 @@ dnl ######################################################################
dnl # Check command line parameters, and set shell variables accordingly # dnl # Check command line parameters, and set shell variables accordingly #
dnl ###################################################################### dnl ######################################################################
GST_DEBUGINFO
AC_ARG_ENABLE(libmmx, AC_ARG_ENABLE(libmmx,
AC_HELP_STRING([--enable-libmmx],[use libmmx, if available]), AC_HELP_STRING([--enable-libmmx],[use libmmx, if available]),
[case "${enableval}" in [case "${enableval}" in

View file

@ -19,6 +19,9 @@
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <sys/time.h> #include <sys/time.h>
#include "gstalsa.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++) { for (i = 0; i < GST_ELEMENT (src)->numpads; i++) {
all_caps = gst_caps_intersect (all_caps, gst_pad_get_caps (this->pad[i])); all_caps = gst_caps_intersect (all_caps, gst_pad_get_caps (this->pad[i]));
if (all_caps == NULL) { 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; return FALSE;
} }
} }
@ -1054,7 +1057,7 @@ gst_alsa_src_set_caps (GstAlsaSrc *src, gboolean aggressive)
gst_caps_set (caps, "rate", GST_PROPS_INT (rate)); gst_caps_set (caps, "rate", GST_PROPS_INT (rate));
for (channels = aggressive ? max_channels : MIN (max_channels, 2); channels >= min_channels; channels--) { for (channels = aggressive ? max_channels : MIN (max_channels, 2); channels >= min_channels; channels--) {
gst_caps_set (caps, "channels", GST_PROPS_INT (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); law, sign ? "" : "un", endian, width, depth, channels, rate);
if (gst_pad_try_set_caps (this->pad[0], caps) != GST_PAD_LINK_REFUSED) if (gst_pad_try_set_caps (this->pad[0], caps) != GST_PAD_LINK_REFUSED)
gst_alsa_link (this->pad[0], caps); gst_alsa_link (this->pad[0], caps);
@ -1534,7 +1537,7 @@ gst_alsa_link (GstPad *pad, GstCaps *caps)
if (format == NULL) if (format == NULL)
return GST_PAD_LINK_DELAYED; 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)) { if (!GST_FLAG_IS_SET (this, GST_ALSA_CAPS_NEGO)) {
gint i; gint i;
@ -1813,7 +1816,7 @@ gst_alsa_pcm_wait (GstAlsa *this)
if ((err = snd_pcm_wait (this->handle, 1000)) < 0) { if ((err = snd_pcm_wait (this->handle, 1000)) < 0) {
if (err == EINTR) { if (err == EINTR) {
/* happens mostly when run under gdb, or when exiting due to a signal */ /* 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))) { if (gst_element_interrupt (GST_ELEMENT (this))) {
return TRUE; return TRUE;
} else { } else {
@ -1834,7 +1837,7 @@ gst_alsa_pcm_wait (GstAlsa *this)
inline static gboolean inline static gboolean
gst_alsa_start (GstAlsa *this) 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)) { switch (snd_pcm_state(this->handle)) {
case SND_PCM_STATE_XRUN: case SND_PCM_STATE_XRUN:
@ -1916,7 +1919,7 @@ gst_alsa_open_audio (GstAlsa *this)
g_assert (this != NULL); g_assert (this != NULL);
g_assert (this->handle == 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_CHECK (snd_output_stdio_attach (&this->out, stderr, 0),
"error opening log output: %s"); "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 (this != NULL, FALSE);
g_return_val_if_fail (format != 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_format_name (format->format), format->rate, format->channels);
snd_pcm_hw_params_alloca (&hw_params); 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); g_return_val_if_fail (this->handle != NULL, FALSE);
if (this->format) { 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); snd_pcm_format_name (this->format->format), this->format->rate, this->format->channels);
} else { } else {
GST_INFO (GST_CAT_PLUGIN_INFO, "Preparing format: (none)"); GST_INFO ( "Preparing format: (none)");
} }
snd_pcm_hw_params_alloca (&hw_params); snd_pcm_hw_params_alloca (&hw_params);
@ -2087,7 +2090,7 @@ gst_alsa_drain_audio (GstAlsa *this)
g_assert (this != NULL); g_assert (this != NULL);
g_return_val_if_fail (this->handle != NULL, FALSE); 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)) { switch (snd_pcm_state (this->handle)) {
case SND_PCM_STATE_XRUN: case SND_PCM_STATE_XRUN:
@ -2114,7 +2117,7 @@ gst_alsa_stop_audio (GstAlsa *this)
g_assert (this != NULL); g_assert (this != NULL);
g_return_val_if_fail (this->handle != NULL, FALSE); 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)) { switch (snd_pcm_state (this->handle)) {
case SND_PCM_STATE_XRUN: case SND_PCM_STATE_XRUN:
@ -2284,7 +2287,7 @@ gst_alsa_clock_wait (GstClock *clock, GstClockEntry *entry)
target = entry_time + diff; 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 " target %" G_GUINT64_FORMAT
" now %" G_GUINT64_FORMAT, " now %" G_GUINT64_FORMAT,
target, GST_CLOCK_ENTRY_TIME (entry), entry_time); target, GST_CLOCK_ENTRY_TIME (entry), entry_time);

View file

@ -20,6 +20,9 @@
/* #define GST_DEBUG_ENABLED */ /* #define GST_DEBUG_ENABLED */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
@ -451,7 +454,7 @@ cdparanoia_get (GstPad *pad)
/* stop things apropriatly */ /* stop things apropriatly */
if (src->cur_sector > src->segment_end_sector) { 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)); buf = GST_BUFFER (gst_event_new (GST_EVENT_EOS));
gst_element_set_eos (GST_ELEMENT (src)); 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); 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 */ /* find the device */
if (src->generic_device != NULL) { if (src->generic_device != NULL) {
@ -622,7 +625,7 @@ cdparanoia_open (CDParanoia *src)
/* fail if the device couldn't be found */ /* fail if the device couldn't be found */
if (src->d == NULL) { if (src->d == NULL) {
GST_DEBUG (0, "couldn't open device"); GST_DEBUG ("couldn't open device");
return FALSE; return FALSE;
} }
@ -637,7 +640,7 @@ cdparanoia_open (CDParanoia *src)
/* open the disc */ /* open the disc */
if (cdda_open (src->d)) { if (cdda_open (src->d)) {
GST_DEBUG (0, "couldn't open disc"); GST_DEBUG ("couldn't open disc");
cdda_close (src->d); cdda_close (src->d);
src->d = NULL; src->d = NULL;
return FALSE; return FALSE;
@ -676,7 +679,7 @@ cdparanoia_open (CDParanoia *src)
/* create the paranoia struct and set it up */ /* create the paranoia struct and set it up */
src->p = paranoia_init (src->d); src->p = paranoia_init (src->d);
if (src->p == NULL) { if (src->p == NULL) {
GST_DEBUG (0, "couldn't create paranoia struct"); GST_DEBUG ("couldn't create paranoia struct");
return FALSE; return FALSE;
} }
@ -692,7 +695,7 @@ cdparanoia_open (CDParanoia *src)
src->cur_sector = src->first_sector; src->cur_sector = src->first_sector;
paranoia_seek (src->p, src->cur_sector, SEEK_SET); 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); GST_FLAG_SET (src, CDPARANOIA_OPEN);
@ -700,7 +703,7 @@ cdparanoia_open (CDParanoia *src)
add_index_associations (src); add_index_associations (src);
} }
GST_DEBUG_LEAVE (""); GST_DEBUG_OBJECT (src, "device successfully openend");
return TRUE; return TRUE;
} }
@ -818,7 +821,7 @@ cdparanoia_event (GstPad *pad, GstEvent *event)
} }
if (!res) { if (!res) {
GST_DEBUG (0, "could not convert offsets to sectors"); GST_DEBUG ("could not convert offsets to sectors");
goto error; goto error;
} }
@ -851,7 +854,7 @@ cdparanoia_event (GstPad *pad, GstEvent *event)
src->first_sector, src->last_sector); src->first_sector, src->last_sector);
if (paranoia_seek (src->p, seg_start_sector, SEEK_SET) > -1) { 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->segment_start_sector = seg_start_sector;;
src->cur_sector = src->segment_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->first_sector, src->last_sector);
src->segment_end_sector = seg_end_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_start_sector,
src->segment_end_sector); src->segment_end_sector);
break; break;

View file

@ -22,6 +22,9 @@
*/ */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <gst/gst.h> #include <gst/gst.h>
#include <libgnomevfs/gnome-vfs.h> #include <libgnomevfs/gnome-vfs.h>
#include <string.h> #include <string.h>
@ -256,7 +259,7 @@ gst_gnomevfssink_open_file (GstGnomeVFSSink *sink)
GNOME_VFS_OPEN_WRITE, sink->erase, GNOME_VFS_OPEN_WRITE, sink->erase,
GNOME_VFS_PERM_USER_READ | GNOME_VFS_PERM_USER_WRITE GNOME_VFS_PERM_USER_READ | GNOME_VFS_PERM_USER_WRITE
| GNOME_VFS_PERM_GROUP_READ); | 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 (result != GNOME_VFS_OK) {
if (sink->erase == FALSE) { if (sink->erase == FALSE) {
g_signal_emit (G_OBJECT (sink), 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)) 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); 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)) if (bytes_written < GST_BUFFER_SIZE (buf))
{ {
printf ("gnomevfssink : Warning : %d bytes should be written, only %" G_GUINT64_FORMAT " bytes written\n", printf ("gnomevfssink : Warning : %d bytes should be written, only %" G_GUINT64_FORMAT " bytes written\n",

View file

@ -26,6 +26,10 @@
#define BROKEN_SIG 1 #define BROKEN_SIG 1
/*#undef BROKEN_SIG */ /*#undef BROKEN_SIG */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <sys/types.h> #include <sys/types.h>
#include <sys/socket.h> #include <sys/socket.h>
#include <sys/time.h> #include <sys/time.h>
@ -486,7 +490,7 @@ static int audiocast_init(GstGnomeVFSSrc *src)
GError *error = NULL; GError *error = NULL;
if (!src->iradio_mode) if (!src->iradio_mode)
return TRUE; return TRUE;
GST_DEBUG (0,"audiocast: registering listener"); GST_DEBUG ("audiocast: registering listener");
if (audiocast_register_listener(&src->audiocast_port, &src->audiocast_fd) < 0) if (audiocast_register_listener(&src->audiocast_port, &src->audiocast_fd) < 0)
{ {
gst_element_error(GST_ELEMENT(src), gst_element_error(GST_ELEMENT(src),
@ -496,7 +500,7 @@ static int audiocast_init(GstGnomeVFSSrc *src)
close(src->audiocast_fd); close(src->audiocast_fd);
return FALSE; return FALSE;
} }
GST_DEBUG (0,"audiocast: creating pipe"); GST_DEBUG ("audiocast: creating pipe");
src->audiocast_notify_queue = NULL; src->audiocast_notify_queue = NULL;
if (pipe(pipefds) < 0) 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_infd = pipefds[0];
src->audiocast_thread_die_outfd = pipefds[1]; 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); src->audiocast_thread = g_thread_create((GThreadFunc) audiocast_thread_run, src, TRUE, &error);
if (error != NULL) { if (error != NULL) {
gst_element_error(GST_ELEMENT(src), gst_element_error(GST_ELEMENT(src),
@ -524,7 +528,7 @@ static int audiocast_register_listener(gint *port, gint *fd)
int sock; int sock;
socklen_t sinlen = sizeof (struct sockaddr_in); 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) if ((sock = socket(AF_INET, SOCK_DGRAM, 0)) < 0)
goto lose; goto lose;
@ -540,7 +544,7 @@ static int audiocast_register_listener(gint *port, gint *fd)
if (getsockname(sock, (struct sockaddr *)&sin, &sinlen) < 0) if (getsockname(sock, (struct sockaddr *)&sin, &sinlen) < 0)
goto lose_and_close; 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); *port = g_ntohs(sin.sin_port);
*fd = sock; *fd = sock;
@ -582,7 +586,7 @@ static gpointer audiocast_thread_run(GstGnomeVFSSrc *src)
while (1) while (1)
{ {
GST_DEBUG (0,"audiocast thread: dropping into select"); GST_DEBUG ("audiocast thread: dropping into select");
readset = fdset; readset = fdset;
if (select(FD_SETSIZE, &readset, NULL, NULL, NULL) < 0) { if (select(FD_SETSIZE, &readset, NULL, NULL, NULL) < 0) {
perror("select"); perror("select");
@ -590,13 +594,13 @@ static gpointer audiocast_thread_run(GstGnomeVFSSrc *src)
} }
if (FD_ISSET(src->audiocast_thread_die_infd, &readset)) { if (FD_ISSET(src->audiocast_thread_die_infd, &readset)) {
char buf[1]; 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); read(src->audiocast_thread_die_infd, buf, 1);
close(src->audiocast_thread_die_infd); close(src->audiocast_thread_die_infd);
close(src->audiocast_fd); close(src->audiocast_fd);
return NULL; 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); len = recvfrom(src->audiocast_fd, buf, sizeof(buf) - 1, 0, (struct sockaddr *) &from, &fromlen);
if (len < 0 && errno == EAGAIN) if (len < 0 && errno == EAGAIN)
continue; continue;
@ -640,7 +644,7 @@ static gpointer audiocast_thread_run(GstGnomeVFSSrc *src)
g_mutex_lock(src->audiocast_queue_mutex); g_mutex_lock(src->audiocast_queue_mutex);
src->audiocast_notify_queue = g_list_append(src->audiocast_notify_queue, "iradio-title"); 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); g_mutex_unlock(src->audiocast_queue_mutex);
} else if (!strncmp(lines[i], "x-audiocast-streamurl", 21)) { } else if (!strncmp(lines[i], "x-audiocast-streamurl", 21)) {
g_mutex_lock(src->audiocast_udpdata_mutex); 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); g_mutex_lock(src->audiocast_queue_mutex);
src->audiocast_notify_queue = g_list_append(src->audiocast_notify_queue, "iradio-url"); 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); g_mutex_unlock(src->audiocast_queue_mutex);
} else if (!strncmp(lines[i], "x-audiocast-udpseqnr", 20)) { } else if (!strncmp(lines[i], "x-audiocast-udpseqnr", 20)) {
gchar outbuf[120]; 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)); g_print("Error sending response to server: %s\n", strerror(errno));
continue; continue;
} }
GST_DEBUG(0,"sent audiocast ack: %s\n", outbuf); GST_DEBUG ("sent audiocast ack: %s\n", outbuf);
} }
} }
g_strfreev(lines); g_strfreev(lines);
@ -682,10 +686,10 @@ static void audiocast_thread_kill(GstGnomeVFSSrc *src)
metadata, then we don't need the metadata, then we don't need the
audiocast metadata too. audiocast metadata too.
*/ */
GST_DEBUG (0,"audiocast: writing die character"); GST_DEBUG ("audiocast: writing die character");
write(src->audiocast_thread_die_outfd, "q", 1); write(src->audiocast_thread_die_outfd, "q", 1);
close(src->audiocast_thread_die_outfd); close(src->audiocast_thread_die_outfd);
GST_DEBUG (0,"audiocast: joining thread"); GST_DEBUG ("audiocast: joining thread");
g_thread_join(src->audiocast_thread); g_thread_join(src->audiocast_thread);
src->audiocast_thread = NULL; src->audiocast_thread = NULL;
} }
@ -703,7 +707,7 @@ gst_gnomevfssrc_send_additional_headers_callback (gconstpointer in,
if (!src->iradio_mode) if (!src->iradio_mode)
return; return;
GST_DEBUG(0,"sending headers\n"); GST_DEBUG ("sending headers\n");
out_args->headers = g_list_append (out_args->headers, out_args->headers = g_list_append (out_args->headers,
g_strdup ("icy-metadata:1\r\n")); g_strdup ("icy-metadata:1\r\n"));
@ -745,7 +749,7 @@ gst_gnomevfssrc_received_headers_callback (gconstpointer in,
{ {
sscanf (data + 12, "%d", &icy_metaint); sscanf (data + 12, "%d", &icy_metaint);
src->icy_metaint = 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); src->icy_metaint);
audiocast_thread_kill(src); audiocast_thread_kill(src);
continue; continue;
@ -758,7 +762,7 @@ gst_gnomevfssrc_received_headers_callback (gconstpointer in,
else else
continue; continue;
GST_DEBUG (0,"key: %s", key); GST_DEBUG ("key: %s", key);
if (!strncmp (key, "name", 4)) { if (!strncmp (key, "name", 4)) {
g_free (src->iradio_name); g_free (src->iradio_name);
src->iradio_name = gst_gnomevfssrc_unicodify (value); src->iradio_name = gst_gnomevfssrc_unicodify (value);
@ -784,7 +788,7 @@ gst_gnomevfssrc_push_callbacks (GstGnomeVFSSrc *gnomevfssrc)
if (gnomevfssrc->http_callbacks_pushed) if (gnomevfssrc->http_callbacks_pushed)
return; return;
GST_DEBUG (0,"pushing callbacks"); GST_DEBUG ("pushing callbacks");
gnome_vfs_module_callback_push (GNOME_VFS_MODULE_CALLBACK_HTTP_SEND_ADDITIONAL_HEADERS, gnome_vfs_module_callback_push (GNOME_VFS_MODULE_CALLBACK_HTTP_SEND_ADDITIONAL_HEADERS,
gst_gnomevfssrc_send_additional_headers_callback, gst_gnomevfssrc_send_additional_headers_callback,
gnomevfssrc, gnomevfssrc,
@ -803,7 +807,7 @@ gst_gnomevfssrc_pop_callbacks (GstGnomeVFSSrc *gnomevfssrc)
if (!gnomevfssrc->http_callbacks_pushed) if (!gnomevfssrc->http_callbacks_pushed)
return; 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_SEND_ADDITIONAL_HEADERS);
gnome_vfs_module_callback_pop (GNOME_VFS_MODULE_CALLBACK_HTTP_RECEIVED_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; gchar **tags;
int i; int i;
GST_DEBUG (0,"reading icecast metadata"); GST_DEBUG ("reading icecast metadata");
while (length == 0) { while (length == 0) {
res = gnome_vfs_read (src->handle, &foobyte, 1, &length); 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); src->iradio_title = gst_gnomevfssrc_unicodify (tags[i]+13);
if (src->iradio_title) 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"); g_object_notify (G_OBJECT (src), "iradio-title");
} }
else else
@ -874,7 +878,7 @@ gst_gnomevfssrc_get_icy_metadata (GstGnomeVFSSrc *src)
src->iradio_url = gst_gnomevfssrc_unicodify (tags[i]+11); src->iradio_url = gst_gnomevfssrc_unicodify (tags[i]+11);
if (src->iradio_url) 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"); g_object_notify (G_OBJECT (src), "iradio-url");
} }
else else
@ -931,7 +935,7 @@ static GstBuffer *gst_gnomevfssrc_get(GstPad *pad)
* bytes of data so that mp3 typefinding will work. */ * bytes of data so that mp3 typefinding will work. */
do 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, result = gnome_vfs_read (src->handle, data,
src->icy_metaint - src->icy_count, src->icy_metaint - src->icy_count,
&readbytes); &readbytes);
@ -968,10 +972,10 @@ static GstBuffer *gst_gnomevfssrc_get(GstPad *pad)
GstEvent *event; GstEvent *event;
gst_buffer_unref (buf); 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; 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); event = gst_event_new_discontinuous (FALSE, GST_FORMAT_BYTES, src->curoffset, NULL);
src->need_flush = FALSE; 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), result = gnome_vfs_read(src->handle, GST_BUFFER_DATA(buf),
src->bytes_per_read, &readbytes); 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); gnome_vfs_result_to_string(result), readbytes);
/* deal with EOS */ /* deal with EOS */
if (readbytes == 0) if (readbytes == 0)
@ -1048,15 +1052,15 @@ static gboolean gst_gnomevfssrc_open_file(GstGnomeVFSSrc *src)
src->size = info->size; src->size = info->size;
} }
else 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); 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); 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; src->in_first_get = TRUE;
@ -1188,7 +1192,7 @@ gst_gnomevfssrc_srcpad_event (GstPad *pad, GstEvent *event)
result = gnome_vfs_seek(src->handle, result = gnome_vfs_seek(src->handle,
GNOME_VFS_SEEK_START, desired_offset); GNOME_VFS_SEEK_START, desired_offset);
GST_DEBUG(0, "new_seek: %s", GST_DEBUG ("new_seek: %s",
gnome_vfs_result_to_string(result)); gnome_vfs_result_to_string(result));
if (result != GNOME_VFS_OK) { if (result != GNOME_VFS_OK) {

View file

@ -17,6 +17,9 @@
* Boston, MA 02111-1307, USA. * Boston, MA 02111-1307, USA.
*/ */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <string.h> #include <string.h>
#include <sys/soundcard.h> #include <sys/soundcard.h>
@ -156,7 +159,7 @@ gst_vorbisdec_pull (VorbisDec * vorbisdec, ogg_sync_state * oy)
GstBuffer *buf; GstBuffer *buf;
do { do {
GST_DEBUG (0, "vorbisdec: pull "); GST_DEBUG ("vorbisdec: pull ");
buf = gst_pad_pull (vorbisdec->sinkpad); buf = gst_pad_pull (vorbisdec->sinkpad);
@ -176,7 +179,7 @@ gst_vorbisdec_pull (VorbisDec * vorbisdec, ogg_sync_state * oy)
} while (buf == NULL); } while (buf == NULL);
end: end:
GST_DEBUG (0, "vorbisdec: pull done"); GST_DEBUG ("vorbisdec: pull done");
return buf; return buf;
} }
@ -221,7 +224,7 @@ gst_vorbisdec_loop (GstElement * element)
buf = gst_vorbisdec_pull (vorbisdec, &oy); buf = gst_vorbisdec_pull (vorbisdec, &oy);
if (!buf) { if (!buf) {
eos = 1; eos = 1;
GST_DEBUG (0, "vorbisdec: pulled NULL"); GST_DEBUG ("vorbisdec: pulled NULL");
break; 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_pad_push (vorbisdec->srcpad, outbuf);
GST_DEBUG (0, "vorbisdec: push done"); GST_DEBUG ("vorbisdec: push done");
vorbis_synthesis_read (&vd, bout); /* tell libvorbis how vorbis_synthesis_read (&vd, bout); /* tell libvorbis how
many samples we many samples we
@ -452,7 +455,7 @@ gst_vorbisdec_loop (GstElement * element)
} }
if (ogg_page_eos (&og)) { if (ogg_page_eos (&og)) {
eos = 1; 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); ogg_sync_wrote (&oy, bytes);
if (bytes == 0) { if (bytes == 0) {
eos = 1; eos = 1;
GST_DEBUG (0, "vorbisdec: wrote 0 bytes"); GST_DEBUG ("vorbisdec: wrote 0 bytes");
} }
} }
else { else {
eos = 1; 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 /* clean up this logical bitstream; before exit we see if we're
followed by another [chained] */ followed by another [chained] */
@ -493,7 +496,7 @@ gst_vorbisdec_loop (GstElement * element)
vorbis_info_clear (&vorbisdec->vi); /* must be called last */ vorbis_info_clear (&vorbisdec->vi); /* must be called last */
} }
end: 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_pad_push (vorbisdec->srcpad, GST_BUFFER (gst_event_new (GST_EVENT_EOS)));
gst_element_set_eos (GST_ELEMENT (vorbisdec)); gst_element_set_eos (GST_ELEMENT (vorbisdec));

View file

@ -18,6 +18,9 @@
*/ */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <time.h> #include <time.h>
@ -647,7 +650,7 @@ gst_vorbisenc_write_page (VorbisEnc *vorbisenc, ogg_page *page)
page->body, page->body,
page->body_len); page->body_len);
GST_DEBUG (0, "vorbisenc: encoded buffer of %d bytes", GST_DEBUG ("vorbisenc: encoded buffer of %d bytes",
GST_BUFFER_SIZE (outbuf)); GST_BUFFER_SIZE (outbuf));
vorbisenc->bytes_out += GST_BUFFER_SIZE (outbuf); vorbisenc->bytes_out += GST_BUFFER_SIZE (outbuf);

View file

@ -17,6 +17,9 @@
* Boston, MA 02111-1307, USA. * Boston, MA 02111-1307, USA.
*/ */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <string.h> #include <string.h>
#include <gst/gst.h> #include <gst/gst.h>
#include <vorbis/codec.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); 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 */ /* make sure we don't go to EOS */
if (!vorbisfile->may_eos && vorbisfile->total_bytes && 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 { do {
got_bytes = gst_bytestream_peek_bytes (vorbisfile->bs, &data, read_size); 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) { if (got_bytes == 0) {
GstEvent *event; GstEvent *event;
@ -265,22 +268,22 @@ gst_vorbisfile_read (void *ptr, size_t size, size_t nmemb, void *datasource)
switch (GST_EVENT_TYPE (event)) { switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_EOS: case GST_EVENT_EOS:
GST_DEBUG (0, "eos"); GST_DEBUG ("eos");
vorbisfile->eos = TRUE; vorbisfile->eos = TRUE;
gst_event_unref (event); gst_event_unref (event);
goto done; goto done;
case GST_EVENT_DISCONTINUOUS: case GST_EVENT_DISCONTINUOUS:
GST_DEBUG (0, "discont"); GST_DEBUG ("discont");
vorbisfile->need_discont = TRUE; vorbisfile->need_discont = TRUE;
default: default:
GST_DEBUG (0, "unknown event %d", GST_EVENT_TYPE (event)); GST_DEBUG ("unknown event %d", GST_EVENT_TYPE (event));
break; break;
} }
gst_event_unref (event); gst_event_unref (event);
} }
} while (got_bytes == 0); } 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); memcpy (ptr, data, got_bytes);
gst_bytestream_flush_fast (vorbisfile->bs, 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; 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) { if (whence == SEEK_SET) {
method = GST_SEEK_METHOD_SET; method = GST_SEEK_METHOD_SET;
@ -335,7 +338,7 @@ gst_vorbisfile_seek (void *datasource, int64_t offset, int whence)
static int static int
gst_vorbisfile_close (void *datasource) gst_vorbisfile_close (void *datasource)
{ {
GST_DEBUG (0, "close"); GST_DEBUG ("close");
return 0; return 0;
} }
@ -347,7 +350,7 @@ gst_vorbisfile_tell (void *datasource)
result = gst_bytestream_tell (vorbisfile->bs); result = gst_bytestream_tell (vorbisfile->bs);
GST_DEBUG (0, "tell %ld", result); GST_DEBUG ("tell %ld", result);
return result; return result;
} }
@ -501,7 +504,7 @@ gst_vorbisfile_loop (GstElement *element)
vorbisfile->may_eos = FALSE; vorbisfile->may_eos = FALSE;
vorbisfile->vf.seekable = gst_bytestream_seek (vorbisfile->bs, 0, vorbisfile->vf.seekable = gst_bytestream_seek (vorbisfile->bs, 0,
GST_SEEK_METHOD_SET); GST_SEEK_METHOD_SET);
GST_DEBUG (GST_CAT_PLUGIN_INFO, "vorbisfile: seekable: %s", GST_DEBUG ("vorbisfile: seekable: %s",
vorbisfile->vf.seekable ? "yes" : "no"); vorbisfile->vf.seekable ? "yes" : "no");
/* open our custom vorbisfile data object with the callbacks we provide */ /* open our custom vorbisfile data object with the callbacks we provide */
@ -583,7 +586,7 @@ gst_vorbisfile_loop (GstElement *element)
sizeof (gint16), 1, &link); sizeof (gint16), 1, &link);
if (ret == 0) { if (ret == 0) {
GST_DEBUG (0, "eos"); GST_DEBUG ("eos");
/* send EOS event */ /* send EOS event */
/*ov_clear (&vorbisfile->vf);*/ /*ov_clear (&vorbisfile->vf);*/
vorbisfile->restart = TRUE; vorbisfile->restart = TRUE;
@ -958,11 +961,11 @@ gst_vorbisfile_src_event (GstPad *pad, GstEvent *event)
vorbis_info *vi; vorbis_info *vi;
GstFormat format; 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)); GST_DEBUG_PAD_NAME (pad));
if (!vorbisfile->vf.seekable) { if (!vorbisfile->vf.seekable) {
gst_event_unref (event); gst_event_unref (event);
GST_DEBUG (GST_CAT_EVENT, "vorbis stream is not seekable"); GST_DEBUG ("vorbis stream is not seekable");
return FALSE; return FALSE;
} }
@ -980,7 +983,7 @@ gst_vorbisfile_src_event (GstPad *pad, GstEvent *event)
case GST_FORMAT_BYTES: case GST_FORMAT_BYTES:
vi = ov_info (&vorbisfile->vf, -1); vi = ov_info (&vorbisfile->vf, -1);
if (vi->channels == 0) { if (vi->channels == 0) {
GST_DEBUG (GST_CAT_EVENT, "vorbis stream has 0 channels ?"); GST_DEBUG ("vorbis stream has 0 channels ?");
res = FALSE; res = FALSE;
goto done; goto done;
} }
@ -1003,7 +1006,7 @@ gst_vorbisfile_src_event (GstPad *pad, GstEvent *event)
} }
else else
{ {
GST_DEBUG (GST_CAT_EVENT, "unhandled seek format"); GST_DEBUG ("unhandled seek format");
res = FALSE; res = FALSE;
} }
break; break;

View file

@ -1 +1 @@
D2003.06.09.22.00.00 2003-06-09 22:00 GMT

View file

@ -53,38 +53,38 @@ GstIDCT *gst_idct_new(GstIDCTMethod method)
switch (method) { switch (method) {
case GST_IDCT_FAST_INT: 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(); gst_idct_init_fast_int_idct();
new->convert = gst_idct_fast_int_idct; new->convert = gst_idct_fast_int_idct;
break; break;
case GST_IDCT_INT: case GST_IDCT_INT:
GST_INFO (GST_CAT_PLUGIN_INFO, "using int_idct"); GST_INFO ( "using int_idct");
new->convert = gst_idct_int_idct; new->convert = gst_idct_int_idct;
break; break;
case GST_IDCT_FLOAT: case GST_IDCT_FLOAT:
GST_INFO (GST_CAT_PLUGIN_INFO, "using float_idct"); GST_INFO ( "using float_idct");
gst_idct_init_float_idct(); gst_idct_init_float_idct();
new->convert = gst_idct_float_idct; new->convert = gst_idct_float_idct;
break; break;
#ifdef HAVE_LIBMMX #ifdef HAVE_LIBMMX
case GST_IDCT_MMX: case GST_IDCT_MMX:
GST_INFO (GST_CAT_PLUGIN_INFO, "using MMX_idct"); GST_INFO ( "using MMX_idct");
new->convert = gst_idct_mmx_idct; new->convert = gst_idct_mmx_idct;
new->need_transpose = TRUE; new->need_transpose = TRUE;
break; break;
case GST_IDCT_MMX32: case GST_IDCT_MMX32:
GST_INFO (GST_CAT_PLUGIN_INFO, "using MMX32_idct"); GST_INFO ( "using MMX32_idct");
new->convert = gst_idct_mmx32_idct; new->convert = gst_idct_mmx32_idct;
new->need_transpose = TRUE; new->need_transpose = TRUE;
break; break;
case GST_IDCT_SSE: case GST_IDCT_SSE:
GST_INFO (GST_CAT_PLUGIN_INFO, "using SSE_idct"); GST_INFO ( "using SSE_idct");
new->convert = gst_idct_sse_idct; new->convert = gst_idct_sse_idct;
new->need_transpose = TRUE; new->need_transpose = TRUE;
break; break;
#endif /* HAVE_LIBMMX */ #endif /* HAVE_LIBMMX */
default: default:
GST_INFO (GST_CAT_PLUGIN_INFO, "method not supported"); GST_INFO ( "method not supported");
g_free(new); g_free(new);
return NULL; return NULL;
} }

View file

@ -48,7 +48,7 @@ GstRiff *gst_riff_encoder_new(guint32 type) {
GstRiff *riff; GstRiff *riff;
gst_riff_list *list; gst_riff_list *list;
GST_DEBUG (0,"gst_riff_encoder: making %4.4s encoder", (char *)&type); GST_DEBUG ("gst_riff_encoder: making %4.4s encoder", (char *)&type);
riff = (GstRiff *)g_malloc(sizeof(GstRiff)); riff = (GstRiff *)g_malloc(sizeof(GstRiff));
g_return_val_if_fail(riff != NULL, NULL); g_return_val_if_fail(riff != NULL, NULL);
@ -76,7 +76,7 @@ gint gst_riff_encoder_avih(GstRiff *riff, gst_riff_avih *head, gulong size) {
g_return_val_if_fail(riff->state == GST_RIFF_STATE_INITIAL, GST_RIFF_EINVAL); g_return_val_if_fail(riff->state == GST_RIFF_STATE_INITIAL, GST_RIFF_EINVAL);
GST_DEBUG (0,"gst_riff_encoder: add avih"); GST_DEBUG ("gst_riff_encoder: add avih");
ADD_LIST(riff, 0xB8, GST_RIFF_LIST_hdrl); ADD_LIST(riff, 0xB8, GST_RIFF_LIST_hdrl);
@ -96,7 +96,7 @@ gint gst_riff_encoder_strh(GstRiff *riff, guint32 fcc_type, gst_riff_strh *head,
g_return_val_if_fail(riff->state == GST_RIFF_STATE_HASAVIH || g_return_val_if_fail(riff->state == GST_RIFF_STATE_HASAVIH ||
riff->state == GST_RIFF_STATE_HASSTRF, GST_RIFF_EINVAL); riff->state == GST_RIFF_STATE_HASSTRF, GST_RIFF_EINVAL);
GST_DEBUG (0,"gst_riff_encoder: add strh type %08x (%4.4s)", fcc_type, (char *)&fcc_type); GST_DEBUG ("gst_riff_encoder: add strh type %08x (%4.4s)", fcc_type, (char *)&fcc_type);
ADD_LIST(riff, 108, GST_RIFF_LIST_strl); ADD_LIST(riff, 108, GST_RIFF_LIST_strl);
@ -117,7 +117,7 @@ gint gst_riff_encoder_strf(GstRiff *riff, void *format, gulong size) {
g_return_val_if_fail(riff->state == GST_RIFF_STATE_HASSTRH, GST_RIFF_EINVAL); g_return_val_if_fail(riff->state == GST_RIFF_STATE_HASSTRH, GST_RIFF_EINVAL);
GST_DEBUG (0,"gst_riff_encoder: add strf"); GST_DEBUG ("gst_riff_encoder: add strf");
ADD_CHUNK(riff, GST_RIFF_TAG_strf, size); ADD_CHUNK(riff, GST_RIFF_TAG_strf, size);
@ -140,7 +140,7 @@ gint gst_riff_encoder_chunk(GstRiff *riff, guint32 chunk_type, void *chunkdata,
riff->state = GST_RIFF_STATE_MOVI; riff->state = GST_RIFF_STATE_MOVI;
} }
GST_DEBUG (0,"gst_riff_encoder: add chunk type %08x (%4.4s)", chunk_type, (char *)&chunk_type); GST_DEBUG ("gst_riff_encoder: add chunk type %08x (%4.4s)", chunk_type, (char *)&chunk_type);
ADD_CHUNK(riff, chunk_type, size); ADD_CHUNK(riff, chunk_type, size);

View file

@ -56,12 +56,12 @@ gst_riff_parser_next_buffer (GstRiff *riff, GstBuffer *buf, gulong off)
size = GST_BUFFER_SIZE(buf); size = GST_BUFFER_SIZE(buf);
last = off + size; last = off + size;
GST_DEBUG (0,"gst_riff_parser: offset new buffer 0x%08lx size 0x%08x", off, GST_BUFFER_SIZE(buf)); GST_DEBUG ("gst_riff_parser: offset new buffer 0x%08lx size 0x%08x", off, GST_BUFFER_SIZE(buf));
if (riff->dataleft) { if (riff->dataleft) {
gulong newsize; gulong newsize;
GST_DEBUG (0,"gst_riff_parser: recovering left data"); GST_DEBUG ("gst_riff_parser: recovering left data");
newsize = riff->dataleft_size + size; newsize = riff->dataleft_size + size;
riff->dataleft = g_realloc(riff->dataleft, newsize); riff->dataleft = g_realloc(riff->dataleft, newsize);
memcpy(riff->dataleft+riff->dataleft_size, GST_BUFFER_DATA(buf), size); memcpy(riff->dataleft+riff->dataleft_size, GST_BUFFER_DATA(buf), size);
@ -100,10 +100,10 @@ gst_riff_parser_next_buffer (GstRiff *riff, GstBuffer *buf, gulong off)
/* if we have an incomplete chunk from the previous buffer */ /* if we have an incomplete chunk from the previous buffer */
if (riff->incomplete_chunk) { if (riff->incomplete_chunk) {
guint leftover; guint leftover;
GST_DEBUG (0,"gst_riff_parser: have incomplete chunk %08x filled", riff->incomplete_chunk_size); GST_DEBUG ("gst_riff_parser: have incomplete chunk %08x filled", riff->incomplete_chunk_size);
leftover = riff->incomplete_chunk->size - riff->incomplete_chunk_size; leftover = riff->incomplete_chunk->size - riff->incomplete_chunk_size;
if (leftover <= size) { if (leftover <= size) {
GST_DEBUG (0,"gst_riff_parser: we can fill it from %08x with %08x bytes = %08x", GST_DEBUG ("gst_riff_parser: we can fill it from %08x with %08x bytes = %08x",
riff->incomplete_chunk_size, leftover, riff->incomplete_chunk_size, leftover,
riff->incomplete_chunk_size+leftover); riff->incomplete_chunk_size+leftover);
memcpy(riff->incomplete_chunk->data+riff->incomplete_chunk_size, GST_BUFFER_DATA(buf), leftover); memcpy(riff->incomplete_chunk->data+riff->incomplete_chunk_size, GST_BUFFER_DATA(buf), leftover);
@ -116,7 +116,7 @@ gst_riff_parser_next_buffer (GstRiff *riff, GstBuffer *buf, gulong off)
riff->incomplete_chunk = NULL; riff->incomplete_chunk = NULL;
} }
else { else {
GST_DEBUG (0,"gst_riff_parser: we cannot fill it %08x >= %08lx", leftover, size); GST_DEBUG ("gst_riff_parser: we cannot fill it %08x >= %08lx", leftover, size);
memcpy(riff->incomplete_chunk->data+riff->incomplete_chunk_size, GST_BUFFER_DATA(buf), size); memcpy(riff->incomplete_chunk->data+riff->incomplete_chunk_size, GST_BUFFER_DATA(buf), size);
riff->incomplete_chunk_size += size; riff->incomplete_chunk_size += size;
return 0; return 0;
@ -125,7 +125,7 @@ gst_riff_parser_next_buffer (GstRiff *riff, GstBuffer *buf, gulong off)
if (riff->nextlikely & 0x01) riff->nextlikely++; if (riff->nextlikely & 0x01) riff->nextlikely++;
GST_DEBUG (0,"gst_riff_parser: next 0x%08x last 0x%08lx offset %08lx",riff->nextlikely, last, off); GST_DEBUG ("gst_riff_parser: next 0x%08x last 0x%08lx offset %08lx",riff->nextlikely, last, off);
/* loop while the next likely chunk header is in this buffer */ /* loop while the next likely chunk header is in this buffer */
while ((riff->nextlikely+12) <= last) { while ((riff->nextlikely+12) <= last) {
guint32 *words = (guint32 *)((guchar *)GST_BUFFER_DATA(buf) + riff->nextlikely - off ); guint32 *words = (guint32 *)((guchar *)GST_BUFFER_DATA(buf) + riff->nextlikely - off );
@ -134,17 +134,17 @@ gst_riff_parser_next_buffer (GstRiff *riff, GstBuffer *buf, gulong off)
while (riff->chunks) { while (riff->chunks) {
chunk = g_list_nth_data(riff->chunks, 0); chunk = g_list_nth_data(riff->chunks, 0);
GST_DEBUG (0,"gst_riff_parser: next 0x%08x offset 0x%08lx size 0x%08x",riff->nextlikely, GST_DEBUG ("gst_riff_parser: next 0x%08x offset 0x%08lx size 0x%08x",riff->nextlikely,
chunk->offset, chunk->size); chunk->offset, chunk->size);
if (riff->nextlikely >= chunk->offset+chunk->size) { if (riff->nextlikely >= chunk->offset+chunk->size) {
GST_DEBUG (0,"gst_riff_parser: found END LIST"); GST_DEBUG ("gst_riff_parser: found END LIST");
/* we have the end of the chunk on the stack, remove it */ /* we have the end of the chunk on the stack, remove it */
riff->chunks = g_list_remove(riff->chunks, chunk); riff->chunks = g_list_remove(riff->chunks, chunk);
} }
else break; else break;
} }
GST_DEBUG (0,"gst_riff_parser: next likely chunk is at offset 0x%08x",riff->nextlikely); GST_DEBUG ("gst_riff_parser: next likely chunk is at offset 0x%08x",riff->nextlikely);
chunk = (GstRiffChunk *)g_malloc(sizeof(GstRiffChunk)); chunk = (GstRiffChunk *)g_malloc(sizeof(GstRiffChunk));
g_return_val_if_fail(chunk != NULL, GST_RIFF_ENOMEM); g_return_val_if_fail(chunk != NULL, GST_RIFF_ENOMEM);
@ -159,7 +159,7 @@ gst_riff_parser_next_buffer (GstRiff *riff, GstBuffer *buf, gulong off)
if (chunk->id == GST_RIFF_TAG_LIST) { if (chunk->id == GST_RIFF_TAG_LIST) {
GST_DEBUG (0,"found LIST %s", gst_riff_id_to_fourcc(chunk->form)); GST_DEBUG ("found LIST %s", gst_riff_id_to_fourcc(chunk->form));
riff->nextlikely += 12; riff->nextlikely += 12;
/* we push the list chunk on our 'stack' */ /* we push the list chunk on our 'stack' */
riff->chunks = g_list_prepend(riff->chunks,chunk); riff->chunks = g_list_prepend(riff->chunks,chunk);
@ -170,7 +170,7 @@ gst_riff_parser_next_buffer (GstRiff *riff, GstBuffer *buf, gulong off)
} }
else { else {
GST_DEBUG (0,"gst_riff_parser: chunk id offset %08x is 0x%08x '%s' and is 0x%08x long", GST_DEBUG ("gst_riff_parser: chunk id offset %08x is 0x%08x '%s' and is 0x%08x long",
riff->nextlikely, GUINT32_FROM_LE (words[0]), riff->nextlikely, GUINT32_FROM_LE (words[0]),
gst_riff_id_to_fourcc(GUINT32_FROM_LE (words[0])), GUINT32_FROM_LE (words[1])); gst_riff_id_to_fourcc(GUINT32_FROM_LE (words[0])), GUINT32_FROM_LE (words[1]));
@ -179,7 +179,7 @@ gst_riff_parser_next_buffer (GstRiff *riff, GstBuffer *buf, gulong off)
if (riff->nextlikely > last) { if (riff->nextlikely > last) {
guint left = size - (riff->nextlikely - chunk->size - off); guint left = size - (riff->nextlikely - chunk->size - off);
GST_DEBUG (0,"make incomplete buffer %08x", left); GST_DEBUG ("make incomplete buffer %08x", left);
chunk->data = g_malloc(chunk->size); chunk->data = g_malloc(chunk->size);
memcpy(chunk->data, (gchar *)(words+2), left); memcpy(chunk->data, (gchar *)(words+2), left);
riff->incomplete_chunk = chunk; riff->incomplete_chunk = chunk;
@ -199,7 +199,7 @@ gst_riff_parser_next_buffer (GstRiff *riff, GstBuffer *buf, gulong off)
} }
if ((riff->nextlikely+12) > last && !riff->incomplete_chunk) { if ((riff->nextlikely+12) > last && !riff->incomplete_chunk) {
guint left = last - riff->nextlikely; guint left = last - riff->nextlikely;
GST_DEBUG (0,"gst_riff_parser: not enough data next 0x%08x last 0x%08lx %08x %08lx",riff->nextlikely, GST_DEBUG ("gst_riff_parser: not enough data next 0x%08x last 0x%08lx %08x %08lx",riff->nextlikely,
last, left, off); last, left, off);
riff->dataleft = g_malloc(left); riff->dataleft = g_malloc(left);

View file

@ -43,7 +43,7 @@ gst_video_frame_rate (GstPad *pad)
fps = ((gdouble) dest_value) / NUM_UNITS; fps = ((gdouble) dest_value) / NUM_UNITS;
GST_DEBUG(GST_CAT_ELEMENT_PADS, "Framerate request on pad %s:%s - %f fps", GST_DEBUG ("Framerate request on pad %s:%s - %f fps",
GST_ELEMENT_NAME(gst_pad_get_parent (pad)), GST_PAD_NAME(pad), fps); GST_ELEMENT_NAME(gst_pad_get_parent (pad)), GST_PAD_NAME(pad), fps);
return fps; return fps;
@ -75,7 +75,7 @@ gst_video_get_size (GstPad *pad,
if (height) if (height)
gst_caps_get_int(caps, "height", height); gst_caps_get_int(caps, "height", height);
GST_DEBUG(GST_CAT_ELEMENT_PADS, "size request on pad %s:%s: %dx%d", GST_DEBUG ("size request on pad %s:%s: %dx%d",
GST_ELEMENT_NAME(gst_pad_get_parent (pad)), GST_PAD_NAME(pad), GST_ELEMENT_NAME(gst_pad_get_parent (pad)), GST_PAD_NAME(pad),
width?*width:0, height?*height:0); width?*width:0, height?*height:0);

View file

@ -21,6 +21,9 @@
* Boston, MA 02111-1307, USA. * Boston, MA 02111-1307, USA.
*/ */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "gstadder.h" #include "gstadder.h"
#include <gst/audio/audio.h> #include <gst/audio/audio.h>
#include <string.h> /* strcmp */ #include <string.h> /* strcmp */
@ -118,7 +121,7 @@ gst_adder_parse_caps (GstAdder *adder, GstCaps *caps)
* so we need to go ahead and set all * so we need to go ahead and set all
the relevant values. */ the relevant values. */
if (strcmp (format, "int") == 0) { if (strcmp (format, "int") == 0) {
GST_DEBUG (GST_CAT_PLUGIN_INFO, "parse_caps sets adder to format int"); GST_DEBUG ("parse_caps sets adder to format int");
adder->format = GST_ADDER_FORMAT_INT; adder->format = GST_ADDER_FORMAT_INT;
gst_caps_get_int (caps, "width", &adder->width); gst_caps_get_int (caps, "width", &adder->width);
gst_caps_get_int (caps, "depth", &adder->depth); gst_caps_get_int (caps, "depth", &adder->depth);
@ -128,7 +131,7 @@ gst_adder_parse_caps (GstAdder *adder, GstCaps *caps)
gst_caps_get_int (caps, "channels", &adder->channels); gst_caps_get_int (caps, "channels", &adder->channels);
gst_caps_get_int (caps, "rate", &adder->rate); gst_caps_get_int (caps, "rate", &adder->rate);
} else if (strcmp (format, "float") == 0) { } else if (strcmp (format, "float") == 0) {
GST_DEBUG (GST_CAT_PLUGIN_INFO, "parse_caps sets adder to format float"); GST_DEBUG ("parse_caps sets adder to format float");
adder->format = GST_ADDER_FORMAT_FLOAT; adder->format = GST_ADDER_FORMAT_FLOAT;
gst_caps_get_string (caps, "layout", &adder->layout); gst_caps_get_string (caps, "layout", &adder->layout);
gst_caps_get_float (caps, "intercept", &adder->intercept); gst_caps_get_float (caps, "intercept", &adder->intercept);
@ -230,7 +233,7 @@ gst_adder_link (GstPad *pad, GstCaps *caps)
p = (GstPad *) sinkpads->data; p = (GstPad *) sinkpads->data;
if (p != pad && p != adder->srcpad) { if (p != pad && p != adder->srcpad) {
if (gst_pad_try_set_caps (p, caps) <= 0) { if (gst_pad_try_set_caps (p, caps) <= 0) {
GST_DEBUG (GST_CAT_PLUGIN_INFO, GST_DEBUG (
"caps mismatch; unlinking and removing pad %s:%s " "caps mismatch; unlinking and removing pad %s:%s "
"(peer %s:%s)", "(peer %s:%s)",
GST_DEBUG_PAD_NAME (p), GST_DEBUG_PAD_NAME (p),
@ -419,7 +422,7 @@ gst_adder_loop (GstElement *element)
/* get data from all of the sinks */ /* get data from all of the sinks */
inputs = adder->input_channels; inputs = adder->input_channels;
GST_DEBUG (GST_CAT_PLUGIN_INFO, "starting to cycle through channels"); GST_DEBUG ("starting to cycle through channels");
while (inputs) { while (inputs) {
guint32 got_bytes; guint32 got_bytes;
@ -430,10 +433,10 @@ gst_adder_loop (GstElement *element)
inputs = inputs->next; inputs = inputs->next;
GST_DEBUG (GST_CAT_PLUGIN_INFO, "looking into channel %p", input); GST_DEBUG ("looking into channel %p", input);
if (!GST_PAD_IS_USABLE (input->sinkpad)) { if (!GST_PAD_IS_USABLE (input->sinkpad)) {
GST_DEBUG (GST_CAT_PLUGIN_INFO, "adder ignoring pad %s:%s", GST_DEBUG ("adder ignoring pad %s:%s",
GST_DEBUG_PAD_NAME (input->sinkpad)); GST_DEBUG_PAD_NAME (input->sinkpad));
continue; continue;
} }
@ -458,12 +461,12 @@ gst_adder_loop (GstElement *element)
case GST_EVENT_EOS: case GST_EVENT_EOS:
/* if we get an EOS event from one of our sink pads, we assume that /* if we get an EOS event from one of our sink pads, we assume that
pad's finished handling data. just skip this pad */ pad's finished handling data. just skip this pad */
GST_DEBUG (GST_CAT_PLUGIN_INFO, "got an EOS event"); GST_DEBUG ("got an EOS event");
gst_event_unref (event); gst_event_unref (event);
continue; continue;
case GST_EVENT_INTERRUPT: case GST_EVENT_INTERRUPT:
gst_event_unref (event); gst_event_unref (event);
GST_DEBUG (GST_CAT_PLUGIN_INFO, "got an interrupt event"); GST_DEBUG ("got an interrupt event");
/* we have to call interrupt here, the scheduler will switch out this /* we have to call interrupt here, the scheduler will switch out this
* element ASAP or returns TRUE if we need to exit the loop */ * element ASAP or returns TRUE if we need to exit the loop */
if (gst_element_interrupt (GST_ELEMENT (adder))) { if (gst_element_interrupt (GST_ELEMENT (adder))) {
@ -478,7 +481,7 @@ gst_adder_loop (GstElement *element)
/* here's where the data gets copied. this is a little nasty looking /* here's where the data gets copied. this is a little nasty looking
because it's the same code pretty much 3 times, except each time uses because it's the same code pretty much 3 times, except each time uses
different data types and clamp limits. */ different data types and clamp limits. */
GST_DEBUG (GST_CAT_PLUGIN_INFO, GST_DEBUG (
"copying %d bytes from channel %p to output data %p " "copying %d bytes from channel %p to output data %p "
"in buffer %p", "in buffer %p",
GST_BUFFER_SIZE (buf_out), input, GST_BUFFER_SIZE (buf_out), input,
@ -496,9 +499,10 @@ gst_adder_loop (GstElement *element)
for (i = 0; i < GST_BUFFER_SIZE (buf_out); i++) for (i = 0; i < GST_BUFFER_SIZE (buf_out); i++)
out[i] = CLAMP(out[i] + in[i], -128, 127); out[i] = CLAMP(out[i] + in[i], -128, 127);
} else { } else {
GST_ERROR (GST_ELEMENT (adder), gst_element_error (GST_ELEMENT (adder),
"invalid width (%d) for int format in gstadder\n", "invalid width (%u) for int format in gstadder\n",
adder->width); adder->width);
return;
} }
} else if (adder->format == GST_ADDER_FORMAT_FLOAT) { } else if (adder->format == GST_ADDER_FORMAT_FLOAT) {
gfloat *in = (gfloat *) raw_in; gfloat *in = (gfloat *) raw_in;
@ -506,14 +510,15 @@ gst_adder_loop (GstElement *element)
for (i = 0; i < GST_BUFFER_SIZE (buf_out) / sizeof (gfloat); i++) for (i = 0; i < GST_BUFFER_SIZE (buf_out) / sizeof (gfloat); i++)
out[i] += in[i]; out[i] += in[i];
} else { } else {
GST_ERROR (GST_ELEMENT (adder), gst_element_error (GST_ELEMENT (adder),
"invalid audio format (%d) in gstadder\n", "invalid audio format (%d) in gstadder\n",
adder->format); adder->format);
return;
} }
gst_bytestream_flush (input->bytestream, GST_BUFFER_SIZE (buf_out)); gst_bytestream_flush (input->bytestream, GST_BUFFER_SIZE (buf_out));
GST_DEBUG (GST_CAT_PLUGIN_INFO, "done copying data"); GST_DEBUG ("done copying data");
} }
} }
@ -550,7 +555,7 @@ gst_adder_loop (GstElement *element)
/* send it out */ /* send it out */
GST_DEBUG (GST_CAT_PLUGIN_INFO, "pushing buf_out"); GST_DEBUG ("pushing buf_out");
gst_pad_push (adder->srcpad, buf_out); gst_pad_push (adder->srcpad, buf_out);
} }

View file

@ -19,6 +19,9 @@
* Boston, MA 02111-1307, USA. * Boston, MA 02111-1307, USA.
*/ */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <gst/gst.h> #include <gst/gst.h>
#include <string.h> #include <string.h>
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H

View file

@ -18,6 +18,9 @@
*/ */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <string.h> #include <string.h>
#include <math.h> #include <math.h>
@ -250,7 +253,7 @@ gst_audioscale_chain (GstPad *pad, GstBuffer *buf)
data = GST_BUFFER_DATA(buf); data = GST_BUFFER_DATA(buf);
size = GST_BUFFER_SIZE(buf); size = GST_BUFFER_SIZE(buf);
GST_DEBUG (0, GST_DEBUG (
"gst_audioscale_chain: got buffer of %ld bytes in '%s'\n", "gst_audioscale_chain: got buffer of %ld bytes in '%s'\n",
size, gst_element_get_name (GST_ELEMENT (audioscale))); size, gst_element_get_name (GST_ELEMENT (audioscale)));
@ -281,7 +284,7 @@ gst_audioscale_set_property (GObject * object, guint prop_id,
break; break;
case ARG_FILTERLEN: case ARG_FILTERLEN:
r->filter_length = g_value_get_int (value); r->filter_length = g_value_get_int (value);
GST_DEBUG_ELEMENT (0, GST_ELEMENT(src), "new filter length %d\n", r->filter_length); GST_DEBUG_OBJECT (GST_ELEMENT(src), "new filter length %d\n", r->filter_length);
break; break;
case ARG_METHOD: case ARG_METHOD:
r->method = g_value_get_enum (value); r->method = g_value_get_enum (value);

View file

@ -21,6 +21,9 @@
* Boston, MA 02111-1307, USA. * Boston, MA 02111-1307, USA.
*/ */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <math.h> #include <math.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
@ -400,7 +403,7 @@ gst_sinesrc_update_freq (const GValue *value, gpointer data)
src->freq = g_value_get_float (value); src->freq = g_value_get_float (value);
src->table_inc = src->table_size * src->freq / src->samplerate; src->table_inc = src->table_size * src->freq / src->samplerate;
/*GST_DEBUG(GST_CAT_PARAMS, "freq %f", src->freq); */ /*GST_DEBUG ("freq %f", src->freq); */
} }
static inline void static inline void

View file

@ -19,6 +19,9 @@
/*#define DEBUG_ENABLED */ /*#define DEBUG_ENABLED */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <gstvideoscale.h> #include <gstvideoscale.h>
#include <videoscale.h> #include <videoscale.h>
@ -190,7 +193,7 @@ gst_videoscale_getcaps (GstPad *pad, GstCaps *caps)
GstCaps *sizecaps; GstCaps *sizecaps;
int i; int i;
GST_DEBUG(0,"gst_videoscale_src_link"); GST_DEBUG ("gst_videoscale_src_link");
videoscale = GST_VIDEOSCALE (gst_pad_get_parent (pad)); videoscale = GST_VIDEOSCALE (gst_pad_get_parent (pad));
/* get list of peer's caps */ /* get list of peer's caps */
@ -231,7 +234,7 @@ gst_videoscale_src_link (GstPad *pad, GstCaps *caps)
GstPadLinkReturn ret; GstPadLinkReturn ret;
GstCaps *peercaps; GstCaps *peercaps;
GST_DEBUG(0,"gst_videoscale_src_link"); GST_DEBUG ("gst_videoscale_src_link");
videoscale = GST_VIDEOSCALE (gst_pad_get_parent (pad)); videoscale = GST_VIDEOSCALE (gst_pad_get_parent (pad));
if (!GST_CAPS_IS_FIXED (caps)) { if (!GST_CAPS_IS_FIXED (caps)) {
@ -244,7 +247,7 @@ gst_videoscale_src_link (GstPad *pad, GstCaps *caps)
gst_videoscale_setup(videoscale); gst_videoscale_setup(videoscale);
GST_DEBUG(0,"width %d height %d",videoscale->to_width,videoscale->to_height); GST_DEBUG ("width %d height %d",videoscale->to_width,videoscale->to_height);
peercaps = gst_caps_copy(caps); peercaps = gst_caps_copy(caps);
@ -273,7 +276,7 @@ gst_videoscale_sink_link (GstPad *pad, GstCaps *caps)
GstPadLinkReturn ret; GstPadLinkReturn ret;
GstCaps *peercaps; GstCaps *peercaps;
GST_DEBUG(0,"gst_videoscale_src_link"); GST_DEBUG ("gst_videoscale_src_link");
videoscale = GST_VIDEOSCALE (gst_pad_get_parent (pad)); videoscale = GST_VIDEOSCALE (gst_pad_get_parent (pad));
if (!GST_CAPS_IS_FIXED (caps)) { if (!GST_CAPS_IS_FIXED (caps)) {
@ -314,7 +317,7 @@ gst_videoscale_sink_link (GstPad *pad, GstCaps *caps)
static void static void
gst_videoscale_init (GstVideoscale *videoscale) gst_videoscale_init (GstVideoscale *videoscale)
{ {
GST_DEBUG(0,"gst_videoscale_init"); GST_DEBUG ("gst_videoscale_init");
videoscale->sinkpad = gst_pad_new_from_template ( videoscale->sinkpad = gst_pad_new_from_template (
GST_PAD_TEMPLATE_GET (gst_videoscale_sink_template_factory), GST_PAD_TEMPLATE_GET (gst_videoscale_sink_template_factory),
"sink"); "sink");
@ -347,7 +350,7 @@ gst_videoscale_chain (GstPad *pad, GstBuffer *buf)
gulong size; gulong size;
GstBuffer *outbuf; GstBuffer *outbuf;
GST_DEBUG (0,"gst_videoscale_chain"); GST_DEBUG ("gst_videoscale_chain");
g_return_if_fail (pad != NULL); g_return_if_fail (pad != NULL);
g_return_if_fail (GST_IS_PAD (pad)); g_return_if_fail (GST_IS_PAD (pad));
@ -364,10 +367,10 @@ gst_videoscale_chain (GstPad *pad, GstBuffer *buf)
return; return;
} }
GST_DEBUG (0,"gst_videoscale_chain: got buffer of %ld bytes in '%s'",size, GST_DEBUG ("gst_videoscale_chain: got buffer of %ld bytes in '%s'",size,
GST_OBJECT_NAME (videoscale)); GST_OBJECT_NAME (videoscale));
GST_DEBUG(0,"size=%ld from=%dx%d to=%dx%d fromsize=%ld (should be %d) tosize=%d", GST_DEBUG ("size=%ld from=%dx%d to=%dx%d fromsize=%ld (should be %d) tosize=%d",
size, size,
videoscale->from_width, videoscale->from_height, videoscale->from_width, videoscale->from_height,
videoscale->to_width, videoscale->to_height, videoscale->to_width, videoscale->to_height,
@ -383,12 +386,12 @@ gst_videoscale_chain (GstPad *pad, GstBuffer *buf)
GST_BUFFER_TIMESTAMP(outbuf) = GST_BUFFER_TIMESTAMP(buf); GST_BUFFER_TIMESTAMP(outbuf) = GST_BUFFER_TIMESTAMP(buf);
g_return_if_fail(videoscale->format); g_return_if_fail(videoscale->format);
GST_DEBUG (0,"format %s",videoscale->format->fourcc); GST_DEBUG ("format %s",videoscale->format->fourcc);
g_return_if_fail(videoscale->format->scale); g_return_if_fail(videoscale->format->scale);
videoscale->format->scale(videoscale, GST_BUFFER_DATA(outbuf), data); videoscale->format->scale(videoscale, GST_BUFFER_DATA(outbuf), data);
GST_DEBUG (0,"gst_videoscale_chain: pushing buffer of %d bytes in '%s'",GST_BUFFER_SIZE(outbuf), GST_DEBUG ("gst_videoscale_chain: pushing buffer of %d bytes in '%s'",GST_BUFFER_SIZE(outbuf),
GST_OBJECT_NAME (videoscale)); GST_OBJECT_NAME (videoscale));
gst_pad_push(videoscale->srcpad, outbuf); gst_pad_push(videoscale->srcpad, outbuf);
@ -405,7 +408,7 @@ gst_videoscale_set_property (GObject *object, guint prop_id, const GValue *value
g_return_if_fail(GST_IS_VIDEOSCALE(object)); g_return_if_fail(GST_IS_VIDEOSCALE(object));
src = GST_VIDEOSCALE(object); src = GST_VIDEOSCALE(object);
GST_DEBUG(0,"gst_videoscale_set_property"); GST_DEBUG ("gst_videoscale_set_property");
switch (prop_id) { switch (prop_id) {
case ARG_WIDTH: case ARG_WIDTH:
src->forced_width = g_value_get_int (value); src->forced_width = g_value_get_int (value);

View file

@ -123,7 +123,7 @@ videoscale_find_by_caps(GstCaps *caps)
{ {
int i; int i;
GST_DEBUG (0,"finding %p",caps); GST_DEBUG ("finding %p",caps);
g_return_val_if_fail(caps != NULL, NULL); g_return_val_if_fail(caps != NULL, NULL);
@ -146,7 +146,7 @@ videoscale_find_by_caps(GstCaps *caps)
void void
gst_videoscale_setup (GstVideoscale *videoscale) gst_videoscale_setup (GstVideoscale *videoscale)
{ {
GST_DEBUG (0,"format=%p \"%s\" from %dx%d to %dx%d", GST_DEBUG ("format=%p \"%s\" from %dx%d to %dx%d",
videoscale->format, videoscale->format->fourcc, videoscale->format, videoscale->format->fourcc,
videoscale->from_width, videoscale->from_height, videoscale->from_width, videoscale->from_height,
videoscale->to_width, videoscale->to_height); videoscale->to_width, videoscale->to_height);
@ -158,13 +158,13 @@ gst_videoscale_setup (GstVideoscale *videoscale)
if(videoscale->to_width == videoscale->from_width && if(videoscale->to_width == videoscale->from_width &&
videoscale->to_height == videoscale->from_height){ videoscale->to_height == videoscale->from_height){
GST_DEBUG (0,"videoscale: using passthru"); GST_DEBUG ("videoscale: using passthru");
videoscale->passthru = TRUE; videoscale->passthru = TRUE;
videoscale->inited = TRUE; videoscale->inited = TRUE;
return; return;
} }
GST_DEBUG (0,"videoscale: scaling method POINT_SAMPLE"); GST_DEBUG ("videoscale: scaling method POINT_SAMPLE");
videoscale->from_buf_size = (videoscale->from_width * videoscale->from_height videoscale->from_buf_size = (videoscale->from_width * videoscale->from_height
* videoscale->format->depth) / 8; * videoscale->format->depth) / 8;
@ -182,7 +182,7 @@ gst_videoscale_scale_rgb (GstVideoscale *scale, unsigned char *dest, unsigned ch
int sh = scale->from_height; int sh = scale->from_height;
int dw = scale->to_width; int dw = scale->to_width;
int dh = scale->to_height; int dh = scale->to_height;
GST_DEBUG (0,"videoscale: scaling RGB %dx%d to %dx%d", sw, sh, dw, dh); GST_DEBUG ("videoscale: scaling RGB %dx%d to %dx%d", sw, sh, dw, dh);
switch (scale->scale_bytes) { switch (scale->scale_bytes) {
case 2: case 2:
@ -197,7 +197,7 @@ gst_videoscale_scale_rgb (GstVideoscale *scale, unsigned char *dest, unsigned ch
break; break;
} }
GST_DEBUG (0,"videoscale: %p %p", src, dest); GST_DEBUG ("videoscale: %p %p", src, dest);
//scale->scaler(scale, src, dest, sw, sh, dw, dh); //scale->scaler(scale, src, dest, sw, sh, dw, dh);
} }
#endif #endif
@ -210,7 +210,7 @@ gst_videoscale_planar411 (GstVideoscale *scale, unsigned char *dest, unsigned ch
int dw = scale->to_width; int dw = scale->to_width;
int dh = scale->to_height; int dh = scale->to_height;
GST_DEBUG (0,"videoscale: scaling planar 4:1:1 %dx%d to %dx%d", sw, sh, dw, dh); GST_DEBUG ("videoscale: scaling planar 4:1:1 %dx%d to %dx%d", sw, sh, dw, dh);
gst_videoscale_scale_nearest(scale, dest, src, sw, sh, dw, dh); gst_videoscale_scale_nearest(scale, dest, src, sw, sh, dw, dh);
@ -238,7 +238,7 @@ gst_videoscale_planar400 (GstVideoscale *scale, unsigned char *dest, unsigned ch
int dw = scale->to_width; int dw = scale->to_width;
int dh = scale->to_height; int dh = scale->to_height;
GST_DEBUG (0,"videoscale: scaling Y-only %dx%d to %dx%d", sw, sh, dw, dh); GST_DEBUG ("videoscale: scaling Y-only %dx%d to %dx%d", sw, sh, dw, dh);
gst_videoscale_scale_nearest(scale, dest, src, sw, sh, dw, dh); gst_videoscale_scale_nearest(scale, dest, src, sw, sh, dw, dh);
} }
@ -251,7 +251,7 @@ gst_videoscale_packed422 (GstVideoscale *scale, unsigned char *dest, unsigned ch
int dw = scale->to_width; int dw = scale->to_width;
int dh = scale->to_height; int dh = scale->to_height;
GST_DEBUG (0,"videoscale: scaling 4:2:2 %dx%d to %dx%d", sw, sh, dw, dh); GST_DEBUG ("videoscale: scaling 4:2:2 %dx%d to %dx%d", sw, sh, dw, dh);
gst_videoscale_scale_nearest_str2(scale, dest, src, sw, sh, dw, dh); gst_videoscale_scale_nearest_str2(scale, dest, src, sw, sh, dw, dh);
gst_videoscale_scale_nearest_str4(scale, dest+1, src+1, sw/2, sh, dw/2, dh); gst_videoscale_scale_nearest_str4(scale, dest+1, src+1, sw/2, sh, dw/2, dh);
@ -267,7 +267,7 @@ gst_videoscale_packed422rev (GstVideoscale *scale, unsigned char *dest, unsigned
int dw = scale->to_width; int dw = scale->to_width;
int dh = scale->to_height; int dh = scale->to_height;
GST_DEBUG (0,"videoscale: scaling 4:2:2 %dx%d to %dx%d", sw, sh, dw, dh); GST_DEBUG ("videoscale: scaling 4:2:2 %dx%d to %dx%d", sw, sh, dw, dh);
gst_videoscale_scale_nearest_str2(scale, dest+1, src, sw, sh, dw, dh); gst_videoscale_scale_nearest_str2(scale, dest+1, src, sw, sh, dw, dh);
gst_videoscale_scale_nearest_str4(scale, dest, src+1, sw/2, sh, dw/2, dh); gst_videoscale_scale_nearest_str4(scale, dest, src+1, sw/2, sh, dw/2, dh);
@ -283,7 +283,7 @@ gst_videoscale_32bit (GstVideoscale *scale, unsigned char *dest, unsigned char *
int dw = scale->to_width; int dw = scale->to_width;
int dh = scale->to_height; int dh = scale->to_height;
GST_DEBUG (0,"videoscale: scaling 32bit %dx%d to %dx%d", sw, sh, dw, dh); GST_DEBUG ("videoscale: scaling 32bit %dx%d to %dx%d", sw, sh, dw, dh);
gst_videoscale_scale_nearest_32bit(scale, dest, src, sw, sh, dw, dh); gst_videoscale_scale_nearest_32bit(scale, dest, src, sw, sh, dw, dh);
@ -297,7 +297,7 @@ gst_videoscale_24bit (GstVideoscale *scale, unsigned char *dest, unsigned char *
int dw = scale->to_width; int dw = scale->to_width;
int dh = scale->to_height; int dh = scale->to_height;
GST_DEBUG (0,"videoscale: scaling 24bit %dx%d to %dx%d", sw, sh, dw, dh); GST_DEBUG ("videoscale: scaling 24bit %dx%d to %dx%d", sw, sh, dw, dh);
gst_videoscale_scale_nearest_24bit(scale, dest, src, sw, sh, dw, dh); gst_videoscale_scale_nearest_24bit(scale, dest, src, sw, sh, dw, dh);
@ -311,7 +311,7 @@ gst_videoscale_16bit (GstVideoscale *scale, unsigned char *dest, unsigned char *
int dw = scale->to_width; int dw = scale->to_width;
int dh = scale->to_height; int dh = scale->to_height;
GST_DEBUG (0,"videoscale: scaling 16bit %dx%d to %dx%d", sw, sh, dw, dh); GST_DEBUG ("videoscale: scaling 16bit %dx%d to %dx%d", sw, sh, dw, dh);
gst_videoscale_scale_nearest_16bit(scale, dest, src, sw, sh, dw, dh); gst_videoscale_scale_nearest_16bit(scale, dest, src, sw, sh, dw, dh);
@ -330,7 +330,7 @@ gst_videoscale_bilinear (unsigned char *src, double x, double y, int sw, int sh)
double dest; double dest;
int color; int color;
GST_DEBUG(0,"videoscale: scaling bilinear %f %f %dx%d", x, y, sw, sh); GST_DEBUG ("videoscale: scaling bilinear %f %f %dx%d", x, y, sw, sh);
dest=(1-a)*(1-b)*RC(j,k)+ dest=(1-a)*(1-b)*RC(j,k)+
a*(1-b)*RC(j+1,k); a*(1-b)*RC(j+1,k);
@ -359,7 +359,7 @@ gst_videoscale_bicubic (unsigned char *src, double x, double y, int sw, int sh)
double t1, t2, t3, t4; double t1, t2, t3, t4;
double a1, a2, a3, a4; double a1, a2, a3, a4;
GST_DEBUG (0,"videoscale: scaling bicubic %dx%d", sw, sh); GST_DEBUG ("videoscale: scaling bicubic %dx%d", sw, sh);
a1 = -a*(1-a)*(1-a); a1 = -a*(1-a)*(1-a);
a2 = (1-2*a*a+a*a*a); a2 = (1-2*a*a+a*a*a);
@ -392,17 +392,17 @@ gst_videoscale_scale_plane_slow (GstVideoscale *scale, unsigned char *src, unsig
double xr, yr; double xr, yr;
int x, y; int x, y;
GST_DEBUG (0,"videoscale: scale plane slow %dx%d %dx%d %g %g %p %p", sw, sh, dw, dh, zoomx, zoomy, src, dest); GST_DEBUG ("videoscale: scale plane slow %dx%d %dx%d %g %g %p %p", sw, sh, dw, dh, zoomx, zoomy, src, dest);
for (y=0; y<dh; y++) { for (y=0; y<dh; y++) {
yr = ((double)y)/zoomy; yr = ((double)y)/zoomy;
for (x=0; x<dw; x++) { for (x=0; x<dw; x++) {
xr = ((double)x)/zoomx; xr = ((double)x)/zoomx;
GST_DEBUG (0,"videoscale: scale plane slow %g %g %p", xr, yr, (src+(int)(x)+(int)((y)*sw))); GST_DEBUG ("videoscale: scale plane slow %g %g %p", xr, yr, (src+(int)(x)+(int)((y)*sw)));
if (floor(xr) == xr && floor(yr) == yr){ if (floor(xr) == xr && floor(yr) == yr){
GST_DEBUG (0,"videoscale: scale plane %g %g %p %p", xr, yr, (src+(int)(x)+(int)((y)*sw)), dest); GST_DEBUG ("videoscale: scale plane %g %g %p %p", xr, yr, (src+(int)(x)+(int)((y)*sw)), dest);
*dest++ = RC(xr, yr); *dest++ = RC(xr, yr);
} }
else { else {
@ -424,7 +424,7 @@ gst_videoscale_scale_point_sample (GstVideoscale *scale, unsigned char *src, uns
int sum, xcount, ycount, loop; int sum, xcount, ycount, loop;
unsigned char *srcp, *srcp2; unsigned char *srcp, *srcp2;
GST_DEBUG (0,"videoscale: scaling nearest point sample %p %p %d", src, dest, dw); GST_DEBUG ("videoscale: scaling nearest point sample %p %p %d", src, dest, dw);
ypos = 0x10000; ypos = 0x10000;
yinc = (sh<<16)/dh; yinc = (sh<<16)/dh;
@ -475,7 +475,7 @@ gst_videoscale_scale_nearest (GstVideoscale *scale,
guchar *destp = dest; guchar *destp = dest;
guchar *srcp = src; guchar *srcp = src;
GST_DEBUG (0, "videoscale: scaling nearest %p %p %d", src, dest, dw); GST_DEBUG ("videoscale: scaling nearest %p %p %d", src, dest, dw);
ypos = 0x10000; ypos = 0x10000;
@ -519,7 +519,7 @@ gst_videoscale_scale_nearest_str2 (GstVideoscale *scale,
guchar *destp = dest; guchar *destp = dest;
guchar *srcp = src; guchar *srcp = src;
GST_DEBUG (0, "videoscale: scaling nearest %p %p %d", src, dest, dw); GST_DEBUG ("videoscale: scaling nearest %p %p %d", src, dest, dw);
ypos = 0x10000; ypos = 0x10000;
@ -564,7 +564,7 @@ gst_videoscale_scale_nearest_str4 (GstVideoscale *scale,
guchar *destp = dest; guchar *destp = dest;
guchar *srcp = src; guchar *srcp = src;
GST_DEBUG (0, "videoscale: scaling nearest %p %p %d", src, dest, dw); GST_DEBUG ("videoscale: scaling nearest %p %p %d", src, dest, dw);
ypos = 0x10000; ypos = 0x10000;
@ -609,7 +609,7 @@ gst_videoscale_scale_nearest_32bit (GstVideoscale *scale,
guchar *destp = dest; guchar *destp = dest;
guchar *srcp = src; guchar *srcp = src;
GST_DEBUG (0, "videoscale: scaling nearest %p %p %d", src, dest, dw); GST_DEBUG ("videoscale: scaling nearest %p %p %d", src, dest, dw);
ypos = 0x10000; ypos = 0x10000;
@ -654,7 +654,7 @@ gst_videoscale_scale_nearest_24bit (GstVideoscale *scale,
guchar *destp = dest; guchar *destp = dest;
guchar *srcp = src; guchar *srcp = src;
GST_DEBUG (0, "videoscale: scaling nearest %p %p %d", src, dest, dw); GST_DEBUG ("videoscale: scaling nearest %p %p %d", src, dest, dw);
ypos = 0x10000; ypos = 0x10000;
@ -701,7 +701,7 @@ gst_videoscale_scale_nearest_16bit (GstVideoscale *scale,
guchar *destp = dest; guchar *destp = dest;
guchar *srcp = src; guchar *srcp = src;
GST_DEBUG (0, "videoscale: scaling nearest %p %p %d", src, dest, dw); GST_DEBUG ("videoscale: scaling nearest %p %p %d", src, dest, dw);
ypos = 0x10000; ypos = 0x10000;

View file

@ -42,7 +42,7 @@ gst_videoscale_generate_rowbytes_x86 (unsigned char *copy_row, int src_w, int ds
unsigned char *eip; unsigned char *eip;
unsigned char load, store; unsigned char load, store;
GST_DEBUG (0,"videoscale: setup scaling %p", copy_row); GST_DEBUG ("videoscale: setup scaling %p", copy_row);
switch (bpp) { switch (bpp) {
case 1: case 1:
@ -75,6 +75,6 @@ gst_videoscale_generate_rowbytes_x86 (unsigned char *copy_row, int src_w, int ds
pos += inc; pos += inc;
} }
*eip++ = RETURN; *eip++ = RETURN;
GST_DEBUG (0,"scaler start/end %p %p %p", copy_row, eip, (void*)(eip-copy_row)); GST_DEBUG ("scaler start/end %p %p %p", copy_row, eip, (void*)(eip-copy_row));
} }

View file

@ -19,6 +19,9 @@
/*#define DEBUG_ENABLED */ /*#define DEBUG_ENABLED */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <gstvideotestsrc.h> #include <gstvideotestsrc.h>
#include <videotestsrc.h> #include <videotestsrc.h>
@ -192,7 +195,7 @@ gst_videotestsrc_srcconnect (GstPad * pad, GstCaps * caps)
{ {
GstVideotestsrc *videotestsrc; GstVideotestsrc *videotestsrc;
GST_DEBUG (0, "gst_videotestsrc_srcconnect"); GST_DEBUG ("gst_videotestsrc_srcconnect");
videotestsrc = GST_VIDEOTESTSRC (gst_pad_get_parent (pad)); videotestsrc = GST_VIDEOTESTSRC (gst_pad_get_parent (pad));
for ( ; caps != NULL; caps = caps->next) { for ( ; caps != NULL; caps = caps->next) {
@ -219,12 +222,12 @@ gst_videotestsrc_srcconnect (GstPad * pad, GstCaps * caps)
} }
if (caps == NULL) { if (caps == NULL) {
GST_DEBUG (GST_CAT_PLUGIN_ERRORS, GST_DEBUG (
"videotestsrc: no suitable opposite-side caps found"); "videotestsrc: no suitable opposite-side caps found");
return GST_PAD_LINK_REFUSED; return GST_PAD_LINK_REFUSED;
} }
GST_DEBUG (0,"videotestsrc: using fourcc element %p %s\n", GST_DEBUG ("videotestsrc: using fourcc element %p %s\n",
videotestsrc->fourcc, videotestsrc->fourcc->name); videotestsrc->fourcc, videotestsrc->fourcc->name);
gst_caps_get_int (caps, "width", &videotestsrc->width); gst_caps_get_int (caps, "width", &videotestsrc->width);
@ -232,7 +235,7 @@ gst_videotestsrc_srcconnect (GstPad * pad, GstCaps * caps)
videotestsrc->bpp = videotestsrc->fourcc->bitspp; videotestsrc->bpp = videotestsrc->fourcc->bitspp;
GST_DEBUG (0, "size %d x %d", videotestsrc->width, videotestsrc->height); GST_DEBUG ("size %d x %d", videotestsrc->width, videotestsrc->height);
return GST_PAD_LINK_DONE; return GST_PAD_LINK_DONE;
} }
@ -318,7 +321,7 @@ gst_videotestsrc_getcaps (GstPad * pad, GstCaps * caps)
static void static void
gst_videotestsrc_init (GstVideotestsrc * videotestsrc) gst_videotestsrc_init (GstVideotestsrc * videotestsrc)
{ {
GST_DEBUG (0, "gst_videotestsrc_init"); GST_DEBUG ("gst_videotestsrc_init");
videotestsrc->srcpad = videotestsrc->srcpad =
gst_pad_new_from_template (GST_PAD_TEMPLATE_GET (videotestsrc_src_template_factory), "src"); gst_pad_new_from_template (GST_PAD_TEMPLATE_GET (videotestsrc_src_template_factory), "src");
@ -352,7 +355,7 @@ gst_videotestsrc_get (GstPad * pad)
GstBuffer *buf; GstBuffer *buf;
GstClockTimeDiff jitter = 0; GstClockTimeDiff jitter = 0;
GST_DEBUG (0, "gst_videotestsrc_get"); GST_DEBUG ("gst_videotestsrc_get");
g_return_val_if_fail (pad != NULL, NULL); g_return_val_if_fail (pad != NULL, NULL);
g_return_val_if_fail (GST_IS_PAD (pad), NULL); g_return_val_if_fail (GST_IS_PAD (pad), NULL);
@ -361,7 +364,7 @@ gst_videotestsrc_get (GstPad * pad)
newsize = (videotestsrc->width * videotestsrc->height * videotestsrc->bpp) >> 3; newsize = (videotestsrc->width * videotestsrc->height * videotestsrc->bpp) >> 3;
GST_DEBUG (0, "size=%ld %dx%d", newsize, videotestsrc->width, videotestsrc->height); GST_DEBUG ("size=%ld %dx%d", newsize, videotestsrc->width, videotestsrc->height);
buf = NULL; buf = NULL;
if (videotestsrc->pool) { if (videotestsrc->pool) {
@ -405,7 +408,7 @@ gst_videotestsrc_set_pattern (GstVideotestsrc *src, int pattern_type)
{ {
src->type = pattern_type; src->type = pattern_type;
GST_DEBUG (0,"setting pattern to %d\n",pattern_type); GST_DEBUG ("setting pattern to %d\n",pattern_type);
switch(pattern_type){ switch(pattern_type){
case GST_VIDEOTESTSRC_SMPTE: case GST_VIDEOTESTSRC_SMPTE:
src->make_image = gst_videotestsrc_smpte; src->make_image = gst_videotestsrc_smpte;
@ -432,7 +435,7 @@ gst_videotestsrc_set_property (GObject * object, guint prop_id, const GValue * v
g_return_if_fail (GST_IS_VIDEOTESTSRC (object)); g_return_if_fail (GST_IS_VIDEOTESTSRC (object));
src = GST_VIDEOTESTSRC (object); src = GST_VIDEOTESTSRC (object);
GST_DEBUG (0, "gst_videotestsrc_set_property"); GST_DEBUG ("gst_videotestsrc_set_property");
switch (prop_id) { switch (prop_id) {
case ARG_WIDTH: case ARG_WIDTH:
src->width = g_value_get_int (value); src->width = g_value_get_int (value);
@ -444,9 +447,9 @@ gst_videotestsrc_set_property (GObject * object, guint prop_id, const GValue * v
format = g_value_get_string (value); format = g_value_get_string (value);
if(paintrect_find_name (format) != NULL){ if(paintrect_find_name (format) != NULL){
src->forced_format = g_strdup(format); src->forced_format = g_strdup(format);
GST_DEBUG (0,"forcing format to \"%s\"\n", format); GST_DEBUG ("forcing format to \"%s\"\n", format);
}else{ }else{
GST_DEBUG (0,"unknown format \"%s\"\n", format); GST_DEBUG ("unknown format \"%s\"\n", format);
} }
break; break;
case ARG_RATE: case ARG_RATE:

View file

@ -18,6 +18,9 @@
* Boston, MA 02111-1307, USA. * Boston, MA 02111-1307, USA.
*/ */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <string.h> #include <string.h>
#include <gst/gst.h> #include <gst/gst.h>
#include <gst/audio/audio.h> #include <gst/audio/audio.h>

View file

@ -18,6 +18,7 @@ dnl a date spec)
AC_DEFUN(AS_SLURP_FFMPEG, AC_DEFUN(AS_SLURP_FFMPEG,
[ [
# save original dir # save original dir
FAILED=""
DIRECTORY=`pwd` DIRECTORY=`pwd`
# get/update cvs # get/update cvs
if test ! -d $1; then mkdir -p $1; fi if test ! -d $1; then mkdir -p $1; fi
@ -27,18 +28,17 @@ AC_DEFUN(AS_SLURP_FFMPEG,
# check out cvs code # check out cvs code
AC_MSG_NOTICE(checking out ffmpeg cvs code from $2 into $1) AC_MSG_NOTICE(checking out ffmpeg cvs code from $2 into $1)
cvs -Q -d:pserver:anonymous@cvs.ffmpeg.sourceforge.net:/cvsroot/ffmpeg co -D '$2' ffmpeg || FAILED=yes cvs -Q -d:pserver:anonymous@cvs.ffmpeg.sourceforge.net:/cvsroot/ffmpeg co -D '$2' ffmpeg || FAILED=yes
cd ffmpeg echo "$2" > Tag
else else
# compare against Tag file and see if it needs updating # compare against Tag file and see if it needs updating
if diff -q Tag ffmpeg/CVS/Tag > /dev/null 2> /dev/null if test "`cat Tag`" == "$2"; then
then
# diff returned no problem
AC_MSG_NOTICE(ffmpeg cvs code in sync) AC_MSG_NOTICE(ffmpeg cvs code in sync)
else else
# diff says they differ
cd ffmpeg cd ffmpeg
AC_MSG_NOTICE(updating ffmpeg cvs code) AC_MSG_NOTICE(updating ffmpeg cvs code to $2)
cvs -Q update -dP -D '$2' || FAILED=yes cvs -Q update -dP -D '$2' || FAILED=yes
cd ..
echo "$2" > Tag
fi fi
fi fi

View file

@ -18,6 +18,9 @@
*/ */
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <config.h> #include <config.h>
#endif #endif

View file

@ -18,6 +18,9 @@
*/ */
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <config.h> #include <config.h>
#endif #endif
@ -269,12 +272,12 @@ gst_v4lmjpegsink_chain (GstPad *pad,
if (v4lmjpegsink->clock) { if (v4lmjpegsink->clock) {
GstClockID id; GstClockID id;
GST_DEBUG (0,"videosink: clock wait: %" G_GUINT64_FORMAT, GST_BUFFER_TIMESTAMP(buf)); GST_DEBUG ("videosink: clock wait: %" G_GUINT64_FORMAT, GST_BUFFER_TIMESTAMP(buf));
jitter = 0; /* FIXME: jitter = gst_clock_current_diff(v4lmjpegsink->clock, GST_BUFFER_TIMESTAMP (buf)); */ jitter = 0; /* FIXME: jitter = gst_clock_current_diff(v4lmjpegsink->clock, GST_BUFFER_TIMESTAMP (buf)); */
if (jitter > 500000 || jitter < -500000) if (jitter > 500000 || jitter < -500000)
GST_DEBUG (0, "jitter: %" G_GINT64_FORMAT, jitter); GST_DEBUG ("jitter: %" G_GINT64_FORMAT, jitter);
id = gst_clock_new_single_shot_id (v4lmjpegsink->clock, GST_BUFFER_TIMESTAMP(buf)); id = gst_clock_new_single_shot_id (v4lmjpegsink->clock, GST_BUFFER_TIMESTAMP(buf));
gst_element_clock_wait(GST_ELEMENT(v4lmjpegsink), id, NULL); gst_element_clock_wait(GST_ELEMENT(v4lmjpegsink), id, NULL);
@ -324,7 +327,7 @@ gst_v4lmjpegsink_buffer_new (GstBufferPool *pool,
if (!GST_V4L_IS_ACTIVE(GST_V4LELEMENT(v4lmjpegsink))) if (!GST_V4L_IS_ACTIVE(GST_V4LELEMENT(v4lmjpegsink)))
return NULL; return NULL;
if (v4lmjpegsink->breq.size < size) { if (v4lmjpegsink->breq.size < size) {
GST_DEBUG(GST_CAT_PLUGIN_INFO, "Requested buffer size is too large (%d > %ld)", GST_DEBUG ("Requested buffer size is too large (%d > %ld)",
size, v4lmjpegsink->breq.size); size, v4lmjpegsink->breq.size);
return NULL; return NULL;
} }

View file

@ -18,6 +18,9 @@
*/ */
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <config.h> #include <config.h>
#endif #endif

View file

@ -18,6 +18,9 @@
*/ */
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <config.h> #include <config.h>
#endif #endif

View file

@ -32,7 +32,7 @@
#include "v4l_calls.h" #include "v4l_calls.h"
#define DEBUG(format, args...) \ #define DEBUG(format, args...) \
GST_DEBUG_ELEMENT(GST_CAT_PLUGIN_INFO, \ GST_DEBUG_OBJECT (\
GST_ELEMENT(v4lelement), \ GST_ELEMENT(v4lelement), \
"V4L-overlay: " format, ##args) "V4L-overlay: " format, ##args)

View file

@ -28,10 +28,12 @@
#include <sys/mman.h> #include <sys/mman.h>
#include <string.h> #include <string.h>
#include <errno.h> #include <errno.h>
#include <unistd.h>
#include "v4l_calls.h" #include "v4l_calls.h"
#define DEBUG(format, args...) \ #define DEBUG(format, args...) \
GST_DEBUG_ELEMENT(GST_CAT_PLUGIN_INFO, \ GST_DEBUG_OBJECT (\
GST_ELEMENT(v4lelement), \ GST_ELEMENT(v4lelement), \
"V4L: " format, ##args) "V4L: " format, ##args)

View file

@ -37,7 +37,7 @@
#endif #endif
#define DEBUG(format, args...) \ #define DEBUG(format, args...) \
GST_DEBUG_ELEMENT(GST_CAT_PLUGIN_INFO, \ GST_DEBUG_OBJECT (\
GST_ELEMENT(v4lmjpegsink), \ GST_ELEMENT(v4lmjpegsink), \
"V4LMJPEGSINK: " format, ##args) "V4LMJPEGSINK: " format, ##args)

View file

@ -38,7 +38,7 @@
#define MIN_BUFFERS_QUEUED 2 #define MIN_BUFFERS_QUEUED 2
#define DEBUG(format, args...) \ #define DEBUG(format, args...) \
GST_DEBUG_ELEMENT(GST_CAT_PLUGIN_INFO, \ GST_DEBUG_OBJECT (\
GST_ELEMENT(v4lmjpegsrc), \ GST_ELEMENT(v4lmjpegsrc), \
"V4LMJPEGSRC: " format, ##args) "V4LMJPEGSRC: " format, ##args)
@ -551,7 +551,7 @@ gst_v4lmjpegsrc_grab_frame (GstV4lMjpegSrc *v4lmjpegsrc,
while (v4lmjpegsrc->frame_queue_state[v4lmjpegsrc->queue_frame] != while (v4lmjpegsrc->frame_queue_state[v4lmjpegsrc->queue_frame] !=
QUEUE_STATE_READY_FOR_QUEUE && QUEUE_STATE_READY_FOR_QUEUE &&
!v4lmjpegsrc->quit) { !v4lmjpegsrc->quit) {
GST_DEBUG(GST_CAT_PLUGIN_INFO, GST_DEBUG (
"Waiting for frames to become available (%d < %d)", "Waiting for frames to become available (%d < %d)",
v4lmjpegsrc->num_queued, MIN_BUFFERS_QUEUED); v4lmjpegsrc->num_queued, MIN_BUFFERS_QUEUED);
g_cond_wait(v4lmjpegsrc->cond_queue_state, g_cond_wait(v4lmjpegsrc->cond_queue_state,

View file

@ -41,7 +41,7 @@
#endif #endif
#define DEBUG(format, args...) \ #define DEBUG(format, args...) \
GST_DEBUG_ELEMENT(GST_CAT_PLUGIN_INFO, \ GST_DEBUG_OBJECT (\
GST_ELEMENT(v4lsrc), \ GST_ELEMENT(v4lsrc), \
"V4LSRC: " format, ##args) "V4LSRC: " format, ##args)
@ -296,7 +296,7 @@ gst_v4lsrc_grab_frame (GstV4lSrc *v4lsrc, gint *num)
while (v4lsrc->frame_queue_state[v4lsrc->queue_frame] != while (v4lsrc->frame_queue_state[v4lsrc->queue_frame] !=
QUEUE_STATE_READY_FOR_QUEUE && QUEUE_STATE_READY_FOR_QUEUE &&
!v4lsrc->quit) { !v4lsrc->quit) {
GST_DEBUG(GST_CAT_PLUGIN_INFO, GST_DEBUG (
"Waiting for frames to become available (%d < %d)", "Waiting for frames to become available (%d < %d)",
v4lsrc->num_queued, MIN_BUFFERS_QUEUED); v4lsrc->num_queued, MIN_BUFFERS_QUEUED);
g_cond_wait(v4lsrc->cond_queue_state, g_cond_wait(v4lsrc->cond_queue_state,