gnomemm r1384 - in gstreamermm/trunk: . gstreamer/src tools/m4



Author: jaalburqu
Date: Wed Mar  5 00:47:23 2008
New Revision: 1384
URL: http://svn.gnome.org/viewvc/gnomemm?rev=1384&view=rev

Log:
2008-03-04  Josà Alburquerque  <jaalburqu svn gnome org>

	* gstreamer/src/Makefile_list_of_hg.am_fragment:
	* gstreamer/src/tagsetter.ccg:
	* gstreamer/src/tagsetter.hg: Added tagsetter

	* tools/m4/convert_gst.m4: Added initial conversions to be used with
	TagSetter when it is wrapped

Added:
   gstreamermm/trunk/gstreamer/src/tagsetter.ccg
   gstreamermm/trunk/gstreamer/src/tagsetter.hg
Modified:
   gstreamermm/trunk/ChangeLog
   gstreamermm/trunk/gstreamer/src/Makefile_list_of_hg.am_fragment
   gstreamermm/trunk/tools/m4/convert_gst.m4

Modified: gstreamermm/trunk/gstreamer/src/Makefile_list_of_hg.am_fragment
==============================================================================
--- gstreamermm/trunk/gstreamer/src/Makefile_list_of_hg.am_fragment	(original)
+++ gstreamermm/trunk/gstreamer/src/Makefile_list_of_hg.am_fragment	Wed Mar  5 00:47:23 2008
@@ -9,7 +9,7 @@
 	format.hg index.hg indexfactory.hg interface.hg iterator.hg \
 	message.hg pad.hg padtemplate.hg parse.hg pipeline.hg plugin.hg \
 	pluginfeature.hg query.hg registry.hg structure.hg systemclock.hg \
-	task.hg urihandler.hg value.hg xml.hg
+	tagsetter.hg task.hg urihandler.hg value.hg xml.hg
 
 files_general_deprecated_hg =
 

Added: gstreamermm/trunk/gstreamer/src/tagsetter.ccg
==============================================================================
--- (empty file)
+++ gstreamermm/trunk/gstreamer/src/tagsetter.ccg	Wed Mar  5 00:47:23 2008
@@ -0,0 +1,21 @@
+// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+
+/* gstreamermm - a C++ wrapper for gstreamer
+ *
+ * Copyright 2008 The gstreamermm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+

Added: gstreamermm/trunk/gstreamer/src/tagsetter.hg
==============================================================================
--- (empty file)
+++ gstreamermm/trunk/gstreamer/src/tagsetter.hg	Wed Mar  5 00:47:23 2008
@@ -0,0 +1,63 @@
+// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+
+/* gstreamermm - a C++ wrapper for gstreamer
+ *
+ * Copyright 2008 The gstreamermm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gst/gsttagsetter.h>
+#include <glibmm/interface.h>
+#include <gstreamermm/enums.h>
+
+_DEFS(gstreamermm,gst)
+
+namespace Gst
+{
+
+class TagList;
+
+/** TagSetter â Element interface that allows setting and retrieval of media
+ * metadata.
+ *
+ * Elements that support changing a stream's metadata will implement this
+ * interface. Examples of such elements are 'vorbisenc', 'theoraenc' and
+ * 'id3v2mux'.
+ *
+ * If you just want to retrieve metadata in your application then all you need
+ * to do is watch for tag messages on your pipeline's bus. This interface is
+ * only for setting metadata, not for extracting it. To set tags from the
+ * application, find tagsetter elements and set tags using e.g. merge_tags() or
+ * add_tags(). The application should do that before the element goes to
+ * STATE_PAUSED.
+ *
+ * Elements implementing the TagSetter interface often have to merge any
+ * tags received from upstream and the tags set by the application via the
+ * interface. This can be done like this:
+ *
+ * //TODO: Add code example from C API docs
+ */
+class TagSetter : public Glib::Interface
+{
+  _CLASS_INTERFACE(TagSetter, GstTagSetter, GST_TAG_SETTER, GstTagSetterIFace)
+
+public:
+  //TODO: _WRAP_METHOD(void merge_tags(const Glib::RefPtr<const TagList>& list, TagMergeMode), gst_tag_setter_merge_tags)
+  //TODO: Wrap rest of GstTagStetter method
+};
+
+} // namespace Gst
+

Modified: gstreamermm/trunk/tools/m4/convert_gst.m4
==============================================================================
--- gstreamermm/trunk/tools/m4/convert_gst.m4	(original)
+++ gstreamermm/trunk/tools/m4/convert_gst.m4	Wed Mar  5 00:47:23 2008
@@ -96,6 +96,9 @@
 _CONVERSION(`Structure&',`GstStructure*',`((GstStructure*)(&($3)))')
 _CONVERSION(`GstStructure*',`Structure*',`((Structure*) ($3))')
 
+#TagList
+_CONVERSION(`const Glib::RefPtr<const TagList>&',`const GstTagList*', `Glib::unwrap($3)')
+
 #URIHandler
 _CONVERSION(`const Glib::RefPtr<URIHandler>&',`GstURIHandler*',`Glib::unwrap($3)')
 
@@ -161,5 +164,6 @@
 _CONV_ENUM(Gst,State)
 _CONV_ENUM(Gst,StateChange)
 _CONV_ENUM(Gst,StateChangeReturn)
+_CONV_ENUM(Gst,TagMergeMode)
 _CONV_ENUM(Gst,TaskState)
 _CONV_ENUM(Gst,URIType)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]