gnomemm r1366 - in gstreamermm/trunk: . gstreamer/src



Author: jaalburqu
Date: Mon Feb 25 01:53:01 2008
New Revision: 1366
URL: http://svn.gnome.org/viewvc/gnomemm?rev=1366&view=rev

Log:
2008-02-24  Josà Alburquerque  <jaalburqu svn gnome org>

	* gstreamer/src/bus.ccg:
	* gstreamer/src/filter.ccg:
	* gstreamer/src/index.ccg:
	* gstreamer/src/index.hg:
	* gstreamer/src/pad.ccg:
	* gstreamer/src/pad.hg:
	* gstreamer/src/task.ccg: Renamed Slot types and callbacks (for
	consistency with other *mm projects)

	* gstreamer/src/parse.hg: Corrected class name in docs from GstParse
	to Parse.

Modified:
   gstreamermm/trunk/ChangeLog
   gstreamermm/trunk/gstreamer/src/bus.ccg
   gstreamermm/trunk/gstreamer/src/filter.ccg
   gstreamermm/trunk/gstreamer/src/index.ccg
   gstreamermm/trunk/gstreamer/src/index.hg
   gstreamermm/trunk/gstreamer/src/pad.ccg
   gstreamermm/trunk/gstreamer/src/pad.hg
   gstreamermm/trunk/gstreamer/src/parse.hg
   gstreamermm/trunk/gstreamer/src/task.ccg

Modified: gstreamermm/trunk/gstreamer/src/bus.ccg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/bus.ccg	(original)
+++ gstreamermm/trunk/gstreamer/src/bus.ccg	Mon Feb 25 01:53:01 2008
@@ -22,7 +22,7 @@
 #include <gst/gstbus.h>
 #include <gstreamermm/message.h>
 
-static gboolean SignalProxy_Watch_gstreamermm_callback(GstBus* bus, GstMessage* message, void* data)
+static gboolean Bus_Watch_gstreamermm_callback(GstBus* bus, GstMessage* message, void* data)
 {
   Gst::Bus::SlotWatch* the_slot = static_cast<Gst::Bus::SlotWatch*>(data);
 
@@ -42,7 +42,7 @@
   #endif //GLIBMM_EXCEPTIONS_ENABLED
 }
 
-static void SignalProxy_Watch_gstreamermm_callback_destroy(void* data)
+static void Bus_Watch_gstreamermm_callback_destroy(void* data)
 {
   delete static_cast<Gst::Bus::SlotWatch*>(data);
 }
@@ -59,12 +59,11 @@
 guint Bus::add_watch(const SlotWatch& slot, int priority)
 {
   //Create a copy of the slot. A pointer to this will be passed through the callback's data parameter.
-  //It will be deleted when SignalProxy_Watch_gstreamermm_callback_destroy() is called.
+  //It will be deleted when Bus_Watch_gstreamermm_callback_destroy() is called.
   SlotWatch* slot_copy = new SlotWatch(slot);
   return gst_bus_add_watch_full(gobj(), priority,
-    &SignalProxy_Watch_gstreamermm_callback, slot_copy,
-    &SignalProxy_Watch_gstreamermm_callback_destroy);
-
+    &Bus_Watch_gstreamermm_callback, slot_copy,
+    &Bus_Watch_gstreamermm_callback_destroy);
 }
 
 bool Bus::remove_watch(guint id)

Modified: gstreamermm/trunk/gstreamer/src/filter.ccg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/filter.ccg	(original)
+++ gstreamermm/trunk/gstreamer/src/filter.ccg	Mon Feb 25 01:53:01 2008
@@ -21,7 +21,7 @@
 
  #include <gst/gstfilter.h>
 
-static gboolean SignalProxy_Filter_gstreamermm_callback(gpointer obj, void* data)
+static gboolean Filter_Filter_gstreamermm_callback(gpointer obj, void* data)
 {
   Gst::Filter::SlotFilter* the_slot = static_cast<Gst::Filter::SlotFilter*>(data);
 
@@ -48,7 +48,7 @@
 Filter::run(const Glib::ListHandle<Glib::RefPtr<Glib::Object> >& list, const SlotFilter& slot, bool first)
 {
   SlotFilter slot_copy(slot);
-  gst_filter_run(list.data(), &SignalProxy_Filter_gstreamermm_callback, first, &slot_copy);
+  gst_filter_run(list.data(), &Filter_Filter_gstreamermm_callback, first, &slot_copy);
 }
 
 } //namespace Gst

Modified: gstreamermm/trunk/gstreamer/src/index.ccg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/index.ccg	(original)
+++ gstreamermm/trunk/gstreamer/src/index.ccg	Mon Feb 25 01:53:01 2008
@@ -24,26 +24,25 @@
 namespace Gst
 {
 
-static gboolean SignalProxy_SlotIndexFilter(GstIndex* index, GstIndexEntry* entry, gpointer data)
+static gboolean Index_Filter_gstreamermm_callback(GstIndex* index, GstIndexEntry* entry, gpointer data)
 {
-  Index::SlotIndexFilter * the_slot = static_cast<Index::SlotIndexFilter*>(data);
+  Index::SlotFilter * the_slot = static_cast<Index::SlotFilter*>(data);
   
   IndexEntry cpp_entry = Glib::wrap(entry, true);
   const gboolean result = (*the_slot)(cpp_entry);
   return result;
 }
 
-
-static void SignalProxy_SlotIndexDestroy(gpointer data)
+static void Index_Filter_gstreamermm_callback_destroy(gpointer data)
 {
-  Index::SlotIndexFilter* the_slot = static_cast<Index::SlotIndexFilter*>(data);
+  Index::SlotFilter* the_slot = static_cast<Index::SlotFilter*>(data);
   if(the_slot)
     delete the_slot;
 }
 
-static gboolean SignalProxy_SlotIndexResolver(GstIndex *index, GstObject *writer, gchar **writer_string, gpointer data)
+static gboolean Index_Resolver_gstreamermm_callback(GstIndex *index, GstObject *writer, gchar **writer_string, gpointer data)
 {
-  Index::SlotIndexResolver * the_slot = static_cast<Index::SlotIndexResolver*>(data);
+  Index::SlotResolver * the_slot = static_cast<Index::SlotResolver*>(data);
 
   Glib::RefPtr<Gst::Object> cpp_writer = Glib::wrap(writer, true);
   Glib::ustring cpp_writer_string;
@@ -57,17 +56,17 @@
   return result;
 }
 
-void Index::set_filter(const SlotIndexFilter& slot)
+void Index::set_filter(const SlotFilter& slot)
 {
-  SlotIndexFilter* slot_copy = new SlotIndexFilter(slot); //Deleted in SignalProxy_SlotIndexDestroy.
-  gst_index_set_filter_full(gobj(), &SignalProxy_SlotIndexFilter, slot_copy, &SignalProxy_SlotIndexDestroy);
+  SlotFilter* slot_copy = new SlotFilter(slot); //Deleted in Index_Filter_gstreamermm_callback_destroy
+  gst_index_set_filter_full(gobj(), &Index_Filter_gstreamermm_callback, slot_copy, &Index_Filter_gstreamermm_callback_destroy);
 }
 
-void Index::set_resolver(const SlotIndexResolver& slot)
+void Index::set_resolver(const SlotResolver& slot)
 {
   //TODO: We need a destroy callback to destroy the slot_copy.
-  SlotIndexResolver* slot_copy = new SlotIndexResolver(slot); 
-  gst_index_set_resolver(gobj(), &SignalProxy_SlotIndexResolver, slot_copy);
+  SlotResolver* slot_copy = new SlotResolver(slot); 
+  gst_index_set_resolver(gobj(), &Index_Resolver_gstreamermm_callback, slot_copy);
 }
 
 }//namespace Gst

Modified: gstreamermm/trunk/gstreamer/src/index.hg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/index.hg	(original)
+++ gstreamermm/trunk/gstreamer/src/index.hg	Mon Feb 25 01:53:01 2008
@@ -81,22 +81,18 @@
   _WRAP_METHOD(IndexEntry get_assoc_entry(int id, IndexLookupMethod method, AssocFlags flags, Format format, gint64 value) const, gst_index_get_assoc_entry)
 
   /** For example,
-   * @code
-   * bool on_index_filter(IndexEntry entry);
-   * @endcode
+   * bool on_filter(IndexEntry entry);
    */ 
-  typedef sigc::slot<bool, IndexEntry> SlotIndexFilter;
+  typedef sigc::slot<bool, IndexEntry> SlotFilter;
 
-  void set_filter(const SlotIndexFilter& slot);
+  void set_filter(const SlotFilter& slot);
 
   /** For example,
-   * @code
-   * bool on_index_resolve(const Glib::RefPtr<Gst::Object>& writer, Glib::ustring& writer_string);
-   * @endcode
+   * bool on_resolve(const Glib::RefPtr<Gst::Object>& writer, Glib::ustring& writer_string);
    */ 
-  typedef sigc::slot<bool, const Glib::RefPtr<Gst::Object>&, Glib::ustring&> SlotIndexResolver;
+  typedef sigc::slot<bool, const Glib::RefPtr<Gst::Object>&, Glib::ustring&> SlotResolver;
 
-  void set_resolver(const SlotIndexResolver& slot);
+  void set_resolver(const SlotResolver& slot);
 };
 
 }//namespace Gst

Modified: gstreamermm/trunk/gstreamer/src/pad.ccg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/pad.ccg	(original)
+++ gstreamermm/trunk/gstreamer/src/pad.ccg	Mon Feb 25 01:53:01 2008
@@ -121,17 +121,17 @@
   gst_pad_chain(gobj(), buffer->gobj());
 }
 
-static void SignalProxy_SlotPadBlockCallback_gst_callback(GstPad* pad, gboolean blocked, gpointer data) 
+static void Pad_Block_gstreamermm_callback(GstPad* pad, gboolean blocked, gpointer data)
 {
-  Pad::SlotPadBlockCallback * the_slot = static_cast<Pad::SlotPadBlockCallback*>(data);
+  Pad::SlotBlock * the_slot = static_cast<Pad::SlotBlock*>(data);
  (*the_slot)(blocked);
   delete the_slot;
 }
 
-bool Pad::set_blocked_async(bool blocked, const SlotPadBlockCallback& slot)
+bool Pad::set_blocked_async(bool blocked, const SlotBlock& slot)
 {
-  SlotPadBlockCallback* slot_copy = new SlotPadBlockCallback(slot);
-  return bool(gst_pad_set_blocked_async(GST_PAD(gobj()), gboolean(blocked), &SignalProxy_SlotPadBlockCallback_gst_callback, slot_copy));
+  SlotBlock* slot_copy = new SlotBlock(slot);
+  return bool(gst_pad_set_blocked_async(GST_PAD(gobj()), gboolean(blocked), &Pad_Block_gstreamermm_callback, slot_copy));
 }
 
 } //namespace Gst

Modified: gstreamermm/trunk/gstreamer/src/pad.hg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/pad.hg	(original)
+++ gstreamermm/trunk/gstreamer/src/pad.hg	Mon Feb 25 01:53:01 2008
@@ -159,9 +159,12 @@
 	  gst_pad_set_fixatecaps_function,gst_pad_set_chain_function,
 	  gst_pad_set_internal_link_function, gst_pad_get_pad_template_caps)
 
-  typedef sigc::slot<void, bool> SlotPadBlockCallback;
+  /** For example,
+   * void on_block(bool blocked);
+   */
+  typedef sigc::slot<void, bool> SlotBlock;
 
-  bool set_blocked_async(bool blocked, const SlotPadBlockCallback& slot);
+  bool set_blocked_async(bool blocked, const SlotBlock& slot);
 
 #m4 _CONVERSION(`GstMiniObject*',`const Glib::RefPtr<MiniObject>&',`wrap($3, false)')
 

Modified: gstreamermm/trunk/gstreamer/src/parse.hg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/parse.hg	(original)
+++ gstreamermm/trunk/gstreamer/src/parse.hg	Mon Feb 25 01:53:01 2008
@@ -26,7 +26,7 @@
 
 class Element;
 
-/** GstParse â Get a pipeline from a text pipeline description.
+/** Parse â Get a pipeline from a text pipeline description.
  * The methods in this class allow to create a pipeline based on the syntax
  * used in the gst-launch utillity.
  */

Modified: gstreamermm/trunk/gstreamer/src/task.ccg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/task.ccg	(original)
+++ gstreamermm/trunk/gstreamer/src/task.ccg	Mon Feb 25 01:53:01 2008
@@ -21,7 +21,7 @@
 
 #include <gst/gsttask.h>
 
-static void SignalProxy_Task_gstreamermm_callback(void* data)
+static void Task_Task_gstreamermm_callback(void* data)
 {
   Gst::Task::SlotTask* the_slot = static_cast<Gst::Task::SlotTask*>(data);
 
@@ -50,7 +50,7 @@
   //destructor
   SlotTask *slot_copy = new SlotTask(slot);
 
-  Glib::RefPtr<Task> task = Glib::wrap(gst_task_create(&SignalProxy_Task_gstreamermm_callback, slot_copy));
+  Glib::RefPtr<Task> task = Glib::wrap(gst_task_create(&Task_Task_gstreamermm_callback, slot_copy));
   task->slot = slot_copy;
   return task;
 }



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