gnomemm r2092 - in gstreamermm/trunk: . examples/ogg_player



Author: jaalburqu
Date: Thu Mar 12 04:10:04 2009
New Revision: 2092
URL: http://svn.gnome.org/viewvc/gnomemm?rev=2092&view=rev

Log:
2009-03-12  Josà Alburquerque  <jaalburqu svn gnome org>

	* examples/ogg_player/main.cc: Modified example to use Gst::FileSrc
	"indirectly" by creating it with Gst::ElementFactory::create_element()
	to exemplify how a plug-in can be used "generically" and not by using
	its class wrapper so that users can see how to use plug-ins that are
	not wrapped.

Modified:
   gstreamermm/trunk/ChangeLog
   gstreamermm/trunk/examples/ogg_player/main.cc

Modified: gstreamermm/trunk/examples/ogg_player/main.cc
==============================================================================
--- gstreamermm/trunk/examples/ogg_player/main.cc	(original)
+++ gstreamermm/trunk/examples/ogg_player/main.cc	Thu Mar 12 04:10:04 2009
@@ -17,7 +17,6 @@
  */
 
 #include <gstreamermm.h>
-#include <gstreamermm/filesrc.h>
 #include <iostream>
 #include <iomanip>
 
@@ -141,7 +140,7 @@
   // Create the elements:
 
   // filsrc reads the file from disk:
-  Glib::RefPtr<Gst::FileSrc> source = Gst::FileSrc::create();
+  Glib::RefPtr<Gst::Element> source = Gst::ElementFactory::create_element("filesrc");
   if(!source)
     std::cerr << "filesrc element could not be created." << std::endl;
 
@@ -177,7 +176,7 @@
     data_probe_id = pad->add_data_probe( sigc::ptr_fun(&on_sink_pad_have_data) );
   //std::cout << "sink data probe id = " << data_probe_id << std::endl;
 
-  source->property_location() = filename;
+  source->set_property("location", filename);
 
   // Get the bus from the pipeline, 
   // and add a bus watch to the default main context with the default priority:



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