[gstreamermm] revert 648b89f5fe715c7c96a5824df999e9f2acb6f220



commit 88988a55c16f1643914f91461e86eb4c9d5dd03a
Author: Marcin Kolny <marcin kolny gmail com>
Date:   Fri Oct 16 11:08:46 2015 +0000

    revert 648b89f5fe715c7c96a5824df999e9f2acb6f220
    
    Actually, initializing plugins doesn't take so much time. Moreover,
    there is no possibility to cast elements created by ElementFactory
    class.

 .../extra_defs_gen/generate_plugin_gmmproc_file.cc |   25 --------------------
 1 files changed, 0 insertions(+), 25 deletions(-)
---
diff --git a/tools/extra_defs_gen/generate_plugin_gmmproc_file.cc 
b/tools/extra_defs_gen/generate_plugin_gmmproc_file.cc
index f65a573..8c97616 100644
--- a/tools/extra_defs_gen/generate_plugin_gmmproc_file.cc
+++ b/tools/extra_defs_gen/generate_plugin_gmmproc_file.cc
@@ -675,8 +675,6 @@ static void generate_hg_file(const std::string& includeMacroCalls,
     std::cout << interfaceMacros << std::endl;
 
   std::cout << "  _IS_GSTREAMERMM_PLUGIN" << std::endl;
-  std::cout << "  _NO_WRAP_INIT_REGISTRATION" << std::endl;
-  std::cout << "  _CUSTOM_WRAP_FUNCTION" << std::endl << std::endl;
 
   std::cout << "protected:" << std::endl;
   std::cout << "  " << cppTypeName << "();" << std::endl;
@@ -742,9 +740,6 @@ static void generate_ccg_file(const std::string& enumGTypeFunctionDefinitions,
   std::cout << "      factory = GST_ELEMENT_FACTORY(feature);" << std::endl;
   std::cout << "      type = gst_element_factory_get_element_type(factory);" << std::endl;
   std::cout << "      g_object_unref(factory);" << std::endl;
-  std::cout << std::endl;
-  std::cout << "      // Register the new type with wrapping system" << std::endl;
-  std::cout << "      Glib::wrap_register(type, &" << nmspace << "::" << cppTypeName << "_Class::wrap_new);" 
<< std::endl;
   std::cout << "    }" << std::endl;
   std::cout << "  }" << std::endl << std::endl;
 
@@ -769,26 +764,6 @@ static void generate_ccg_file(const std::string& enumGTypeFunctionDefinitions,
     std::cout << actionSignalsMethodDefinitions;
 
   std::cout << '}' << std::endl;
-
-  // Generate the custom Glib::wrap() function that pre-registers the
-  // wrap_new() function before calling Glib::wrap_auto().
-  std::string returnType = "Glib::RefPtr<" + (std::string) nmspace + "::" + cppTypeName + ">";
-
-  std::cout << "namespace Glib" << std::endl;
-  std::cout << '{' << std::endl << std::endl;
-  std::cout << returnType << " wrap(" << cTypeName << "* object, bool take_copy)" << std::endl;
-  std::cout << '{' << std::endl;
-  std::cout << "  static bool registered_wrap_new = false;" << std::endl;
-  std::cout << "  if(!registered_wrap_new)" << std::endl;
-  std::cout << "  {" << std::endl;
-  std::cout << "    // Call get *_get_type() function which does the registration." << std::endl;
-  std::cout << "    " << getTypeName << "();" << std::endl;
-  std::cout << "    registered_wrap_new = true;" << std::endl;
-  std::cout << "  }" << std::endl;
-  std::cout << std::endl;
-  std::cout << "  return " << returnType << "( dynamic_cast<" << nmspace << "::" << cppTypeName << "*> 
(Glib::wrap_auto ((GObject*)(object), take_copy)) );" << std::endl;
-  std::cout << '}' << std::endl << std::endl;
-  std::cout << '}' << std::endl;
 }
 
 } // anonymous namespace


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