-Subproject commit 4e379694ae9ff9843d65cf08928642eea44abdf8
+Subproject commit 2a3efdc282fb1ecfd2720dea40523b3441f10fed
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
* 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"
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;
}
}
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);
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;
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 {
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:
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");
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);
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);
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:
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:
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);
/* #define GST_DEBUG_ENABLED */
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/* 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));
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) {
/* 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;
}
/* 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;
/* 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;
}
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);
add_index_associations (src);
}
- GST_DEBUG_LEAVE ("");
+ GST_DEBUG_OBJECT (src, "device successfully openend");
return TRUE;
}
}
if (!res) {
- GST_DEBUG (0, "could not convert offsets to sectors");
+ GST_DEBUG ("could not convert offsets to sectors");
goto error;
}
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;
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;
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
#include <gst/gst.h>
#include <libgnomevfs/gnome-vfs.h>
#include <string.h>
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),
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",
#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>
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),
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)
{
}
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),
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;
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;
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");
}
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;
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);
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];
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);
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;
}
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"));
{
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;
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);
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,
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);
}
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);
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
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
* 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);
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;
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)
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;
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) {
* Boston, MA 02111-1307, USA.
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
#include <string.h>
#include <sys/soundcard.h>
GstBuffer *buf;
do {
- GST_DEBUG (0, "vorbisdec: pull ");
+ GST_DEBUG ("vorbisdec: pull ");
buf = gst_pad_pull (vorbisdec->sinkpad);
} while (buf == NULL);
end:
- GST_DEBUG (0, "vorbisdec: pull done");
+ GST_DEBUG ("vorbisdec: pull done");
return buf;
}
buf = gst_vorbisdec_pull (vorbisdec, &oy);
if (!buf) {
eos = 1;
- GST_DEBUG (0, "vorbisdec: pulled NULL");
+ GST_DEBUG ("vorbisdec: pulled NULL");
break;
}
}
}
- 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
}
if (ogg_page_eos (&og)) {
eos = 1;
- GST_DEBUG (0, "vorbisdec: page_eos");
+ GST_DEBUG ("vorbisdec: page_eos");
}
}
}
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] */
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));
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
#include <stdlib.h>
#include <string.h>
#include <time.h>
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);
* Boston, MA 02111-1307, USA.
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
#include <string.h>
#include <gst/gst.h>
#include <vorbis/codec.h>
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 &&
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;
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);
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;
static int
gst_vorbisfile_close (void *datasource)
{
- GST_DEBUG (0, "close");
+ GST_DEBUG ("close");
return 0;
}
result = gst_bytestream_tell (vorbisfile->bs);
- GST_DEBUG (0, "tell %ld", result);
+ GST_DEBUG ("tell %ld", result);
return result;
}
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 */
sizeof (gint16), 1, &link);
if (ret == 0) {
- GST_DEBUG (0, "eos");
+ GST_DEBUG ("eos");
/* send EOS event */
/*ov_clear (&vorbisfile->vf);*/
vorbisfile->restart = TRUE;
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;
}
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;
}
}
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
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;
#ifdef HAVE_LIBMMX
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->need_transpose = TRUE;
break;
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->need_transpose = TRUE;
break;
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->need_transpose = TRUE;
break;
#endif /* HAVE_LIBMMX */
default:
- GST_INFO (GST_CAT_PLUGIN_INFO, "method not supported");
+ GST_INFO ( "method not supported");
g_free(new);
return NULL;
}
GstRiff *riff;
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));
g_return_val_if_fail(riff != NULL, NULL);
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);
g_return_val_if_fail(riff->state == GST_RIFF_STATE_HASAVIH ||
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);
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);
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);
size = GST_BUFFER_SIZE(buf);
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) {
gulong newsize;
- GST_DEBUG (0,"gst_riff_parser: recovering left data");
+ GST_DEBUG ("gst_riff_parser: recovering left data");
newsize = riff->dataleft_size + size;
riff->dataleft = g_realloc(riff->dataleft, newsize);
memcpy(riff->dataleft+riff->dataleft_size, GST_BUFFER_DATA(buf), size);
/* if we have an incomplete chunk from the previous buffer */
if (riff->incomplete_chunk) {
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;
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);
memcpy(riff->incomplete_chunk->data+riff->incomplete_chunk_size, GST_BUFFER_DATA(buf), leftover);
riff->incomplete_chunk = NULL;
}
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);
riff->incomplete_chunk_size += size;
return 0;
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 */
while ((riff->nextlikely+12) <= last) {
guint32 *words = (guint32 *)((guchar *)GST_BUFFER_DATA(buf) + riff->nextlikely - off );
while (riff->chunks) {
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);
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 */
riff->chunks = g_list_remove(riff->chunks, chunk);
}
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));
g_return_val_if_fail(chunk != NULL, GST_RIFF_ENOMEM);
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;
/* we push the list chunk on our 'stack' */
riff->chunks = g_list_prepend(riff->chunks,chunk);
}
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]),
gst_riff_id_to_fourcc(GUINT32_FROM_LE (words[0])), GUINT32_FROM_LE (words[1]));
if (riff->nextlikely > last) {
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);
memcpy(chunk->data, (gchar *)(words+2), left);
riff->incomplete_chunk = chunk;
}
if ((riff->nextlikely+12) > last && !riff->incomplete_chunk) {
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);
riff->dataleft = g_malloc(left);
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);
return fps;
if (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),
width?*width:0, height?*height:0);
* Boston, MA 02111-1307, USA.
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
#include "gstadder.h"
#include <gst/audio/audio.h>
#include <string.h> /* strcmp */
* so we need to go ahead and set all
the relevant values. */
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;
gst_caps_get_int (caps, "width", &adder->width);
gst_caps_get_int (caps, "depth", &adder->depth);
gst_caps_get_int (caps, "channels", &adder->channels);
gst_caps_get_int (caps, "rate", &adder->rate);
} 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;
gst_caps_get_string (caps, "layout", &adder->layout);
gst_caps_get_float (caps, "intercept", &adder->intercept);
p = (GstPad *) sinkpads->data;
if (p != pad && p != adder->srcpad) {
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 "
"(peer %s:%s)",
GST_DEBUG_PAD_NAME (p),
/* get data from all of the sinks */
inputs = adder->input_channels;
- GST_DEBUG (GST_CAT_PLUGIN_INFO, "starting to cycle through channels");
+ GST_DEBUG ("starting to cycle through channels");
while (inputs) {
guint32 got_bytes;
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)) {
- GST_DEBUG (GST_CAT_PLUGIN_INFO, "adder ignoring pad %s:%s",
+ GST_DEBUG ("adder ignoring pad %s:%s",
GST_DEBUG_PAD_NAME (input->sinkpad));
continue;
}
case GST_EVENT_EOS:
/* if we get an EOS event from one of our sink pads, we assume that
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);
continue;
case GST_EVENT_INTERRUPT:
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
* element ASAP or returns TRUE if we need to exit the loop */
if (gst_element_interrupt (GST_ELEMENT (adder))) {
/* 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
different data types and clamp limits. */
- GST_DEBUG (GST_CAT_PLUGIN_INFO,
+ GST_DEBUG (
"copying %d bytes from channel %p to output data %p "
"in buffer %p",
GST_BUFFER_SIZE (buf_out), input,
for (i = 0; i < GST_BUFFER_SIZE (buf_out); i++)
out[i] = CLAMP(out[i] + in[i], -128, 127);
} else {
- GST_ERROR (GST_ELEMENT (adder),
- "invalid width (%d) for int format in gstadder\n",
+ gst_element_error (GST_ELEMENT (adder),
+ "invalid width (%u) for int format in gstadder\n",
adder->width);
+ return;
}
} else if (adder->format == GST_ADDER_FORMAT_FLOAT) {
gfloat *in = (gfloat *) raw_in;
for (i = 0; i < GST_BUFFER_SIZE (buf_out) / sizeof (gfloat); i++)
out[i] += in[i];
} else {
- GST_ERROR (GST_ELEMENT (adder),
+ gst_element_error (GST_ELEMENT (adder),
"invalid audio format (%d) in gstadder\n",
adder->format);
+ return;
}
gst_bytestream_flush (input->bytestream, GST_BUFFER_SIZE (buf_out));
- GST_DEBUG (GST_CAT_PLUGIN_INFO, "done copying data");
+ GST_DEBUG ("done copying data");
}
}
/* send it out */
- GST_DEBUG (GST_CAT_PLUGIN_INFO, "pushing buf_out");
+ GST_DEBUG ("pushing buf_out");
gst_pad_push (adder->srcpad, buf_out);
}
* Boston, MA 02111-1307, USA.
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
#include <gst/gst.h>
#include <string.h>
#ifdef HAVE_CONFIG_H
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
#include <string.h>
#include <math.h>
data = GST_BUFFER_DATA(buf);
size = GST_BUFFER_SIZE(buf);
- GST_DEBUG (0,
+ GST_DEBUG (
"gst_audioscale_chain: got buffer of %ld bytes in '%s'\n",
size, gst_element_get_name (GST_ELEMENT (audioscale)));
break;
case ARG_FILTERLEN:
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;
case ARG_METHOD:
r->method = g_value_get_enum (value);
* Boston, MA 02111-1307, USA.
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
#include <math.h>
#include <stdlib.h>
#include <string.h>
src->freq = g_value_get_float (value);
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
/*#define DEBUG_ENABLED */
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
#include <gstvideoscale.h>
#include <videoscale.h>
GstCaps *sizecaps;
int i;
- GST_DEBUG(0,"gst_videoscale_src_link");
+ GST_DEBUG ("gst_videoscale_src_link");
videoscale = GST_VIDEOSCALE (gst_pad_get_parent (pad));
/* get list of peer's caps */
GstPadLinkReturn ret;
GstCaps *peercaps;
- GST_DEBUG(0,"gst_videoscale_src_link");
+ GST_DEBUG ("gst_videoscale_src_link");
videoscale = GST_VIDEOSCALE (gst_pad_get_parent (pad));
if (!GST_CAPS_IS_FIXED (caps)) {
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);
GstPadLinkReturn ret;
GstCaps *peercaps;
- GST_DEBUG(0,"gst_videoscale_src_link");
+ GST_DEBUG ("gst_videoscale_src_link");
videoscale = GST_VIDEOSCALE (gst_pad_get_parent (pad));
if (!GST_CAPS_IS_FIXED (caps)) {
static void
gst_videoscale_init (GstVideoscale *videoscale)
{
- GST_DEBUG(0,"gst_videoscale_init");
+ GST_DEBUG ("gst_videoscale_init");
videoscale->sinkpad = gst_pad_new_from_template (
GST_PAD_TEMPLATE_GET (gst_videoscale_sink_template_factory),
"sink");
gulong size;
GstBuffer *outbuf;
- GST_DEBUG (0,"gst_videoscale_chain");
+ GST_DEBUG ("gst_videoscale_chain");
g_return_if_fail (pad != NULL);
g_return_if_fail (GST_IS_PAD (pad));
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_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,
videoscale->from_width, videoscale->from_height,
videoscale->to_width, videoscale->to_height,
GST_BUFFER_TIMESTAMP(outbuf) = GST_BUFFER_TIMESTAMP(buf);
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);
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_pad_push(videoscale->srcpad, outbuf);
g_return_if_fail(GST_IS_VIDEOSCALE(object));
src = GST_VIDEOSCALE(object);
- GST_DEBUG(0,"gst_videoscale_set_property");
+ GST_DEBUG ("gst_videoscale_set_property");
switch (prop_id) {
case ARG_WIDTH:
src->forced_width = g_value_get_int (value);
{
int i;
- GST_DEBUG (0,"finding %p",caps);
+ GST_DEBUG ("finding %p",caps);
g_return_val_if_fail(caps != NULL, NULL);
void
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->from_width, videoscale->from_height,
videoscale->to_width, videoscale->to_height);
if(videoscale->to_width == videoscale->from_width &&
videoscale->to_height == videoscale->from_height){
- GST_DEBUG (0,"videoscale: using passthru");
+ GST_DEBUG ("videoscale: using passthru");
videoscale->passthru = TRUE;
videoscale->inited = TRUE;
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->format->depth) / 8;
int sh = scale->from_height;
int dw = scale->to_width;
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) {
case 2:
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);
}
#endif
int dw = scale->to_width;
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);
int dw = scale->to_width;
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);
}
int dw = scale->to_width;
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_str4(scale, dest+1, src+1, sw/2, sh, dw/2, dh);
int dw = scale->to_width;
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_str4(scale, dest, src+1, sw/2, sh, dw/2, dh);
int dw = scale->to_width;
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);
int dw = scale->to_width;
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);
int dw = scale->to_width;
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);
double dest;
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)+
a*(1-b)*RC(j+1,k);
double t1, t2, t3, t4;
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);
a2 = (1-2*a*a+a*a*a);
double xr, yr;
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++) {
yr = ((double)y)/zoomy;
for (x=0; x<dw; x++) {
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){
- 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);
}
else {
int sum, xcount, ycount, loop;
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;
yinc = (sh<<16)/dh;
guchar *destp = dest;
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;
guchar *destp = dest;
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;
guchar *destp = dest;
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;
guchar *destp = dest;
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;
guchar *destp = dest;
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;
guchar *destp = dest;
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;
unsigned char *eip;
unsigned char load, store;
- GST_DEBUG (0,"videoscale: setup scaling %p", copy_row);
+ GST_DEBUG ("videoscale: setup scaling %p", copy_row);
switch (bpp) {
case 1:
pos += inc;
}
*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));
}
/*#define DEBUG_ENABLED */
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
#include <gstvideotestsrc.h>
#include <videotestsrc.h>
{
GstVideotestsrc *videotestsrc;
- GST_DEBUG (0, "gst_videotestsrc_srcconnect");
+ GST_DEBUG ("gst_videotestsrc_srcconnect");
videotestsrc = GST_VIDEOTESTSRC (gst_pad_get_parent (pad));
for ( ; caps != NULL; caps = caps->next) {
}
if (caps == NULL) {
- GST_DEBUG (GST_CAT_PLUGIN_ERRORS,
+ GST_DEBUG (
"videotestsrc: no suitable opposite-side caps found");
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);
gst_caps_get_int (caps, "width", &videotestsrc->width);
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;
}
static void
gst_videotestsrc_init (GstVideotestsrc * videotestsrc)
{
- GST_DEBUG (0, "gst_videotestsrc_init");
+ GST_DEBUG ("gst_videotestsrc_init");
videotestsrc->srcpad =
gst_pad_new_from_template (GST_PAD_TEMPLATE_GET (videotestsrc_src_template_factory), "src");
GstBuffer *buf;
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 (GST_IS_PAD (pad), NULL);
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;
if (videotestsrc->pool) {
{
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){
case GST_VIDEOTESTSRC_SMPTE:
src->make_image = gst_videotestsrc_smpte;
g_return_if_fail (GST_IS_VIDEOTESTSRC (object));
src = GST_VIDEOTESTSRC (object);
- GST_DEBUG (0, "gst_videotestsrc_set_property");
+ GST_DEBUG ("gst_videotestsrc_set_property");
switch (prop_id) {
case ARG_WIDTH:
src->width = g_value_get_int (value);
format = g_value_get_string (value);
if(paintrect_find_name (format) != NULL){
src->forced_format = g_strdup(format);
- GST_DEBUG (0,"forcing format to \"%s\"\n", format);
+ GST_DEBUG ("forcing format to \"%s\"\n", format);
}else{
- GST_DEBUG (0,"unknown format \"%s\"\n", format);
+ GST_DEBUG ("unknown format \"%s\"\n", format);
}
break;
case ARG_RATE:
* Boston, MA 02111-1307, USA.
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
#include <string.h>
#include <gst/gst.h>
#include <gst/audio/audio.h>
AC_DEFUN(AS_SLURP_FFMPEG,
[
# save original dir
+ FAILED=""
DIRECTORY=`pwd`
# get/update cvs
if test ! -d $1; then mkdir -p $1; fi
# check out cvs code
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
- cd ffmpeg
+ echo "$2" > Tag
else
# compare against Tag file and see if it needs updating
- if diff -q Tag ffmpeg/CVS/Tag > /dev/null 2> /dev/null
- then
- # diff returned no problem
+ if test "`cat Tag`" == "$2"; then
AC_MSG_NOTICE(ffmpeg cvs code in sync)
else
- # diff says they differ
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
+ cd ..
+ echo "$2" > Tag
fi
fi
*/
#ifdef HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
#include <config.h>
#endif
*/
#ifdef HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
#include <config.h>
#endif
if (v4lmjpegsink->clock) {
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)); */
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));
gst_element_clock_wait(GST_ELEMENT(v4lmjpegsink), id, NULL);
if (!GST_V4L_IS_ACTIVE(GST_V4LELEMENT(v4lmjpegsink)))
return NULL;
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);
return NULL;
}
*/
#ifdef HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
#include <config.h>
#endif
*/
#ifdef HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
#include <config.h>
#endif
#include "v4l_calls.h"
#define DEBUG(format, args...) \
- GST_DEBUG_ELEMENT(GST_CAT_PLUGIN_INFO, \
+ GST_DEBUG_OBJECT (\
GST_ELEMENT(v4lelement), \
"V4L-overlay: " format, ##args)
#include <sys/mman.h>
#include <string.h>
#include <errno.h>
+#include <unistd.h>
+
#include "v4l_calls.h"
#define DEBUG(format, args...) \
- GST_DEBUG_ELEMENT(GST_CAT_PLUGIN_INFO, \
+ GST_DEBUG_OBJECT (\
GST_ELEMENT(v4lelement), \
"V4L: " format, ##args)
#endif
#define DEBUG(format, args...) \
- GST_DEBUG_ELEMENT(GST_CAT_PLUGIN_INFO, \
+ GST_DEBUG_OBJECT (\
GST_ELEMENT(v4lmjpegsink), \
"V4LMJPEGSINK: " format, ##args)
#define MIN_BUFFERS_QUEUED 2
#define DEBUG(format, args...) \
- GST_DEBUG_ELEMENT(GST_CAT_PLUGIN_INFO, \
+ GST_DEBUG_OBJECT (\
GST_ELEMENT(v4lmjpegsrc), \
"V4LMJPEGSRC: " format, ##args)
while (v4lmjpegsrc->frame_queue_state[v4lmjpegsrc->queue_frame] !=
QUEUE_STATE_READY_FOR_QUEUE &&
!v4lmjpegsrc->quit) {
- GST_DEBUG(GST_CAT_PLUGIN_INFO,
+ GST_DEBUG (
"Waiting for frames to become available (%d < %d)",
v4lmjpegsrc->num_queued, MIN_BUFFERS_QUEUED);
g_cond_wait(v4lmjpegsrc->cond_queue_state,
#endif
#define DEBUG(format, args...) \
- GST_DEBUG_ELEMENT(GST_CAT_PLUGIN_INFO, \
+ GST_DEBUG_OBJECT (\
GST_ELEMENT(v4lsrc), \
"V4LSRC: " format, ##args)
while (v4lsrc->frame_queue_state[v4lsrc->queue_frame] !=
QUEUE_STATE_READY_FOR_QUEUE &&
!v4lsrc->quit) {
- GST_DEBUG(GST_CAT_PLUGIN_INFO,
+ GST_DEBUG (
"Waiting for frames to become available (%d < %d)",
v4lsrc->num_queued, MIN_BUFFERS_QUEUED);
g_cond_wait(v4lsrc->cond_queue_state,