[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: =?utf-8?q?=5Bphonon-gstreamer=5D_gstreamer=3A_Add_some_pipeline_?=
From: Trever Fischer <wm161 () wm161 ! net>
Date: 2011-05-02 13:25:05
Message-ID: 20110502132505.A0895A60A4 () git ! kde ! org
[Download RAW message or body]
Git commit 1ed94d53742b8e0766f54d90647cc5e07ac0acdd by Trever Fischer.
Committed on 02/05/2011 at 15:24.
Pushed by tdfischer into branch 'master'.
Add some pipeline debugging.
To use, just set GST_DEBUG_DUMP_DOT_DIR to something like /tmp/.
M +5 -0 gstreamer/gsthelper.cpp
M +2 -0 gstreamer/gsthelper.h
M +8 -2 gstreamer/mediaobject.cpp
http://commits.kde.org/phonon-gstreamer/1ed94d53742b8e0766f54d90647cc5e07ac0acdd
diff --git a/gstreamer/gsthelper.cpp b/gstreamer/gsthelper.cpp
index 5c83320..d48775e 100644
--- a/gstreamer/gsthelper.cpp
+++ b/gstreamer/gsthelper.cpp
@@ -125,6 +125,11 @@ QString GstHelper::stateName(GstState state)
return "";
}
+void GstHelper::writePipelineDot(GstBin *bin, const char *type)
+{
+ GST_DEBUG_BIN_TO_DOT_FILE_WITH_TS(bin, GST_DEBUG_GRAPH_SHOW_ALL, type);
+}
+
} //namespace Gstreamer
} //namespace Phonon
diff --git a/gstreamer/gsthelper.h b/gstreamer/gsthelper.h
index 9c528a2..641ee99 100644
--- a/gstreamer/gsthelper.h
+++ b/gstreamer/gsthelper.h
@@ -22,6 +22,7 @@
#include <QtCore/QByteArray>
#include <QtCore/QString>
#include <gst/gstelement.h>
+#include <gst/gstbin.h>
QT_BEGIN_NAMESPACE
@@ -40,6 +41,7 @@ public:
static QByteArray property(GstElement *elem, const char *propertyName);
static QByteArray name(GstObject *elem);
static QString stateName(GstState);
+ static void writePipelineDot(GstBin *elem, const char *type);
};
} // ns Gstreamer
diff --git a/gstreamer/mediaobject.cpp b/gstreamer/mediaobject.cpp
index 7954826..0695289 100644
--- a/gstreamer/mediaobject.cpp
+++ b/gstreamer/mediaobject.cpp
@@ -981,12 +981,16 @@ void MediaObject::updateSeekable()
emit seekableChanged(m_seekable);
}
- if (m_seekable)
+ if (m_seekable) {
m_backend->logMessage("Stream is seekable", Backend::Info, this);
- else
+ GstHelper::writePipelineDot(GST_BIN(m_pipeline), "pgst-updateSeekable-true");
+ } else {
m_backend->logMessage("Stream is non-seekable", Backend::Info, this);
+ GstHelper::writePipelineDot(GST_BIN(m_pipeline), "pgst-updateSeekable-false");
+ }
} else {
m_backend->logMessage("updateSeekable query failed", Backend::Info, this);
+ GstHelper::writePipelineDot(GST_BIN(m_pipeline), "pgst-updateSeekable-failed");
}
gst_query_unref (query);
}
@@ -1144,6 +1148,8 @@ void MediaObject::setSource(const MediaSource &source)
MediaNodeEvent event(MediaNodeEvent::SourceChanged);
notify(&event);
+ GstHelper::writePipelineDot(GST_BIN(m_pipeline), "pgst-setSource-complete");
+
// We need to link this node to ensure that fake sinks are connected
// before loading, otherwise the stream will be blocked
link();
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic