gnomemm r2025 - in gstreamermm/trunk: . examples/ogg_player_gtkmm gstreamer gstreamer/src tests tools/extra_defs_gen tools/m4



Author: jaalburqu
Date: Thu Jan 29 01:00:46 2009
New Revision: 2025
URL: http://svn.gnome.org/viewvc/gnomemm?rev=2025&view=rev

Log:
2009-01-28  Josà Alburquerque  <jaalburqu svn gnome org>

	* gstreamer/gstreamermm.h:
	* gstreamer/src/Makefile_list_of_hg.am_fragment:
	* gstreamer/src/propertyprobe.ccg:
	* gstreamer/src/propertyprobe.hg:
	* gstreamer/src/videoorientation.ccg:
	* gstreamer/src/videoorientation.hg: Added the last two interfaces,
	PropertyProbe and VideoOrientation, from the gst-plugins-base module.
	PropertyProbe, however, has methods that are difficult to wrap because
	some return GValueArray* and GParamSpec* and require GParamSpec*
	parameters.

	* tools/extra_defs_gen/generate_plugin_gmmproc_file.cc: Included
	commented code to have plug-ins extend the interfaces they implement.
	Made sure that the extra code generation is included only if the
	parent type has not already extended the interface.
	* tools/m4/ctocpp.m4: Added C to C++ conversions for interfaces that
	some plug-ins implement.

	* gstreamer/src/bin.hg:
	* gstreamer/src/element.hg:
	* gstreamer/src/pipeline.hg: Added these classes to Doxygen
	GstBaseClasses group.

	* gstreamer/src/childproxy.hg:
	* gstreamer/src/interface.hg:
	* gstreamer/src/tagsetter.hg:
	* gstreamer/src/urihandler.hg: Added these interfaces to Doxygen
	GstInterfaces group.

	* examples/ogg_player_gtkmm/player_window.cc: Modified so that the
	audio URI is set on 'm_source_element' instead of the filename (now
	that Gst::FileSrc properly extends Gst::URIHandler).

	* tests/Makefile.am: Marked TODO completed.

Added:
   gstreamermm/trunk/gstreamer/src/propertyprobe.ccg
   gstreamermm/trunk/gstreamer/src/propertyprobe.hg
   gstreamermm/trunk/gstreamer/src/videoorientation.ccg
   gstreamermm/trunk/gstreamer/src/videoorientation.hg
Modified:
   gstreamermm/trunk/ChangeLog
   gstreamermm/trunk/examples/ogg_player_gtkmm/player_window.cc
   gstreamermm/trunk/gstreamer/gstreamermm.h
   gstreamermm/trunk/gstreamer/src/Makefile_list_of_hg.am_fragment
   gstreamermm/trunk/gstreamer/src/bin.hg
   gstreamermm/trunk/gstreamer/src/childproxy.hg
   gstreamermm/trunk/gstreamer/src/element.hg
   gstreamermm/trunk/gstreamer/src/interface.hg
   gstreamermm/trunk/gstreamer/src/pipeline.hg
   gstreamermm/trunk/gstreamer/src/tagsetter.hg
   gstreamermm/trunk/gstreamer/src/urihandler.hg
   gstreamermm/trunk/tests/Makefile.am
   gstreamermm/trunk/tools/extra_defs_gen/generate_plugin_gmmproc_file.cc
   gstreamermm/trunk/tools/m4/ctocpp.m4

Modified: gstreamermm/trunk/examples/ogg_player_gtkmm/player_window.cc
==============================================================================
--- gstreamermm/trunk/examples/ogg_player_gtkmm/player_window.cc	(original)
+++ gstreamermm/trunk/examples/ogg_player_gtkmm/player_window.cc	Thu Jan 29 01:00:46 2009
@@ -286,10 +286,10 @@
   {
     working_dir = chooser.get_current_folder();
 
-    // Set location property on the file source. 
-    const std::string filename = chooser.get_filename(); //TODO: Can this use a URI?
-    m_source_element->property_location() = filename;
-    set_title( Glib::filename_display_basename(filename) );
+    // Set uri on the file source. 
+    const std::string uri = chooser.get_uri();
+    m_source_element->set_uri(uri);
+    set_title(uri);
 
     m_play_button.set_sensitive();
     display_label_progress(0, 0);

Modified: gstreamermm/trunk/gstreamer/gstreamermm.h
==============================================================================
--- gstreamermm/trunk/gstreamer/gstreamermm.h	(original)
+++ gstreamermm/trunk/gstreamer/gstreamermm.h	Thu Jan 29 01:00:46 2009
@@ -65,9 +65,11 @@
 #include <gstreamermm/mixer.h>
 #include <gstreamermm/mixeroptions.h>
 #include <gstreamermm/mixertrack.h>
+#include <gstreamermm/propertyprobe.h>
 #include <gstreamermm/tuner.h>
 #include <gstreamermm/tunerchannel.h>
 #include <gstreamermm/tunernorm.h>
+#include <gstreamermm/videoorientation.h>
 #include <gstreamermm/xoverlay.h>
 
 #endif // _GSTREAMERMM_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	Thu Jan 29 01:00:46 2009
@@ -15,8 +15,8 @@
 	audiofilter.hg audiosink.hg audiosrc.hg baseaudiosink.hg \
 	baseaudiosrc.hg cddabasesrc.hg videosink.hg \
    	colorbalance.hg colorbalancechannel.hg mixer.hg mixeroptions.hg \
-	mixertrack.hg navigation.hg tuner.hg tunerchannel.hg tunernorm.hg \
-	xoverlay.hg
+	mixertrack.hg navigation.hg propertyprobe.hg tuner.hg \
+	tunerchannel.hg tunernorm.hg videoorientation.hg xoverlay.hg
 
 files_general_deprecated_hg =
 

Modified: gstreamermm/trunk/gstreamer/src/bin.hg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/bin.hg	(original)
+++ gstreamermm/trunk/gstreamer/src/bin.hg	Thu Jan 29 01:00:46 2009
@@ -121,6 +121,7 @@
  * true.
  *
  * Last reviewed on 2006-04-28 (0.10.6)
+ * @ingroup GstBaseClasses
  */
 class Bin
 : public Element,

Modified: gstreamermm/trunk/gstreamer/src/childproxy.hg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/childproxy.hg	(original)
+++ gstreamermm/trunk/gstreamer/src/childproxy.hg	Thu Jan 29 01:00:46 2009
@@ -38,6 +38,7 @@
  * Property names are written as "child-name::property-name". The whole naming
  * scheme is recursive. Thus "child1::child2::property" is valid too, if
  * "child1" also implements the Gst::ChildProxy interface.
+ * @ingroup GstInterfaces
  */
 class ChildProxy : public Glib::Interface
 {

Modified: gstreamermm/trunk/gstreamer/src/element.hg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/element.hg	(original)
+++ gstreamermm/trunk/gstreamer/src/element.hg	Thu Jan 29 01:00:46 2009
@@ -134,6 +134,7 @@
  * specific situations.
  *
  * Last reviewed on 2006-03-12 (0.10.5)
+ * @ingroup GstBaseClasses
  */
 class Element : public Gst::Object
 {

Modified: gstreamermm/trunk/gstreamer/src/interface.hg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/interface.hg	(original)
+++ gstreamermm/trunk/gstreamer/src/interface.hg	Thu Jan 29 01:00:46 2009
@@ -29,6 +29,7 @@
  * allows runtime querying of interface availability.
  * This provides interface functionality on a per-instance basis and not a per-class
  * basis, which is the case for GObject.
+ * @ingroup GstInterfaces
  */
 class Interface : public Glib::Interface
 {

Modified: gstreamermm/trunk/gstreamer/src/pipeline.hg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/pipeline.hg	(original)
+++ gstreamermm/trunk/gstreamer/src/pipeline.hg	Thu Jan 29 01:00:46 2009
@@ -76,6 +76,7 @@
  * succeeded.
  *
  * Last reviewed on 2006-03-12 (0.10.5)
+ * @ingroup GstBaseClasses
  */
 class Pipeline : public Bin 
 {

Added: gstreamermm/trunk/gstreamer/src/propertyprobe.ccg
==============================================================================
--- (empty file)
+++ gstreamermm/trunk/gstreamer/src/propertyprobe.ccg	Thu Jan 29 01:00:46 2009
@@ -0,0 +1,18 @@
+/* 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.
+ */

Added: gstreamermm/trunk/gstreamer/src/propertyprobe.hg
==============================================================================
--- (empty file)
+++ gstreamermm/trunk/gstreamer/src/propertyprobe.hg	Thu Jan 29 01:00:46 2009
@@ -0,0 +1,45 @@
+/* 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/interfaces/propertyprobe.h>
+#include <glibmm/interface.h>
+
+_DEFS(gstreamermm,gst)
+
+namespace Gst
+{
+
+/** Gst::PropertyProbe - Interface for probing possible property values.
+ * The property probe is a way to autodetect allowed values for a GObject
+ * property. Its primary use is to autodetect device-names in several
+ * elements.
+ *
+ * The interface is implemented by many hardware sources and sinks.
+ * @ingroup GstInterfaces
+ */
+class PropertyProbe : public Glib::Interface
+{
+  _CLASS_INTERFACE(PropertyProbe, GstPropertyProbe, GST_PROPERTY_PROBE, GstPropertyProbeInterface)
+
+public:
+  //TODO: Wrap methods.
+  //TODO: Wrap vfuncs.
+};
+
+} // namespace Gst

Modified: gstreamermm/trunk/gstreamer/src/tagsetter.hg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/tagsetter.hg	(original)
+++ gstreamermm/trunk/gstreamer/src/tagsetter.hg	Thu Jan 29 01:00:46 2009
@@ -40,6 +40,7 @@
  * 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
  * Gst::STATE_PAUSED.
+ * @ingroup GstInterfaces
  */
 class TagSetter : public Glib::Interface
 {

Modified: gstreamermm/trunk/gstreamer/src/urihandler.hg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/urihandler.hg	(original)
+++ gstreamermm/trunk/gstreamer/src/urihandler.hg	Thu Jan 29 01:00:46 2009
@@ -45,6 +45,7 @@
  * Source and Sink plugins should implement this interface when possible.
  *
  * Last reviewed on 2005-11-09 (0.9.4)
+ * @ingroup GstInterfaces
  */
 class URIHandler : public Glib::Interface
 {

Added: gstreamermm/trunk/gstreamer/src/videoorientation.ccg
==============================================================================
--- (empty file)
+++ gstreamermm/trunk/gstreamer/src/videoorientation.ccg	Thu Jan 29 01:00:46 2009
@@ -0,0 +1,18 @@
+/* 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.
+ */

Added: gstreamermm/trunk/gstreamer/src/videoorientation.hg
==============================================================================
--- (empty file)
+++ gstreamermm/trunk/gstreamer/src/videoorientation.hg	Thu Jan 29 01:00:46 2009
@@ -0,0 +1,51 @@
+/* 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/interfaces/videoorientation.h>
+#include <glibmm/interface.h>
+
+_DEFS(gstreamermm,gst)
+
+namespace Gst
+{
+
+/** Gst::VideoOrientation - Interface for elements providing video orientation
+ * controls.
+ * The interface allows unified access to control flipping and autocenter
+ * operation of video-sources or operators.
+ * @ingroup GstInterfaces
+ */
+class VideoOrientation : public Glib::Interface
+{
+  _CLASS_INTERFACE(VideoOrientation, GstVideoOrientation, GST_VIDEO_ORIENTATION, GstVideoOrientationInterface)
+
+public:
+  _WRAP_METHOD(bool get_hcenter(int& center) const, gst_video_orientation_get_hcenter)
+  _WRAP_METHOD(bool get_hflip(bool& flip) const, gst_video_orientation_get_hflip)
+  _WRAP_METHOD(bool get_vcenter(int& center) const, gst_video_orientation_get_vcenter)
+  _WRAP_METHOD(bool get_vflip(bool& flip) const, gst_video_orientation_get_vflip)
+  _WRAP_METHOD(bool set_hcenter(int center), gst_video_orientation_set_hcenter)
+  _WRAP_METHOD(bool set_hflip(bool flip), gst_video_orientation_set_hflip)
+  _WRAP_METHOD(bool set_vcenter(int center), gst_video_orientation_set_vcenter)
+  _WRAP_METHOD(bool set_vflip(bool flip), gst_video_orientation_set_vflip)
+
+  //TODO: Wrap vfuncs.
+};
+
+} // namespace Gst

Modified: gstreamermm/trunk/tests/Makefile.am
==============================================================================
--- gstreamermm/trunk/tests/Makefile.am	(original)
+++ gstreamermm/trunk/tests/Makefile.am	Thu Jan 29 01:00:46 2009
@@ -12,8 +12,6 @@
 		  test-init-check-noargs test-init-noargs test-iterator \
 		  test-property-caps test-plugin-gen test-plugin-signals
 
-#TODO: Add test-ghost-pad to tests when bug #539108 is fixed.
-
 test_caps_SOURCES=test-caps.cc
 test_caps_LDFLAGS= GSTREAMERMM_LIBS@
 

Modified: gstreamermm/trunk/tools/extra_defs_gen/generate_plugin_gmmproc_file.cc
==============================================================================
--- gstreamermm/trunk/tools/extra_defs_gen/generate_plugin_gmmproc_file.cc	(original)
+++ gstreamermm/trunk/tools/extra_defs_gen/generate_plugin_gmmproc_file.cc	Thu Jan 29 01:00:46 2009
@@ -376,8 +376,12 @@
   guint n_interfaces = 0;
   GType* interfaces = g_type_interfaces(type, &n_interfaces);
 
+  GType parent_type = g_type_parent(type);
+
   for (int i = 0; i < n_interfaces; i++)
   {
+    if (!g_type_is_a(parent_type, interfaces[i]))
+    {
       Glib::ustring  interfaceCType = g_type_name(interfaces[i]) +
         (Glib::ustring) "*";
 
@@ -387,12 +391,10 @@
         cppExtends += ", ";
 
       interfaceMacros += "  _IMPLEMENTS_INTERFACE(_CCONVERT(`" +
-              interfaceCType + "',`type'))\n";
+        interfaceCType + "',`type'))\n";
 
-      //TODO: The following is to include the interface headers that the
-      //plug-in implements.  Uncomment after the rest of the interfaces have
-      //been wrapped.
-      //includeMacroCalls += "_CCONVERSION_INCLUDE(" + interfaceCType + ")dnl\n";
+      includeMacroCalls += "_CCONVERSION_INCLUDE(" + interfaceCType + ")dnl\n";
+    }
   }
 
   g_free(interfaces);
@@ -434,11 +436,8 @@
   std::cout << "class " << cppTypeName << std::endl;
   std::cout << ": public " << parentNameSpace << "::" << cppParentTypeName;
 
-  //TODO: The following  is to have the plug-in class extend the interfaces
-  //that it implements.  Include after the rest of the interfaces have been
-  //wrapped.
-  //if (!cppExtends.empty())
-  //  std::cout << ", " << cppExtends;
+  if (!cppExtends.empty())
+    std::cout << ", " << cppExtends;
   
   std::cout << std::endl;
 
@@ -447,10 +446,7 @@
     ", " << castMacro << ", " << parentNameSpace << "::" <<
     cppParentTypeName << ", " << cParentTypeName << ")" << std::endl;
 
-  //TODO: The following is to include the _IMPLEMENT_INTERFACE() macros in the
-  //plug-in class definition.  Uncomment after the rest of the interfaces have
-  //been wrapped.
-  //std::cout << interfaceMacros << std::endl;
+  std::cout << interfaceMacros << std::endl;
 
   std::cout << "  _IS_GSTREAMERMM_PLUGIN" << std::endl << std::endl;
 

Modified: gstreamermm/trunk/tools/m4/ctocpp.m4
==============================================================================
--- gstreamermm/trunk/tools/m4/ctocpp.m4	(original)
+++ gstreamermm/trunk/tools/m4/ctocpp.m4	Thu Jan 29 01:00:46 2009
@@ -14,6 +14,11 @@
 _CCONVERSION(`GstTagList*',`Gst::TagList',`Gst::TagList',,`<gstreamermm/taglist.h>')
 
 #Interfaces
+_CCONVERSION(`GstColorBalance*',`Gst::ColorBalance',`const Glib::RefPtr<Gst::ColorBalance>&',`Glib::RefPtr<Gst::ColorBalance>',`<gstreamermm/colorbalance.h>')
 _CCONVERSION(`GstImplementsInterface*',`Gst::Interface',`const Glib::RefPtr<Gst::Interface>&',`Glib::RefPtr<Gst::Interface>',`<gstreamermm/interface.h>')
+_CCONVERSION(`GstMixer*',`Gst::Mixer',`const Glib::RefPtr<Gst::Mixer>&',`Glib::RefPtr<Gst::Mixer>',`<gstreamermm/mixer.h>')
+_CCONVERSION(`GstNavigation*',`Gst::Navigation',`const Glib::RefPtr<Gst::Navigation>&',`Glib::RefPtr<Gst::Navigation>',`<gstreamermm/navigation.h>')
+_CCONVERSION(`GstPropertyProbe*',`Gst::PropertyProbe',`const Glib::RefPtr<Gst::PropertyProbe>&',`Glib::RefPtr<Gst::PropertyProbe>',`<gstreamermm/propertyprobe.h>')
+_CCONVERSION(`GstTagSetter*',`Gst::TagSetter',`const Glib::RefPtr<Gst::TagSetter>&',`Glib::RefPtr<Gst::TagSetter>',`<gstreamermm/tagsetter.h>')
 _CCONVERSION(`GstURIHandler*',`Gst::URIHandler',`const Glib::RefPtr<Gst::URIHandler>&',`Glib::RefPtr<Gst::URIHandler>',`<gstreamermm/urihandler.h>')
-
+_CCONVERSION(`GstXOverlay*',`Gst::XOverlay',`const Glib::RefPtr<Gst::XOverlay>&',`Glib::RefPtr<Gst::XOverlay>',`<gstreamermm/xoverlay.h>')



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