gnomemm r1833 - in gstreamermm/trunk: . gstreamer/src gstreamerbase/src



Author: jaalburqu
Date: Thu Dec 11 23:12:18 2008
New Revision: 1833
URL: http://svn.gnome.org/viewvc/gnomemm?rev=1833&view=rev

Log:
2008-12-11  Josà Alburquerque  <jaalburqu svn gnome org>

	* gstreamer/src/bus.ccg:
	* gstreamer/src/clock.ccg:
	* gstreamer/src/filter.ccg:
	* gstreamer/src/index.ccg:
	* gstreamer/src/pad.ccg:
	* gstreamer/src/registry.ccg:
	* gstreamer/src/structure.ccg:
	* gstreamer/src/taglist.ccg:
	* gstreamer/src/task.ccg:
	* gstreamerbase/src/audioclock.ccg: Some corrections to callbacks.

Modified:
   gstreamermm/trunk/ChangeLog
   gstreamermm/trunk/gstreamer/src/bus.ccg
   gstreamermm/trunk/gstreamer/src/clock.ccg
   gstreamermm/trunk/gstreamer/src/filter.ccg
   gstreamermm/trunk/gstreamer/src/index.ccg
   gstreamermm/trunk/gstreamer/src/pad.ccg
   gstreamermm/trunk/gstreamer/src/registry.ccg
   gstreamermm/trunk/gstreamer/src/structure.ccg
   gstreamermm/trunk/gstreamer/src/taglist.ccg
   gstreamermm/trunk/gstreamer/src/task.ccg
   gstreamermm/trunk/gstreamerbase/src/audioclock.ccg

Modified: gstreamermm/trunk/gstreamer/src/bus.ccg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/bus.ccg	(original)
+++ gstreamermm/trunk/gstreamer/src/bus.ccg	Thu Dec 11 23:12:18 2008
@@ -38,8 +38,6 @@
   {
     Glib::exception_handlers_invoke();
   }
-
-  return 0; // arbitrary value
   #endif //GLIBMM_EXCEPTIONS_ENABLED
 }
 
@@ -63,8 +61,6 @@
   {
     Glib::exception_handlers_invoke();
   }
-
-  return GST_BUS_PASS; // pass message to async queue
   #endif //GLIBMM_EXCEPTIONS_ENABLED
 }
 

Modified: gstreamermm/trunk/gstreamer/src/clock.ccg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/clock.ccg	(original)
+++ gstreamermm/trunk/gstreamer/src/clock.ccg	Thu Dec 11 23:12:18 2008
@@ -43,11 +43,6 @@
   {
     Glib::exception_handlers_invoke();
   }
-
-  //Delete the once executing slot before returning result
-  delete the_slot;
-
-  return 0; // arbitrary value
   #endif //GLIBMM_EXCEPTIONS_ENABLED
 }
 

Modified: gstreamermm/trunk/gstreamer/src/filter.ccg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/filter.ccg	(original)
+++ gstreamermm/trunk/gstreamer/src/filter.ccg	Thu Dec 11 23:12:18 2008
@@ -41,11 +41,6 @@
   {
     Glib::exception_handlers_invoke();
   }
-
-  //Delete the once executing slot before returning result
-  delete the_slot;
-
-  return 0; // arbitrary value
   #endif //GLIBMM_EXCEPTIONS_ENABLED
 }
 

Modified: gstreamermm/trunk/gstreamer/src/index.ccg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/index.ccg	(original)
+++ gstreamermm/trunk/gstreamer/src/index.ccg	Thu Dec 11 23:12:18 2008
@@ -29,10 +29,18 @@
 {
   Index::SlotFilter * the_slot = static_cast<Index::SlotFilter*>(data);
 
-  Glib::RefPtr<Index> cpp_index = Glib::wrap(index, true);
-  IndexEntry cpp_entry = Glib::wrap(entry, true);
-  const gboolean result = (*the_slot)(cpp_index, cpp_entry);
-  return result;
+  #ifdef GLIBMM_EXCEPTIONS_ENABLED
+  try
+  {
+  #endif //GLIBMM_EXCEPTIONS_ENABLED
+    return (*the_slot)(Glib::wrap(index, true), Glib::wrap(entry, true));
+  #ifdef GLIBMM_EXCEPTIONS_ENABLED
+  }
+  catch(...)
+  {
+    Glib::exception_handlers_invoke();
+  }
+  #endif //GLIBMM_EXCEPTIONS_ENABLED
 }
 
 static void Index_Filter_gstreamermm_callback_destroy(void* data)
@@ -46,17 +54,28 @@
 {
   Index::SlotResolver * the_slot = static_cast<Index::SlotResolver*>(data);
 
-  Glib::RefPtr<Index> cpp_index = Glib::wrap(index, true);
-  Glib::RefPtr<Gst::Object> cpp_writer = Glib::wrap(writer, true);
-  Glib::ustring cpp_writer_string;
-  const gboolean result = (*the_slot)(cpp_index, cpp_writer, cpp_writer_string);
-  
-  if(writer_string)
+  #ifdef GLIBMM_EXCEPTIONS_ENABLED
+  try
+  {
+  #endif //GLIBMM_EXCEPTIONS_ENABLED
+    Glib::ustring cpp_writer_string;
+
+    const gboolean result =
+      (*the_slot)(Glib::wrap(index, true), Glib::wrap(writer, true),
+        cpp_writer_string);
+
+    if(writer_string)
+      *writer_string = g_strdup(cpp_writer_string.c_str());
+
+    return result;
+  #ifdef GLIBMM_EXCEPTIONS_ENABLED
+  }
+  catch(...)
   {
-    *writer_string = g_strdup(cpp_writer_string.c_str());
+    Glib::exception_handlers_invoke();
   }
+  #endif //GLIBMM_EXCEPTIONS_ENABLED
 
-  return result;
 }
 
 static void Index_Resolver_gstreamermm_callback_destroy(void* data)

Modified: gstreamermm/trunk/gstreamer/src/pad.ccg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/pad.ccg	(original)
+++ gstreamermm/trunk/gstreamer/src/pad.ccg	Thu Dec 11 23:12:18 2008
@@ -46,11 +46,7 @@
   {
     Glib::exception_handlers_invoke();
   }
-
   #endif //GLIBMM_EXCEPTIONS_ENABLED
-
-  //Delete once excuting slot
-  delete the_slot;
 }
 
 static bool Pad_Data_gstreamermm_callback(GstPad* pad, GstMiniObject* mini_obj, void* data)
@@ -68,8 +64,6 @@
   {
     Glib::exception_handlers_invoke();
   }
-
-  return true; // Keep data
   #endif //GLIBMM_EXCEPTIONS_ENABLED
 }
 

Modified: gstreamermm/trunk/gstreamer/src/registry.ccg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/registry.ccg	(original)
+++ gstreamermm/trunk/gstreamer/src/registry.ccg	Thu Dec 11 23:12:18 2008
@@ -44,11 +44,6 @@
   {
     Glib::exception_handlers_invoke();
   }
-
-  //Delete the once executing slot before returning result
-  delete the_slot;
-
-  return 0; // arbitrary value
   #endif //GLIBMM_EXCEPTIONS_ENABLED
 }
 
@@ -72,11 +67,6 @@
   {
     Glib::exception_handlers_invoke();
   }
-
-  //Delete the once executing slot before returning result
-  delete the_slot;
-
-  return 0; // arbitrary value
   #endif //GLIBMM_EXCEPTIONS_ENABLED
 }
 

Modified: gstreamermm/trunk/gstreamer/src/structure.ccg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/structure.ccg	(original)
+++ gstreamermm/trunk/gstreamer/src/structure.ccg	Thu Dec 11 23:12:18 2008
@@ -32,9 +32,20 @@
 
   Gst::Structure::SlotForeach* slot = static_cast<Gst::Structure::SlotForeach*>(data);
 
-  bool result = (*slot)(Glib::QueryQuark(field_id), val_base);
-  delete slot;
-  return result;
+  #ifdef GLIBMM_EXCEPTIONS_ENABLED
+  try
+  {
+  #endif //GLIBMM_EXCEPTIONS_ENABLED
+    bool result = (*slot)(Glib::QueryQuark(field_id), val_base);
+    delete slot;
+    return result;
+  #ifdef GLIBMM_EXCEPTIONS_ENABLED
+  }
+  catch(...)
+  {
+    Glib::exception_handlers_invoke();
+  }
+  #endif //GLIBMM_EXCEPTIONS_ENABLED
 }
 
 static gboolean
@@ -45,9 +56,20 @@
 
   Gst::Structure::SlotMap* slot = static_cast<Gst::Structure::SlotMap*>(data);
 
-  bool result = (*slot)(Glib::QueryQuark(field_id), val_base);
-  delete slot;
-  return result;
+  #ifdef GLIBMM_EXCEPTIONS_ENABLED
+  try
+  {
+  #endif //GLIBMM_EXCEPTIONS_ENABLED
+    bool result = (*slot)(Glib::QueryQuark(field_id), val_base);
+    delete slot;
+    return result;
+  #ifdef GLIBMM_EXCEPTIONS_ENABLED
+  }
+  catch(...)
+  {
+    Glib::exception_handlers_invoke();
+  }
+  #endif //GLIBMM_EXCEPTIONS_ENABLED
 }
 
 namespace Gst

Modified: gstreamermm/trunk/gstreamer/src/taglist.ccg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/taglist.ccg	(original)
+++ gstreamermm/trunk/gstreamer/src/taglist.ccg	Thu Dec 11 23:12:18 2008
@@ -26,7 +26,18 @@
   Gst::TagList::SlotForeach* slot = static_cast<Gst::TagList::SlotForeach*>(data);
 
   const Glib::ustring tag_str = Glib::convert_const_gchar_ptr_to_ustring(tag);
-  (*slot)(tag_str);
+  #ifdef GLIBMM_EXCEPTIONS_ENABLED
+  try
+  {
+  #endif //GLIBMM_EXCEPTIONS_ENABLED
+    (*slot)(tag_str);
+  #ifdef GLIBMM_EXCEPTIONS_ENABLED
+  }
+  catch(...)
+  {
+    Glib::exception_handlers_invoke();
+  }
+  #endif //GLIBMM_EXCEPTIONS_ENABLED
 }
 
 namespace Gst

Modified: gstreamermm/trunk/gstreamer/src/task.ccg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/task.ccg	(original)
+++ gstreamermm/trunk/gstreamer/src/task.ccg	Thu Dec 11 23:12:18 2008
@@ -37,7 +37,6 @@
   {
     Glib::exception_handlers_invoke();
   }
-
   #endif //GLIBMM_EXCEPTIONS_ENABLED
 }
 

Modified: gstreamermm/trunk/gstreamerbase/src/audioclock.ccg
==============================================================================
--- gstreamermm/trunk/gstreamerbase/src/audioclock.ccg	(original)
+++ gstreamermm/trunk/gstreamerbase/src/audioclock.ccg	Thu Dec 11 23:12:18 2008
@@ -38,9 +38,9 @@
   {
     Glib::exception_handlers_invoke();
   }
+  #endif //GLIBMM_EXCEPTIONS_ENABLED
 
   return 0; // arbitrary value
-  #endif //GLIBMM_EXCEPTIONS_ENABLED
 }
 
 namespace GstBase



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