gnomemm r2013 - in gstreamermm/trunk: . gstreamer gstreamer/src
- From: jaalburqu svn gnome org
- To: svn-commits-list gnome org
- Subject: gnomemm r2013 - in gstreamermm/trunk: . gstreamer gstreamer/src
- Date: Fri, 23 Jan 2009 22:43:16 +0000 (UTC)
Author: jaalburqu
Date: Fri Jan 23 22:43:16 2009
New Revision: 2013
URL: http://svn.gnome.org/viewvc/gnomemm?rev=2013&view=rev
Log:
2009-01-23 Josà Alburquerque <jaalburqu svn gnome org>
* gstreamer/gstreamermm.h:
* gstreamer/src/Makefile_list_of_hg.am_fragment:
* gstreamer/src/preset.ccg:
* gstreamer/src/preset.hg: Added GstPreset.
Added:
gstreamermm/trunk/gstreamer/src/preset.ccg
gstreamermm/trunk/gstreamer/src/preset.hg
Modified:
gstreamermm/trunk/ChangeLog
gstreamermm/trunk/gstreamer/gstreamermm.h
gstreamermm/trunk/gstreamer/src/Makefile_list_of_hg.am_fragment
Modified: gstreamermm/trunk/gstreamer/gstreamermm.h
==============================================================================
--- gstreamermm/trunk/gstreamer/gstreamermm.h (original)
+++ gstreamermm/trunk/gstreamer/gstreamermm.h Fri Jan 23 22:43:16 2009
@@ -32,6 +32,7 @@
#include <gstreamermm/pipeline.h>
#include <gstreamermm/plugin.h>
#include <gstreamermm/pluginfeature.h>
+#include <gstreamermm/preset.h>
#include <gstreamermm/query.h>
#include <gstreamermm/segment.h>
#include <gstreamermm/structure.h>
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 Fri Jan 23 22:43:16 2009
@@ -8,7 +8,7 @@
element.hg elementfactory.hg enums.hg error.hg event.hg filter.hg \
format.hg index.hg ghostpad.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 segment.hg \
+ plugin.hg pluginfeature.hg preset.hg query.hg registry.hg segment.hg \
structure.hg systemclock.hg taglist.hg tagsetter.hg task.hg \
urihandler.hg value.hg xml.hg \
basesrc.hg basesink.hg basetransform.hg pushsrc.hg audioclock.hg \
Added: gstreamermm/trunk/gstreamer/src/preset.ccg
==============================================================================
--- (empty file)
+++ gstreamermm/trunk/gstreamer/src/preset.ccg Fri Jan 23 22:43:16 2009
@@ -0,0 +1,35 @@
+/* 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 Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+ namespace Gst
+ {
+
+ bool Preset::get_meta(const Glib::ustring& name, const Glib::ustring& tag,
+ Glib::ustring& value) const
+ {
+ gchar** meta;
+
+ gboolean result = gst_preset_get_meta(const_cast<GstPreset*>(gobj()),
+ name.c_str(), tag.c_str(), meta);
+ value = *meta;
+ g_free(*meta);
+ return result;
+ }
+
+ }
Added: gstreamermm/trunk/gstreamer/src/preset.hg
==============================================================================
--- (empty file)
+++ gstreamermm/trunk/gstreamer/src/preset.hg Fri Jan 23 22:43:16 2009
@@ -0,0 +1,70 @@
+/* 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 Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser 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/gstpreset.h>
+#include <glibmm/interface.h>
+
+_DEFS(gstreamermm,gst)
+
+namespace Gst
+{
+
+/** GstPreset â helper interface for element presets.
+ * This interface offers methods to query and manipulate parameter preset sets.
+ * A preset is a bunch of property settings, together with meta data and a
+ * name. The name of a preset serves as key for subsequent method calls to
+ * manipulate single presets. All instances of one type will share the list of
+ * presets. The list is created on demand, if presets are not used, the list is
+ * not created.
+ *
+ * The interface comes with a default implementation that serves most plugins.
+ * Wrapper plugins will override most methods to implement support for the
+ * native preset format of those wrapped plugins. One method that is useful to
+ * be overridden is property_names_vfunc(). With that, one can control which
+ * properties are saved and in which order.
+ */
+class Preset : public Glib::Interface
+{
+ _CLASS_INTERFACE(Preset, GstPreset, GST_PRESET, GstPresetInterface)
+
+public:
+#m4 _CONVERSION(`gchar**', `Glib::StringArrayHandle', `Glib::StringArrayHandle($3, Glib::OWNERSHIP_DEEP)')
+ _WRAP_METHOD(Glib::StringArrayHandle get_preset_names() const, gst_preset_get_preset_names)
+ _WRAP_METHOD(Glib::StringArrayHandle get_property_names() const, gst_preset_get_property_names)
+ _WRAP_METHOD(bool load_preset(const Glib::ustring& name), gst_preset_load_preset)
+ _WRAP_METHOD(bool save_preset(const Glib::ustring& name), gst_preset_save_preset)
+ _WRAP_METHOD(bool rename_preset(const Glib::ustring& old_name, const Glib::ustring& new_name), gst_preset_rename_preset)
+ _WRAP_METHOD(bool delete_preset(const Glib::ustring& name), gst_preset_delete_preset)
+ _WRAP_METHOD(bool set_meta(const Glib::ustring& name, const Glib::ustring& tag, const Glib::ustring& value), gst_preset_set_meta)
+
+ /** Gets the @a value for an existing meta data tag. Meta data tag names can
+ * be something like e.g. "comment".
+ *
+ * @param name Preset name.
+ * @param tag Meta data item name.
+ * @param value Glib::ustring in which to store the value.
+ * @return true for success, false if e.g. there is no preset with that name
+ * or the is no value for the given tag.
+ */
+ bool get_meta(const Glib::ustring& name, const Glib::ustring& tag, Glib::ustring& value) const;
+
+ //TODO: Wrap vfuncs.
+};
+
+} // namespace Gst
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]