gnomemm r1494 - in gstreamermm/trunk: . examples/ogg_player gstreamer/src tools/m4



Author: murrayc
Date: Wed May 14 16:20:55 2008
New Revision: 1494
URL: http://svn.gnome.org/viewvc/gnomemm?rev=1494&view=rev

Log:
2008-05-14  Murray Cumming  <murrayc murrayc com>

* examples/ogg_player/main.cc (main):
* gstreamer/src/bin.hg:
* gstreamer/src/buffer.hg:
* gstreamer/src/bus.hg:
* gstreamer/src/caps.hg:
* gstreamer/src/childproxy.hg:
* gstreamer/src/clock.ccg:
* gstreamer/src/clock.hg:
* gstreamer/src/element.hg:
* gstreamer/src/elementfactory.hg:
* gstreamer/src/event.hg:
* gstreamer/src/format.hg:
* gstreamer/src/ghostpad.hg:
* gstreamer/src/pad.hg:
* gstreamer/src/structure.hg:
* tools/m4/convert_gst.m4: Minor const corrections and some TODOs.

Modified:
   gstreamermm/trunk/ChangeLog
   gstreamermm/trunk/examples/ogg_player/main.cc
   gstreamermm/trunk/gstreamer/src/bin.hg
   gstreamermm/trunk/gstreamer/src/buffer.hg
   gstreamermm/trunk/gstreamer/src/bus.hg
   gstreamermm/trunk/gstreamer/src/caps.hg
   gstreamermm/trunk/gstreamer/src/childproxy.hg
   gstreamermm/trunk/gstreamer/src/clock.ccg
   gstreamermm/trunk/gstreamer/src/clock.hg
   gstreamermm/trunk/gstreamer/src/element.hg
   gstreamermm/trunk/gstreamer/src/elementfactory.hg
   gstreamermm/trunk/gstreamer/src/event.hg
   gstreamermm/trunk/gstreamer/src/format.hg
   gstreamermm/trunk/gstreamer/src/ghostpad.hg
   gstreamermm/trunk/gstreamer/src/pad.hg
   gstreamermm/trunk/gstreamer/src/structure.hg
   gstreamermm/trunk/tools/m4/convert_gst.m4

Modified: gstreamermm/trunk/examples/ogg_player/main.cc
==============================================================================
--- gstreamermm/trunk/examples/ogg_player/main.cc	(original)
+++ gstreamermm/trunk/examples/ogg_player/main.cc	Wed May 14 16:20:55 2008
@@ -198,7 +198,7 @@
   // interval to regularly print the position of the stream
   Glib::signal_timeout().connect(sigc::ptr_fun(&print_stream_position), 200);
 
-  // Now set to playing and iterate:
+  // Now set to playing and iterate: TODO: What is iterated? Is the comment wrong?
   std::cout << "Setting to PLAYING." << std::endl;
   pipeline->set_state(Gst::STATE_PLAYING);
   std::cout << "Running." << std::endl;

Modified: gstreamermm/trunk/gstreamer/src/bin.hg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/bin.hg	(original)
+++ gstreamermm/trunk/gstreamer/src/bin.hg	Wed May 14 16:20:55 2008
@@ -116,7 +116,7 @@
  *
  * A Gst::Bin will by default forward any event sent to it to all sink
  * elements. If all the sinks return TRUE, the bin will also return TRUE, else
- * FALSE is returned. If no sinks are in the bin, the event handler will return
+ * false is returned. If no sinks are in the bin, the event handler will return
  * TRUE.
  *
  * Last reviewed on 2006-04-28 (0.10.6)
@@ -169,10 +169,28 @@
    */
   Glib::RefPtr<Bin> remove(const Glib::RefPtr<Element>& element);
 
+  //TODO: Just add a bool recurse_up = false parameter? 
   _WRAP_METHOD(Glib::RefPtr<Element> get_element(const Glib::ustring& name), gst_bin_get_by_name)
+  _WRAP_METHOD(Glib::RefPtr<const Element> get_element(const Glib::ustring& name) const, gst_bin_get_by_name)
+
   _WRAP_METHOD(Glib::RefPtr<Element> get_element_recurse_up(const Glib::ustring& name), gst_bin_get_by_name_recurse_up)
+  _WRAP_METHOD(Glib::RefPtr<const Element> get_element_recurse_up(const Glib::ustring& name) const, gst_bin_get_by_name_recurse_up)
+ 
   _WRAP_METHOD(Glib::RefPtr<Element> get_element(GType interface), gst_bin_get_by_interface)
+  _WRAP_METHOD(Glib::RefPtr<const Element> get_element(GType interface) const, gst_bin_get_by_interface)
+
   _WRAP_METHOD(Glib::RefPtr<Pad> find_unconnected_pad(PadDirection dir), gst_bin_find_unconnected_pad)
+  _WRAP_METHOD(Glib::RefPtr<const Pad> find_unconnected_pad(PadDirection dir) const, gst_bin_find_unconnected_pad)
+
+/* TODO:
+GstIterator*    gst_bin_iterate_elements	 (GstBin *bin);
+GstIterator*    gst_bin_iterate_sorted		 (GstBin *bin);
+GstIterator*    gst_bin_iterate_recurse		 (GstBin *bin);
+
+GstIterator*	gst_bin_iterate_sinks		 (GstBin *bin);
+GstIterator*	gst_bin_iterate_sources		 (GstBin *bin);
+GstIterator*	gst_bin_iterate_all_by_interface (GstBin *bin, GType iface);
+*/
 
   _IGNORE(gst_bin_add, gst_bin_remove, gst_bin_add_many, gst_bin_remove_many)
 

Modified: gstreamermm/trunk/gstreamer/src/buffer.hg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/buffer.hg	(original)
+++ gstreamermm/trunk/gstreamer/src/buffer.hg	Wed May 14 16:20:55 2008
@@ -71,11 +71,11 @@
   _WRAP_METHOD(Glib::RefPtr<Buffer> make_metadata_writable() const, gst_buffer_make_metadata_writable)
 
   _WRAP_METHOD(Glib::RefPtr<Caps> get_caps(), gst_buffer_get_caps)
-  _WRAP_METHOD(Glib::RefPtr<Caps const> get_caps() const, gst_buffer_get_caps, constversion)
+  _WRAP_METHOD(Glib::RefPtr<const Caps > get_caps() const, gst_buffer_get_caps, constversion)
   _WRAP_METHOD(void set_caps(const Glib::RefPtr<Caps>& caps), gst_buffer_set_caps)
   _WRAP_METHOD(Glib::RefPtr<Buffer> create_sub(const guint& offset, const guint& size), gst_buffer_create_sub)
-  _WRAP_METHOD(Glib::RefPtr<Buffer const> create_sub(const guint& offset, const guint& size) const, gst_buffer_create_sub, constversion)
-  _WRAP_METHOD(bool is_span_fast(const Glib::RefPtr<Buffer>& other_buffer) const, gst_buffer_is_span_fast)
+  _WRAP_METHOD(Glib::RefPtr<const Buffer > create_sub(const guint& offset, const guint& size) const, gst_buffer_create_sub, constversion)
+  _WRAP_METHOD(bool is_span_fast(const Glib::RefPtr<const Buffer>& other_buffer) const, gst_buffer_is_span_fast)
 
   //This is const because it always returns a new buffer:
   _WRAP_METHOD(Glib::RefPtr<Buffer> span(const guint32& offset, const Glib::RefPtr<Buffer>& other_buffer, const guint32& len) const, gst_buffer_span)

Modified: gstreamermm/trunk/gstreamer/src/bus.hg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/bus.hg	(original)
+++ gstreamermm/trunk/gstreamer/src/bus.hg	Wed May 14 16:20:55 2008
@@ -88,7 +88,7 @@
    * bool on_bus_message(const Glib::RefPtr<Gst::Bus>& bus, const
    * Glib::RefPtr<Gst::Message>& message);
    * The message function should return true if it wants to continue to receive
-   * messages, false otherwise.
+   * messages, or false otherwise.
    */
   typedef sigc::slot< bool, const Glib::RefPtr<Bus>&, const Glib::RefPtr<Message>& > SlotMessage;
 
@@ -100,24 +100,27 @@
 
   /** Creates a new Gst::Bus instance.
    *
-   * @return the new Gst::Bus instance
+   * @return The new Gst::Bus instance.
    */
   _WRAP_CREATE()
 
   _WRAP_METHOD(bool post(const Glib::RefPtr<Message>& message), gst_bus_post)
   _WRAP_METHOD(bool have_pending() const, gst_bus_have_pending)
+
   _WRAP_METHOD(Glib::RefPtr<Message> peek(), gst_bus_peek)
   _WRAP_METHOD(Glib::RefPtr<const Message> peek() const, gst_bus_peek)
+
   _WRAP_METHOD(Glib::RefPtr<Message> pop(), gst_bus_pop)
   _WRAP_METHOD(Glib::RefPtr<Message> pop(MessageType message_type), gst_bus_pop_filtered)
   _WRAP_METHOD(Glib::RefPtr<Message> pop(ClockTime timeout), gst_bus_timed_pop)
   _WRAP_METHOD(Glib::RefPtr<Message> pop(ClockTime timeout, MessageType message_type), gst_bus_timed_pop_filtered)
+
   _WRAP_METHOD(void set_flushing(bool flushing = true), gst_bus_set_flushing)
 
   /** Adds a bus watch to the default main context with the given priority.
    * The slot is used to receive asynchronous messages in the main loop.
    *
-   * The watch can be removed using remove_watch() or by returning FALSE from
+   * The watch can be removed using remove_watch() or by returning false from
    * slot.
    *
    * @param slot The slot to call when a message is received.

Modified: gstreamermm/trunk/gstreamer/src/caps.hg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/caps.hg	(original)
+++ gstreamermm/trunk/gstreamer/src/caps.hg	Wed May 14 16:20:55 2008
@@ -55,6 +55,7 @@
   _IGNORE(gst_caps_ref, gst_caps_unref)
 
 public:
+
   /** Creates a new Gst::Caps that indicates that it is compatible with any
    * media format.
    *
@@ -77,26 +78,30 @@
    */
   static Glib::RefPtr<Caps> create(Structure& first_struct);
 
+  _WRAP_METHOD(static Glib::RefPtr<Caps> create_from_string(const Glib::ustring& string), gst_caps_from_string)
+
+
   _WRAP_METHOD(Glib::RefPtr<Caps> copy() const, gst_caps_copy)
-  _WRAP_METHOD(Glib::RefPtr<Caps> copy_nth(guint nth), gst_caps_copy_nth)
+  _WRAP_METHOD(Glib::RefPtr<Caps> copy_nth(guint nth) const, gst_caps_copy_nth)
   _WRAP_METHOD(void append(const Glib::RefPtr<Caps>& caps), gst_caps_append)
   _WRAP_METHOD(void merge(const Glib::RefPtr<Caps>& caps), gst_caps_merge)
 
-  /** Appends structure to caps. The structure is not copied; caps becomes the
-   * owner of structure.
+  //TODO: This talk of ownership is strange. Say what it really means somewhere. murrayc.
+  /** Appends a structure to caps. The structure is not copied. This Caps becomes the
+   * owner of @a structure.
    *
    * @param structure the Gst::Structure to append
    */
   void append_structure(Structure& structure);
 
-  /** Appends structure to caps if its not already expressed by caps. The
-   * structure is not copied; caps becomes the owner of structure.
+  /** Appendsa  structure to caps if its not already expressed by caps. The
+   * structure is not copied. This Caps becomes the owner of @a structure.
    *
    * @param structure the Gst::Structure to merge
    */
   void merge_structure(Structure& structure);
 
-  /** Finds the structure in caps that has the index idx, and returns it.
+  /** Finds the structure in caps that has the index @a idx, and returns it.
    *
    * @param index the index of the structure
    * @return the Gst::Structure corresponding to index
@@ -106,13 +111,14 @@
   _WRAP_METHOD(void remove_structure(guint idx), gst_caps_remove_structure)
   _WRAP_METHOD(guint size() const, gst_caps_get_size)
 
-  /** Sets a fields in a simple Gst::Caps. A simple Gst::Caps is one that only
+  /** Sets fields in a simple Gst::Caps. A simple Gst::Caps is one that only
    * has one structure.
    *
    * @param field field to set
    * @param value the value which the field should be set to
    */
   void set_simple(const Glib::ustring& name, const Glib::ValueBase& value);
+  _IGNORE(gst_caps_set_simple)
 
   _WRAP_METHOD(void set_simple_valist(char* field, const va_list& varargs), gst_caps_set_simple_valist)
 
@@ -123,17 +129,26 @@
   _WRAP_METHOD(bool equals_fixed(const Glib::RefPtr<Caps>& other_caps) const, gst_caps_is_equal_fixed)
   _WRAP_METHOD(bool is_always_compatible(const Glib::RefPtr<Caps>& other_caps) const, gst_caps_is_always_compatible)
   _WRAP_METHOD(bool is_subset(const Glib::RefPtr<Caps>& superset_caps) const, gst_caps_is_subset)
+
+  //TODO: Rename as create_*()?
+  //This is const (returns a non const) because it always creates a new instance:
   _WRAP_METHOD(Glib::RefPtr<Caps> get_intersect(const Glib::RefPtr<Caps>& other_caps) const, gst_caps_intersect)
+
+  //This is const (returns a non const) because it always creates a new instance:
   _WRAP_METHOD(Glib::RefPtr<Caps> get_union(const Glib::RefPtr<Caps>& other_caps) const, gst_caps_union)
-  _WRAP_METHOD(Glib::RefPtr<Caps> normalize(), gst_caps_normalize)
+
+  //This is const (returns a non const) because it always creates a new instance:
+  _WRAP_METHOD(Glib::RefPtr<Caps> normalize() const, gst_caps_normalize)
+
   _WRAP_METHOD(bool simplify(), gst_caps_do_simplify)
+
+  //TODO: Add overloads (and dependency) for libxml++?
   _WRAP_METHOD(xmlNodePtr save(const xmlNodePtr& parent) const, gst_caps_save_thyself)
   _WRAP_METHOD(static Glib::RefPtr<Caps> load(xmlNodePtr parent), gst_caps_load_thyself)
 
   _WRAP_METHOD(Glib::ustring to_string() const, gst_caps_to_string)
 
-  _WRAP_METHOD(static Glib::RefPtr<Caps> from_string(const Glib::ustring& string), gst_caps_from_string)
-
+ //TODO: Rename as create_*()?
   _WRAP_METHOD(Glib::RefPtr<Caps> subtract(const Glib::RefPtr<const Caps>& subtrahend_caps), gst_caps_subtract)
   _WRAP_METHOD(Glib::RefPtr<Caps> make_writable(), gst_caps_make_writable)
   _WRAP_METHOD(void truncate(), gst_caps_truncate)

Modified: gstreamermm/trunk/gstreamer/src/childproxy.hg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/childproxy.hg	(original)
+++ gstreamermm/trunk/gstreamer/src/childproxy.hg	Wed May 14 16:20:55 2008
@@ -46,47 +46,50 @@
   _CLASS_INTERFACE(ChildProxy, GstChildProxy, GST_CHILD_PROXY, GstChildProxyInterface)
 
 public:
-  _WRAP_METHOD(guint get_children_count(), gst_child_proxy_get_children_count)
+  _WRAP_METHOD(guint get_children_count() const, gst_child_proxy_get_children_count)
   _WRAP_METHOD(Glib::RefPtr<Gst::Object> get_child(const Glib::ustring& name), gst_child_proxy_get_child_by_name)
+  _WRAP_METHOD(Glib::RefPtr<const Gst::Object> get_child(const Glib::ustring& name) const, gst_child_proxy_get_child_by_name)
+
   _WRAP_METHOD(Glib::RefPtr<Gst::Object> get_child(guint index), gst_child_proxy_get_child_by_index)
+  _WRAP_METHOD(Glib::RefPtr<const Gst::Object> get_child(guint index) const, gst_child_proxy_get_child_by_index)
 
   //TODO: should gst_child_proxy_lookup() be wrapped?
 
   /** Gets a single property using the Gst::ChildProxy mechanism.
-   * @param name the property to get
-   * @param value an empty Glib::ValueBase in which to store the property
-   * @return this Gst::ChildProxy so more properties can be gotten if needed
+   * @param name The property to get
+   * @param value An empty Glib::ValueBase in which to store the property
+   * @return This Gst::ChildProxy so more properties can be retrieved if needed
    */
   Glib::RefPtr<ChildProxy> get_proxy_property(const Glib::ustring& name, Glib::ValueBase& value);
 
   /** Gets properties of the parent object and its children.
-   * @param first_prop_name name of the first property to get
-   * @param var_args return location for the first property, followed
+   * @param first_prop_name Name of the first property to get
+   * @param var_args return Location for the first property, followed
    * optionally by more name/return location pairs, followed by NULL
    */
   void get_proxy_valist(const Glib::ustring& first_prop_name, va_list& var_args);
 
   /** Sets a single property using the Gst::ChildProxy mechanism.
-   * @param name the property to get
-   * @param value the Glib::ValueBase to set the property to (non-empty)
-   * @return this Gst::ChildProxy so more properties can be set
+   * @param name The property to get
+   * @param value The Glib::ValueBase to set the property to (non-empty)
+   * @return This Gst::ChildProxy so more properties can be set
    */
   Glib::RefPtr<ChildProxy> set_proxy_property(const Glib::ustring& name, const Glib::ValueBase& value);
 
   /** Sets properties of the parent object and its children.
-   * @param first_prop_name name of the first property to set
-   * @param var_args alue for the first property, followed optionally by more
+   * @param first_prop_name Name of the first property to set
+   * @param var_args Value for the first property, followed optionally by more
    * name/value pairs, followed by NULL
    */
   void set_proxy_valist(const Glib::ustring& first_prop_name, const va_list& var_args);
 
   /** Emits the "child-added" signal.
-   * @param child the newly added child
+   * @param child The newly added child
    */
   void child_added(const Glib::RefPtr<Gst::Object>& child);
 
   /** Emits the "child-removed" signal.
-   * @param child the newly added child
+   * @param child The newly added child
    */
   void child_removed(const Glib::RefPtr<Gst::Object>& child);
 

Modified: gstreamermm/trunk/gstreamer/src/clock.ccg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/clock.ccg	(original)
+++ gstreamermm/trunk/gstreamer/src/clock.ccg	Wed May 14 16:20:55 2008
@@ -102,4 +102,9 @@
   return (ClockReturn) gst_clock_id_wait_async(gobj(), &ClockID_Clock_gstreamermm_callback, slot_copy);
 }
 
+ClockReturn ClockID::wait()
+{
+  return (ClockReturn) gst_clock_id_wait(gobj(), NULL);
+}
+
 } //namespace Gst

Modified: gstreamermm/trunk/gstreamer/src/clock.hg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/clock.hg	(original)
+++ gstreamermm/trunk/gstreamer/src/clock.hg	Wed May 14 16:20:55 2008
@@ -53,8 +53,10 @@
    */
   typedef sigc::slot< bool, const Glib::RefPtr<Clock>&, ClockTime, const Glib::RefPtr<ClockID>& > SlotClock;
 
-  _WRAP_METHOD(ClockTime get_time(), gst_clock_id_get_time)
+  _WRAP_METHOD(ClockTime get_time() const, gst_clock_id_get_time)
+
   _WRAP_METHOD(ClockReturn wait(ClockTimeDiff& jitter), gst_clock_id_wait)
+  ClockReturn wait();
 
   /** Register a slot on the given Gst::ClockID id with the given slot. When
    * passing a Gst::ClockID with an invalid time to this function, the slot

Modified: gstreamermm/trunk/gstreamer/src/element.hg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/element.hg	(original)
+++ gstreamermm/trunk/gstreamer/src/element.hg	Wed May 14 16:20:55 2008
@@ -47,6 +47,7 @@
 
 _WRAP_ENUM(ElementFlags, GstElementFlags)
 
+//TODO: Why not use _WRAP_ELEM() here?
 enum StateChange
 {
   STATE_CHANGE_NULL_TO_READY = GST_STATE_CHANGE_NULL_TO_READY,
@@ -59,6 +60,8 @@
 
 _WRAP_ENUM(StateChangeReturn, GstStateChangeReturn)
 
+//TODO: Use a namespace or prefix, because Gst::get_name() is too generic. murrayc.
+
 /**  Gets a string representing the given state.
  *
  * @param state a Gst::State to get the name of.
@@ -121,11 +124,18 @@
   _CTOR_DEFAULT
 
 public:
+  //TODO Add const version?
   Glib::RefPtr<Element> link(const Glib::RefPtr<Element>& other_element);
+
   _WRAP_METHOD(bool add_pad(const Glib::RefPtr<Pad>& pad), gst_element_add_pad)
+
+  //TODO: Remove this (and make sure it is really deprecated in the C API),
+  //because the C API says it should not be used because it has unclear refcounting:
   _WRAP_METHOD(Glib::RefPtr<Pad> get_pad(const Glib::ustring& name), gst_element_get_pad)
+
   _WRAP_METHOD(void create_all_pads(), gst_element_create_all_pads)
 
+  //TODO: If these get* functions are creators, then maybe rename to create*()? murrayc
   Glib::RefPtr<Pad> get_compatible_pad(const Glib::RefPtr<Pad>& pad, const Glib::RefPtr<Caps>& caps);
   Glib::RefPtr<PadTemplate> get_compatible_pad_template(const Glib::RefPtr<PadTemplate>& padtemplate);
 
@@ -153,10 +163,12 @@
 
   //Note: gst_element_get_index provides a reference.
   _WRAP_METHOD(Glib::RefPtr<Index> get_index(), gst_element_get_index)
-  _WRAP_METHOD(Glib::RefPtr<Index const> get_index() const, gst_element_get_index, constversion)
+  _WRAP_METHOD(Glib::RefPtr<const Index > get_index() const, gst_element_get_index, constversion)
+
 
+  _WRAP_METHOD(Glib::RefPtr<ElementFactory> get_factory(), gst_element_get_factory, refresult)
+  _WRAP_METHOD(Glib::RefPtr<const ElementFactory> get_factory() const, gst_element_get_factory, refresult, constversion)
 
-  _WRAP_METHOD(Glib::RefPtr<ElementFactory> get_factory(), gst_element_get_factory)
   _WRAP_METHOD(bool is_indexable() const, gst_element_is_indexable)
   _WRAP_METHOD(bool requires_clock() const, gst_element_requires_clock)
   _WRAP_METHOD(bool set_clock(const Glib::RefPtr<Clock>& clock), gst_element_set_clock)
@@ -174,7 +186,7 @@
   _WRAP_METHOD(void lost_state(), gst_element_lost_state)
   _WRAP_METHOD(bool sync_state_with_parent(), gst_element_sync_state_with_parent)
   _WRAP_METHOD(StateChangeReturn change_state(StateChange transition), gst_element_change_state)
-  _WRAP_METHOD(void found_tags(TagList& list), gst_element_found_tags)
+  _WRAP_METHOD(void found_tags(TagList& list), gst_element_found_tags) //TODO: Use return value instead?
   _WRAP_METHOD(void found_tags_for_pad(const Glib::RefPtr<Pad>& pad, TagList& list), gst_element_found_tags_for_pad)
 
   //TODO: Change the parameter order?

Modified: gstreamermm/trunk/gstreamer/src/elementfactory.hg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/elementfactory.hg	(original)
+++ gstreamermm/trunk/gstreamer/src/elementfactory.hg	Wed May 14 16:20:55 2008
@@ -48,7 +48,13 @@
   _CLASS_GOBJECT(ElementFactory, GstElementFactory, GST_ELEMENT_FACTORY, PluginFeature, GstPluginFeature)
 
 public:
+
+  //TODO: Rename as create_*()? How is this different to gst_element_factory_create()?
   _WRAP_METHOD(static Glib::RefPtr<ElementFactory> find(const Glib::ustring& name), gst_element_factory_find)
+
+  _WRAP_METHOD(Glib::RefPtr<Element> create(const Glib::ustring& name), gst_element_factory_create)
+  _WRAP_METHOD(static Glib::RefPtr<Element> create(const Glib::ustring& factory_name, const Glib::ustring& name), gst_element_factory_make)
+  
   _WRAP_METHOD(GType get_element_type() const, gst_element_factory_get_element_type)
   _WRAP_METHOD(Glib::ustring get_long_name() const, gst_element_factory_get_longname)
   _WRAP_METHOD(Glib::ustring get_kclass() const, gst_element_factory_get_klass)
@@ -57,12 +63,10 @@
   _WRAP_METHOD(guint get_num_pad_templates() const, gst_element_factory_get_num_pad_templates)
   _WRAP_METHOD(int get_uri_type() const, gst_element_factory_get_uri_type)
 
-  //TODO: Is the conversion from gchar** to Glb::StringArrayHandle used here valid?
+  //TODO: Is the conversion from gchar** to Glb::StringArrayHandle used here valid? Check ownership.
   _WRAP_METHOD(Glib::StringArrayHandle get_uri_protocols() const, gst_element_factory_get_uri_protocols)
 
   _WRAP_METHOD(bool has_interface(const Glib::ustring& name) const, gst_element_factory_has_interface)
-  _WRAP_METHOD(Glib::RefPtr<Element> create(const Glib::ustring& name), gst_element_factory_create)
-  _WRAP_METHOD(static Glib::RefPtr<Element> create(const Glib::ustring& factory_name, const Glib::ustring& name), gst_element_factory_make)
   _WRAP_METHOD(bool can_sink_caps(const Glib::RefPtr<const Caps>& caps) const, gst_element_factory_can_sink_caps)
   _WRAP_METHOD(bool can_src_caps(const Glib::RefPtr<const Caps>& caps) const, gst_element_factory_can_src_caps)
 

Modified: gstreamermm/trunk/gstreamer/src/event.hg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/event.hg	(original)
+++ gstreamermm/trunk/gstreamer/src/event.hg	Wed May 14 16:20:55 2008
@@ -217,7 +217,7 @@
    * Gst::FLOW_WRONG_STATE when used for data flow with Gst::Pad::push(),
    * Gst::Pad::chain(), Gst::Pad::alloc_buffer(), Gst::Pad::get_range() and
    * Gst::Pad::pull_range(). Any event (except a Gst::EVENT_FLUSH_STOP)
-   * received on a flushing pad will return FALSE immediately.
+   * received on a flushing pad will return false immediately.
    *
    * Elements should unlock any blocking functions and exit their streaming
    * functions as fast as possible when this event is received.

Modified: gstreamermm/trunk/gstreamer/src/format.hg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/format.hg	(original)
+++ gstreamermm/trunk/gstreamer/src/format.hg	Wed May 14 16:20:55 2008
@@ -33,16 +33,21 @@
  */
 struct FormatDefinition
 {
-  /// The unique id of this format
+  /// The unique id of this format.
   Gst::Format         value;
-  /// A short nick of the format
+
+  /// A short nick of the format.
   Glib::ustring       nick;
-  /// A longer description of the format
+
+  /// A longer description of the format.
   Glib::ustring       description;
-  /// A quark for the nick 
+
+  /// A quark for the nick.
   Glib::QueryQuark    quark;
 };
 
+//TODO: Use a namespace or prefix (and watch out that there are other get_name() functions elsewhere. murrayc.
+
 /** Get a printable name for the given format. Do not modify or free.
  * 
  * @param format a Gst::Format

Modified: gstreamermm/trunk/gstreamer/src/ghostpad.hg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/ghostpad.hg	(original)
+++ gstreamermm/trunk/gstreamer/src/ghostpad.hg	Wed May 14 16:20:55 2008
@@ -55,14 +55,12 @@
   _WRAP_CTOR(GhostPad(const Glib::ustring& name, const Glib::RefPtr<PadTemplate>& templ), gst_ghost_pad_new_no_target_from_template)
 
 public:
-  /** Create a new ghostpad with target as the target. The direction will be
-   * taken from the target pad. target must be unlinked.
+  /** Create a new ghostpad with @a target as the target. The direction will be
+   * taken from the target pad. @a target must be unlinked.
    *
-   * Will ref the target.
-   *
-   * @param name the name of the new pad.
-   * @param target the pad to ghost.
-   * @returns a new Gst::GhostPad, or NULL in case of an error.
+   * @param name The name of the new pad.
+   * @param target The pad to ghost.
+   * @returns A new Gst::GhostPad, or an empty RefPtr in case of an error.
    */
   _WRAP_CREATE(const Glib::ustring& name, const Glib::RefPtr<Pad>& target)
 
@@ -71,36 +69,36 @@
    *
    * The created ghostpad will not have a padtemplate.
    *
-   * @param name the name of the new pad.
-   * @param dir the direction of the ghostpad
-   * @return a new Gst::GhostPad, or NULL in case of an error. 
+   * @param name The name of the new pad.
+   * @param dir The direction of the ghostpad
+   * @return A new Gst::GhostPad, or an empty RefPtr in case of an error. 
    */
   _WRAP_CREATE(const Glib::ustring& name, PadDirection dir)
 
-  /** Create a new ghostpad with target as the target. The direction will be
+  /** Create a new ghostpad with @a target as the target. The direction will be
    * taken from the target pad. The template used on the ghostpad will be
    * template.
    *
-   * Will ref the target.
-   *
-   * @param name the name of the new pad.
-   * @param target the pad to ghost.
-   * @param templ the Gst::PadTemplate to use on the ghostpad.
-   * @return a new Gst::GhostPad, or NULL in case of an error.
+   * @param name The name of the new pad.
+   * @param target The pad to ghost.
+   * @param templ The Gst::PadTemplate to use on the ghostpad.
+   * @return a new Gst::GhostPad, or an empty RefPtr in case of an error.
    */
   _WRAP_CREATE(const Glib::ustring& name, const Glib::RefPtr<Pad>& target, const Glib::RefPtr<PadTemplate>& templ)
 
-  /** Create a new ghostpad based on templ, without setting a target. The
-   * direction will be taken from the templ.
+  /** Create a new ghostpad based on @a templ, without setting a target. The
+   * direction will be taken from @a templ.
    *
-   * @param name the name of the new pad.
-   * @param templ the Gst::PadTemplate to create the ghostpad from.
-   * @return a new Gst::GhostPad, or NULL in case of an error.
+   * @param name The name of the new pad.
+   * @param templ The Gst::PadTemplate to create the ghostpad from.
+   * @return A new Gst::GhostPad, or an empty RefPtr in case of an error.
    */
   _WRAP_CREATE(const Glib::ustring& name, const Glib::RefPtr<PadTemplate>& templ)
 
   _WRAP_METHOD(bool set_target(const Glib::RefPtr<Pad>& newtarget), gst_ghost_pad_set_target)
+
   _WRAP_METHOD(Glib::RefPtr<Pad> get_target(), gst_ghost_pad_get_target)
+  _WRAP_METHOD(Glib::RefPtr<const Pad> get_target() const, gst_ghost_pad_get_target)
 };
 
 } // namespace Gst

Modified: gstreamermm/trunk/gstreamer/src/pad.hg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/pad.hg	(original)
+++ gstreamermm/trunk/gstreamer/src/pad.hg	Wed May 14 16:20:55 2008
@@ -91,7 +91,7 @@
    * bool on_have_data(const Glib::RefPtr<Gst::Pad>& pad, const
    * Glib::RefPtr<Gst::MiniObjec>& data);
    * The on_have_data method should return TRUE to keep the data in the
-   * pipeline, FALSE to drop it (throw it away)
+   * pipeline, false to drop it (throw it away)
    */
   typedef sigc::slot< bool, const Glib::RefPtr<Pad>&, const Glib::RefPtr<MiniObject>& > SlotData;
 
@@ -159,7 +159,7 @@
    * sink with new caps, if any, and before calling the pad's chain function.
    *
    * Your data probe should return TRUE to let the data continue to flow, or
-   * FALSE to drop it. Dropping data is rarely useful, but occasionally comes
+   * false to drop it. Dropping data is rarely useful, but occasionally comes
    * in handy with events.
    *
    * To remove a probe, use the appropriate function, such as
@@ -203,7 +203,7 @@
   _WRAP_METHOD(bool accept_caps(const Glib::RefPtr<Caps>& caps), gst_pad_accept_caps)
 
   _WRAP_METHOD(Glib::RefPtr<Caps> proxy_getcaps(), gst_pad_proxy_getcaps)
-  _WRAP_METHOD(Glib::RefPtr<Caps const> proxy_getcaps() const, gst_pad_proxy_getcaps, constversion)
+  _WRAP_METHOD(Glib::RefPtr<const Caps > proxy_getcaps() const, gst_pad_proxy_getcaps, constversion)
 
   _WRAP_METHOD(bool proxy_setcaps(const Glib::RefPtr<Caps>& caps), gst_pad_proxy_setcaps)
 

Modified: gstreamermm/trunk/gstreamer/src/structure.hg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/structure.hg	(original)
+++ gstreamermm/trunk/gstreamer/src/structure.hg	Wed May 14 16:20:55 2008
@@ -109,7 +109,7 @@
    *
    * @param slot a slot to call for each field
    * @return TRUE if the supplied slot returns TRUE For each of the fields,
-   * FALSE otherwise.
+   * false otherwise.
    */
   bool foreach(const SlotForeach& slot);
 
@@ -124,7 +124,7 @@
    * @param value the Value class to set
    * @return TRUE if the value could be set correctly. If there was no field
    * with fieldname or the existing field did not contain a boolean, this
-   * function returns FALSE.
+   * function returns false.
    */
   bool get_boolean(const Glib::ustring& fieldname, Glib::ValueBase& value) const;
 
@@ -135,7 +135,7 @@
    * @param value the Value class to set
    * @return TRUE if the value could be set correctly. If there was no field
    * with fieldname or the existing field did not contain an int, this function
-   * returns FALSE returns FALSE
+   * returns false returns false
    */
   bool get_int(const Glib::ustring& fieldname, Glib::ValueBase& value) const;
 
@@ -146,7 +146,7 @@
    * @param value the Value class to set
    * @return TRUE if the value could be set correctly. If there was no field
    * with fieldname or the existing field did not contain an uint, this
-   * function returns FALSE returns FALSE
+   * function returns false returns false
    */
   bool get_uint(const Glib::ustring& fieldname, Glib::ValueBase& value) const;
 
@@ -157,7 +157,7 @@
    * @param value the Value class to set
    * @return TRUE if the value could be set correctly. If there was no field
    * with fieldname or the existing field did not contain a fourc, this
-   * function returns FALSE returns FALSE
+   * function returns false returns false
    */
   bool get_fourcc(const Glib::ustring& fieldname, Glib::ValueBase& value) const;
 
@@ -168,7 +168,7 @@
    * @param value the Value class to set
    * @return TRUE if the value could be set correctly. If there was no field
    * with fieldname or the existing field did not contain a double, this
-   * function returns FALSE returns FALSE
+   * function returns false returns false
    */
   bool get_double(const Glib::ustring& fieldname, Glib::ValueBase& value) const;
 
@@ -179,7 +179,7 @@
    * @param value the Value class to set
    * @return TRUE if the value could be set correctly. If there was no field
    * with fieldname or the existing field did not contain a string, this
-   * function returns FALSE returns FALSE
+   * function returns false returns false
    */
   bool get_string(const Glib::ustring& fieldname, Glib::ValueBase& value) const;
 
@@ -190,7 +190,7 @@
    * @param date the Glib::Date class to set
    * @return TRUE if the value could be set correctly. If there was no field
    * with fieldname or the existing field did not contain a GDate, this
-   * function returns FALSE returns FALSE
+   * function returns false returns false
    */
   bool get_date(const Glib::ustring& fieldname, Glib::Date& value) const;
 
@@ -202,7 +202,7 @@
    * @param value the Value class to set
    * @return TRUE if the value could be set correctly. If there was no field
    * with fieldname or the existing field did not contain a Gst::ClockTime,
-   * this function returns FALSE returns FALSE
+   * this function returns false returns false
    */
   bool get_clock_time(const Glib::ustring& fieldname, Glib::ValueBase& value) const;
 
@@ -213,7 +213,7 @@
    * @param value the Value class to set
    * @return TRUE if the value could be set correctly. If there was no field
    * with fieldname or the existing field did not contain a enum, this
-   * function returns FALSE returns FALSE
+   * function returns false returns false
    */
   bool get_enum(const Glib::ustring& fieldname, GType enumtype, Glib::ValueBase& value) const;
 
@@ -225,7 +225,7 @@
    * @param fraction the Gst::Fraction class to set
    * @return TRUE if the value could be set correctly. If there was no field
    * with fieldname or the existing field did not contain a Gst::Fraction, this
-   * function returns FALSE returns FALSE
+   * function returns false returns false
    */
   bool get_fraction(const Glib::ustring& fieldname, Gst::Fraction& fraction) const;
 
@@ -235,7 +235,7 @@
    *
    * @param slot a slot to call for each field
    * @return TRUE if the supplied slot returns TRUE For each of the fields,
-   * FALSE otherwise.
+   * false otherwise.
    */
   bool map_in_place(const SlotMap& slot);
 

Modified: gstreamermm/trunk/tools/m4/convert_gst.m4
==============================================================================
--- gstreamermm/trunk/tools/m4/convert_gst.m4	(original)
+++ gstreamermm/trunk/tools/m4/convert_gst.m4	Wed May 14 16:20:55 2008
@@ -19,9 +19,11 @@
 #Buffer
 _CONVERSION(`GstBuffer*',`Glib::RefPtr<Buffer>',`wrap($3)')
 _CONVERSION(`const Glib::RefPtr<Buffer>&',`GstBuffer*', `Glib::unwrap($3)')
+_CONVERSION(`const Glib::RefPtr<const Buffer>&',`GstBuffer*', `const_cast<GstBuffer*>(Glib::unwrap($3))')
 _CONVERSION(`const Glib::RefPtr<Buffer>&',`const GstBuffer*', `Glib::unwrap($3)')
 _CONVERSION(`Glib::RefPtr<Buffer>',`GstBuffer*', `Glib::unwrap($3)')
 
+
 #Bus
 _CONVERSION(`const Glib::RefPtr<Bus>&',`GstBus*', `Glib::unwrap($3)')
 _CONVERSION(`GstBus*',`Glib::RefPtr<Bus>',`Glib::wrap($3)')



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