[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [phonon-gstreamer/1.0-porting-for-merge] gstreamer: Fix 'unused variable/parameter' warnings when bu
From: Dan_Vrátil <dvratil () redhat ! com>
Date: 2014-08-11 19:21:27
Message-ID: E1XGv9r-0006js-WD () scm ! kde ! org
[Download RAW message or body]
Git commit d6ca26e6387a18dc1910c69523238ff0b6fd8582 by Dan Vrátil.
Committed on 11/08/2014 at 19:13.
Pushed by dvratil into branch '1.0-porting-for-merge'.
Fix 'unused variable/parameter' warnings when building against gstreamer-1.0
M +1 -1 gstreamer/audiodataoutput.cpp
M +2 -0 gstreamer/gsthelper.cpp
M +4 -0 gstreamer/mediaobject.cpp
M +7 -2 gstreamer/pipeline.cpp
http://commits.kde.org/phonon-gstreamer/d6ca26e6387a18dc1910c69523238ff0b6fd8582
diff --git a/gstreamer/audiodataoutput.cpp b/gstreamer/audiodataoutput.cpp
index 19b6742..88586b7 100644
--- a/gstreamer/audiodataoutput.cpp
+++ b/gstreamer/audiodataoutput.cpp
@@ -182,7 +182,7 @@ void AudioDataOutput::processBuffer(GstElement*, GstBuffer* buffer, GstPad* pad,
#warning should be QBA, so we can work with append(buffer, size)
that->m_pendingData.append(gstBufferData[i]);
}
- Q_ASSERT(prevPendingSize + gstBufferSize == that->m_pendingData.size());
+ Q_ASSERT(int(prevPendingSize + gstBufferSize) == that->m_pendingData.size());
return;
}
diff --git a/gstreamer/gsthelper.cpp b/gstreamer/gsthelper.cpp
index b73a429..c1026bd 100644
--- a/gstreamer/gsthelper.cpp
+++ b/gstreamer/gsthelper.cpp
@@ -62,6 +62,8 @@ QList<QByteArray> GstHelper::extractProperties(GstElement *elem, const QByteArra
g_value_array_free (array);
}
}
+#else
+ Q_UNUSED(value);
#endif
return list;
}
diff --git a/gstreamer/mediaobject.cpp b/gstreamer/mediaobject.cpp
index a06f73a..458778b 100644
--- a/gstreamer/mediaobject.cpp
+++ b/gstreamer/mediaobject.cpp
@@ -407,6 +407,8 @@ void MediaObject::loadingComplete()
void MediaObject::getAudioChannelInfo(int stream)
{
+ Q_UNUSED(stream);
+
gint channelCount = 0;
g_object_get(G_OBJECT(m_pipeline->element()), "n-audio", &channelCount, NULL);
if (channelCount)
@@ -437,6 +439,8 @@ void MediaObject::getAudioChannelInfo(int stream)
void MediaObject::getSubtitleInfo(int stream)
{
+ Q_UNUSED(stream);
+
gint spuCount = 0; // Sub picture units.
g_object_get(G_OBJECT(m_pipeline->element()), "n-text", &spuCount, NULL);
if (spuCount)
diff --git a/gstreamer/pipeline.cpp b/gstreamer/pipeline.cpp
index 8bcc5a9..7deceda 100644
--- a/gstreamer/pipeline.cpp
+++ b/gstreamer/pipeline.cpp
@@ -304,6 +304,7 @@ GstState Pipeline::state() const
gboolean Pipeline::cb_eos(GstBus *bus, GstMessage *gstMessage, gpointer data)
{
Q_UNUSED(bus)
+ Q_UNUSED(gstMessage)
Pipeline *that = static_cast<Pipeline*>(data);
emit that->eos();
return true;
@@ -328,14 +329,15 @@ gboolean Pipeline::cb_duration(GstBus *bus, GstMessage *gstMessage, gpointer dat
{
DEBUG_BLOCK;
Q_UNUSED(bus)
- gint64 duration = 0;
- GstFormat format = GST_FORMAT_TIME;
Pipeline *that = static_cast<Pipeline*>(data);
if (that->m_resetting)
return true;
#if GST_VERSION >= GST_VERSION_CHECK (1,0,0,0)
+ Q_UNUSED(gstMessage)
emit that->durationChanged(that->totalDuration());
#else
+ GstFormat format = GST_FORMAT_TIME;
+ gint64 duration = 0;
gst_message_parse_duration(gstMessage, &format, &duration);
if (format == GST_FORMAT_TIME) {
debug() << "duration" << duration/GST_MSECOND;
@@ -450,12 +452,14 @@ void Pipeline::cb_videoChanged(GstElement *playbin, gpointer data)
void Pipeline::cb_textTagsChanged(GstElement *playbin, gint stream, gpointer data)
{
+ Q_UNUSED(playbin)
Pipeline *that = static_cast<Pipeline *>(data);
emit that->textTagChanged(stream);
}
void Pipeline::cb_audioTagsChanged(GstElement *playbin, gint stream, gpointer data)
{
+ Q_UNUSED(playbin)
Pipeline *that = static_cast<Pipeline *>(data);
emit that->audioTagChanged(stream);
}
@@ -745,6 +749,7 @@ gboolean Pipeline::cb_tag(GstBus *bus, GstMessage *msg, gpointer data)
gboolean Pipeline::cb_streamStart(GstBus *bus, GstMessage *msg, gpointer data)
{
Q_UNUSED(bus)
+ Q_UNUSED(msg)
Pipeline *that = static_cast<Pipeline*>(data);
gchar *uri;
g_object_get(that->m_pipeline, "uri", &uri, NULL);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic