[gstreamermm] Correct some general method parameter changes in existing source files.
- From: José Alburquerque <jaalburqu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gstreamermm] Correct some general method parameter changes in existing source files.
- Date: Fri, 19 Jul 2013 18:33:21 +0000 (UTC)
commit 221e4d9297c137675d6ee7c54b7048a2f90a7faa
Author: José Alburquerque <jaalburquerque gmail com>
Date: Tue Jun 18 20:16:49 2013 -0400
Correct some general method parameter changes in existing source files.
* gstreamer/src/basesrc.hg ([get|set]_blocksize): Use guint instead of
gulong for the block size.
* gstreamer/src/bufferlist.hg (get): The get() methods (for getting a
Buffer) no longer require a 'group' parameter.
* gstreamer/src/bus.hg (poll): Use a ClockTime instead of a
ClockTimeDiff for the 'timeout' parameter.
* gstreamer/src/childproxy.{ccg,hg}: Move the conversions specific to
this file to this file from the global conversion file. Use
'constversion' to wrap constant methods that have equivalent
non-constant ones.
(child_[added|removed]): These methods now require a 'name' parameter.
Also use _WRAP_METHOD to wrap them.
(signal_child_[added|removed]): These signals also require a new
'name' parameter.
* gstreamer/src/element.hg (query_convert):
(query_position):
(query_duration): The 'format' parameter is no longer passed in as a
reference.
* gstreamer/src/elementfactory.hg (get_uri_type): Now returns a
URIType and not an int.
(get_uri_protocols): Return a std::vecto<Glib::ustring> instead of a
Glib::StringArrayHandle. Also correct its m4 _CONVERSION macro.
* gstreamer/src/pad.hg (event_default):
(query_default): These methods now take an optional 'parent' first
parameter.
(query_duration):
(query_convert): The 'format' parameters are no longer passed in as
references.
(iterate_internal_links_default): Now take an optional 'parent' first
parameter.
* gstreamer/src/query.hg (get_structure): Correct its m4 _CONVERSION
macro.
* gstreamer/src/segment.hg: Use guint64 instead of gint64 throughout
for the parameters.
* gstreamer/src/task.hg (set_lock): Use a Glib::Threads::RecMutex
instead of a Glib::StaticRecMutex (which has been deprecated).
* gstreamer/src/typefind.hg (peek): Return a std::vector<guint8>
instead of a Glib::ArrayHandle<guint8>. Also correct its m4
_CONVERSION macro.
* gstreamer/src/typefindfactory.hg (get_extensions): Return a
std::vector<Glib::ustring> instead of a Glib::StringArrayHandle. Also
correct its m4 _CONVERSION macro.
* gstreamer/src/urihandler.hg (make_element_from_uri): Now throws a
Glib::Error.
(get_uri_type): Returns a URIType instead of a guint.
(get_protocols): Return a std::vector<Glib::ustring> instead of a
Glib::StringArrayHandle. Also correct its m4 _CONVERSION macro.
(set_uri): Now throws a Glib::Error.
* tools/m4/convert_gst.m4: Remove unneeded conversions because of
above changes. Also correct existing ones according to the above
changes also.
ChangeLog | 56 ++++++++++++++++++++++++++++++++++++++
gstreamer/src/basesrc.hg | 4 +-
gstreamer/src/bufferlist.hg | 4 +-
gstreamer/src/bus.hg | 2 +-
gstreamer/src/childproxy.ccg | 10 -------
gstreamer/src/childproxy.hg | 26 +++++++----------
gstreamer/src/element.hg | 6 ++--
gstreamer/src/elementfactory.hg | 6 ++--
gstreamer/src/pad.hg | 14 +++++-----
gstreamer/src/query.hg | 2 +-
gstreamer/src/segment.hg | 20 +++++++-------
gstreamer/src/task.hg | 3 +-
gstreamer/src/typefind.hg | 4 +-
gstreamer/src/typefindfactory.hg | 4 +-
gstreamer/src/urihandler.hg | 10 +++---
tools/m4/convert_gst.m4 | 4 +--
16 files changed, 107 insertions(+), 68 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 8e179e2..3cc01ab 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,61 @@
2013-06-18 José Alburquerque <jaalburquerque gmail com>
+ Correct some general method parameter changes in existing source files.
+
+ * gstreamer/src/basesrc.hg ([get|set]_blocksize): Use guint instead of
+ gulong for the block size.
+ * gstreamer/src/bufferlist.hg (get): The get() methods (for getting a
+ Buffer) no longer require a 'group' parameter.
+ * gstreamer/src/bus.hg (poll): Use a ClockTime instead of a
+ ClockTimeDiff for the 'timeout' parameter.
+ * gstreamer/src/childproxy.{ccg,hg}: Move the conversions specific to
+ this file to this file from the global conversion file. Use
+ 'constversion' to wrap constant methods that have equivalent
+ non-constant ones.
+ (child_[added|removed]): These methods now require a 'name' parameter.
+ Also use _WRAP_METHOD to wrap them.
+ (signal_child_[added|removed]): These signals also require a new
+ 'name' parameter.
+ * gstreamer/src/element.hg (query_convert):
+ (query_position):
+ (query_duration): The 'format' parameter is no longer passed in as a
+ reference.
+ * gstreamer/src/elementfactory.hg (get_uri_type): Now returns a
+ URIType and not an int.
+ (get_uri_protocols): Return a std::vecto<Glib::ustring> instead of a
+ Glib::StringArrayHandle. Also correct its m4 _CONVERSION macro.
+ * gstreamer/src/pad.hg (event_default):
+ (query_default): These methods now take an optional 'parent' first
+ parameter.
+ (query_duration):
+ (query_convert): The 'format' parameters are no longer passed in as
+ references.
+ (iterate_internal_links_default): Now take an optional 'parent' first
+ parameter.
+ * gstreamer/src/query.hg (get_structure): Correct its m4 _CONVERSION
+ macro.
+ * gstreamer/src/segment.hg: Use guint64 instead of gint64 throughout
+ for the parameters.
+ * gstreamer/src/task.hg (set_lock): Use a Glib::Threads::RecMutex
+ instead of a Glib::StaticRecMutex (which has been deprecated).
+ * gstreamer/src/typefind.hg (peek): Return a std::vector<guint8>
+ instead of a Glib::ArrayHandle<guint8>. Also correct its m4
+ _CONVERSION macro.
+ * gstreamer/src/typefindfactory.hg (get_extensions): Return a
+ std::vector<Glib::ustring> instead of a Glib::StringArrayHandle. Also
+ correct its m4 _CONVERSION macro.
+ * gstreamer/src/urihandler.hg (make_element_from_uri): Now throws a
+ Glib::Error.
+ (get_uri_type): Returns a URIType instead of a guint.
+ (get_protocols): Return a std::vector<Glib::ustring> instead of a
+ Glib::StringArrayHandle. Also correct its m4 _CONVERSION macro.
+ (set_uri): Now throws a Glib::Error.
+ * tools/m4/convert_gst.m4: Remove unneeded conversions because of
+ above changes. Also correct existing ones according to the above
+ changes also.
+
+2013-06-18 José Alburquerque <jaalburquerque gmail com>
+
gstreamer/src/filelist.am: Correct plug-ins here also.
* gstreamer/src/filelist.am: Correct the plug-in list according to the
diff --git a/gstreamer/src/basesrc.hg b/gstreamer/src/basesrc.hg
index 01fb823..2813d26 100644
--- a/gstreamer/src/basesrc.hg
+++ b/gstreamer/src/basesrc.hg
@@ -153,8 +153,8 @@ public:
bool query_latency(bool& live, ClockTime& min_latency,
ClockTime& max_latency) const;
- _WRAP_METHOD(gulong get_blocksize() const, gst_base_src_get_blocksize)
- _WRAP_METHOD(void set_blocksize(gulong blocksize), gst_base_src_set_blocksize)
+ _WRAP_METHOD(guint get_blocksize() const, gst_base_src_get_blocksize)
+ _WRAP_METHOD(void set_blocksize(guint blocksize), gst_base_src_set_blocksize)
_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)
_WRAP_METHOD(bool new_seamless_segment(gint64 start, gint64 stop, gint64 position),
gst_base_src_new_seamless_segment)
diff --git a/gstreamer/src/bufferlist.hg b/gstreamer/src/bufferlist.hg
index 18be604..5da389b 100644
--- a/gstreamer/src/bufferlist.hg
+++ b/gstreamer/src/bufferlist.hg
@@ -114,8 +114,8 @@ public:
*/
void foreach(const SlotForeach& slot);
- _WRAP_METHOD(Glib::RefPtr<Gst::Buffer> get(guint group, guint idx), gst_buffer_list_get)
- _WRAP_METHOD(Glib::RefPtr<const Gst::Buffer> get(guint group, guint idx) const, gst_buffer_list_get,
constversion)
+ _WRAP_METHOD(Glib::RefPtr<Gst::Buffer> get(guint idx), gst_buffer_list_get)
+ _WRAP_METHOD(Glib::RefPtr<const Gst::Buffer> get(guint idx) const, gst_buffer_list_get, constversion)
/** Iterate the buffers in the buffer list.
* @param result A place in which to store the iterator.
diff --git a/gstreamer/src/bus.hg b/gstreamer/src/bus.hg
index d9cb347..f9e78f9 100644
--- a/gstreamer/src/bus.hg
+++ b/gstreamer/src/bus.hg
@@ -166,7 +166,7 @@ public:
_IGNORE(gst_bus_add_signal_watch)
_WRAP_METHOD(void remove_signal_watch(), gst_bus_remove_signal_watch)
- _WRAP_METHOD(Glib::RefPtr<Gst::Message> poll(MessageType message_type, ClockTimeDiff timeout),
gst_bus_poll)
+ _WRAP_METHOD(Glib::RefPtr<Gst::Message> poll(MessageType message_type, ClockTime timeout), gst_bus_poll)
#m4 _CONVERSION(`GstMessage*',`const Glib::RefPtr<Gst::Message>&', `Gst::Message::wrap($3, true)')
diff --git a/gstreamer/src/childproxy.ccg b/gstreamer/src/childproxy.ccg
index fb5df2d..8032389 100644
--- a/gstreamer/src/childproxy.ccg
+++ b/gstreamer/src/childproxy.ccg
@@ -49,14 +49,4 @@ Glib::RefPtr<Gst::ChildProxy> ChildProxy::set_proxy_property(const Glib::ustring
return Glib::wrap(gobj(), true);
}
-void ChildProxy::child_added(const Glib::RefPtr<Gst::Object>& child)
-{
- gst_child_proxy_child_added(GST_OBJECT(gobj()), Glib::unwrap(child));
-}
-
-void ChildProxy::child_removed(const Glib::RefPtr<Gst::Object>& child)
-{
- gst_child_proxy_child_removed(GST_OBJECT(gobj()), Glib::unwrap(child));
-}
-
} //namespace Gst
diff --git a/gstreamer/src/childproxy.hg b/gstreamer/src/childproxy.hg
index ed3d598..fc87ce2 100644
--- a/gstreamer/src/childproxy.hg
+++ b/gstreamer/src/childproxy.hg
@@ -46,11 +46,14 @@ class ChildProxy : public Glib::Interface
public:
_WRAP_METHOD(guint get_children_count() const, gst_child_proxy_get_children_count)
+
+#m4 _CONVERSION(`GObject*',`Glib::RefPtr<Gst::Object>',`Glib::wrap(GST_OBJECT($3))')
+
_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<const Gst::Object> get_child(const Glib::ustring& name) const,
gst_child_proxy_get_child_by_name, constversion)
_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)
+ _WRAP_METHOD(Glib::RefPtr<const Gst::Object> get_child(guint index) const,
gst_child_proxy_get_child_by_index, constversion)
_WRAP_METHOD_DOCS_ONLY(gst_child_proxy_lookup)
//TODO: Maybe GParamSpec should be wrapped in glibmm?
@@ -82,22 +85,15 @@ public:
Glib::RefPtr<Gst::ChildProxy> set_proxy_property(const Glib::ustring& name, const Glib::ValueBase& value);
_IGNORE(gst_child_proxy_set_property, gst_child_proxy_set, gst_child_proxy_set_valist)
- /** Emits the "child-added" signal.
- * @param child The newly added child.
- */
- void child_added(const Glib::RefPtr<Gst::Object>& child);
- _IGNORE(gst_child_proxy_child_added)
+#m4 _CONVERSION(`const Glib::RefPtr<Gst::Object>&',`GObject*',`G_OBJECT(Glib::unwrap($3))')
- /** Emits the "child-removed" signal.
- * @param child The newly added child.
- */
- void child_removed(const Glib::RefPtr<Gst::Object>& child);
- _IGNORE(gst_child_proxy_child_removed)
+ _WRAP_METHOD(void child_added(const Glib::RefPtr<Gst::Object>& child, const Glib::ustring& name),
gst_child_proxy_child_added)
+ _WRAP_METHOD(void child_removed(const Glib::RefPtr<Gst::Object>& child, const Glib::ustring& name),
gst_child_proxy_child_removed)
-#m4 _CONVERSION(`GstObject*',`const Glib::RefPtr<Gst::Object>&',`Glib::wrap($3, true)')
+#m4 _CONVERSION(`GObject*',`const Glib::RefPtr<Gst::Object>&',`Glib::wrap(GST_OBJECT($3), true)')
- _WRAP_SIGNAL(void child_added(const Glib::RefPtr<Gst::Object>& object), "child-added")
- _WRAP_SIGNAL(void child_removed(const Glib::RefPtr<Gst::Object>& object), "child-removed")
+ _WRAP_SIGNAL(void child_added(const Glib::RefPtr<Gst::Object>& object, const Glib::ustring& name),
"child-added")
+ _WRAP_SIGNAL(void child_removed(const Glib::RefPtr<Gst::Object>& object, const Glib::ustring& name),
"child-removed")
/** Virtual method to fetch the child.
*/
diff --git a/gstreamer/src/element.hg b/gstreamer/src/element.hg
index ea641a8..590c168 100644
--- a/gstreamer/src/element.hg
+++ b/gstreamer/src/element.hg
@@ -307,8 +307,8 @@ public:
_WRAP_METHOD(Glib::ArrayHandle<QueryType> get_query_types() const, gst_element_get_query_types)
_WRAP_METHOD(bool query(const Glib::RefPtr<Gst::Query>& query) const, gst_element_query)
- _WRAP_METHOD(bool query_convert(Format src_format, gint64 src_val, Format& dest_format, gint64& dest_val)
const, gst_element_query_convert)
- _WRAP_METHOD(bool query_position(Format& format, gint64& cur) const, gst_element_query_position)
+ _WRAP_METHOD(bool query_convert(Format src_format, gint64 src_val, Format dest_format, gint64& dest_val)
const, gst_element_query_convert)
+ _WRAP_METHOD(bool query_position(Format format, gint64& cur) const, gst_element_query_position)
/** Queries an element for the stream position.
*
@@ -318,7 +318,7 @@ public:
*/
bool query_position(Format& format) const;
- _WRAP_METHOD(bool query_duration(Format& format, gint64& duration) const, gst_element_query_duration)
+ _WRAP_METHOD(bool query_duration(Format format, gint64& duration) const, gst_element_query_duration)
/** Queries an element for the total stream duration.
*
diff --git a/gstreamer/src/elementfactory.hg b/gstreamer/src/elementfactory.hg
index 9dd03b3..c025cd7 100644
--- a/gstreamer/src/elementfactory.hg
+++ b/gstreamer/src/elementfactory.hg
@@ -134,10 +134,10 @@ public:
_WRAP_METHOD(Glib::ustring get_documentation_uri() const, gst_element_factory_get_documentation_uri)
_WRAP_METHOD(Glib::ustring get_icon_name() const, gst_element_factory_get_icon_name)
_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)
+ _WRAP_METHOD(URIType get_uri_type() const, gst_element_factory_get_uri_type)
-#m4 _CONVERSION(`gchar**',`Glib::StringArrayHandle',`Glib::StringArrayHandle($3, Glib::OWNERSHIP_NONE)')
- _WRAP_METHOD(Glib::StringArrayHandle get_uri_protocols() const, gst_element_factory_get_uri_protocols)
+#m4 _CONVERSION(`const gchar* const*',`std::vector<Glib::ustring>',`Glib::ArrayHandler<Glib::ustring>($3,
Glib::OWNERSHIP_NONE)')
+ _WRAP_METHOD(std::vector<Glib::ustring> 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(bool can_sink_caps(const Glib::RefPtr<const Gst::Caps>& caps) const,
gst_element_factory_can_sink_caps)
diff --git a/gstreamer/src/pad.hg b/gstreamer/src/pad.hg
index 1dd1b7a..c92ab86 100644
--- a/gstreamer/src/pad.hg
+++ b/gstreamer/src/pad.hg
@@ -418,11 +418,11 @@ public:
bool send_event(const Glib::RefPtr<Gst::Event>& event);
_IGNORE(gst_pad_send_event)
- _WRAP_METHOD(bool event_default(const Glib::RefPtr<Gst::Event>& event), gst_pad_event_default)
+ _WRAP_METHOD(bool event_default(const Glib::RefPtr<Gst::Object>& parent{?}, const
Glib::RefPtr<Gst::Event>& event), gst_pad_event_default)
_WRAP_METHOD(bool query(const Glib::RefPtr<Gst::Query>& query) const, gst_pad_query)
_WRAP_METHOD(bool peer_query(const Glib::RefPtr<Gst::Query>& query) const, gst_pad_peer_query)
- _WRAP_METHOD(bool query_default(const Glib::RefPtr<Gst::Query>& query) const, gst_pad_query_default)
- _WRAP_METHOD(bool query_position(Format& format, gint64& position) const, gst_pad_query_position)
+ _WRAP_METHOD(bool query_default(const Glib::RefPtr<Gst::Object>& parent{?}, const
Glib::RefPtr<Gst::Query>& query) const, gst_pad_query_default)
+ _WRAP_METHOD(bool query_position(Format format, gint64& position) const, gst_pad_query_position)
/** Queries a pad for the stream position parsing only the format.
* @param format A reference to the Gst::Format asked for. On return contains
@@ -431,7 +431,7 @@ public:
*/
bool query_position(Format& format) const;
- _WRAP_METHOD(bool query_duration(Format& format, gint64& duration) const, gst_pad_query_duration)
+ _WRAP_METHOD(bool query_duration(Format format, gint64& duration) const, gst_pad_query_duration)
/** Queries a pad for the total stream duration parsing only the format.
* @param format A reference to the Gst::Format asked for. On return contains
@@ -440,7 +440,7 @@ public:
*/
bool query_duration(Format& format) const;
- _WRAP_METHOD(bool query_convert(Format src_format, gint64 src_value, Format& dst_format, gint64&
dst_value) const, gst_pad_query_convert)
+ _WRAP_METHOD(bool query_convert(Format src_format, gint64 src_value, Format dst_format, gint64& dst_value)
const, gst_pad_query_convert)
_WRAP_METHOD(bool query_peer_position(Format& format, gint64& position) const, gst_pad_query_peer_position)
/** Queries the peer of a given sink pad for the stream position parsing only
@@ -468,8 +468,8 @@ public:
_WRAP_METHOD(Gst::Iterator<Gst::Pad> iterate_internal_links(), gst_pad_iterate_internal_links)
_WRAP_METHOD(Gst::Iterator<const Gst::Pad> iterate_internal_links() const, gst_pad_iterate_internal_links)
- _WRAP_METHOD(Gst::Iterator<Gst::Pad> iterate_internal_links_default(),
gst_pad_iterate_internal_links_default)
- _WRAP_METHOD(Gst::Iterator<const Gst::Pad> iterate_internal_links_default() const,
gst_pad_iterate_internal_links_default)
+ _WRAP_METHOD(Gst::Iterator<Gst::Pad> iterate_internal_links_default(const Glib::RefPtr<Gst::Object>&
parent{?}), gst_pad_iterate_internal_links_default)
+ _WRAP_METHOD(Gst::Iterator<const Gst::Pad> iterate_internal_links_default(const Glib::RefPtr<Gst::Object>&
parent{?}) const, gst_pad_iterate_internal_links_default)
#m4 _CONVERSION(`GList*', `Glib::ListHandle< Glib::RefPtr<Gst::Pad> >', `$2($3, Glib::OWNERSHIP_SHALLOW)')
_WRAP_METHOD(Glib::ListHandle< Glib::RefPtr<Gst::Pad> > get_internal_links(), gst_pad_get_internal_links)
diff --git a/gstreamer/src/query.hg b/gstreamer/src/query.hg
index 7f3ff44..9fb3416 100644
--- a/gstreamer/src/query.hg
+++ b/gstreamer/src/query.hg
@@ -129,7 +129,7 @@ public:
Glib::RefPtr<Gst::Query> create_writable();
// A copy is taken so that the original is not freed by the wrapper.
-#m4 _CONVERSION(`GstStructure*',`Gst::Structure',`Glib::wrap(const_cast<GstStructure*>($3), true)')
+#m4 _CONVERSION(`const GstStructure*',`Gst::Structure',`Glib::wrap(const_cast<GstStructure*>($3), true)')
_WRAP_METHOD(Gst::Structure get_structure() const, gst_query_get_structure)
/** Get the Gst::QueryType of the query.
diff --git a/gstreamer/src/segment.hg b/gstreamer/src/segment.hg
index f1653eb..5719bcc 100644
--- a/gstreamer/src/segment.hg
+++ b/gstreamer/src/segment.hg
@@ -86,18 +86,18 @@ class Segment
_IGNORE(gst_segment_free, gst_segment_copy)
public:
- _WRAP_METHOD(bool clip(Format format, gint64 start, gint64 stop, gint64& clip_start, gint64& clip_stop)
const, gst_segment_clip)
+ _WRAP_METHOD(bool clip(Format format, guint64 start, guint64 stop, guint64& clip_start, guint64&
clip_stop) const, gst_segment_clip)
_WRAP_METHOD(void init(Format format), gst_segment_init)
- _WRAP_METHOD(void set_duration(Format format, gint64 duration), gst_segment_set_duration)
- _WRAP_METHOD(void set_last_stop(Format format, gint64 position), gst_segment_set_last_stop)
- _WRAP_METHOD(void set_newsegment(bool update, double rate, Format format, gint64 start, gint64 stop,
gint64 time), gst_segment_set_newsegment)
- _WRAP_METHOD(void set_newsegment(bool update, double rate, double applied_rate, Format format, gint64
start, gint64 stop, gint64 time), gst_segment_set_newsegment_full)
+ _WRAP_METHOD(void set_duration(Format format, guint64 duration), gst_segment_set_duration)
+ _WRAP_METHOD(void set_last_stop(Format format, guint64 position), gst_segment_set_last_stop)
+ _WRAP_METHOD(void set_newsegment(bool update, double rate, Format format, guint64 start, guint64 stop,
guint64 time), gst_segment_set_newsegment)
+ _WRAP_METHOD(void set_newsegment(bool update, double rate, double applied_rate, Format format, guint64
start, guint64 stop, guint64 time), gst_segment_set_newsegment_full)
_WRAP_METHOD_DOCS_ONLY(gst_segment_set_seek)
- void set_seek(double rate, Format format, SeekFlags flags, SeekType start_type, gint64 start, SeekType
stop_type, gint64 stop, bool& update);
- _WRAP_METHOD(gint64 to_running_time(Format format, gint64 position) const, gst_segment_to_running_time)
- _WRAP_METHOD(gint64 to_stream_time(Format format, gint64 position) const, gst_segment_to_stream_time)
- _WRAP_METHOD(gint64 to_position(Format format, gint64 running_time) const, gst_segment_to_position)
- _WRAP_METHOD(bool set_running_time(Format format, gint64 running_time), gst_segment_set_running_time)
+ void set_seek(double rate, Format format, SeekFlags flags, SeekType start_type, guint64 start, SeekType
stop_type, guint64 stop, bool& update);
+ _WRAP_METHOD(guint64 to_running_time(Format format, guint64 position) const, gst_segment_to_running_time)
+ _WRAP_METHOD(guint64 to_stream_time(Format format, guint64 position) const, gst_segment_to_stream_time)
+ _WRAP_METHOD(guint64 to_position(Format format, guint64 running_time) const, gst_segment_to_position)
+ _WRAP_METHOD(bool set_running_time(Format format, guint64 running_time), gst_segment_set_running_time)
};
} //namespace Gst
diff --git a/gstreamer/src/task.hg b/gstreamer/src/task.hg
index 6b2386c..a97a90c 100644
--- a/gstreamer/src/task.hg
+++ b/gstreamer/src/task.hg
@@ -20,7 +20,6 @@
#include <gst/gsttask.h>
#include <gstreamermm/object.h>
#include <glibmm/threads.h>
-#include <glibmm/thread.h>
#include <memory>
_DEFS(gstreamermm,gst)
@@ -105,7 +104,7 @@ public:
*/
_WRAP_CREATE(const SlotTask& task_slot)
- _WRAP_METHOD(void set_lock(Glib::StaticRecMutex& mutex), gst_task_set_lock)
+ _WRAP_METHOD(void set_lock(Glib::Threads::RecMutex& mutex), gst_task_set_lock)
_WRAP_METHOD(void set_priority(Glib::ThreadPriority priority), gst_task_set_priority)
_WRAP_METHOD(void set_pool(const Glib::RefPtr<Gst::TaskPool>& pool), gst_task_set_pool)
_WRAP_METHOD(Glib::RefPtr<Gst::TaskPool> get_pool(), gst_task_get_pool)
diff --git a/gstreamer/src/typefind.hg b/gstreamer/src/typefind.hg
index d3fa1be..4dc68e5 100644
--- a/gstreamer/src/typefind.hg
+++ b/gstreamer/src/typefind.hg
@@ -50,8 +50,8 @@ public:
typedef sigc::slot<void> SlotFind;
public:
-#m4 _CONVERSION(`guint8*', `Glib::ArrayHandle<guint8>', `$2(($3), Glib::OWNERSHIP_NONE)')
- _WRAP_METHOD(Glib::ArrayHandle<guint8> peek(gint64 offset, guint size) const, gst_type_find_peek)
+#m4 _CONVERSION(`const guint8*', `std::vector<guint8>', `Glib::ArrayHandler<guint8>::array_to_vector($3,
Glib::OWNERSHIP_NONE)')
+ _WRAP_METHOD(std::vector<guint8> peek(gint64 offset, guint size) const, gst_type_find_peek)
_WRAP_METHOD(void suggest(guint probability, const Glib::RefPtr<const Gst::Caps>& caps) const,
gst_type_find_suggest)
_IGNORE(gst_type_find_suggest_simple)
diff --git a/gstreamer/src/typefindfactory.hg b/gstreamer/src/typefindfactory.hg
index 02c7962..d574147 100644
--- a/gstreamer/src/typefindfactory.hg
+++ b/gstreamer/src/typefindfactory.hg
@@ -45,8 +45,8 @@ public:
#m4 _CONVERSION(`GList*',`Glib::ListHandle< Glib::RefPtr<Gst::TypeFindFactory> >',`$2($3,
Glib::OWNERSHIP_DEEP)')
_WRAP_METHOD(static Glib::ListHandle< Glib::RefPtr<Gst::TypeFindFactory> > get_list(),
gst_type_find_factory_get_list)
-#m4 _CONVERSION(`gchar**',`Glib::StringArrayHandle',`$2($3, Glib::OWNERSHIP_NONE)')
- _WRAP_METHOD(Glib::StringArrayHandle get_extensions() const, gst_type_find_factory_get_extensions)
+#m4 _CONVERSION(`const gchar*
const*',`std::vector<Glib::ustring>',`Glib::ArrayHandler<Glib::ustring>::array_to_vector($3,
Glib::OWNERSHIP_NONE)')
+ _WRAP_METHOD(std::vector<Glib::ustring> get_extensions() const, gst_type_find_factory_get_extensions)
_WRAP_METHOD(Glib::RefPtr<Gst::Caps> get_caps(), gst_type_find_factory_get_caps)
_WRAP_METHOD(Glib::RefPtr<const Gst::Caps> get_caps() const, gst_type_find_factory_get_caps, constversion)
diff --git a/gstreamer/src/urihandler.hg b/gstreamer/src/urihandler.hg
index 5bcb928..c33afcf 100644
--- a/gstreamer/src/urihandler.hg
+++ b/gstreamer/src/urihandler.hg
@@ -55,15 +55,15 @@ public:
_WRAP_METHOD(static Glib::ustring get_protocol(const Glib::ustring& uri), gst_uri_get_protocol)
_WRAP_METHOD(static Glib::ustring get_location(const Glib::ustring& uri), gst_uri_get_location)
_WRAP_METHOD(static Glib::ustring construct_uri(const Glib::ustring& protocol, const Glib::ustring&
location), gst_uri_construct)
- _WRAP_METHOD(static Glib::RefPtr<Gst::Element> make_element_from_uri(const URIType type, const
Glib::ustring& uri, const Glib::ustring& name), gst_element_make_from_uri)
+ _WRAP_METHOD(static Glib::RefPtr<Gst::Element> make_element_from_uri(const URIType type, const
Glib::ustring& uri, const Glib::ustring& name), gst_element_make_from_uri, errthrow)
- _WRAP_METHOD(guint get_uri_type() const, gst_uri_handler_get_uri_type)
+ _WRAP_METHOD(URIType get_uri_type() const, gst_uri_handler_get_uri_type)
-#m4 _CONVERSION(`gchar**',`Glib::StringArrayHandle',`Glib::StringArrayHandle($3, Glib::OWNERSHIP_NONE)')
- _WRAP_METHOD(Glib::StringArrayHandle get_protocols() const, gst_uri_handler_get_protocols)
+#m4 _CONVERSION(`const gchar*
const*',`std::vector<Glib::ustring>',`Glib::ArrayHandler<Glib::ustring>::array_to_vector($3,
Glib::OWNERSHIP_NONE)')
+ _WRAP_METHOD(std::vector<Glib::ustring> get_protocols() const, gst_uri_handler_get_protocols)
_WRAP_METHOD(Glib::ustring get_uri() const, gst_uri_handler_get_uri)
- _WRAP_METHOD(bool set_uri(const Glib::ustring& uri), gst_uri_handler_set_uri)
+ _WRAP_METHOD(bool set_uri(const Glib::ustring& uri), gst_uri_handler_set_uri, errthrow)
_WRAP_METHOD(void new_uri(const Glib::ustring& uri), gst_uri_handler_new_uri)
_WRAP_SIGNAL(void new_uri(const Glib::ustring& uri), "new-uri")
diff --git a/tools/m4/convert_gst.m4 b/tools/m4/convert_gst.m4
index faa7df7..1c25abb 100644
--- a/tools/m4/convert_gst.m4
+++ b/tools/m4/convert_gst.m4
@@ -221,7 +221,6 @@ _CONVERSION(`const Glib::RefPtr<Gst::URIHandler>&',`GstURIHandler*',`Glib::unwra
dnl ##################General Conversions############################
dnl Basic General Conversions
-_CONVERSION(`gint64&',`gint64*',`&$3')
_CONVERSION(`guint64&',`guint64*',`&$3')
_CONVERSION(`guint*',`guint&',`*$3')
_CONVERSION(`const guint&',`guint',`$3')
@@ -233,7 +232,6 @@ _CONVERSION(`ClockTime&',`GstClockTime*',`(GstClockTime*)(&$3)')
_CONVERSION(`ClockTimeDiff',`GstClockTimeDiff',`GstClockTimeDiff($3)')
_CONVERSION(`GstClockTimeDiff',`ClockTimeDiff',`ClockTimeDiff($3)')
_CONVERSION(`ClockTimeDiff&',`GstClockTimeDiff*',`(GstClockTimeDiff*)(&$3)')
-_CONVERSION(`Format&',`GstFormat*',`($2)&$3')
_CONVERSION(`GstClockTimeDiff*',`ClockTimeDiff&',`(ClockTimeDiff&)(*$3)')
_CONVERSION(`GstMixerMessageType',`Gst::MixerMessageType',`(Gst::MixerMessageType)($3)')
_CONVERSION(`const GstQueryType*',`const QueryType*',`(QueryType*)($3)')
@@ -249,7 +247,7 @@ dnl Glibmm Conversions
_CONVERSION(`const Glib::Error&', `const GError*', `$3.gobj()')
_CONVERSION(`GQuark',`Glib::QueryQuark',`Glib::QueryQuark($3)')
_CONVERSION(`const Glib::QueryQuark&',`GQuark',`$3')
-_CONVERSION(`Glib::StaticRecMutex&',`GStaticRecMutex*',`$3.gobj()')
+_CONVERSION(`Glib::Threads::RecMutex&',`GRecMutex*',`$3.gobj()')
_CONVERSION(`const Glib::StringArrayHandle&',`const gchar**',`const_cast<const char**>($3.data())')
_CONVERSION(`const Glib::ValueArray&',`GValueArray*',`const_cast<GValueArray*>($3.gobj())')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]