Changeset 561 for trunk/src/3rdparty/phonon/gstreamer/audiooutput.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/audiooutput.cpp
r2 r561 43 43 m_name = "AudioOutput" + QString::number(count++); 44 44 if (m_backend->isValid()) { 45 g_set_application_name(qApp->applicationName().toUtf8());46 45 m_audioBin = gst_bin_new (NULL); 47 46 gst_object_ref (GST_OBJECT (m_audioBin)); … … 138 137 bool success = false; 139 138 const QList<AudioDevice> deviceList = m_backend->deviceManager()->audioOutputDevices(); 140 if (m_audioSink && newDevice >= 0 && newDevice < deviceList.size()) { 139 int deviceIdx = -1; 140 for (int i=0; i<deviceList.size(); i++) { 141 if (deviceList.at(i).id == newDevice) { 142 deviceIdx = i; 143 break; 144 } 145 } 146 147 if (m_audioSink && deviceIdx >= 0) { 141 148 // Save previous state 142 149 GstState oldState = GST_STATE(m_audioSink); 143 150 const QByteArray oldDeviceValue = GstHelper::property(m_audioSink, "device"); 144 const QByteArray deviceId = deviceList.at( newDevice).gstId;151 const QByteArray deviceId = deviceList.at(deviceIdx).gstId; 145 152 m_device = newDevice; 146 153
Note:
See TracChangeset
for help on using the changeset viewer.