Revision 002b786...

Go back to digest for 9th December 2012

Bug Fixes in Multimedia

Harald Sitter committed changes in [phonon-gstreamer] /:

don't construct objects when gst init failed

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.

File Changes

Modified 5 files
  •   gstreamer/audiooutput.cpp
  •   gstreamer/backend.cpp
  •   gstreamer/backend.h
  •   gstreamer/devicemanager.cpp
  •   gstreamer/mediaobject.cpp
5 files changed in total