summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/phonon/gstreamer
diff options
context:
space:
mode:
authorJørgen Lind <jorgen.lind@nokia.com>2009-10-21 13:23:30 (GMT)
committerJørgen Lind <jorgen.lind@nokia.com>2009-10-29 16:00:11 (GMT)
commitd24fd9b951352fe184ff9bccb0f53e18368e8735 (patch)
tree5221801bd2938bfff03334caca60c44ae93c05c2 /src/3rdparty/phonon/gstreamer
parent488a89e2671fb93981db6c71f3557500b9f52588 (diff)
downloadQt-d24fd9b951352fe184ff9bccb0f53e18368e8735.zip
Qt-d24fd9b951352fe184ff9bccb0f53e18368e8735.tar.gz
Qt-d24fd9b951352fe184ff9bccb0f53e18368e8735.tar.bz2
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 ff56da9..441607d 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 2240396..86463c1 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 0b800af..1c32c3c 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);
}