[gstreamermm] Audio[Sink, Src], BaseSrc, BaseTransform: Comment out bool vfuncs.



commit 0413c31a86ae0aac5b15a594d3832ca04707dc00
Author: José Alburquerque <jaalburqu svn gnome org>
Date:   Fri Oct 15 15:43:11 2010 -0400

    	Audio[Sink,Src], BaseSrc, BaseTransform: Comment out bool vfuncs.
    
    	* gstreamer/src/audiosink.hg:
    	* gstreamer/src/audiosrc.hg:
    	* gstreamer/src/basesrc.hg:
    	* gstreamer/src/basetransform.hg: Comment out the wrapped boolean
    	virtual functions because in fact they still do cause problems with
    	the execution of applications.  The ogg_player_gtkmm example, for
    	example, does not run correctly with the virtual functions wrapped.
    	These vfuncs will have to be handwritten (at least the ones that cause
    	the problems) to make sure they return true by default.

 ChangeLog                      |   14 ++++++
 gstreamer/src/audiosink.hg     |   23 +++++----
 gstreamer/src/audiosrc.hg      |   22 +++++----
 gstreamer/src/basesrc.hg       |   98 ++++++++++++++++++++++-----------------
 gstreamer/src/basetransform.hg |   76 +++++++++++++++++--------------
 5 files changed, 137 insertions(+), 96 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 833abc4..b70b1e7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,19 @@
 2010-10-15  José Alburquerque  <jaalburqu svn gnome org>
 
+	Audio[Sink,Src], BaseSrc, BaseTransform: Comment out bool vfuncs.
+
+	* gstreamer/src/audiosink.hg:
+	* gstreamer/src/audiosrc.hg:
+	* gstreamer/src/basesrc.hg:
+	* gstreamer/src/basetransform.hg: Comment out the wrapped boolean
+	virtual functions because in fact they still do cause problems with
+	the execution of applications.  The ogg_player_gtkmm example, for
+	example, does not run correctly with the virtual functions wrapped.
+	These vfuncs will have to be handwritten (at least the ones that cause
+	the problems) to make sure they return true by default.
+
+2010-10-15  José Alburquerque  <jaalburqu svn gnome org>
+
 	Tests: Add simple buffer list iterator test.
 
 	* tests/Makefile.am:
diff --git a/gstreamer/src/audiosink.hg b/gstreamer/src/audiosink.hg
index 6718b7c..20257c5 100644
--- a/gstreamer/src/audiosink.hg
+++ b/gstreamer/src/audiosink.hg
@@ -52,22 +52,25 @@ class AudioSink : public Gst::BaseAudioSink
   _CLASS_GOBJECT(AudioSink, GstAudioSink, GST_AUDIO_SINK, Gst::BaseAudioSink, GstBaseAudioSink)
 
 public:
-  /** vfunc to open the device. No configuration needs to be done at this
-   * point. This function is also used to check if the device is available.
-   */
-  _WRAP_VFUNC(bool open(), "open")
+  //TODO: Make sure this bool vfunc does not cause execution problems.
+  ///** vfunc to open the device. No configuration needs to be done at this
+   //* point. This function is also used to check if the device is available.
+   //*/
+  //_WRAP_VFUNC(bool open(), "open")
 
   /** vfunc to prepare the device to operate with the specified parameters.
    */
   virtual bool prepare_vfunc(Gst::RingBufferSpec& spec);
 
-  /** vfunc to undo operations done in prepare.
-   */
-  _WRAP_VFUNC(bool unprepare(), "unprepare")
+  //TODO: Make sure this bool vfunc does not cause execution problems.
+  ///** vfunc to undo operations done in prepare.
+   //*/
+  //_WRAP_VFUNC(bool unprepare(), "unprepare")
 
-  /** vfunc to close the device.
-   */
-  _WRAP_VFUNC(bool close(), "close")
+  //TODO: Make sure this bool vfunc does not cause execution problems.
+  ///** vfunc to close the device.
+   //*/
+  //_WRAP_VFUNC(bool close(), "close")
 
   /** vfunc to write data to the device.
    */
diff --git a/gstreamer/src/audiosrc.hg b/gstreamer/src/audiosrc.hg
index 8bf7ee6..4d16cfb 100644
--- a/gstreamer/src/audiosrc.hg
+++ b/gstreamer/src/audiosrc.hg
@@ -52,21 +52,25 @@ class AudioSrc : public Gst::BaseAudioSrc
   _CLASS_GOBJECT(AudioSrc, GstAudioSrc, GST_AUDIO_SRC, Gst::BaseAudioSrc, GstBaseAudioSrc)
 
 public:
-  /** vfunc to open the device.
-   */
-  _WRAP_VFUNC(bool open(), "open")
+  //TODO: Make sure this bool vfunc does not cause execution problems.
+  ///** vfunc to open the device.
+   //*/
+  //_WRAP_VFUNC(bool open(), "open")
 
+  //TODO: Make sure this bool vfunc does not cause execution problems.
   /** vfunc to configure device with spec.
    */
   virtual bool prepare_vfunc(Gst::RingBufferSpec& spec);
 
-  /** vfunc to undo the configuration.
-   */
-  _WRAP_VFUNC(bool unprepare(), "unprepare")
+  //TODO: Make sure this bool vfunc does not cause execution problems.
+  ///** vfunc to undo the configuration.
+   //*/
+  //_WRAP_VFUNC(bool unprepare(), "unprepare")
 
-  /** vfunc to close the device.
-   */
-  _WRAP_VFUNC(bool close(), "close")
+  //TODO: Make sure this bool vfunc does not cause execution problems.
+  ///** vfunc to close the device.
+   //*/
+  //_WRAP_VFUNC(bool close(), "close")
 
   /** vfunc to read samples to the audio device.
    */
diff --git a/gstreamer/src/basesrc.hg b/gstreamer/src/basesrc.hg
index 94e10c5..380d8cf 100644
--- a/gstreamer/src/basesrc.hg
+++ b/gstreamer/src/basesrc.hg
@@ -174,26 +174,31 @@ public:
   _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.
-   */
-  _WRAP_VFUNC(bool set_caps(const Glib::RefPtr<Gst::Caps>& caps), "set_caps")
+  //TODO: Make sure this bool vfunc does not cause execution problems.
+  ///** Notify subclass of changed output caps.
+   //*/
+  //_WRAP_VFUNC(bool set_caps(const Glib::RefPtr<Gst::Caps>& caps), "set_caps")
 
-  /** Negotiated the caps with the peer.
-   */
-  _WRAP_VFUNC(bool negotiate(), "negotiate")
+  //TODO: Make sure this bool vfunc does not cause execution problems.
+  ///** Negotiated the caps with the peer.
+   //*/
+  //_WRAP_VFUNC(bool negotiate(), "negotiate")
 
-  /** Generate and send a new_segment event (UNUSED).
-   */
-  _WRAP_VFUNC(bool new_segment(), "newsegment")
+  //TODO: Make sure this bool vfunc does not cause execution problems.
+  ///** Generate and send a new_segment event (UNUSED).
+   //*/
+  //_WRAP_VFUNC(bool new_segment(), "newsegment")
 
-  /** Start processing. Subclasses should open resources and prepare to produce
-   * data.
-   */
-  _WRAP_VFUNC(bool start(), "start")
+  //TODO: Make sure this bool vfunc does not cause execution problems.
+  ///** Start processing. Subclasses should open resources and prepare to produce
+   //* data.
+   //*/
+  //_WRAP_VFUNC(bool start(), "start")
 
-  /** Stop processing. Subclasses should use this to close resources.
-   */
-  _WRAP_VFUNC(bool stop(), "stop")
+  //TODO: Make sure this bool vfunc does not cause execution problems.
+  ///** Stop processing. Subclasses should use this to close resources.
+   //*/
+  //_WRAP_VFUNC(bool stop(), "stop")
 
 #m4 _CONVERSION(`GstBuffer*', `const Glib::RefPtr<Gst::Buffer>&', `Gst::wrap($3, true)')
 #m4 _CONVERSION(`GstClockTime*', `ClockTime&', `*($3)')
@@ -204,23 +209,27 @@ public:
 
 #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) const, "get_size")
+  //TODO: Make sure this bool vfunc does not cause execution problems.
+  ///** Return the total size of the resource, in the configured format.
+   //*/
+  //_WRAP_VFUNC(bool get_size(guint64& size) const, "get_size")
 
-  /** Check if the source can seek.
-   */
-  _WRAP_VFUNC(bool is_seekable() const, "is_seekable")
+  //TODO: Make sure this bool vfunc does not cause execution problems.
+  ///** Check if the source can seek.
+   //*/
+  //_WRAP_VFUNC(bool is_seekable() const, "is_seekable")
 
-  /** Unlock any pending access to the resource. Subclasses should unblock any
-   * blocked function ASAP.
-   */
-  _WRAP_VFUNC(bool unlock(), "unlock")
+  ///** Unlock any pending access to the resource. Subclasses should unblock any
+  //TODO: Make sure this bool vfunc does not cause execution problems.
+   //* blocked function ASAP.
+   //*/
+  //_WRAP_VFUNC(bool unlock(), "unlock")
 
 #m4 _CONVERSION(`GstEvent*', `const Glib::RefPtr<Gst::Event>&', `Gst::wrap($3, true)')
-  /** Override this to implement custom event handling.
-   */
-  _WRAP_VFUNC(bool event(const Glib::RefPtr<Gst::Event>& event), "event")
+  //TODO: Make sure this bool vfunc does not cause execution problems.
+  ///** Override this to implement custom event handling.
+   //*/
+  //_WRAP_VFUNC(bool event(const Glib::RefPtr<Gst::Event>& event), "event")
 
   virtual FlowReturn create_vfunc(guint64 offset, guint size, Glib::RefPtr<Gst::Buffer>& buffer);
 
@@ -229,27 +238,30 @@ public:
   virtual bool do_seek_vfunc(Gst::Segment& segment); 
 
 #m4 _CONVERSION(`GstQuery*', `const Glib::RefPtr<Gst::Query>&', `Gst::wrap($3, true)')
-  /** Handle a requested query.
-   */
-  _WRAP_VFUNC(bool query(const Glib::RefPtr<Gst::Query>& query) const, "query")
+  //TODO: Make sure this bool vfunc does not cause execution problems.
+  ///** Handle a requested query.
+   //*/
+  //_WRAP_VFUNC(bool query(const Glib::RefPtr<Gst::Query>& query) const, "query")
 
-  /** Check whether the source would support pull-based operation if it were to
-   * be opened now. This vfunc is optional, but should be implemented if
-   * possible to avoid unnecessary start/stop cycles. The default
-   * implementation will open and close the resource to find out whether
-   * get_range() is supported, and that is usually undesirable.
-   */
-  _WRAP_VFUNC(bool check_get_range(), "check_get_range")
+  //TODO: Make sure this bool vfunc does not cause execution problems.
+  ///** Check whether the source would support pull-based operation if it were to
+   //* be opened now. This vfunc is optional, but should be implemented if
+   //* possible to avoid unnecessary start/stop cycles. The default
+   //* implementation will open and close the resource to find out whether
+   //* get_range() is supported, and that is usually undesirable.
+   //*/
+  //_WRAP_VFUNC(bool check_get_range(), "check_get_range")
 
   /** Called during negotiation if caps need fixating. Implement instead of
    * setting a fixate function on the source pad.
    */
   _WRAP_VFUNC(void fixate(const Glib::RefPtr<Gst::Caps>& caps), "fixate")
 
-  /** Clear the previous unlock request. Subclasses should clear any state they
-   * set during unlock_vfunc(), such as clearing command queues.
-   */
-  _WRAP_VFUNC(bool unlock_stop(), "unlock_stop")
+  //TODO: Make sure this bool vfunc does not cause execution problems.
+  ///** Clear the previous unlock request. Subclasses should clear any state they
+   //* set during unlock_vfunc(), such as clearing command queues.
+   //*/
+  //_WRAP_VFUNC(bool unlock_stop(), "unlock_stop")
 
   /** Prepare the Gst::Segment that will be passed to the do_seek_vfunc()
    * vmethod for executing a seek request. Sub-classes should override this if
diff --git a/gstreamer/src/basetransform.hg b/gstreamer/src/basetransform.hg
index edaa115..b64b741 100644
--- a/gstreamer/src/basetransform.hg
+++ b/gstreamer/src/basetransform.hg
@@ -181,38 +181,44 @@ public:
    */
   _WRAP_VFUNC(void fixate_caps(PadDirection direction, const Glib::RefPtr<Gst::Caps>& caps, const Glib::RefPtr<Gst::Caps>& othercaps), "fixate_caps")
 
-  /** Optional. Given the size of a buffer in the given direction with the
-   * given caps, calculate the size in bytes of a buffer on the other pad with
-   * 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")
+  //TODO: Make sure this bool vfunc does not cause execution problems.
+  ///** Optional. Given the size of a buffer in the given direction with the
+   //* given caps, calculate the size in bytes of a buffer on the other pad with
+   //* 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")
 
-  /** 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) const, "get_unit_size")
+  //TODO: Make sure this bool vfunc does not cause execution problems.
+  ///** 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) const, "get_unit_size")
 
-  /** Allows the subclass to be notified of the actual caps set.
-   */
-  _WRAP_VFUNC(bool set_caps(const Glib::RefPtr<Gst::Caps>& incaps, const Glib::RefPtr<Gst::Caps>& outcaps), "set_caps")
+  //TODO: Make sure this bool vfunc does not cause execution problems.
+  ///** Allows the subclass to be notified of the actual caps set.
+   //*/
+  //_WRAP_VFUNC(bool set_caps(const Glib::RefPtr<Gst::Caps>& incaps, const Glib::RefPtr<Gst::Caps>& outcaps), "set_caps")
 
-  /** Optional. Called when the element starts processing. Allows opening
-   * external resources.
-   */
-  _WRAP_VFUNC(bool start(), "start")
+  //TODO: Make sure this bool vfunc does not cause execution problems.
+  ///** Optional. Called when the element starts processing. Allows opening
+   //* external resources.
+   //*/
+  //_WRAP_VFUNC(bool start(), "start")
 
-  /** Optional. Called when the element stops processing. Allows closing
-   * external resources.
-   */
-  _WRAP_VFUNC(bool stop(), "stop")
+  //TODO: Make sure this bool vfunc does not cause execution problems.
+  ///** Optional. Called when the element stops processing. Allows closing
+   //* external resources.
+   //*/
+  //_WRAP_VFUNC(bool stop(), "stop")
 
 #m4 _CONVERSION(`GstEvent*', `const Glib::RefPtr<Gst::Event>&', `Gst::wrap($3, true)')
+  //TODO: Make sure this bool vfunc does not cause execution problems.
   ///** Optional. Event handler on the sink pad. This function should return TRUE
-  /* Optional. Event handler on the sink pad. This function should return
-   * <tt>true</tt> if the base class should forward the event.
-   */
-  _WRAP_VFUNC(bool event(const Glib::RefPtr<Gst::Event>& event), "event")
+  ///* Optional. Event handler on the sink pad. This function should return
+   //* <tt>true</tt> if the base class should forward the event.
+   //*/
+  //_WRAP_VFUNC(bool event(const Glib::RefPtr<Gst::Event>& event), "event")
 
 #m4 _CONVERSION(`GstBuffer*', `const Glib::RefPtr<Gst::Buffer>&', `Gst::wrap($3, true)')
   /** Required if the element does not operate in-place. Transforms one
@@ -233,9 +239,10 @@ public:
    */
   virtual FlowReturn prepare_output_buffer_vfunc(const Glib::RefPtr<Gst::Buffer>& input, int size, const Glib::RefPtr<Gst::Caps>& caps, Glib::RefPtr<Gst::Buffer>& buffer);
 
-  /** Optional. Event handler on the source pad.
-   */
-  _WRAP_VFUNC(bool src_event(const Glib::RefPtr<Gst::Event>& event), "src_event")
+  //TODO: Make sure this bool vfunc does not cause execution problems.
+  ///** Optional. Event handler on the source pad.
+   //*/
+  //_WRAP_VFUNC(bool src_event(const Glib::RefPtr<Gst::Event>& event), "src_event")
 
   /** Optional. Since 0.10.22 This method is called right before the base class
    * will start processing. Dynamic properties or other delayed configuration
@@ -244,12 +251,13 @@ public:
   _WRAP_VFUNC(void before_transform(const Glib::RefPtr<Gst::Buffer>& buffer), "before_transform")
 
 #m4 _CONVERSION(`GstCaps*',`const Glib::RefPtr<const Gst::Caps>&',`Glib::wrap($3, true)')
-  /** Optional. Since 0.10.30 Subclasses can override this method to check if
-   * the caps can be handled by the element. The default implementation might
-   * not be the most optimal way to check this in all cases.
-   */
-  _WRAP_VFUNC(bool accept_caps(PadDirection direction,
-    const Glib::RefPtr<const Gst::Caps>& caps), "accept_caps")
+  //TODO: Make sure this bool vfunc does not cause execution problems.
+  ///** Optional. Since 0.10.30 Subclasses can override this method to check if
+   //* the caps can be handled by the element. The default implementation might
+   //* not be the most optimal way to check this in all cases.
+   //*/
+  //_WRAP_VFUNC(bool accept_caps(PadDirection direction,
+    //const Glib::RefPtr<const Gst::Caps>& caps), "accept_caps")
 
 protected:
 #m4begin



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