[gstreamermm] Fixed build with disabled exceptions and disabled properties (bgo#582439)



commit 681986a5a93d54792d9bb768232367979b1d7c8e
Author: Johannes Schmid <jhs gnome org>
Date:   Fri May 22 18:31:55 2009 +0200

    Fixed build with disabled exceptions and disabled properties (bgo#582439)
---
 examples/element_link/element_link.cc |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/examples/element_link/element_link.cc b/examples/element_link/element_link.cc
index 87c952b..a14e751 100644
--- a/examples/element_link/element_link.cc
+++ b/examples/element_link/element_link.cc
@@ -36,25 +36,32 @@ int main(int argc, char** argv)
   element_sink = Gst::ElementFactory::create_element("fakesink");
 
   // We must add the elements to the pipeline before linking them:
+#ifdef GLIBMM_EXCEPTIONS_ENABLED
   try
   {
+#endif
     pipeline->add(element_source)->add(element_filter)->add(element_sink);
+#ifdef GLIBMM_EXCEPTIONS_ENABLED
   }
   catch (std::runtime_error& ex)
   {
     std::cerr << "Exception while adding: " << ex.what() << std::endl;
     return 1;
   }
+#endif
 
   // Link the elements together:
+#ifdef GLIBMM_EXCEPTIONS_ENABLED
   try
   {
+#endif
     element_source->link(element_filter)->link(element_sink);
+#ifdef GLIBMM_EXCEPTIONS_ENABLED
   }
   catch(const std::runtime_error& error)
   {
     std::cerr << "Exception while linking: " << error.what() << std::endl;
   }
-
+#endif
   return 0;
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]