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:09 +00:00
parent da86a99d76
commit b4786e830b
28 changed files with 303 additions and 252 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 ######################################################################
GST_DEBUGINFO
AC_ARG_ENABLE(libmmx,
AC_HELP_STRING([--enable-libmmx],[use libmmx, if available]),
[case "${enableval}" in

View file

@ -18,6 +18,9 @@
*/
#ifdef HAVE_CONFIG_H
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "config.h"
#endif
@ -365,7 +368,7 @@ gst_a52dec_push (GstPad * srcpad, int flags, sample_t * _samples, gint64 timesta
static void
gst_a52dec_reneg (GstPad * pad, int channels, int rate)
{
GST_INFO (GST_CAT_PLUGIN_INFO, "a52dec: reneg channels:%d rate:%d\n", channels, rate);
GST_INFO ( "a52dec: reneg channels:%d rate:%d\n", channels, rate);
if (gst_pad_try_set_caps (pad,
GST_CAPS_NEW ("a52dec_src_caps",
@ -503,7 +506,7 @@ gst_a52dec_loop (GstElement *element)
}
if (need_reneg == TRUE) {
GST_DEBUG (0, "a52dec reneg: sample_rate:%d stream_chans:%d using_chans:%d\n",
GST_DEBUG ("a52dec reneg: sample_rate:%d stream_chans:%d using_chans:%d\n",
a52dec->sample_rate, a52dec->stream_channels, a52dec->using_channels);
gst_a52dec_reneg (a52dec->srcpad,
gst_a52dec_channels (a52dec->using_channels), a52dec->sample_rate);

View file

@ -17,6 +17,9 @@
* Boston, MA 02111-1307, USA.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@ -847,14 +850,14 @@ dvdnavsrc_get (GstPad *pad)
GstEvent *event;
src->did_seek = FALSE;
GST_DEBUG (GST_CAT_EVENT, "dvdnavsrc sending discont");
GST_DEBUG ("dvdnavsrc sending discont");
event = gst_event_new_discontinuous (FALSE, 0);
src->need_flush = FALSE;
return GST_BUFFER (event);
}
if (src->need_flush) {
src->need_flush = FALSE;
GST_DEBUG (GST_CAT_EVENT, "dvdnavsrc sending flush");
GST_DEBUG ("dvdnavsrc sending flush");
return GST_BUFFER (gst_event_new_flush());
}
@ -896,7 +899,7 @@ dvdnavsrc_get (GstPad *pad)
}
break;
case DVDNAV_STOP:
GST_DEBUG (GST_CAT_EVENT, "dvdnavsrc sending eos");
GST_DEBUG ("dvdnavsrc sending eos");
gst_element_set_eos (GST_ELEMENT (src));
dvdnavsrc_close(src);
buf = GST_BUFFER (gst_event_new (GST_EVENT_EOS));

View file

@ -35,6 +35,9 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@ -745,7 +748,7 @@ dvdreadsrc_change_state (GstElement *element)
{
g_return_val_if_fail (GST_IS_DVDREADSRC (element), GST_STATE_FAILURE);
GST_DEBUG (0,"gstdvdreadsrc: state pending %d", GST_STATE_PENDING (element));
GST_DEBUG ("gstdvdreadsrc: state pending %d", GST_STATE_PENDING (element));
/* if going down into NULL state, close the file if it's open */
if (GST_STATE_PENDING (element) == GST_STATE_NULL) {

View file

@ -17,6 +17,9 @@
* Boston, MA 02111-1307, USA.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "gstlame.h"
/* elementfactory information */
@ -334,7 +337,7 @@ gst_lame_sinkconnect (GstPad *pad, GstCaps *caps)
lame = GST_LAME (gst_pad_get_parent (pad));
if (!GST_CAPS_IS_FIXED (caps)) {
GST_DEBUG (GST_CAT_CAPS, "caps on lame pad %s:%s not fixed, delayed",
GST_DEBUG ("caps on lame pad %s:%s not fixed, delayed",
GST_DEBUG_PAD_NAME (pad));
return GST_PAD_LINK_DELAYED;
}
@ -354,7 +357,7 @@ gst_lame_sinkconnect (GstPad *pad, GstCaps *caps)
static void
gst_lame_init (GstLame *lame)
{
GST_DEBUG_ENTER ("(\"%s\")", gst_element_get_name (GST_ELEMENT (lame)));
GST_DEBUG_OBJECT (lame, "starting initialization");
lame->sinkpad = gst_pad_new_from_template (GST_PAD_TEMPLATE_GET (gst_lame_sink_factory), "sink");
gst_element_add_pad (GST_ELEMENT (lame), lame->sinkpad);
@ -366,7 +369,7 @@ gst_lame_init (GstLame *lame)
GST_FLAG_SET (lame, GST_ELEMENT_EVENT_AWARE);
GST_DEBUG (GST_CAT_PLUGIN_INFO, "setting up lame encoder");
GST_DEBUG ("setting up lame encoder");
lame->lgf = lame_init ();
lame->samplerate = 44100;
@ -405,7 +408,7 @@ gst_lame_init (GstLame *lame)
lame->no_short_blocks = lame_get_no_short_blocks (lame->lgf);
lame->emphasis = lame_get_emphasis (lame->lgf);
GST_DEBUG (GST_CAT_PLUGIN_INFO, "done initializing lame element");
GST_DEBUG_OBJECT (lame, "done initializing");
}
@ -634,7 +637,7 @@ gst_lame_chain (GstPad *pad, GstBuffer *buf)
lame = GST_LAME (gst_pad_get_parent (pad));
GST_DEBUG (GST_CAT_PLUGIN_INFO, "entered chain");
GST_DEBUG ("entered chain");
if (GST_IS_EVENT (buf)) {
switch (GST_EVENT_TYPE (buf)) {
@ -679,7 +682,7 @@ gst_lame_chain (GstPad *pad, GstBuffer *buf)
mp3_data, mp3_buffer_size);
}
GST_DEBUG (GST_CAT_PLUGIN_INFO,
GST_DEBUG (
"encoded %d bytes of audio to %d bytes of mp3",
GST_BUFFER_SIZE (buf), mp3_size);
@ -688,7 +691,7 @@ gst_lame_chain (GstPad *pad, GstBuffer *buf)
if (GST_BUFFER_DURATION (buf) != GST_CLOCK_TIME_NONE &&
GST_BUFFER_DURATION (buf) != duration)
GST_DEBUG (GST_CAT_PLUGIN_INFO,
GST_DEBUG (
"mad: incoming buffer had incorrect duration %lld, "
"outgoing buffer will have correct duration %lld",
GST_BUFFER_DURATION (buf), duration);
@ -730,7 +733,7 @@ gst_lame_chain (GstPad *pad, GstBuffer *buf)
static gboolean
gst_lame_setup (GstLame *lame)
{
GST_DEBUG_ENTER ("(\"%s\")", gst_element_get_name (GST_ELEMENT (lame)));
GST_DEBUG_OBJECT (lame, "starting setup");
/* check if we're already initialized; if we are, we might want to check
* if this initialization is compatible with the previous one */
@ -783,12 +786,12 @@ gst_lame_setup (GstLame *lame)
else {
lame->initialized = TRUE;
/* FIXME: it would be nice to print out the mode here */
GST_INFO (GST_CAT_PLUGIN_INFO,
GST_INFO (
"lame encoder initialized (%d kbit/s, %d Hz, %d channels)",
lame->bitrate, lame->samplerate, lame->num_channels);
}
GST_DEBUG_LEAVE ("");
GST_DEBUG_OBJECT (lame, "done with setup");
return lame->initialized;
}
@ -802,7 +805,7 @@ gst_lame_change_state (GstElement *element)
lame = GST_LAME (element);
GST_DEBUG (0,"state pending %d", GST_STATE_PENDING (element));
GST_DEBUG ("state pending %d", GST_STATE_PENDING (element));
switch (GST_STATE_TRANSITION (element)) {
case GST_STATE_READY_TO_PAUSED:

View file

@ -17,6 +17,9 @@
* Boston, MA 02111-1307, USA.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <gst/gst.h>
#include <string.h>
@ -1178,14 +1181,14 @@ gst_mad_chain (GstPad *pad, GstBuffer *buffer)
mad->stream.bufend - mad->stream.this_frame);
if (tagsize > mad->tempsize) {
GST_INFO (GST_CAT_PLUGIN_INFO,
GST_INFO (
"mad: got partial id3 tag in buffer, skipping");
}
else if (tagsize > 0) {
struct id3_tag *tag;
id3_byte_t const *data;
GST_INFO (GST_CAT_PLUGIN_INFO,
GST_INFO (
"mad: got ID3 tag size %ld", tagsize);
data = mad->stream.this_frame;

View file

@ -17,6 +17,9 @@
* Boston, MA 02111-1307, USA.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <string.h>
#include <inttypes.h>
@ -218,7 +221,7 @@ gst_mpeg2dec_vo_frame_draw (vo_frame_t * frame)
GST_BUFFER_TIMESTAMP (_frame->buffer) = pts;
GST_DEBUG (0, "out: %lld %d %lld", GST_BUFFER_TIMESTAMP (_frame->buffer),
GST_DEBUG ("out: %lld %d %lld", GST_BUFFER_TIMESTAMP (_frame->buffer),
mpeg2dec->decoder->frame_rate_code,
(long long)(GST_SECOND / video_rates[mpeg2dec->decoder->frame_rate_code]));
@ -240,7 +243,7 @@ gst_mpeg2dec_vo_setup (vo_instance_t * instance, int width, int height)
g_return_val_if_fail (instance != NULL, -1);
GST_INFO (GST_CAT_PLUGIN_INFO, "VO: setup w=%d h=%d", width, height);
GST_INFO ( "VO: setup w=%d h=%d", width, height);
_instance = (gst_mpeg2dec_vo_instance_t*)instance;
mpeg2dec = _instance->mpeg2dec;
@ -269,7 +272,7 @@ gst_mpeg2dec_vo_close (vo_instance_t * instance)
{
gst_mpeg2dec_vo_instance_t * _instance;
GST_INFO (GST_CAT_PLUGIN_INFO, "VO: close");
GST_INFO ( "VO: close");
_instance = (gst_mpeg2dec_vo_instance_t*)instance;
/* FIXME */
@ -286,7 +289,7 @@ gst_mpeg2dec_vo_get_frame (vo_instance_t * instance, int flags)
g_return_val_if_fail (instance != NULL, NULL);
GST_INFO (GST_CAT_PLUGIN_INFO, "VO: get_frame");
GST_INFO ( "VO: get_frame");
_instance = (gst_mpeg2dec_vo_instance_t *)instance;
@ -349,7 +352,7 @@ gst_mpeg2dec_vo_open (GstMpeg2dec *mpeg2dec)
gst_mpeg2dec_vo_instance_t * instance;
gint i,j;
GST_INFO (GST_CAT_PLUGIN_INFO, "VO: open");
GST_INFO ( "VO: open");
instance = g_new (gst_mpeg2dec_vo_instance_t, 1);
@ -378,7 +381,7 @@ gst_mpeg2dec_vo_destroy (GstMpeg2dec *mpeg2dec)
gst_mpeg2dec_vo_instance_t * instance;
gint i;
GST_INFO (GST_CAT_PLUGIN_INFO, "VO: destroy");
GST_INFO ( "VO: destroy");
instance = (gst_mpeg2dec_vo_instance_t *) mpeg2dec->vo;
@ -439,7 +442,7 @@ gst_mpeg2dec_chain (GstPad *pad, GstBuffer *buf)
guint num_frames;
gint64 pts;
GST_DEBUG (0, "MPEG2DEC: chain called");
GST_DEBUG ("MPEG2DEC: chain called");
if (GST_IS_EVENT (buf)) {
GstEvent *event = GST_EVENT (buf);
@ -449,7 +452,7 @@ gst_mpeg2dec_chain (GstPad *pad, GstBuffer *buf)
{
//gint64 value = GST_EVENT_DISCONT_OFFSET (event, 0).value;
//mpeg2dec->decoder->is_sequence_needed = 1;
GST_DEBUG (GST_CAT_EVENT, "mpeg2dec: discont\n");
GST_DEBUG ("mpeg2dec: discont\n");
mpeg2dec->first = TRUE;
mpeg2dec->frames_per_PTS = 0;
mpeg2dec->last_PTS = -1;
@ -484,7 +487,7 @@ gst_mpeg2dec_chain (GstPad *pad, GstBuffer *buf)
* - if the PTS and our own counter are adrift bu more than 10 frames, we assume
* a discontinuity in the PTS and adjust our own counter.
*/
GST_DEBUG (GST_CAT_CLOCK, "mpeg2dec: pts %llu\n", pts);
GST_DEBUG ("mpeg2dec: pts %llu\n", pts);
if (!mpeg2dec->first) {
if (mpeg2dec->last_PTS < pts) {
@ -801,7 +804,7 @@ gst_mpeg2dec_change_state (GstElement *element)
/* try to get a bufferpool */
mpeg2dec->peerpool = gst_pad_get_bufferpool (mpeg2dec->srcpad);
if (mpeg2dec->peerpool)
GST_INFO (GST_CAT_PLUGIN_INFO, "got pool %p", mpeg2dec->peerpool);
GST_INFO ( "got pool %p", mpeg2dec->peerpool);
break;
case GST_STATE_PLAYING_TO_PAUSED:
/* need to clear things we get from other plugins, since we could be reconnected */

View file

@ -17,6 +17,9 @@
* Boston, MA 02111-1307, USA.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <string.h>
#include <inttypes.h>
@ -428,7 +431,7 @@ gst_mpeg2dec_chain (GstPad *pad, GstBuffer *buf)
switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_DISCONTINUOUS:
{
GST_DEBUG (GST_CAT_EVENT, "discont");
GST_DEBUG ("discont");
mpeg2dec->next_time = 0;
mpeg2dec->discont_state = MPEG2DEC_DISC_NEW_PICTURE;
gst_mpeg2dec_flush_decoder (mpeg2dec);
@ -455,25 +458,25 @@ gst_mpeg2dec_chain (GstPad *pad, GstBuffer *buf)
if (pts != -1) {
gint64 mpeg_pts = GSTTIME_TO_MPEGTIME (pts);
GST_DEBUG (0, "have pts: %" G_GINT64_FORMAT " (%" G_GINT64_FORMAT ")",
GST_DEBUG ("have pts: %" G_GINT64_FORMAT " (%" G_GINT64_FORMAT ")",
mpeg_pts, MPEGTIME_TO_GSTTIME (mpeg_pts));
mpeg2_pts (mpeg2dec->decoder, mpeg_pts);
}
else {
GST_DEBUG (GST_CAT_CLOCK, "no pts");
GST_DEBUG ("no pts");
}
GST_DEBUG (0, "calling _buffer");
GST_DEBUG ("calling _buffer");
mpeg2_buffer (mpeg2dec->decoder, data, end);
GST_DEBUG (0, "calling _buffer done");
GST_DEBUG ("calling _buffer done");
while (!done) {
gboolean slice = FALSE;
GST_DEBUG (0, "calling parse");
GST_DEBUG ("calling parse");
state = mpeg2_parse (mpeg2dec->decoder);
GST_DEBUG (0, "parse state %d", state);
GST_DEBUG ("parse state %d", state);
switch (state) {
case STATE_SEQUENCE:
{
@ -484,11 +487,11 @@ gst_mpeg2dec_chain (GstPad *pad, GstBuffer *buf)
mpeg2dec->total_frames = 0;
mpeg2dec->frame_period = info->sequence->frame_period * GST_USECOND / 27;
GST_DEBUG (0, "sequence flags: %d, frame period: %d",
GST_DEBUG ("sequence flags: %d, frame period: %d",
info->sequence->flags, info->sequence->frame_period);
GST_DEBUG (0, "profile: %02x, colour_primaries: %d",
GST_DEBUG ("profile: %02x, colour_primaries: %d",
info->sequence->profile_level_id, info->sequence->colour_primaries);
GST_DEBUG (0, "transfer chars: %d, matrix coef: %d",
GST_DEBUG ("transfer chars: %d, matrix coef: %d",
info->sequence->transfer_characteristics, info->sequence->matrix_coefficients);
if (!gst_mpeg2dec_negotiate_format (mpeg2dec)) {
@ -516,7 +519,7 @@ gst_mpeg2dec_chain (GstPad *pad, GstBuffer *buf)
break;
}
case STATE_SEQUENCE_REPEATED:
GST_DEBUG (0, "sequence repeated");
GST_DEBUG ("sequence repeated");
case STATE_GOP:
break;
case STATE_PICTURE:
@ -529,7 +532,7 @@ gst_mpeg2dec_chain (GstPad *pad, GstBuffer *buf)
}
outbuf = gst_mpeg2dec_alloc_buffer (mpeg2dec, info, GST_BUFFER_OFFSET (buf));
GST_DEBUG (0, "picture %d, %p, %" G_GINT64_FORMAT ", %" G_GINT64_FORMAT,
GST_DEBUG ("picture %d, %p, %" G_GINT64_FORMAT ", %" G_GINT64_FORMAT,
key_frame, outbuf, GST_BUFFER_OFFSET (outbuf), pts);
if (mpeg2dec->discont_state == MPEG2DEC_DISC_NEW_PICTURE && key_frame)
@ -543,10 +546,10 @@ gst_mpeg2dec_chain (GstPad *pad, GstBuffer *buf)
break;
}
case STATE_SLICE_1ST:
GST_DEBUG (0, "slice 1st");
GST_DEBUG ("slice 1st");
break;
case STATE_PICTURE_2ND:
GST_DEBUG (0, "picture second");
GST_DEBUG ("picture second");
break;
case STATE_SLICE:
slice = TRUE;
@ -558,7 +561,7 @@ gst_mpeg2dec_chain (GstPad *pad, GstBuffer *buf)
if (!slice) {
mpeg2dec->need_sequence = TRUE;
}
GST_DEBUG (0, "picture end %p %p %p %p", info->display_fbuf, info->display_picture, info->current_picture,
GST_DEBUG ("picture end %p %p %p %p", info->display_fbuf, info->display_picture, info->current_picture,
(info->display_fbuf ? info->display_fbuf->id : NULL));
if (info->display_fbuf && info->display_fbuf->id) {
@ -569,7 +572,7 @@ gst_mpeg2dec_chain (GstPad *pad, GstBuffer *buf)
picture = info->display_picture;
key_frame = (picture->flags & PIC_MASK_CODING_TYPE) == PIC_FLAG_CODING_TYPE_I;
GST_DEBUG (0, "picture keyfame %d", key_frame);
GST_DEBUG ("picture keyfame %d", key_frame);
if (key_frame) {
GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_KEY_UNIT);
@ -580,19 +583,19 @@ gst_mpeg2dec_chain (GstPad *pad, GstBuffer *buf)
if (picture->flags & PIC_FLAG_PTS) {
GstClockTime time = MPEGTIME_TO_GSTTIME (picture->pts);
GST_DEBUG (0, "picture had pts %" G_GINT64_FORMAT, time);
GST_DEBUG ("picture had pts %" G_GINT64_FORMAT, time);
GST_BUFFER_TIMESTAMP (outbuf) = time;
mpeg2dec->next_time = time;
}
else {
GST_DEBUG (0, "picture didn't have pts using %" G_GINT64_FORMAT, mpeg2dec->next_time);
GST_DEBUG ("picture didn't have pts using %" G_GINT64_FORMAT, mpeg2dec->next_time);
GST_BUFFER_TIMESTAMP (outbuf) = mpeg2dec->next_time;
}
mpeg2dec->next_time += (mpeg2dec->frame_period * picture->nb_fields) >> 1;
GST_DEBUG (0, "picture: %s %s fields:%d off:%" G_GINT64_FORMAT " ts:%" G_GINT64_FORMAT,
GST_DEBUG ("picture: %s %s fields:%d off:%" G_GINT64_FORMAT " ts:%" G_GINT64_FORMAT,
(picture->flags & PIC_FLAG_TOP_FIELD_FIRST ? "tff " : " "),
(picture->flags & PIC_FLAG_PROGRESSIVE_FRAME ? "prog" : " "),
picture->nb_fields,
@ -1056,7 +1059,7 @@ gst_mpeg2dec_change_state (GstElement *element)
/* try to get a bufferpool */
mpeg2dec->peerpool = gst_pad_get_bufferpool (mpeg2dec->srcpad);
if (mpeg2dec->peerpool)
GST_INFO (GST_CAT_PLUGIN_INFO, "got pool %p", mpeg2dec->peerpool);
GST_INFO ( "got pool %p", mpeg2dec->peerpool);
break;
case GST_STATE_PLAYING_TO_PAUSED:
/* need to clear things we get from other plugins, since we could be reconnected */

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

View file

@ -48,7 +48,7 @@ GstRiff *gst_riff_encoder_new(guint32 type) {
GstRiff *riff;
gst_riff_list *list;
GST_DEBUG (0,"gst_riff_encoder: making %4.4s encoder", (char *)&type);
GST_DEBUG ("gst_riff_encoder: making %4.4s encoder", (char *)&type);
riff = (GstRiff *)g_malloc(sizeof(GstRiff));
g_return_val_if_fail(riff != NULL, NULL);
@ -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);
GST_DEBUG (0,"gst_riff_encoder: add avih");
GST_DEBUG ("gst_riff_encoder: add avih");
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 ||
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);
@ -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);
GST_DEBUG (0,"gst_riff_encoder: add strf");
GST_DEBUG ("gst_riff_encoder: add strf");
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;
}
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);

View file

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

View file

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

View file

@ -21,6 +21,9 @@
#define PCM_BUFFER_SIZE (1152*4)
/*#define DEBUG_ENABLED*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <gstac3parse.h>
/* struct and table stolen from ac3dec by Aaron Holtzman */
@ -210,7 +213,7 @@ gst_ac3parse_chain (GstPad *pad, GstBuffer *buf)
/* g_return_if_fail(GST_IS_BUFFER(buf)); */
ac3parse = GST_AC3PARSE(GST_OBJECT_PARENT (pad));
GST_DEBUG (0,"ac3parse: received buffer of %d bytes", GST_BUFFER_SIZE (buf));
GST_DEBUG ("ac3parse: received buffer of %d bytes", GST_BUFFER_SIZE (buf));
/* deal with partial frame from previous buffer */
if (ac3parse->partialbuf) {
@ -230,7 +233,7 @@ gst_ac3parse_chain (GstPad *pad, GstBuffer *buf)
while (offset < size-2) {
int skipped = 0;
GST_DEBUG (0,"ac3parse: offset %ld, size %ld ",offset, size);
GST_DEBUG ("ac3parse: offset %ld, size %ld ",offset, size);
/* search for a possible start byte */
for (;((data[offset] != 0x0b) && (offset < size));offset++) skipped++ ;
@ -251,18 +254,18 @@ gst_ac3parse_chain (GstPad *pad, GstBuffer *buf)
bpf = frmsizecod_tbl[fsize].frm_size[rate] * 2;
/* if we don't have the whole frame... */
if ((size - offset) < bpf) {
GST_DEBUG (0,"ac3parse: partial buffer needed %ld < %d ",size-offset, bpf);
GST_DEBUG ("ac3parse: partial buffer needed %ld < %d ",size-offset, bpf);
break;
} else {
outbuf = gst_buffer_create_sub(ac3parse->partialbuf,offset,bpf);
offset += bpf;
if (ac3parse->skip == 0 && GST_PAD_IS_LINKED(ac3parse->srcpad)) {
GST_DEBUG (0,"ac3parse: pushing buffer of %d bytes",GST_BUFFER_SIZE(outbuf));
GST_DEBUG ("ac3parse: pushing buffer of %d bytes",GST_BUFFER_SIZE(outbuf));
gst_pad_push(ac3parse->srcpad,outbuf);
}
else {
GST_DEBUG (0,"ac3parse: skipping buffer of %d bytes",GST_BUFFER_SIZE(outbuf));
GST_DEBUG ("ac3parse: skipping buffer of %d bytes",GST_BUFFER_SIZE(outbuf));
gst_buffer_unref(outbuf);
ac3parse->skip--;
}
@ -276,7 +279,7 @@ gst_ac3parse_chain (GstPad *pad, GstBuffer *buf)
/* bytes left not in a partial block, copy them over. */
if (size-offset > 0) {
gint remainder = (size - offset);
GST_DEBUG (0,"ac3parse: partial buffer needed %d for trailing bytes",remainder);
GST_DEBUG ("ac3parse: partial buffer needed %d for trailing bytes",remainder);
outbuf = gst_buffer_create_sub(ac3parse->partialbuf,offset,remainder);
gst_buffer_unref(ac3parse->partialbuf);

View file

@ -18,6 +18,9 @@
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "gstasfdemux.h"
#include "asfheaders.h"
@ -410,7 +413,7 @@ gst_asf_demux_loop (GstElement *element)
/* this is basically an infinite loop */
while (gst_asf_demux_process_object (asf_demux, &filepos)) { }
GST_DEBUG (GST_CAT_PLUGIN_INFO, "Ending loop");
GST_DEBUG ("Ending loop");
if (!asf_demux->restart) {
/* if we exit the loop we are EOS */
gst_pad_event_default (asf_demux->sinkpad, gst_event_new (GST_EVENT_EOS));
@ -487,7 +490,7 @@ gst_asf_demux_process_file (GstASFDemux *asf_demux, guint64 *filepos, guint64 *o
asf_demux->play_time = (guint32) GUINT64_FROM_LE (object->play_time) / 10;
asf_demux->preroll = GUINT64_FROM_LE (object->preroll);
GST_INFO (GST_CAT_PLUGIN_INFO, "Object is a file with %" G_GUINT64_FORMAT " data packets", packets);
GST_INFO ( "Object is a file with %" G_GUINT64_FORMAT " data packets", packets);
return TRUE;
}
@ -505,7 +508,7 @@ gst_asf_demux_process_bitrate_props_object (GstASFDemux *asf_demux, guint64 *fil
got_bytes = gst_bytestream_read (asf_demux->bs, &buf, 2);
num_streams = GUINT16_FROM_LE (*GST_BUFFER_DATA (buf));
GST_INFO (GST_CAT_PLUGIN_INFO, "Object is a bitrate properties object with %u streams.", num_streams);
GST_INFO ( "Object is a bitrate properties object with %u streams.", num_streams);
for (i = 0; i < num_streams; i++) {
gst_asf_demux_read_object_header_rest (asf_demux, (guint8**)&bitrate_record, 6);
@ -527,7 +530,7 @@ gst_asf_demux_process_comment (GstASFDemux *asf_demux, guint64 *filepos, guint64
guint16 rating_length;
GstByteStream *bs = asf_demux->bs;
GST_INFO (GST_CAT_PLUGIN_INFO, "Object is a comment.");
GST_INFO ( "Object is a comment.");
/* Get the rest of the comment's header */
gst_asf_demux_read_object_header_rest (asf_demux, (guint8**)&object, 10);
@ -536,7 +539,7 @@ gst_asf_demux_process_comment (GstASFDemux *asf_demux, guint64 *filepos, guint64
copyright_length = GUINT16_FROM_LE (object->copyright_length);
description_length = GUINT16_FROM_LE (object->description_length);
rating_length = GUINT16_FROM_LE (object->rating_length);
GST_DEBUG (GST_CAT_PLUGIN_INFO, "Comment lengths: title=%d author=%d copyright=%d description=%d rating=%d", title_length, author_length, copyright_length, description_length, rating_length);
GST_DEBUG ("Comment lengths: title=%d author=%d copyright=%d description=%d rating=%d", title_length, author_length, copyright_length, description_length, rating_length);
/* We don't do anything with them at the moment so just skip them */
gst_bytestream_flush (bs, title_length);
@ -561,7 +564,7 @@ gst_asf_demux_process_header (GstASFDemux *asf_demux, guint64 *filepos, guint64
gst_asf_demux_read_object_header_rest (asf_demux, (guint8**)&object, 6);
num_objects = GUINT32_FROM_LE (object->num_objects);
GST_INFO (GST_CAT_PLUGIN_INFO, "Object is a header with %u parts", num_objects);
GST_INFO ( "Object is a header with %u parts", num_objects);
/* Loop through the header's objects, processing those */
for (i = 0; i < num_objects; i++) {
@ -590,11 +593,11 @@ gst_asf_demux_process_segment (GstASFDemux *asf_demux,
segment_info.stream_number = *byte & 0x7f;
key_frame = (*byte & 0x80) >> 7;
GST_INFO (GST_CAT_PLUGIN_INFO, "Processing segment for stream %u", segment_info.stream_number);
GST_INFO ( "Processing segment for stream %u", segment_info.stream_number);
segment_info.sequence = gst_asf_demux_read_var_length (asf_demux, packet_info->seqtype, &rsize);
segment_info.frag_offset = gst_asf_demux_read_var_length (asf_demux, packet_info->fragoffsettype, &rsize);
replic_size = gst_asf_demux_read_var_length (asf_demux, packet_info->replicsizetype, &rsize);
GST_DEBUG (GST_CAT_PLUGIN_INFO, "sequence = %x, frag_offset = %x, replic_size = %x", segment_info.sequence, segment_info.frag_offset, replic_size);
GST_DEBUG ("sequence = %x, frag_offset = %x, replic_size = %x", segment_info.sequence, segment_info.frag_offset, replic_size);
if (replic_size > 1) {
asf_replicated_data *replicated_data_header;
@ -622,7 +625,7 @@ gst_asf_demux_process_segment (GstASFDemux *asf_demux,
segment_info.compressed = TRUE;
gst_asf_demux_read_object_header_rest (asf_demux, (guint8**)&byte, 1); rsize++;
time_delta = *byte;
GST_DEBUG (GST_CAT_PLUGIN_INFO, "time_delta %u", time_delta);
GST_DEBUG ("time_delta %u", time_delta);
} else {
segment_info.compressed = FALSE;
}
@ -632,7 +635,7 @@ gst_asf_demux_process_segment (GstASFDemux *asf_demux,
segment_info.frag_timestamp = asf_demux->timestamp;
}
GST_DEBUG (GST_CAT_PLUGIN_INFO, "multiple = %u compressed = %u", packet_info->multiple, segment_info.compressed);
GST_DEBUG ("multiple = %u compressed = %u", packet_info->multiple, segment_info.compressed);
if (packet_info->multiple) {
frag_size = gst_asf_demux_read_var_length (asf_demux, packet_info->segsizetype, &rsize);
@ -642,7 +645,7 @@ gst_asf_demux_process_segment (GstASFDemux *asf_demux,
packet_info->size_left -= rsize;
GST_DEBUG (GST_CAT_PLUGIN_INFO, "size left = %u frag size = %u rsize = %u", packet_info->size_left, frag_size, rsize);
GST_DEBUG ("size left = %u frag size = %u rsize = %u", packet_info->size_left, frag_size, rsize);
if (segment_info.compressed) {
while (frag_size > 0) {
@ -692,10 +695,10 @@ gst_asf_demux_process_data (GstASFDemux *asf_demux, guint64 *filepos, guint64 *o
gst_asf_demux_read_object_header_rest (asf_demux, (guint8**)&object, 26);
packets = GUINT64_FROM_LE (object->packets);
GST_INFO (GST_CAT_PLUGIN_INFO, "Object is data with %" G_GUINT64_FORMAT " packets", packets);
GST_INFO ( "Object is data with %" G_GUINT64_FORMAT " packets", packets);
for (packet = 0; packet < packets; packet++) {
GST_INFO (GST_CAT_PLUGIN_INFO, "\n\nProcess packet %" G_GUINT64_FORMAT, packet);
GST_INFO ( "\n\nProcess packet %" G_GUINT64_FORMAT, packet);
gst_asf_demux_read_object_header_rest (asf_demux, (guint8**)&buf, 1); rsize=1;
if (*buf & 0x80) {
@ -703,7 +706,7 @@ gst_asf_demux_process_data (GstASFDemux *asf_demux, guint64 *filepos, guint64 *o
/* Uses error correction */
correction = TRUE;
GST_DEBUG (GST_CAT_PLUGIN_INFO, "Data has error correction (%x)", *buf);
GST_DEBUG ("Data has error correction (%x)", *buf);
gst_asf_demux_read_object_header_rest (asf_demux, (guint8**)&correction_object, 2); rsize += 2;
}
@ -721,7 +724,7 @@ gst_asf_demux_process_data (GstASFDemux *asf_demux, guint64 *filepos, guint64 *o
if (packet_length == 0)
packet_length = asf_demux->packet_size;
GST_DEBUG (GST_CAT_PLUGIN_INFO, "Multiple = %u, Sequence = %u, Padsize = %u, Packet length = %u", packet_info.multiple, sequence, packet_info.padsize, packet_length);
GST_DEBUG ("Multiple = %u, Sequence = %u, Padsize = %u, Packet length = %u", packet_info.multiple, sequence, packet_info.padsize, packet_length);
/* Read the property flags */
packet_info.replicsizetype = property & 0x03;
@ -734,7 +737,7 @@ gst_asf_demux_process_data (GstASFDemux *asf_demux, guint64 *filepos, guint64 *o
rsize += 6;
GST_DEBUG (GST_CAT_PLUGIN_INFO, "Timestamp = %x, Duration = %x", asf_demux->timestamp, *duration);
GST_DEBUG ("Timestamp = %x, Duration = %x", asf_demux->timestamp, *duration);
if (packet_info.multiple) {
/* There are multiple payloads */
@ -749,7 +752,7 @@ gst_asf_demux_process_data (GstASFDemux *asf_demux, guint64 *filepos, guint64 *o
packet_info.size_left = packet_length - packet_info.padsize - rsize;
GST_DEBUG (GST_CAT_PLUGIN_INFO, "rsize: %u size left: %u", rsize, packet_info.size_left);
GST_DEBUG ("rsize: %u size left: %u", rsize, packet_info.size_left);
for (segment = 0; segment < segments; segment++) {
if (!gst_asf_demux_process_segment (asf_demux, &packet_info))
@ -761,7 +764,7 @@ gst_asf_demux_process_data (GstASFDemux *asf_demux, guint64 *filepos, guint64 *o
gst_bytestream_flush (asf_demux->bs, packet_info.padsize);
GST_DEBUG (GST_CAT_PLUGIN_INFO, "Remaining size left: %u", packet_info.size_left);
GST_DEBUG ("Remaining size left: %u", packet_info.size_left);
if (packet_info.size_left > 0)
gst_bytestream_flush (asf_demux->bs, packet_info.size_left);
@ -799,21 +802,21 @@ gst_asf_demux_process_stream (GstASFDemux *asf_demux, guint64 *filepos, guint64
gst_asf_demux_read_object_header_rest (asf_demux, (guint8**)&audio_object, 18);
size = GUINT16_FROM_LE (audio_object->size);
GST_INFO (GST_CAT_PLUGIN_INFO, "Object is an audio stream with %u bytes of additional data.", size);
GST_INFO ( "Object is an audio stream with %u bytes of additional data.", size);
if (!gst_asf_demux_add_audio_stream (asf_demux, audio_object, id))
return FALSE;
switch (correction) {
case ASF_CORRECTION_ON:
GST_INFO (GST_CAT_PLUGIN_INFO, "Using error correction");
GST_INFO ( "Using error correction");
/* Have to read the first byte seperately to avoid endian problems */
got_bytes = gst_bytestream_read (asf_demux->bs, &buf, 1);
asf_demux->span = *GST_BUFFER_DATA (buf);
gst_asf_demux_read_object_header_rest (asf_demux, (guint8**)&correction_object, 7);
GST_DEBUG (GST_CAT_PLUGIN_INFO, "Descrambling: ps:%d cs:%d ds:%d s:%d sd:%d", GUINT16_FROM_LE(correction_object->packet_size), GUINT16_FROM_LE(correction_object->chunk_size), GUINT16_FROM_LE(correction_object->data_size), asf_demux->span, correction_object->silence_data);
GST_DEBUG ("Descrambling: ps:%d cs:%d ds:%d s:%d sd:%d", GUINT16_FROM_LE(correction_object->packet_size), GUINT16_FROM_LE(correction_object->chunk_size), GUINT16_FROM_LE(correction_object->data_size), asf_demux->span, correction_object->silence_data);
if (asf_demux->span > 1) {
if (!correction_object->chunk_size || ((correction_object->packet_size / correction_object->chunk_size) <= 1))
@ -843,7 +846,7 @@ gst_asf_demux_process_stream (GstASFDemux *asf_demux, guint64 *filepos, guint64
size = GUINT16_FROM_BE(video_object->size) - 40; /* Byte order gets
* offset by single
* byte */
GST_INFO (GST_CAT_PLUGIN_INFO, "Object is a video stream with %u bytes of additional data.", size);
GST_INFO ( "Object is a video stream with %u bytes of additional data.", size);
gst_asf_demux_read_object_header_rest (asf_demux, (guint8**)&video_format_object, 40);
if (!gst_asf_demux_add_video_stream (asf_demux, video_format_object, id))
@ -877,7 +880,7 @@ gst_asf_demux_skip_object (GstASFDemux *asf_demux, guint64 *filepos, guint64 *ob
{
GstByteStream *bs = asf_demux->bs;
GST_INFO (GST_CAT_PLUGIN_INFO, "Skipping object...");
GST_INFO ( "Skipping object...");
gst_bytestream_flush (bs, *obj_size - 24);
@ -910,7 +913,7 @@ gst_asf_demux_read_object_header (GstASFDemux *asf_demux, guint32 *obj_id, guint
gst_bytestream_flush (bs, sizeof (ASFGuid));
if (*obj_id == ASF_OBJ_UNDEFINED) {
GST_INFO (GST_CAT_PLUGIN_INFO, "Object found with unknown GUID %08x %08x %08x %08x", guid->v1, guid->v2, guid->v3, guid->v4);
GST_INFO ( "Object found with unknown GUID %08x %08x %08x %08x", guid->v1, guid->v2, guid->v3, guid->v4);
gst_element_error (GST_ELEMENT (asf_demux), "Could not identify object");
return FALSE;
}
@ -945,7 +948,7 @@ gst_asf_demux_process_object (GstASFDemux *asf_demux,
return FALSE;
}
GST_INFO (GST_CAT_PLUGIN_INFO, "Found object %u with size %" G_GUINT64_FORMAT, obj_id, obj_size);
GST_INFO ( "Found object %u with size %" G_GUINT64_FORMAT, obj_id, obj_size);
switch (obj_id) {
case ASF_OBJ_STREAM:
@ -1057,26 +1060,26 @@ gst_asf_demux_process_chunk (GstASFDemux *asf_demux,
if (!(stream = gst_asf_demux_get_stream (asf_demux, segment_info->stream_number)))
return FALSE;
GST_DEBUG (GST_CAT_PLUGIN_INFO, "Processing chunk of size %u (fo = %d)", segment_info->chunk_size, stream->frag_offset);
GST_DEBUG ("Processing chunk of size %u (fo = %d)", segment_info->chunk_size, stream->frag_offset);
if (stream->frag_offset == 0) {
/* new packet */
stream->sequence = segment_info->sequence;
asf_demux->pts = segment_info->frag_timestamp - asf_demux->preroll;
got_bytes = gst_bytestream_peek (bs, &buffer, segment_info->chunk_size);
GST_DEBUG (GST_CAT_PLUGIN_INFO, "BUFFER: Copied stream to buffer (%p - %d)", buffer, GST_BUFFER_REFCOUNT_VALUE(buffer));
GST_DEBUG ("BUFFER: Copied stream to buffer (%p - %d)", buffer, GST_BUFFER_REFCOUNT_VALUE(buffer));
stream->payload = buffer;
} else {
GST_DEBUG (GST_CAT_PLUGIN_INFO, "segment_info->sequence = %d, stream->sequence = %d, segment_info->frag_offset = %d, stream->frag_offset = %d", segment_info->sequence, stream->sequence, segment_info->frag_offset, stream->frag_offset);
GST_DEBUG ("segment_info->sequence = %d, stream->sequence = %d, segment_info->frag_offset = %d, stream->frag_offset = %d", segment_info->sequence, stream->sequence, segment_info->frag_offset, stream->frag_offset);
if (segment_info->sequence == stream->sequence &&
segment_info->frag_offset == stream->frag_offset) {
GstBuffer *new_buffer;
/* continuing packet */
GST_INFO (GST_CAT_PLUGIN_INFO, "A continuation packet");
GST_INFO ( "A continuation packet");
got_bytes = gst_bytestream_peek (bs, &buffer, segment_info->chunk_size);
GST_DEBUG (GST_CAT_PLUGIN_INFO, "Copied stream to buffer (%p - %d)", buffer, GST_BUFFER_REFCOUNT_VALUE(buffer));
GST_DEBUG ("Copied stream to buffer (%p - %d)", buffer, GST_BUFFER_REFCOUNT_VALUE(buffer));
new_buffer = gst_buffer_merge (stream->payload, buffer);
GST_DEBUG (GST_CAT_PLUGIN_INFO, "BUFFER: Merged new_buffer (%p - %d) from stream->payload(%p - %d) and buffer (%p - %d)", new_buffer, GST_BUFFER_REFCOUNT_VALUE(new_buffer), stream->payload, GST_BUFFER_REFCOUNT_VALUE(stream->payload), buffer, GST_BUFFER_REFCOUNT_VALUE(buffer));
GST_DEBUG ("BUFFER: Merged new_buffer (%p - %d) from stream->payload(%p - %d) and buffer (%p - %d)", new_buffer, GST_BUFFER_REFCOUNT_VALUE(new_buffer), stream->payload, GST_BUFFER_REFCOUNT_VALUE(stream->payload), buffer, GST_BUFFER_REFCOUNT_VALUE(buffer));
gst_buffer_unref (stream->payload);
gst_buffer_unref (buffer);
stream->payload = new_buffer;
@ -1085,7 +1088,7 @@ gst_asf_demux_process_chunk (GstASFDemux *asf_demux,
stream->frag_offset = 0;
if (segment_info->frag_offset != 0) {
/* cannot create new packet */
GST_DEBUG (GST_CAT_PLUGIN_INFO, "BUFFER: Freeing stream->payload (%p)", stream->payload);
GST_DEBUG ("BUFFER: Freeing stream->payload (%p)", stream->payload);
gst_buffer_free(stream->payload);
gst_bytestream_flush (bs, segment_info->chunk_size);
packet_info->size_left -= segment_info->chunk_size;
@ -1099,7 +1102,7 @@ gst_asf_demux_process_chunk (GstASFDemux *asf_demux,
stream->frag_offset +=segment_info->chunk_size;
GST_DEBUG (GST_CAT_PLUGIN_INFO, "frag_offset = %d segment_size = %d ", stream->frag_offset, segment_info->segment_size);
GST_DEBUG ("frag_offset = %d segment_size = %d ", stream->frag_offset, segment_info->segment_size);
if (stream->frag_offset < segment_info->segment_size) {
/* We don't have the whole packet yet */
@ -1112,14 +1115,14 @@ gst_asf_demux_process_chunk (GstASFDemux *asf_demux,
}
if (GST_PAD_IS_USABLE (stream->pad)) {
GST_DEBUG (GST_CAT_PLUGIN_INFO, "New buffer is at: %p size: %u", GST_BUFFER_DATA(stream->payload), GST_BUFFER_SIZE(stream->payload));
GST_DEBUG ("New buffer is at: %p size: %u", GST_BUFFER_DATA(stream->payload), GST_BUFFER_SIZE(stream->payload));
GST_BUFFER_TIMESTAMP (stream->payload) = (GST_SECOND / 1000) * asf_demux->pts;
/*!!! Should handle flush events here? */
GST_DEBUG (GST_CAT_PLUGIN_INFO, "Sending strem %d of size %d", stream->id , segment_info->chunk_size);
GST_DEBUG ("Sending strem %d of size %d", stream->id , segment_info->chunk_size);
GST_INFO (GST_CAT_PLUGIN_INFO, "Pushing pad");
GST_INFO ( "Pushing pad");
gst_pad_push (stream->pad, stream->payload);
}
@ -1129,7 +1132,7 @@ gst_asf_demux_process_chunk (GstASFDemux *asf_demux,
gst_bytestream_flush (bs, segment_info->chunk_size);
packet_info->size_left -= segment_info->chunk_size;
GST_DEBUG (GST_CAT_PLUGIN_INFO, " ");
GST_DEBUG (" ");
return TRUE;
}
@ -1166,7 +1169,7 @@ gst_asf_demux_handle_sink_event (GstASFDemux *asf_demux)
asf_stream_context *stream = &asf_demux->stream[i];
if (GST_PAD_IS_USABLE (stream->pad)) {
GST_DEBUG (GST_CAT_EVENT, "sending discont on %d %" G_GINT64_FORMAT " + %" G_GINT64_FORMAT " = %" G_GINT64_FORMAT, i,
GST_DEBUG ("sending discont on %d %" G_GINT64_FORMAT " + %" G_GINT64_FORMAT " = %" G_GINT64_FORMAT, i,
asf_demux->last_seek, stream->delay, asf_demux->last_seek + stream->delay);
discont = gst_event_new_discontinuous (FALSE, GST_FORMAT_TIME,
asf_demux->last_seek + stream->delay , NULL);
@ -1188,7 +1191,7 @@ gst_asf_demux_handle_sink_event (GstASFDemux *asf_demux)
static gboolean
gst_asf_demux_handle_src_event (GstPad *pad, GstEvent *event)
{
GST_DEBUG (0,"asfdemux: handle_src_event");
GST_DEBUG ("asfdemux: handle_src_event");
return FALSE;
}
@ -1434,7 +1437,7 @@ gst_asf_demux_add_audio_stream (GstASFDemux *asf_demux,
if (new_caps) caps_list = gst_caps_append(caps_list, new_caps);
GST_INFO (GST_CAT_PLUGIN_INFO, "Adding audio stream %u codec %u (0x%x)", asf_demux->num_video_streams, GUINT16_FROM_LE(audio->codec_tag), GUINT16_FROM_LE(audio->codec_tag));
GST_INFO ( "Adding audio stream %u codec %u (0x%x)", asf_demux->num_video_streams, GUINT16_FROM_LE(audio->codec_tag), GUINT16_FROM_LE(audio->codec_tag));
asf_demux->num_audio_streams++;
@ -1514,7 +1517,7 @@ gst_asf_demux_add_video_stream (GstASFDemux *asf_demux,
if (new_caps) caps_list = gst_caps_append(caps_list, new_caps);
GST_INFO (GST_CAT_PLUGIN_INFO, "Adding video stream %u", asf_demux->num_video_streams);
GST_INFO ( "Adding video stream %u", asf_demux->num_video_streams);
asf_demux->num_video_streams++;
@ -1547,7 +1550,7 @@ gst_asf_demux_setup_pad (GstASFDemux *asf_demux,
gst_pad_set_element_private (src_pad, stream);
GST_INFO (GST_CAT_PLUGIN_INFO, "Adding pad for stream %u", asf_demux->num_streams);
GST_INFO ( "Adding pad for stream %u", asf_demux->num_streams);
asf_demux->num_streams++;

View file

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

View file

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

View file

@ -76,7 +76,7 @@ int sinkpad_CIO::Read(void * pBuffer, unsigned int nBytesToRead, unsigned int *
switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_EOS:
GST_DEBUG (0, "eos");
GST_DEBUG ("eos");
eos = TRUE;
gst_event_unref (event);
if (avail == 0) {
@ -84,7 +84,7 @@ int sinkpad_CIO::Read(void * pBuffer, unsigned int nBytesToRead, unsigned int *
}
break;
case GST_EVENT_DISCONTINUOUS:
GST_DEBUG (0, "discont");
GST_DEBUG ("discont");
/* we are not yet sending the discont, we'll do that in the next write operation */
need_discont = TRUE;
gst_event_unref (event);

View file

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

View file

@ -18,6 +18,9 @@
*/
/*#define GST_DEBUG_ENABLED */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <gstmpegaudioparse.h>
@ -243,7 +246,7 @@ gst_mp3parse_chain (GstPad *pad, GstBuffer *buf)
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);
@ -274,12 +277,12 @@ gst_mp3parse_chain (GstPad *pad, GstBuffer *buf)
while (offset < size-4) {
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 */
for (;((data[offset] != 0xff) && (offset < size));offset++) skipped++;
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 */
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 */
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 */
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 */
continue;
}
@ -320,7 +323,7 @@ gst_mp3parse_chain (GstPad *pad, GstBuffer *buf)
/* if we don't have the whole frame... */
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;
} else {
@ -328,7 +331,7 @@ gst_mp3parse_chain (GstPad *pad, GstBuffer *buf)
offset += bpf;
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) {
/* FIXME do some sort of flush event */
mp3parse->in_flush = FALSE;
@ -337,21 +340,21 @@ gst_mp3parse_chain (GstPad *pad, GstBuffer *buf)
gst_pad_push(mp3parse->srcpad,outbuf);
}
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);
mp3parse->skip--;
}
}
} else {
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 */
/* bytes left not in a partial block, copy them over. */
if (size-offset > 0) {
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);
gst_buffer_unref(mp3parse->partialbuf);
@ -409,28 +412,28 @@ bpf_from_header (GstMPEGAudioParse *parse, unsigned long header)
static gboolean
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 ((head & 0xffe00000) != 0xffe00000) {
GST_DEBUG (0,"invalid sync");return FALSE; }
GST_DEBUG ("invalid sync");return FALSE; }
/* if it's an invalid MPEG version */
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 (!((head >> 17) & 3)) {
GST_DEBUG (0,"invalid layer");return FALSE; }
GST_DEBUG ("invalid layer");return FALSE; }
/* if it's an invalid bitrate */
if (((head >> 12) & 0xf) == 0x0) {
GST_DEBUG (0,"invalid bitrate");return FALSE; }
GST_DEBUG ("invalid bitrate");return FALSE; }
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 (((head >> 10) & 0x3) == 0x3) {
GST_DEBUG (0,"invalid samplerate");return FALSE; }
GST_DEBUG ("invalid samplerate");return FALSE; }
if ((head & 0xffff0000) == 0xfffe0000) {
GST_DEBUG (0,"invalid sync");return FALSE; }
GST_DEBUG ("invalid sync");return FALSE; }
if (head & 0x00000002) {
GST_DEBUG (0,"invalid emphasis");return FALSE; }
GST_DEBUG ("invalid emphasis");return FALSE; }
return TRUE;
}

View file

@ -19,6 +19,9 @@
/*#define GST_DEBUG_ENABLED*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <gstmpegdemux.h>
/* elementfactory information */
@ -296,7 +299,7 @@ gst_mpeg_demux_handle_discont (GstMPEGParse *mpeg_parse)
gint64 current_time = MPEGTIME_TO_GSTTIME (mpeg_parse->current_scr);
gint i;
GST_DEBUG (GST_CAT_EVENT, "discont %" G_GUINT64_FORMAT "\n", current_time);
GST_DEBUG ("discont %" G_GUINT64_FORMAT "\n", current_time);
for (i=0;i<NUM_VIDEO_STREAMS;i++) {
if (mpeg_demux->video_stream[i] &&
@ -329,7 +332,7 @@ gst_mpeg_demux_parse_packhead (GstMPEGParse *mpeg_parse, GstBuffer *buffer)
parent_class->parse_packhead (mpeg_parse, buffer);
GST_DEBUG (0, "in parse_packhead");
GST_DEBUG ("in parse_packhead");
buf = GST_BUFFER_DATA (buffer);
/* do something usefull here */
@ -344,13 +347,13 @@ gst_mpeg_demux_parse_syshead (GstMPEGParse *mpeg_parse, GstBuffer *buffer)
guint16 header_length;
guchar *buf;
GST_DEBUG (0, "in parse_syshead");
GST_DEBUG ("in parse_syshead");
buf = GST_BUFFER_DATA (buffer);
buf += 4;
header_length = GUINT16_FROM_BE (*(guint16 *) buf);
GST_DEBUG (0, "header_length %d", header_length);
GST_DEBUG ("header_length %d", header_length);
buf += 2;
/* marker:1==1 ! rate_bound:22 | marker:1==1*/
@ -369,7 +372,7 @@ gst_mpeg_demux_parse_syshead (GstMPEGParse *mpeg_parse, GstBuffer *buffer)
gint stream_count = (header_length - 6) / 3;
gint i, j=0;
GST_DEBUG (0, "number of streams=%d ",
GST_DEBUG ("number of streams=%d ",
stream_count);
for (i = 0; i < stream_count; i++) {
@ -383,13 +386,13 @@ gst_mpeg_demux_parse_syshead (GstMPEGParse *mpeg_parse, GstBuffer *buffer)
stream_id = *buf++;
if (!(stream_id & 0x80)) {
GST_DEBUG (0, "error in system header length");
GST_DEBUG ("error in system header length");
return FALSE;
}
/* check marker bits */
if ((*buf & 0xC0) != 0xC0) {
GST_DEBUG (0, "expecting placeholder bit values '11' after stream id\n");
GST_DEBUG ("expecting placeholder bit values '11' after stream id\n");
return FALSE;
}
@ -428,12 +431,12 @@ gst_mpeg_demux_parse_syshead (GstMPEGParse *mpeg_parse, GstBuffer *buffer)
newtemp = GST_PAD_TEMPLATE_GET (video_mpeg2_factory);
}
} else {
GST_DEBUG (0, "unkown stream id %d", stream_id);
GST_DEBUG ("unkown stream id %d", stream_id);
}
GST_DEBUG (0, "stream ID 0x%02X (%s)", stream_id, name);
GST_DEBUG (0, "STD_buffer_bound_scale %d", STD_buffer_bound_scale);
GST_DEBUG (0, "STD_buffer_size_bound %d or %d bytes",
GST_DEBUG ("stream ID 0x%02X (%s)", stream_id, name);
GST_DEBUG ("STD_buffer_bound_scale %d", STD_buffer_bound_scale);
GST_DEBUG ("STD_buffer_size_bound %d or %d bytes",
STD_buffer_size_bound, buf_byte_size_bound);
/* create the pad and add it to self if it does not yet exist
@ -517,7 +520,7 @@ gst_mpeg_demux_parse_packet (GstMPEGParse *mpeg_parse, GstBuffer *buffer)
guint8 *buf, *basebuf;
gint64 timestamp;
GST_DEBUG (0, "in parse_packet");
GST_DEBUG ("in parse_packet");
basebuf = buf = GST_BUFFER_DATA (buffer);
id = *(buf+3);
@ -526,7 +529,7 @@ gst_mpeg_demux_parse_packet (GstMPEGParse *mpeg_parse, GstBuffer *buffer)
/* start parsing */
packet_length = GUINT16_FROM_BE (*((guint16 *)buf));
GST_DEBUG (0, "got packet_length %d", packet_length);
GST_DEBUG ("got packet_length %d", packet_length);
headerlen = 2;
buf += 2;
@ -538,14 +541,14 @@ gst_mpeg_demux_parse_packet (GstMPEGParse *mpeg_parse, GstBuffer *buffer)
switch (bits & 0xC0) {
case 0xC0:
if (bits == 0xff) {
GST_DEBUG (0, "have stuffing byte");
GST_DEBUG ("have stuffing byte");
} else {
GST_DEBUG (0, "expected stuffing byte");
GST_DEBUG ("expected stuffing byte");
}
headerlen++;
break;
case 0x40:
GST_DEBUG (0, "have STD");
GST_DEBUG ("have STD");
STD_buffer_bound_scale = bits & 0x20;
STD_buffer_size_bound = (bits & 0x1F) << 8;
@ -563,7 +566,7 @@ gst_mpeg_demux_parse_packet (GstMPEGParse *mpeg_parse, GstBuffer *buffer)
pts |= *buf++ << 7;
pts |= (*buf++ & 0xFE) >> 1;
GST_DEBUG (0, "PTS = %" G_GUINT64_FORMAT, pts);
GST_DEBUG ("PTS = %" G_GUINT64_FORMAT, pts);
headerlen += 5;
goto done;
case 0x30:
@ -581,14 +584,14 @@ gst_mpeg_demux_parse_packet (GstMPEGParse *mpeg_parse, GstBuffer *buffer)
dts |= *buf++ << 7;
dts |= (*buf++ & 0xFE) >> 1;
GST_DEBUG (0, "PTS = %" G_GUINT64_FORMAT ", DTS = %" G_GUINT64_FORMAT, pts, dts);
GST_DEBUG ("PTS = %" G_GUINT64_FORMAT ", DTS = %" G_GUINT64_FORMAT, pts, dts);
headerlen += 10;
goto done;
case 0x00:
GST_DEBUG (0, "have no pts/dts");
GST_DEBUG (0, "got trailer bits %x", (bits & 0x0f));
GST_DEBUG ("have no pts/dts");
GST_DEBUG ("got trailer bits %x", (bits & 0x0f));
if ((bits & 0x0f) != 0xf) {
GST_DEBUG (0, "not a valid packet time sequence");
GST_DEBUG ("not a valid packet time sequence");
return FALSE;
}
headerlen++;
@ -599,13 +602,13 @@ gst_mpeg_demux_parse_packet (GstMPEGParse *mpeg_parse, GstBuffer *buffer)
goto done;
}
} while (1);
GST_DEBUG (0, "done with header loop");
GST_DEBUG ("done with header loop");
done:
/* calculate the amount of real data in this packet */
datalen = packet_length - headerlen+2;
GST_DEBUG (0, "headerlen is %d, datalen is %d",
GST_DEBUG ("headerlen is %d, datalen is %d",
headerlen,datalen);
if (id == 0xBD) {
@ -615,7 +618,7 @@ done:
if (ps_id_code >= 0x80 && ps_id_code <= 0x87) {
/* make sure it's valid */
GST_DEBUG (0, "0x%02X: we have a private_stream_1 (AC3) packet, track %d",
GST_DEBUG ("0x%02X: we have a private_stream_1 (AC3) packet, track %d",
id, ps_id_code - 0x80);
outstream = &mpeg_demux->private_1_stream[ps_id_code - 0x80];
/* scrap first 4 bytes (so-called "mystery AC3 tag") */
@ -624,21 +627,21 @@ done:
}
} else if (id == 0xBF) {
/* private_stream_2 */
GST_DEBUG (0, "0x%02X: we have a private_stream_2 packet", id);
GST_DEBUG ("0x%02X: we have a private_stream_2 packet", id);
outstream = &mpeg_demux->private_2_stream;
} else if (id >= 0xC0 && id <= 0xDF) {
/* audio */
GST_DEBUG (0, "0x%02X: we have an audio packet", id);
GST_DEBUG ("0x%02X: we have an audio packet", id);
outstream = &mpeg_demux->audio_stream[id & 0x1F];
} else if (id >= 0xE0 && id <= 0xEF) {
/* video */
GST_DEBUG (0, "0x%02X: we have a video packet", id);
GST_DEBUG ("0x%02X: we have a video packet", id);
outstream = &mpeg_demux->video_stream[id & 0x0F];
}
/* if we don't know what it is, bail */
if (outstream == NULL) {
GST_DEBUG (0, "unknown packet id 0x%02X !!", id);
GST_DEBUG ("unknown packet id 0x%02X !!", id);
return FALSE;
}
@ -646,7 +649,7 @@ done:
/* the pad should have been created in parse_syshead */
if (outpad == NULL) {
GST_DEBUG (0, "unexpected packet id 0x%02X!!", id);
GST_DEBUG ("unexpected packet id 0x%02X!!", id);
return FALSE;
}
@ -669,7 +672,7 @@ done:
/* create the buffer and send it off to the Other Side */
if (GST_PAD_IS_LINKED (outpad) && datalen > 0) {
GST_DEBUG (0, "creating subbuffer len %d", datalen);
GST_DEBUG ("creating subbuffer len %d", datalen);
/* if this is part of the buffer, create a subbuffer */
outbuf = gst_buffer_create_sub (buffer, headerlen + 4, datalen);
@ -677,7 +680,7 @@ done:
GST_BUFFER_TIMESTAMP (outbuf) = timestamp;
GST_BUFFER_OFFSET (outbuf) = GST_BUFFER_OFFSET (buffer) + headerlen + 4;
GST_DEBUG (0, "pushing buffer of len %d id %d, ts %" G_GINT64_FORMAT,
GST_DEBUG ("pushing buffer of len %d id %d, ts %" G_GINT64_FORMAT,
datalen, id, GST_BUFFER_TIMESTAMP (outbuf));
gst_pad_push (outpad, outbuf);
@ -706,7 +709,7 @@ gst_mpeg_demux_parse_pes (GstMPEGParse *mpeg_parse, GstBuffer *buffer)
GstPadTemplate *newtemp = NULL;
guint8 *buf, *basebuf;
GST_DEBUG (0, "in parse_pes");
GST_DEBUG ("in parse_pes");
basebuf = buf = GST_BUFFER_DATA (buffer);
id = *(buf+3);
@ -715,7 +718,7 @@ gst_mpeg_demux_parse_pes (GstMPEGParse *mpeg_parse, GstBuffer *buffer)
/* start parsing */
packet_length = GUINT16_FROM_BE (*((guint16 *)buf));
GST_DEBUG (0, "got packet_length %d", packet_length);
GST_DEBUG ("got packet_length %d", packet_length);
buf += 2;
/* we don't operate on: program_stream_map, padding_stream, */
@ -732,7 +735,7 @@ gst_mpeg_demux_parse_pes (GstMPEGParse *mpeg_parse, GstBuffer *buffer)
header_data_length = *buf++;
GST_DEBUG (0, "header_data_length is %d",header_data_length);
GST_DEBUG ("header_data_length is %d",header_data_length);
/* check for PTS */
if ((flags2 & 0x80)) {
@ -743,16 +746,16 @@ gst_mpeg_demux_parse_pes (GstMPEGParse *mpeg_parse, GstBuffer *buffer)
pts |= *buf++ << 7;
pts |= (*buf++ & 0xFE) >> 1;
GST_DEBUG (0, "%x PTS = %" G_GUINT64_FORMAT,
GST_DEBUG ("%x PTS = %" G_GUINT64_FORMAT,
id, MPEGTIME_TO_GSTTIME (pts));
}
if ((flags2 & 0x40)) {
GST_DEBUG (0, "%x DTS found", id);
GST_DEBUG ("%x DTS found", id);
buf += 5;
}
if ((flags2 & 0x20)) {
GST_DEBUG (0, "%x ESCR found", id);
GST_DEBUG ("%x ESCR found", id);
buf += 6;
}
if ((flags2 & 0x10)) {
@ -761,7 +764,7 @@ gst_mpeg_demux_parse_pes (GstMPEGParse *mpeg_parse, GstBuffer *buffer)
es_rate = (*buf++ & 0x07) << 14;
es_rate |= (*buf++ ) << 7;
es_rate |= (*buf++ & 0xFE) >> 1;
GST_DEBUG (0, "%x ES Rate found", id);
GST_DEBUG ("%x ES Rate found", id);
}
/* FIXME: lots of PES parsing missing here... */
@ -772,7 +775,7 @@ gst_mpeg_demux_parse_pes (GstMPEGParse *mpeg_parse, GstBuffer *buffer)
headerlen = 5 + header_data_length;
/* constant is 2 bytes of bits, 1 byte header len */
datalen = packet_length - (3 + header_data_length);
GST_DEBUG (0, "headerlen is %d, datalen is %d",
GST_DEBUG ("headerlen is %d, datalen is %d",
headerlen, datalen);
if (id == 0xBD) {
@ -781,14 +784,14 @@ gst_mpeg_demux_parse_pes (GstMPEGParse *mpeg_parse, GstBuffer *buffer)
ps_id_code = *(basebuf + headerlen + 4);
if (ps_id_code >= 0x80 && ps_id_code <= 0x87) {
GST_DEBUG (0, "we have a private_stream_1 (AC3) packet, track %d",
GST_DEBUG ("we have a private_stream_1 (AC3) packet, track %d",
ps_id_code - 0x80);
outstream = &mpeg_demux->private_1_stream[ps_id_code - 0x80];
/* scrap first 4 bytes (so-called "mystery AC3 tag") */
headerlen += 4;
datalen -= 4;
} else if (ps_id_code >= 0xA0 && ps_id_code <= 0xA7) {
GST_DEBUG (0, "we have a pcm_stream packet, track %d",
GST_DEBUG ("we have a pcm_stream packet, track %d",
ps_id_code - 0xA0);
outstream = &mpeg_demux->pcm_stream[ps_id_code - 0xA0];
@ -808,29 +811,29 @@ gst_mpeg_demux_parse_pes (GstMPEGParse *mpeg_parse, GstBuffer *buffer)
headerlen += 7;
datalen -= 7;
} else if (ps_id_code >= 0x20 && ps_id_code <= 0x2F) {
GST_DEBUG (0, "we have a subtitle_stream packet, track %d",
GST_DEBUG ("we have a subtitle_stream packet, track %d",
ps_id_code - 0x20);
outstream = &mpeg_demux->subtitle_stream[ps_id_code - 0x20];
headerlen += 1;
datalen -= 1;
} else {
GST_DEBUG (0, "0x%02X: unkonwn id %x",
GST_DEBUG ("0x%02X: unkonwn id %x",
id, ps_id_code);
}
} else if (id == 0xBF) {
/* private_stream_2 */
GST_DEBUG (0, "we have a private_stream_2 packet");
GST_DEBUG ("we have a private_stream_2 packet");
outstream = &mpeg_demux->private_2_stream;
} else if (id >= 0xC0 && id <= 0xDF) {
/* audio */
GST_DEBUG (0, "we have an audio packet");
GST_DEBUG ("we have an audio packet");
outstream = &mpeg_demux->audio_stream[id - 0xC0];
} else if (id >= 0xE0 && id <= 0xEF) {
/* video */
GST_DEBUG (0, "we have a video packet");
GST_DEBUG ("we have a video packet");
outstream = &mpeg_demux->video_stream[id - 0xE0];
} else {
GST_DEBUG (0, "we have a unkown packet");
GST_DEBUG ("we have a unkown packet");
}
/* if we don't know what it is, bail */
@ -947,7 +950,7 @@ gst_mpeg_demux_parse_pes (GstMPEGParse *mpeg_parse, GstBuffer *buffer)
/* create the buffer and send it off to the Other Side */
if (*outpad && GST_PAD_IS_USABLE(*outpad)) {
/* if this is part of the buffer, create a subbuffer */
GST_DEBUG (0,"creating subbuffer len %d", datalen);
GST_DEBUG ("creating subbuffer len %d", datalen);
outbuf = gst_buffer_create_sub (buffer, headerlen+4, datalen);
@ -1081,7 +1084,7 @@ normal_seek (GstPad *pad, GstEvent *event, gint64 *offset)
res = gst_pad_convert (pad, GST_FORMAT_BYTES, mpeg_demux->total_size_bound,
&format, &adjust);
GST_DEBUG (0, "seek adjusted from %" G_GINT64_FORMAT " bytes to %" G_GINT64_FORMAT "\n", mpeg_demux->total_size_bound, adjust);
GST_DEBUG ("seek adjusted from %" G_GINT64_FORMAT " bytes to %" G_GINT64_FORMAT "\n", mpeg_demux->total_size_bound, adjust);
if (res)
*offset = MAX (GST_EVENT_SEEK_OFFSET (event) - adjust, 0);

View file

@ -61,7 +61,7 @@ parse_packhead (GstMPEGPacketize *packetize)
GstBuffer *outbuf;
guint32 got_bytes;
GST_DEBUG (0, "packetize: in parse_packhead");
GST_DEBUG ("packetize: in parse_packhead");
got_bytes = gst_bytestream_peek_bytes (packetize->bs, &buf, length);
if (got_bytes < length)
@ -69,11 +69,11 @@ parse_packhead (GstMPEGPacketize *packetize)
buf += 4;
GST_DEBUG (0, "code %02x", *buf);
GST_DEBUG ("code %02x", *buf);
/* start parsing the stream */
if ((*buf & 0xf0) == 0x40) {
GST_DEBUG (0, "packetize::parse_packhead setting mpeg2");
GST_DEBUG ("packetize::parse_packhead setting mpeg2");
packetize->MPEG2 = TRUE;
length += 2;
got_bytes = gst_bytestream_peek_bytes (packetize->bs, &buf, length);
@ -81,7 +81,7 @@ parse_packhead (GstMPEGPacketize *packetize)
return NULL;
}
else {
GST_DEBUG (0, "packetize::parse_packhead setting mpeg1");
GST_DEBUG ("packetize::parse_packhead setting mpeg1");
packetize->MPEG2 = FALSE;
}
@ -114,7 +114,7 @@ parse_generic (GstMPEGPacketize *packetize)
guint32 got_bytes;
gint16 length = 6;
GST_DEBUG (0, "packetize: in parse_generic");
GST_DEBUG ("packetize: in parse_generic");
got_bytes = gst_bytestream_peek_bytes (bs, (guint8**)&buf, length);
if (got_bytes < 6)
@ -123,7 +123,7 @@ parse_generic (GstMPEGPacketize *packetize)
buf += 4;
length += GUINT16_FROM_BE (*(guint16 *) buf);
GST_DEBUG (0, "packetize: header_length %d", length);
GST_DEBUG ("packetize: header_length %d", length);
got_bytes = gst_bytestream_read (packetize->bs, &outbuf, length);
if (got_bytes < length)
@ -150,12 +150,12 @@ parse_chunk (GstMPEGPacketize *packetize)
code = GUINT32_FROM_BE (*((guint32 *)(buf+offset)));
GST_DEBUG (0, "code = %08x", code);
GST_DEBUG ("code = %08x", code);
while ((code & 0xffffff00) != 0x100L) {
code = (code << 8) | buf[offset++];
GST_DEBUG (0, " code = %08x", code);
GST_DEBUG (" code = %08x", code);
if (offset == chunksize) {
chunksize = gst_bytestream_peek_bytes (bs, (guint8**)&buf, offset + 4096);
@ -191,12 +191,12 @@ find_start_code (GstMPEGPacketize *packetize)
code = GUINT32_FROM_BE (*((guint32 *)(buf)));
GST_DEBUG (0, "code = %08x %p %08x", code, buf, chunksize);
GST_DEBUG ("code = %08x %p %08x", code, buf, chunksize);
while ((code & 0xffffff00) != 0x100L) {
code = (code << 8) | buf[offset++];
GST_DEBUG (0, " code = %08x %p %08x", code, buf, chunksize);
GST_DEBUG (" code = %08x %p %08x", code, buf, chunksize);
if (offset == chunksize) {
gst_bytestream_flush_fast (bs, offset);
@ -227,7 +227,7 @@ gst_mpeg_packetize_read (GstMPEGPacketize *packetize)
if (!find_start_code (packetize))
got_event = TRUE;
else {
GST_DEBUG (0, "packetize: have chunk 0x%02X", packetize->id);
GST_DEBUG ("packetize: have chunk 0x%02X", packetize->id);
if (packetize->type == GST_MPEG_PACKETIZE_SYSTEM) {
if (packetize->resync) {
if (packetize->id != PACK_START_CODE) {
@ -283,7 +283,7 @@ gst_mpeg_packetize_read (GstMPEGPacketize *packetize)
switch (etype) {
case GST_EVENT_DISCONTINUOUS:
GST_DEBUG (GST_CAT_EVENT, "packetize: discont\n");
GST_DEBUG ("packetize: discont\n");
gst_bytestream_flush_fast (packetize->bs, remaining);
break;
}

View file

@ -19,6 +19,9 @@
/*#define GST_DEBUG_ENABLED*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "gstmpegparse.h"
#include "gstmpegclock.h"
@ -278,7 +281,7 @@ gst_mpeg_parse_send_data (GstMPEGParse *mpeg_parse, GstData *data, GstClockTime
}
GST_BUFFER_TIMESTAMP (data) = time;
GST_DEBUG (0, "current_scr %" G_GINT64_FORMAT, time);
GST_DEBUG ("current_scr %" G_GINT64_FORMAT, time);
if (GST_PAD_IS_USABLE (mpeg_parse->srcpad))
gst_pad_push (mpeg_parse->srcpad, GST_BUFFER (data));
@ -309,7 +312,7 @@ gst_mpeg_parse_parse_packhead (GstMPEGParse *mpeg_parse, GstBuffer *buffer)
guint32 scr1, scr2;
guint32 new_rate;
GST_DEBUG (0, "in parse_packhead");
GST_DEBUG ("in parse_packhead");
buf = GST_BUFFER_DATA (buffer);
buf += 4;
@ -330,7 +333,7 @@ gst_mpeg_parse_parse_packhead (GstMPEGParse *mpeg_parse, GstBuffer *buffer)
scr = (scr * 300 + scr_ext % 300) / 300;
GST_DEBUG (0, "%" G_GINT64_FORMAT " %d, %08x %08x %" G_GINT64_FORMAT " diff: %" G_GINT64_FORMAT,
GST_DEBUG ("%" G_GINT64_FORMAT " %d, %08x %08x %" G_GINT64_FORMAT " diff: %" G_GINT64_FORMAT,
scr, scr_ext, scr1, scr2, mpeg_parse->bytes_since_scr,
scr - mpeg_parse->current_scr);
@ -359,7 +362,7 @@ gst_mpeg_parse_parse_packhead (GstMPEGParse *mpeg_parse, GstBuffer *buffer)
mpeg_parse->next_scr = scr;
}
GST_DEBUG (0, "SCR is %" G_GUINT64_FORMAT " (%" G_GUINT64_FORMAT ") next: %"
GST_DEBUG ("SCR is %" G_GUINT64_FORMAT " (%" G_GUINT64_FORMAT ") next: %"
G_GINT64_FORMAT " (%" G_GINT64_FORMAT ") diff: %" G_GINT64_FORMAT " (%"
G_GINT64_FORMAT ")",
scr,
@ -371,7 +374,7 @@ gst_mpeg_parse_parse_packhead (GstMPEGParse *mpeg_parse, GstBuffer *buffer)
MPEGTIME_TO_GSTTIME (mpeg_parse->next_scr));
if (ABS ((gint64)mpeg_parse->next_scr - (gint64)(scr_adj)) > mpeg_parse->max_discont) {
GST_DEBUG (0, "discontinuity detected; expected: %"
GST_DEBUG ("discontinuity detected; expected: %"
G_GUINT64_FORMAT " got: %" G_GUINT64_FORMAT " real:%"
G_GINT64_FORMAT " adjust:%" G_GINT64_FORMAT,
mpeg_parse->next_scr, scr_adj, scr, mpeg_parse->adjust);
@ -379,7 +382,7 @@ gst_mpeg_parse_parse_packhead (GstMPEGParse *mpeg_parse, GstBuffer *buffer)
mpeg_parse->adjust = mpeg_parse->next_scr - scr;
scr = mpeg_parse->next_scr;
GST_DEBUG (0, "new adjust: %" G_GINT64_FORMAT, mpeg_parse->adjust);
GST_DEBUG ("new adjust: %" G_GINT64_FORMAT, mpeg_parse->adjust);
}
else {
scr = scr_adj;
@ -400,7 +403,7 @@ gst_mpeg_parse_parse_packhead (GstMPEGParse *mpeg_parse, GstBuffer *buffer)
mpeg_parse->mux_rate = new_rate;
gst_mpeg_parse_update_streaminfo (mpeg_parse);
GST_DEBUG (0, "stream is %1.3fMbs", (mpeg_parse->mux_rate * 400) / 1000000.0);
GST_DEBUG ("stream is %1.3fMbs", (mpeg_parse->mux_rate * 400) / 1000000.0);
}
return TRUE;
@ -425,7 +428,7 @@ gst_mpeg_parse_loop (GstElement *element)
if (GST_IS_BUFFER (data)) {
GstBuffer *buffer = GST_BUFFER (data);
GST_DEBUG (0, "have chunk 0x%02X", id);
GST_DEBUG ("have chunk 0x%02X", id);
switch (id) {
case 0xb9:
@ -466,7 +469,7 @@ gst_mpeg_parse_loop (GstElement *element)
switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_DISCONTINUOUS:
GST_DEBUG (GST_CAT_EVENT, "event: %d\n", GST_EVENT_TYPE (data));
GST_DEBUG ("event: %d\n", GST_EVENT_TYPE (data));
mpeg_parse->discont_pending = TRUE;
mpeg_parse->packetize->resync = TRUE;
@ -495,7 +498,7 @@ gst_mpeg_parse_loop (GstElement *element)
mpeg_parse->discont_pending = FALSE;
}
else {
GST_DEBUG (0, "waiting for SCR\n");
GST_DEBUG ("waiting for SCR\n");
}
gst_buffer_unref (GST_BUFFER (data));
return;
@ -528,7 +531,7 @@ gst_mpeg_parse_loop (GstElement *element)
if (mpeg_parse->clock && mpeg_parse->sync && !mpeg_parse->discont_pending) {
mpeg_parse->id = gst_clock_new_single_shot_id (mpeg_parse->clock, time);
GST_DEBUG (GST_CAT_CLOCK, "syncing mpegparse");
GST_DEBUG ("syncing mpegparse");
gst_element_clock_wait (GST_ELEMENT (mpeg_parse), mpeg_parse->id, NULL);
gst_clock_id_free (mpeg_parse->id);
mpeg_parse->id = NULL;
@ -561,7 +564,7 @@ gst_mpeg_parse_loop (GstElement *element)
mpeg_parse->next_scr = scr;
}
GST_DEBUG (0, "size: %" G_GINT64_FORMAT ", total since SCR: %" G_GINT64_FORMAT ", next SCR: %" G_GINT64_FORMAT,
GST_DEBUG ("size: %" G_GINT64_FORMAT ", total since SCR: %" G_GINT64_FORMAT ", next SCR: %" G_GINT64_FORMAT,
size, bss, mpeg_parse->next_scr);
}
}
@ -765,7 +768,7 @@ gst_mpeg_parse_handle_src_event (GstPad *pad, GstEvent *event)
if (!res)
break;
GST_DEBUG (0, "sending seek to %" G_GINT64_FORMAT, desired_offset);
GST_DEBUG ("sending seek to %" G_GINT64_FORMAT, desired_offset);
if (gst_bytestream_seek (mpeg_parse->packetize->bs, desired_offset, GST_SEEK_METHOD_SET)) {
mpeg_parse->discont_pending = TRUE;
mpeg_parse->scr_pending = TRUE;

View file

@ -19,6 +19,9 @@
/*#define GST_DEBUG_ENABLED*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "gstrfc2250enc.h"
/* elementfactory information */
@ -217,7 +220,7 @@ gst_rfc2250_enc_loop (GstElement *element)
if (GST_IS_BUFFER (data)) {
GstBuffer *buffer = GST_BUFFER (data);
GST_DEBUG (0, "rfc2250enc: have chunk 0x%02X", id);
GST_DEBUG ("rfc2250enc: have chunk 0x%02X", id);
switch (id) {
case SEQUENCE_START_CODE:

View file

@ -18,6 +18,9 @@
* Boston, MA 02111-1307, USA.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "rmdemux.h"
#include <string.h>
@ -251,7 +254,7 @@ static gboolean gst_rmdemux_handle_sink_event (GstRMDemux *rmdemux)
gst_bytestream_get_status(rmdemux->bs, &remaining, &event);
type = event ? GST_EVENT_TYPE(event) : GST_EVENT_UNKNOWN;
GST_DEBUG(0,"rmdemux: event %p %d", event, type);
GST_DEBUG ("rmdemux: event %p %d", event, type);
switch(type){
case GST_EVENT_EOS:
@ -262,7 +265,7 @@ static gboolean gst_rmdemux_handle_sink_event (GstRMDemux *rmdemux)
g_warning("flush event");
break;
case GST_EVENT_DISCONTINUOUS:
GST_DEBUG(0,"discontinuous event\n");
GST_DEBUG ("discontinuous event\n");
//gst_bytestream_flush_fast(rmdemux->bs, remaining);
break;
default:
@ -320,7 +323,7 @@ static void gst_rmdemux_loop (GstElement *element)
//cur_offset = gst_bytestream_tell(rmdemux->bs);
cur_offset = rmdemux->offset;
GST_DEBUG(0,"loop at position %d, state %d",cur_offset, rmdemux->state);
GST_DEBUG ("loop at position %d, state %d",cur_offset, rmdemux->state);
if(rmdemux->length == 0){
rmdemux->length = gst_bytestream_length(rmdemux->bs);
@ -491,14 +494,14 @@ static GstCaps *gst_rmdemux_src_getcaps(GstPad *pad, GstCaps *caps)
GstRMDemuxStream *stream;
int i;
GST_DEBUG(0,"gst_rmdemux_src_getcaps");
GST_DEBUG ("gst_rmdemux_src_getcaps");
rmdemux = GST_RMDEMUX(gst_pad_get_parent(pad));
g_return_val_if_fail(GST_IS_RMDEMUX(rmdemux), NULL);
GST_DEBUG(0, "looking for pad %p in rmdemux %p", pad, rmdemux);
GST_DEBUG(0, "n_streams is %d", rmdemux->n_streams);
GST_DEBUG ("looking for pad %p in rmdemux %p", pad, rmdemux);
GST_DEBUG ("n_streams is %d", rmdemux->n_streams);
for(i=0;i<rmdemux->n_streams;i++){
stream = rmdemux->streams[i];
if(stream->pad == pad){
@ -506,7 +509,7 @@ static GstCaps *gst_rmdemux_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;
}
@ -518,23 +521,23 @@ gst_rmdemux_src_link(GstPad *pad, GstCaps *caps)
GstRMDemuxStream *stream;
int i;
GST_DEBUG(0,"gst_rmdemux_src_link");
GST_DEBUG ("gst_rmdemux_src_link");
rmdemux = GST_RMDEMUX(gst_pad_get_parent(pad));
GST_DEBUG(0, "looking for pad %p in rmdemux %p", pad, rmdemux);
GST_DEBUG ("looking for pad %p in rmdemux %p", pad, rmdemux);
g_return_val_if_fail(GST_IS_RMDEMUX(rmdemux), GST_PAD_LINK_REFUSED);
GST_DEBUG(0, "n_streams is %d\n", rmdemux->n_streams);
GST_DEBUG ("n_streams is %d\n", rmdemux->n_streams);
for(i=0;i<rmdemux->n_streams;i++){
stream = rmdemux->streams[i];
GST_DEBUG(0, "pad[%d] is %p\n", i, stream->pad);
GST_DEBUG ("pad[%d] is %p\n", i, stream->pad);
if(stream->pad == pad){
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;
}

View file

@ -17,6 +17,9 @@
* Boston, MA 02111-1307, USA.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <config.h>
#include <gst/gst.h>
@ -234,7 +237,7 @@ gst_synaesthesia_chain (GstPad *pad, GstBuffer *bufin)
synaesthesia = GST_SYNAESTHESIA (gst_pad_get_parent (pad));
GST_DEBUG (0, "Synaesthesia: chainfunc called");
GST_DEBUG ("Synaesthesia: chainfunc called");
if (GST_IS_EVENT (bufin)) {
GstEvent *event = GST_EVENT (bufin);
@ -255,11 +258,11 @@ gst_synaesthesia_chain (GstPad *pad, GstBuffer *bufin)
samples_in = GST_BUFFER_SIZE (bufin) / sizeof (gint16);
GST_DEBUG (0, "input buffer has %d samples", samples_in);
GST_DEBUG ("input buffer has %d samples", samples_in);
/* FIXME: should really select the first 1024 samples after the timestamp. */
if (GST_BUFFER_TIMESTAMP (bufin) < synaesthesia->next_time || samples_in < 1024) {
GST_DEBUG (0, "timestamp is %" G_GUINT64_FORMAT ": want >= %" G_GUINT64_FORMAT, GST_BUFFER_TIMESTAMP (bufin), synaesthesia->next_time);
GST_DEBUG ("timestamp is %" G_GUINT64_FORMAT ": want >= %" G_GUINT64_FORMAT, GST_BUFFER_TIMESTAMP (bufin), synaesthesia->next_time);
gst_buffer_unref (bufin);
return;
}
@ -275,7 +278,7 @@ gst_synaesthesia_chain (GstPad *pad, GstBuffer *bufin)
synaesthesia_init (synaesthesia->width, synaesthesia->height);
GST_DEBUG (0, "making new pad");
GST_DEBUG ("making new pad");
caps = GST_CAPS_NEW (
"synaesthesiasrc",
@ -310,7 +313,7 @@ gst_synaesthesia_chain (GstPad *pad, GstBuffer *bufin)
gst_buffer_unref (bufin);
GST_DEBUG (0, "Synaesthesia: exiting chainfunc");
GST_DEBUG ("Synaesthesia: exiting chainfunc");
}

View file

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