gnomemm r1773 - in gstreamermm/trunk: . gstreamer/gstreamermm tests
- From: jaalburqu svn gnome org
- To: svn-commits-list gnome org
- Subject: gnomemm r1773 - in gstreamermm/trunk: . gstreamer/gstreamermm tests
- Date: Wed, 5 Nov 2008 20:55:19 +0000 (UTC)
Author: jaalburqu
Date: Wed Nov 5 20:55:18 2008
New Revision: 1773
URL: http://svn.gnome.org/viewvc/gnomemm?rev=1773&view=rev
Log:
2008-11-05 Josà Alburquerque <jaalburqu svn gnome org>
* tools/m4/convert_gst.m4:
* gstreamer/gstreamermm/taglist.cc: Corrected Gst::TagList conversions
to take a copy of the GstTagList (as is done for Gst::Structure
which Gst::TagList derives from).
* tests/test-taglist.cc:
* tests/test-tagsetter.cc: Added if-else clauses when getting tags to
report errors if any.
* gstreamer/gstreamermm/object.cc: Used G_LIKELY in floating reference
aversion test as suggested in Bug #559209 (RichardF).
Modified:
gstreamermm/trunk/ChangeLog
gstreamermm/trunk/gstreamer/gstreamermm/object.cc
gstreamermm/trunk/gstreamer/gstreamermm/taglist.cc
gstreamermm/trunk/tests/test-taglist.cc
gstreamermm/trunk/tests/test-tagsetter.cc
Modified: gstreamermm/trunk/gstreamer/gstreamermm/object.cc
==============================================================================
--- gstreamermm/trunk/gstreamer/gstreamermm/object.cc (original)
+++ gstreamermm/trunk/gstreamer/gstreamermm/object.cc Wed Nov 5 20:55:18 2008
@@ -78,7 +78,7 @@
:
Glib::Object((GObject*)(castitem))
{
- if(GST_OBJECT_IS_FLOATING(castitem))
+ if(G_LIKELY(GST_OBJECT_IS_FLOATING(castitem)))
{
//The floating reference is convenience for C,
//but is useless and difficult for us:
Modified: gstreamermm/trunk/gstreamer/gstreamermm/taglist.cc
==============================================================================
--- gstreamermm/trunk/gstreamer/gstreamermm/taglist.cc (original)
+++ gstreamermm/trunk/gstreamer/gstreamermm/taglist.cc Wed Nov 5 20:55:18 2008
@@ -344,7 +344,7 @@
TagList TagList::merge(const TagList& other, TagMergeMode mode)
{
- return Glib::wrap(gst_tag_list_merge(gobj(), ((other).gobj()), ((GstTagMergeMode)(mode))), 0);
+ return Glib::wrap(gst_tag_list_merge(gobj(), ((other).gobj()), ((GstTagMergeMode)(mode))), 0, true);
}
guint TagList::get_tag_size(const Glib::ustring& tag) const
Modified: gstreamermm/trunk/tests/test-taglist.cc
==============================================================================
--- gstreamermm/trunk/tests/test-taglist.cc (original)
+++ gstreamermm/trunk/tests/test-taglist.cc Wed Nov 5 20:55:18 2008
@@ -41,14 +41,20 @@
Glib::ustring title;
if (taglist.get(Gst::Tag::TITLE, title))
std::cout << "Tag title is '" << title << "'." << std::endl;
+ else
+ std::cout << "Could not get tag `" << Gst::Tag::TITLE << "'." << std::endl;
Glib::ustring artist;
if (taglist.get(Gst::Tag::ARTIST, artist))
std::cout << "Tag artist is '" << artist << "'." << std::endl;
+ else
+ std::cout << "Could not get tag `" << Gst::Tag::ARTIST << "'." << std::endl;
guint rate;
if (taglist.get(Gst::Tag::BITRATE, rate))
std::cout << "Tag bit-rate is " << rate << "." << std::endl;
+ else
+ std::cout << "Could not get tag `" << Gst::Tag::BITRATE << "'." << std::endl;
return 0;
}
Modified: gstreamermm/trunk/tests/test-tagsetter.cc
==============================================================================
--- gstreamermm/trunk/tests/test-tagsetter.cc (original)
+++ gstreamermm/trunk/tests/test-tagsetter.cc Wed Nov 5 20:55:18 2008
@@ -47,8 +47,11 @@
setter->add_tag("bitrate", 192);
int bitrate = 0;
- setter->get_tag_list().get("bitrate", bitrate);
- std::cout << "bitrate = " << bitrate << "." << std::endl;
+
+ if(setter->get_tag_list().get("bitrate", bitrate))
+ std::cout << "bitrate = " << bitrate << "." << std::endl;
+ else
+ std::cout << "Could not get tag `bitrate' from tagsetter." << std::endl;
return 0;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]