~ubuntu-branches/ubuntu/saucy/phonon-backend-gstreamer/saucy-proposed

« back to all changes in this revision

Viewing changes to gstreamer/backend.cpp

  • Committer: Package Import Robot
  • Author(s): Harald Sitter
  • Date: 2013-02-04 14:30:52 UTC
  • mfrom: (1.1.6)
  • Revision ID: package-import@ubuntu.com-20130204143052-yfhzb2p4vm4xal2r
Tags: 4:4.7.0really4.6.3-0ubuntu1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
82
82
    int argc = sizeof(args) / sizeof(*args);
83
83
    char **argv = const_cast<char**>(args);
84
84
    GError *err = 0;
85
 
    bool wasInit = gst_init_check(&argc, &argv, &err);  //init gstreamer: must be called before any gst-related functions
 
85
    bool wasInit = gst_init_check(&argc, &argv, &err); //init gstreamer: must be called before any gst-related functions
86
86
 
87
87
    if (err)
88
88
        g_error_free(err);
109
109
        logMessage(QString("Using %0").arg(versionString));
110
110
        g_free(versionString);
111
111
    }
112
 
    if (!m_isValid)
 
112
 
 
113
    if (!isValid()) {
113
114
        qWarning("Phonon::GStreamer::Backend: Failed to initialize GStreamer");
114
 
 
115
 
    m_deviceManager = new DeviceManager(this);
116
 
    m_effectManager = new EffectManager(this);
 
115
    } else {
 
116
        m_deviceManager = new DeviceManager(this);
 
117
        m_effectManager = new EffectManager(this);
 
118
    }
117
119
}
118
120
 
119
121
Backend::~Backend()
132
134
QObject *Backend::createObject(BackendInterface::Class c, QObject *parent, const QList<QVariant> &args)
133
135
{
134
136
    // Return nothing if dependencies are not met
 
137
    if (!isValid()) {
 
138
        warning() << "Backend class" << c << "is not going to be created because GStreamer init failed.";
 
139
        return 0;
 
140
    }
135
141
 
136
142
    switch (c) {
137
143
    case MediaObjectClass: