gnomemm r1645 - in gstreamermm/trunk: . gstreamer gstreamer/gstreamermm gstreamer/src tools/m4
- From: jaalburqu svn gnome org
- To: svn-commits-list gnome org
- Subject: gnomemm r1645 - in gstreamermm/trunk: . gstreamer gstreamer/gstreamermm gstreamer/src tools/m4
- Date: Sun, 27 Jul 2008 21:13:39 +0000 (UTC)
Author: jaalburqu
Date: Sun Jul 27 21:13:39 2008
New Revision: 1645
URL: http://svn.gnome.org/viewvc/gnomemm?rev=1645&view=rev
Log:
2008-07-27 Josà Alburquerque <jaalburqu svn gnome org>
* gstreamer/src/index.ccg: Ensure that slot from set_resolver() is
deleted by using gst_index_set_resolver_full(). This fixes bug
#515373.
* configure.ac:
* gstreamer/gstreamermm-0.10.pc.in: Added libxml++-2.6 library
dependency. Updated min. required GStreamer version to 0.10.20 (I
think we're using API found in newer versions).
* gstreamer/gstreamermm/miniobject.cc:
* gstreamer/gstreamermm/miniobject.h: Added is_writable(),
make_writable() method docs. Found that make_writable() returns a
GstMiniObject* so return Glib::RefPtr<MiniObject> from make_writable()
and renamed to create_writable().
* gstreamer/src/bin.hg: Added get_children_cookie() (It has to do with
GstIterator but will have to become clearer when Gst::Iterator is
written).
* gstreamer/src/caps.ccg:
* gstreamer/src/caps.hg:
* tools/m4/convert_gst.m4: Rewrote save() and load() to use libxml++.
* gstreamer/src/pad.hg: Added _IGNORE's
* gstreamer/src/bus.hg: Typo.
Modified:
gstreamermm/trunk/ChangeLog
gstreamermm/trunk/configure.ac
gstreamermm/trunk/gstreamer/gstreamermm-0.10.pc.in
gstreamermm/trunk/gstreamer/gstreamermm/miniobject.cc
gstreamermm/trunk/gstreamer/gstreamermm/miniobject.h
gstreamermm/trunk/gstreamer/src/bin.hg
gstreamermm/trunk/gstreamer/src/bus.hg
gstreamermm/trunk/gstreamer/src/caps.ccg
gstreamermm/trunk/gstreamer/src/caps.hg
gstreamermm/trunk/gstreamer/src/index.ccg
gstreamermm/trunk/gstreamer/src/pad.hg
gstreamermm/trunk/tools/m4/convert_gst.m4
Modified: gstreamermm/trunk/configure.ac
==============================================================================
--- gstreamermm/trunk/configure.ac (original)
+++ gstreamermm/trunk/configure.ac Sun Jul 27 21:13:39 2008
@@ -127,13 +127,23 @@
#########################################################################
gstreamermm_min_glibmm_version=2.8.0
gstreamermm_min_gtkmm_version=2.10
-gstreamermm_min_gst_version=0.10
+gstreamermm_min_gst_version=0.10.20
+gstreamermm_min_libxmlpp_version=2.14.0
-PKG_CHECK_MODULES(GSTREAMERMM, glibmm-2.4 >= ${gstreamermm_min_glibmm_version} gstreamer-0.10 >= ${gstreamermm_min_gst_version} gstreamer-base-0.10 >= ${gstreamermm_min_gst_version})
+PKG_CHECK_MODULES(GSTREAMERMM, \
+ glibmm-2.4 >= ${gstreamermm_min_glibmm_version} \
+ gstreamer-0.10 >= ${gstreamermm_min_gst_version} \
+ gstreamer-base-0.10 >= ${gstreamermm_min_gst_version} \
+ libxml++-2.6 >= ${gstreamermm_min_libxmlpp_version} \
+ )
AC_SUBST(GSTREAMERMM_CFLAGS)
AC_SUBST(GSTREAMERMM_LIBS)
-PKG_CHECK_MODULES(GSTREAMERBASEMM, glibmm-2.4 >= ${gstreamermm_min_glibmm_version} gstreamer-plugins-base-0.10 >= ${gstreamermm_min_gst_version} gstreamer-interfaces-0.10 >= ${gstreamermm_min_gst_version})
+PKG_CHECK_MODULES(GSTREAMERBASEMM, \
+ glibmm-2.4 >= ${gstreamermm_min_glibmm_version} \
+ gstreamer-plugins-base-0.10 >= ${gstreamermm_min_gst_version} \
+ gstreamer-interfaces-0.10 >= ${gstreamermm_min_gst_version} \
+ )
AC_SUBST(GSTREAMERBASEMM_CFLAGS)
AC_SUBST(GSTREAMERBASEMM_LIBS)
@@ -280,7 +290,7 @@
gstmm_builddir=`pwd`
for sublib in gstreamer gstreamerbase
do
- if [ "x$gstmm_builddir" = "x$gstmm_srcdir" ]; then
+ if test "x$gstmm_builddir" = "x$gstmm_srcdir" ; then
GSTREAMERMM_DOXYGEN_INPUT="$GSTREAMERMM_DOXYGEN_INPUT $gstmm_builddir/$sublib/$sublib""mm/"
else
GSTREAMERMM_DOXYGEN_INPUT="$GSTREAMERMM_DOXYGEN_INPUT $gstmm_srcdir/$sublib/$sublib""mm/"
Modified: gstreamermm/trunk/gstreamer/gstreamermm-0.10.pc.in
==============================================================================
--- gstreamermm/trunk/gstreamer/gstreamermm-0.10.pc.in (original)
+++ gstreamermm/trunk/gstreamer/gstreamermm-0.10.pc.in Sun Jul 27 21:13:39 2008
@@ -5,7 +5,7 @@
Name: gstreamermm
Description: C++ wrapper for GStreamer
-Requires: glibmm-2.4 gstreamer-0.10 gstreamer-base-0.10
+Requires: glibmm-2.4 gstreamer-0.10 gstreamer-base-0.10 libxml++-2.6
Version: @VERSION@
Libs: -L${libdir} -lgstreamermm-0.10
Cflags: -I${includedir}/gstreamermm-0.10 -I${libdir}/gstreamermm-0.10/include
Modified: gstreamermm/trunk/gstreamer/gstreamermm/miniobject.cc
==============================================================================
--- gstreamermm/trunk/gstreamer/gstreamermm/miniobject.cc (original)
+++ gstreamermm/trunk/gstreamer/gstreamermm/miniobject.cc Sun Jul 27 21:13:39 2008
@@ -19,6 +19,7 @@
#include <gstreamermm/miniobject.h>
#include <gstreamermm/private/miniobject_p.h>
+#include <gstreamermm/wrap.h>
namespace Gst
{
@@ -97,10 +98,9 @@
return gst_mini_object_is_writable(gobject_);
}
-void
-MiniObject::make_writable()
+Glib::RefPtr<Gst::MiniObject> MiniObject::create_writable()
{
- gst_mini_object_make_writable(gobject_);
+ return Gst::wrap(gst_mini_object_make_writable(gobject_));
}
} //namespace Gst
Modified: gstreamermm/trunk/gstreamer/gstreamermm/miniobject.h
==============================================================================
--- gstreamermm/trunk/gstreamer/gstreamermm/miniobject.h (original)
+++ gstreamermm/trunk/gstreamer/gstreamermm/miniobject.h Sun Jul 27 21:13:39 2008
@@ -63,8 +63,26 @@
public:
//Glib::RefPtr<Gst::MiniObject> copy();
+ /** Checks if a mini-object is writable. A mini-object is writable if the
+ * reference count is one and the Gst::MINI_OBJECT_FLAG_READONLY flag is not
+ * set. Modification of a mini-object should only be done after verifying
+ * that it is writable.
+ *
+ * MT safe
+ *
+ * @return true if the object is writable.
+ */
bool is_writable() const;
- void make_writable();
+
+ /** Checks if a mini-object is writable. If not, a writable copy is made and
+ * returned. This gives away the reference to the original mini object, and
+ * returns a reference to the new object.
+ *
+ * MT safe
+ *
+ * @return A mini-object (possibly the same pointer) that is writable.
+ */
+ Glib::RefPtr<Gst::MiniObject> create_writable();
void reference() const;
void unreference() const;
Modified: gstreamermm/trunk/gstreamer/src/bin.hg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/bin.hg (original)
+++ gstreamermm/trunk/gstreamer/src/bin.hg Sun Jul 27 21:13:39 2008
@@ -202,6 +202,12 @@
*/
_MEMBER_GET(children, children, Glib::ListHandle< Glib::RefPtr<Element> >, GList*)
+ //TODO: Add reference to Gst::Iterator (which this is related to) in docs
+ //below when it is developed.
+ /** Gets the children cookie that watches the children list.
+ */
+ _MEMBER_GET(children_cookie, children_cookie, guint32, guint32)
+
/** Gets the number of children in the bin.
*/
_MEMBER_GET(num_children, numchildren, int, int)
Modified: gstreamermm/trunk/gstreamer/src/bus.hg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/bus.hg (original)
+++ gstreamermm/trunk/gstreamer/src/bus.hg Sun Jul 27 21:13:39 2008
@@ -56,7 +56,7 @@
*
* The bus can be polled with the poll() method. This methods blocks up to the
* specified timeout value until one of the specified messages types is posted
- * on the bus. The application can then _pop() the messages from the bus to
+ * on the bus. The application can then pop() the messages from the bus to
* handle them. Alternatively the application can register an asynchronous bus
* function using add_watch(). This function will install a GSource in the
* default glib main loop and will deliver messages a short while after they
Modified: gstreamermm/trunk/gstreamer/src/caps.ccg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/caps.ccg (original)
+++ gstreamermm/trunk/gstreamer/src/caps.ccg Sun Jul 27 21:13:39 2008
@@ -21,7 +21,6 @@
#include <gst/gstcaps.h>
#include <gstreamermm/structure.h>
-#include <map>
namespace Gst
{
@@ -105,4 +104,12 @@
//return Glib::wrap(gobj(), true);
}
+xmlpp::Node* Caps::save(xmlpp::Node* parent) const
+{
+ gst_caps_save_thyself(gobj(), parent->cobj());
+
+ // gst_caps_save_thyself() returns the parent node so return parent here also:
+ return parent;
+}
+
} //namespace Gst
Modified: gstreamermm/trunk/gstreamer/src/caps.hg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/caps.hg (original)
+++ gstreamermm/trunk/gstreamer/src/caps.hg Sun Jul 27 21:13:39 2008
@@ -22,6 +22,7 @@
#include <gst/gstcaps.h>
#include <gstreamermm/structure.h>
#include <gstreamermm/structurevalue.h>
+#include <libxml++/nodes/node.h>
_DEFS(gstreamermm,gst)
@@ -161,9 +162,14 @@
_WRAP_METHOD(bool simplify(), gst_caps_do_simplify)
- //TODO: Add overloads (and dependency) for libxml++?
- _WRAP_METHOD(xmlNodePtr save(xmlNodePtr parent) const, gst_caps_save_thyself)
- _WRAP_METHOD(static Glib::RefPtr<Caps> load(const xmlNodePtr parent), gst_caps_load_thyself)
+ /** Serializes a Gst::Caps to XML and adds it as a child node of @a parent.
+ * @param parent A XML parent node.
+ * @return The parent XML Node.
+ */
+ xmlpp::Node* save(xmlpp::Node* parent) const;
+ _IGNORE(gst_caps_save_thyself)
+
+ _WRAP_METHOD(static Glib::RefPtr<Caps> load(xmlpp::Node* parent), gst_caps_load_thyself)
_WRAP_METHOD(Glib::ustring to_string() const, gst_caps_to_string)
Modified: gstreamermm/trunk/gstreamer/src/index.ccg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/index.ccg (original)
+++ gstreamermm/trunk/gstreamer/src/index.ccg Sun Jul 27 21:13:39 2008
@@ -59,6 +59,11 @@
return result;
}
+static void Index_Resolver_gstreamermm_callback_destroy(void* data)
+{
+ delete static_cast<Index::SlotResolver*>(data);
+}
+
void Index::set_filter(const SlotFilter& slot)
{
SlotFilter* slot_copy = new SlotFilter(slot); //Deleted in Index_Filter_gstreamermm_callback_destroy
@@ -67,9 +72,8 @@
void Index::set_resolver(const SlotResolver& slot)
{
- //TODO: We need a destroy callback to destroy the slot_copy.
SlotResolver* slot_copy = new SlotResolver(slot);
- gst_index_set_resolver(gobj(), &Index_Resolver_gstreamermm_callback, slot_copy);
+ gst_index_set_resolver_full(gobj(), &Index_Resolver_gstreamermm_callback, slot_copy, &Index_Resolver_gstreamermm_callback_destroy);
}
}//namespace Gst
Modified: gstreamermm/trunk/gstreamer/src/pad.hg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/pad.hg (original)
+++ gstreamermm/trunk/gstreamer/src/pad.hg Sun Jul 27 21:13:39 2008
@@ -191,7 +191,12 @@
_IGNORE(gst_pad_add_data_probe,
gst_pad_add_event_probe,
- gst_pad_add_buffer_probe)
+ gst_pad_add_buffer_probe,
+ gst_pad_add_data_probe_full,
+ gst_pad_add_event_probe_full,
+ gst_pad_add_buffer_probe_full)
+
+ _IGNORE_SIGNAL(have_data)
_WRAP_METHOD(void remove_data_probe(guint handler_id), gst_pad_remove_data_probe)
_WRAP_METHOD(void remove_buffer_probe(guint handler_id), gst_pad_remove_buffer_probe)
Modified: gstreamermm/trunk/tools/m4/convert_gst.m4
==============================================================================
--- gstreamermm/trunk/tools/m4/convert_gst.m4 (original)
+++ gstreamermm/trunk/tools/m4/convert_gst.m4 Sun Jul 27 21:13:39 2008
@@ -175,5 +175,5 @@
_CONVERSION(`gchar*',`const Glib::ustring&',__GCHARP_TO_USTRING)
_CONVERSION(`const gchar*',`const Glib::ustring&',__GCHARP_TO_USTRING)
-#Other Conversions
-_CONVERSION(`const xmlNodePtr',`xmlNodePtr',`const_cast<xmlNodePtr>($3)')
+#libxml++ Conversions
+_CONVERSION(`xmlpp::Node*',`xmlNodePtr',`($3)->cobj()')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]