summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorEdward Hervey <bilboed@bilboed.com>2009-03-09 13:45:22 +0100
committerEdward Hervey <bilboed@bilboed.com>2009-03-09 13:45:22 +0100
commit3f34bf8ef466ee44527309c995e58ff6134c480f (patch)
tree594d1e46da3e942f7f53a2f275dbfabf54fa91c0 /ext
parentb75a3f325a688d71ae71ab5492a6627b7f62a27f (diff)
demuxers: Add more debugging
Diffstat (limited to 'ext')
-rw-r--r--ext/ffmpeg/gstffmpegdemux.c3
-rw-r--r--ext/ffmpeg/gstffmpegpipe.h1
-rw-r--r--ext/ffmpeg/gstffmpegprotocol.c7
3 files changed, 11 insertions, 0 deletions
diff --git a/ext/ffmpeg/gstffmpegdemux.c b/ext/ffmpeg/gstffmpegdemux.c
index 528782f..62943e1 100644
--- a/ext/ffmpeg/gstffmpegdemux.c
+++ b/ext/ffmpeg/gstffmpegdemux.c
@@ -1581,9 +1581,12 @@ gst_ffmpegdemux_chain (GstPad * sinkpad, GstBuffer * buffer)
if (G_UNLIKELY (ffpipe->srcresult != GST_FLOW_OK))
goto ignore;
+ GST_DEBUG ("Giving a buffer of %d bytes", GST_BUFFER_SIZE (buffer));
gst_adapter_push (ffpipe->adapter, buffer);
buffer = NULL;
while (gst_adapter_available (ffpipe->adapter) >= ffpipe->needed) {
+ GST_DEBUG ("Adapter has more that requested (ffpipe->needed:%d)",
+ ffpipe->needed);
GST_FFMPEG_PIPE_SIGNAL (ffpipe);
GST_FFMPEG_PIPE_WAIT (ffpipe);
/* may have become flushing */
diff --git a/ext/ffmpeg/gstffmpegpipe.h b/ext/ffmpeg/gstffmpegpipe.h
index a0ec0bc..a2515f3 100644
--- a/ext/ffmpeg/gstffmpegpipe.h
+++ b/ext/ffmpeg/gstffmpegpipe.h
@@ -22,6 +22,7 @@
#define __GST_FFMPEGPIPE_H__
#include <gst/base/gstadapter.h>
+#include "gstffmpeg.h"
G_BEGIN_DECLS
diff --git a/ext/ffmpeg/gstffmpegprotocol.c b/ext/ffmpeg/gstffmpegprotocol.c
index bbd0420..50d35b1 100644
--- a/ext/ffmpeg/gstffmpegprotocol.c
+++ b/ext/ffmpeg/gstffmpegprotocol.c
@@ -337,8 +337,12 @@ gst_ffmpeg_pipe_read (URLContext * h, unsigned char *buf, int size)
GST_LOG ("requested size %d", size);
GST_FFMPEG_PIPE_MUTEX_LOCK (ffpipe);
+
+ GST_LOG ("requested size %d", size);
+
while ((available = gst_adapter_available (ffpipe->adapter)) < size
&& !ffpipe->eos) {
+ GST_DEBUG ("Available:%d, requested:%d", available, size);
ffpipe->needed = size;
GST_FFMPEG_PIPE_SIGNAL (ffpipe);
GST_FFMPEG_PIPE_WAIT (ffpipe);
@@ -346,9 +350,12 @@ gst_ffmpeg_pipe_read (URLContext * h, unsigned char *buf, int size)
size = MIN (available, size);
if (size) {
+ GST_LOG ("Getting %d bytes", size);
data = gst_adapter_peek (ffpipe->adapter, size);
memcpy (buf, data, size);
gst_adapter_flush (ffpipe->adapter, size);
+ GST_LOG ("%d bytes left in adapter",
+ gst_adapter_available (ffpipe->adapter));
ffpipe->needed = 0;
}
GST_FFMPEG_PIPE_MUTEX_UNLOCK (ffpipe);