Skip to content
  • Harald Sitter's avatar
    don't construct objects when gst init failed · 002b786f
    Harald Sitter authored
    what happend is that we continued constructing backend objects even when
    gst init failed (supposedly that is only the case since the pipeline
    refactor) which in turn lead to crashing as it would have required just
    about every function to do validity checking before doing anything at all.
    the good news is that libphonon already does that as part of its own
    validity system. whenver the backend returns 0 on an object construction
    request libphonon's corresponding frontend object will simply ignore all
    calls thus allowing a scenario in which the backend cannot construct
    any valid backend objects (such as when gst init fails).
    
    consequently also remove pointless checks for the validity in the
    AO, MO and devicemanager ctors. also the managers are now only constructed
    if gst_init was successful.
    
    ultimate result of this is that when gst_init failed or our plugin
    requirements are not met (i.e. gst-base is not present) no object will
    get constructed other than the Backend object itself.
    
    BUG: 310394
    002b786f