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:13 +00:00
parent 813b3a530e
commit f4a7caa418
78 changed files with 482 additions and 301 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

@ -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 <math.h> #include <math.h>
#include <sys/soundcard.h> #include <sys/soundcard.h>

View file

@ -20,6 +20,9 @@
* Boston, MA 02111-1307, USA. * Boston, MA 02111-1307, USA.
*/ */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "gstartsdsink.h" #include "gstartsdsink.h"
/* elementfactory information */ /* elementfactory information */
@ -233,7 +236,7 @@ gst_artsdsink_chain (GstPad *pad, GstBuffer *buf)
int bytes; int bytes;
void * bufptr = GST_BUFFER_DATA (buf); void * bufptr = GST_BUFFER_DATA (buf);
int bufsize = GST_BUFFER_SIZE (buf); int bufsize = GST_BUFFER_SIZE (buf);
GST_DEBUG (0, "artsdsink: stream=%p data=%p size=%d", GST_DEBUG ("artsdsink: stream=%p data=%p size=%d",
artsdsink->stream, GST_BUFFER_DATA (buf), GST_BUFFER_SIZE (buf)); artsdsink->stream, GST_BUFFER_DATA (buf), GST_BUFFER_SIZE (buf));
do { do {
@ -360,11 +363,11 @@ gst_artsdsink_open_audio (GstArtsdsink *sink)
return FALSE; return FALSE;
} }
GST_DEBUG (0, "artsdsink: attempting to open connection to aRtsd server"); GST_DEBUG ("artsdsink: attempting to open connection to aRtsd server");
sink->stream = arts_play_stream(sink->frequency, sink->depth, sink->stream = arts_play_stream(sink->frequency, sink->depth,
sink->channels, connname); sink->channels, connname);
/* FIXME: check connection */ /* FIXME: check connection */
/* GST_DEBUG (0, "artsdsink: can't open connection to aRtsd server"); */ /* GST_DEBUG ("artsdsink: can't open connection to aRtsd server"); */
GST_FLAG_SET (sink, GST_ARTSDSINK_OPEN); GST_FLAG_SET (sink, GST_ARTSDSINK_OPEN);
sink->connected = TRUE; sink->connected = TRUE;

View file

@ -21,6 +21,9 @@
*/ */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <gst/gst.h> #include <gst/gst.h>
#include <gst/audio/audio.h> #include <gst/audio/audio.h>
#include <string.h> #include <string.h>
@ -375,11 +378,11 @@ gst_afparse_open_file (GstAFParse *afparse)
break; break;
case AF_SAMPFMT_FLOAT: case AF_SAMPFMT_FLOAT:
case AF_SAMPFMT_DOUBLE: case AF_SAMPFMT_DOUBLE:
GST_DEBUG (GST_CAT_PLUGIN_INFO, "ERROR: float data not supported yet !\n"); GST_DEBUG ("ERROR: float data not supported yet !\n");
} }
afparse->rate = (guint) afGetRate (afparse->file, AF_DEFAULT_TRACK); afparse->rate = (guint) afGetRate (afparse->file, AF_DEFAULT_TRACK);
afparse->width = sampleWidth; afparse->width = sampleWidth;
GST_DEBUG (GST_CAT_PLUGIN_INFO, GST_DEBUG (
"input file: %d channels, %d width, %d rate, signed %s\n", "input file: %d channels, %d width, %d rate, signed %s\n",
afparse->channels, afparse->width, afparse->rate, afparse->channels, afparse->width, afparse->rate,
afparse->is_signed ? "yes" : "no"); afparse->is_signed ? "yes" : "no");

View file

@ -21,6 +21,9 @@
*/ */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <gst/gst.h> #include <gst/gst.h>
#include "gstafsink.h" #include "gstafsink.h"
@ -316,10 +319,10 @@ gst_afsink_open_file (GstAFSink *sink)
gst_caps_get_boolean (caps, "signed", &sink->is_signed); gst_caps_get_boolean (caps, "signed", &sink->is_signed);
gst_caps_get_int (caps, "endianness", &sink->endianness_data); gst_caps_get_int (caps, "endianness", &sink->endianness_data);
} }
GST_DEBUG (GST_CAT_PLUGIN_INFO, "channels %d, width %d, rate %d, signed %s", GST_DEBUG ("channels %d, width %d, rate %d, signed %s",
sink->channels, sink->width, sink->rate, sink->channels, sink->width, sink->rate,
sink->is_signed ? "yes" : "no"); sink->is_signed ? "yes" : "no");
GST_DEBUG (GST_CAT_PLUGIN_INFO, "endianness: data %d, output %d", GST_DEBUG ("endianness: data %d, output %d",
sink->endianness_data, sink->endianness_output); sink->endianness_data, sink->endianness_output);
/* setup the output file */ /* setup the output file */
if (sink->is_signed) if (sink->is_signed)
@ -485,7 +488,7 @@ gst_afsink_handle_event (GstPad *pad, GstEvent *event)
GstAFSink *afsink; GstAFSink *afsink;
afsink = GST_AFSINK (gst_pad_get_parent (pad)); afsink = GST_AFSINK (gst_pad_get_parent (pad));
GST_DEBUG (0, "DEBUG: afsink: got event"); GST_DEBUG ("DEBUG: afsink: got event");
gst_afsink_close_file (afsink); gst_afsink_close_file (afsink);
return TRUE; return TRUE;

View file

@ -21,6 +21,9 @@
*/ */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <gst/gst.h> #include <gst/gst.h>
#include <gst/audio/audio.h> #include <gst/audio/audio.h>
#include "gstafsrc.h" #include "gstafsrc.h"
@ -326,12 +329,12 @@ gst_afsrc_open_file (GstAFSrc *src)
break; break;
case AF_SAMPFMT_FLOAT: case AF_SAMPFMT_FLOAT:
case AF_SAMPFMT_DOUBLE: case AF_SAMPFMT_DOUBLE:
GST_DEBUG (GST_CAT_PLUGIN_INFO, GST_DEBUG (
"ERROR: float data not supported yet !\n"); "ERROR: float data not supported yet !\n");
} }
src->rate = (guint) afGetRate (src->file, AF_DEFAULT_TRACK); src->rate = (guint) afGetRate (src->file, AF_DEFAULT_TRACK);
src->width = sampleWidth; src->width = sampleWidth;
GST_DEBUG (GST_CAT_PLUGIN_INFO, GST_DEBUG (
"input file: %d channels, %d width, %d rate, signed %s\n", "input file: %d channels, %d width, %d rate, signed %s\n",
src->channels, src->width, src->rate, src->channels, src->width, src->rate,
src->is_signed ? "yes" : "no"); src->is_signed ? "yes" : "no");

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 <cdaudio.h> #include <cdaudio.h>
#include <gst/gst.h> #include <gst/gst.h>

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

@ -18,6 +18,9 @@
*/ */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <string.h> #include <string.h>
#include "gstgsmdec.h" #include "gstgsmdec.h"
@ -88,7 +91,7 @@ gst_gsmdec_class_init (GstGSMDec *klass)
static void static void
gst_gsmdec_init (GstGSMDec *gsmdec) gst_gsmdec_init (GstGSMDec *gsmdec)
{ {
GST_DEBUG (0,"gst_gsmdec_init: initializing"); GST_DEBUG ("gst_gsmdec_init: initializing");
/* create the sink and src pads */ /* create the sink and src pads */
gsmdec->sinkpad = gst_pad_new_from_template (gsmdec_sink_template, "sink"); gsmdec->sinkpad = gst_pad_new_from_template (gsmdec_sink_template, "sink");

View file

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

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 <gst/gst.h> #include <gst/gst.h>
#include "gstcolorspace.h" #include "gstcolorspace.h"
@ -134,7 +137,7 @@ colorspace_setup_converter (GstColorspace *space, GstCaps *from_caps, GstCaps *t
gst_caps_get_fourcc_int (from_caps, "format", &from_space); gst_caps_get_fourcc_int (from_caps, "format", &from_space);
gst_caps_get_fourcc_int (to_caps, "format", &to_space); gst_caps_get_fourcc_int (to_caps, "format", &to_space);
GST_INFO (GST_CAT_NEGOTIATION, "set up converter for %08x to %08x", from_space, to_space); GST_INFO ( "set up converter for %08x to %08x", from_space, to_space);
switch (from_space) { switch (from_space) {
case GST_MAKE_FOURCC ('R','G','B',' '): case GST_MAKE_FOURCC ('R','G','B',' '):
@ -159,10 +162,10 @@ colorspace_setup_converter (GstColorspace *space, GstCaps *from_caps, GstCaps *t
space->source.indexed = 0; space->source.indexed = 0;
space->source.has_colorkey = 0; space->source.has_colorkey = 0;
GST_INFO (GST_CAT_PLUGIN_INFO, "source red mask %08x", space->source.r); GST_INFO ( "source red mask %08x", space->source.r);
GST_INFO (GST_CAT_PLUGIN_INFO, "source green mask %08x", space->source.g); GST_INFO ( "source green mask %08x", space->source.g);
GST_INFO (GST_CAT_PLUGIN_INFO, "source blue mask %08x", space->source.b); GST_INFO ( "source blue mask %08x", space->source.b);
GST_INFO (GST_CAT_PLUGIN_INFO, "source bpp %08x", space->srcbpp); GST_INFO ( "source bpp %08x", space->srcbpp);
gst_caps_get_int (to_caps, "red_mask", &space->dest.r); gst_caps_get_int (to_caps, "red_mask", &space->dest.r);
gst_caps_get_int (to_caps, "green_mask", &space->dest.g); gst_caps_get_int (to_caps, "green_mask", &space->dest.g);
@ -172,16 +175,16 @@ colorspace_setup_converter (GstColorspace *space, GstCaps *from_caps, GstCaps *t
space->dest.indexed = 0; space->dest.indexed = 0;
space->dest.has_colorkey = 0; space->dest.has_colorkey = 0;
GST_INFO (GST_CAT_PLUGIN_INFO, "dest red mask %08x", space->dest.r); GST_INFO ( "dest red mask %08x", space->dest.r);
GST_INFO (GST_CAT_PLUGIN_INFO, "dest green mask %08x", space->dest.g); GST_INFO ( "dest green mask %08x", space->dest.g);
GST_INFO (GST_CAT_PLUGIN_INFO, "dest blue mask %08x", space->dest.b); GST_INFO ( "dest blue mask %08x", space->dest.b);
GST_INFO (GST_CAT_PLUGIN_INFO, "dest bpp %08x", space->destbpp); GST_INFO ( "dest bpp %08x", space->destbpp);
if (!Hermes_ConverterRequest (space->h_handle, &space->source, &space->dest)) { if (!Hermes_ConverterRequest (space->h_handle, &space->source, &space->dest)) {
g_warning ("Hermes: could not get converter\n"); g_warning ("Hermes: could not get converter\n");
return FALSE; return FALSE;
} }
GST_INFO (GST_CAT_PLUGIN_INFO, "converter set up"); GST_INFO ( "converter set up");
space->type = GST_COLORSPACE_HERMES; space->type = GST_COLORSPACE_HERMES;
return TRUE; return TRUE;
} }
@ -202,7 +205,7 @@ colorspace_setup_converter (GstColorspace *space, GstCaps *from_caps, GstCaps *t
return TRUE; return TRUE;
} }
case GST_MAKE_FOURCC ('Y','U','Y','2'): case GST_MAKE_FOURCC ('Y','U','Y','2'):
GST_INFO (GST_CAT_NEGOTIATION, "colorspace: RGB to YUV with bpp %d not implemented!!", from_bpp); GST_INFO ( "colorspace: RGB to YUV with bpp %d not implemented!!", from_bpp);
return FALSE; return FALSE;
} }
break; break;
@ -210,7 +213,7 @@ colorspace_setup_converter (GstColorspace *space, GstCaps *from_caps, GstCaps *t
case GST_MAKE_FOURCC ('I','4','2','0'): case GST_MAKE_FOURCC ('I','4','2','0'):
switch (to_space) { switch (to_space) {
case GST_MAKE_FOURCC ('R','G','B',' '): case GST_MAKE_FOURCC ('R','G','B',' '):
GST_INFO (GST_CAT_NEGOTIATION, "colorspace: YUV to RGB"); GST_INFO ( "colorspace: YUV to RGB");
gst_caps_get_int (to_caps, "bpp", &space->destbpp); gst_caps_get_int (to_caps, "bpp", &space->destbpp);
space->converter = gst_colorspace_yuv2rgb_get_converter (from_caps, to_caps); space->converter = gst_colorspace_yuv2rgb_get_converter (from_caps, to_caps);
@ -238,14 +241,14 @@ colorspace_setup_converter (GstColorspace *space, GstCaps *from_caps, GstCaps *t
space->destbpp = 16; space->destbpp = 16;
return TRUE; return TRUE;
case GST_MAKE_FOURCC ('R','G','B',' '): case GST_MAKE_FOURCC ('R','G','B',' '):
GST_INFO (GST_CAT_NEGOTIATION, "colorspace: YUY2 to RGB not implemented!!"); GST_INFO ( "colorspace: YUY2 to RGB not implemented!!");
return FALSE; return FALSE;
} }
break; break;
case GST_MAKE_FOURCC ('Y','V','1','2'): case GST_MAKE_FOURCC ('Y','V','1','2'):
switch (to_space) { switch (to_space) {
case GST_MAKE_FOURCC ('R','G','B',' '): case GST_MAKE_FOURCC ('R','G','B',' '):
GST_INFO (GST_CAT_NEGOTIATION, "colorspace: YV12 to RGB"); GST_INFO ( "colorspace: YV12 to RGB");
gst_caps_get_int (to_caps, "bpp", &space->destbpp); gst_caps_get_int (to_caps, "bpp", &space->destbpp);
space->converter = gst_colorspace_yuv2rgb_get_converter (from_caps, to_caps); space->converter = gst_colorspace_yuv2rgb_get_converter (from_caps, to_caps);
@ -306,7 +309,7 @@ gst_colorspace_sinkconnect (GstPad *pad, GstCaps *caps)
gst_caps_get_int (caps, "width", &space->width); gst_caps_get_int (caps, "width", &space->width);
gst_caps_get_int (caps, "height", &space->height); gst_caps_get_int (caps, "height", &space->height);
GST_INFO (GST_CAT_PROPERTIES, "size: %dx%d", space->width, space->height); GST_INFO ( "size: %dx%d", space->width, space->height);
gst_caps_replace_sink (&space->sinkcaps, caps); gst_caps_replace_sink (&space->sinkcaps, caps);

View file

@ -111,7 +111,7 @@ gst_colorspace_yuv2rgb_get_converter (GstCaps *from, GstCaps *to)
GstColorSpaceConverter *new; GstColorSpaceConverter *new;
gint to_bpp; gint to_bpp;
GST_DEBUG (0,"gst_colorspace_yuv2rgb_get_converter"); GST_DEBUG ("gst_colorspace_yuv2rgb_get_converter");
new = g_malloc (sizeof (GstColorSpaceConverter)); new = g_malloc (sizeof (GstColorSpaceConverter));
@ -138,9 +138,9 @@ gst_colorspace_yuv2rgb_get_converter (GstCaps *from, GstCaps *to)
gst_caps_get_int (to, "green_mask", &green_mask); gst_caps_get_int (to, "green_mask", &green_mask);
gst_caps_get_int (to, "blue_mask", &blue_mask); gst_caps_get_int (to, "blue_mask", &blue_mask);
GST_INFO (GST_CAT_PLUGIN_INFO, "red_mask %08x", red_mask); GST_INFO ( "red_mask %08x", red_mask);
GST_INFO (GST_CAT_PLUGIN_INFO, "green_mask %08x", green_mask); GST_INFO ( "green_mask %08x", green_mask);
GST_INFO (GST_CAT_PLUGIN_INFO, "blue_mask %08x", blue_mask); GST_INFO ( "blue_mask %08x", blue_mask);
new->insize = new->width * new->height + new->width * new->height/2; new->insize = new->width * new->height + new->width * new->height/2;
new->color_tables = gst_colorspace_init_yuv (to_bpp, red_mask, green_mask, blue_mask); new->color_tables = gst_colorspace_init_yuv (to_bpp, red_mask, green_mask, blue_mask);
@ -211,7 +211,7 @@ gst_colorspace_converter_destroy (GstColorSpaceConverter *conv)
static void gst_colorspace_I420_to_rgb32(GstColorSpaceConverter *space, unsigned char *src, unsigned char *dest) static void gst_colorspace_I420_to_rgb32(GstColorSpaceConverter *space, unsigned char *src, unsigned char *dest)
{ {
int size; int size;
GST_DEBUG (0,"gst_colorspace_I420_to_rgb32"); GST_DEBUG ("gst_colorspace_I420_to_rgb32");
size = space->width * space->height; size = space->width * space->height;
@ -227,7 +227,7 @@ static void gst_colorspace_I420_to_rgb32(GstColorSpaceConverter *space, unsigned
static void gst_colorspace_I420_to_rgb24(GstColorSpaceConverter *space, unsigned char *src, unsigned char *dest) { static void gst_colorspace_I420_to_rgb24(GstColorSpaceConverter *space, unsigned char *src, unsigned char *dest) {
int size; int size;
GST_DEBUG (0,"gst_colorspace_I420_to_rgb24"); GST_DEBUG ("gst_colorspace_I420_to_rgb24");
size = space->width * space->height; size = space->width * space->height;
@ -243,7 +243,7 @@ static void gst_colorspace_I420_to_rgb24(GstColorSpaceConverter *space, unsigned
static void gst_colorspace_I420_to_rgb16(GstColorSpaceConverter *space, unsigned char *src, unsigned char *dest) { static void gst_colorspace_I420_to_rgb16(GstColorSpaceConverter *space, unsigned char *src, unsigned char *dest) {
int size; int size;
GST_DEBUG (0,"gst_colorspace_I420_to_rgb16"); GST_DEBUG ("gst_colorspace_I420_to_rgb16");
size = space->width * space->height; size = space->width * space->height;
@ -260,7 +260,7 @@ static void gst_colorspace_I420_to_rgb16(GstColorSpaceConverter *space, unsigned
#ifdef HAVE_LIBMMX #ifdef HAVE_LIBMMX
static void gst_colorspace_I420_to_bgr32_mmx(GstColorSpaceConverter *space, unsigned char *src, unsigned char *dest) { static void gst_colorspace_I420_to_bgr32_mmx(GstColorSpaceConverter *space, unsigned char *src, unsigned char *dest) {
int size; int size;
GST_DEBUG (0,"gst_colorspace_I420_to_rgb32_mmx"); GST_DEBUG ("gst_colorspace_I420_to_rgb32_mmx");
size = space->width * space->height; size = space->width * space->height;
@ -275,7 +275,7 @@ static void gst_colorspace_I420_to_bgr32_mmx(GstColorSpaceConverter *space, unsi
} }
static void gst_colorspace_I420_to_bgr16_mmx(GstColorSpaceConverter *space, unsigned char *src, unsigned char *dest) { static void gst_colorspace_I420_to_bgr16_mmx(GstColorSpaceConverter *space, unsigned char *src, unsigned char *dest) {
int size; int size;
GST_DEBUG (0,"gst_colorspace_I420_to_bgr16_mmx "); GST_DEBUG ("gst_colorspace_I420_to_bgr16_mmx ");
size = space->width * space->height; size = space->width * space->height;
@ -286,7 +286,7 @@ static void gst_colorspace_I420_to_bgr16_mmx(GstColorSpaceConverter *space, unsi
dest, dest,
space->height, space->height,
space->width); space->width);
GST_DEBUG (0,"gst_colorspace_I420_to_bgr16_mmx done"); GST_DEBUG ("gst_colorspace_I420_to_bgr16_mmx done");
} }
#endif #endif
@ -295,7 +295,7 @@ static void gst_colorspace_I420_to_bgr16_mmx(GstColorSpaceConverter *space, unsi
static void gst_colorspace_YV12_to_rgb32(GstColorSpaceConverter *space, unsigned char *src, unsigned char *dest) static void gst_colorspace_YV12_to_rgb32(GstColorSpaceConverter *space, unsigned char *src, unsigned char *dest)
{ {
int size; int size;
GST_DEBUG (0,"gst_colorspace_YV12_to_rgb32"); GST_DEBUG ("gst_colorspace_YV12_to_rgb32");
size = space->width * space->height; size = space->width * space->height;
@ -311,7 +311,7 @@ static void gst_colorspace_YV12_to_rgb32(GstColorSpaceConverter *space, unsigned
static void gst_colorspace_YV12_to_rgb24(GstColorSpaceConverter *space, unsigned char *src, unsigned char *dest) { static void gst_colorspace_YV12_to_rgb24(GstColorSpaceConverter *space, unsigned char *src, unsigned char *dest) {
int size; int size;
GST_DEBUG (0,"gst_colorspace_YV12_to_rgb24"); GST_DEBUG ("gst_colorspace_YV12_to_rgb24");
size = space->width * space->height; size = space->width * space->height;
@ -327,7 +327,7 @@ static void gst_colorspace_YV12_to_rgb24(GstColorSpaceConverter *space, unsigned
static void gst_colorspace_YV12_to_rgb16(GstColorSpaceConverter *space, unsigned char *src, unsigned char *dest) { static void gst_colorspace_YV12_to_rgb16(GstColorSpaceConverter *space, unsigned char *src, unsigned char *dest) {
int size; int size;
GST_DEBUG (0,"gst_colorspace_YV12_to_rgb16"); GST_DEBUG ("gst_colorspace_YV12_to_rgb16");
size = space->width * space->height; size = space->width * space->height;
@ -344,7 +344,7 @@ static void gst_colorspace_YV12_to_rgb16(GstColorSpaceConverter *space, unsigned
#ifdef HAVE_LIBMMX #ifdef HAVE_LIBMMX
static void gst_colorspace_YV12_to_bgr32_mmx(GstColorSpaceConverter *space, unsigned char *src, unsigned char *dest) { static void gst_colorspace_YV12_to_bgr32_mmx(GstColorSpaceConverter *space, unsigned char *src, unsigned char *dest) {
int size; int size;
GST_DEBUG (0,"gst_colorspace_YV12_to_rgb32_mmx"); GST_DEBUG ("gst_colorspace_YV12_to_rgb32_mmx");
size = space->width * space->height; size = space->width * space->height;
@ -359,7 +359,7 @@ static void gst_colorspace_YV12_to_bgr32_mmx(GstColorSpaceConverter *space, unsi
} }
static void gst_colorspace_YV12_to_bgr16_mmx(GstColorSpaceConverter *space, unsigned char *src, unsigned char *dest) { static void gst_colorspace_YV12_to_bgr16_mmx(GstColorSpaceConverter *space, unsigned char *src, unsigned char *dest) {
int size; int size;
GST_DEBUG (0,"gst_colorspace_YV12_to_bgr16_mmx "); GST_DEBUG ("gst_colorspace_YV12_to_bgr16_mmx ");
size = space->width * space->height; size = space->width * space->height;
@ -370,7 +370,7 @@ static void gst_colorspace_YV12_to_bgr16_mmx(GstColorSpaceConverter *space, unsi
dest, dest,
space->height, space->height,
space->width); space->width);
GST_DEBUG (0,"gst_colorspace_YV12_to_bgr16_mmx done"); GST_DEBUG ("gst_colorspace_YV12_to_bgr16_mmx done");
} }
#endif #endif

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 <tremor/ivorbiscodec.h> #include <tremor/ivorbiscodec.h>
@ -231,7 +234,7 @@ gst_ivorbisfile_read (void *ptr, size_t size, size_t nmemb, void *datasource)
Ivorbisfile *ivorbisfile = GST_IVORBISFILE (datasource); Ivorbisfile *ivorbisfile = GST_IVORBISFILE (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 (!ivorbisfile->may_eos && ivorbisfile->total_bytes && if (!ivorbisfile->may_eos && ivorbisfile->total_bytes &&
@ -253,7 +256,7 @@ gst_ivorbisfile_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");
ivorbisfile->eos = TRUE; ivorbisfile->eos = TRUE;
if (avail == 0) { if (avail == 0) {
gst_event_unref (event); gst_event_unref (event);
@ -261,7 +264,7 @@ gst_ivorbisfile_read (void *ptr, size_t size, size_t nmemb, void *datasource)
} }
break; break;
case GST_EVENT_DISCONTINUOUS: case GST_EVENT_DISCONTINUOUS:
GST_DEBUG (0, "discont"); GST_DEBUG ("discont");
ivorbisfile->need_discont = TRUE; ivorbisfile->need_discont = TRUE;
default: default:
break; break;
@ -295,7 +298,7 @@ gst_ivorbisfile_seek (void *datasource, int64_t offset, int whence)
return -1; return -1;
} }
GST_DEBUG (0, "seek %lld %d", offset, whence); GST_DEBUG ("seek %lld %d", offset, whence);
if (whence == SEEK_SET) { if (whence == SEEK_SET) {
method = GST_SEEK_METHOD_SET; method = GST_SEEK_METHOD_SET;
@ -326,7 +329,7 @@ gst_ivorbisfile_seek (void *datasource, int64_t offset, int whence)
static int static int
gst_ivorbisfile_close (void *datasource) gst_ivorbisfile_close (void *datasource)
{ {
GST_DEBUG (0, "close"); GST_DEBUG ("close");
return 0; return 0;
} }
@ -338,7 +341,7 @@ gst_ivorbisfile_tell (void *datasource)
result = gst_bytestream_tell (ivorbisfile->bs); result = gst_bytestream_tell (ivorbisfile->bs);
GST_DEBUG (0, "tell %ld", result); GST_DEBUG ("tell %ld", result);
return result; return result;
} }
@ -489,7 +492,7 @@ gst_ivorbisfile_loop (GstElement *element)
ivorbisfile->may_eos = FALSE; ivorbisfile->may_eos = FALSE;
ivorbisfile->vf.seekable = gst_bytestream_seek (ivorbisfile->bs, 0, ivorbisfile->vf.seekable = gst_bytestream_seek (ivorbisfile->bs, 0,
GST_SEEK_METHOD_SET); GST_SEEK_METHOD_SET);
GST_DEBUG (GST_CAT_PLUGIN_INFO, "ivorbisfile: seekable: %s\n", GST_DEBUG ("ivorbisfile: seekable: %s\n",
ivorbisfile->vf.seekable ? "yes" : "no"); ivorbisfile->vf.seekable ? "yes" : "no");
/* open our custom ivorbisfile data object with the callbacks we provide */ /* open our custom ivorbisfile data object with the callbacks we provide */
@ -576,7 +579,7 @@ gst_ivorbisfile_loop (GstElement *element)
&link); &link);
if (ret == 0) { if (ret == 0) {
GST_DEBUG (0, "eos"); GST_DEBUG ("eos");
/* send EOS event */ /* send EOS event */
/*ov_clear (&ivorbisfile->vf);*/ /*ov_clear (&ivorbisfile->vf);*/
ivorbisfile->restart = TRUE; ivorbisfile->restart = TRUE;
@ -935,11 +938,11 @@ gst_ivorbisfile_src_event (GstPad *pad, GstEvent *event)
vorbis_info *vi; vorbis_info *vi;
GstFormat format; GstFormat format;
GST_DEBUG (GST_CAT_EVENT, "ivorbisfile: handling seek event on pad %s:%s", GST_DEBUG ("ivorbisfile: handling seek event on pad %s:%s",
GST_DEBUG_PAD_NAME (pad)); GST_DEBUG_PAD_NAME (pad));
if (!ivorbisfile->vf.seekable) { if (!ivorbisfile->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;
} }
@ -957,7 +960,7 @@ gst_ivorbisfile_src_event (GstPad *pad, GstEvent *event)
case GST_FORMAT_BYTES: case GST_FORMAT_BYTES:
vi = ov_info (&ivorbisfile->vf, -1); vi = ov_info (&ivorbisfile->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;
} }
@ -980,7 +983,7 @@ gst_ivorbisfile_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

@ -17,6 +17,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 <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include "gstjack.h" #include "gstjack.h"

View file

@ -80,7 +80,7 @@ gst_jack_bin_class_init(GstJackBinClass *klass)
static void static void
gst_jack_bin_init(GstJackBin *this) gst_jack_bin_init(GstJackBin *this)
{ {
GST_DEBUG (GST_CAT_THREAD, "initializing jack bin"); GST_DEBUG ("initializing jack bin");
/* jack bins are managing bins and iterate themselves */ /* jack bins are managing bins and iterate themselves */
GST_FLAG_SET (this, GST_BIN_FLAG_MANAGER); GST_FLAG_SET (this, GST_BIN_FLAG_MANAGER);

View file

@ -170,19 +170,19 @@ gst_ladspa_class_init (GstLADSPAClass *klass)
for (i=0;i<desc->PortCount;i++) { for (i=0;i<desc->PortCount;i++) {
if (LADSPA_IS_PORT_AUDIO(desc->PortDescriptors[i]) && if (LADSPA_IS_PORT_AUDIO(desc->PortDescriptors[i]) &&
LADSPA_IS_PORT_INPUT(desc->PortDescriptors[i])){ LADSPA_IS_PORT_INPUT(desc->PortDescriptors[i])){
GST_DEBUG (0, "input port %d", i); GST_DEBUG ("input port %d", i);
klass->sinkpad_portnums[sinkcount++] = i; klass->sinkpad_portnums[sinkcount++] = i;
} }
if (LADSPA_IS_PORT_AUDIO(desc->PortDescriptors[i]) && if (LADSPA_IS_PORT_AUDIO(desc->PortDescriptors[i]) &&
LADSPA_IS_PORT_OUTPUT(desc->PortDescriptors[i])){ LADSPA_IS_PORT_OUTPUT(desc->PortDescriptors[i])){
GST_DEBUG (0, "output port %d", i); GST_DEBUG ("output port %d", i);
klass->srcpad_portnums[srccount++] = i; klass->srcpad_portnums[srccount++] = i;
} }
if (LADSPA_IS_PORT_CONTROL(desc->PortDescriptors[i]) && if (LADSPA_IS_PORT_CONTROL(desc->PortDescriptors[i]) &&
LADSPA_IS_PORT_INPUT(desc->PortDescriptors[i])){ LADSPA_IS_PORT_INPUT(desc->PortDescriptors[i])){
GST_DEBUG (0, "control port %d", i); GST_DEBUG ("control port %d", i);
klass->control_portnums[controlcount++] = i; klass->control_portnums[controlcount++] = i;
} }
} }
@ -324,7 +324,7 @@ gst_ladspa_class_init (GstLADSPAClass *klass)
klass->control_info[i].param_name = argname; klass->control_info[i].param_name = argname;
GST_DEBUG (0, "adding arg %s from %s",argname, klass->control_info[i].name); GST_DEBUG ("adding arg %s from %s",argname, klass->control_info[i].name);
if (argtype==G_TYPE_BOOLEAN){ if (argtype==G_TYPE_BOOLEAN){
paramspec = g_param_spec_boolean(argname,argname,argname, FALSE, argperms); paramspec = g_param_spec_boolean(argname,argname,argname, FALSE, argperms);
@ -443,7 +443,7 @@ gst_ladspa_init (GstLADSPA *ladspa)
if (sinkcount==0 && srccount == 1) { if (sinkcount==0 && srccount == 1) {
/* get mode (no sink pads) */ /* get mode (no sink pads) */
GST_DEBUG (0, "mono get mode with 1 src pad"); GST_DEBUG ("mono get mode with 1 src pad");
ladspa->newcaps = TRUE; ladspa->newcaps = TRUE;
@ -451,14 +451,14 @@ gst_ladspa_init (GstLADSPA *ladspa)
gst_pad_set_get_function (ladspa->srcpads[0], gst_ladspa_get); gst_pad_set_get_function (ladspa->srcpads[0], gst_ladspa_get);
} else if (sinkcount==1){ } else if (sinkcount==1){
/* with one sink we can use the chain function */ /* with one sink we can use the chain function */
GST_DEBUG (0, "chain mode"); GST_DEBUG ("chain mode");
gst_pad_set_link_function (ladspa->sinkpads[0], gst_ladspa_connect); gst_pad_set_link_function (ladspa->sinkpads[0], gst_ladspa_connect);
gst_pad_set_chain_function (ladspa->sinkpads[0], gst_ladspa_chain); gst_pad_set_chain_function (ladspa->sinkpads[0], gst_ladspa_chain);
gst_pad_set_bufferpool_function (ladspa->sinkpads[0], gst_ladspa_get_bufferpool); gst_pad_set_bufferpool_function (ladspa->sinkpads[0], gst_ladspa_get_bufferpool);
} else if (sinkcount > 1){ } else if (sinkcount > 1){
/* more than one sink pad needs loop mode */ /* more than one sink pad needs loop mode */
GST_DEBUG (0, "loop mode with %d sink pads and %d src pads", sinkcount, srccount); GST_DEBUG ("loop mode with %d sink pads and %d src pads", sinkcount, srccount);
for (i=0;i<sinkcount;i++) { for (i=0;i<sinkcount;i++) {
gst_pad_set_link_function (ladspa->sinkpads[i], gst_ladspa_connect); gst_pad_set_link_function (ladspa->sinkpads[i], gst_ladspa_connect);
@ -469,7 +469,7 @@ gst_ladspa_init (GstLADSPA *ladspa)
else if (sinkcount==0 && srccount == 0){ else if (sinkcount==0 && srccount == 0){
/* for some reason these plugins exist - we'll just ignore them */ /* for some reason these plugins exist - we'll just ignore them */
} else { } else {
GST_DEBUG (0, "%d sink pads, %d src pads not yet supported", sinkcount, srccount); GST_DEBUG ("%d sink pads, %d src pads not yet supported", sinkcount, srccount);
} }
gst_ladspa_instantiate (ladspa); gst_ladspa_instantiate (ladspa);
@ -539,7 +539,7 @@ gst_ladspa_connect_get (GstPad *pad, GstCaps *caps)
static void static void
gst_ladspa_force_src_caps(GstLADSPA *ladspa, GstPad *pad) gst_ladspa_force_src_caps(GstLADSPA *ladspa, GstPad *pad)
{ {
GST_DEBUG (0, "forcing caps with rate %d", ladspa->samplerate); GST_DEBUG ("forcing caps with rate %d", ladspa->samplerate);
gst_pad_try_set_caps (pad, gst_caps_new ( gst_pad_try_set_caps (pad, gst_caps_new (
"ladspa_src_caps", "ladspa_src_caps",
"audio/raw", "audio/raw",
@ -605,7 +605,7 @@ gst_ladspa_set_property (GObject *object, guint prop_id, const GValue *value, GP
ladspa->controls[cid] = val; ladspa->controls[cid] = val;
} }
GST_DEBUG (0, "set arg %s to %f", control_info->name, ladspa->controls[cid]); GST_DEBUG ("set arg %s to %f", control_info->name, ladspa->controls[cid]);
} }
static void static void
@ -633,7 +633,7 @@ gst_ladspa_get_property (GObject *object, guint prop_id, GValue *value, GParamSp
control_info = &(oclass->control_info[cid]); control_info = &(oclass->control_info[cid]);
if (control_info->name == NULL) return; if (control_info->name == NULL) return;
GST_DEBUG (0, "got arg %s as %f", control_info->name, ladspa->controls[cid]); GST_DEBUG ("got arg %s as %f", control_info->name, ladspa->controls[cid]);
/* now see what type it is */ /* now see what type it is */
if (control_info->toggled) { if (control_info->toggled) {
@ -666,7 +666,7 @@ gst_ladspa_instantiate (GstLADSPA *ladspa)
} }
/* instantiate the plugin */ /* instantiate the plugin */
GST_DEBUG (0, "instantiating the plugin"); GST_DEBUG ("instantiating the plugin");
ladspa->handle = desc->instantiate(desc,ladspa->samplerate); ladspa->handle = desc->instantiate(desc,ladspa->samplerate);
g_return_val_if_fail (ladspa->handle != NULL, FALSE); g_return_val_if_fail (ladspa->handle != NULL, FALSE);
@ -674,7 +674,7 @@ gst_ladspa_instantiate (GstLADSPA *ladspa)
/* walk through the ports and add all the arguments */ /* walk through the ports and add all the arguments */
for (i=0;i<oclass->numcontrols;i++) { for (i=0;i<oclass->numcontrols;i++) {
/* connect the argument to the plugin */ /* connect the argument to the plugin */
GST_DEBUG (0, "added control port %d", oclass->control_portnums[i]); GST_DEBUG ("added control port %d", oclass->control_portnums[i]);
desc->connect_port(ladspa->handle, desc->connect_port(ladspa->handle,
oclass->control_portnums[i], oclass->control_portnums[i],
&(ladspa->controls[i])); &(ladspa->controls[i]));
@ -694,7 +694,7 @@ gst_ladspa_change_state (GstElement *element)
GstLADSPA *ladspa = (GstLADSPA*)element; GstLADSPA *ladspa = (GstLADSPA*)element;
desc = ladspa->descriptor; desc = ladspa->descriptor;
GST_DEBUG (0, "changing state"); GST_DEBUG ("changing state");
switch (GST_STATE_TRANSITION (element)) { switch (GST_STATE_TRANSITION (element)) {
case GST_STATE_NULL_TO_READY: case GST_STATE_NULL_TO_READY:
gst_ladspa_activate(ladspa); gst_ladspa_activate(ladspa);
@ -722,7 +722,7 @@ gst_ladspa_activate(GstLADSPA *ladspa)
gst_ladspa_deactivate(ladspa); gst_ladspa_deactivate(ladspa);
} }
GST_DEBUG (0, "activating"); GST_DEBUG ("activating");
/* activate the plugin (function might be null) */ /* activate the plugin (function might be null) */
if (desc->activate != NULL) { if (desc->activate != NULL) {
@ -738,7 +738,7 @@ gst_ladspa_deactivate(GstLADSPA *ladspa)
LADSPA_Descriptor *desc; LADSPA_Descriptor *desc;
desc = ladspa->descriptor; desc = ladspa->descriptor;
GST_DEBUG (0, "deactivating"); GST_DEBUG ("deactivating");
/* deactivate the plugin (function might be null) */ /* deactivate the plugin (function might be null) */
if (ladspa->activated && (desc->deactivate != NULL)) { if (ladspa->activated && (desc->deactivate != NULL)) {
@ -776,11 +776,11 @@ gst_ladspa_loop(GstElement *element)
/* find a bufferpool */ /* find a bufferpool */
if (numsrcpads > 0 && (bufpool = gst_pad_get_bufferpool (ladspa->srcpads[0]))) { if (numsrcpads > 0 && (bufpool = gst_pad_get_bufferpool (ladspa->srcpads[0]))) {
GST_DEBUG (0, "Got bufferpool from first source pad"); GST_DEBUG ("Got bufferpool from first source pad");
} else { } else {
bufferbytesize = sizeof (LADSPA_Data) * ladspa->buffersize; bufferbytesize = sizeof (LADSPA_Data) * ladspa->buffersize;
bufpool = gst_buffer_pool_get_default (bufferbytesize, ladspa->numbuffers); bufpool = gst_buffer_pool_get_default (bufferbytesize, ladspa->numbuffers);
GST_DEBUG (0, "Created default bufferpool, %d x %d bytes", ladspa->numbuffers, bufferbytesize); GST_DEBUG ("Created default bufferpool, %d x %d bytes", ladspa->numbuffers, bufferbytesize);
} }
/* get the bytestreams for each pad */ /* get the bytestreams for each pad */
@ -803,7 +803,7 @@ gst_ladspa_loop(GstElement *element)
num_empty_pads = 0; num_empty_pads = 0;
/* first get all the necessary data from the input ports */ /* first get all the necessary data from the input ports */
for (i=0 ; i<numsinkpads ; i++){ for (i=0 ; i<numsinkpads ; i++){
GST_DEBUG (0, "pulling %u bytes through channel %d's bytestream", bufferbytesize, i); GST_DEBUG ("pulling %u bytes through channel %d's bytestream", bufferbytesize, i);
got_bytes = gst_bytestream_read (bytestreams[i], buffers_in + i, bufferbytesize); got_bytes = gst_bytestream_read (bytestreams[i], buffers_in + i, bufferbytesize);
if (got_bytes != bufferbytesize) { if (got_bytes != bufferbytesize) {
@ -814,7 +814,7 @@ gst_ladspa_loop(GstElement *element)
/* 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. delete the bytestream, free up the pad's finished handling data. delete the bytestream, free up the
pad, and free up the memory associated with the input channel. */ pad, and free up the memory associated with the input channel. */
GST_DEBUG (0, "got an EOS event on sinkpad %d", i); GST_DEBUG ("got an EOS event on sinkpad %d", i);
} }
/* CHECKME should maybe check for other events and try to pull more data here */ /* CHECKME should maybe check for other events and try to pull more data here */
num_empty_pads++; num_empty_pads++;
@ -845,7 +845,7 @@ gst_ladspa_loop(GstElement *element)
else { else {
/* all pads have EOS, time to quit */ /* all pads have EOS, time to quit */
/* CHECKME do I have to push EOS events here? */ /* CHECKME do I have to push EOS events here? */
GST_DEBUG (0, "All sink pads have EOS, finishing."); GST_DEBUG ("All sink pads have EOS, finishing.");
break; break;
} }
} }
@ -878,7 +878,7 @@ gst_ladspa_loop(GstElement *element)
} }
for (i=0 ; i<numsrcpads ; i++) { for (i=0 ; i<numsrcpads ; i++) {
GST_DEBUG (0, "pushing buffer (%p) on src pad %d", buffers_out[i], i); GST_DEBUG ("pushing buffer (%p) on src pad %d", buffers_out[i], i);
gst_pad_push (ladspa->srcpads[i], buffers_out[i]); gst_pad_push (ladspa->srcpads[i], buffers_out[i]);
data_out[i] = NULL; data_out[i] = NULL;

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 <gst/gst.h> #include <gst/gst.h>
#include <lcs/lcs.h> #include <lcs/lcs.h>
@ -181,7 +184,7 @@ colorspace_find_lcs_format (GstCaps *caps)
format = lcs_format_new_simple_rgb_packed (red_bits, green_bits, blue_bits, 0, format = lcs_format_new_simple_rgb_packed (red_bits, green_bits, blue_bits, 0,
red_shift, green_shift, blue_shift, 0, depth, G_BYTE_ORDER); red_shift, green_shift, blue_shift, 0, depth, G_BYTE_ORDER);
GST_DEBUG (GST_CAT_NEGOTIATION, "%lu %lu %lu %lu %lu %lu %u %s\n", red_bits, green_bits, blue_bits, GST_DEBUG ("%lu %lu %lu %lu %lu %lu %u %s\n", red_bits, green_bits, blue_bits,
red_shift, green_shift, blue_shift, depth, lcs_format_get_layout (format)); red_shift, green_shift, blue_shift, depth, lcs_format_get_layout (format));
} }
else { else {
@ -210,11 +213,11 @@ colorspace_setup_converter (GstColorspace *space, GstCaps *from_caps, GstCaps *t
from_format = colorspace_find_lcs_format (from_caps); from_format = colorspace_find_lcs_format (from_caps);
to_format = colorspace_find_lcs_format (to_caps); to_format = colorspace_find_lcs_format (to_caps);
GST_DEBUG (GST_CAT_NEGOTIATION, "trying from %4.4s to %4.4s\n", (gchar*)&from_space, (gchar*)&to_space); GST_DEBUG ("trying from %4.4s to %4.4s\n", (gchar*)&from_space, (gchar*)&to_space);
space->converter = lcs_get_converter (from_format, to_format, LCS_FLAG_FAST); space->converter = lcs_get_converter (from_format, to_format, LCS_FLAG_FAST);
if (space->converter) { if (space->converter) {
GST_DEBUG (GST_CAT_NEGOTIATION, "converting from %4.4s to %4.4s\n", (gchar*)&from_space, (gchar*)&to_space); GST_DEBUG ("converting from %4.4s to %4.4s\n", (gchar*)&from_space, (gchar*)&to_space);
space->type = GST_COLORSPACE_LCS; space->type = GST_COLORSPACE_LCS;
return TRUE; return TRUE;
} }
@ -258,7 +261,7 @@ gst_colorspace_sinkconnect (GstPad *pad, GstCaps *caps)
gst_caps_get_int (caps, "width", &space->width); gst_caps_get_int (caps, "width", &space->width);
gst_caps_get_int (caps, "height", &space->height); gst_caps_get_int (caps, "height", &space->height);
GST_INFO (GST_CAT_PROPERTIES, "size: %dx%d", space->width, space->height); GST_INFO ( "size: %dx%d", space->width, space->height);
space->sinkcaps = caps; space->sinkcaps = caps;

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 <fame.h> #include <fame.h>
#include <string.h> #include <string.h>
@ -309,7 +312,7 @@ gst_famedec_sinkconnect (GstPad *pad, GstCaps *caps)
return GST_PAD_LINK_DELAYED; return GST_PAD_LINK_DELAYED;
if (famedec->initialized) { if (famedec->initialized) {
GST_DEBUG(0, "error: famedec decoder already initialized !"); GST_DEBUG ("error: famedec decoder already initialized !");
return GST_PAD_LINK_REFUSED; return GST_PAD_LINK_REFUSED;
} }
@ -412,7 +415,7 @@ gst_famedec_chain (GstPad *pad, GstBuffer *buf)
data = (guchar *) GST_BUFFER_DATA (buf); data = (guchar *) GST_BUFFER_DATA (buf);
size = GST_BUFFER_SIZE (buf); size = GST_BUFFER_SIZE (buf);
GST_DEBUG (0,"gst_famedec_chain: got buffer of %ld bytes in '%s'", GST_DEBUG ("gst_famedec_chain: got buffer of %ld bytes in '%s'",
size, GST_OBJECT_NAME (famedec)); size, GST_OBJECT_NAME (famedec));
/* the data contains the three planes side by side, with size w * h, w * h /4, /* the data contains the three planes side by side, with size w * h, w * h /4,
@ -442,7 +445,7 @@ gst_famedec_chain (GstPad *pad, GstBuffer *buf)
GST_BUFFER_DATA (outbuf) = g_malloc (length); GST_BUFFER_DATA (outbuf) = g_malloc (length);
memcpy (GST_BUFFER_DATA(outbuf), famedec->buffer, length); memcpy (GST_BUFFER_DATA(outbuf), famedec->buffer, length);
GST_DEBUG (0,"gst_famedec_chain: pushing buffer of size %d", GST_DEBUG ("gst_famedec_chain: pushing buffer of size %d",
GST_BUFFER_SIZE(outbuf)); GST_BUFFER_SIZE(outbuf));
gst_pad_push (famedec->srcpad, outbuf); gst_pad_push (famedec->srcpad, outbuf);
@ -463,7 +466,7 @@ gst_famedec_set_property (GObject *object, guint prop_id,
famedec = GST_FAMEENC (object); famedec = GST_FAMEENC (object);
if (famedec->initialized) { if (famedec->initialized) {
GST_DEBUG(0, "error: famedec decoder already initialized, cannot set properties !"); GST_DEBUG ("error: famedec decoder already initialized, cannot set properties !");
return; return;
} }

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 <fame.h> #include <fame.h>
#include <string.h> #include <string.h>
@ -308,7 +311,7 @@ gst_fameenc_sinkconnect (GstPad *pad, GstCaps *caps)
return GST_PAD_LINK_DELAYED; return GST_PAD_LINK_DELAYED;
if (fameenc->initialized) { if (fameenc->initialized) {
GST_DEBUG(0, "error: fameenc encoder already initialized !"); GST_DEBUG ("error: fameenc encoder already initialized !");
return GST_PAD_LINK_REFUSED; return GST_PAD_LINK_REFUSED;
} }
@ -415,7 +418,7 @@ gst_fameenc_chain (GstPad *pad, GstBuffer *buf)
data = (guchar *) GST_BUFFER_DATA (buf); data = (guchar *) GST_BUFFER_DATA (buf);
size = GST_BUFFER_SIZE (buf); size = GST_BUFFER_SIZE (buf);
GST_DEBUG (0,"gst_fameenc_chain: got buffer of %ld bytes in '%s'", GST_DEBUG ("gst_fameenc_chain: got buffer of %ld bytes in '%s'",
size, GST_OBJECT_NAME (fameenc)); size, GST_OBJECT_NAME (fameenc));
/* the data contains the three planes side by side, with size w * h, w * h /4, /* the data contains the three planes side by side, with size w * h, w * h /4,
@ -453,7 +456,7 @@ gst_fameenc_chain (GstPad *pad, GstBuffer *buf)
memcpy (GST_BUFFER_DATA(outbuf), fameenc->buffer, length); memcpy (GST_BUFFER_DATA(outbuf), fameenc->buffer, length);
GST_BUFFER_TIMESTAMP (outbuf) = GST_BUFFER_TIMESTAMP (buf); GST_BUFFER_TIMESTAMP (outbuf) = GST_BUFFER_TIMESTAMP (buf);
GST_DEBUG (0,"gst_fameenc_chain: pushing buffer of size %d", GST_DEBUG ("gst_fameenc_chain: pushing buffer of size %d",
GST_BUFFER_SIZE(outbuf)); GST_BUFFER_SIZE(outbuf));
gst_pad_push (fameenc->srcpad, outbuf); gst_pad_push (fameenc->srcpad, outbuf);
@ -474,7 +477,7 @@ gst_fameenc_set_property (GObject *object, guint prop_id,
fameenc = GST_FAMEENC (object); fameenc = GST_FAMEENC (object);
if (fameenc->initialized) { if (fameenc->initialized) {
GST_DEBUG(0, "error: fameenc encoder already initialized, cannot set properties !"); GST_DEBUG ("error: fameenc encoder already initialized, cannot set properties !");
return; return;
} }

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 "massink.h" #include "massink.h"
#define BUFFER_SIZE 640 #define BUFFER_SIZE 640
@ -218,14 +221,14 @@ gst_massink_chain (GstPad *pad, GstBuffer *buf)
if (massink->clock) { if (massink->clock) {
GstClockID id = gst_clock_new_single_shot_id (massink->clock, GST_BUFFER_TIMESTAMP (buf)); GstClockID id = gst_clock_new_single_shot_id (massink->clock, GST_BUFFER_TIMESTAMP (buf));
GST_DEBUG (0, "massink: clock wait: %llu\n", GST_BUFFER_TIMESTAMP (buf)); GST_DEBUG ("massink: clock wait: %llu\n", GST_BUFFER_TIMESTAMP (buf));
gst_element_clock_wait (GST_ELEMENT (massink), id, NULL); gst_element_clock_wait (GST_ELEMENT (massink), id, NULL);
gst_clock_id_free (id); gst_clock_id_free (id);
} }
if (GST_BUFFER_DATA (buf) != NULL) { if (GST_BUFFER_DATA (buf) != NULL) {
if (!massink->mute) { if (!massink->mute) {
GST_DEBUG (0, "massink: data=%p size=%d", GST_BUFFER_DATA (buf), GST_BUFFER_SIZE (buf)); GST_DEBUG ("massink: data=%p size=%d", GST_BUFFER_DATA (buf), GST_BUFFER_SIZE (buf));
if (GST_BUFFER_SIZE (buf) > BUFFER_SIZE) { if (GST_BUFFER_SIZE (buf) > BUFFER_SIZE) {
gst_buffer_unref (buf); gst_buffer_unref (buf);
return; return;
@ -357,19 +360,19 @@ gst_massink_open_audio (GstMassink *massink)
err = mas_init(); err = mas_init();
if (err < 0) { if (err < 0) {
GST_DEBUG(err, "connection with local MAS server failed."); GST_DEBUG ("connection with local MAS server failed.");
exit (1); exit (1);
} }
GST_DEBUG (0, "Establishing audio output channel."); GST_DEBUG ("Establishing audio output channel.");
mas_make_data_channel ("Gstreamer", &massink->audio_channel, &massink->audio_source, &massink->audio_sink); mas_make_data_channel ("Gstreamer", &massink->audio_channel, &massink->audio_source, &massink->audio_sink);
mas_asm_get_port_by_name (0, "default_mix_sink", &massink->mix_sink); mas_asm_get_port_by_name (0, "default_mix_sink", &massink->mix_sink);
GST_DEBUG (0, "Instantiating endian device."); GST_DEBUG ("Instantiating endian device.");
err = mas_asm_instantiate_device ("endian", 0, 0, &massink->endian); err = mas_asm_instantiate_device ("endian", 0, 0, &massink->endian);
if (err < 0) { if (err < 0) {
GST_DEBUG(0, "Failed to instantiate endian converter device"); GST_DEBUG ("Failed to instantiate endian converter device");
exit(1); exit(1);
} }
@ -379,7 +382,7 @@ gst_massink_open_audio (GstMassink *massink)
sprintf (bps, "%u", massink->depth); sprintf (bps, "%u", massink->depth);
sprintf (ratestring, "%u", massink->frequency); sprintf (ratestring, "%u", massink->frequency);
GST_DEBUG (0, "Connecting net -> endian."); GST_DEBUG ("Connecting net -> endian.");
masc_make_dc (&dc, 6); masc_make_dc (&dc, 6);
/* wav weirdness: 8 bit data is unsigned, >8 data is signed. */ /* wav weirdness: 8 bit data is unsigned, >8 data is signed. */
@ -391,7 +394,7 @@ gst_massink_open_audio (GstMassink *massink)
err = mas_asm_connect_source_sink (massink->audio_source, massink->endian_sink, dc); err = mas_asm_connect_source_sink (massink->audio_source, massink->endian_sink, dc);
if ( err < 0 ) { if ( err < 0 ) {
GST_DEBUG(err, "Failed to connect net audio output to endian"); GST_DEBUG ("Failed to connect net audio output to endian");
return -1; return -1;
} }
@ -404,17 +407,17 @@ gst_massink_open_audio (GstMassink *massink)
massink->open_source = massink->endian_source; massink->open_source = massink->endian_source;
if (massink->depth != 16) { if (massink->depth != 16) {
GST_DEBUG (0, "Sample resolution is not 16 bit/sample, instantiating squant device."); GST_DEBUG ("Sample resolution is not 16 bit/sample, instantiating squant device.");
err = mas_asm_instantiate_device ("squant", 0, 0, &massink->squant); err = mas_asm_instantiate_device ("squant", 0, 0, &massink->squant);
if (err < 0) { if (err < 0) {
GST_DEBUG(err, "Failed to instantiate squant device"); GST_DEBUG ("Failed to instantiate squant device");
return -1; return -1;
} }
mas_asm_get_port_by_name (massink->squant, "squant_sink", &massink->squant_sink); mas_asm_get_port_by_name (massink->squant, "squant_sink", &massink->squant_sink);
mas_asm_get_port_by_name (massink->squant, "squant_source", &massink->squant_source); mas_asm_get_port_by_name (massink->squant, "squant_source", &massink->squant_source);
GST_DEBUG (0, "Connecting endian -> squant."); GST_DEBUG ("Connecting endian -> squant.");
masc_make_dc (&dc, 6); masc_make_dc (&dc, 6);
masc_append_dc_key_value (dc,"format",(massink->depth==8) ? "ulinear":"linear"); masc_append_dc_key_value (dc,"format",(massink->depth==8) ? "ulinear":"linear");
@ -425,7 +428,7 @@ gst_massink_open_audio (GstMassink *massink)
err = mas_asm_connect_source_sink (massink->endian_source, massink->squant_sink, dc); err = mas_asm_connect_source_sink (massink->endian_source, massink->squant_sink, dc);
if (err < 0) { if (err < 0) {
GST_DEBUG(err, "Failed to connect endian output to squant"); GST_DEBUG ("Failed to connect endian output to squant");
return -1; return -1;
} }
@ -436,18 +439,18 @@ gst_massink_open_audio (GstMassink *massink)
/* Another 'if necessary' device, as above */ /* Another 'if necessary' device, as above */
if (massink->frequency != 44100) { if (massink->frequency != 44100) {
GST_DEBUG (0, "Sample rate is not 44100, instantiating srate device."); GST_DEBUG ("Sample rate is not 44100, instantiating srate device.");
err = mas_asm_instantiate_device ("srate", 0, 0, &massink->srate); err = mas_asm_instantiate_device ("srate", 0, 0, &massink->srate);
if (err < 0) { if (err < 0) {
GST_DEBUG (err, "Failed to instantiate srate device"); GST_DEBUG ("Failed to instantiate srate device");
return -1; return -1;
} }
mas_asm_get_port_by_name (massink->srate, "sink", &massink->srate_sink); mas_asm_get_port_by_name (massink->srate, "sink", &massink->srate_sink);
mas_asm_get_port_by_name (massink->srate, "source", &massink->srate_source); mas_asm_get_port_by_name (massink->srate, "source", &massink->srate_source);
GST_DEBUG (0, "Connecting to srate."); GST_DEBUG ("Connecting to srate.");
masc_make_dc (&dc, 6); masc_make_dc (&dc, 6);
masc_append_dc_key_value (dc, "format", "linear"); masc_append_dc_key_value (dc, "format", "linear");
masc_append_dc_key_value (dc, "resolution", "16"); masc_append_dc_key_value (dc, "resolution", "16");
@ -458,7 +461,7 @@ gst_massink_open_audio (GstMassink *massink)
err = mas_asm_connect_source_sink (massink->open_source, massink->srate_sink, dc); err = mas_asm_connect_source_sink (massink->open_source, massink->srate_sink, dc);
if ( err < 0 ) { if ( err < 0 ) {
GST_DEBUG(err, "Failed to connect to srate"); GST_DEBUG ("Failed to connect to srate");
return -1; return -1;
} }
@ -466,7 +469,7 @@ gst_massink_open_audio (GstMassink *massink)
massink->open_source = massink->srate_source; massink->open_source = massink->srate_source;
} }
GST_DEBUG(0, "Connecting to mix."); GST_DEBUG ("Connecting to mix.");
masc_make_dc(&dc, 6); masc_make_dc(&dc, 6);
masc_append_dc_key_value (dc, "format", "linear"); masc_append_dc_key_value (dc, "format", "linear");
masc_append_dc_key_value (dc, "resolution", "16"); masc_append_dc_key_value (dc, "resolution", "16");
@ -477,7 +480,7 @@ gst_massink_open_audio (GstMassink *massink)
err = mas_asm_connect_source_sink (massink->open_source, massink->mix_sink, dc); err = mas_asm_connect_source_sink (massink->open_source, massink->mix_sink, dc);
if ( err < 0 ) { if ( err < 0 ) {
GST_DEBUG(err, "Failed to connect to mixer"); GST_DEBUG ("Failed to connect to mixer");
return -1; return -1;
} }
@ -519,7 +522,7 @@ gst_massink_close_audio (GstMassink *massink)
GST_FLAG_UNSET (massink, GST_MASSINK_OPEN); GST_FLAG_UNSET (massink, GST_MASSINK_OPEN);
GST_DEBUG (0, "massink: closed sound channel"); GST_DEBUG ("massink: closed sound channel");
}*/ }*/
static GstElementStateReturn static GstElementStateReturn

View file

@ -19,6 +19,9 @@
/* let's not forget to mention that all this was based on aasink ;-) */ /* let's not forget to mention that all this was based on aasink ;-) */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <config.h> #include <config.h>
#include <signal.h> #include <signal.h>
#include <string.h> #include <string.h>
@ -342,7 +345,7 @@ gst_sdlvideosink_create (GstSDLVideoSink *sdlvideosink, gboolean showlogo)
else else
SDL_DisplayYUVOverlay(sdlvideosink->yuv_overlay, &(sdlvideosink->rect)); SDL_DisplayYUVOverlay(sdlvideosink->yuv_overlay, &(sdlvideosink->rect));
GST_DEBUG (0, "sdlvideosink: setting %08lx (" GST_FOURCC_FORMAT ")", sdlvideosink->format, GST_FOURCC_ARGS(sdlvideosink->format)); GST_DEBUG ("sdlvideosink: setting %08lx (" GST_FOURCC_FORMAT ")", sdlvideosink->format, GST_FOURCC_ARGS(sdlvideosink->format));
/* TODO: is this the width of the input image stream or of the widget? */ /* TODO: is this the width of the input image stream or of the widget? */
g_signal_emit (G_OBJECT (sdlvideosink), gst_sdlvideosink_signals[SIGNAL_HAVE_SIZE], 0, g_signal_emit (G_OBJECT (sdlvideosink), gst_sdlvideosink_signals[SIGNAL_HAVE_SIZE], 0,
@ -440,7 +443,7 @@ gst_sdlvideosink_chain (GstPad *pad, GstBuffer *buf)
return; return;
} }
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));
if (sdlvideosink->clock) { if (sdlvideosink->clock) {
GstClockID id = gst_clock_new_single_shot_id (sdlvideosink->clock, GST_BUFFER_TIMESTAMP (buf)); GstClockID id = gst_clock_new_single_shot_id (sdlvideosink->clock, GST_BUFFER_TIMESTAMP (buf));

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 "gstshout.h" #include "gstshout.h"
/* elementfactory information */ /* elementfactory information */
@ -393,7 +396,7 @@ gst_icecastsend_change_state (GstElement *element)
icecastsend = GST_ICECASTSEND(element); icecastsend = GST_ICECASTSEND(element);
GST_DEBUG (0,"state pending %d", GST_STATE_PENDING (element)); GST_DEBUG ("state pending %d", GST_STATE_PENDING (element));
/* if going down into NULL state, close the file if it's open */ /* if going down into NULL state, close the file if it's open */
switch (GST_STATE_TRANSITION (element)) { switch (GST_STATE_TRANSITION (element)) {

View file

@ -18,6 +18,9 @@
*/ */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <string.h> #include <string.h>
#include "gstsmoothwave.h" #include "gstsmoothwave.h"
@ -125,12 +128,12 @@ gst_smoothwave_init (GstSmoothWave *smoothwave)
/* gtk_widget_set_default_colormap (gdk_rgb_get_cmap()); */ /* gtk_widget_set_default_colormap (gdk_rgb_get_cmap()); */
/* gtk_widget_set_default_visual (gdk_rgb_get_visual()); */ /* gtk_widget_set_default_visual (gdk_rgb_get_visual()); */
/* GST_DEBUG (0,"creating palette"); */ /* GST_DEBUG ("creating palette"); */
for (i=0;i<256;i++) for (i=0;i<256;i++)
palette[i] = (i << 16) || (i << 8); palette[i] = (i << 16) || (i << 8);
/* GST_DEBUG (0,"creating cmap"); */ /* GST_DEBUG ("creating cmap"); */
smoothwave->cmap = gdk_rgb_cmap_new(palette,256); smoothwave->cmap = gdk_rgb_cmap_new(palette,256);
/* GST_DEBUG (0,"created cmap"); */ /* GST_DEBUG ("created cmap"); */
/* gtk_widget_set_default_colormap (smoothwave->cmap); */ /* gtk_widget_set_default_colormap (smoothwave->cmap); */
smoothwave->image = gtk_drawing_area_new(); smoothwave->image = gtk_drawing_area_new();
@ -176,7 +179,7 @@ gst_smoothwave_chain (GstPad *pad, GstBuffer *buf)
qheight = smoothwave->height/4; qheight = smoothwave->height/4;
/* GST_DEBUG (0,"traversing %d",smoothwave->width); */ /* GST_DEBUG ("traversing %d",smoothwave->width); */
for (i=0;i<MAX(smoothwave->width,samplecount);i++) { for (i=0;i<MAX(smoothwave->width,samplecount);i++) {
gint16 y1 = (gint32)(samples[i*2] * qheight) / 32768 + gint16 y1 = (gint32)(samples[i*2] * qheight) / 32768 +
qheight; qheight;
@ -195,8 +198,8 @@ gst_smoothwave_chain (GstPad *pad, GstBuffer *buf)
ptr++; ptr++;
} }
/* GST_DEBUG (0,"drawing"); */ /* GST_DEBUG ("drawing"); */
/* GST_DEBUG (0,"gdk_draw_indexed_image(%p,%p,%d,%d,%d,%d,%s,%p,%d,%p);", /* GST_DEBUG ("gdk_draw_indexed_image(%p,%p,%d,%d,%d,%d,%s,%p,%d,%p);",
smoothwave->image->window, smoothwave->image->window,
smoothwave->image->style->fg_gc[GTK_STATE_NORMAL], smoothwave->image->style->fg_gc[GTK_STATE_NORMAL],
0,0,smoothwave->width,smoothwave->height, 0,0,smoothwave->width,smoothwave->height,

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 <inttypes.h> #include <inttypes.h>
@ -263,7 +266,7 @@ gst_snapshot_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,"snapshot: have buffer of %d\n", GST_BUFFER_SIZE(buf)); GST_DEBUG ("snapshot: have buffer of %d\n", GST_BUFFER_SIZE(buf));
outbuf = gst_buffer_new(); outbuf = gst_buffer_new();
GST_BUFFER_DATA(outbuf) = g_malloc(GST_BUFFER_SIZE(buf)); GST_BUFFER_DATA(outbuf) = g_malloc(GST_BUFFER_SIZE(buf));
@ -278,7 +281,7 @@ gst_snapshot_chain (GstPad *pad, GstBuffer *buf)
if ( snapshot->format == GST_MAKE_FOURCC('Y','U','Y','2') ) if ( snapshot->format == GST_MAKE_FOURCC('Y','U','Y','2') )
{ {
GST_DEBUG(0, "YUY2 => RGB\n"); GST_DEBUG ("YUY2 => RGB\n");
buffer_i420 = g_malloc ((image_size * (snapshot->to_bpp/8)) ); buffer_i420 = g_malloc ((image_size * (snapshot->to_bpp/8)) );
gst_colorspace_yuy2_to_i420( data, buffer_i420, snapshot->width, snapshot->height); gst_colorspace_yuy2_to_i420( data, buffer_i420, snapshot->width, snapshot->height);
data_to_convert = buffer_i420; data_to_convert = buffer_i420;
@ -288,7 +291,7 @@ gst_snapshot_chain (GstPad *pad, GstBuffer *buf)
gst_colorspace_convert (snapshot->converter, data_to_convert, data_converted); gst_colorspace_convert (snapshot->converter, data_to_convert, data_converted);
GST_INFO (0,"dumpfile : %s\n", snapshot->location ); GST_INFO ("dumpfile : %s\n", snapshot->location );
fp = fopen( snapshot->location, "wb" ); fp = fopen( snapshot->location, "wb" );
if ( fp == NULL ) if ( fp == NULL )
g_warning(" Can not open %s\n", snapshot->location ); g_warning(" Can not open %s\n", snapshot->location );

View file

@ -22,6 +22,9 @@
*/ */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <gst/gst.h> #include <gst/gst.h>
#include <string.h> #include <string.h>
#include "gstsf.h" #include "gstsf.h"
@ -322,7 +325,7 @@ gst_sf_request_new_pad (GstElement *element, GstPadTemplate *templ,
this->channels = g_list_append (this->channels, channel); this->channels = g_list_append (this->channels, channel);
this->channelcount++; this->channelcount++;
GST_DEBUG (0, "sf added pad %s\n", name); GST_DEBUG ("sf added pad %s\n", name);
g_free (name); g_free (name);
return channel->pad; return channel->pad;

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 "gstswfdec.h" #include "gstswfdec.h"
#include <string.h> #include <string.h>
@ -568,7 +571,7 @@ gst_swfdec_change_state (GstElement *element)
#if 0 #if 0
swfdec->pool = gst_pad_get_bufferpool (swfdec->videopad); swfdec->pool = gst_pad_get_bufferpool (swfdec->videopad);
if (swfdec->pool) if (swfdec->pool)
GST_INFO (GST_CAT_PLUGIN_INFO, "got pool %p", swfdec->pool); GST_INFO ( "got pool %p", swfdec->pool);
#endif #endif
break; break;
case GST_STATE_PLAYING_TO_PAUSED: case GST_STATE_PLAYING_TO_PAUSED:

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>

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>

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

@ -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

@ -19,6 +19,9 @@
*/ */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <string.h> #include <string.h>
#include "gstcdxaparse.h" #include "gstcdxaparse.h"
@ -163,7 +166,7 @@ cdxa_type_find (GstBuffer *buf,
gchar *data = GST_BUFFER_DATA (buf); gchar *data = GST_BUFFER_DATA (buf);
GstCaps *new; GstCaps *new;
GST_DEBUG (0,"cdxa_parse: typefind"); GST_DEBUG ("cdxa_parse: typefind");
if (GUINT32_FROM_LE (((guint32 *)data)[0]) != GST_RIFF_TAG_RIFF) if (GUINT32_FROM_LE (((guint32 *)data)[0]) != GST_RIFF_TAG_RIFF)
return NULL; return NULL;

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 <config.h> #include <config.h>
#include <gst/gst.h> #include <gst/gst.h>
@ -240,7 +243,7 @@ gst_chart_sinkconnect (GstPad *pad, GstCaps *caps)
gst_caps_get_int (caps, "rate", &chart->samplerate); gst_caps_get_int (caps, "rate", &chart->samplerate);
chart->samples_between_frames = chart->samplerate / chart->framerate; chart->samples_between_frames = chart->samplerate / chart->framerate;
GST_DEBUG (0, "CHART: new sink caps: rate %d", GST_DEBUG ("CHART: new sink caps: rate %d",
chart->samplerate); chart->samplerate);
/*gst_chart_sync_parms (chart); */ /*gst_chart_sync_parms (chart); */
/* */ /* */
@ -255,7 +258,7 @@ draw_chart_16bpp(guchar * output, gint width, gint height,
guint16 *colstart; guint16 *colstart;
gint16 * in; gint16 * in;
GST_DEBUG (0, "CHART: drawing frame to %p, width = %d, height = %d, src_data = %p, src_size = %d", GST_DEBUG ("CHART: drawing frame to %p, width = %d, height = %d, src_data = %p, src_size = %d",
output, width, height, src_data, src_size); output, width, height, src_data, src_size);
for (colstart = (guint16 *)output, in = (gint16 *)src_data, i = 0; for (colstart = (guint16 *)output, in = (gint16 *)src_data, i = 0;
@ -314,14 +317,14 @@ gst_chart_chain (GstPad *pad, GstBuffer *bufin)
chart = GST_CHART(GST_OBJECT_PARENT (pad)); chart = GST_CHART(GST_OBJECT_PARENT (pad));
g_return_if_fail (chart != NULL); g_return_if_fail (chart != NULL);
GST_DEBUG (0, "CHART: chainfunc called"); GST_DEBUG ("CHART: chainfunc called");
samples_in = GST_BUFFER_SIZE (bufin) / sizeof(gint16); samples_in = GST_BUFFER_SIZE (bufin) / sizeof(gint16);
datain = (gint16 *) (GST_BUFFER_DATA (bufin)); datain = (gint16 *) (GST_BUFFER_DATA (bufin));
GST_DEBUG (0, "input buffer has %d samples", samples_in); GST_DEBUG ("input buffer has %d samples", samples_in);
if (chart->next_time <= GST_BUFFER_TIMESTAMP (bufin)) { if (chart->next_time <= GST_BUFFER_TIMESTAMP (bufin)) {
chart->next_time = GST_BUFFER_TIMESTAMP (bufin); chart->next_time = GST_BUFFER_TIMESTAMP (bufin);
GST_DEBUG (0, "in: %" G_GINT64_FORMAT, GST_BUFFER_TIMESTAMP (bufin)); GST_DEBUG ("in: %" G_GINT64_FORMAT, GST_BUFFER_TIMESTAMP (bufin));
} }
chart->samples_since_last_frame += samples_in; chart->samples_since_last_frame += samples_in;
@ -336,7 +339,7 @@ gst_chart_chain (GstPad *pad, GstBuffer *bufin)
dataout = g_malloc (sizeout); dataout = g_malloc (sizeout);
GST_BUFFER_SIZE(bufout) = sizeout; GST_BUFFER_SIZE(bufout) = sizeout;
GST_BUFFER_DATA(bufout) = dataout; GST_BUFFER_DATA(bufout) = dataout;
GST_DEBUG (0, "CHART: made new buffer: size %d, width %d, height %d", GST_DEBUG ("CHART: made new buffer: size %d, width %d, height %d",
sizeout, chart->width, chart->height); sizeout, chart->width, chart->height);
/* take data and draw to new buffer */ /* take data and draw to new buffer */
@ -350,7 +353,7 @@ gst_chart_chain (GstPad *pad, GstBuffer *bufin)
/* Check if we need to renegotiate size. */ /* Check if we need to renegotiate size. */
if (chart->first_buffer) { if (chart->first_buffer) {
GST_DEBUG (0, "making new pad"); GST_DEBUG ("making new pad");
if (gst_pad_try_set_caps (chart->srcpad, if (gst_pad_try_set_caps (chart->srcpad,
GST_CAPS_NEW ( GST_CAPS_NEW (
"chartsrc", "chartsrc",
@ -372,17 +375,17 @@ gst_chart_chain (GstPad *pad, GstBuffer *bufin)
chart->first_buffer = FALSE; chart->first_buffer = FALSE;
} }
GST_DEBUG (0, "CHART: outputting buffer"); GST_DEBUG ("CHART: outputting buffer");
/* output buffer */ /* output buffer */
GST_BUFFER_FLAG_SET (bufout, GST_BUFFER_READONLY); GST_BUFFER_FLAG_SET (bufout, GST_BUFFER_READONLY);
gst_pad_push (chart->srcpad, bufout); gst_pad_push (chart->srcpad, bufout);
} }
} else { } else {
GST_DEBUG (0, "CHART: skipping buffer"); GST_DEBUG ("CHART: skipping buffer");
gst_buffer_unref(bufin); gst_buffer_unref(bufin);
} }
GST_DEBUG (0, "CHART: exiting chainfunc"); GST_DEBUG ("CHART: exiting chainfunc");
} }
static void static void

View file

@ -19,6 +19,9 @@
/* based on the Area Based Deinterlacer (for RGB frames) */ /* based on the Area Based Deinterlacer (for RGB frames) */
/* (a VirtualDub filter) from Gunnar Thalin <guth@home.se> */ /* (a VirtualDub filter) from Gunnar Thalin <guth@home.se> */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <string.h> #include <string.h>
#include <gst/gst.h> #include <gst/gst.h>
#include "gstdeinterlace.h" #include "gstdeinterlace.h"

View file

@ -60,6 +60,9 @@
/* */ /* */
/*=======================================================================*/ /*=======================================================================*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <unistd.h> #include <unistd.h>
@ -240,7 +243,7 @@ gst_festival_chain (GstPad *pad, GstBuffer *buf)
g_return_if_fail (GST_BUFFER_DATA (buf) != NULL); g_return_if_fail (GST_BUFFER_DATA (buf) != NULL);
festival = GST_FESTIVAL (gst_pad_get_parent (pad)); festival = GST_FESTIVAL (gst_pad_get_parent (pad));
GST_DEBUG (0, "gst_festival_chain: got buffer in '%s'", GST_DEBUG ("gst_festival_chain: got buffer in '%s'",
gst_object_get_name (GST_OBJECT (festival))); gst_object_get_name (GST_OBJECT (festival)));
fd = fdopen(dup(festival->info->server_fd),"wb"); fd = fdopen(dup(festival->info->server_fd),"wb");

View file

@ -30,6 +30,9 @@
* - this might be improved upon with bytestream * - this might be improved upon with bytestream
*/ */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <gst/gst.h> #include <gst/gst.h>
#include "gstfilter.h" #include "gstfilter.h"
#include <math.h> /* M_PI */ #include <math.h> /* M_PI */
@ -197,7 +200,7 @@ gst_bpwsinc_sink_connect (GstPad * pad, GstCaps * caps)
{ {
len = filter->wing_size; len = filter->wing_size;
/* fill the lp kernel */ /* fill the lp kernel */
GST_DEBUG (GST_CAT_PLUGIN_INFO, GST_DEBUG (
"bpwsinc: initializing LP kernel of length %d with cut-off %f", "bpwsinc: initializing LP kernel of length %d with cut-off %f",
len * 2 + 1, filter->lower_frequency); len * 2 + 1, filter->lower_frequency);
kernel_lp = (double *) g_malloc (sizeof (double) * (2 * len + 1)); kernel_lp = (double *) g_malloc (sizeof (double) * (2 * len + 1));
@ -220,7 +223,7 @@ gst_bpwsinc_sink_connect (GstPad * pad, GstCaps * caps)
for (i = 0; i <= len * 2; ++i) kernel_lp[i] /= sum; for (i = 0; i <= len * 2; ++i) kernel_lp[i] /= sum;
/* fill the hp kernel */ /* fill the hp kernel */
GST_DEBUG (GST_CAT_PLUGIN_INFO, GST_DEBUG (
"bpwsinc: initializing HP kernel of length %d with cut-off %f", "bpwsinc: initializing HP kernel of length %d with cut-off %f",
len * 2 + 1, filter->upper_frequency); len * 2 + 1, filter->upper_frequency);
kernel_hp = (double *) g_malloc (sizeof (double) * (2 * len + 1)); kernel_hp = (double *) g_malloc (sizeof (double) * (2 * len + 1));

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 <gst/gst.h> #include <gst/gst.h>
#include "gstfilter.h" #include "gstfilter.h"
#include "iir.h" #include "iir.h"

View file

@ -30,6 +30,9 @@
* - this might be improved upon with bytestream * - this might be improved upon with bytestream
*/ */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <gst/gst.h> #include <gst/gst.h>
#include "gstfilter.h" #include "gstfilter.h"
#include <math.h> /* M_PI */ #include <math.h> /* M_PI */
@ -189,7 +192,7 @@ gst_lpwsinc_sink_connect (GstPad * pad, GstCaps * caps)
/* fill the kernel */ /* fill the kernel */
g_print ("DEBUG: initing filter kernel\n"); g_print ("DEBUG: initing filter kernel\n");
len = filter->wing_size; len = filter->wing_size;
GST_DEBUG (GST_CAT_PLUGIN_INFO, GST_DEBUG (
"lpwsinc: initializing filter kernel of length %d", len * 2 + 1); "lpwsinc: initializing filter kernel of length %d", len * 2 + 1);
filter->kernel = (double *) g_malloc (sizeof (double) * (2 * len + 1)); filter->kernel = (double *) g_malloc (sizeof (double) * (2 * len + 1));

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 "flx_fmt.h" #include "flx_fmt.h"
@ -471,7 +474,7 @@ gst_flxdec_loop (GstElement *element)
g_return_if_fail (element != NULL); g_return_if_fail (element != NULL);
g_return_if_fail (GST_IS_FLXDEC(element)); g_return_if_fail (GST_IS_FLXDEC(element));
GST_DEBUG (0, "entering loop function"); GST_DEBUG ("entering loop function");
flxdec = GST_FLXDEC(element); flxdec = GST_FLXDEC(element);

View file

@ -1,3 +1,6 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <config.h> #include <config.h>
#include <gst/gst.h> #include <gst/gst.h>
#include <gst/bytestream/bytestream.h> #include <gst/bytestream/bytestream.h>
@ -176,14 +179,14 @@ mixmatrix_alloc_matrix (int x,int y)
{ {
gfloat **matrix; gfloat **matrix;
int i; int i;
GST_DEBUG(0,"mixmatrix: allocating a %dx%d matrix of floats\n",x,y); GST_DEBUG ("mixmatrix: allocating a %dx%d matrix of floats\n",x,y);
matrix = g_new(gfloat *,x); matrix = g_new(gfloat *,x);
GST_DEBUG(0,"mixmatrix: %p: ",matrix); GST_DEBUG ("mixmatrix: %p: ",matrix);
for (i=0;i<x;i++) { for (i=0;i<x;i++) {
matrix[i] = g_new(gfloat,y); matrix[i] = g_new(gfloat,y);
GST_DEBUG(0,"%p, ",matrix[i]); GST_DEBUG ("%p, ",matrix[i]);
} }
GST_DEBUG(0,"\n"); GST_DEBUG ("\n");
return matrix; return matrix;
} }
@ -237,7 +240,7 @@ mixmatrix_resize(GstMixMatrix *mix, int sinkpads, int srcpads)
gfloat **newmatrix; gfloat **newmatrix;
int i; int i;
GST_DEBUG(0,"mixmatrix: resizing matrix!!!!\n"); GST_DEBUG ("mixmatrix: resizing matrix!!!!\n");
// check the sinkpads list // check the sinkpads list
if (sinkresize) { if (sinkresize) {

View file

@ -71,7 +71,7 @@ static double ratio [16] = { 0., 1., 0.6735, 0.7031, 0.7615, 0.8055,
1.2015, 0.}; 1.2015, 0.};
*/ */
#ifdef GST_DEBUG_ENABLED #ifndef GST_DISABLE_GST_DEBUG
static char picture_types [4][3] = static char picture_types [4][3] =
{ "I", "P", "B", "D" }; { "I", "P", "B", "D" };
#endif #endif
@ -136,7 +136,7 @@ void mpeg1mux_buffer_queue(Mpeg1MuxBuffer *mb, GstBuffer *buf) {
mb->length += GST_BUFFER_SIZE(buf); mb->length += GST_BUFFER_SIZE(buf);
} }
GST_DEBUG (0,"queuing buffer %lu", mb->length); GST_DEBUG ("queuing buffer %lu", mb->length);
if (mb->buffer_type == BUFFER_TYPE_VIDEO) { if (mb->buffer_type == BUFFER_TYPE_VIDEO) {
mpeg1mux_buffer_update_video_info(mb); mpeg1mux_buffer_update_video_info(mb);
} }
@ -150,7 +150,7 @@ gulong mpeg1mux_buffer_update_queued(Mpeg1MuxBuffer *mb, guint64 scr) {
Mpeg1MuxTimecode *tc; Mpeg1MuxTimecode *tc;
gulong total_queued = 0; gulong total_queued = 0;
GST_DEBUG (0,"queued in buffer on SCR=%" G_GUINT64_FORMAT, scr); GST_DEBUG ("queued in buffer on SCR=%" G_GUINT64_FORMAT, scr);
queued_list = g_list_first(mb->queued_list); queued_list = g_list_first(mb->queued_list);
while (queued_list) { while (queued_list) {
@ -161,12 +161,12 @@ gulong mpeg1mux_buffer_update_queued(Mpeg1MuxBuffer *mb, guint64 scr) {
queued_list = g_list_first(mb->queued_list); queued_list = g_list_first(mb->queued_list);
} }
else { else {
GST_DEBUG (0,"queued in buffer %ld, %" G_GUINT64_FORMAT, tc->original_length, tc->DTS); GST_DEBUG ("queued in buffer %ld, %" G_GUINT64_FORMAT, tc->original_length, tc->DTS);
total_queued += tc->original_length; total_queued += tc->original_length;
queued_list = g_list_next(queued_list); queued_list = g_list_next(queued_list);
} }
} }
GST_DEBUG (0,"queued in buffer %lu", total_queued); GST_DEBUG ("queued in buffer %lu", total_queued);
return total_queued; return total_queued;
} }
@ -177,7 +177,7 @@ void mpeg1mux_buffer_shrink(Mpeg1MuxBuffer *mb, gulong size) {
gulong consumed = 0; gulong consumed = 0;
gulong count; gulong count;
GST_DEBUG (0,"shrinking buffer %lu", size); GST_DEBUG ("shrinking buffer %lu", size);
g_assert(mb->length >= size); g_assert(mb->length >= size);
@ -198,16 +198,16 @@ void mpeg1mux_buffer_shrink(Mpeg1MuxBuffer *mb, gulong size) {
else { else {
consumed += tc->length; consumed += tc->length;
while (size >= consumed) { while (size >= consumed) {
GST_DEBUG (0,"removing timecode: %" G_GUINT64_FORMAT " %" G_GUINT64_FORMAT " %lu %lu", tc->DTS, tc->PTS, tc->length, consumed); GST_DEBUG ("removing timecode: %" G_GUINT64_FORMAT " %" G_GUINT64_FORMAT " %lu %lu", tc->DTS, tc->PTS, tc->length, consumed);
mb->timecode_list = g_list_remove_link(mb->timecode_list, timecode_list); mb->timecode_list = g_list_remove_link(mb->timecode_list, timecode_list);
mb->queued_list = g_list_append(mb->queued_list, tc); mb->queued_list = g_list_append(mb->queued_list, tc);
timecode_list = g_list_first(mb->timecode_list); timecode_list = g_list_first(mb->timecode_list);
tc = (Mpeg1MuxTimecode *) timecode_list->data; tc = (Mpeg1MuxTimecode *) timecode_list->data;
consumed += tc->length; consumed += tc->length;
GST_DEBUG (0,"next timecode: %" G_GUINT64_FORMAT " %" G_GUINT64_FORMAT " %lu %lu", tc->DTS, tc->PTS, tc->length, consumed); GST_DEBUG ("next timecode: %" G_GUINT64_FORMAT " %" G_GUINT64_FORMAT " %lu %lu", tc->DTS, tc->PTS, tc->length, consumed);
} }
mb->new_frame = TRUE; mb->new_frame = TRUE;
GST_DEBUG (0,"leftover frame size from %lu to %lu ", tc->length, consumed-size); GST_DEBUG ("leftover frame size from %lu to %lu ", tc->length, consumed-size);
tc->length = consumed - size; tc->length = consumed - size;
} }
@ -220,7 +220,7 @@ void mpeg1mux_buffer_shrink(Mpeg1MuxBuffer *mb, gulong size) {
mb->info.audio.PTS = tc->PTS; mb->info.audio.PTS = tc->PTS;
mb->next_frame_time = tc->PTS; mb->next_frame_time = tc->PTS;
} }
GST_DEBUG (0,"next frame time timecode: %" G_GUINT64_FORMAT " %lu", mb->next_frame_time, tc->length); GST_DEBUG ("next frame time timecode: %" G_GUINT64_FORMAT " %lu", mb->next_frame_time, tc->length);
/* check buffer consistency */ /* check buffer consistency */
timecode_list = g_list_first(mb->timecode_list); timecode_list = g_list_first(mb->timecode_list);
@ -248,7 +248,7 @@ static void mpeg1mux_buffer_update_video_info(Mpeg1MuxBuffer *mb) {
gst_getbits_t gb; gst_getbits_t gb;
GST_DEBUG (0,"mpeg1mux::update_video_info %lu %lu", mb->base, mb->scan_pos); GST_DEBUG ("mpeg1mux::update_video_info %lu %lu", mb->base, mb->scan_pos);
if (mb->base == 0 && mb->scan_pos == 0) { if (mb->base == 0 && mb->scan_pos == 0) {
if ((SYNCWORD_START<<8)+*(mb->buffer+3) == SEQUENCE_HEADER) { if ((SYNCWORD_START<<8)+*(mb->buffer+3) == SEQUENCE_HEADER) {
@ -268,7 +268,7 @@ static void mpeg1mux_buffer_update_video_info(Mpeg1MuxBuffer *mb) {
mb->info.video.secs_per_frame = 1. / picture_rates[mb->info.video.picture_rate]; mb->info.video.secs_per_frame = 1. / picture_rates[mb->info.video.picture_rate];
mb->info.video.decoding_order=0; mb->info.video.decoding_order=0;
mb->info.video.group_order=0; mb->info.video.group_order=0;
GST_DEBUG (0,"mpeg1mux::update_video_info: secs per frame %g", mb->info.video.secs_per_frame); GST_DEBUG ("mpeg1mux::update_video_info: secs per frame %g", mb->info.video.secs_per_frame);
} }
else { else {
g_print("mpeg1mux::update_video_info: Invalid MPEG Video header\n"); g_print("mpeg1mux::update_video_info: Invalid MPEG Video header\n");
@ -277,16 +277,16 @@ static void mpeg1mux_buffer_update_video_info(Mpeg1MuxBuffer *mb) {
while (offset < mb->length-6) { while (offset < mb->length-6) {
if (!have_sync) { if (!have_sync) {
guchar byte = *(data+offset); guchar byte = *(data+offset);
/*GST_DEBUG (0,"mpeg1mux::update_video_info: found #%d at %lu",byte,offset); */ /*GST_DEBUG ("mpeg1mux::update_video_info: found #%d at %lu",byte,offset); */
offset++; offset++;
/* if it's zero, increment the zero count */ /* if it's zero, increment the zero count */
if (byte == 0) { if (byte == 0) {
sync_zeros++; sync_zeros++;
/*GST_DEBUG (0,"mpeg1mux::update_video_info: found zero #%d at %lu",sync_zeros,offset-1); */ /*GST_DEBUG ("mpeg1mux::update_video_info: found zero #%d at %lu",sync_zeros,offset-1); */
} }
/* if it's a one and we have two previous zeros, we have sync */ /* if it's a one and we have two previous zeros, we have sync */
else if ((byte == 1) && (sync_zeros >= 2)) { else if ((byte == 1) && (sync_zeros >= 2)) {
GST_DEBUG (0,"mpeg1mux::update_video_info: synced at %lu",offset-1); GST_DEBUG ("mpeg1mux::update_video_info: synced at %lu",offset-1);
have_sync = TRUE; have_sync = TRUE;
sync_zeros = 0; sync_zeros = 0;
} }
@ -295,21 +295,21 @@ static void mpeg1mux_buffer_update_video_info(Mpeg1MuxBuffer *mb) {
/* then snag the chunk ID */ /* then snag the chunk ID */
} else if (id == 0) { } else if (id == 0) {
id = *(data+offset); id = *(data+offset);
GST_DEBUG (0,"mpeg1mux::update_video_info: got id 0x%02lX",id); GST_DEBUG ("mpeg1mux::update_video_info: got id 0x%02lX",id);
id = (SYNCWORD_START<<8)+id; id = (SYNCWORD_START<<8)+id;
switch (id) { switch (id) {
case SEQUENCE_HEADER: case SEQUENCE_HEADER:
GST_DEBUG (0,"mpeg1mux::update_video_info: sequence header"); GST_DEBUG ("mpeg1mux::update_video_info: sequence header");
break; break;
case GROUP_START: case GROUP_START:
GST_DEBUG (0,"mpeg1mux::update_video_info: group start"); GST_DEBUG ("mpeg1mux::update_video_info: group start");
mb->info.video.group_order=0; mb->info.video.group_order=0;
break; break;
case PICTURE_START: case PICTURE_START:
/* skip the first access unit */ /* skip the first access unit */
if (mb->info.video.decoding_order != 0) { if (mb->info.video.decoding_order != 0) {
Mpeg1MuxTimecode *tc; Mpeg1MuxTimecode *tc;
GST_DEBUG (0,"mpeg1mux::update_video_info: PTS %" G_GUINT64_FORMAT ", DTS %" G_GUINT64_FORMAT ", length %lu", mb->info.video.current_PTS, GST_DEBUG ("mpeg1mux::update_video_info: PTS %" G_GUINT64_FORMAT ", DTS %" G_GUINT64_FORMAT ", length %lu", mb->info.video.current_PTS,
mb->info.video.current_DTS, offset - mb->current_start-3); mb->info.video.current_DTS, offset - mb->current_start-3);
tc = (Mpeg1MuxTimecode *) g_malloc(sizeof(Mpeg1MuxTimecode)); tc = (Mpeg1MuxTimecode *) g_malloc(sizeof(Mpeg1MuxTimecode));
@ -331,7 +331,7 @@ static void mpeg1mux_buffer_update_video_info(Mpeg1MuxBuffer *mb) {
temp= (*(data+offset+1)<<8)+*(data+offset+2); temp= (*(data+offset+1)<<8)+*(data+offset+2);
temporal_reference = (temp & 0xffc0) >> 6; temporal_reference = (temp & 0xffc0) >> 6;
mb->info.video.current_type = (temp & 0x0038) >> 3; mb->info.video.current_type = (temp & 0x0038) >> 3;
GST_DEBUG (0,"mpeg1mux::update_video_info: picture start temporal_ref:%d type:%s Frame", temporal_reference, GST_DEBUG ("mpeg1mux::update_video_info: picture start temporal_ref:%d type:%s Frame", temporal_reference,
picture_types[mb->info.video.current_type-1]); picture_types[mb->info.video.current_type-1]);
mb->info.video.current_DTS = mb->info.video.decoding_order * mb->info.video.secs_per_frame * CLOCKS; mb->info.video.current_DTS = mb->info.video.decoding_order * mb->info.video.secs_per_frame * CLOCKS;
@ -345,7 +345,7 @@ static void mpeg1mux_buffer_update_video_info(Mpeg1MuxBuffer *mb) {
offset++; offset++;
break; break;
case SEQUENCE_END: case SEQUENCE_END:
GST_DEBUG (0,"mpeg1mux::update_video_info: sequence end"); GST_DEBUG ("mpeg1mux::update_video_info: sequence end");
break; break;
} }
/* prepare for next sync */ /* prepare for next sync */
@ -370,7 +370,7 @@ static void mpeg1mux_buffer_update_audio_info(Mpeg1MuxBuffer *mb) {
Mpeg1MuxTimecode *tc; Mpeg1MuxTimecode *tc;
GST_DEBUG (0,"mpeg1mux::update_audio_info %lu %lu", mb->base, mb->scan_pos); GST_DEBUG ("mpeg1mux::update_audio_info %lu %lu", mb->base, mb->scan_pos);
if (mb->base == 0 && mb->scan_pos == 0) { if (mb->base == 0 && mb->scan_pos == 0) {
id = GUINT32_FROM_BE(*((guint32 *)(data))); id = GUINT32_FROM_BE(*((guint32 *)(data)));
@ -396,7 +396,7 @@ static void mpeg1mux_buffer_update_audio_info(Mpeg1MuxBuffer *mb) {
} }
mb->info.audio.framesize = bpf; mb->info.audio.framesize = bpf;
GST_DEBUG (0,"mpeg1mux::update_audio_info: samples per second %d", samplerate_index); GST_DEBUG ("mpeg1mux::update_audio_info: samples per second %d", samplerate_index);
gst_getbits_init(&gb, NULL, NULL); gst_getbits_init(&gb, NULL, NULL);
gst_getbits_newbuf(&gb, data, mb->length); gst_getbits_newbuf(&gb, data, mb->length);
@ -417,13 +417,13 @@ static void mpeg1mux_buffer_update_audio_info(Mpeg1MuxBuffer *mb) {
mb->info.audio.original_copy = gst_getbits1(&gb); mb->info.audio.original_copy = gst_getbits1(&gb);
mb->info.audio.emphasis = gst_getbits2(&gb); mb->info.audio.emphasis = gst_getbits2(&gb);
GST_DEBUG (0,"mpeg1mux::update_audio_info: layer %d", mb->info.audio.layer); GST_DEBUG ("mpeg1mux::update_audio_info: layer %d", mb->info.audio.layer);
GST_DEBUG (0,"mpeg1mux::update_audio_info: bit_rate %d", mb->info.audio.bit_rate); GST_DEBUG ("mpeg1mux::update_audio_info: bit_rate %d", mb->info.audio.bit_rate);
GST_DEBUG (0,"mpeg1mux::update_audio_info: frequency %d", mb->info.audio.frequency); GST_DEBUG ("mpeg1mux::update_audio_info: frequency %d", mb->info.audio.frequency);
mb->info.audio.samples_per_second = (double)dfrequency [mb->info.audio.frequency]; mb->info.audio.samples_per_second = (double)dfrequency [mb->info.audio.frequency];
GST_DEBUG (0,"mpeg1mux::update_audio_info: samples per second %g", mb->info.audio.samples_per_second); GST_DEBUG ("mpeg1mux::update_audio_info: samples per second %g", mb->info.audio.samples_per_second);
mb->info.audio.decoding_order=0; mb->info.audio.decoding_order=0;
@ -435,7 +435,7 @@ static void mpeg1mux_buffer_update_audio_info(Mpeg1MuxBuffer *mb) {
mb->info.audio.current_PTS = mb->info.audio.decoding_order * samples [mb->info.audio.layer] / mb->info.audio.current_PTS = mb->info.audio.decoding_order * samples [mb->info.audio.layer] /
mb->info.audio.samples_per_second * 90. + startup_delay; mb->info.audio.samples_per_second * 90. + startup_delay;
GST_DEBUG (0,"mpeg1mux::update_audio_info: PTS %" G_GUINT64_FORMAT ", length %u", mb->info.audio.current_PTS, mb->info.audio.framesize); GST_DEBUG ("mpeg1mux::update_audio_info: PTS %" G_GUINT64_FORMAT ", length %u", mb->info.audio.current_PTS, mb->info.audio.framesize);
tc->PTS = mb->info.audio.current_PTS; tc->PTS = mb->info.audio.current_PTS;
tc->DTS = mb->info.audio.current_PTS; tc->DTS = mb->info.audio.current_PTS;
mb->timecode_list = g_list_append(mb->timecode_list, tc); mb->timecode_list = g_list_append(mb->timecode_list, tc);
@ -482,7 +482,7 @@ static void mpeg1mux_buffer_update_audio_info(Mpeg1MuxBuffer *mb) {
mb->info.audio.samples_per_second * 90. ; mb->info.audio.samples_per_second * 90. ;
tc->DTS = tc->PTS = mb->info.audio.current_PTS; tc->DTS = tc->PTS = mb->info.audio.current_PTS;
GST_DEBUG (0,"mpeg1mux::update_audio_info: PTS %" G_GUINT64_FORMAT ", %" G_GUINT64_FORMAT " length %lu", mb->info.audio.current_PTS, tc->PTS, tc->length); GST_DEBUG ("mpeg1mux::update_audio_info: PTS %" G_GUINT64_FORMAT ", %" G_GUINT64_FORMAT " length %lu", mb->info.audio.current_PTS, tc->PTS, tc->length);
mb->timecode_list = g_list_append(mb->timecode_list, tc); mb->timecode_list = g_list_append(mb->timecode_list, tc);
mb->info.audio.decoding_order++; mb->info.audio.decoding_order++;

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 <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <math.h> #include <math.h>
@ -25,7 +28,7 @@
#include "gstmpeg1systemencode.h" #include "gstmpeg1systemencode.h"
#include "main.h" #include "main.h"
/*#define GST_DEBUG(a, b...) g_print (##b) */ /*#define GST_DEBUG (b...) g_print (##b) */
/* elementfactory information */ /* elementfactory information */
static GstElementDetails system_encode_details = { static GstElementDetails system_encode_details = {
@ -217,7 +220,7 @@ gst_system_encode_pick_streams (GList *mta, GstMPEG1SystemEncode *system_encode)
{ {
guint64 lowest = ~1; guint64 lowest = ~1;
GST_DEBUG (0, "pick_streams: %" G_GINT64_FORMAT ", %" G_GINT64_FORMAT, system_encode->video_buffer->next_frame_time, GST_DEBUG ("pick_streams: %" G_GINT64_FORMAT ", %" G_GINT64_FORMAT, system_encode->video_buffer->next_frame_time,
system_encode->audio_buffer->next_frame_time); system_encode->audio_buffer->next_frame_time);
if (system_encode->which_streams & STREAMS_VIDEO) { if (system_encode->which_streams & STREAMS_VIDEO) {
@ -278,7 +281,7 @@ gst_system_encode_update_mta (GstMPEG1SystemEncode *system_encode, GList *mta, g
GList *streams = g_list_first(mta); GList *streams = g_list_first(mta);
Mpeg1MuxBuffer *mb = (Mpeg1MuxBuffer *)streams->data; Mpeg1MuxBuffer *mb = (Mpeg1MuxBuffer *)streams->data;
GST_DEBUG (0,"system_encode::multiplex: update mta"); GST_DEBUG ("system_encode::multiplex: update mta");
mpeg1mux_buffer_shrink(mb, size); mpeg1mux_buffer_shrink(mb, size);
@ -315,7 +318,7 @@ gst_system_setup_multiplex (GstMPEG1SystemEncode *system_encode)
(double)(system_encode->packets_per_pack-1.))) / (double)(system_encode->packets_per_pack) ); (double)(system_encode->packets_per_pack-1.))) / (double)(system_encode->packets_per_pack) );
system_encode->data_rate = ceil(system_encode->dmux_rate/50.)*50; system_encode->data_rate = ceil(system_encode->dmux_rate/50.)*50;
GST_DEBUG (0,"system_encode::multiplex: data_rate %u, video_rate: %u, audio_rate: %u", system_encode->data_rate, GST_DEBUG ("system_encode::multiplex: data_rate %u, video_rate: %u, audio_rate: %u", system_encode->data_rate,
system_encode->video_rate, system_encode->audio_rate); system_encode->video_rate, system_encode->audio_rate);
system_encode->video_delay = (double)system_encode->video_delay_ms*(double)(CLOCKS/1000); system_encode->video_delay = (double)system_encode->video_delay_ms*(double)(CLOCKS/1000);
@ -327,7 +330,7 @@ gst_system_setup_multiplex (GstMPEG1SystemEncode *system_encode)
video_tc = MPEG1MUX_BUFFER_FIRST_TIMECODE(system_encode->video_buffer); video_tc = MPEG1MUX_BUFFER_FIRST_TIMECODE(system_encode->video_buffer);
audio_tc = MPEG1MUX_BUFFER_FIRST_TIMECODE(system_encode->audio_buffer); audio_tc = MPEG1MUX_BUFFER_FIRST_TIMECODE(system_encode->audio_buffer);
GST_DEBUG (0,"system_encode::video tc %" G_GINT64_FORMAT ", audio tc %" G_GINT64_FORMAT ":", video_tc->DTS, audio_tc->DTS); GST_DEBUG ("system_encode::video tc %" G_GINT64_FORMAT ", audio tc %" G_GINT64_FORMAT ":", video_tc->DTS, audio_tc->DTS);
system_encode->delay = ((double)system_encode->sectors_delay + system_encode->delay = ((double)system_encode->sectors_delay +
ceil((double)video_tc->length/(double)system_encode->min_packet_data) + ceil((double)video_tc->length/(double)system_encode->min_packet_data) +
@ -341,7 +344,7 @@ gst_system_setup_multiplex (GstMPEG1SystemEncode *system_encode)
system_encode->video_delay = 0; system_encode->video_delay = 0;
system_encode->delay = 0; system_encode->delay = 0;
GST_DEBUG (0,"system_encode::multiplex: delay %g, mux_rate: %lu", system_encode->delay, system_encode->mux_rate); GST_DEBUG ("system_encode::multiplex: delay %g, mux_rate: %lu", system_encode->delay, system_encode->mux_rate);
} }
static void static void
@ -361,7 +364,7 @@ gst_system_encode_multiplex(GstMPEG1SystemEncode *system_encode)
g_mutex_lock(system_encode->lock); g_mutex_lock(system_encode->lock);
while (gst_system_encode_have_data(system_encode)) { while (gst_system_encode_have_data(system_encode)) {
GST_DEBUG (0,"system_encode::multiplex: multiplexing"); GST_DEBUG ("system_encode::multiplex: multiplexing");
if (!system_encode->have_setup) { if (!system_encode->have_setup) {
gst_system_setup_multiplex(system_encode); gst_system_setup_multiplex(system_encode);
@ -397,7 +400,7 @@ gst_system_encode_multiplex(GstMPEG1SystemEncode *system_encode)
tc = MPEG1MUX_BUFFER_FIRST_TIMECODE(mb); tc = MPEG1MUX_BUFFER_FIRST_TIMECODE(mb);
if (mb->new_frame) { if (mb->new_frame) {
GST_DEBUG (0,"system_encode::multiplex: new frame"); GST_DEBUG ("system_encode::multiplex: new frame");
if (tc->frame_type == FRAME_TYPE_AUDIO || tc->frame_type == FRAME_TYPE_IFRAME || tc->frame_type == FRAME_TYPE_PFRAME) { if (tc->frame_type == FRAME_TYPE_AUDIO || tc->frame_type == FRAME_TYPE_IFRAME || tc->frame_type == FRAME_TYPE_PFRAME) {
timestamps = TIMESTAMPS_PTS; timestamps = TIMESTAMPS_PTS;
} }
@ -458,7 +461,7 @@ gst_system_encode_multiplex(GstMPEG1SystemEncode *system_encode)
system_encode->bytes_output += GST_BUFFER_SIZE(outbuf); system_encode->bytes_output += GST_BUFFER_SIZE(outbuf);
gst_pad_push(system_encode->srcpad,outbuf); gst_pad_push(system_encode->srcpad,outbuf);
GST_DEBUG (0,"system_encode::multiplex: writing %02x", mb->stream_id); GST_DEBUG ("system_encode::multiplex: writing %02x", mb->stream_id);
} }
gst_info("system_encode::multiplex: data left in video buffer %lu\n", MPEG1MUX_BUFFER_SPACE(system_encode->video_buffer)); gst_info("system_encode::multiplex: data left in video buffer %lu\n", MPEG1MUX_BUFFER_SPACE(system_encode->video_buffer));
@ -484,18 +487,18 @@ gst_system_encode_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,"system_encode::chain: system_encode: have buffer of size %lu",size); GST_DEBUG ("system_encode::chain: system_encode: have buffer of size %lu",size);
padname = GST_OBJECT_NAME (pad); padname = GST_OBJECT_NAME (pad);
if (strncmp(padname, "audio_", 6) == 0) { if (strncmp(padname, "audio_", 6) == 0) {
channel = atoi(&padname[6]); channel = atoi(&padname[6]);
GST_DEBUG (0,"gst_system_encode_chain: got audio buffer in from audio channel %02d", channel); GST_DEBUG ("gst_system_encode_chain: got audio buffer in from audio channel %02d", channel);
mpeg1mux_buffer_queue(system_encode->audio_buffer, buf); mpeg1mux_buffer_queue(system_encode->audio_buffer, buf);
} }
else if (strncmp(padname, "video_", 6) == 0) { else if (strncmp(padname, "video_", 6) == 0) {
channel = atoi(&padname[6]); channel = atoi(&padname[6]);
GST_DEBUG (0,"gst_system_encode_chain: got video buffer in from video channel %02d", channel); GST_DEBUG ("gst_system_encode_chain: got video buffer in from video channel %02d", channel);
mpeg1mux_buffer_queue(system_encode->video_buffer, buf); mpeg1mux_buffer_queue(system_encode->video_buffer, buf);

View file

@ -18,6 +18,9 @@
*/ */
/*#define GST_DEBUG_ENABLED */ /*#define GST_DEBUG_ENABLED */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "gstmp1videoparse.h" #include "gstmp1videoparse.h"
/* Start codes. */ /* Start codes. */
@ -208,7 +211,7 @@ mp1videoparse_find_next_gop (Mp1VideoParse *mp1videoparse, GstBuffer *buf)
static void static void
gst_mp1videoparse_flush (Mp1VideoParse *mp1videoparse) gst_mp1videoparse_flush (Mp1VideoParse *mp1videoparse)
{ {
GST_DEBUG (0,"mp1videoparse: flushing"); GST_DEBUG ("mp1videoparse: flushing");
if (mp1videoparse->partialbuf) { if (mp1videoparse->partialbuf) {
gst_buffer_unref(mp1videoparse->partialbuf); gst_buffer_unref(mp1videoparse->partialbuf);
mp1videoparse->partialbuf= NULL; mp1videoparse->partialbuf= NULL;
@ -276,17 +279,17 @@ gst_mp1videoparse_real_chain (Mp1VideoParse *mp1videoparse, GstBuffer *buf, GstP
data = GST_BUFFER_DATA(mp1videoparse->partialbuf); data = GST_BUFFER_DATA(mp1videoparse->partialbuf);
size = GST_BUFFER_SIZE(mp1videoparse->partialbuf); size = GST_BUFFER_SIZE(mp1videoparse->partialbuf);
GST_DEBUG (0,"mp1videoparse: received buffer of %ld bytes %" G_GINT64_FORMAT,size, GST_BUFFER_TIMESTAMP(buf)); GST_DEBUG ("mp1videoparse: received buffer of %ld bytes %" G_GINT64_FORMAT,size, GST_BUFFER_TIMESTAMP(buf));
head = GUINT32_FROM_BE(*((guint32 *)data)); head = GUINT32_FROM_BE(*((guint32 *)data));
GST_DEBUG (0,"mp1videoparse: head is %08x", (unsigned int)head); GST_DEBUG ("mp1videoparse: head is %08x", (unsigned int)head);
if (!mp1videoparse_valid_sync(head) || mp1videoparse->need_resync) { if (!mp1videoparse_valid_sync(head) || mp1videoparse->need_resync) {
sync_pos = mp1videoparse_find_next_gop(mp1videoparse, mp1videoparse->partialbuf); sync_pos = mp1videoparse_find_next_gop(mp1videoparse, mp1videoparse->partialbuf);
if (sync_pos != -1) { if (sync_pos != -1) {
mp1videoparse->need_resync = FALSE; mp1videoparse->need_resync = FALSE;
GST_DEBUG (0,"mp1videoparse: found new gop at %d", sync_pos); GST_DEBUG ("mp1videoparse: found new gop at %d", sync_pos);
if (sync_pos != 0) { if (sync_pos != 0) {
temp = gst_buffer_create_sub(mp1videoparse->partialbuf, sync_pos, size-sync_pos); temp = gst_buffer_create_sub(mp1videoparse->partialbuf, sync_pos, size-sync_pos);
@ -299,7 +302,7 @@ gst_mp1videoparse_real_chain (Mp1VideoParse *mp1videoparse, GstBuffer *buf, GstP
} }
} }
else { else {
GST_DEBUG (0,"mp1videoparse: could not sync"); GST_DEBUG ("mp1videoparse: could not sync");
gst_buffer_unref(mp1videoparse->partialbuf); gst_buffer_unref(mp1videoparse->partialbuf);
mp1videoparse->partialbuf = NULL; mp1videoparse->partialbuf = NULL;
return; return;
@ -313,7 +316,7 @@ gst_mp1videoparse_real_chain (Mp1VideoParse *mp1videoparse, GstBuffer *buf, GstP
sync_state = 0; sync_state = 0;
have_sync = FALSE; have_sync = FALSE;
GST_DEBUG (0,"mp1videoparse: searching sync"); GST_DEBUG ("mp1videoparse: searching sync");
while (offset < size-1) { while (offset < size-1) {
sync_byte = *(data + offset); sync_byte = *(data + offset);
@ -322,7 +325,7 @@ gst_mp1videoparse_real_chain (Mp1VideoParse *mp1videoparse, GstBuffer *buf, GstP
sync_state++; sync_state++;
} }
else if ((sync_byte == 1) && (sync_state >=2)) { else if ((sync_byte == 1) && (sync_state >=2)) {
GST_DEBUG (0,"mp1videoparse: code 0x000001%02x",data[offset+1]); GST_DEBUG ("mp1videoparse: code 0x000001%02x",data[offset+1]);
if (data[offset+1] == (PICTURE_START_CODE & 0xff)) { if (data[offset+1] == (PICTURE_START_CODE & 0xff)) {
mp1videoparse->picture_in_buffer++; mp1videoparse->picture_in_buffer++;
if (mp1videoparse->picture_in_buffer == 1) { if (mp1videoparse->picture_in_buffer == 1) {
@ -334,7 +337,7 @@ gst_mp1videoparse_real_chain (Mp1VideoParse *mp1videoparse, GstBuffer *buf, GstP
break; break;
} }
else { else {
GST_DEBUG (0,"mp1videoparse: %d in buffer", mp1videoparse->picture_in_buffer); GST_DEBUG ("mp1videoparse: %d in buffer", mp1videoparse->picture_in_buffer);
g_assert_not_reached(); g_assert_not_reached();
} }
} }
@ -348,7 +351,7 @@ gst_mp1videoparse_real_chain (Mp1VideoParse *mp1videoparse, GstBuffer *buf, GstP
if (have_sync) { if (have_sync) {
offset -= 2; offset -= 2;
GST_DEBUG (0,"mp1videoparse: synced at %ld code 0x000001%02x",offset,data[offset+3]); GST_DEBUG ("mp1videoparse: synced at %ld code 0x000001%02x",offset,data[offset+3]);
outbuf = gst_buffer_create_sub(mp1videoparse->partialbuf, 0, offset+4); outbuf = gst_buffer_create_sub(mp1videoparse->partialbuf, 0, offset+4);
g_assert(outbuf != NULL); g_assert(outbuf != NULL);
@ -359,9 +362,9 @@ gst_mp1videoparse_real_chain (Mp1VideoParse *mp1videoparse, GstBuffer *buf, GstP
mp1videoparse->in_flush = FALSE; mp1videoparse->in_flush = FALSE;
} }
GST_DEBUG (0,"mp1videoparse: pushing %d bytes %" G_GUINT64_FORMAT, GST_BUFFER_SIZE(outbuf), GST_BUFFER_TIMESTAMP(outbuf)); GST_DEBUG ("mp1videoparse: pushing %d bytes %" G_GUINT64_FORMAT, GST_BUFFER_SIZE(outbuf), GST_BUFFER_TIMESTAMP(outbuf));
gst_pad_push(outpad, outbuf); gst_pad_push(outpad, outbuf);
GST_DEBUG (0,"mp1videoparse: pushing done"); GST_DEBUG ("mp1videoparse: pushing done");
mp1videoparse->picture_in_buffer = 0; mp1videoparse->picture_in_buffer = 0;
temp = gst_buffer_create_sub(mp1videoparse->partialbuf, offset, size-offset); temp = gst_buffer_create_sub(mp1videoparse->partialbuf, offset, size-offset);
@ -381,7 +384,7 @@ gst_mp1videoparse_change_state (GstElement *element)
g_return_val_if_fail(GST_IS_MP1VIDEOPARSE(element),GST_STATE_FAILURE); g_return_val_if_fail(GST_IS_MP1VIDEOPARSE(element),GST_STATE_FAILURE);
mp1videoparse = GST_MP1VIDEOPARSE(element); mp1videoparse = GST_MP1VIDEOPARSE(element);
GST_DEBUG (0,"mp1videoparse: state pending %d", GST_STATE_PENDING(element)); GST_DEBUG ("mp1videoparse: state pending %d", GST_STATE_PENDING(element));
* if going down into NULL state, clear out buffers * * if going down into NULL state, clear out buffers *
if (GST_STATE_PENDING(element) == GST_STATE_READY) { if (GST_STATE_PENDING(element) == GST_STATE_READY) {

View file

@ -19,6 +19,9 @@
/*#define DEBUG_ENABLED */ /*#define DEBUG_ENABLED */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <gstmpeg2subt.h> #include <gstmpeg2subt.h>
static void gst_mpeg2subt_class_init (GstMpeg2SubtClass *klass); static void gst_mpeg2subt_class_init (GstMpeg2SubtClass *klass);
@ -198,7 +201,7 @@ gst_mpeg2subt_parse_header (GstMpeg2Subt *mpeg2subt)
mpeg2subt->color[2] = yuv_color[buffer [i+2] >> 4]; mpeg2subt->color[2] = yuv_color[buffer [i+2] >> 4];
mpeg2subt->color[3] = yuv_color[buffer [i+2] & 0xf]; mpeg2subt->color[3] = yuv_color[buffer [i+2] & 0xf];
mpeg2subt->color[4] = yuv_color[0xf]; mpeg2subt->color[4] = yuv_color[0xf];
GST_DEBUG (0,"mpeg2subt: colors %d %d %d %d", mpeg2subt->color[0],mpeg2subt->color[1],mpeg2subt->color[2],mpeg2subt->color[3]); GST_DEBUG ("mpeg2subt: colors %d %d %d %d", mpeg2subt->color[0],mpeg2subt->color[1],mpeg2subt->color[2],mpeg2subt->color[3]);
i += 3; i += 3;
break; break;
case 0x04: /* transparency palette */ case 0x04: /* transparency palette */
@ -206,7 +209,7 @@ gst_mpeg2subt_parse_header (GstMpeg2Subt *mpeg2subt)
mpeg2subt->trans[2] = buffer [i+1] & 0xf; mpeg2subt->trans[2] = buffer [i+1] & 0xf;
mpeg2subt->trans[1] = buffer [i+2] >> 4; mpeg2subt->trans[1] = buffer [i+2] >> 4;
mpeg2subt->trans[0] = buffer [i+2] & 0xf; mpeg2subt->trans[0] = buffer [i+2] & 0xf;
GST_DEBUG (0,"mpeg2subt: transparency %d %d %d %d", mpeg2subt->trans[0],mpeg2subt->trans[1],mpeg2subt->trans[2],mpeg2subt->trans[3]); GST_DEBUG ("mpeg2subt: transparency %d %d %d %d", mpeg2subt->trans[0],mpeg2subt->trans[1],mpeg2subt->trans[2],mpeg2subt->trans[3]);
i += 3; i += 3;
break; break;
case 0x05: /* image coordinates */ case 0x05: /* image coordinates */
@ -226,7 +229,7 @@ gst_mpeg2subt_parse_header (GstMpeg2Subt *mpeg2subt)
*/ */
mpeg2subt->duration = (((buffer[i+1] << 8) + buffer[i+2]) * 25)/90; mpeg2subt->duration = (((buffer[i+1] << 8) + buffer[i+2]) * 25)/90;
GST_DEBUG (0,"duration %d", mpeg2subt->duration); GST_DEBUG ("duration %d", mpeg2subt->duration);
if ( (buffer[i+3] != buffer[mpeg2subt->data_size+2]) if ( (buffer[i+3] != buffer[mpeg2subt->data_size+2])
|| (buffer[i+4] != buffer[mpeg2subt->data_size+3]) ) || (buffer[i+4] != buffer[mpeg2subt->data_size+3]) )
@ -280,7 +283,7 @@ gst_mpeg2subt_merge_title (GstMpeg2Subt *mpeg2subt, GstBuffer *buf)
offset[1] = mpeg2subt->offset[1]; offset[1] = mpeg2subt->offset[1];
#define get_nibble() get_nibble (buffer, offset, id, &aligned) #define get_nibble() get_nibble (buffer, offset, id, &aligned)
GST_DEBUG (0,"mpeg2subt: merging subtitle"); GST_DEBUG ("mpeg2subt: merging subtitle");
while ((offset[1] < mpeg2subt->data_size + 2) && (y < height)) while ((offset[1] < mpeg2subt->data_size + 2) && (y < height))
{ {
@ -362,7 +365,7 @@ gst_mpeg2subt_chain_subtitle (GstPad *pad, GstBuffer *buf)
mpeg2subt->have_title = FALSE; mpeg2subt->have_title = FALSE;
} }
GST_DEBUG (0,"presentation time %" G_GUINT64_FORMAT, GST_BUFFER_TIMESTAMP(buf)); GST_DEBUG ("presentation time %" G_GUINT64_FORMAT, GST_BUFFER_TIMESTAMP(buf));
/* deal with partial frame from previous buffer */ /* deal with partial frame from previous buffer */
if (mpeg2subt->partialbuf) { if (mpeg2subt->partialbuf) {
@ -382,7 +385,7 @@ gst_mpeg2subt_chain_subtitle (GstPad *pad, GstBuffer *buf)
if (mpeg2subt->packet_size == size) { if (mpeg2subt->packet_size == size) {
GST_DEBUG (0,"mpeg2subt: subtitle packet size %d, current size %ld", mpeg2subt->packet_size, size); GST_DEBUG ("mpeg2subt: subtitle packet size %d, current size %ld", mpeg2subt->packet_size, size);
mpeg2subt->data_size = GUINT16_FROM_BE(*(guint16 *)(data+2)); mpeg2subt->data_size = GUINT16_FROM_BE(*(guint16 *)(data+2));

View file

@ -41,7 +41,7 @@ mp3_type_find(GstBuffer *buf, gpointer private)
data = GST_BUFFER_DATA (buf); data = GST_BUFFER_DATA (buf);
size = GST_BUFFER_SIZE (buf); size = GST_BUFFER_SIZE (buf);
GST_DEBUG (0,"mp3typefind: typefind"); GST_DEBUG ("mp3typefind: typefind");
/* gracefully ripped from libid3 */ /* gracefully ripped from libid3 */
if (size >= 3 && if (size >= 3 &&
@ -50,7 +50,7 @@ mp3_type_find(GstBuffer *buf, gpointer private)
data += 128; data += 128;
size -= 128; size -= 128;
GST_DEBUG (0, "mp3typefind: detected ID3 Tag V1"); GST_DEBUG ("mp3typefind: detected ID3 Tag V1");
} else if (size >= 10 && } else if (size >= 10 &&
(data[0] == 'I' && data[1] == 'D' && data[2] == '3') && (data[0] == 'I' && data[1] == 'D' && data[2] == '3') &&
data[3] < 0xff && data[4] < 0xff && data[3] < 0xff && data[4] < 0xff &&
@ -69,7 +69,7 @@ mp3_type_find(GstBuffer *buf, gpointer private)
if (data[3] > 3 && (data[5] & 0x10)) if (data[3] > 3 && (data[5] & 0x10))
skip += 10; skip += 10;
GST_DEBUG (0, "mp3typefind: detected ID3 Tag V2 with %u bytes", skip); GST_DEBUG ("mp3typefind: detected ID3 Tag V2 with %u bytes", skip);
size -= skip; size -= skip;
data += skip; data += skip;
} }
@ -147,8 +147,8 @@ mp3_type_frame_length_from_header (guint32 header)
length += ((layer == 3 && version == 0) ? 144000 : 72000) * bitrate / samplerate; length += ((layer == 3 && version == 0) ? 144000 : 72000) * bitrate / samplerate;
} }
GST_DEBUG (0, "Calculated mad frame length of %u bytes", length); GST_DEBUG ("Calculated mad frame length of %u bytes", length);
GST_DEBUG (0, "samplerate = %lu - bitrate = %lu - layer = %lu - version = %lu", samplerate, bitrate, layer, version); GST_DEBUG ("samplerate = %lu - bitrate = %lu - layer = %lu - version = %lu", samplerate, bitrate, layer, version);
return length; return length;
} }

View file

@ -18,6 +18,9 @@
*/ */
/*#define GST_DEBUG_ENABLED */ /*#define GST_DEBUG_ENABLED */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <gstmpegaudioparse.h> #include <gstmpegaudioparse.h>
@ -243,7 +246,7 @@ gst_mp3parse_chain (GstPad *pad, GstBuffer *buf)
mp3parse = GST_MP3PARSE (gst_pad_get_parent (pad)); mp3parse = GST_MP3PARSE (gst_pad_get_parent (pad));
GST_DEBUG (0,"mp3parse: received buffer of %d bytes",GST_BUFFER_SIZE(buf)); GST_DEBUG ("mp3parse: received buffer of %d bytes",GST_BUFFER_SIZE(buf));
last_ts = GST_BUFFER_TIMESTAMP(buf); last_ts = GST_BUFFER_TIMESTAMP(buf);
@ -274,12 +277,12 @@ gst_mp3parse_chain (GstPad *pad, GstBuffer *buf)
while (offset < size-4) { while (offset < size-4) {
int skipped = 0; int skipped = 0;
GST_DEBUG (0,"mp3parse: offset %ld, size %ld ",offset, size); GST_DEBUG ("mp3parse: offset %ld, size %ld ",offset, size);
/* search for a possible start byte */ /* search for a possible start byte */
for (;((data[offset] != 0xff) && (offset < size));offset++) skipped++; for (;((data[offset] != 0xff) && (offset < size));offset++) skipped++;
if (skipped && !mp3parse->in_flush) { if (skipped && !mp3parse->in_flush) {
GST_DEBUG (0,"mp3parse: **** now at %ld skipped %d bytes",offset,skipped); GST_DEBUG ("mp3parse: **** now at %ld skipped %d bytes",offset,skipped);
} }
/* construct the header word */ /* construct the header word */
header = GUINT32_FROM_BE(*((guint32 *)(data+offset))); header = GUINT32_FROM_BE(*((guint32 *)(data+offset)));
@ -306,12 +309,12 @@ gst_mp3parse_chain (GstPad *pad, GstBuffer *buf)
if ((size-offset)<(bpf+4)) { if (mp3parse->in_flush) break; } /* wait until we have the the entire current frame as well as the next frame header */ if ((size-offset)<(bpf+4)) { if (mp3parse->in_flush) break; } /* wait until we have the the entire current frame as well as the next frame header */
header2 = GUINT32_FROM_BE(*((guint32 *)(data+offset+bpf))); header2 = GUINT32_FROM_BE(*((guint32 *)(data+offset+bpf)));
GST_DEBUG(0,"mp3parse: header=%08X, header2=%08X, bpf=%d", (unsigned int)header, (unsigned int)header2, bpf ); GST_DEBUG ("mp3parse: header=%08X, header2=%08X, bpf=%d", (unsigned int)header, (unsigned int)header2, bpf );
#define HDRMASK ~( (0xF<<12)/*bitrate*/ | (1<<9)/*padding*/ | (3<<4)/*mode extension*/ ) /* mask the bits which are allowed to differ between frames */ #define HDRMASK ~( (0xF<<12)/*bitrate*/ | (1<<9)/*padding*/ | (3<<4)/*mode extension*/ ) /* mask the bits which are allowed to differ between frames */
if ( (header2&HDRMASK) != (header&HDRMASK) ) { /* require 2 matching headers in a row */ if ( (header2&HDRMASK) != (header&HDRMASK) ) { /* require 2 matching headers in a row */
GST_DEBUG(0,"mp3parse: next header doesn't match (header=%08X, header2=%08X, bpf=%d)", (unsigned int)header, (unsigned int)header2, bpf ); GST_DEBUG ("mp3parse: next header doesn't match (header=%08X, header2=%08X, bpf=%d)", (unsigned int)header, (unsigned int)header2, bpf );
offset++; /* This frame is invalid. Start looking for a valid frame at the next position in the stream */ offset++; /* This frame is invalid. Start looking for a valid frame at the next position in the stream */
continue; continue;
} }
@ -320,7 +323,7 @@ gst_mp3parse_chain (GstPad *pad, GstBuffer *buf)
/* if we don't have the whole frame... */ /* if we don't have the whole frame... */
if ((size - offset) < bpf) { if ((size - offset) < bpf) {
GST_DEBUG (0,"mp3parse: partial buffer needed %ld < %d ",(size-offset), bpf); GST_DEBUG ("mp3parse: partial buffer needed %ld < %d ",(size-offset), bpf);
break; break;
} else { } else {
@ -328,7 +331,7 @@ gst_mp3parse_chain (GstPad *pad, GstBuffer *buf)
offset += bpf; offset += bpf;
if (mp3parse->skip == 0) { if (mp3parse->skip == 0) {
GST_DEBUG (0,"mp3parse: pushing buffer of %d bytes",GST_BUFFER_SIZE(outbuf)); GST_DEBUG ("mp3parse: pushing buffer of %d bytes",GST_BUFFER_SIZE(outbuf));
if (mp3parse->in_flush) { if (mp3parse->in_flush) {
/* FIXME do some sort of flush event */ /* FIXME do some sort of flush event */
mp3parse->in_flush = FALSE; mp3parse->in_flush = FALSE;
@ -337,21 +340,21 @@ gst_mp3parse_chain (GstPad *pad, GstBuffer *buf)
gst_pad_push(mp3parse->srcpad,outbuf); gst_pad_push(mp3parse->srcpad,outbuf);
} }
else { else {
GST_DEBUG (0,"mp3parse: skipping buffer of %d bytes",GST_BUFFER_SIZE(outbuf)); GST_DEBUG ("mp3parse: skipping buffer of %d bytes",GST_BUFFER_SIZE(outbuf));
gst_buffer_unref(outbuf); gst_buffer_unref(outbuf);
mp3parse->skip--; mp3parse->skip--;
} }
} }
} else { } else {
offset++; offset++;
if (!mp3parse->in_flush) GST_DEBUG (0,"mp3parse: *** wrong header, skipping byte (FIXME?)"); if (!mp3parse->in_flush) GST_DEBUG ("mp3parse: *** wrong header, skipping byte (FIXME?)");
} }
} }
/* if we have processed this block and there are still */ /* if we have processed this block and there are still */
/* bytes left not in a partial block, copy them over. */ /* bytes left not in a partial block, copy them over. */
if (size-offset > 0) { if (size-offset > 0) {
glong remainder = (size - offset); glong remainder = (size - offset);
GST_DEBUG (0,"mp3parse: partial buffer needed %ld for trailing bytes",remainder); GST_DEBUG ("mp3parse: partial buffer needed %ld for trailing bytes",remainder);
outbuf = gst_buffer_create_sub(mp3parse->partialbuf,offset,remainder); outbuf = gst_buffer_create_sub(mp3parse->partialbuf,offset,remainder);
gst_buffer_unref(mp3parse->partialbuf); gst_buffer_unref(mp3parse->partialbuf);
@ -409,28 +412,28 @@ bpf_from_header (GstMPEGAudioParse *parse, unsigned long header)
static gboolean static gboolean
head_check (unsigned long head) head_check (unsigned long head)
{ {
GST_DEBUG (0,"checking mp3 header 0x%08lx",head); GST_DEBUG ("checking mp3 header 0x%08lx",head);
/* if it's not a valid sync */ /* if it's not a valid sync */
if ((head & 0xffe00000) != 0xffe00000) { if ((head & 0xffe00000) != 0xffe00000) {
GST_DEBUG (0,"invalid sync");return FALSE; } GST_DEBUG ("invalid sync");return FALSE; }
/* if it's an invalid MPEG version */ /* if it's an invalid MPEG version */
if (((head >> 19) & 3) == 0x1) { if (((head >> 19) & 3) == 0x1) {
GST_DEBUG (0,"invalid MPEG version");return FALSE; } GST_DEBUG ("invalid MPEG version");return FALSE; }
/* if it's an invalid layer */ /* if it's an invalid layer */
if (!((head >> 17) & 3)) { if (!((head >> 17) & 3)) {
GST_DEBUG (0,"invalid layer");return FALSE; } GST_DEBUG ("invalid layer");return FALSE; }
/* if it's an invalid bitrate */ /* if it's an invalid bitrate */
if (((head >> 12) & 0xf) == 0x0) { if (((head >> 12) & 0xf) == 0x0) {
GST_DEBUG (0,"invalid bitrate");return FALSE; } GST_DEBUG ("invalid bitrate");return FALSE; }
if (((head >> 12) & 0xf) == 0xf) { if (((head >> 12) & 0xf) == 0xf) {
GST_DEBUG (0,"invalid bitrate");return FALSE; } GST_DEBUG ("invalid bitrate");return FALSE; }
/* if it's an invalid samplerate */ /* if it's an invalid samplerate */
if (((head >> 10) & 0x3) == 0x3) { if (((head >> 10) & 0x3) == 0x3) {
GST_DEBUG (0,"invalid samplerate");return FALSE; } GST_DEBUG ("invalid samplerate");return FALSE; }
if ((head & 0xffff0000) == 0xfffe0000) { if ((head & 0xffff0000) == 0xfffe0000) {
GST_DEBUG (0,"invalid sync");return FALSE; } GST_DEBUG ("invalid sync");return FALSE; }
if (head & 0x00000002) { if (head & 0x00000002) {
GST_DEBUG (0,"invalid emphasis");return FALSE; } GST_DEBUG ("invalid emphasis");return FALSE; }
return TRUE; return TRUE;
} }

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,9 @@
*/ */
#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,9 @@
* Boston, MA 02111-1307, USA. * Boston, MA 02111-1307, USA.
*/ */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "qtdemux.h" #include "qtdemux.h"
#include <string.h> #include <string.h>
@ -257,7 +260,7 @@ static gboolean gst_qtdemux_handle_sink_event (GstQTDemux *qtdemux)
gst_bytestream_get_status(qtdemux->bs, &remaining, &event); gst_bytestream_get_status(qtdemux->bs, &remaining, &event);
type = event ? GST_EVENT_TYPE(event) : GST_EVENT_UNKNOWN; type = event ? GST_EVENT_TYPE(event) : GST_EVENT_UNKNOWN;
GST_DEBUG(0,"qtdemux: event %p %d", event, type); GST_DEBUG ("qtdemux: event %p %d", event, type);
switch(type){ switch(type){
case GST_EVENT_EOS: case GST_EVENT_EOS:
@ -268,7 +271,7 @@ static gboolean gst_qtdemux_handle_sink_event (GstQTDemux *qtdemux)
g_warning("flush event"); g_warning("flush event");
break; break;
case GST_EVENT_DISCONTINUOUS: case GST_EVENT_DISCONTINUOUS:
GST_DEBUG(0,"discontinuous event\n"); GST_DEBUG ("discontinuous event\n");
//gst_bytestream_flush_fast(qtdemux->bs, remaining); //gst_bytestream_flush_fast(qtdemux->bs, remaining);
break; break;
default: default:
@ -324,7 +327,7 @@ static void gst_qtdemux_loop_header (GstElement *element)
//cur_offset = gst_bytestream_tell(qtdemux->bs); //cur_offset = gst_bytestream_tell(qtdemux->bs);
cur_offset = qtdemux->offset; cur_offset = qtdemux->offset;
GST_DEBUG(0,"loop at position %d",cur_offset); GST_DEBUG ("loop at position %d",cur_offset);
switch(qtdemux->state){ switch(qtdemux->state){
case QTDEMUX_STATE_HEADER: case QTDEMUX_STATE_HEADER:
@ -341,9 +344,9 @@ static void gst_qtdemux_loop_header (GstElement *element)
}while(1); }while(1);
length = GUINT32_FROM_BE(*(guint32 *)data); length = GUINT32_FROM_BE(*(guint32 *)data);
GST_DEBUG(0,"length %08x",length); GST_DEBUG ("length %08x",length);
fourcc = GUINT32_FROM_LE(*(guint32 *)(data+4)); fourcc = GUINT32_FROM_LE(*(guint32 *)(data+4));
GST_DEBUG(0,"fourcc " GST_FOURCC_FORMAT, GST_FOURCC_ARGS(fourcc)); GST_DEBUG ("fourcc " GST_FOURCC_FORMAT, GST_FOURCC_ARGS(fourcc));
if(length==0){ if(length==0){
length = gst_bytestream_length(qtdemux->bs) - cur_offset; length = gst_bytestream_length(qtdemux->bs) - cur_offset;
} }
@ -351,9 +354,9 @@ static void gst_qtdemux_loop_header (GstElement *element)
guint32 length1, length2; guint32 length1, length2;
length1 = GUINT32_FROM_BE(*(guint32 *)(data+8)); length1 = GUINT32_FROM_BE(*(guint32 *)(data+8));
GST_DEBUG(0,"length1 %08x",length1); GST_DEBUG ("length1 %08x",length1);
length2 = GUINT32_FROM_BE(*(guint32 *)(data+12)); length2 = GUINT32_FROM_BE(*(guint32 *)(data+12));
GST_DEBUG(0,"length2 %08x",length2); GST_DEBUG ("length2 %08x",length2);
length=length2; length=length2;
} }
@ -370,7 +373,7 @@ static void gst_qtdemux_loop_header (GstElement *element)
do{ do{
ret = gst_bytestream_read(qtdemux->bs, &moov, length); ret = gst_bytestream_read(qtdemux->bs, &moov, length);
if(ret < length){ if(ret < length){
GST_DEBUG(0,"read failed (%d < %d)",ret,length); GST_DEBUG ("read failed (%d < %d)",ret,length);
if(!gst_qtdemux_handle_sink_event(qtdemux)){ if(!gst_qtdemux_handle_sink_event(qtdemux)){
return; return;
} }
@ -395,7 +398,7 @@ static void gst_qtdemux_loop_header (GstElement *element)
ret = gst_bytestream_seek(qtdemux->bs, cur_offset + length, ret = gst_bytestream_seek(qtdemux->bs, cur_offset + length,
GST_SEEK_METHOD_SET); GST_SEEK_METHOD_SET);
qtdemux->offset = cur_offset + length; qtdemux->offset = cur_offset + length;
GST_DEBUG(0,"seek returned %d\n",ret); GST_DEBUG ("seek returned %d\n",ret);
break; break;
} }
case QTDEMUX_STATE_SEEKING_EOS: case QTDEMUX_STATE_SEEKING_EOS:
@ -444,7 +447,7 @@ static void gst_qtdemux_loop_header (GstElement *element)
GST_BUFFER(gst_event_new (GST_EVENT_EOS))); GST_BUFFER(gst_event_new (GST_EVENT_EOS)));
} }
ret = gst_bytestream_seek(qtdemux->bs, 0, GST_SEEK_METHOD_END); ret = gst_bytestream_seek(qtdemux->bs, 0, GST_SEEK_METHOD_END);
GST_DEBUG(0,"seek returned %d",ret); GST_DEBUG ("seek returned %d",ret);
qtdemux->state = QTDEMUX_STATE_SEEKING_EOS; qtdemux->state = QTDEMUX_STATE_SEEKING_EOS;
return; return;
@ -455,23 +458,23 @@ static void gst_qtdemux_loop_header (GstElement *element)
offset = stream->samples[stream->sample_index].offset; offset = stream->samples[stream->sample_index].offset;
size = stream->samples[stream->sample_index].size; size = stream->samples[stream->sample_index].size;
GST_DEBUG(0,"pushing from stream %d, sample_index=%d offset=%d size=%d", GST_DEBUG ("pushing from stream %d, sample_index=%d offset=%d size=%d",
index, stream->sample_index, offset, size); index, stream->sample_index, offset, size);
cur_offset = gst_bytestream_tell(qtdemux->bs); cur_offset = gst_bytestream_tell(qtdemux->bs);
if(offset != cur_offset){ if(offset != cur_offset){
GST_DEBUG(0,"seeking to offset %d",offset); GST_DEBUG ("seeking to offset %d",offset);
ret = gst_bytestream_seek(qtdemux->bs, offset, GST_SEEK_METHOD_SET); ret = gst_bytestream_seek(qtdemux->bs, offset, GST_SEEK_METHOD_SET);
GST_DEBUG(0,"seek returned %d",ret); GST_DEBUG ("seek returned %d",ret);
return; return;
} }
GST_DEBUG(0,"reading %d bytes\n",size); GST_DEBUG ("reading %d bytes\n",size);
buf = NULL; buf = NULL;
do{ do{
ret = gst_bytestream_read(qtdemux->bs, &buf, size); ret = gst_bytestream_read(qtdemux->bs, &buf, size);
if(ret < size){ if(ret < size){
GST_DEBUG(0,"read failed (%d < %d)",ret,size); GST_DEBUG ("read failed (%d < %d)",ret,size);
if(!gst_qtdemux_handle_sink_event(qtdemux)){ if(!gst_qtdemux_handle_sink_event(qtdemux)){
return; return;
} }
@ -500,14 +503,14 @@ static GstCaps *gst_qtdemux_src_getcaps(GstPad *pad, GstCaps *caps)
QtDemuxStream *stream; QtDemuxStream *stream;
int i; int i;
GST_DEBUG(0,"gst_qtdemux_src_getcaps"); GST_DEBUG ("gst_qtdemux_src_getcaps");
qtdemux = GST_QTDEMUX(gst_pad_get_parent(pad)); qtdemux = GST_QTDEMUX(gst_pad_get_parent(pad));
g_return_val_if_fail(GST_IS_QTDEMUX(qtdemux), NULL); g_return_val_if_fail(GST_IS_QTDEMUX(qtdemux), NULL);
GST_DEBUG(0, "looking for pad %p in qtdemux %p", pad, qtdemux); GST_DEBUG ("looking for pad %p in qtdemux %p", pad, qtdemux);
GST_DEBUG(0, "n_streams is %d", qtdemux->n_streams); GST_DEBUG ("n_streams is %d", qtdemux->n_streams);
for(i=0;i<qtdemux->n_streams;i++){ for(i=0;i<qtdemux->n_streams;i++){
stream = qtdemux->streams[i]; stream = qtdemux->streams[i];
if(stream->pad == pad){ if(stream->pad == pad){
@ -515,7 +518,7 @@ static GstCaps *gst_qtdemux_src_getcaps(GstPad *pad, GstCaps *caps)
} }
} }
GST_DEBUG(0,"Couldn't find stream cooresponding to pad\n"); GST_DEBUG ("Couldn't find stream cooresponding to pad\n");
return NULL; return NULL;
} }
@ -527,23 +530,23 @@ gst_qtdemux_src_link(GstPad *pad, GstCaps *caps)
QtDemuxStream *stream; QtDemuxStream *stream;
int i; int i;
GST_DEBUG(0,"gst_qtdemux_src_link"); GST_DEBUG ("gst_qtdemux_src_link");
qtdemux = GST_QTDEMUX(gst_pad_get_parent(pad)); qtdemux = GST_QTDEMUX(gst_pad_get_parent(pad));
GST_DEBUG(0, "looking for pad %p in qtdemux %p", pad, qtdemux); GST_DEBUG ("looking for pad %p in qtdemux %p", pad, qtdemux);
g_return_val_if_fail(GST_IS_QTDEMUX(qtdemux), GST_PAD_LINK_REFUSED); g_return_val_if_fail(GST_IS_QTDEMUX(qtdemux), GST_PAD_LINK_REFUSED);
GST_DEBUG(0, "n_streams is %d", qtdemux->n_streams); GST_DEBUG ("n_streams is %d", qtdemux->n_streams);
for(i=0;i<qtdemux->n_streams;i++){ for(i=0;i<qtdemux->n_streams;i++){
stream = qtdemux->streams[i]; stream = qtdemux->streams[i];
GST_DEBUG(0, "pad[%d] is %p", i, stream->pad); GST_DEBUG ("pad[%d] is %p", i, stream->pad);
if(stream->pad == pad){ if(stream->pad == pad){
return GST_PAD_LINK_OK; return GST_PAD_LINK_OK;
} }
} }
GST_DEBUG(0,"Couldn't find stream cooresponding to pad\n"); GST_DEBUG ("Couldn't find stream cooresponding to pad\n");
return GST_PAD_LINK_REFUSED; return GST_PAD_LINK_REFUSED;
} }
@ -581,9 +584,9 @@ void gst_qtdemux_add_stream(GstQTDemux *qtdemux, QtDemuxStream *stream)
qtdemux->streams[qtdemux->n_streams] = stream; qtdemux->streams[qtdemux->n_streams] = stream;
qtdemux->n_streams++; qtdemux->n_streams++;
GST_DEBUG(0, "n_streams is now %d", qtdemux->n_streams); GST_DEBUG ("n_streams is now %d", qtdemux->n_streams);
GST_DEBUG(0, "adding pad %p to qtdemux %p", stream->pad, qtdemux); GST_DEBUG ("adding pad %p to qtdemux %p", stream->pad, qtdemux);
gst_element_add_pad(GST_ELEMENT (qtdemux), stream->pad); gst_element_add_pad(GST_ELEMENT (qtdemux), stream->pad);
/* Note: we need to have everything set up before calling try_set_caps */ /* Note: we need to have everything set up before calling try_set_caps */

View file

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

View file

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

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 <gstsmooth.h> #include <gstsmooth.h>
@ -234,7 +237,7 @@ gst_smooth_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,"smooth: have buffer of %d", GST_BUFFER_SIZE (buf)); GST_DEBUG ("smooth: have buffer of %d", GST_BUFFER_SIZE (buf));
outbuf = gst_buffer_new(); outbuf = gst_buffer_new();
GST_BUFFER_DATA (outbuf) = g_malloc (GST_BUFFER_SIZE (buf)); GST_BUFFER_DATA (outbuf) = g_malloc (GST_BUFFER_SIZE (buf));

View file

@ -18,6 +18,9 @@
*/ */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <string.h> #include <string.h>
#include "gstsmoothwave.h" #include "gstsmoothwave.h"
@ -125,12 +128,12 @@ gst_smoothwave_init (GstSmoothWave *smoothwave)
/* gtk_widget_set_default_colormap (gdk_rgb_get_cmap()); */ /* gtk_widget_set_default_colormap (gdk_rgb_get_cmap()); */
/* gtk_widget_set_default_visual (gdk_rgb_get_visual()); */ /* gtk_widget_set_default_visual (gdk_rgb_get_visual()); */
/* GST_DEBUG (0,"creating palette"); */ /* GST_DEBUG ("creating palette"); */
for (i=0;i<256;i++) for (i=0;i<256;i++)
palette[i] = (i << 16) || (i << 8); palette[i] = (i << 16) || (i << 8);
/* GST_DEBUG (0,"creating cmap"); */ /* GST_DEBUG ("creating cmap"); */
smoothwave->cmap = gdk_rgb_cmap_new(palette,256); smoothwave->cmap = gdk_rgb_cmap_new(palette,256);
/* GST_DEBUG (0,"created cmap"); */ /* GST_DEBUG ("created cmap"); */
/* gtk_widget_set_default_colormap (smoothwave->cmap); */ /* gtk_widget_set_default_colormap (smoothwave->cmap); */
smoothwave->image = gtk_drawing_area_new(); smoothwave->image = gtk_drawing_area_new();
@ -176,7 +179,7 @@ gst_smoothwave_chain (GstPad *pad, GstBuffer *buf)
qheight = smoothwave->height/4; qheight = smoothwave->height/4;
/* GST_DEBUG (0,"traversing %d",smoothwave->width); */ /* GST_DEBUG ("traversing %d",smoothwave->width); */
for (i=0;i<MAX(smoothwave->width,samplecount);i++) { for (i=0;i<MAX(smoothwave->width,samplecount);i++) {
gint16 y1 = (gint32)(samples[i*2] * qheight) / 32768 + gint16 y1 = (gint32)(samples[i*2] * qheight) / 32768 +
qheight; qheight;
@ -195,8 +198,8 @@ gst_smoothwave_chain (GstPad *pad, GstBuffer *buf)
ptr++; ptr++;
} }
/* GST_DEBUG (0,"drawing"); */ /* GST_DEBUG ("drawing"); */
/* GST_DEBUG (0,"gdk_draw_indexed_image(%p,%p,%d,%d,%d,%d,%s,%p,%d,%p);", /* GST_DEBUG ("gdk_draw_indexed_image(%p,%p,%d,%d,%d,%d,%s,%p,%d,%p);",
smoothwave->image->window, smoothwave->image->window,
smoothwave->image->style->fg_gc[GTK_STATE_NORMAL], smoothwave->image->style->fg_gc[GTK_STATE_NORMAL],
0,0,smoothwave->width,smoothwave->height, 0,0,smoothwave->width,smoothwave->height,

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 <gstsmpte.h> #include <gstsmpte.h>
#include "paint.h" #include "paint.h"

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 "gstspectrum.h" #include "gstspectrum.h"

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 <math.h> #include <math.h>

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 <gststereo.h> #include <gststereo.h>
/* elementfactory information */ /* elementfactory information */

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 <config.h> #include <config.h>
#include <string.h> #include <string.h>
#include <inttypes.h> #include <inttypes.h>

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 <gst/gst.h> #include <gst/gst.h>
#include <string.h> #include <string.h>

View file

@ -16,6 +16,9 @@
* *
*/ */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <string.h> #include <string.h>
#include <gst/gst.h> #include <gst/gst.h>
#include "gstvirtualdub.h" #include "gstvirtualdub.h"

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 "gsty4mencode.h" #include "gsty4mencode.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

@ -17,6 +17,9 @@
* Boston, MA 02111-1307, USA. * Boston, MA 02111-1307, USA.
*/ */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "gstcdplayer.h" #include "gstcdplayer.h"
/* props */ /* props */

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 <errno.h> #include <errno.h>
#include <string.h> #include <string.h>
#include <fcntl.h> #include <fcntl.h>

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 <errno.h> #include <errno.h>
#include <string.h> #include <string.h>
#include <fcntl.h> #include <fcntl.h>

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 <errno.h> #include <errno.h>
#include <string.h> #include <string.h>
#include <fcntl.h> #include <fcntl.h>

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 <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <fcntl.h> #include <fcntl.h>

View file

@ -430,7 +430,7 @@ gst_v4l2src_v4l2fourcc_to_caps (guint32 fourcc,
break; break;
} }
default: default:
GST_DEBUG(GST_CAT_PLUGIN_INFO, GST_DEBUG (
"Unknown fourcc 0x%08x " GST_FOURCC_FORMAT ", trying default", "Unknown fourcc 0x%08x " GST_FOURCC_FORMAT ", trying default",
fourcc, GST_FOURCC_ARGS(fourcc)); fourcc, GST_FOURCC_ARGS(fourcc));

View file

@ -31,7 +31,7 @@
#include "v4l2_calls.h" #include "v4l2_calls.h"
#define DEBUG(format, args...) \ #define DEBUG(format, args...) \
GST_DEBUG_ELEMENT(GST_CAT_PLUGIN_INFO, \ GST_DEBUG_OBJECT (\
GST_ELEMENT(v4l2element), \ GST_ELEMENT(v4l2element), \
"V4L2-overlay: " format, ##args) "V4L2-overlay: " format, ##args)

View file

@ -31,7 +31,7 @@
#include "v4l2_calls.h" #include "v4l2_calls.h"
#define DEBUG(format, args...) \ #define DEBUG(format, args...) \
GST_DEBUG_ELEMENT(GST_CAT_PLUGIN_INFO, \ GST_DEBUG_OBJECT (\
GST_ELEMENT(v4l2element), \ GST_ELEMENT(v4l2element), \
"V4L2: " format, ##args) "V4L2: " format, ##args)

View file

@ -29,7 +29,7 @@
#include <sys/time.h> #include <sys/time.h>
#define DEBUG(format, args...) \ #define DEBUG(format, args...) \
GST_DEBUG_ELEMENT(GST_CAT_PLUGIN_INFO, \ GST_DEBUG_OBJECT (\
GST_ELEMENT(v4l2src), \ GST_ELEMENT(v4l2src), \
"V4L2SRC: " format, ##args) "V4L2SRC: " format, ##args)
@ -400,7 +400,7 @@ gst_v4l2src_grab_frame (GstV4l2Src *v4l2src,
while (v4l2src->frame_queue_state[v4l2src->queue_frame] != while (v4l2src->frame_queue_state[v4l2src->queue_frame] !=
QUEUE_STATE_READY_FOR_QUEUE && QUEUE_STATE_READY_FOR_QUEUE &&
!v4l2src->quit) { !v4l2src->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)",
v4l2src->num_queued, MIN_BUFFERS_QUEUED); v4l2src->num_queued, MIN_BUFFERS_QUEUED);
g_cond_wait(v4l2src->cond_queue_state, g_cond_wait(v4l2src->cond_queue_state,

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 <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>