[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [phonon-gstreamer/1.0-porting-for-merge] gstreamer: Remove Pipeline::queryDuration
From:       Dan_Vrátil <dvratil () redhat ! com>
Date:       2014-08-12 14:39:06
Message-ID: E1XHDEA-00073J-Ct () scm ! kde ! org
[Download RAW message or body]

Git commit c8fdb867910276638811e5ce9018444e498b6be3 by Dan Vrátil.
Committed on 12/08/2014 at 08:48.
Pushed by dvratil into branch '1.0-porting-for-merge'.

Remove Pipeline::queryDuration

This made sense when we supported gst-0.10, but now we can directly call
gst_element_query_duration from Pipeline::totalDuration().

M  +1    -9    gstreamer/pipeline.cpp
M  +0    -1    gstreamer/pipeline.h

http://commits.kde.org/phonon-gstreamer/c8fdb867910276638811e5ce9018444e498b6be3

diff --git a/gstreamer/pipeline.cpp b/gstreamer/pipeline.cpp
index 8d9c2fd..f704ff3 100644
--- a/gstreamer/pipeline.cpp
+++ b/gstreamer/pipeline.cpp
@@ -254,13 +254,6 @@ void Pipeline::writeToDot(MediaObject *media, const QString \
                &type)
     GST_DEBUG_BIN_TO_DOT_FILE_WITH_TS(bin, GST_DEBUG_GRAPH_SHOW_ALL, \
QString("phonon-%0").arg(type).toUtf8().constData());  }
 
-bool Pipeline::queryDuration(GstFormat *format, gint64 *duration) const
-{
-#warning Remove this method, use gst directly
-
-    return gst_element_query_duration(GST_ELEMENT(m_pipeline), *format, duration);
-}
-
 GstState Pipeline::state() const
 {
     GstState state;
@@ -307,9 +300,8 @@ gboolean Pipeline::cb_duration(GstBus *bus, GstMessage \
*gstMessage, gpointer dat  
 qint64 Pipeline::totalDuration() const
 {
-    GstFormat format = GST_FORMAT_TIME;
     gint64 duration = 0;
-    if (queryDuration(&format, &duration)) {
+    if (gst_element_query_duration(GST_ELEMENT(m_pipeline), GST_FORMAT_TIME, \
&duration)) {  return duration/GST_MSECOND;
     }
     return -1;
diff --git a/gstreamer/pipeline.h b/gstreamer/pipeline.h
index 622c273..041852c 100644
--- a/gstreamer/pipeline.h
+++ b/gstreamer/pipeline.h
@@ -51,7 +51,6 @@ class Pipeline : public QObject
         GstState state() const;
         Phonon::MediaSource currentSource() const;
         void writeToDot(MediaObject *media, const QString &type);
-        bool queryDuration(GstFormat *format, gint64 *duration) const;
         qint64 totalDuration() const;
 
         static gboolean cb_eos(GstBus *bus, GstMessage *msg, gpointer data);


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic