gnomemm r1322 - in gstreamermm/trunk: . gstreamer/src tests
- From: jaalburqu svn gnome org
- To: svn-commits-list gnome org
- Subject: gnomemm r1322 - in gstreamermm/trunk: . gstreamer/src tests
- Date: Wed, 6 Feb 2008 19:32:35 +0000 (GMT)
Author: jaalburqu
Date: Wed Feb 6 19:32:35 2008
New Revision: 1322
URL: http://svn.gnome.org/viewvc/gnomemm?rev=1322&view=rev
Log:
2008-02-06 Josà Alburquerque <jaalburqu svn gnome org>
* gstreamer/src/caps.ccg:
* gstreamer/src/caps.hg: Renamed create_empty() to create() and
simple_valist() to set_simple_valist() (want to rename
set_simple_valist() to set_simple() and use variable arguments)
* gstreamer/src/structure.ccg:
* gstreamer/src/structure.hg:
* tests/test-structure.cc: Removed getter and setter methods with
Glib::QueryQuark for field name because Glib::QueryQuark can be
converted to Glib::ustring (so can use those with Glib::QueryQuark
just fine)
Modified:
gstreamermm/trunk/ChangeLog
gstreamermm/trunk/gstreamer/src/caps.ccg
gstreamermm/trunk/gstreamer/src/caps.hg
gstreamermm/trunk/gstreamer/src/structure.ccg
gstreamermm/trunk/gstreamer/src/structure.hg
gstreamermm/trunk/tests/test-structure.cc
Modified: gstreamermm/trunk/gstreamer/src/caps.ccg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/caps.ccg (original)
+++ gstreamermm/trunk/gstreamer/src/caps.ccg Wed Feb 6 19:32:35 2008
@@ -5,7 +5,7 @@
{
Glib::RefPtr<Caps>
-Caps::create_empty()
+Caps::create()
{
return Glib::wrap(gst_caps_new_empty(), false);
}
Modified: gstreamermm/trunk/gstreamer/src/caps.hg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/caps.hg (original)
+++ gstreamermm/trunk/gstreamer/src/caps.hg Wed Feb 6 19:32:35 2008
@@ -13,8 +13,7 @@
public:
//TODO: Why doesn't this use _WRAP_CREATE()?
- //ANS: Could it be because there are two void methods that create a Caps? -Jose
- static Glib::RefPtr<Caps> create_empty();
+ static Glib::RefPtr<Caps> create();
static Glib::RefPtr<Caps> create_any();
static Glib::RefPtr<Caps> create_full(Structure&);
@@ -31,7 +30,7 @@
_WRAP_METHOD(void remove_structure(guint idx), gst_caps_remove_structure)
_WRAP_METHOD(guint get_size() const, gst_caps_get_size)
- _WRAP_METHOD(void simple_valist(char* field, const va_list& varargs), gst_caps_set_simple_valist)
+ _WRAP_METHOD(void set_simple_valist(char* field, const va_list& varargs), gst_caps_set_simple_valist)
_WRAP_METHOD(bool is_any() const, gst_caps_is_any)
_WRAP_METHOD(bool is_empty() const, gst_caps_is_empty)
_WRAP_METHOD(bool is_fixed() const, gst_caps_is_fixed)
Modified: gstreamermm/trunk/gstreamer/src/structure.ccg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/structure.ccg (original)
+++ gstreamermm/trunk/gstreamer/src/structure.ccg Wed Feb 6 19:32:35 2008
@@ -23,17 +23,6 @@
gobject_ = gst_structure_empty_new(name.c_str());
}
-Structure::Structure(const Glib::QueryQuark& quark)
-{
- gobject_ = gst_structure_id_empty_new(quark);
-}
-
-void
-Structure::get_field(const Glib::QueryQuark& quark, Glib::ValueBase& value) const
-{
- value.init(gst_structure_id_get_value(gobj(), quark));
-}
-
void
Structure::get_field(const Glib::ustring& name, Glib::ValueBase& value) const
{
Modified: gstreamermm/trunk/gstreamer/src/structure.hg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/structure.hg (original)
+++ gstreamermm/trunk/gstreamer/src/structure.hg Wed Feb 6 19:32:35 2008
@@ -15,19 +15,14 @@
public:
Structure(const Glib::ustring& name);
- Structure(const Glib::QueryQuark& quark);
_WRAP_METHOD(int size() const, gst_structure_n_fields)
_WRAP_METHOD(void clear(), gst_structure_remove_all_fields)
- void get_field(const Glib::QueryQuark& field, Glib::ValueBase& value) const;
-
- _WRAP_METHOD(void set_field(const Glib::QueryQuark& field, const Glib::ValueBase& value), gst_structure_id_set_value)
+ _WRAP_METHOD(void set_field(const Glib::ustring& fieldname, const Glib::ValueBase& value), gst_structure_set_value)
void get_field(const Glib::ustring& fieldname, Glib::ValueBase& value) const;
- _WRAP_METHOD(void set_field(const Glib::ustring& fieldname, const Glib::ValueBase& value), gst_structure_set_value)
-
_WRAP_METHOD(void remove_field(const Glib::ustring& fieldname), gst_structure_remove_field)
_WRAP_METHOD(GType get_field_type(const Glib::ustring& fieldname) const, gst_structure_get_field_type)
Modified: gstreamermm/trunk/tests/test-structure.cc
==============================================================================
--- gstreamermm/trunk/tests/test-structure.cc (original)
+++ gstreamermm/trunk/tests/test-structure.cc Wed Feb 6 19:32:35 2008
@@ -5,7 +5,6 @@
{
Gst::init(argc, argv);
- Glib::ustring fieldName = "field";
Glib::RefPtr<Gst::Query> latencyQuery = Gst::QueryLatency::create();
Gst::Structure structure = latencyQuery->get_structure();
@@ -13,10 +12,10 @@
stringValue.init(Glib::Value<Glib::ustring>::value_type());
stringValue.set("Hello; This is a ustring.");
- structure.set_field(fieldName, stringValue);
+ structure.set_field("string", stringValue);
Glib::Value<Glib::ustring> value;
- structure.get_field(fieldName, value);
+ structure.get_field("string", value);
std::cout << "value = '" << value.get() << "'" << std::endl;
return 0;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]