Ignore:
Timestamp:
Feb 11, 2010, 11:19:06 PM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.6.1 sources.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/3rdparty/phonon/gstreamer/backend.cpp

    r2 r561  
    5050        , m_isValid(false)
    5151{
     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
    5259    GError *err = 0;
    5360    bool wasInit = gst_init_check(0, 0, &err);  //init gstreamer: must be called before any gst-related functions
     
    5663
    5764    qRegisterMetaType<Message>("Message");
    58 
     65#ifndef QT_NO_PROPERTIES
    5966    setProperty("identifier",     QLatin1String("phonon_gstreamer"));
    6067    setProperty("backendName",    QLatin1String("Gstreamer"));
    6168    setProperty("backendComment", QLatin1String("Gstreamer plugin for Phonon"));
    6269    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
    6472
    6573    //check if we should enable debug output
     
    8593Backend::~Backend()
    8694{
    87     gst_deinit();
    8895}
    8996
     
    118125            return ao;
    119126        }
     127#ifndef QT_NO_PHONON_EFFECT
    120128    case EffectClass:
    121129        return new AudioEffect(this, args[0].toInt(), parent);
    122 
     130#endif //QT_NO_PHONON_EFFECT
    123131    case AudioDataOutputClass:
    124132        logMessage("createObject() : AudioDataOutput not implemented");
    125133        break;
    126134
     135#ifndef QT_NO_PHONON_VIDEO
    127136    case VideoDataOutputClass:
    128137        logMessage("createObject() : VideoDataOutput not implemented");
     
    133142            return new VideoWidget(this, widget);
    134143        }
    135 
     144#endif //QT_NO_PHONON_VIDEO
     145#ifndef QT_NO_PHONON_VOLUMEFADEREFFECT
    136146    case VolumeFaderEffectClass:
    137147        return new VolumeFaderEffect(this, parent);
     148#endif //QT_NO_PHONON_VOLUMEFADEREFFECT
    138149
    139150    case VisualizationClass:  //Fall through
     
    204215        QString klass = gst_element_factory_get_klass(GST_ELEMENT_FACTORY(feature));
    205216
    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")) {
    208226
    209227            const GList *static_templates;
     
    277295    case Phonon::AudioOutputDeviceType: {
    278296            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                }
    283304            }
    284305        }
Note: See TracChangeset for help on using the changeset viewer.