From 427aa6001467076fb0b69434314dd2e2e10273ae Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Wed, 12 Oct 2005 14:12:37 +0000 Subject: [PATCH] gst/: Some more debugging info. Original commit message from CVS: * gst/base/gstbasesink.c: (gst_base_sink_handle_buffer): * gst/elements/gstfilesink.c: (gst_file_sink_event), (gst_file_sink_render): Some more debugging info. --- ChangeLog | 7 +++++++ gst/base/gstbasesink.c | 3 ++- gst/elements/gstfilesink.c | 3 +++ libs/gst/base/gstbasesink.c | 3 ++- plugins/elements/gstfilesink.c | 3 +++ 5 files changed, 17 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4496855a06..e37cbab96f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2005-10-12 Wim Taymans + + * gst/base/gstbasesink.c: (gst_base_sink_handle_buffer): + * gst/elements/gstfilesink.c: (gst_file_sink_event), + (gst_file_sink_render): + Some more debugging info. + 2005-10-12 Wim Taymans * docs/design/part-states.txt: diff --git a/gst/base/gstbasesink.c b/gst/base/gstbasesink.c index 9459bfc007..9877eb4ccf 100644 --- a/gst/base/gstbasesink.c +++ b/gst/base/gstbasesink.c @@ -1140,7 +1140,7 @@ gst_base_sink_handle_buffer (GstBaseSink * basesink, GstBuffer * buf) status = gst_base_sink_do_sync (basesink, buf); switch (status) { case GST_CLOCK_EARLY: - GST_DEBUG_OBJECT (basesink, "buffer too late!"); + GST_DEBUG_OBJECT (basesink, "buffer too late!, rendering anyway"); /* fallthrough for now */ case GST_CLOCK_OK: { @@ -1152,6 +1152,7 @@ gst_base_sink_handle_buffer (GstBaseSink * basesink, GstBuffer * buf) break; } default: + GST_DEBUG_OBJECT (basesink, "clock returned %d, not rendering", status); break; } diff --git a/gst/elements/gstfilesink.c b/gst/elements/gstfilesink.c index d81c744cf1..ac30d41c85 100644 --- a/gst/elements/gstfilesink.c +++ b/gst/elements/gstfilesink.c @@ -391,6 +391,9 @@ gst_file_sink_render (GstBaseSink * sink, GstBuffer * buffer) if (cur_pos < filesink->data_written) back_pending = filesink->data_written - cur_pos; + GST_DEBUG_OBJECT (filesink, "writing %u bytes at %" G_GUINT64_FORMAT, + size, cur_pos); + if (fwrite (GST_BUFFER_DATA (buffer), size, 1, filesink->file) != 1) goto handle_error; diff --git a/libs/gst/base/gstbasesink.c b/libs/gst/base/gstbasesink.c index 9459bfc007..9877eb4ccf 100644 --- a/libs/gst/base/gstbasesink.c +++ b/libs/gst/base/gstbasesink.c @@ -1140,7 +1140,7 @@ gst_base_sink_handle_buffer (GstBaseSink * basesink, GstBuffer * buf) status = gst_base_sink_do_sync (basesink, buf); switch (status) { case GST_CLOCK_EARLY: - GST_DEBUG_OBJECT (basesink, "buffer too late!"); + GST_DEBUG_OBJECT (basesink, "buffer too late!, rendering anyway"); /* fallthrough for now */ case GST_CLOCK_OK: { @@ -1152,6 +1152,7 @@ gst_base_sink_handle_buffer (GstBaseSink * basesink, GstBuffer * buf) break; } default: + GST_DEBUG_OBJECT (basesink, "clock returned %d, not rendering", status); break; } diff --git a/plugins/elements/gstfilesink.c b/plugins/elements/gstfilesink.c index d81c744cf1..ac30d41c85 100644 --- a/plugins/elements/gstfilesink.c +++ b/plugins/elements/gstfilesink.c @@ -391,6 +391,9 @@ gst_file_sink_render (GstBaseSink * sink, GstBuffer * buffer) if (cur_pos < filesink->data_written) back_pending = filesink->data_written - cur_pos; + GST_DEBUG_OBJECT (filesink, "writing %u bytes at %" G_GUINT64_FORMAT, + size, cur_pos); + if (fwrite (GST_BUFFER_DATA (buffer), size, 1, filesink->file) != 1) goto handle_error;