[gstreamermm] BufferList, BufferListIterator: Wrap most methods.
- From: José Alburquerque <jaalburqu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gstreamermm] BufferList, BufferListIterator: Wrap most methods.
- Date: Fri, 15 Oct 2010 00:25:09 +0000 (UTC)
commit 139e9a0ca98e4bcf741ebcc2727c19828615f6cd
Author: José Alburquerque <jaalburqu svn gnome org>
Date: Thu Oct 14 20:06:35 2010 -0400
BufferList, BufferListIterator: Wrap most methods.
* gstreamer/src/bufferlist.ccg:
* gstreamer/src/bufferlist.hg: Wrap most BufferList and
BufferListIterator methods.
* gstreamer/src/gst_methodsdefs: Regenerate.
* gstreamer/src/basesink.ccg:
* gstreamer/src/basesink.hg:
* gstreamer/src/gst_vfuncs.defs: Wrap the render_list_vfunc().
* tools/m4/convert_gst.m4: Add necessary conversions.
ChangeLog | 13 ++
gstreamer/src/basesink.ccg | 1 +
gstreamer/src/basesink.hg | 8 +-
gstreamer/src/bufferlist.ccg | 100 ++++++++++
gstreamer/src/bufferlist.hg | 141 ++++++++++++--
gstreamer/src/gst_methods.defs | 412 +++++++++++++++++++++++++++++++++-------
gstreamer/src/gst_vfuncs.defs | 8 +
tools/m4/convert_gst.m4 | 5 +
8 files changed, 601 insertions(+), 87 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 217ad01..918bcaf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,18 @@
2010-10-14 José Alburquerque <jaalburqu svn gnome org>
+ BufferList, BufferListIterator: Wrap most methods.
+
+ * gstreamer/src/bufferlist.ccg:
+ * gstreamer/src/bufferlist.hg: Wrap most BufferList and
+ BufferListIterator methods.
+ * gstreamer/src/gst_methodsdefs: Regenerate.
+ * gstreamer/src/basesink.ccg:
+ * gstreamer/src/basesink.hg:
+ * gstreamer/src/gst_vfuncs.defs: Wrap the render_list_vfunc().
+ * tools/m4/convert_gst.m4: Add necessary conversions.
+
+2010-10-14 José Alburquerque <jaalburqu svn gnome org>
+
Virtual functions: const corrections.
* gstreamer/src/audiosink.hg:
diff --git a/gstreamer/src/basesink.ccg b/gstreamer/src/basesink.ccg
index c252746..1c820ce 100644
--- a/gstreamer/src/basesink.ccg
+++ b/gstreamer/src/basesink.ccg
@@ -18,6 +18,7 @@
*/
#include <gstreamermm/pad.h>
+#include <gstreamermm/bufferlist.h>
_PINCLUDE(gstreamermm/private/element_p.h)
diff --git a/gstreamer/src/basesink.hg b/gstreamer/src/basesink.hg
index 40ed15f..ae04569 100644
--- a/gstreamer/src/basesink.hg
+++ b/gstreamer/src/basesink.hg
@@ -27,6 +27,8 @@ _DEFS(gstreamermm,gst)
namespace Gst
{
+class BufferList;
+
/** The base class for sink elements.
* Gst::BaseSink is the base class for sink elements in GStreamer, such as
* xvimagesink or filesink. It is a layer on top of Gst::Element that provides
@@ -287,7 +289,11 @@ public:
/** Clear the previous unlock request. Subclasses should clear any state they
* set during unlock_vfunc(), such as clearing command queues.
*/
- virtual bool unlock_stop_vfunc();
+ virtual bool unlock_stop_vfunc();
+
+#m4 _CONVERSION(`GstBufferList*', `const Glib::RefPtr<Gst::BufferList>&', `Gst::wrap($3, true)')
+ /// Render a BufferList.
+ _WRAP_VFUNC(FlowReturn render_list(const Glib::RefPtr<Gst::BufferList>& buffer_list), render_list)
protected:
#m4begin
diff --git a/gstreamer/src/bufferlist.ccg b/gstreamer/src/bufferlist.ccg
index 964e489..75adc18 100644
--- a/gstreamer/src/bufferlist.ccg
+++ b/gstreamer/src/bufferlist.ccg
@@ -17,9 +17,109 @@
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+#include <gstreamermm/buffer.h>
_PINCLUDE(gstreamermm/private/miniobject_p.h)
+extern "C"
+{
+
+static GstBufferListItem BufferList_Foreach_gstreamermm_callback(GstBuffer** buffer, guint group, guint idx, void* data)
+{
+ Gst::BufferList::SlotForeach* the_slot =
+ static_cast<Gst::BufferList::SlotForeach*>(data);
+
+ try
+ {
+ Glib::RefPtr<Gst::Buffer> temp = Gst::wrap(*buffer, true);
+
+ GstBufferListItem const result =
+ static_cast<GstBufferListItem>((*the_slot)(temp, group, idx));
+
+ *buffer = temp->gobj_copy();
+
+ return result;
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+
+ return GST_BUFFER_LIST_CONTINUE;
+}
+
+static GstBuffer* BufferListIterator_Process_gstreamermm_callback(GstBuffer* buffer, void* data)
+{
+ Gst::BufferListIterator::SlotProcess* the_slot =
+ static_cast<Gst::BufferListIterator::SlotProcess*>(data);
+
+ try
+ {
+ Glib::RefPtr<Gst::Buffer> result = (*the_slot)(Gst::wrap(buffer, true));
+
+ if(result)
+ return result->gobj_copy();
+ else
+ return 0;
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+
+ return 0;
+}
+
+} // extern "C"
+
+
namespace Gst
{
+bool BufferList::is_writable() const
+{
+ return static_cast<bool>(gst_buffer_list_is_writable(gobj()));
+}
+
+Glib::RefPtr<BufferList> BufferList::create_writable()
+{
+ return Gst::wrap(gst_buffer_list_make_writable(gobj()));
+}
+
+guint BufferList::n_groups() const
+{
+ return gst_buffer_list_n_groups(const_cast<GstBufferList*>(gobj()));
+}
+
+void BufferList::foreach(const SlotForeach& slot)
+{
+ gst_buffer_list_foreach(gobj(), &BufferList_Foreach_gstreamermm_callback,
+ const_cast<SlotForeach*>(&slot));
+}
+
+BufferListIterator::BufferListIterator()
+: gobject_(0),
+ take_ownership(false)
+{
+}
+
+BufferListIterator::BufferListIterator(GstBufferListIterator* castitem,
+ bool take_ownership)
+: gobject_(castitem),
+ take_ownership(take_ownership)
+{
+}
+
+BufferListIterator::~BufferListIterator()
+{
+ if(take_ownership && gobject_)
+ gst_buffer_list_iterator_free(gobject_);
+}
+
+Glib::RefPtr<Gst::Buffer> BufferListIterator::process(const SlotProcess& slot)
+{
+ return Gst::wrap(gst_buffer_list_iterator_do(gobj(),
+ &BufferListIterator_Process_gstreamermm_callback,
+ const_cast<SlotProcess*>(&slot)));
+}
+
} //namespace Gst
diff --git a/gstreamer/src/bufferlist.hg b/gstreamer/src/bufferlist.hg
index fa5ba28..f4e722d 100644
--- a/gstreamer/src/bufferlist.hg
+++ b/gstreamer/src/bufferlist.hg
@@ -36,7 +36,7 @@ class Buffer;
* Buffer lists are created with create() and filled with data using a
* Gst::BufferListIterator. The iterator has no current buffer; its cursor
* position lies between buffers, immediately before the buffer that would be
- * returned by next(). After iterating to the end of a group the iterator must
+ * returned by Gst::BufferListIterator::next(). After iterating to the end of a group the iterator must
* be advanced to the next group by a call to
* Gst::BufferListIterator::next_group() before any further calls to
* Gst::BufferListIterator::next() can return buffers again. The cursor
@@ -52,25 +52,8 @@ class BufferList : public MiniObject
public:
/** For example,
- * Glib::RefPtr<Gst::Buffer> on_buffer(const Glib::RefPtr<Gst::Buffer>&
- * buffer);.
- * A slot for processing the last buffer returned by
- * Gst::BufferListIterator::next(). The slot can leave the buffer in the
- * list, replace the buffer in the list or remove the buffer from the list,
- * depending on the return value. If the slot returns 0, the buffer will be
- * removed from the list, otherwise the buffer will be replaced with the
- * returned buffer.
- *
- * The last buffer returned by Gst::BufferListIterator::next() will be
- * replaced with the buffer returned from the function. If 0 is returned, the
- * buffer will be removed from the list. The list must be writable.
- */
- typedef sigc::slot< Glib::RefPtr<Gst::Buffer>, const
- Glib::RefPtr<Gst::Buffer>& > SlotBuffer;
-
- /** For example,
- * Gst::BufferListItem on_foreach(Glib::RefPtr<Gst::Buffer> buffer, guint
- * group, guint idx);.
+ * Gst::BufferListItem on_foreach(const Glib::RefPtr<Gst::Buffer>& buffer,
+ * guint group, guint idx);.
* A slot that will be called from foreach(). The buffer field will be a
* reference to the buffer at idx in group.
*
@@ -84,10 +67,50 @@ public:
* When the buffer has been made writable, the new buffer reference can be
* assigned to the buffer.
*/
- typedef sigc::slot< Gst::BufferListItem, Glib::RefPtr<Gst::Buffer>&, guint, guint> SlotForeach;
+ typedef sigc::slot< Gst::BufferListItem, Glib::RefPtr<Gst::Buffer>&, guint,
+ guint> SlotForeach;
public:
+ _WRAP_METHOD(static Glib::RefPtr<BufferList> create(), gst_buffer_list_new)
+ /** Tests if you can safely add buffers and groups into a buffer list.
+ * @return <tt>true</tt> if the buffer list is writable, <tt>false</tt>
+ * otherwise.
+ *
+ * Since 0.10.24
+ */
+ bool is_writable() const;
+
+ /** Makes a writable buffer list from the buffer list. If the buffer list is
+ * already writable, this will simply return the same buffer list. A copy
+ * will otherwise be made.
+ * @return The same buffer list if it is writable, otherwise a new copy.
+ *
+ * Since 0.10.24
+ */
+ Glib::RefPtr<BufferList> create_writable();
+
+ //TODO: h2def.py does not recognize the C function declaration in the
+ //header.
+ _WRAP_METHOD_DOCS_ONLY(gst_buffer_list_n_groups)
+ guint n_groups() const;
+
+ /** Call @a slot for each buffer in @a list.
+ *
+ * @a slot can modify the passed buffer pointer or its contents. The return
+ * value of @a slot define if this function returns or if the remaining
+ * buffers in a group should be skipped.
+ *
+ * @param slot A SlotForeach to call on each buffer.
+ *
+ * Since 0.10.24
+ */
+ 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)
+
+ //TODO: _WRAP_METHOD(BufferListIterator& iterate(), gst_buffer_list_iterate)
};
/** An opaque iterator for a Gst::BufferList.
@@ -95,6 +118,82 @@ public:
class BufferListIterator
{
_CLASS_GENERIC(BufferListIterator, GstBufferListIterator)
+
+public:
+ /// Default constructor.
+ BufferListIterator();
+
+ /** C object constructor.
+ * @param castitem The C object.
+ * @param take_ownership Whether to destroy the C object with the wrapper or
+ * not.
+ */
+ explicit BufferListIterator(GstBufferListIterator* castitem,
+ bool take_ownership = true);
+
+ /// Destructor.
+ virtual ~BufferListIterator();
+
+ /// Provides access to the underlying C object.
+ GstBufferListIterator* gobj()
+ { return reinterpret_cast<GstBufferListIterator*>(gobject_); }
+
+ /// Provides access to the underlying C object.
+ const GstBufferListIterator* gobj() const
+ { return reinterpret_cast<GstBufferListIterator*>(gobject_); }
+
+private:
+// noncopyable
+ BufferListIterator(const BufferListIterator& other);
+ BufferListIterator& operator=(const BufferListIterator& other);
+
+public:
+ /** For example,
+ * Glib::RefPtr<Gst::Buffer> on_process(const Glib::RefPtr<Gst::Buffer>&
+ * buffer);.
+ * A slot for processing the last buffer returned by
+ * Gst::BufferListIterator::next(). The slot can leave the buffer in the
+ * list, replace the buffer in the list or remove the buffer from the list,
+ * depending on the return value. If the slot returns 0, the buffer will be
+ * removed from the list, otherwise the buffer will be replaced with the
+ * returned buffer.
+ *
+ * The last buffer returned by Gst::BufferListIterator::next() will be
+ * replaced with the buffer returned from the function. If 0 is returned, the
+ * buffer will be removed from the list. The list must be writable.
+ */
+ typedef sigc::slot< Glib::RefPtr<Gst::Buffer>, const
+ Glib::RefPtr<Gst::Buffer>& > SlotProcess;
+
+ _WRAP_METHOD(guint n_buffers() const, gst_buffer_list_iterator_n_buffers)
+ _WRAP_METHOD(void add(const Glib::RefPtr<Gst::Buffer>& buffer), gst_buffer_list_iterator_add)
+ _WRAP_METHOD(void add_group(), gst_buffer_list_iterator_add_group)
+
+ _WRAP_METHOD(Glib::RefPtr<Gst::Buffer> next(), gst_buffer_list_iterator_next)
+ _WRAP_METHOD(Glib::RefPtr<const Gst::Buffer> next() const, gst_buffer_list_iterator_next, constversion)
+
+ _WRAP_METHOD(bool next_group(), gst_buffer_list_iterator_next_group)
+ _WRAP_METHOD(void remove(), gst_buffer_list_iterator_remove)
+
+ _WRAP_METHOD(Glib::RefPtr<Gst::Buffer> steal(), gst_buffer_list_iterator_steal)
+ _WRAP_METHOD(void take(const Glib::RefPtr<Gst::Buffer>& buffer), gst_buffer_list_iterator_take)
+
+ /** Calls the given function for the last buffer returned by next(). next()
+ * must have been called on it before this function is called. remove() and
+ * steal() must not have been called since the last call to next().
+ *
+ * See the SlotProcess docs for more details.
+ *
+ * @param slot The slot to be called.
+ * @return The return value from @a slot.
+ */
+ Glib::RefPtr<Gst::Buffer> process(const SlotProcess& slot);
+
+ _WRAP_METHOD(Glib::RefPtr<Gst::Buffer> merge_group(), gst_buffer_list_iterator_merge_group)
+
+protected:
+ GstBufferListIterator* gobject_; // The C object.
+ bool take_ownership; // Bool signaling ownership.
};
} // namespace Gst
diff --git a/gstreamer/src/gst_methods.defs b/gstreamer/src/gst_methods.defs
index afba4af..fe5692d 100644
--- a/gstreamer/src/gst_methods.defs
+++ b/gstreamer/src/gst_methods.defs
@@ -674,6 +674,7 @@
'("debug" "GST_LEVEL_DEBUG")
'("log" "GST_LEVEL_LOG")
'("fixme" "GST_LEVEL_FIXME")
+ '("trace" "GST_LEVEL_TRACE")
'("memdump" "GST_LEVEL_MEMDUMP")
'("count" "GST_LEVEL_COUNT")
)
@@ -758,6 +759,7 @@
'("async-done" "GST_MESSAGE_ASYNC_DONE")
'("request-state" "GST_MESSAGE_REQUEST_STATE")
'("step-start" "GST_MESSAGE_STEP_START")
+ '("qos" "GST_MESSAGE_QOS")
'("any" "GST_MESSAGE_ANY")
)
)
@@ -828,6 +830,8 @@
(c-name "GstFlowReturn")
(gtype-id "GST_TYPE_FLOW_RETURN")
(values
+ '("custom-success-2" "GST_FLOW_CUSTOM_SUCCESS_2")
+ '("custom-success-1" "GST_FLOW_CUSTOM_SUCCESS_1")
'("custom-success" "GST_FLOW_CUSTOM_SUCCESS")
'("resend" "GST_FLOW_RESEND")
'("ok" "GST_FLOW_OK")
@@ -838,6 +842,20 @@
'("error" "GST_FLOW_ERROR")
'("not-supported" "GST_FLOW_NOT_SUPPORTED")
'("custom-error" "GST_FLOW_CUSTOM_ERROR")
+ '("custom-error-1" "GST_FLOW_CUSTOM_ERROR_1")
+ '("custom-error-2" "GST_FLOW_CUSTOM_ERROR_2")
+ )
+)
+
+(define-flags PadLinkCheck
+ (in-module "Gst")
+ (c-name "GstPadLinkCheck")
+ (gtype-id "GST_TYPE_PAD_LINK_CHECK")
+ (values
+ '("nothing" "GST_PAD_LINK_CHECK_NOTHING")
+ '("hierarchy" "GST_PAD_LINK_CHECK_HIERARCHY")
+ '("template-caps" "GST_PAD_LINK_CHECK_TEMPLATE_CAPS")
+ '("caps" "GST_PAD_LINK_CHECK_CAPS")
)
)
@@ -1823,6 +1841,15 @@
)
)
+(define-method steal_structure
+ (of-object "GstCaps")
+ (c-name "gst_caps_steal_structure")
+ (return-type "GstStructure*")
+ (parameters
+ '("guint" "index")
+ )
+)
+
(define-method copy_nth
(of-object "GstCaps")
(c-name "gst_caps_copy_nth")
@@ -2301,6 +2328,17 @@
)
)
+(define-method wait_async_full
+ (of-object "GstClockID")
+ (c-name "gst_clock_id_wait_async_full")
+ (return-type "GstClockReturn")
+ (parameters
+ '("GstClockCallback" "func")
+ '("gpointer" "user_data")
+ '("GDestroyNotify" "destroy_data")
+ )
+)
+
(define-method unschedule
(of-object "GstClockID")
(c-name "gst_clock_id_unschedule")
@@ -2321,6 +2359,10 @@
+;; From gstelementdetails.h
+
+
+
;; From gstelementfactory.h
(define-function gst_element_factory_get_type
@@ -3018,6 +3060,11 @@
(return-type "GType")
)
+(define-function gst_pad_link_check_get_type
+ (c-name "gst_pad_link_check_get_type")
+ (return-type "GType")
+)
+
(define-function gst_activate_mode_get_type
(c-name "gst_activate_mode_get_type")
(return-type "GType")
@@ -4158,22 +4205,6 @@
)
)
-(define-function gst_debug_remove_log_function
- (c-name "gst_debug_remove_log_function")
- (return-type "guint")
- (parameters
- '("GstLogFunction" "func")
- )
-)
-
-(define-function gst_debug_remove_log_function_by_data
- (c-name "gst_debug_remove_log_function_by_data")
- (return-type "guint")
- (parameters
- '("gpointer" "data")
- )
-)
-
;; From gstinterface.h
@@ -4850,6 +4881,76 @@
)
)
+(define-function gst_message_new_qos
+ (c-name "gst_message_new_qos")
+ (return-type "GstMessage*")
+ (parameters
+ '("GstObject*" "src")
+ '("gboolean" "live")
+ '("guint64" "running_time")
+ '("guint64" "stream_time")
+ '("guint64" "timestamp")
+ '("guint64" "duration")
+ )
+)
+
+(define-method set_qos_values
+ (of-object "GstMessage")
+ (c-name "gst_message_set_qos_values")
+ (return-type "none")
+ (parameters
+ '("gint64" "jitter")
+ '("gdouble" "proportion")
+ '("gint" "quality")
+ )
+)
+
+(define-method set_qos_stats
+ (of-object "GstMessage")
+ (c-name "gst_message_set_qos_stats")
+ (return-type "none")
+ (parameters
+ '("GstFormat" "format")
+ '("guint64" "processed")
+ '("guint64" "dropped")
+ )
+)
+
+(define-method parse_qos
+ (of-object "GstMessage")
+ (c-name "gst_message_parse_qos")
+ (return-type "none")
+ (parameters
+ '("gboolean*" "live")
+ '("guint64*" "running_time")
+ '("guint64*" "stream_time")
+ '("guint64*" "timestamp")
+ '("guint64*" "duration")
+ )
+)
+
+(define-method parse_qos_values
+ (of-object "GstMessage")
+ (c-name "gst_message_parse_qos_values")
+ (return-type "none")
+ (parameters
+ '("gint64*" "jitter")
+ '("gdouble*" "proportion")
+ '("gint*" "quality")
+ )
+)
+
+(define-method parse_qos_stats
+ (of-object "GstMessage")
+ (c-name "gst_message_parse_qos_stats")
+ (return-type "none")
+ (parameters
+ '("GstFormat*" "format")
+ '("guint64*" "processed")
+ '("guint64*" "dropped")
+ )
+)
+
(define-function gst_message_new_custom
(c-name "gst_message_new_custom")
(return-type "GstMessage*")
@@ -5447,6 +5548,16 @@
)
)
+(define-method link_full
+ (of-object "GstPad")
+ (c-name "gst_pad_link_full")
+ (return-type "GstPadLinkReturn")
+ (parameters
+ '("GstPad*" "sinkpad")
+ '("GstPadLinkCheck" "flags")
+ )
+)
+
(define-method unlink
(of-object "GstPad")
(c-name "gst_pad_unlink")
@@ -6160,7 +6271,7 @@
'("gint" "major_version")
'("gint" "minor_version")
'("const-gchar*" "name")
- '("gchar*" "description")
+ '("const-gchar*" "description")
'("GstPluginInitFunc" "init_func")
'("const-gchar*" "version")
'("const-gchar*" "license")
@@ -6177,7 +6288,7 @@
'("gint" "major_version")
'("gint" "minor_version")
'("const-gchar*" "name")
- '("gchar*" "description")
+ '("const-gchar*" "description")
'("GstPluginInitFullFunc" "init_full_func")
'("const-gchar*" "version")
'("const-gchar*" "license")
@@ -6573,6 +6684,25 @@
;; From gst_private.h
+(define-function priv_gst_plugin_loading_have_whitelist
+ (c-name "priv_gst_plugin_loading_have_whitelist")
+ (return-type "gboolean")
+)
+
+(define-function priv_gst_plugin_loading_get_whitelist_hash
+ (c-name "priv_gst_plugin_loading_get_whitelist_hash")
+ (return-type "guint32")
+)
+
+(define-function priv_gst_plugin_desc_is_whitelisted
+ (c-name "priv_gst_plugin_desc_is_whitelisted")
+ (return-type "gboolean")
+ (parameters
+ '("GstPluginDesc*" "desc")
+ '("const-gchar*" "filename")
+ )
+)
+
(define-function priv_gst_structure_append_to_gstring
(c-name "priv_gst_structure_append_to_gstring")
(return-type "gboolean")
@@ -6997,24 +7127,6 @@
;; From gstregistrybinary.h
-(define-method binary_write_cache
- (of-object "GstRegistry")
- (c-name "gst_registry_binary_write_cache")
- (return-type "gboolean")
- (parameters
- '("const-char*" "location")
- )
-)
-
-(define-method binary_read_cache
- (of-object "GstRegistry")
- (c-name "gst_registry_binary_read_cache")
- (return-type "gboolean")
- (parameters
- '("const-char*" "location")
- )
-)
-
;; From gstregistrychunks.h
@@ -7856,6 +7968,16 @@
)
)
+(define-method fixate_field_string
+ (of-object "GstStructure")
+ (c-name "gst_structure_fixate_field_string")
+ (return-type "gboolean")
+ (parameters
+ '("const-char*" "field_name")
+ '("const-gchar*" "target")
+ )
+)
+
(define-method fixate_field_nearest_fraction
(of-object "GstStructure")
(c-name "gst_structure_fixate_field_nearest_fraction")
@@ -8393,6 +8515,17 @@
)
)
+(define-method peek_string_index
+ (of-object "GstTagList")
+ (c-name "gst_tag_list_peek_string_index")
+ (return-type "gboolean")
+ (parameters
+ '("const-gchar*" "tag")
+ '("guint" "index")
+ '("const-gchar**" "value")
+ )
+)
+
(define-method get_pointer
(of-object "GstTagList")
(c-name "gst_tag_list_get_pointer")
@@ -8722,7 +8855,7 @@
(is-constructor-of "GstTrace")
(return-type "GstTrace*")
(parameters
- '("gchar*" "filename")
+ '("const-gchar*" "filename")
'("gint" "size")
)
)
@@ -9288,6 +9421,18 @@
)
)
+(define-method link_pads_full
+ (of-object "GstElement")
+ (c-name "gst_element_link_pads_full")
+ (return-type "gboolean")
+ (parameters
+ '("const-gchar*" "srcpadname")
+ '("GstElement*" "dest")
+ '("const-gchar*" "destpadname")
+ '("GstPadLinkCheck" "flags")
+ )
+)
+
(define-method unlink_pads
(of-object "GstElement")
(c-name "gst_element_unlink_pads")
@@ -9762,7 +9907,7 @@
(c-name "gst_event_new_sink_message")
(return-type "GstEvent*")
(parameters
- '("struct-_GstMessage*" "msg")
+ '("GstMessage*" "msg")
)
)
@@ -9771,7 +9916,7 @@
(c-name "gst_event_parse_sink_message")
(return-type "none")
(parameters
- '("struct-_GstMessage**" "msg")
+ '("GstMessage**" "msg")
)
)
@@ -10451,6 +10596,19 @@
)
)
+(define-method masked_scan_uint32_peek
+ (of-object "GstAdapter")
+ (c-name "gst_adapter_masked_scan_uint32_peek")
+ (return-type "guint")
+ (parameters
+ '("guint32" "mask")
+ '("guint32" "pattern")
+ '("guint" "offset")
+ '("guint" "size")
+ '("guint32*" "value")
+ )
+)
+
;; From gstbasesink.h
@@ -10556,6 +10714,21 @@
(return-type "GstBuffer*")
)
+(define-method set_last_buffer_enabled
+ (of-object "GstBaseSink")
+ (c-name "gst_base_sink_set_last_buffer_enabled")
+ (return-type "none")
+ (parameters
+ '("gboolean" "enable")
+ )
+)
+
+(define-method is_last_buffer_enabled
+ (of-object "GstBaseSink")
+ (c-name "gst_base_sink_is_last_buffer_enabled")
+ (return-type "gboolean")
+)
+
(define-method query_latency
(of-object "GstBaseSink")
(c-name "gst_base_sink_query_latency")
@@ -12641,7 +12814,7 @@
(c-name "gst_controller_set_property_disabled")
(return-type "none")
(parameters
- '("gchar*" "property_name")
+ '("const-gchar*" "property_name")
'("gboolean" "disabled")
)
)
@@ -12651,7 +12824,7 @@
(c-name "gst_controller_set_control_source")
(return-type "gboolean")
(parameters
- '("gchar*" "property_name")
+ '("const-gchar*" "property_name")
'("GstControlSource*" "csource")
)
)
@@ -12661,7 +12834,7 @@
(c-name "gst_controller_get_control_source")
(return-type "GstControlSource*")
(parameters
- '("gchar*" "property_name")
+ '("const-gchar*" "property_name")
)
)
@@ -12685,7 +12858,7 @@
(c-name "gst_controller_get")
(return-type "GValue*")
(parameters
- '("gchar*" "property_name")
+ '("const-gchar*" "property_name")
'("GstClockTime" "timestamp")
)
)
@@ -12767,7 +12940,7 @@
(return-type "gboolean")
(parameters
'("GObject*" "object")
- '("gchar*" "property_name")
+ '("const-gchar*" "property_name")
'("GstControlSource*" "csource")
)
)
@@ -12777,7 +12950,7 @@
(return-type "GstControlSource*")
(parameters
'("GObject*" "object")
- '("gchar*" "property_name")
+ '("const-gchar*" "property_name")
)
)
@@ -12832,7 +13005,7 @@
(c-name "gst_controller_set")
(return-type "gboolean")
(parameters
- '("gchar*" "property_name")
+ '("const-gchar*" "property_name")
'("GstClockTime" "timestamp")
'("GValue*" "value")
)
@@ -12843,7 +13016,7 @@
(c-name "gst_controller_set_from_list")
(return-type "gboolean")
(parameters
- '("gchar*" "property_name")
+ '("const-gchar*" "property_name")
'("GSList*" "timedvalues")
)
)
@@ -12853,7 +13026,7 @@
(c-name "gst_controller_unset")
(return-type "gboolean")
(parameters
- '("gchar*" "property_name")
+ '("const-gchar*" "property_name")
'("GstClockTime" "timestamp")
)
)
@@ -12863,7 +13036,7 @@
(c-name "gst_controller_unset_all")
(return-type "gboolean")
(parameters
- '("gchar*" "property_name")
+ '("const-gchar*" "property_name")
)
)
@@ -12872,7 +13045,7 @@
(c-name "gst_controller_get_all")
(return-type "const-GList*")
(parameters
- '("gchar*" "property_name")
+ '("const-gchar*" "property_name")
)
)
@@ -12881,7 +13054,7 @@
(c-name "gst_controller_set_interpolation_mode")
(return-type "gboolean")
(parameters
- '("gchar*" "property_name")
+ '("const-gchar*" "property_name")
'("GstInterpolateMode" "mode")
)
)
@@ -13177,11 +13350,6 @@
;; From dp-private.h
-(define-function gst_dp_init
- (c-name "gst_dp_init")
- (return-type "none")
-)
-
(define-function gst_dp_dump_byte_array
(c-name "gst_dp_dump_byte_array")
(return-type "none")
@@ -13372,7 +13540,7 @@
(parameters
'("GstElement*" "element")
'("GstStaticPadTemplate*" "template")
- '("gchar*" "name")
+ '("const-gchar*" "name")
)
)
@@ -13382,7 +13550,7 @@
(parameters
'("GstElement*" "element")
'("GstStaticPadTemplate*" "template")
- '("gchar*" "name")
+ '("const-gchar*" "name")
)
)
@@ -13391,7 +13559,7 @@
(return-type "none")
(parameters
'("GstElement*" "element")
- '("gchar*" "name")
+ '("const-gchar*" "name")
)
)
@@ -13406,8 +13574,6 @@
(define-function gst_check_drop_buffers
(c-name "gst_check_drop_buffers")
(return-type "none")
- (parameters
- )
)
(define-function gst_check_caps_equal
@@ -14545,6 +14711,16 @@
'("v216" "GST_VIDEO_FORMAT_v216")
'("nv12" "GST_VIDEO_FORMAT_NV12")
'("nv21" "GST_VIDEO_FORMAT_NV21")
+ '("gray8" "GST_VIDEO_FORMAT_GRAY8")
+ '("gray16-be" "GST_VIDEO_FORMAT_GRAY16_BE")
+ '("gray16-le" "GST_VIDEO_FORMAT_GRAY16_LE")
+ '("v308" "GST_VIDEO_FORMAT_v308")
+ '("y800" "GST_VIDEO_FORMAT_Y800")
+ '("y16" "GST_VIDEO_FORMAT_Y16")
+ '("rgb16" "GST_VIDEO_FORMAT_RGB16")
+ '("bgr16" "GST_VIDEO_FORMAT_BGR16")
+ '("rgb15" "GST_VIDEO_FORMAT_RGB15")
+ '("bgr15" "GST_VIDEO_FORMAT_BGR15")
)
)
@@ -16208,7 +16384,7 @@
(return-type "none")
(parameters
'("GstMixerOptions*" "opts")
- '("gchar*" "value")
+ '("const-gchar*" "value")
)
)
@@ -16949,6 +17125,18 @@
)
)
+(define-method set_render_rectangle
+ (of-object "GstXOverlay")
+ (c-name "gst_x_overlay_set_render_rectangle")
+ (return-type "gboolean")
+ (parameters
+ '("gint" "x")
+ '("gint" "y")
+ '("gint" "width")
+ '("gint" "height")
+ )
+)
+
(define-method expose
(of-object "GstXOverlay")
(c-name "gst_x_overlay_expose")
@@ -17356,9 +17544,9 @@
(c-name "gst_basertppayload_set_options")
(return-type "none")
(parameters
- '("gchar*" "media")
+ '("const-gchar*" "media")
'("gboolean" "dynamic")
- '("gchar*" "encoding_name")
+ '("const-gchar*" "encoding_name")
'("guint32" "clock_rate")
)
)
@@ -17368,7 +17556,7 @@
(c-name "gst_basertppayload_set_outcaps")
(return-type "gboolean")
(parameters
- '("gchar*" "fieldname")
+ '("const-gchar*" "fieldname")
)
(varargs #t)
)
@@ -19136,6 +19324,11 @@
;; From gstrtsptransport.h
+(define-function gst_rtsp_lower_trans_get_type
+ (c-name "gst_rtsp_lower_trans_get_type")
+ (return-type "GType")
+)
+
(define-function gst_rtsp_transport_new
(c-name "gst_rtsp_transport_new")
(return-type "GstRTSPResult")
@@ -19866,6 +20059,22 @@
(return-type "GType")
)
+(define-function gst_tag_image_orientation_to_exif_value
+ (c-name "gst_tag_image_orientation_to_exif_value")
+ (return-type "gint")
+ (parameters
+ '("const-gchar*" "str")
+ )
+)
+
+(define-function gst_tag_image_orientation_from_exif_value
+ (c-name "gst_tag_image_orientation_from_exif_value")
+ (return-type "const-gchar*")
+ (parameters
+ '("gint" "value")
+ )
+)
+
;; From tag.h
@@ -19989,6 +20198,57 @@
)
)
+(define-function gst_tag_list_from_xmp_buffer
+ (c-name "gst_tag_list_from_xmp_buffer")
+ (return-type "GstTagList*")
+ (parameters
+ '("const-GstBuffer*" "buffer")
+ )
+)
+
+(define-method to_xmp_buffer
+ (of-object "GstTagList")
+ (c-name "gst_tag_list_to_xmp_buffer")
+ (return-type "GstBuffer*")
+ (parameters
+ '("gboolean" "read_only")
+ )
+)
+
+(define-method to_exif_buffer
+ (of-object "GstTagList")
+ (c-name "gst_tag_list_to_exif_buffer")
+ (return-type "GstBuffer*")
+ (parameters
+ '("gint" "byte_order")
+ '("guint32" "base_offset")
+ )
+)
+
+(define-method to_exif_buffer_with_tiff_header
+ (of-object "GstTagList")
+ (c-name "gst_tag_list_to_exif_buffer_with_tiff_header")
+ (return-type "GstBuffer*")
+)
+
+(define-function gst_tag_list_from_exif_buffer
+ (c-name "gst_tag_list_from_exif_buffer")
+ (return-type "GstTagList*")
+ (parameters
+ '("const-GstBuffer*" "buffer")
+ '("gint" "byte_order")
+ '("guint32" "base_offset")
+ )
+)
+
+(define-function gst_tag_list_from_exif_buffer_with_tiff_header
+ (c-name "gst_tag_list_from_exif_buffer_with_tiff_header")
+ (return-type "GstTagList*")
+ (parameters
+ '("const-GstBuffer*" "buffer")
+ )
+)
+
(define-function gst_tag_parse_extended_comment
(c-name "gst_tag_parse_extended_comment")
(return-type "gboolean")
@@ -20439,6 +20699,22 @@
)
)
+(define-function gst_video_parse_caps_color_matrix
+ (c-name "gst_video_parse_caps_color_matrix")
+ (return-type "const-char*")
+ (parameters
+ '("GstCaps*" "caps")
+ )
+)
+
+(define-function gst_video_parse_caps_chroma_site
+ (c-name "gst_video_parse_caps_chroma_site")
+ (return-type "const-char*")
+ (parameters
+ '("GstCaps*" "caps")
+ )
+)
+
(define-method new_caps
(of-object "GstVideoFormat")
(c-name "gst_video_format_new_caps")
@@ -20494,6 +20770,12 @@
(return-type "gboolean")
)
+(define-method is_gray
+ (of-object "GstVideoFormat")
+ (c-name "gst_video_format_is_gray")
+ (return-type "gboolean")
+)
+
(define-method has_alpha
(of-object "GstVideoFormat")
(c-name "gst_video_format_has_alpha")
diff --git a/gstreamer/src/gst_vfuncs.defs b/gstreamer/src/gst_vfuncs.defs
index e72f68e..6b19145 100644
--- a/gstreamer/src/gst_vfuncs.defs
+++ b/gstreamer/src/gst_vfuncs.defs
@@ -216,6 +216,14 @@
(return-type "gboolean")
)
+(define-vfunc render_list
+ (of-object "GstBaseSink")
+ (return-type "GstFlowReturn")
+ (parameters
+ '("GstBufferList*" "buffer_list")
+ )
+)
+
; GstBaseSrc
(define-vfunc get_caps
diff --git a/tools/m4/convert_gst.m4 b/tools/m4/convert_gst.m4
index 1c295f8..f867db7 100644
--- a/tools/m4/convert_gst.m4
+++ b/tools/m4/convert_gst.m4
@@ -54,6 +54,11 @@ _CONVERSION(`const Glib::RefPtr<const Gst::Buffer>&',`GstBuffer*', `const_cast<G
_CONVERSION(`const Glib::RefPtr<Gst::Buffer>&',`const GstBuffer*', `Gst::unwrap($3)')
_CONVERSION(`Glib::RefPtr<Gst::Buffer>',`GstBuffer*', `Gst::unwrap($3)')
+dnl BufferList
+_CONVERSION(`Glib::RefPtr<Gst::BufferList>',`GstBufferList*', `Gst::unwrap($3)')
+_CONVERSION(`GstBufferList*', `Glib::RefPtr<BufferList>', `Gst::wrap($3)')
+_CONVERSION(`const Glib::RefPtr<Gst::BufferList>&', `GstBufferList*', `Glib::unwrap($3)')
+
dnl Bus
_CONVERSION(`const Glib::RefPtr<Gst::Bus>&',`GstBus*', `Glib::unwrap($3)')
_CONVERSION(`GstBus*',`Glib::RefPtr<Gst::Bus>',`Glib::wrap($3)')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]