summaryrefslogtreecommitdiff
path: root/src/3rdparty/phonon/gstreamer
diff options
context:
space:
mode:
authorJørgen Lind <jorgen.lind@nokia.com>2009-10-21 15:23:30 +0200
committerJørgen Lind <jorgen.lind@nokia.com>2009-10-29 17:00:11 +0100
commitd24fd9b951352fe184ff9bccb0f53e18368e8735 (patch)
tree5221801bd2938bfff03334caca60c44ae93c05c2 /src/3rdparty/phonon/gstreamer
parent488a89e2671fb93981db6c71f3557500b9f52588 (diff)
Fix LIBRARY and SETTINGS in phonon
Reviewed-by: Jens Bache-Wiig Squash me with Fix LIBRARY and SETTINGS in phonon 7d2282
Diffstat (limited to 'src/3rdparty/phonon/gstreamer')
-rw-r--r--src/3rdparty/phonon/gstreamer/artssink.cpp3
-rw-r--r--src/3rdparty/phonon/gstreamer/devicemanager.cpp7
-rw-r--r--src/3rdparty/phonon/gstreamer/mediaobject.cpp6
3 files changed, 12 insertions, 4 deletions
diff --git a/src/3rdparty/phonon/gstreamer/artssink.cpp b/src/3rdparty/phonon/gstreamer/artssink.cpp
index ff56da9d66..441607dd3e 100644
--- a/src/3rdparty/phonon/gstreamer/artssink.cpp
+++ b/src/3rdparty/phonon/gstreamer/artssink.cpp
@@ -233,7 +233,7 @@ static void arts_sink_init (ArtsSink * src, ArtsSinkClass * g_class)
Q_UNUSED(g_class);
GST_DEBUG_OBJECT (src, "initializing artssink");
src->stream = 0;
-
+#ifndef QT_NO_LIBRARY
p_arts_init = (Ptr_arts_init)QLibrary::resolve(QLatin1String("artsc"), 0, "arts_init");
p_arts_play_stream = (Ptr_arts_play_stream)QLibrary::resolve(QLatin1String("artsc"), 0, "arts_play_stream");
p_arts_close_stream = (Ptr_arts_close_stream)QLibrary::resolve(QLatin1String("artsc"), 0, "arts_close_stream");
@@ -250,6 +250,7 @@ static void arts_sink_init (ArtsSink * src, ArtsSinkClass * g_class)
}
}
sinkCount ++;
+#endif //QT_NO_LIBRARY
}
static void arts_sink_dispose (GObject * object)
diff --git a/src/3rdparty/phonon/gstreamer/devicemanager.cpp b/src/3rdparty/phonon/gstreamer/devicemanager.cpp
index 22403966d5..86463c14fa 100644
--- a/src/3rdparty/phonon/gstreamer/devicemanager.cpp
+++ b/src/3rdparty/phonon/gstreamer/devicemanager.cpp
@@ -72,18 +72,21 @@ DeviceManager::DeviceManager(Backend *backend)
: QObject(backend)
, m_backend(backend)
{
+ m_audioSink = qgetenv("PHONON_GST_AUDIOSINK");
+ m_videoSinkWidget = qgetenv("PHONON_GST_VIDEOMODE");
+
+#ifndef QT_NO_SETTINGS
QSettings settings(QLatin1String("Trolltech"));
settings.beginGroup(QLatin1String("Qt"));
- m_audioSink = qgetenv("PHONON_GST_AUDIOSINK");
if (m_audioSink.isEmpty()) {
m_audioSink = settings.value(QLatin1String("audiosink"), "Auto").toByteArray().toLower();
}
- m_videoSinkWidget = qgetenv("PHONON_GST_VIDEOMODE");
if (m_videoSinkWidget.isEmpty()) {
m_videoSinkWidget = settings.value(QLatin1String("videomode"), "Auto").toByteArray().toLower();
}
+#endif //QT_NO_SETTINGS
if (m_backend->isValid())
updateDeviceList();
diff --git a/src/3rdparty/phonon/gstreamer/mediaobject.cpp b/src/3rdparty/phonon/gstreamer/mediaobject.cpp
index 0b800aff8a..1c32c3c5f2 100644
--- a/src/3rdparty/phonon/gstreamer/mediaobject.cpp
+++ b/src/3rdparty/phonon/gstreamer/mediaobject.cpp
@@ -226,6 +226,7 @@ void MediaObject::cb_unknown_type (GstElement *decodebin, GstPad *pad, GstCaps *
QString value = "unknown codec";
// These functions require GStreamer > 0.10.12
+#ifndef QT_NO_LIBRARY
static Ptr_gst_pb_utils_init p_gst_pb_utils_init = 0;
static Ptr_gst_pb_utils_get_codec_description p_gst_pb_utils_get_codec_description = 0;
if (!p_gst_pb_utils_init) {
@@ -239,10 +240,13 @@ void MediaObject::cb_unknown_type (GstElement *decodebin, GstPad *pad, GstCaps *
codecName = p_gst_pb_utils_get_codec_description (caps);
value = QString::fromUtf8(codecName);
g_free (codecName);
- } else {
+ } else
+#endif //QT_NO_LIBRARY
+ {
// For GStreamer versions < 0.10.12
GstStructure *str = gst_caps_get_structure (caps, 0);
value = QString::fromUtf8(gst_structure_get_name (str));
+
}
media->addMissingCodecName(value);
}