gnomemm r1514 - in gstreamermm/trunk: . examples/ogg_player examples/ogg_player_gtkmm gstreamer/gstreamermm gstreamer/src
- From: jaalburqu svn gnome org
- To: svn-commits-list gnome org
- Subject: gnomemm r1514 - in gstreamermm/trunk: . examples/ogg_player examples/ogg_player_gtkmm gstreamer/gstreamermm gstreamer/src
- Date: Tue, 20 May 2008 04:12:48 +0000 (UTC)
Author: jaalburqu
Date: Tue May 20 04:12:48 2008
New Revision: 1514
URL: http://svn.gnome.org/viewvc/gnomemm?rev=1514&view=rev
Log:
2008-05-19 Josà Alburquerque <jaalburqu svn gnome org>
* examples/ogg_player/main.cc: Added comment on weird
Glib::RefPtr<Gst::QueryPosition> cast
* examples/ogg_player_gtkmm/main.cc: Caught std::runtime_error when
adding elements to pipeline
* gstreamer/src/pad.ccg:
* gstreamer/src/pad.hg: Made get_pad_template_caps() const
* gstreamer/src/xml.hg: Added parse_memory() docs
* gstreamer/gstreamermm/miniobject.cc:
* gstreamer/src/format.ccg: Fixed typos
* gstreamer/src/event.hg:
* gstreamer/src/message.hg:
* gstreamer/src/query.hg: Added TODO's
Modified:
gstreamermm/trunk/ChangeLog
gstreamermm/trunk/examples/ogg_player/main.cc
gstreamermm/trunk/examples/ogg_player_gtkmm/main.cc
gstreamermm/trunk/gstreamer/gstreamermm/miniobject.cc
gstreamermm/trunk/gstreamer/src/event.hg
gstreamermm/trunk/gstreamer/src/format.ccg
gstreamermm/trunk/gstreamer/src/message.hg
gstreamermm/trunk/gstreamer/src/pad.ccg
gstreamermm/trunk/gstreamer/src/pad.hg
gstreamermm/trunk/gstreamer/src/query.hg
gstreamermm/trunk/gstreamer/src/xml.hg
Modified: gstreamermm/trunk/examples/ogg_player/main.cc
==============================================================================
--- gstreamermm/trunk/examples/ogg_player/main.cc (original)
+++ gstreamermm/trunk/examples/ogg_player/main.cc Tue May 20 04:12:48 2008
@@ -39,7 +39,8 @@
if (pipeline->query(query)
&& pipeline->query_duration(fmt, len))
{
- //TODO: Document why we do this cast:
+ // Cast query's RefPtr to RefPtr<Gst::QueryPosition> to parse the
+ // pipeline's position query with the Gst::QueryPosition::parse() method
Glib::RefPtr<Gst::QueryPosition> query_pos =
Glib::RefPtr<Gst::QueryPosition>::cast_dynamic(query);
if(query_pos)
Modified: gstreamermm/trunk/examples/ogg_player_gtkmm/main.cc
==============================================================================
--- gstreamermm/trunk/examples/ogg_player_gtkmm/main.cc (original)
+++ gstreamermm/trunk/examples/ogg_player_gtkmm/main.cc Tue May 20 04:12:48 2008
@@ -98,12 +98,11 @@
// Put all elements in a pipeline:
- // TODO: Bin::add() does not actually throw an exception. It probably should.
try
{
pipeline->add(source)->add(parser)->add(decoder)->add(conv)->add(sink);
}
- catch(const Glib::Error& ex)
+ catch(const std::runtime_error& ex)
{
std::cerr << "Error while adding elements to the pipeline: " << ex.what() << std::endl;
return -1;
Modified: gstreamermm/trunk/gstreamer/gstreamermm/miniobject.cc
==============================================================================
--- gstreamermm/trunk/gstreamer/gstreamermm/miniobject.cc (original)
+++ gstreamermm/trunk/gstreamer/gstreamermm/miniobject.cc Tue May 20 04:12:48 2008
@@ -76,13 +76,12 @@
}
// TODO: Investigate how this works:
-
-// TODO: As far as I can tell, derived types must implement a
-// TODO: GstMiniObjectCopyFunction in a class structure.
-// TODO: gst_mini_object_class_init() sets the (*GstMiniObjectCopyFunction)(...)
-// TODO: to gst_mini_object_copy_default() which does nothing, but derived
-// TODO: types (like GstQuery, etc) have their own functions (like
-// TODO: gst_query_copy()) which do work. Jose
+// As far as I can tell, derived types must implement a
+// GstMiniObjectCopyFunction in a class structure.
+// gst_mini_object_class_init() sets the (*GstMiniObjectCopyFunction)(...)
+// to gst_mini_object_copy_default() which does nothing, but derived
+// types (like GstQuery, etc) have their own functions (like
+// gst_query_copy()) which do work. Jose
/*
Glib::RefPtr<Gst::MiniObject>
MiniObject::copy()
Modified: gstreamermm/trunk/gstreamer/src/event.hg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/event.hg (original)
+++ gstreamermm/trunk/gstreamer/src/event.hg Tue May 20 04:12:48 2008
@@ -149,6 +149,12 @@
_MEMBER_GET_GOBJECT(source, src, Gst::Object, GstObject*)
};
+//TODO: Modify create methods of derived Event classes to return
+//Glib::RefPtr<...> to the derived class and not just Gst::Event. Must deal
+//with GstStructure immutability problem (bug #510301) first because casting
+//Glib::RefPtrs references the objects which causes problems when GStreamer API
+//tries to modify the GstStructures of the objects.
+
/** A buffer size event. See create() for more details.
*/
class EventBufferSize : public Event
Modified: gstreamermm/trunk/gstreamer/src/format.ccg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/format.ccg (original)
+++ gstreamermm/trunk/gstreamer/src/format.ccg Tue May 20 04:12:48 2008
@@ -35,7 +35,7 @@
}
//TODO: should gst_format_register() be wrapped? It seems like it would be
-//TODO: extending GStreamer which may be best done with C API directly
+//extending GStreamer which may be best done with C API directly
Format register_format(const Glib::ustring& nick, const Glib::ustring& description)
{
return Format(gst_format_register(nick.c_str(), description.c_str()));
Modified: gstreamermm/trunk/gstreamer/src/message.hg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/message.hg (original)
+++ gstreamermm/trunk/gstreamer/src/message.hg Tue May 20 04:12:48 2008
@@ -78,6 +78,12 @@
_MEMBER_GET_GOBJECT(source, src, Gst::Object, GstObject*)
};
+//TODO: Modify create methods of derived Message classes to return
+//Glib::RefPtr<...> to the derived class and not just Gst::Message. Must deal
+//with GstStructure immutability problem (bug #510301) first because casting
+//Glib::RefPtrs references the objects which causes problems when GStreamer API
+//tries to modify the GstStructures of the objects.
+
class MessageApplication : public Message
{
public:
Modified: gstreamermm/trunk/gstreamer/src/pad.ccg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/pad.ccg (original)
+++ gstreamermm/trunk/gstreamer/src/pad.ccg Tue May 20 04:12:48 2008
@@ -84,9 +84,11 @@
namespace Gst
{
-Glib::RefPtr<Caps> Pad::get_pad_template_caps()
+// This is handcoded because the documentation tells us that we need to copy
+// the Caps
+Glib::RefPtr<const Caps> Pad::get_pad_template_caps() const
{
- const GstCaps* caps = gst_pad_get_pad_template_caps(gobj());
+ const GstCaps* caps = gst_pad_get_pad_template_caps(const_cast<GstPad*>(gobj()));
GstCaps* copy_caps = gst_caps_copy(caps);
return Glib::wrap(copy_caps, false);
}
Modified: gstreamermm/trunk/gstreamer/src/pad.hg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/pad.hg (original)
+++ gstreamermm/trunk/gstreamer/src/pad.hg Tue May 20 04:12:48 2008
@@ -113,10 +113,11 @@
_WRAP_METHOD(Glib::RefPtr<Caps> get_negotiated_caps(), gst_pad_get_negotiated_caps)
_WRAP_METHOD(Glib::RefPtr<const Caps> get_negotiated_caps() const, gst_pad_get_negotiated_caps, constversion)
- // Hand coded because the documentation tells us that we need to copy the Caps
- //TODO: Should/Could this be const?
- //TODO: Documentation.
- Glib::RefPtr<Caps> get_pad_template_caps();
+ /** Gets the capabilities for pad's template.
+ *
+ * @return The Gst::Caps of this pad template.
+ */
+ Glib::RefPtr<const Caps> get_pad_template_caps() const;
_WRAP_METHOD(bool set_caps (const Glib::RefPtr<Caps>& caps), gst_pad_set_caps)
_WRAP_METHOD(Glib::RefPtr<Pad> get_peer(), gst_pad_get_peer)
Modified: gstreamermm/trunk/gstreamer/src/query.hg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/query.hg (original)
+++ gstreamermm/trunk/gstreamer/src/query.hg Tue May 20 04:12:48 2008
@@ -72,6 +72,12 @@
bool get_details(QueryType type, QueryTypeDefinition& def);
};
+//TODO: Modify create methods of derived Query classes to return
+//Glib::RefPtr<...> to the derived class and not just Gst::Query. Must deal
+//with GstStructure immutability problem (bug #510301) first because casting
+//Glib::RefPtrs references the objects which causes problems when GStreamer API
+//tries to modify the GstStructures of the objects.
+
class QueryConvert : public Query
{
public:
Modified: gstreamermm/trunk/gstreamer/src/xml.hg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/xml.hg (original)
+++ gstreamermm/trunk/gstreamer/src/xml.hg Tue May 20 04:12:48 2008
@@ -42,7 +42,13 @@
_WRAP_METHOD(bool parse_doc(xmlDocPtr doc, const std::string& root), gst_xml_parse_doc)
_WRAP_METHOD(bool parse_file(const std::string& filename, const std::string& root), gst_xml_parse_file)
- //TODO: Documentation.
+ /** Fills the Gst::XML object with the corresponding elements from an in
+ * memory XML buffer.
+ *
+ * @param buffer The in memory XML buffer
+ * @param root The name of the root objects to build
+ * @return true on success
+ */
bool parse_memory(const std::string& buffer, const std::string& root);
//Note: gst_xml_get_element() returns a reference.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]