Changeset 561 for trunk/src/3rdparty/phonon/gstreamer/backend.cpp
- Timestamp:
- Feb 11, 2010, 11:19:06 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
-
Property svn:mergeinfo
set to (toggle deleted branches)
/branches/vendor/nokia/qt/4.6.1 merged eligible /branches/vendor/nokia/qt/current merged eligible /branches/vendor/trolltech/qt/current 3-149
-
Property svn:mergeinfo
set to (toggle deleted branches)
-
trunk/src/3rdparty/phonon/gstreamer/backend.cpp
r2 r561 50 50 , m_isValid(false) 51 51 { 52 // In order to support reloading, we only set the app name once... 53 static bool first = true; 54 if (first) { 55 first = false; 56 g_set_application_name(qApp->applicationName().toUtf8()); 57 } 58 52 59 GError *err = 0; 53 60 bool wasInit = gst_init_check(0, 0, &err); //init gstreamer: must be called before any gst-related functions … … 56 63 57 64 qRegisterMetaType<Message>("Message"); 58 65 #ifndef QT_NO_PROPERTIES 59 66 setProperty("identifier", QLatin1String("phonon_gstreamer")); 60 67 setProperty("backendName", QLatin1String("Gstreamer")); 61 68 setProperty("backendComment", QLatin1String("Gstreamer plugin for Phonon")); 62 69 setProperty("backendVersion", QLatin1String("0.2")); 63 setProperty("backendWebsite", QLatin1String("http://qtsoftware.com/")); 70 setProperty("backendWebsite", QLatin1String("http://qt.nokia.com/")); 71 #endif //QT_NO_PROPERTIES 64 72 65 73 //check if we should enable debug output … … 85 93 Backend::~Backend() 86 94 { 87 gst_deinit();88 95 } 89 96 … … 118 125 return ao; 119 126 } 127 #ifndef QT_NO_PHONON_EFFECT 120 128 case EffectClass: 121 129 return new AudioEffect(this, args[0].toInt(), parent); 122 130 #endif //QT_NO_PHONON_EFFECT 123 131 case AudioDataOutputClass: 124 132 logMessage("createObject() : AudioDataOutput not implemented"); 125 133 break; 126 134 135 #ifndef QT_NO_PHONON_VIDEO 127 136 case VideoDataOutputClass: 128 137 logMessage("createObject() : VideoDataOutput not implemented"); … … 133 142 return new VideoWidget(this, widget); 134 143 } 135 144 #endif //QT_NO_PHONON_VIDEO 145 #ifndef QT_NO_PHONON_VOLUMEFADEREFFECT 136 146 case VolumeFaderEffectClass: 137 147 return new VolumeFaderEffect(this, parent); 148 #endif //QT_NO_PHONON_VOLUMEFADEREFFECT 138 149 139 150 case VisualizationClass: //Fall through … … 204 215 QString klass = gst_element_factory_get_klass(GST_ELEMENT_FACTORY(feature)); 205 216 206 if (klass == QLatin1String("Codec/Decoder/Audio") || 207 klass == QLatin1String("Codec/Decoder/Video")) { 217 if (klass == QLatin1String("Codec/Decoder") || 218 klass == QLatin1String("Codec/Decoder/Audio") || 219 klass == QLatin1String("Codec/Decoder/Video") || 220 klass == QLatin1String("Codec/Demuxer") || 221 klass == QLatin1String("Codec/Demuxer/Audio") || 222 klass == QLatin1String("Codec/Demuxer/Video") || 223 klass == QLatin1String("Codec/Parser") || 224 klass == QLatin1String("Codec/Parser/Audio") || 225 klass == QLatin1String("Codec/Parser/Video")) { 208 226 209 227 const GList *static_templates; … … 277 295 case Phonon::AudioOutputDeviceType: { 278 296 QList<AudioDevice> audioDevices = deviceManager()->audioOutputDevices(); 279 if (index >= 0 && index < audioDevices.size()) { 280 ret.insert("name", audioDevices[index].gstId); 281 ret.insert("description", audioDevices[index].description); 282 ret.insert("icon", QLatin1String("audio-card")); 297 foreach(const AudioDevice &device, audioDevices) { 298 if (device.id == index) { 299 ret.insert("name", device.gstId); 300 ret.insert("description", device.description); 301 ret.insert("icon", QLatin1String("audio-card")); 302 break; 303 } 283 304 } 284 305 }
Note:
See TracChangeset
for help on using the changeset viewer.