gnomemm r1712 - in clutter-gstreamermm/trunk: . clutter-gstreamer/src examples



Author: siavashs
Date: Mon Sep 22 20:24:40 2008
New Revision: 1712
URL: http://svn.gnome.org/viewvc/gnomemm?rev=1712&view=rev

Log:
Removed the VideoSink's default ctor and added create_element()

        * clutter-gstreamer/src/gst-video-sink.ccg:
        * clutter-gstreamer/src/gst-video-sink.hg: Removed the default ctor
        and added create_element()
        * examples/video-sink.cc: Updated to use the new api


Modified:
   clutter-gstreamermm/trunk/ChangeLog
   clutter-gstreamermm/trunk/clutter-gstreamer/src/gst-video-sink.ccg
   clutter-gstreamermm/trunk/clutter-gstreamer/src/gst-video-sink.hg
   clutter-gstreamermm/trunk/examples/video-sink.cc

Modified: clutter-gstreamermm/trunk/clutter-gstreamer/src/gst-video-sink.ccg
==============================================================================
--- clutter-gstreamermm/trunk/clutter-gstreamer/src/gst-video-sink.ccg	(original)
+++ clutter-gstreamermm/trunk/clutter-gstreamer/src/gst-video-sink.ccg	Mon Sep 22 20:24:40 2008
@@ -22,6 +22,11 @@
 namespace Gst
 {
 
+Glib::RefPtr< ::Gst::Element> VideoSink::create_element(const Glib::RefPtr<Texture>& texture)
+{
+  return Glib::wrap(clutter_gst_video_sink_new(texture->gobj()));
+}
+
 } //namespace Gst
 } //namespace Clutter
 

Modified: clutter-gstreamermm/trunk/clutter-gstreamer/src/gst-video-sink.hg
==============================================================================
--- clutter-gstreamermm/trunk/clutter-gstreamer/src/gst-video-sink.hg	(original)
+++ clutter-gstreamermm/trunk/clutter-gstreamer/src/gst-video-sink.hg	Mon Sep 22 20:24:40 2008
@@ -32,11 +32,9 @@
 {
   _CLASS_GOBJECT(VideoSink, ClutterGstVideoSink, CLUTTER_GST_VIDEO_SINK, ::Gst::BaseSink, GstBaseSink)
 
-protected:
-  _WRAP_CTOR(VideoSink(const Glib::RefPtr<Texture>& texture), clutter_gst_video_sink_new)
 
 public:
-  _WRAP_CREATE(const Glib::RefPtr<Texture>& texture)
+  static Glib::RefPtr< ::Gst::Element> create_element(const Glib::RefPtr<Texture>& texture);
 
   _WRAP_PROPERTY("texture", Glib::RefPtr<Texture>)
   _WRAP_PROPERTY("use-shaders", bool)

Modified: clutter-gstreamermm/trunk/examples/video-sink.cc
==============================================================================
--- clutter-gstreamermm/trunk/examples/video-sink.cc	(original)
+++ clutter-gstreamermm/trunk/examples/video-sink.cc	Mon Sep 22 20:24:40 2008
@@ -41,7 +41,7 @@
   Glib::RefPtr<Gst::Element> src;
   Glib::RefPtr<Gst::Element> warp;
   Glib::RefPtr<Gst::Element> colorspace;
-  Glib::RefPtr<Clutter::Gst::VideoSink> sink;
+  Glib::RefPtr<Gst::Element> sink;
 
   Clutter::init(&argc, &argv);
   Gst::init(argc, argv);
@@ -54,9 +54,8 @@
 
   // We need to set certain props on the target texture currently for
   // efficient/corrent playback onto the texture (which sucks a bit)
-  texture = Glib::wrap(CLUTTER_TEXTURE(g_object_new (CLUTTER_TYPE_TEXTURE, "sync-size", FALSE, "disable-slicing", TRUE, NULL)));
-  //texture = Clutter::Texture::create();
-  //texture->property_sync_size() = false;
+  texture = Clutter::Texture::create();
+  texture->property_sync_size() = false;
   //texture->property_disable_slicing() = true;
   
 
@@ -68,7 +67,7 @@
   src = Gst::ElementFactory::create_element("videotestsrc");
   warp = Gst::ElementFactory::create_element("warptv");
   colorspace = Gst::ElementFactory::create_element("ffmpegcolorspace");
-  sink = Clutter::Gst::VideoSink::create(texture);
+  sink = Clutter::Gst::VideoSink::create_element(texture);
 
   pipeline->add(src)->add(warp)->add(colorspace)->add(sink);
   src->link(warp)->link(colorspace)->link(sink);
@@ -77,6 +76,7 @@
 
   timeline->start();
 
+  stage->add_actor(texture);
   stage->show_all();
 
   Clutter::main();



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