[gstreamermm: 16/167] fixed basesink, basesrc, glib::wrap instead of gst::wrap
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gstreamermm: 16/167] fixed basesink, basesrc, glib::wrap instead of gst::wrap
- Date: Tue, 3 Sep 2013 19:20:25 +0000 (UTC)
commit 36740d726fec84f61e4cb524415b421e486f1203
Author: Marcin Kolny at Flytronic <marcin kolny flytronic pl>
Date: Wed Jul 24 15:49:09 2013 +0200
fixed basesink, basesrc, glib::wrap instead of gst::wrap
gstreamer/src/basesink.ccg | 76 +-------------------------------------
gstreamer/src/basesink.hg | 31 +++-------------
gstreamer/src/basesrc.ccg | 6 ++--
gstreamer/src/basesrc.hg | 22 +++---------
gstreamer/src/basetransform.ccg | 4 +-
gstreamer/src/basetransform.hg | 4 +-
gstreamer/src/buffer.ccg | 4 +-
gstreamer/src/bufferlist.ccg | 4 +-
gstreamer/src/discoverer.hg | 2 +-
gstreamer/src/element.ccg | 2 +-
gstreamer/src/element.hg | 4 +-
gstreamer/src/gst_vfuncs.defs | 10 ++++-
gstreamer/src/pad.ccg | 2 +-
tests/test-miniobject-wrap.cc | 2 +-
tools/m4/convert_gst.m4 | 28 +++++++-------
15 files changed, 51 insertions(+), 150 deletions(-)
---
diff --git a/gstreamer/src/basesink.ccg b/gstreamer/src/basesink.ccg
index 1c820ce..a5bf6d6 100644
--- a/gstreamer/src/basesink.ccg
+++ b/gstreamer/src/basesink.ccg
@@ -41,78 +41,6 @@ bool BaseSink::query_latency(bool& live, bool& upstream_live, ClockTime& min_lat
return result;
}
-ClockReturn BaseSink::wait_clock(ClockTime time)
-{
- return static_cast<ClockReturn>(gst_base_sink_wait_clock(const_cast<GstBaseSink*>(gobj()),
static_cast<GstClockTime>(time), 0));
-}
-
-FlowReturn BaseSink::wait_eos(ClockTime time)
-{
- return static_cast<FlowReturn>(gst_base_sink_wait_eos(const_cast<GstBaseSink*>(gobj()),
static_cast<GstClockTime>(time), 0));
-}
-
-GstFlowReturn BaseSink_Class::buffer_alloc_vfunc_callback(GstBaseSink* self, guint64 offset, guint size,
GstCaps* caps, GstBuffer** buf)
-{
- Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
- Glib::ObjectBase::_get_current_wrapper((GObject*)self));
-
- // Non-gtkmmproc-generated custom classes implicitly call the default
- // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
- // generated classes can use this optimisation, which avoids the unnecessary
- // parameter conversions if there is no possibility of the virtual function
- // being overridden:
- if(obj_base && obj_base->is_derived_())
- {
- CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
- if(obj) // This can be NULL during destruction.
- {
- try // Trap C++ exceptions which would normally be lost because this is a C callback.
- {
- Glib::RefPtr<Gst::Buffer> cpp_buffer;
- // Call the virtual member method, which derived classes might override.
- const GstFlowReturn result =
- static_cast<GstFlowReturn>(obj->buffer_alloc_vfunc(offset, size,
- Glib::wrap(caps, true), cpp_buffer));
- *buf = cpp_buffer->gobj_copy();
- return result;
- }
- catch(...)
- {
- Glib::exception_handlers_invoke();
- }
- }
- }
-
- BaseClassType *const base = static_cast<BaseClassType*>(
- g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The
original underlying C class).
- );
-
- // Call the original underlying C function:
- if(base && base->buffer_alloc)
- return (*base->buffer_alloc)(self, offset, size, caps, buf);
-
-
- typedef GstFlowReturn RType;
- return RType();
-}
-FlowReturn Gst::BaseSink::buffer_alloc_vfunc(guint64 offset, guint size, const Glib::RefPtr<Gst::Caps>&
caps, Glib::RefPtr<Gst::Buffer>& buffer)
-{
- BaseClassType *const base = static_cast<BaseClassType*>(
- g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class
(The original underlying C class).
- );
-
- if(base && base->buffer_alloc)
- {
- GstBuffer* gst_buffer;
- const Gst::FlowReturn result =
- static_cast<Gst::FlowReturn>((*base->buffer_alloc)(gobj(), offset,size,Glib::unwrap(caps),
&gst_buffer));
- buffer = Gst::wrap(gst_buffer, false); // Don't take copy because callback returns a newly created copy.
- return result;
- }
-
- typedef FlowReturn RType;
- return RType();
-}
gboolean BaseSink_Class::set_caps_vfunc_callback(GstBaseSink* self, GstCaps* caps)
{
Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
@@ -342,7 +270,7 @@ gboolean BaseSink_Class::event_vfunc_callback(GstBaseSink* self, GstEvent* event
{
#endif //GLIBMM_EXCEPTIONS_ENABLED
// Call the virtual member method, which derived classes might override.
- return static_cast<int>(obj->event_vfunc(Gst::wrap(event, true)
+ return static_cast<int>(obj->event_vfunc(Glib::wrap(event, true)
));
#ifdef GLIBMM_EXCEPTIONS_ENABLED
}
@@ -371,7 +299,7 @@ bool Gst::BaseSink::event_vfunc(const Glib::RefPtr<Gst::Event>& event)
);
if(base && base->event)
- return (*base->event)(gobj(),Gst::unwrap(event));
+ return (*base->event)(gobj(),Glib::unwrap(event));
return true;
}
diff --git a/gstreamer/src/basesink.hg b/gstreamer/src/basesink.hg
index f0f557a..76da46d 100644
--- a/gstreamer/src/basesink.hg
+++ b/gstreamer/src/basesink.hg
@@ -96,11 +96,6 @@ class BufferList;
* Gst::BaseSink. Normally this method should only be overriden by very
* specific elements (such as file sinks) which need to handle the newsegment
* event specially.
- *
- * Gst::BaseSink provides an overridable buffer_alloc_vfunc() function that can
- * be used by sinks that want to do reverse negotiation or to provide custom
- * buffers (hardware buffers for example) to upstream elements.
- *
* The unlock_vfunc() method is called when the elements should unblock any
* blocking operations they perform in the render_vfunc() method. This is
* mostly useful when the render_vfunc() method performs a blocking write on a
@@ -143,7 +138,6 @@ public:
_WRAP_METHOD(ClockTime get_latency() const, gst_base_sink_get_latency)
_WRAP_METHOD(Gst::FlowReturn do_preroll(const Glib::RefPtr<Gst::MiniObject>& obj),
gst_base_sink_do_preroll)
_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.
@@ -168,7 +162,6 @@ public:
*/
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
@@ -199,13 +192,9 @@ public:
_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() 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)
_WRAP_METHOD(void set_blocksize(guint blocksize), gst_base_sink_set_blocksize)
_WRAP_METHOD(guint get_blocksize() const, gst_base_sink_get_blocksize)
- _WRAP_METHOD(void set_last_buffer_enabled(bool enabled), gst_base_sink_set_last_buffer_enabled)
- _WRAP_METHOD(bool is_last_buffer_enabled() const, gst_base_sink_is_last_buffer_enabled)
_WRAP_METHOD(guint64 get_throttle_time() const, gst_base_sink_get_throttle_time)
_WRAP_METHOD(void set_throttle_time(guint64 throttle), gst_base_sink_set_throttle_time)
@@ -214,13 +203,10 @@ public:
_MEMBER_GET_GOBJECT(sink_pad, sinkpad, Gst::Pad, GstPad*)
_WRAP_PROPERTY("async", bool)
- _WRAP_PROPERTY("last-buffer", Glib::RefPtr<Gst::Buffer>)
_WRAP_PROPERTY("max-lateness", gint64)
- _WRAP_PROPERTY("preroll-queue-len", guint)
_WRAP_PROPERTY("qos", bool)
_WRAP_PROPERTY("sync", bool)
_WRAP_PROPERTY("ts-offset", gint64)
- _WRAP_PROPERTY("enable-last-buffer", bool)
_WRAP_PROPERTY("render-delay", guint64)
_WRAP_PROPERTY("throttle-time", guint64)
_WRAP_PROPERTY("blocksize", guint)
@@ -228,17 +214,14 @@ public:
#m4 _CONVERSION(`Glib::RefPtr<Gst::Caps>', `GstCaps*', `Glib::unwrap($3)')
/** Called to get sink pad caps from the subclass.
*/
- _WRAP_VFUNC(Glib::RefPtr<Gst::Caps> get_caps() const, "get_caps")
+ _WRAP_VFUNC(Glib::RefPtr<Gst::Caps> get_caps(Glib::RefPtr<Gst::Caps> caps) const, "get_caps")
#m4 _CONVERSION(`GstCaps*', `const Glib::RefPtr<Gst::Caps>&', `Glib::wrap($3, true)')
/** Notify subclass of changed caps.
*/
virtual bool set_caps_vfunc(const Glib::RefPtr<Gst::Caps>& caps);
- /** Allocate a new buffer with given caps. */
- virtual FlowReturn buffer_alloc_vfunc(guint64 offset, guint size, const Glib::RefPtr<Gst::Caps>& caps,
Glib::RefPtr<Gst::Buffer>& buffer);
-
-#m4 _CONVERSION(`GstBuffer*', `const Glib::RefPtr<Gst::Buffer>&', `Gst::wrap($3, true)')
+#m4 _CONVERSION(`GstBuffer*', `const Glib::RefPtr<Gst::Buffer>&', `Glib::wrap($3, true)')
#m4 _CONVERSION(`GstClockTime*', `ClockTime&', `*($3)')
/** Called to get the start and end times for synchronising the passed buffer
* to the clock.
@@ -258,7 +241,7 @@ public:
*/
virtual bool unlock_vfunc();
-#m4 _CONVERSION(`GstEvent*', `const Glib::RefPtr<Gst::Event>&', `Gst::wrap($3, true)')
+#m4 _CONVERSION(`GstEvent*', `const Glib::RefPtr<Gst::Event>&', `Glib::wrap($3, true)')
/** Override this to handle events arriving on the sink pad.
*/
virtual bool event_vfunc(const Glib::RefPtr<Gst::Event>& event);
@@ -276,7 +259,6 @@ public:
* processing when changing to the PLAYING state asynchronously. Called with
* the OBJECT_LOCK held.
*/
- _WRAP_VFUNC(StateChangeReturn async_play(), "async_play")
/** Subclasses should override this when they can provide an alternate method
* of spawning a thread to drive the pipeline in pull mode. Should start or
@@ -291,21 +273,20 @@ public:
* have ideas about what should be the default values for the caps you
* support.
*/
- _WRAP_VFUNC(void fixate(const Glib::RefPtr<Gst::Caps>& caps), "fixate")
+ _WRAP_VFUNC(Glib::RefPtr<Gst::Caps> 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.
*/
virtual bool unlock_stop_vfunc();
-#m4 _CONVERSION(`GstBufferList*', `const Glib::RefPtr<Gst::BufferList>&', `Gst::wrap($3, true)')
+#m4 _CONVERSION(`GstBufferList*', `const Glib::RefPtr<Gst::BufferList>&', `Glib::wrap($3, true)')
/// Render a BufferList.
_WRAP_VFUNC(FlowReturn render_list(const Glib::RefPtr<Gst::BufferList>& buffer_list), render_list)
protected:
#m4begin
_PUSH(SECTION_PCC_CLASS_INIT_VFUNCS)
- klass->buffer_alloc = &buffer_alloc_vfunc_callback;
klass->set_caps = &set_caps_vfunc_callback;
klass->start = &start_vfunc_callback;
klass->stop = &stop_vfunc_callback;
@@ -314,8 +295,6 @@ protected:
klass->activate_pull = &activate_pull_vfunc_callback;
klass->unlock_stop = &unlock_stop_vfunc_callback;
_SECTION(SECTION_PH_VFUNCS)
- static GstFlowReturn buffer_alloc_vfunc_callback(GstBaseSink* self,
- guint64 offset, guint size, GstCaps* caps, GstBuffer** buf);
static gboolean set_caps_vfunc_callback(GstBaseSink* self, GstCaps* caps);
static gboolean start_vfunc_callback(GstBaseSink* self);
static gboolean stop_vfunc_callback(GstBaseSink* self);
diff --git a/gstreamer/src/basesrc.ccg b/gstreamer/src/basesrc.ccg
index 736dd7a..d8d4f18 100644
--- a/gstreamer/src/basesrc.ccg
+++ b/gstreamer/src/basesrc.ccg
@@ -109,7 +109,7 @@ gboolean BaseSrc_Class::prepare_seek_segment_vfunc_callback(GstBaseSrc* self, Gs
{
// Call the virtual member method, which derived classes might override.
Gst::Segment cpp_segment(segment, true);
- return static_cast<int>(obj->prepare_seek_segment_vfunc(Gst::wrap(seek, true) , cpp_segment));
+ return static_cast<int>(obj->prepare_seek_segment_vfunc(Glib::wrap(seek, true) , cpp_segment));
}
catch(...)
{
@@ -137,7 +137,7 @@ bool Gst::BaseSrc::prepare_seek_segment_vfunc(const Glib::RefPtr<Gst::Event>& se
);
if(base && base->prepare_seek_segment)
- return (*base->prepare_seek_segment)(gobj(),Gst::unwrap(seek),(segment).gobj());
+ return (*base->prepare_seek_segment)(gobj(),Glib::unwrap(seek),(segment).gobj());
typedef bool RType;
return RType();
@@ -195,7 +195,7 @@ FlowReturn Gst::BaseSrc::create_vfunc(guint64 offset, guint size, Glib::RefPtr<G
GstBuffer* gst_buffer;
Gst::FlowReturn const result =
static_cast<FlowReturn>((*base->create)(gobj(),offset, size,&gst_buffer));
- buffer = Gst::wrap(gst_buffer, false); // Don't take copy because callback returns a newly created copy.
+ buffer = Glib::wrap(gst_buffer, false); // Don't take copy because callback returns a newly created copy.
return result;
}
diff --git a/gstreamer/src/basesrc.hg b/gstreamer/src/basesrc.hg
index 2813d26..1681b92 100644
--- a/gstreamer/src/basesrc.hg
+++ b/gstreamer/src/basesrc.hg
@@ -171,7 +171,7 @@ public:
#m4 _CONVERSION(`Glib::RefPtr<Gst::Caps>', `GstCaps*', `Glib::unwrap($3)')
/** Called to get the caps to report.
*/
- _WRAP_VFUNC(Glib::RefPtr<Gst::Caps> get_caps() const, "get_caps")
+ _WRAP_VFUNC(Glib::RefPtr<Gst::Caps> get_caps(Glib::RefPtr<Gst::Caps> caps) const, "get_caps")
#m4 _CONVERSION(`GstCaps*', `const Glib::RefPtr<Gst::Caps>&', `Glib::wrap($3, true)')
/** Notify subclass of changed output caps.
@@ -182,10 +182,6 @@ public:
*/
_WRAP_VFUNC(bool negotiate(), "negotiate")
- /** 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.
*/
@@ -195,7 +191,7 @@ public:
*/
_WRAP_VFUNC(bool stop(), "stop")
-#m4 _CONVERSION(`GstBuffer*', `const Glib::RefPtr<Gst::Buffer>&', `Gst::wrap($3, true)')
+#m4 _CONVERSION(`GstBuffer*', `const Glib::RefPtr<Gst::Buffer>&', `Glib::wrap($3, true)')
#m4 _CONVERSION(`GstClockTime*', `ClockTime&', `*($3)')
/** 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.
@@ -217,7 +213,7 @@ public:
*/
_WRAP_VFUNC(bool unlock(), "unlock")
-#m4 _CONVERSION(`GstEvent*', `const Glib::RefPtr<Gst::Event>&', `Gst::wrap($3, true)')
+#m4 _CONVERSION(`GstEvent*', `const Glib::RefPtr<Gst::Event>&', `Glib::wrap($3, true)')
/** Override this to implement custom event handling.
*/
_WRAP_VFUNC(bool event(const Glib::RefPtr<Gst::Event>& event), "event")
@@ -228,23 +224,15 @@ public:
*/
virtual bool do_seek_vfunc(Gst::Segment& segment);
-#m4 _CONVERSION(`GstQuery*', `const Glib::RefPtr<Gst::Query>&', `Gst::wrap($3, true)')
+#m4 _CONVERSION(`GstQuery*', `const Glib::RefPtr<Gst::Query>&', `Glib::wrap($3, true)')
/** 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")
-
/** 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")
+ _WRAP_VFUNC(Glib::RefPtr<Gst::Caps> 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.
diff --git a/gstreamer/src/basetransform.ccg b/gstreamer/src/basetransform.ccg
index 5cb7b26..3ba40bb 100644
--- a/gstreamer/src/basetransform.ccg
+++ b/gstreamer/src/basetransform.ccg
@@ -164,7 +164,7 @@ GstFlowReturn BaseTransform_Class::prepare_output_buffer_vfunc_callback(GstBaseT
// Call the virtual member method, which derived classes might override.
const GstFlowReturn result =
static_cast<GstFlowReturn>(obj->prepare_output_buffer_vfunc(
- Gst::wrap(input, true), size , Glib::wrap(caps, true), cpp_buffer));
+ Glib::wrap(input, true), size , Glib::wrap(caps, true), cpp_buffer));
*buffer = cpp_buffer->gobj_copy();
return result;
}
@@ -199,7 +199,7 @@ FlowReturn Gst::BaseTransform::prepare_output_buffer_vfunc(const Glib::RefPtr<Gs
const Gst::FlowReturn result =
static_cast<Gst::FlowReturn>((*base->prepare_output_buffer)(gobj(),
Glib::unwrap(input), size, Glib::unwrap(caps), &gst_buffer));
- buffer = Gst::wrap(gst_buffer, false); // Don't take copy because callback returns a newly created copy.
+ buffer = Glib::wrap(gst_buffer, false); // Don't take copy because callback returns a newly created copy.
return result;
}
diff --git a/gstreamer/src/basetransform.hg b/gstreamer/src/basetransform.hg
index e83c6c8..6b64d3d 100644
--- a/gstreamer/src/basetransform.hg
+++ b/gstreamer/src/basetransform.hg
@@ -213,13 +213,13 @@ public:
*/
virtual bool stop_vfunc();
-#m4 _CONVERSION(`GstEvent*', `const Glib::RefPtr<Gst::Event>&', `Gst::wrap($3, true)')
+#m4 _CONVERSION(`GstEvent*', `const Glib::RefPtr<Gst::Event>&', `Glib::wrap($3, 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")
-#m4 _CONVERSION(`GstBuffer*', `const Glib::RefPtr<Gst::Buffer>&', `Gst::wrap($3, true)')
+#m4 _CONVERSION(`GstBuffer*', `const Glib::RefPtr<Gst::Buffer>&', `Glib::wrap($3, true)')
/** Required if the element does not operate in-place. Transforms one
* incoming buffer to one outgoing buffer. The function is allowed to change
diff --git a/gstreamer/src/buffer.ccg b/gstreamer/src/buffer.ccg
index 9cdebc4..9ff5695 100644
--- a/gstreamer/src/buffer.ccg
+++ b/gstreamer/src/buffer.ccg
@@ -27,12 +27,12 @@ namespace Gst
Glib::RefPtr<Gst::Buffer> Buffer::copy() const
{
- return Gst::wrap(gst_buffer_copy(gobj()));
+ return Glib::wrap(gst_buffer_copy(gobj()));
}
Glib::RefPtr<Gst::Buffer> Buffer::create_writable()
{
- return Gst::wrap(gst_buffer_make_writable(gobj()));
+ return Glib::wrap(gst_buffer_make_writable(gobj()));
}
} // namespace Gst
diff --git a/gstreamer/src/bufferlist.ccg b/gstreamer/src/bufferlist.ccg
index c9acfdc..798679b 100644
--- a/gstreamer/src/bufferlist.ccg
+++ b/gstreamer/src/bufferlist.ccg
@@ -31,7 +31,7 @@ static bool BufferList_Foreach_gstreamermm_callback(GstBuffer** buffer, tguint i
try
{
// First wrap the original buffer.
- Glib::RefPtr<Gst::Buffer> temp = Gst::wrap(*buffer, true);
+ Glib::RefPtr<Gst::Buffer> temp = Glib::wrap(*buffer, true);
// Call the slot which can modify the buffer (ie. set it to a new one or
// clear it altogether).
@@ -77,7 +77,7 @@ bool BufferList::is_writable() const
Glib::RefPtr<BufferList> BufferList::create_writable()
{
- return Gst::wrap(gst_buffer_list_make_writable(gobj()));
+ return Glib::wrap(gst_buffer_list_make_writable(gobj()));
}
void BufferList::foreach(const SlotForeach& slot)
diff --git a/gstreamer/src/discoverer.hg b/gstreamer/src/discoverer.hg
index 62f7f1c..8000114 100644
--- a/gstreamer/src/discoverer.hg
+++ b/gstreamer/src/discoverer.hg
@@ -62,7 +62,7 @@ public:
_WRAP_PROPERTY("timeout", guint64)
-#m4 _CONVERSION(`GstDiscovererInfo*', `const Glib::RefPtr<DiscovererInfo>&', `Gst::wrap($3,true)')
+#m4 _CONVERSION(`GstDiscovererInfo*', `const Glib::RefPtr<DiscovererInfo>&', `Glib::wrap($3,true)')
#m4 _CONVERSION(`const GError*', `const Glib::Error&', `Glib::Error(const_cast<GError*>($3), true)')
_WRAP_SIGNAL(void discovered(const Glib::RefPtr<DiscovererInfo>& info, const Glib::Error& error),
"discovered")
diff --git a/gstreamer/src/element.ccg b/gstreamer/src/element.ccg
index 4b770fd..b79aac1 100644
--- a/gstreamer/src/element.ccg
+++ b/gstreamer/src/element.ccg
@@ -122,7 +122,7 @@ bool Element::query_duration(Format& format) const
bool Element::send_event(const Glib::RefPtr<Gst::Event>& event)
{
event->reference();
- return gst_element_send_event(gobj(), Gst::unwrap(event));
+ return gst_element_send_event(gobj(), Glib::unwrap(event));
}
gboolean Element_Class::set_clock_vfunc_callback(GstElement* self, GstClock* clock)
diff --git a/gstreamer/src/element.hg b/gstreamer/src/element.hg
index 35b12fa..d920c20 100644
--- a/gstreamer/src/element.hg
+++ b/gstreamer/src/element.hg
@@ -394,12 +394,12 @@ public:
*/
virtual Glib::ArrayHandle<QueryType> get_query_types_vfunc() const;
-#m4 _CONVERSION(`GstEvent*',`const Glib::RefPtr<Gst::Event>&', `Gst::wrap($3, true)')
+#m4 _CONVERSION(`GstEvent*',`const Glib::RefPtr<Gst::Event>&', `Glib::wrap($3, true)')
/** Send a Gst::Event to the element.
*/
_WRAP_VFUNC(bool send_event(const Glib::RefPtr<Gst::Event>& event), "send_event")
-#m4 _CONVERSION(`GstQuery*',`const Glib::RefPtr<Gst::Query>&', `Gst::wrap($3, true)')
+#m4 _CONVERSION(`GstQuery*',`const Glib::RefPtr<Gst::Query>&', `Glib::wrap($3, true)')
/** Perform a Gst::Query on the element.
*/
_WRAP_VFUNC(bool query(const Glib::RefPtr<Gst::Query>& query) const, "query")
diff --git a/gstreamer/src/gst_vfuncs.defs b/gstreamer/src/gst_vfuncs.defs
index ba1d9ea..153e7c9 100644
--- a/gstreamer/src/gst_vfuncs.defs
+++ b/gstreamer/src/gst_vfuncs.defs
@@ -120,6 +120,9 @@
(define-vfunc get_caps
(of-object "GstBaseSink")
(return-type "GstCaps*")
+ (parameters
+ '("GstCaps*" "filter")
+ )
)
(define-vfunc set_caps
@@ -205,7 +208,7 @@
(define-vfunc fixate
(of-object "GstBaseSink")
- (return-type "void")
+ (return-type "GstCaps*")
(parameters
'("GstCaps*" "caps")
)
@@ -229,6 +232,9 @@
(define-vfunc get_caps
(of-object "GstBaseSrc")
(return-type "GstCaps*")
+ (parameters
+ '("GstCaps*" "filter")
+ )
)
(define-vfunc set_caps
@@ -328,7 +334,7 @@
(define-vfunc fixate
(of-object "GstBaseSrc")
- (return-type "void")
+ (return-type "GstCaps*")
(parameters
'("GstCaps*" "caps")
)
diff --git a/gstreamer/src/pad.ccg b/gstreamer/src/pad.ccg
index f1f1ffc..1cf3509 100644
--- a/gstreamer/src/pad.ccg
+++ b/gstreamer/src/pad.ccg
@@ -60,7 +60,7 @@ static gboolean Pad_Data_gstreamermm_callback(GstPad* pad, GstMiniObject* mini_o
try
{
- return (*the_slot)(Glib::wrap(pad, true), Gst::wrap(mini_obj, true));
+ return (*the_slot)(Glib::wrap(pad, true), Glib::wrap(mini_obj, true));
}
catch(...)
{
diff --git a/tests/test-miniobject-wrap.cc b/tests/test-miniobject-wrap.cc
index 9142617..d3bc5d3 100644
--- a/tests/test-miniobject-wrap.cc
+++ b/tests/test-miniobject-wrap.cc
@@ -30,7 +30,7 @@ int main(int argc, char** argv)
GError* cerror = g_error_new_literal(GST_CORE_ERROR, GST_CORE_ERROR_FAILED, "test error message");
GstMessage* cmessage = gst_message_new_warning(cobject, cerror, "test debug text");
- Glib::RefPtr<Gst::Message> message = Gst::wrap(cmessage);
+ Glib::RefPtr<Gst::Message> message = Glib::wrap(cmessage);
std::cout << "C++ message instance is !null: " << (bool)(message) << std::endl;
diff --git a/tools/m4/convert_gst.m4 b/tools/m4/convert_gst.m4
index f7cef0c..c3370de 100644
--- a/tools/m4/convert_gst.m4
+++ b/tools/m4/convert_gst.m4
@@ -55,15 +55,15 @@ _CONV_GLIB_ENUM(ThreadPriority)
dnl ############### gstreamermm Class Conversions ######################
dnl Buffer
-_CONVERSION(`GstBuffer*',`Glib::RefPtr<Gst::Buffer>',`Gst::wrap($3)')
-_CONVERSION(`const Glib::RefPtr<Gst::Buffer>&',`GstBuffer*', `Gst::unwrap($3)')
-_CONVERSION(`const Glib::RefPtr<const Gst::Buffer>&',`GstBuffer*', `const_cast<GstBuffer*>(Gst::unwrap($3))')
-_CONVERSION(`const Glib::RefPtr<Gst::Buffer>&',`const GstBuffer*', `Gst::unwrap($3)')
-_CONVERSION(`Glib::RefPtr<Gst::Buffer>',`GstBuffer*', `Gst::unwrap($3)')
+_CONVERSION(`GstBuffer*',`Glib::RefPtr<Gst::Buffer>',`Glib::wrap($3)')
+_CONVERSION(`const Glib::RefPtr<Gst::Buffer>&',`GstBuffer*', `Glib::unwrap($3)')
+_CONVERSION(`const Glib::RefPtr<const Gst::Buffer>&',`GstBuffer*',
`const_cast<GstBuffer*>(Glib::unwrap($3))')
+_CONVERSION(`const Glib::RefPtr<Gst::Buffer>&',`const GstBuffer*', `Glib::unwrap($3)')
+_CONVERSION(`Glib::RefPtr<Gst::Buffer>',`GstBuffer*', `Glib::unwrap($3)')
dnl BufferList
-_CONVERSION(`Glib::RefPtr<Gst::BufferList>',`GstBufferList*', `Gst::unwrap($3)')
-_CONVERSION(`GstBufferList*', `Glib::RefPtr<BufferList>', `Gst::wrap($3)')
+_CONVERSION(`Glib::RefPtr<Gst::BufferList>',`GstBufferList*', `Glib::unwrap($3)')
+_CONVERSION(`GstBufferList*', `Glib::RefPtr<BufferList>', `Glib::wrap($3)')
_CONVERSION(`const Glib::RefPtr<Gst::BufferList>&', `GstBufferList*', `Glib::unwrap($3)')
dnl Bus
@@ -95,11 +95,11 @@ _CONVERSION(`const Glib::RefPtr<ColorBalanceChannel>&',`GstColorBalanceChannel*'
_CONVERSION(`const Glib::RefPtr<const
ColorBalanceChannel>&',`GstColorBalanceChannel*',`const_cast<GstColorBalanceChannel*>(Glib::unwrap($3))')
dnl DiscovererInfo
-_CONVERSION(`GstDiscovererInfo*',`Glib::RefPtr<DiscovererInfo>',`Gst::wrap($3)')
-_CONVERSION(`const Glib::RefPtr<DiscovererInfo>&',`GstDiscovererInfo*',`Gst::unwrap($3)')
+_CONVERSION(`GstDiscovererInfo*',`Glib::RefPtr<DiscovererInfo>',`Glib::wrap($3)')
+_CONVERSION(`const Glib::RefPtr<DiscovererInfo>&',`GstDiscovererInfo*',`Glib::unwrap($3)')
dnl DiscovererStreamInfo
-_CONVERSION(`GstDiscovererStreamInfo*', `Glib::RefPtr<DiscovererStreamInfo>', `Gst::wrap($3)')
+_CONVERSION(`GstDiscovererStreamInfo*', `Glib::RefPtr<DiscovererStreamInfo>', `Glib::wrap($3)')
dnl Element
_CONVERSION(`Glib::RefPtr<Gst::Element>',`GstElement*', `Glib::unwrap($3)')
@@ -115,7 +115,7 @@ _CONVERSION(`GstElementFactory*',`Glib::RefPtr<const Gst::ElementFactory>',`Glib
_CONVERSION(`const Glib::RefPtr<Gst::ElementFactory>&',`GstElementFactory*', `Glib::unwrap($3)')
dnl Event
-_CONVERSION(`const Glib::RefPtr<Gst::Event>&',`GstEvent*', `Gst::unwrap($3)')
+_CONVERSION(`const Glib::RefPtr<Gst::Event>&',`GstEvent*', `Glib::unwrap($3)')
dnl Index
_CONVERSION(`GstIndex*',`Glib::RefPtr<Gst::Index>',`Glib::wrap($3)')
@@ -135,11 +135,11 @@ _CONVERSION(`GstIterator*',`Gst::IteratorBasic<const Gst::QueryTypeDefinition>',
dnl Message
_CONVERSION(`GstMessage*',`Glib::RefPtr<Gst::Message>',`Gst::Message::wrap($3)')
_CONVERSION(`GstMessage*',`Glib::RefPtr<const Gst::Message>',`Gst::Message::wrap($3)')
-_CONVERSION(`const Glib::RefPtr<Gst::Message>&',`GstMessage*', `Gst::unwrap($3)')
+_CONVERSION(`const Glib::RefPtr<Gst::Message>&',`GstMessage*', `Glib::unwrap($3)')
dnl MiniObject
_CONVERSION(`GstMiniObject*',`Glib::RefPtr<MiniObject>',`Glib::wrap($3)')
-_CONVERSION(`const Glib::RefPtr<Gst::MiniObject>&',`GstMiniObject*',`Gst::unwrap($3)')
+_CONVERSION(`const Glib::RefPtr<Gst::MiniObject>&',`GstMiniObject*',`Glib::unwrap($3)')
dnl Mixer
_CONVERSION(`const Glib::RefPtr<Gst::MixerOptions>&',`GstMixerOptions*', `Glib::unwrap($3)')
@@ -175,7 +175,7 @@ _CONVERSION(`GstPluginFeature*',`Glib::RefPtr<Gst::PluginFeature>',`Glib::wrap($
_CONVERSION(`const Glib::RefPtr<Gst::PluginFeature>&',`GstPluginFeature*',`Glib::unwrap($3)')
dnl Query
-_CONVERSION(`const Glib::RefPtr<Gst::Query>&',`GstQuery*', `Gst::unwrap($3)')
+_CONVERSION(`const Glib::RefPtr<Gst::Query>&',`GstQuery*', `Glib::unwrap($3)')
dnl Registry
_CONVERSION(`GstRegistry*',`Glib::RefPtr<Gst::Registry>', `Glib::wrap($3)')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]