gnomemm r2000 - in gstreamermm/trunk: . gstreamer/src tests tools/m4



Author: jaalburqu
Date: Tue Jan 20 02:01:48 2009
New Revision: 2000
URL: http://svn.gnome.org/viewvc/gnomemm?rev=2000&view=rev

Log:
2009-01-19  Josà Alburquerque  <jaalburqu svn gnome org>

	const correction in [a-i]*.{hg,ccg} source files:

	* gstreamer/src/audioclock.ccg:
	* gstreamer/src/audioclock.hg:
	* gstreamer/src/baseaudiosink.hg:
	* gstreamer/src/baseaudiosrc.hg:
	* gstreamer/src/basesrc.hg:
	* gstreamer/src/basetransform.hg:
	* gstreamer/src/bin.hg:
	* gstreamer/src/buffer.hg:
	* gstreamer/src/caps.ccg:
	* gstreamer/src/caps.hg:
	* gstreamer/src/childproxy.ccg:
	* gstreamer/src/childproxy.hg:
	* gstreamer/src/clock.hg:
	* gstreamer/src/colorbalance.hg:
	* gstreamer/src/element.ccg:
	* gstreamer/src/element.hg:
	* gstreamer/src/elementfactory.hg:
	* gstreamer/src/event.ccg:
	* gstreamer/src/event.hg:
	* gstreamer/src/index.hg:
	* tools/m4/convert_gst.m4:
	* gstreamer/src/basesink.ccg:
	* gstreamer/src/basesink.hg: Added wait_clock() and wait_eos()
	overloads.
	* gstreamer/src/caps.hg: Renamed make_writable() to create_writable().
	* gstreamer/src/element.ccg:
	* gstreamer/src/element.hg: Wrapped create_compatible_pad() and
	get_compatible_pad_template() (instead of handwriting them).
	* gstreamer/src/bus.hg:
	* gstreamer/src/error.hg:
	* tests/test-plugin-signals.cc: Used sink instead of source for signal
	testing.
	* gstreamer/src/indexfactory.hg: whitespace.

Modified:
   gstreamermm/trunk/ChangeLog
   gstreamermm/trunk/gstreamer/src/audioclock.ccg
   gstreamermm/trunk/gstreamer/src/audioclock.hg
   gstreamermm/trunk/gstreamer/src/baseaudiosink.hg
   gstreamermm/trunk/gstreamer/src/baseaudiosrc.hg
   gstreamermm/trunk/gstreamer/src/basesink.ccg
   gstreamermm/trunk/gstreamer/src/basesink.hg
   gstreamermm/trunk/gstreamer/src/basesrc.hg
   gstreamermm/trunk/gstreamer/src/basetransform.hg
   gstreamermm/trunk/gstreamer/src/bin.hg
   gstreamermm/trunk/gstreamer/src/buffer.hg
   gstreamermm/trunk/gstreamer/src/bus.hg
   gstreamermm/trunk/gstreamer/src/caps.ccg
   gstreamermm/trunk/gstreamer/src/caps.hg
   gstreamermm/trunk/gstreamer/src/childproxy.ccg
   gstreamermm/trunk/gstreamer/src/childproxy.hg
   gstreamermm/trunk/gstreamer/src/clock.hg
   gstreamermm/trunk/gstreamer/src/colorbalance.hg
   gstreamermm/trunk/gstreamer/src/element.ccg
   gstreamermm/trunk/gstreamer/src/element.hg
   gstreamermm/trunk/gstreamer/src/elementfactory.hg
   gstreamermm/trunk/gstreamer/src/error.hg
   gstreamermm/trunk/gstreamer/src/event.ccg
   gstreamermm/trunk/gstreamer/src/event.hg
   gstreamermm/trunk/gstreamer/src/index.hg
   gstreamermm/trunk/gstreamer/src/indexfactory.hg
   gstreamermm/trunk/tests/test-plugin-signals.cc
   gstreamermm/trunk/tools/m4/convert_gst.m4

Modified: gstreamermm/trunk/gstreamer/src/audioclock.ccg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/audioclock.ccg	(original)
+++ gstreamermm/trunk/gstreamer/src/audioclock.ccg	Tue Jan 20 02:01:48 2009
@@ -59,7 +59,7 @@
   gobj()->user_data = &slot;
 }
 
-bool AudioClock::_slot_set(bool mark_set)
+bool AudioClock::_slot_set(bool mark_set) const
 {
   static bool slot_set = false;
 

Modified: gstreamermm/trunk/gstreamer/src/audioclock.hg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/audioclock.hg	(original)
+++ gstreamermm/trunk/gstreamer/src/audioclock.hg	Tue Jan 20 02:01:48 2009
@@ -69,9 +69,8 @@
 #ifndef DOXYGEN_SHOULD_SKIP_THIS
 private:
   SlotGetTime* slot;
-  bool _slot_set(bool mark_set = false);
+  bool _slot_set(bool mark_set = false) const;
 #endif
 };
 
 } // namespace Gst
-

Modified: gstreamermm/trunk/gstreamer/src/baseaudiosink.hg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/baseaudiosink.hg	(original)
+++ gstreamermm/trunk/gstreamer/src/baseaudiosink.hg	Tue Jan 20 02:01:48 2009
@@ -49,10 +49,10 @@
   //TODO: _WRAP_METHOD(Glib::RefPtr<Gst::RingBuffer> create_ring_buffer(), gst_base_audio_sink_create_ringbuffer)
 
   _WRAP_METHOD(void set_provide_clock(bool provide), gst_base_audio_sink_set_provide_clock)
-  _WRAP_METHOD(bool get_provide_clock(), gst_base_audio_sink_get_provide_clock)
+  _WRAP_METHOD(bool get_provide_clock() const, gst_base_audio_sink_get_provide_clock)
 
   _WRAP_METHOD(void set_slave_method(Gst::BaseAudioSinkSlaveMethod method), gst_base_audio_sink_set_slave_method)
-  _WRAP_METHOD(Gst::BaseAudioSinkSlaveMethod get_slave_method(), gst_base_audio_sink_get_slave_method)
+  _WRAP_METHOD(Gst::BaseAudioSinkSlaveMethod get_slave_method() const, gst_base_audio_sink_get_slave_method)
 
   //TODO: Wrap vfuncs.
 };

Modified: gstreamermm/trunk/gstreamer/src/baseaudiosrc.hg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/baseaudiosrc.hg	(original)
+++ gstreamermm/trunk/gstreamer/src/baseaudiosrc.hg	Tue Jan 20 02:01:48 2009
@@ -49,7 +49,7 @@
   //TODO: _WRAP_METHOD(Glib::RefPtr<Gst::RingBuffer> create_ring_buffer(), gst_base_audio_src_create_ringbuffer)
 
   _WRAP_METHOD(void set_provide_clock(bool provide), gst_base_audio_src_set_provide_clock)
-  _WRAP_METHOD(bool get_provide_clock(), gst_base_audio_src_get_provide_clock)
+  _WRAP_METHOD(bool get_provide_clock() const, gst_base_audio_src_get_provide_clock)
 
   _WRAP_PROPERTY("actual-buffer-time", gint64)
   _WRAP_PROPERTY("actual-latency-time", gint64)

Modified: gstreamermm/trunk/gstreamer/src/basesink.ccg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/basesink.ccg	(original)
+++ gstreamermm/trunk/gstreamer/src/basesink.ccg	Tue Jan 20 02:01:48 2009
@@ -22,3 +22,18 @@
 #include <gstreamermm/pad.h>
 
 _PINCLUDE(gstreamermm/private/element_p.h)
+
+namespace Gst
+{
+
+ClockReturn BaseSink::wait_clock(ClockTime time)
+{
+  return (ClockReturn)(gst_base_sink_wait_clock(const_cast<GstBaseSink*>(gobj()), (GstClockTime)(time), NULL));
+}
+
+FlowReturn BaseSink::wait_eos(ClockTime time)
+{
+  return (FlowReturn)(gst_base_sink_wait_eos(const_cast<GstBaseSink*>(gobj()), (GstClockTime)(time), NULL));
+}
+
+} // namespace Gst

Modified: gstreamermm/trunk/gstreamer/src/basesink.hg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/basesink.hg	(original)
+++ gstreamermm/trunk/gstreamer/src/basesink.hg	Tue Jan 20 02:01:48 2009
@@ -137,24 +137,67 @@
   _CLASS_GOBJECT(BaseSink, GstBaseSink, GST_BASE_SINK, Element, GstElement)
 
 public:
-  _WRAP_METHOD(bool query_latency(bool& live, bool& upstream_live, ClockTime& min_latency, ClockTime& max_latency), gst_base_sink_query_latency)
-  _WRAP_METHOD(ClockTime get_latency(), gst_base_sink_get_latency)
+  _WRAP_METHOD(bool query_latency(bool& live, bool& upstream_live, ClockTime& min_latency, ClockTime& max_latency) const, gst_base_sink_query_latency)
+  _WRAP_METHOD(ClockTime get_latency() const, gst_base_sink_get_latency)
   _WRAP_METHOD(FlowReturn wait_preroll(), gst_base_sink_wait_preroll)
   _WRAP_METHOD(ClockReturn wait_clock(ClockTime time, ClockTimeDiff& jitter), gst_base_sink_wait_clock)
+
+  /** This function will block until time is reached.  It is usually called by
+   * subclasses that use their own internal synchronisation.
+   *
+   * If time is not valid, no sycnhronisation is done and Gst::CLOCK_BADTIME is
+   * returned. Likewise, if synchronisation is disabled in the element or there
+   * is no clock, no synchronisation is done and Gst::CLOCK_BADTIME is
+   * returned.
+   *
+   * This function should only be called with the PREROLL_LOCK held, like when
+   * receiving an EOS event in the event vmethod or when receiving a buffer in
+   * the render vmethod.
+   *
+   * The time argument should be the running_time of when this method should
+   * return and is not adjusted with any latency or offset configured in the
+   * sink.
+   *
+   * Since 0.10.20.
+   *
+   * @param time The running_time to be reached.
+   * @return Gst::ClockReturn.
+   */
+  ClockReturn wait_clock(ClockTime time);
+
   _WRAP_METHOD(FlowReturn wait_eos(ClockTime time, ClockTimeDiff& jitter), gst_base_sink_wait_eos)
+
+  /** This function will block until time is reached.  It is usually called by
+   * subclasses that use their own internal synchronisation but want to let the
+   * EOS be handled by the base class.
+   *
+   * This function should only be called with the PREROLL_LOCK held, like when
+   * receiving an EOS event in the event vmethod.
+   *
+   * The time argument should be the running_time of when the EOS should happen
+   * and will be adjusted with any latency and offset configured in the sink.
+   * 
+   * Since 0.10.15.
+   * 
+   * @param time The running time to be reached.
+   * @return Gst::FlowReturn.
+   */
+   FlowReturn wait_eos(ClockTime time);
+
   _WRAP_METHOD(void set_sync(bool sync), gst_base_sink_set_sync)
-  _WRAP_METHOD(bool get_sync(), gst_base_sink_get_sync)
+  _WRAP_METHOD(bool get_sync() const, gst_base_sink_get_sync)
   _WRAP_METHOD(void set_max_lateness(gint64 max_lateness), gst_base_sink_set_max_lateness)
-  _WRAP_METHOD(gint64 get_max_lateness(), gst_base_sink_get_max_lateness)
+  _WRAP_METHOD(gint64 get_max_lateness() const, gst_base_sink_get_max_lateness)
   _WRAP_METHOD(void set_qos_enabled(bool enabled), gst_base_sink_set_qos_enabled)
-  _WRAP_METHOD(bool is_qos_enabled(), gst_base_sink_is_qos_enabled)
+  _WRAP_METHOD(bool is_qos_enabled() const, gst_base_sink_is_qos_enabled)
   _WRAP_METHOD(void set_async_enabled(bool enabled), gst_base_sink_set_async_enabled) 
-  _WRAP_METHOD(bool is_async_enabled(), gst_base_sink_is_async_enabled)
+  _WRAP_METHOD(bool is_async_enabled() const, gst_base_sink_is_async_enabled)
   _WRAP_METHOD(void set_ts_offset(ClockTimeDiff offset), gst_base_sink_set_ts_offset)
-  _WRAP_METHOD(ClockTimeDiff get_ts_offset(), gst_base_sink_get_ts_offset)
+  _WRAP_METHOD(ClockTimeDiff get_ts_offset() const, gst_base_sink_get_ts_offset)
   _WRAP_METHOD(void set_render_delay(ClockTime delay), gst_base_sink_set_render_delay)
-  _WRAP_METHOD(ClockTime get_render_delay(), gst_base_sink_get_render_delay)
+  _WRAP_METHOD(ClockTime get_render_delay() const, gst_base_sink_get_render_delay)
   _WRAP_METHOD(Glib::RefPtr<Gst::Buffer> get_last_buffer(), gst_base_sink_get_last_buffer)
+  _WRAP_METHOD(Glib::RefPtr<const Gst::Buffer> get_last_buffer() const, gst_base_sink_get_last_buffer, constversion)
 
   /** Gets the sink Gst::Pad object of the element.
    */
@@ -179,7 +222,7 @@
 #m4 _CONVERSION(`Glib::RefPtr<Gst::Caps>', `GstCaps*', `($3)->gobj()')
   /** Called to get sink pad caps from the subclass.
    */
-  _WRAP_VFUNC(Glib::RefPtr<Gst::Caps> get_caps(), "get_caps")
+  _WRAP_VFUNC(Glib::RefPtr<Gst::Caps> get_caps() const, "get_caps")
 
 #m4 _CONVERSION(`GstCaps*', `const Glib::RefPtr<Gst::Caps>&', `Glib::wrap($3, true)')
   ///** Notify subclass of changed caps.
@@ -194,7 +237,7 @@
   /** Called to get the start and end times for synchronising the passed buffer
    * to the clock.
    */
-  _WRAP_VFUNC(void get_times(const Glib::RefPtr<Gst::Buffer>& buffer, ClockTime& start, ClockTime& end), "get_times")
+  _WRAP_VFUNC(void get_times(const Glib::RefPtr<Gst::Buffer>& buffer, ClockTime& start, ClockTime& end) const, "get_times")
 
   ///** Start processing. Ideal for opening resources in the subclass.
    //*/

Modified: gstreamermm/trunk/gstreamer/src/basesrc.hg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/basesrc.hg	(original)
+++ gstreamermm/trunk/gstreamer/src/basesrc.hg	Tue Jan 20 02:01:48 2009
@@ -147,11 +147,11 @@
 
 public:
   _WRAP_METHOD(FlowReturn wait_playing(), gst_base_src_wait_playing)
-  _WRAP_METHOD(bool is_live(), gst_base_src_is_live)
+  _WRAP_METHOD(bool is_live() const, gst_base_src_is_live)
   _WRAP_METHOD(void set_live(bool live), gst_base_src_set_live)
   _WRAP_METHOD(void set_format(Format format), gst_base_src_set_format)
-  _WRAP_METHOD(bool query_latency(bool& live, ClockTime& min_latency, ClockTime& max_latency), gst_base_src_query_latency)
-  _WRAP_METHOD(bool get_do_timestamp(), gst_base_src_get_do_timestamp)
+  _WRAP_METHOD(bool query_latency(bool& live, ClockTime& min_latency, ClockTime& max_latency) const, gst_base_src_query_latency)
+  _WRAP_METHOD(bool get_do_timestamp() const, gst_base_src_get_do_timestamp)
   _WRAP_METHOD(void set_do_timestamp(bool timestamp), gst_base_src_set_do_timestamp)
 
   /** Gets the source Gst::Pad object of the element.
@@ -174,7 +174,7 @@
 #m4 _CONVERSION(`Glib::RefPtr<Gst::Caps>', `GstCaps*', `($3)->gobj()')
   /** Called to get the caps to report.
    */
-  _WRAP_VFUNC(Glib::RefPtr<Gst::Caps> get_caps(), "get_caps")
+  _WRAP_VFUNC(Glib::RefPtr<Gst::Caps> get_caps() const, "get_caps")
 
 #m4 _CONVERSION(`GstCaps*', `const Glib::RefPtr<Gst::Caps>&', `Glib::wrap($3, true)')
   ///** Notify subclass of changed output caps.
@@ -203,17 +203,17 @@
   /** Given a buffer, return the start and stop time when it should be pushed
    * out. The base class will sync on the clock using these times.
    */
-  _WRAP_VFUNC(void get_times(const Glib::RefPtr<Gst::Buffer>& buffer, ClockTime& start, ClockTime& end), "get_times")
+  _WRAP_VFUNC(void get_times(const Glib::RefPtr<Gst::Buffer>& buffer, ClockTime& start, ClockTime& end) const, "get_times")
 
 #m4 _CONVERSION(`guint64&', `guint64*', `&($3)')
 #m4 _CONVERSION(`guint64*', `guint64&', `*($3)')
   ///** Return the total size of the resource, in the configured format.
    //*/
-  //_WRAP_VFUNC(bool get_size(guint64& size), "get_size")
+  //_WRAP_VFUNC(bool get_size(guint64& size) const, "get_size")
 
   ///** Check if the source can seek.
    //*/
-  //_WRAP_VFUNC(bool is_seekable(), "is_seekable")
+  //_WRAP_VFUNC(bool is_seekable() const, "is_seekable")
 
   ///** Unlock any pending access to the resource. Subclasses should unblock any
    //* blocked function ASAP.

Modified: gstreamermm/trunk/gstreamer/src/basetransform.hg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/basetransform.hg	(original)
+++ gstreamermm/trunk/gstreamer/src/basetransform.hg	Tue Jan 20 02:01:48 2009
@@ -143,11 +143,11 @@
   _CLASS_GOBJECT(BaseTransform, GstBaseTransform, GST_BASE_TRANSFORM, Element, GstElement)
 
 public:
-  _WRAP_METHOD(bool is_passthrough(), gst_base_transform_is_passthrough)
+  _WRAP_METHOD(bool is_passthrough() const, gst_base_transform_is_passthrough)
   _WRAP_METHOD(void set_passthrough(bool passthrough), gst_base_transform_set_passthrough)
-  _WRAP_METHOD(bool is_in_place(), gst_base_transform_is_in_place)
+  _WRAP_METHOD(bool is_in_place() const, gst_base_transform_is_in_place)
   _WRAP_METHOD(void set_in_place(bool in_place), gst_base_transform_set_in_place)
-  _WRAP_METHOD(bool is_qos_enabled(), gst_base_transform_is_qos_enabled)
+  _WRAP_METHOD(bool is_qos_enabled() const, gst_base_transform_is_qos_enabled)
   _WRAP_METHOD(void set_qos_enabled(bool enabled), gst_base_transform_set_qos_enabled)
   _WRAP_METHOD(void update_qos(double proportion, ClockTimeDiff diff, ClockTime timestamp), gst_base_transform_update_qos)
   _WRAP_METHOD(void set_gap_aware(bool gap_aware), gst_base_transform_set_gap_aware)
@@ -196,12 +196,12 @@
    //* the given other caps. The default implementation uses
    //* get_unit_size_vfunc() and keeps the number of units the same.
    //*/
-  //_WRAP_VFUNC(bool transform_size(PadDirection direction, const Glib::RefPtr<Gst::Caps>& caps, guint size, const Glib::RefPtr<Gst::Caps>& othercaps, guint* othersize), "transform_size")
+  //_WRAP_VFUNC(bool transform_size(PadDirection direction, const Glib::RefPtr<Gst::Caps>& caps, guint size, const Glib::RefPtr<Gst::Caps>& othercaps, guint& othersize), "transform_size")
 
   ///** Required if the transform is not in-place. Get the size in bytes of one
    //* unit for the given caps.
    //*/
-  //_WRAP_VFUNC(bool get_unit_size(const Glib::RefPtr<Gst::Caps>& caps, guint* size), "get_unit_size")
+  //_WRAP_VFUNC(bool get_unit_size(const Glib::RefPtr<Gst::Caps>& caps, guint& size) const, "get_unit_size")
 
   ///** Allows the subclass to be notified of the actual caps set.
    //*/

Modified: gstreamermm/trunk/gstreamer/src/bin.hg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/bin.hg	(original)
+++ gstreamermm/trunk/gstreamer/src/bin.hg	Tue Jan 20 02:01:48 2009
@@ -187,24 +187,30 @@
   //but get_element() and get_element_recurse_up() seem different enough to be separate.
   //One recurses down and the other recurses up, so it's not just additional behaviour. 
   _WRAP_METHOD(Glib::RefPtr<Gst::Element> get_element(const Glib::ustring& name), gst_bin_get_by_name)
-  _WRAP_METHOD(Glib::RefPtr<const Gst::Element> get_element(const Glib::ustring& name) const, gst_bin_get_by_name)
+  _WRAP_METHOD(Glib::RefPtr<const Gst::Element> get_element(const Glib::ustring& name) const, gst_bin_get_by_name, constversion)
 
   _WRAP_METHOD(Glib::RefPtr<Gst::Element> get_element_recurse_up(const Glib::ustring& name), gst_bin_get_by_name_recurse_up)
-  _WRAP_METHOD(Glib::RefPtr<const Gst::Element> get_element_recurse_up(const Glib::ustring& name) const, gst_bin_get_by_name_recurse_up)
+  _WRAP_METHOD(Glib::RefPtr<const Gst::Element> get_element_recurse_up(const Glib::ustring& name) const, gst_bin_get_by_name_recurse_up, constversion)
  
   _WRAP_METHOD(Glib::RefPtr<Gst::Element> get_element(GType interface), gst_bin_get_by_interface)
-  _WRAP_METHOD(Glib::RefPtr<const Gst::Element> get_element(GType interface) const, gst_bin_get_by_interface)
+  _WRAP_METHOD(Glib::RefPtr<const Gst::Element> get_element(GType interface) const, gst_bin_get_by_interface, constversion)
 
   _WRAP_METHOD(Glib::RefPtr<Gst::Pad> find_unlinked_pad(PadDirection dir), gst_bin_find_unlinked_pad)
-  _WRAP_METHOD(Glib::RefPtr<const Gst::Pad> find_unlinked_pad(PadDirection dir) const, gst_bin_find_unlinked_pad)
+  _WRAP_METHOD(Glib::RefPtr<const Gst::Pad> find_unlinked_pad(PadDirection dir) const, gst_bin_find_unlinked_pad, constversion)
   _IGNORE(gst_bin_find_unconnected_pad)
 
   _WRAP_METHOD(Gst::Iterator<Gst::Element> iterate_elements(), gst_bin_iterate_elements)
+  _WRAP_METHOD(Gst::Iterator<const Gst::Element> iterate_elements() const, gst_bin_iterate_elements)
   _WRAP_METHOD(Gst::Iterator<Gst::Element> iterate_recurse(), gst_bin_iterate_recurse)
+  _WRAP_METHOD(Gst::Iterator<const Gst::Element> iterate_recurse() const, gst_bin_iterate_recurse)
   _WRAP_METHOD(Gst::Iterator<Gst::Element> iterate_sorted(), gst_bin_iterate_sorted)
+  _WRAP_METHOD(Gst::Iterator<const Gst::Element> iterate_sorted() const, gst_bin_iterate_sorted)
   _WRAP_METHOD(Gst::Iterator<Gst::Element> iterate_sources(), gst_bin_iterate_sources)
+  _WRAP_METHOD(Gst::Iterator<const Gst::Element> iterate_sources() const, gst_bin_iterate_sources)
   _WRAP_METHOD(Gst::Iterator<Gst::Element> iterate_sinks(), gst_bin_iterate_sinks)
+  _WRAP_METHOD(Gst::Iterator<const Gst::Element> iterate_sinks() const, gst_bin_iterate_sinks)
   _WRAP_METHOD(Gst::Iterator<Gst::Element> iterate_by_interface(GType iface), gst_bin_iterate_all_by_interface)
+  _WRAP_METHOD(Gst::Iterator<const Gst::Element> iterate_by_interface(GType iface) const, gst_bin_iterate_all_by_interface)
 
 #m4 _CONVERSION(`GList*',`Glib::ListHandle< Glib::RefPtr<Gst::Element> >',`$2($3, Glib::OWNERSHIP_SHALLOW)')
   /** Gets the bin's list of children.

Modified: gstreamermm/trunk/gstreamer/src/buffer.hg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/buffer.hg	(original)
+++ gstreamermm/trunk/gstreamer/src/buffer.hg	Tue Jan 20 02:01:48 2009
@@ -73,10 +73,10 @@
   _WRAP_METHOD(Glib::RefPtr<Gst::Buffer> make_metadata_writable() const, gst_buffer_make_metadata_writable)
 
   _WRAP_METHOD(Glib::RefPtr<Gst::Caps> get_caps(), gst_buffer_get_caps)
-  _WRAP_METHOD(Glib::RefPtr<const Gst::Caps > get_caps() const, gst_buffer_get_caps, constversion)
+  _WRAP_METHOD(Glib::RefPtr<const Gst::Caps> get_caps() const, gst_buffer_get_caps, constversion)
   _WRAP_METHOD(void set_caps(const Glib::RefPtr<Gst::Caps>& caps), gst_buffer_set_caps)
   _WRAP_METHOD(Glib::RefPtr<Gst::Buffer> create_sub(const guint& offset, const guint& size), gst_buffer_create_sub)
-  _WRAP_METHOD(Glib::RefPtr<const Gst::Buffer > create_sub(const guint& offset, const guint& size) const, gst_buffer_create_sub, constversion)
+  _WRAP_METHOD(Glib::RefPtr<const Gst::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 Gst::Buffer>& other_buffer) const, gst_buffer_is_span_fast)
 
   //This is const because it always returns a new buffer:

Modified: gstreamermm/trunk/gstreamer/src/bus.hg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/bus.hg	(original)
+++ gstreamermm/trunk/gstreamer/src/bus.hg	Tue Jan 20 02:01:48 2009
@@ -112,15 +112,12 @@
 
   _WRAP_METHOD(bool post(const Glib::RefPtr<Gst::Message>& message), gst_bus_post)
   _WRAP_METHOD(bool have_pending() const, gst_bus_have_pending)
-
   _WRAP_METHOD(Glib::RefPtr<Gst::Message> peek(), gst_bus_peek)
   _WRAP_METHOD(Glib::RefPtr<const Gst::Message> peek() const, gst_bus_peek)
-
   _WRAP_METHOD(Glib::RefPtr<Gst::Message> pop(), gst_bus_pop)
   _WRAP_METHOD(Glib::RefPtr<Gst::Message> pop(MessageType message_type), gst_bus_pop_filtered)
   _WRAP_METHOD(Glib::RefPtr<Gst::Message> pop(ClockTime timeout), gst_bus_timed_pop)
   _WRAP_METHOD(Glib::RefPtr<Gst::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.

Modified: gstreamermm/trunk/gstreamer/src/caps.ccg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/caps.ccg	(original)
+++ gstreamermm/trunk/gstreamer/src/caps.ccg	Tue Jan 20 02:01:48 2009
@@ -63,14 +63,14 @@
   gst_caps_append_structure(gobj(), copy);
 }
 
-void Caps::merge_structure(const Structure& structure)
+void Caps::merge_structure(Structure& structure)
 {
   //We take a copy because gst_caps_append_structure() wants to take ownership:
   GstStructure* copy = gst_structure_copy(structure.gobj());
   gst_caps_merge_structure(gobj(), copy);
 }
 
-Structure Caps::get_structure(guint idx) const
+const Structure Caps::get_structure(guint idx) const
 {
   GstStructure* structure = gst_caps_get_structure(gobj(), idx);
   if(structure)

Modified: gstreamermm/trunk/gstreamer/src/caps.hg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/caps.hg	(original)
+++ gstreamermm/trunk/gstreamer/src/caps.hg	Tue Jan 20 02:01:48 2009
@@ -107,7 +107,7 @@
    *
    * @param structure The Gst::Structure to merge.
    */
-  void merge_structure(const Structure& structure);
+  void merge_structure(Structure& structure);
   _IGNORE(gst_caps_merge_structure)
 
   /** Finds the structure in caps that has the index @a idx, and returns it.
@@ -115,7 +115,7 @@
    * @param index The index of the structure.
    * @return The Gst::Structure corresponding to index.
    */
-  Structure get_structure(guint idx) const;
+  const Structure get_structure(guint idx) const;
   _IGNORE(gst_caps_get_structure)
 
   _WRAP_METHOD(void remove_structure(guint idx), gst_caps_remove_structure)
@@ -155,16 +155,16 @@
   _WRAP_METHOD(bool is_any() const, gst_caps_is_any)
   _WRAP_METHOD(bool empty() const, gst_caps_is_empty)
   _WRAP_METHOD(bool is_fixed() const, gst_caps_is_fixed)
-  _WRAP_METHOD(bool equals(const Glib::RefPtr<Gst::Caps>& other_caps) const, gst_caps_is_equal)
-  _WRAP_METHOD(bool equals_fixed(const Glib::RefPtr<Gst::Caps>& other_caps) const, gst_caps_is_equal_fixed)
-  _WRAP_METHOD(bool is_always_compatible(const Glib::RefPtr<Gst::Caps>& other_caps) const, gst_caps_is_always_compatible)
-  _WRAP_METHOD(bool is_subset(const Glib::RefPtr<Gst::Caps>& superset_caps) const, gst_caps_is_subset)
+  _WRAP_METHOD(bool equals(const Glib::RefPtr<const Gst::Caps>& other_caps) const, gst_caps_is_equal)
+  _WRAP_METHOD(bool equals_fixed(const Glib::RefPtr<const Gst::Caps>& other_caps) const, gst_caps_is_equal_fixed)
+  _WRAP_METHOD(bool is_always_compatible(const Glib::RefPtr<const Gst::Caps>& other_caps) const, gst_caps_is_always_compatible)
+  _WRAP_METHOD(bool is_subset(const Glib::RefPtr<const Gst::Caps>& superset_caps) const, gst_caps_is_subset)
 
   //This is const (returns a non const) because it always creates a new instance:
-  _WRAP_METHOD(Glib::RefPtr<Gst::Caps> get_intersect(const Glib::RefPtr<Gst::Caps>& other_caps) const, gst_caps_intersect)
+  _WRAP_METHOD(Glib::RefPtr<Gst::Caps> get_intersect(const Glib::RefPtr<const Gst::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<Gst::Caps> get_union(const Glib::RefPtr<Gst::Caps>& other_caps) const, gst_caps_union)
+  _WRAP_METHOD(Glib::RefPtr<Gst::Caps> get_union(const Glib::RefPtr<const Gst::Caps>& other_caps) const, gst_caps_union)
 
   //This is const (returns a non const) because it always creates a new instance:
   _WRAP_METHOD(Glib::RefPtr<Gst::Caps> get_normal() const, gst_caps_normalize)
@@ -182,8 +182,10 @@
 
   _WRAP_METHOD(Glib::ustring to_string() const, gst_caps_to_string)
 
+  //This is const (returns a non const) because it always creates a new instance:
   _WRAP_METHOD(Glib::RefPtr<Gst::Caps> get_difference(const Glib::RefPtr<const Gst::Caps>& subtrahend_caps) const, gst_caps_subtract)
-  _WRAP_METHOD(Glib::RefPtr<Gst::Caps> make_writable(), gst_caps_make_writable)
+
+  _WRAP_METHOD(Glib::RefPtr<Gst::Caps> create_writable(), gst_caps_make_writable)
   _WRAP_METHOD(void truncate(), gst_caps_truncate)
 };
 

Modified: gstreamermm/trunk/gstreamer/src/childproxy.ccg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/childproxy.ccg	(original)
+++ gstreamermm/trunk/gstreamer/src/childproxy.ccg	Tue Jan 20 02:01:48 2009
@@ -28,6 +28,12 @@
   return Glib::wrap(gobj(), true);
 }
 
+Glib::RefPtr<const Gst::ChildProxy> ChildProxy::get_proxy_property(const Glib::ustring& name, Glib::ValueBase& value) const
+{
+  gst_child_proxy_get_property(GST_OBJECT(gobj()), name.c_str(), value.gobj());
+  return Glib::wrap(const_cast<GstChildProxy*>(gobj()), true);
+}
+
 Glib::RefPtr<Gst::ChildProxy> ChildProxy::set_proxy_property(const Glib::ustring& name, const Glib::ValueBase& value)
 {
   gst_child_proxy_set_property(GST_OBJECT(gobj()), name.c_str(), value.gobj());

Modified: gstreamermm/trunk/gstreamer/src/childproxy.hg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/childproxy.hg	(original)
+++ gstreamermm/trunk/gstreamer/src/childproxy.hg	Tue Jan 20 02:01:48 2009
@@ -64,6 +64,15 @@
   Glib::RefPtr<Gst::ChildProxy> get_proxy_property(const Glib::ustring& name, Glib::ValueBase& value);
   _IGNORE(gst_child_proxy_get_property, gst_child_proxy_get, gst_child_proxy_get_valist)
 
+  /** 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 retrieved if
+   * needed.
+   */
+  Glib::RefPtr<const Gst::ChildProxy> get_proxy_property(const Glib::ustring& name, Glib::ValueBase& value) const;
+
+
   /** 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).

Modified: gstreamermm/trunk/gstreamer/src/clock.hg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/clock.hg	(original)
+++ gstreamermm/trunk/gstreamer/src/clock.hg	Tue Jan 20 02:01:48 2009
@@ -230,6 +230,7 @@
   _WRAP_METHOD(bool add_observation(ClockTime slave_time, ClockTime master_time, gdouble* result), gst_clock_add_observation)
   _WRAP_METHOD(bool set_master(const Clock& master_clock), gst_clock_set_master)
   _WRAP_METHOD(Glib::RefPtr<Gst::Clock> get_master(), gst_clock_get_master)
+  _WRAP_METHOD(Glib::RefPtr<const Gst::Clock> get_master() const, gst_clock_get_master, constversion)
   _WRAP_METHOD(ClockTime set_resolution(ClockTime resolution), gst_clock_set_resolution)
   _WRAP_METHOD(ClockTime get_resolution() const, gst_clock_get_resolution)
   _WRAP_METHOD(ClockTime get_time() const, gst_clock_get_time)
@@ -238,7 +239,7 @@
   _WRAP_METHOD(ClockTime get_internal_time() const, gst_clock_get_internal_time)
   _WRAP_METHOD(ClockTime adjust_unlocked(ClockTime internal_time), gst_clock_adjust_unlocked)
   _WRAP_METHOD(ClockTime unadjust_unlocked(ClockTime external_time), gst_clock_unadjust_unlocked)
-  _WRAP_METHOD(void get_calibration(ClockTime& internal, ClockTime& external, ClockTime& rate_num, ClockTime& rate_denom), gst_clock_get_calibration)
+  _WRAP_METHOD(void get_calibration(ClockTime& internal, ClockTime& external, ClockTime& rate_num, ClockTime& rate_denom) const, gst_clock_get_calibration)
   _WRAP_METHOD(void set_calibration(ClockTime internal, ClockTime external, ClockTime rate_num, ClockTime rate_denom), gst_clock_set_calibration)
   
   _WRAP_PROPERTY("stats", bool)
@@ -253,11 +254,11 @@
 
   /** Get the resolution of the clock.
    */
-  _WRAP_VFUNC(ClockTime get_resolution(), "get_resolution")
+  _WRAP_VFUNC(ClockTime get_resolution() const, "get_resolution")
 
   /** Get the internal unadjusted time of the clock.
    */
-  _WRAP_VFUNC(ClockTime get_internal_time(), "get_internal_time")
+  _WRAP_VFUNC(ClockTime get_internal_time() const, "get_internal_time")
 
   /** Perform an asynchronous wait for the given Gst::ClockID.
    */

Modified: gstreamermm/trunk/gstreamer/src/colorbalance.hg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/colorbalance.hg	(original)
+++ gstreamermm/trunk/gstreamer/src/colorbalance.hg	Tue Jan 20 02:01:48 2009
@@ -42,7 +42,10 @@
 #m4 _CONVERSION(`const GList*', `Glib::ListHandle< Glib::RefPtr<ColorBalanceChannel> >', `$2(const_cast<GList*>($3), Glib::OWNERSHIP_NONE)')
   _WRAP_METHOD(Glib::ListHandle< Glib::RefPtr<ColorBalanceChannel> > list_channels(), gst_color_balance_list_channels)
 
-  _WRAP_METHOD(int get_value(const Glib::RefPtr<ColorBalanceChannel>& channel), gst_color_balance_get_value)
+#m4 _CONVERSION(`const GList*', `Glib::ListHandle< Glib::RefPtr<const ColorBalanceChannel> >', `$2(const_cast<GList*>($3), Glib::OWNERSHIP_NONE)')
+  _WRAP_METHOD(Glib::ListHandle< Glib::RefPtr<const ColorBalanceChannel> > list_channels() const, gst_color_balance_list_channels)
+
+  _WRAP_METHOD(int get_value(const Glib::RefPtr<const ColorBalanceChannel>& channel) const, gst_color_balance_get_value)
   _WRAP_METHOD(void set_value(const Glib::RefPtr<ColorBalanceChannel>& channel, int value), gst_color_balance_set_value)
   _WRAP_METHOD(void value_changed(const Glib::RefPtr<ColorBalanceChannel>& channel, int value), gst_color_balance_value_changed)
 
@@ -61,9 +64,10 @@
    */
   _WRAP_VFUNC(void set_value(const Glib::RefPtr<ColorBalanceChannel>& channel, int value), "set_value")
 
+#m4 _CONVERSION(`GstColorBalanceChannel*', `const Glib::RefPtr<const ColorBalanceChannel>&', `Glib::wrap($3, true)')
   /** Gets the value of a Gst::ColorBalanceChannel of the Gst::ColorBalance.
    */
-  _WRAP_VFUNC(int get_value(const Glib::RefPtr<ColorBalanceChannel>& channel), "get_value")
+  _WRAP_VFUNC(int get_value(const Glib::RefPtr<const ColorBalanceChannel>& channel) const, "get_value")
 };
 
 } // namespace Gst

Modified: gstreamermm/trunk/gstreamer/src/element.ccg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/element.ccg	(original)
+++ gstreamermm/trunk/gstreamer/src/element.ccg	Tue Jan 20 02:01:48 2009
@@ -69,18 +69,6 @@
     throw std::runtime_error("failed to link: " + get_name() + "->" + dest->get_name());
 }
 
-Glib::RefPtr<Gst::Pad> Element::create_compatible_pad(const Glib::RefPtr<Gst::Pad>& pad, const Glib::RefPtr<Gst::Caps>& caps)
-{
-  GstPad* c_pad = gst_element_get_compatible_pad(gobj(), pad->gobj(), caps->gobj());
-  return Glib::wrap(c_pad); //gst_element_get_compatible_pad gives us a reference.
-}
-
-Glib::RefPtr<Gst::PadTemplate> Element::get_compatible_pad_template(const Glib::RefPtr<Gst::PadTemplate>& padtemplate)
-{
-  GstPadTemplate* c_padtemplate = gst_element_get_compatible_pad_template(gobj(), padtemplate->gobj());
-  return Glib::wrap(c_padtemplate, true /* take reference */); //gst_element_get_compatible_pad_template() does not give us a reference.
-}
-
 bool Element::query_position(Format& format) const
 {
   return gst_element_query_position(const_cast<GstElement*>(gobj()), reinterpret_cast<GstFormat*>(&format), NULL);

Modified: gstreamermm/trunk/gstreamer/src/element.hg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/element.hg	(original)
+++ gstreamermm/trunk/gstreamer/src/element.hg	Tue Jan 20 02:01:48 2009
@@ -163,25 +163,26 @@
   _WRAP_METHOD(bool add_pad(const Glib::RefPtr<Gst::Pad>& pad), gst_element_add_pad)
   _WRAP_METHOD(void create_all_pads(), gst_element_create_all_pads)
 
-  //TODO: Can this be const?
-  Glib::RefPtr<Gst::Pad> create_compatible_pad(const Glib::RefPtr<Gst::Pad>& pad, const Glib::RefPtr<Gst::Caps>& caps);
-  _IGNORE(gst_element_get_compatible_pad)
-
-  //TODO: Can this be const?
-  Glib::RefPtr<Gst::PadTemplate> get_compatible_pad_template(const Glib::RefPtr<Gst::PadTemplate>& padtemplate);
-  _IGNORE(gst_element_get_compatible_pad_template)
+  _WRAP_METHOD(Glib::RefPtr<Gst::Pad> create_compatible_pad(const Glib::RefPtr<const Gst::Pad>& pad, const Glib::RefPtr<const Gst::Caps>& caps), gst_element_get_compatible_pad)
+  _WRAP_METHOD(Glib::RefPtr<Gst::PadTemplate> get_compatible_pad_template(const Glib::RefPtr<const Gst::PadTemplate>& padtemplate), gst_element_get_compatible_pad_template, refreturn)
+  _WRAP_METHOD(Glib::RefPtr<const Gst::PadTemplate> get_compatible_pad_template(const Glib::RefPtr<const Gst::PadTemplate>& padtemplate) const, gst_element_get_compatible_pad_template, refreturn, constversion)
 
   //TODO: The documentation says "The pad should be released with gst_element_release_request_pad().", which is odd. murrayc
   _WRAP_METHOD(Glib::RefPtr<Gst::Pad> get_request_pad(const Glib::ustring& name), gst_element_get_request_pad)
+
   _WRAP_METHOD(Glib::RefPtr<Gst::Pad> get_static_pad(const Glib::ustring& name), gst_element_get_static_pad)
+  _WRAP_METHOD(Glib::RefPtr<const Gst::Pad> get_static_pad(const Glib::ustring& name) const, gst_element_get_static_pad, constversion)
   _IGNORE(gst_element_get_pad)
 
   _WRAP_METHOD(void no_more_pads(), gst_element_no_more_pads)
   _WRAP_METHOD(void release_request_pad(const Glib::RefPtr<Gst::Pad>& pad), gst_element_release_request_pad)
   _WRAP_METHOD(bool remove_pad(const Glib::RefPtr<Gst::Pad>& pad), gst_element_remove_pad)
   _WRAP_METHOD(Gst::Iterator<Gst::Pad> iterate_pads(), gst_element_iterate_pads)
+  _WRAP_METHOD(Gst::Iterator<const Gst::Pad> iterate_pads() const, gst_element_iterate_pads)
   _WRAP_METHOD(Gst::Iterator<Gst::Pad> iterate_sink_pads(), gst_element_iterate_sink_pads)
+  _WRAP_METHOD(Gst::Iterator<const Gst::Pad> iterate_sink_pads() const, gst_element_iterate_sink_pads)
   _WRAP_METHOD(Gst::Iterator<Gst::Pad> iterate_src_pads(), gst_element_iterate_src_pads)
+  _WRAP_METHOD(Gst::Iterator<const Gst::Pad> iterate_src_pads() const, gst_element_iterate_src_pads)
   _WRAP_METHOD(void unlink(const Glib::RefPtr<Gst::Element>& other_element), gst_element_unlink)
   _IGNORE(gst_element_unlink_many)
 
@@ -227,8 +228,8 @@
   _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(const Gst::TagList& list), gst_element_found_tags)
-  _WRAP_METHOD(void found_tags_for_pad(const Glib::RefPtr<Gst::Pad>& pad, const Gst::TagList& list), gst_element_found_tags_for_pad)
+  _WRAP_METHOD(void found_tags(Gst::TagList& list), gst_element_found_tags)
+  _WRAP_METHOD(void found_tags_for_pad(const Glib::RefPtr<Gst::Pad>& pad, Gst::TagList& list), gst_element_found_tags_for_pad)
 
   //TODO: Change the parameter order?
   _WRAP_METHOD(void post_message(MessageType message_type, const Glib::QueryQuark& domain, int code, const Glib::ustring& message, const Glib::ustring& debug, const Glib::ustring& filename, const Glib::ustring& function_name, int line_number), gst_element_message_full)
@@ -237,7 +238,7 @@
 #m4 _CONVERSION(`const GstQueryType*',`Glib::ArrayHandle<QueryType>',`Glib::ArrayHandle<QueryType>((QueryType*)($3), Glib::OWNERSHIP_SHALLOW)')
   _WRAP_METHOD(Glib::ArrayHandle<QueryType> get_query_types() const, gst_element_get_query_types)
 
-  _WRAP_METHOD(bool query(const Glib::RefPtr<Gst::Query>& query), gst_element_query)
+  _WRAP_METHOD(bool query(const Glib::RefPtr<Gst::Query>& query) const, gst_element_query)
   _WRAP_METHOD(bool query_convert(Format src_format, gint64 src_value, Format& dst_format, gint64& dst_value) const, gst_element_query_convert)
   _WRAP_METHOD(bool query_position(Format& format, gint64& position) const, gst_element_query_position)
 
@@ -274,7 +275,7 @@
   bool send_event(const Glib::RefPtr<Gst::Event>& event);
   _IGNORE(gst_element_send_event)
 
-  _WRAP_METHOD(bool implements_interface(GType iface_type), gst_element_implements_interface)
+  _WRAP_METHOD(bool implements_interface(GType iface_type) const, gst_element_implements_interface)
 
   /** This signals that the element will not generate more dynamic pads.
    */
@@ -290,9 +291,10 @@
    */
   _WRAP_SIGNAL(void pad_removed(const Glib::RefPtr<Gst::Pad>& old_pad), "pad-removed")
 
+#m4 _CONVERSION(`GstPadTemplate*', `const Glib::RefPtr<const Gst::PadTemplate>&', `Glib::wrap(($3), true)')
   /** Called when a new pad is requested.
    */
-  _WRAP_VFUNC(Glib::RefPtr<Gst::Pad> request_new_pad(const Glib::RefPtr<Gst::PadTemplate>& templ, const Glib::ustring& name), "request_new_pad")
+  _WRAP_VFUNC(Glib::RefPtr<Gst::Pad> request_new_pad(const Glib::RefPtr<const Gst::PadTemplate>& templ, const Glib::ustring& name), "request_new_pad")
 
   /** Called when a request pad is to be released.
    */
@@ -300,7 +302,7 @@
 
   /** Get the state of the element.
    */
-  _WRAP_VFUNC(StateChangeReturn get_state(State& state, State& pending, ClockTime timeout), "get_state")
+  _WRAP_VFUNC(StateChangeReturn get_state(State& state, State& pending, ClockTime timeout) const, "get_state")
 
   /** Set a new state on the element.
    */
@@ -340,7 +342,7 @@
 
   /** Get a Gst::Index on the element.
    */
-  _WRAP_VFUNC(Glib::RefPtr<Gst::Index> get_index(), "get_index")
+  _WRAP_VFUNC(Glib::RefPtr<Gst::Index> get_index() const, "get_index")
 
   /** Set the Gst::Index of an element.
    */
@@ -358,11 +360,11 @@
 //#m4 _CONVERSION(`Glib::ArrayHandle<QueryType>',`const GstQueryType*',`(GstQueryType*)(($3).data())')
   // /** Get the supported Gst::QueryType of this element.
   //  */
-  // _WRAP_VFUNC(Glib::ArrayHandle<QueryType> get_query_types(), "get_query_types")
+  // _WRAP_VFUNC(Glib::ArrayHandle<QueryType> get_query_types() const, "get_query_types")
 
   /** Perform a Gst::Query on the element.
    */
-  _WRAP_VFUNC(bool query(const Glib::RefPtr<Gst::Query>& query), "query")
+  _WRAP_VFUNC(bool query(const Glib::RefPtr<Gst::Query>& query) const, "query")
 };
 
 /** Templated class used for casting Gst::Element to interfaces that its

Modified: gstreamermm/trunk/gstreamer/src/elementfactory.hg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/elementfactory.hg	(original)
+++ gstreamermm/trunk/gstreamer/src/elementfactory.hg	Tue Jan 20 02:01:48 2009
@@ -108,8 +108,11 @@
   _WRAP_METHOD(bool can_sink_caps(const Glib::RefPtr<const Gst::Caps>& caps) const, gst_element_factory_can_sink_caps)
   _WRAP_METHOD(bool can_src_caps(const Glib::RefPtr<const Gst::Caps>& caps) const, gst_element_factory_can_src_caps)
 
+#m4 _CONVERSION(`const GList*', `Glib::ListHandle< Glib::RefPtr<Gst::PadTemplate> >', `$2(const_cast<GList*>($3), Glib::OWNERSHIP_NONE)')
+  _WRAP_METHOD(Glib::ListHandle< Glib::RefPtr<Gst::PadTemplate> > get_static_pad_templates(), gst_element_factory_get_static_pad_templates)
+
 #m4 _CONVERSION(`const GList*', `Glib::ListHandle< Glib::RefPtr<const Gst::PadTemplate> >', `$2(const_cast<GList*>($3), Glib::OWNERSHIP_NONE)')
-  _WRAP_METHOD(Glib::ListHandle< Glib::RefPtr<const Gst::PadTemplate> > get_static_pad_templates(), gst_element_factory_get_static_pad_templates)
+  _WRAP_METHOD(Glib::ListHandle< Glib::RefPtr<const Gst::PadTemplate> > get_static_pad_templates() const, gst_element_factory_get_static_pad_templates)
 };
 
 } // namespace Gst

Modified: gstreamermm/trunk/gstreamer/src/error.hg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/error.hg	(original)
+++ gstreamermm/trunk/gstreamer/src/error.hg	Tue Jan 20 02:01:48 2009
@@ -272,4 +272,3 @@
 Glib::QueryQuark get_stream_error_quark();
 
 } // namespace Gst
-

Modified: gstreamermm/trunk/gstreamer/src/event.ccg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/event.ccg	(original)
+++ gstreamermm/trunk/gstreamer/src/event.ccg	Tue Jan 20 02:01:48 2009
@@ -117,17 +117,17 @@
   return Gst::Event::wrap(event, false);
 }
 
-void EventNewSegment::parse(bool& update, double& rate, Format& format, gint64& start, gint64& stop, gint64& position)
+void EventNewSegment::parse(bool& update, double& rate, Format& format, gint64& start, gint64& stop, gint64& position) const
 {
   gboolean result;
-  gst_event_parse_new_segment(gobj(), &result, &rate, (GstFormat*)&format, &start, &stop, &position);
+  gst_event_parse_new_segment(const_cast<GstEvent*>(gobj()), &result, &rate, (GstFormat*)&format, &start, &stop, &position);
   update = result;
 }
 
-void EventNewSegment::parse(bool& update, double& rate, Format& format, gint64& start, gint64& stop, gint64& position, double& applied_rate)
+void EventNewSegment::parse(bool& update, double& rate, Format& format, gint64& start, gint64& stop, gint64& position, double& applied_rate) const
 {
   gboolean result;
-  gst_event_parse_new_segment_full(gobj(), &result, &rate, &applied_rate, (GstFormat*)&format, &start, &stop, &position);
+  gst_event_parse_new_segment_full(const_cast<GstEvent*>(gobj()), &result, &rate, &applied_rate, (GstFormat*)&format, &start, &stop, &position);
   update = result;
 }
 
@@ -144,10 +144,10 @@
   return Gst::Event::wrap(event, false);
 }
 
-Gst::TagList EventTag::parse()
+Gst::TagList EventTag::parse() const
 {
   GstTagList* gst_taglist = gst_tag_list_new();
-  gst_event_parse_tag(gobj(), &gst_taglist);
+  gst_event_parse_tag(const_cast<GstEvent*>(gobj()), &gst_taglist);
   return Gst::TagList(gst_taglist);
 }
 
@@ -162,10 +162,10 @@
   return Gst::Event::wrap(event, false);
 }
 
-void EventBufferSize::parse(Format& format, gint64& minsize, gint64& maxsize, bool& async)
+void EventBufferSize::parse(Format& format, gint64& minsize, gint64& maxsize, bool& async) const
 {
   gboolean result;
-  gst_event_parse_buffer_size(gobj(), (GstFormat*)&format, &minsize, &maxsize, &result);
+  gst_event_parse_buffer_size(const_cast<GstEvent*>(gobj()), (GstFormat*)&format, &minsize, &maxsize, &result);
   async = result;
 }
 
@@ -180,9 +180,9 @@
   return Gst::Event::wrap(event, false);
 }
 
-void EventQos::parse(double& proportion, ClockTimeDiff& diff, ClockTime& timestamp)
+void EventQos::parse(double& proportion, ClockTimeDiff& diff, ClockTime& timestamp) const
 {
-  gst_event_parse_qos(gobj(), &proportion, &diff, &timestamp);
+  gst_event_parse_qos(const_cast<GstEvent*>(gobj()), &proportion, &diff, &timestamp);
 }
 
 EventSeek::EventSeek(GstEvent* castitem) :
@@ -196,9 +196,9 @@
   return Gst::Event::wrap(event, false);
 }
 
-void EventSeek::parse(double& rate, Format& format, SeekFlags& flags, SeekType& start_type, gint64& start, SeekType& stop_type, gint64& stop)
+void EventSeek::parse(double& rate, Format& format, SeekFlags& flags, SeekType& start_type, gint64& start, SeekType& stop_type, gint64& stop) const
 {
-  gst_event_parse_seek(gobj(), &rate, (GstFormat*)&format, (GstSeekFlags*)&flags, (GstSeekType*)&start_type, &start, (GstSeekType*)&stop_type, &stop);
+  gst_event_parse_seek(const_cast<GstEvent*>(gobj()), &rate, (GstFormat*)&format, (GstSeekFlags*)&flags, (GstSeekType*)&start_type, &start, (GstSeekType*)&stop_type, &stop);
 }
 
 EventNavigation::EventNavigation(GstEvent* castitem) :
@@ -217,9 +217,9 @@
 {
 }
 
-void EventLatency::parse(ClockTime& latency)
+void EventLatency::parse(ClockTime& latency) const
 {
-  gst_event_parse_latency(gobj(), &latency);
+  gst_event_parse_latency(const_cast<GstEvent*>(gobj()), &latency);
 }
 
 Glib::RefPtr<Gst::Event> EventLatency::create(ClockTime time)

Modified: gstreamermm/trunk/gstreamer/src/event.hg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/event.hg	(original)
+++ gstreamermm/trunk/gstreamer/src/event.hg	Tue Jan 20 02:01:48 2009
@@ -135,7 +135,7 @@
   Glib::RefPtr<Gst::Event> copy() const;
 
   _WRAP_METHOD(const Gst::Structure get_structure() const, gst_event_get_structure)
-  _WRAP_METHOD(bool has_name(const Glib::ustring& name), gst_event_has_name)
+  _WRAP_METHOD(bool has_name(const Glib::ustring& name) const, gst_event_has_name)
 
   /** Checks if an event is writable.  If not, a writable copy is made and
    * returned.
@@ -308,7 +308,7 @@
    * @param stop A pointer to store the stop value in.
    * @param position A pointer to store the stream time in.
    */
-  void parse(bool& update, double& rate, Format& format, gint64& start, gint64& stop, gint64& position);
+  void parse(bool& update, double& rate, Format& format, gint64& start, gint64& stop, gint64& position) const;
 
   /** Get the update, rate, format, start, stop, position and applied_rate in
    * the newsegment event. See create() for a full description of the
@@ -324,7 +324,7 @@
    *
    * Since 0.10.6 
    */
-  void parse(bool& update, double& rate, Format& format, gint64& start, gint64& stop, gint64& position, double& applied_rate);
+  void parse(bool& update, double& rate, Format& format, gint64& start, gint64& stop, gint64& position, double& applied_rate) const;
   _IGNORE(gst_event_parse_new_segment, gst_event_parse_new_segment_full)
 };
 
@@ -344,7 +344,7 @@
   /** Parses a tag event and stores the results in the given taglist location.
    * @return Metadata list.
    */
-  Gst::TagList parse();
+  Gst::TagList parse() const;
   _IGNORE(gst_event_parse_tag)
 };
 
@@ -375,7 +375,7 @@
    * @param maxsize A pointer to store the maxsize in.
    * @param async A pointer to store the async-flag in.
    */
-  void parse(Format& format, gint64& minsize, gint64& maxsize, bool& async);
+  void parse(Format& format, gint64& minsize, gint64& maxsize, bool& async) const;
   _IGNORE(gst_event_parse_buffer_size)
 };
 
@@ -432,7 +432,7 @@
    * @param diff A pointer to store the diff in.
    * @param timestamp A pointer to store the timestamp in.
    */
-  void parse(double& proportion, ClockTimeDiff& diff, ClockTime& timestamp);
+  void parse(double& proportion, ClockTimeDiff& diff, ClockTime& timestamp) const;
   _IGNORE(gst_event_parse_qos)
 };
 
@@ -497,7 +497,7 @@
    * position.
    * @param stop Result location for the stop postion expressed in format.
    */
-  void parse(double& rate, Format& format, SeekFlags& flags, SeekType& start_type, gint64& start, SeekType& stop_type, gint64& stop);
+  void parse(double& rate, Format& format, SeekFlags& flags, SeekType& start_type, gint64& start, SeekType& stop_type, gint64& stop) const;
   _IGNORE(gst_event_parse_seek)
 };
 
@@ -541,7 +541,7 @@
    *
    * @param latency A pointer to store the latency in. 
    */
-  void parse(ClockTime& latency);
+  void parse(ClockTime& latency) const;
   _IGNORE(gst_event_parse_latency)
 };
 

Modified: gstreamermm/trunk/gstreamer/src/index.hg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/index.hg	(original)
+++ gstreamermm/trunk/gstreamer/src/index.hg	Tue Jan 20 02:01:48 2009
@@ -42,7 +42,6 @@
   _CLASS_OPAQUE_COPYABLE(IndexEntry, GstIndexEntry, NONE, gst_index_entry_copy, gst_index_entry_free)
 public:
   _WRAP_METHOD(bool assoc_map(Format format, gint64& value) const, gst_index_entry_assoc_map)
-
 };
 
 /** A group of related entries in an index.
@@ -85,7 +84,7 @@
   _WRAP_METHOD(int new_group(), gst_index_new_group)
   _WRAP_METHOD(bool set_group(int group_number), gst_index_set_group)
   _WRAP_METHOD(void set_certainty(IndexCertainty certainty), gst_index_set_certainty)
-  _WRAP_METHOD(IndexCertainty set_certainty() const, gst_index_get_certainty)
+  _WRAP_METHOD(IndexCertainty get_certainty() const, gst_index_get_certainty)
   _WRAP_METHOD(bool get_writer_id(const Glib::RefPtr<Gst::Object>& writer, int& id) const, gst_index_get_writer_id)
   _WRAP_METHOD(Gst::IndexEntry add_format(int id, Format format), gst_index_add_format)
   _WRAP_METHOD(Gst::IndexEntry add_association(int id, AssocFlags flags, int n, const Gst::IndexAssociation& list), gst_index_add_associationv)

Modified: gstreamermm/trunk/gstreamer/src/indexfactory.hg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/indexfactory.hg	(original)
+++ gstreamermm/trunk/gstreamer/src/indexfactory.hg	Tue Jan 20 02:01:48 2009
@@ -52,7 +52,6 @@
 
   _WRAP_METHOD(static Glib::RefPtr<Gst::IndexFactory> find(const Glib::ustring& name), gst_index_factory_find)
   _WRAP_METHOD(Glib::RefPtr<Gst::Index> create_index(), gst_index_factory_create)
-
   _WRAP_METHOD(static Glib::RefPtr<Gst::Index> create_index(const Glib::ustring& factory_name), gst_index_factory_make)
 
   //Destruction occurs in destructor.

Modified: gstreamermm/trunk/tests/test-plugin-signals.cc
==============================================================================
--- gstreamermm/trunk/tests/test-plugin-signals.cc	(original)
+++ gstreamermm/trunk/tests/test-plugin-signals.cc	Tue Jan 20 02:01:48 2009
@@ -83,8 +83,8 @@
   source->property_num_buffers() = 5;
 
   // Enable the fakesink handoff signal emition and connect slot:
-  source->property_signal_handoffs() = true;
-  source->signal_handoff().connect(sigc::ptr_fun(on_handoff));
+  sink->property_signal_handoffs() = true;
+  sink->signal_handoff().connect(sigc::ptr_fun(on_handoff));
 
   // Now set to playing and iterate:
   std::cout << "Setting to PLAYING." << std::endl;

Modified: gstreamermm/trunk/tools/m4/convert_gst.m4
==============================================================================
--- gstreamermm/trunk/tools/m4/convert_gst.m4	(original)
+++ gstreamermm/trunk/tools/m4/convert_gst.m4	Tue Jan 20 02:01:48 2009
@@ -59,7 +59,7 @@
 _CONVERSION(`GstClock*',`Glib::RefPtr<Gst::Clock>',`Glib::wrap($3)')
 _CONVERSION(`GstClock*',`Glib::RefPtr<const Gst::Clock>',`Glib::wrap($3)')
 _CONVERSION(`const Glib::RefPtr<Gst::Clock>&',`GstClock*', `Glib::unwrap($3)')
-_CONVERSION(`const Clock&',`GstClock*',`((GstClock*) (&($3)))')
+_CONVERSION(`const Clock&',`GstClock*',`((GstClock*)(&($3)))')
 _CONVERSION(`Glib::RefPtr<Gst::Clock>',`GstClock*', `Glib::unwrap($3)')
 _CONVERSION(`GstClock*',`const Glib::RefPtr<Gst::Clock>&',`Glib::wrap($3)')
 
@@ -70,6 +70,7 @@
 
 #ColorBalanceChannel
 _CONVERSION(`const Glib::RefPtr<ColorBalanceChannel>&',`GstColorBalanceChannel*',`($3)->gobj()')
+_CONVERSION(`const Glib::RefPtr<const ColorBalanceChannel>&',`GstColorBalanceChannel*',`const_cast<GstColorBalanceChannel*>(($3)->gobj())')
 
 #Element
 _CONVERSION(`Glib::RefPtr<Gst::Element>',`GstElement*', `Glib::unwrap($3)')
@@ -77,10 +78,11 @@
 _CONVERSION(`GstElement*',`Glib::RefPtr<const Gst::Element>',`Glib::wrap($3)')
 _CONVERSION(`const Glib::RefPtr<Gst::Element>&',`GstElement*', `Glib::unwrap($3)')
 _CONVERSION(`const Glib::RefPtr<const Gst::Element>&',`GstElement*', `const_cast<GstElement*>(Glib::unwrap($3))')
-_CONVERSION(`State&',`GstState*',`((GstState*) (&($3)))')
+_CONVERSION(`State&',`GstState*',`((GstState*)(&($3)))')
 
 #ElementFactory
 _CONVERSION(`GstElementFactory*',`Glib::RefPtr<Gst::ElementFactory>',`Glib::wrap($3)')
+_CONVERSION(`GstElementFactory*',`Glib::RefPtr<const Gst::ElementFactory>',`Glib::wrap($3)')
 
 #Event
 _CONVERSION(`const Glib::RefPtr<Gst::Event>&',`GstEvent*', `Gst::unwrap($3)')
@@ -103,7 +105,9 @@
 #
 #Iterator
 _CONVERSION(`GstIterator*',`Gst::Iterator<Gst::Element>',`Gst::Iterator<Gst::Element>::Iterator($3)')
+_CONVERSION(`GstIterator*',`Gst::Iterator<const Gst::Element>',`Gst::Iterator<const Gst::Element>::Iterator($3)')
 _CONVERSION(`GstIterator*',`Gst::Iterator<Gst::Pad>',`Gst::Iterator<Gst::Pad>::Iterator($3)')
+_CONVERSION(`GstIterator*',`Gst::Iterator<const Gst::Pad>',`Gst::Iterator<const Gst::Pad>::Iterator($3)')
 _CONVERSION(`GstIterator*',`Gst::IteratorBasic<const Gst::QueryTypeDefinition>',`Gst::IteratorBasic<const Gst::QueryTypeDefinition>::IteratorBasic($3)')
 
 #Message
@@ -121,11 +125,13 @@
 _CONVERSION(`GstPad*',`Glib::RefPtr<const Gst::Pad>',`Glib::wrap($3)')
 _CONVERSION(`Glib::RefPtr<Gst::Pad>',`GstPad*', `Glib::unwrap($3)')
 _CONVERSION(`const Glib::RefPtr<Gst::Pad>&',`GstPad*', `Glib::unwrap($3)')
+_CONVERSION(`const Glib::RefPtr<const Gst::Pad>&',`GstPad*',`const_cast<GstPad*>(($3)->gobj())')
 
 #PadTemplate
 _CONVERSION(`const Glib::RefPtr<Gst::PadTemplate>&',`GstPadTemplate*', `Glib::unwrap($3)')
 _CONVERSION(`GstPadTemplate*',`Glib::RefPtr<Gst::PadTemplate>', `Glib::wrap($3)')
 _CONVERSION(`GstPadTemplate*',`const Glib::RefPtr<Gst::PadTemplate>&', `Glib::wrap($3)')
+_CONVERSION(`const Glib::RefPtr<const Gst::PadTemplate>&',`GstPadTemplate*',`const_cast<GstPadTemplate*>(($3)->gobj())')
 
 #Plugin
 _CONVERSION(`const Glib::RefPtr<Gst::Plugin>&',`GstPlugin*',`Glib::unwrap($3)')
@@ -150,7 +156,7 @@
 #TagList
 _CONVERSION(`const Gst::TagList&',`const GstTagList*',`(($3).gobj())')
 _CONVERSION(`GstTagList*',`Gst::TagList',`Glib::wrap($3, 0, true)')
-_CONVERSION(`const Gst::TagList&',`GstTagList*',`const_cast<GstTagList*>(($3).gobj())')
+_CONVERSION(`Gst::TagList&',`GstTagList*',`($3).gobj()')
 _CONVERSION(`const GstTagList*',`Gst::TagList',`Glib::wrap(const_cast<GstTagList*>($3), 0, true)')
 _CONVERSION(`Gst::TagList',`GstTagList*',`($3).gobj()')
 
@@ -161,7 +167,7 @@
 
 #Basic General Conversions
 _CONVERSION(`gint64&',`gint64*',`&($3)')
-_CONVERSION(`bool&',`gboolean*',`(($2) &($3))')
+_CONVERSION(`bool&',`gboolean*',`(($2)&($3))')
 _CONVERSION(`const guint&',`guint',`$3')
 _CONVERSION(`const guint32&',`guint32',`$3')
 
@@ -170,7 +176,7 @@
 _CONVERSION(`ClockTimeDiff',`GstClockTimeDiff',`GstClockTimeDiff($3)')
 _CONVERSION(`GstClockTimeDiff',`ClockTimeDiff',`ClockTimeDiff($3)')
 _CONVERSION(`ClockTimeDiff&',`GstClockTimeDiff*',`(GstClockTimeDiff*)(&($3))')
-_CONVERSION(`Format&',`GstFormat*',`(($2) &($3))')
+_CONVERSION(`Format&',`GstFormat*',`(($2)&($3))')
 _CONVERSION(`GstClockTimeDiff*',`ClockTimeDiff&',`(ClockTimeDiff&)(*($3))')
 _CONVERSION(`const GstQueryType*',`const QueryType*',`(QueryType*)($3)')
 _CONVERSION(`GstState*',`State&',`(State&)($3)')



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