gephex--main--0.4--patch-1859

[email protected]
Newsgroups gmane.comp.video.gephex.devel
Message-ID <[email protected]>
Archive: [email protected]
New revision: gephex--main--0.4--patch-1859

--
Revision: gephex--main--0.4--patch-1859
Archive: [email protected]
Creator: The Gephex Source Archive <[email protected]>
Date: Sun Mar  6 18:56:09 CET 2005
Standard-date: 2005-03-06 17:56:09 GMT
Modified-files: base/src/utils/configmanager.cpp
    base/src/utils/configmanager.h doc/documentation.xml
    engine/src/engine/main.cpp qtgui/src/gui/main.cpp
New-patches: [email protected]/gephex--macport--0.4--patch-25
    [email protected]/gephex--macport--0.4--patch-26
    [email protected]/gephex--macport--0.4--patch-27
    [email protected]/gephex--main--0.4--patch-1859
Summary: [MERGE-REQUEST] Updated documentation, fixed bug #102
Keywords: 

Patches applied:

 * [email protected]/gephex--macport--0.4--patch-25
   <no summary provided>

 * [email protected]/gephex--macport--0.4--patch-26
   Updated documentation (more history)

 * [email protected]/gephex--macport--0.4--patch-27
   Removed "No error" exception in configmanager (bug #102)

* added files

    {arch}/gephex/gephex--macport/gephex--macport--0.4/[email protected]/patch-log/patch-25
    {arch}/gephex/gephex--macport/gephex--macport--0.4/[email protected]/patch-log/patch-26
    {arch}/gephex/gephex--macport/gephex--macport--0.4/[email protected]/patch-log/patch-27
    {arch}/gephex/gephex--main/gephex--main--0.4/[email protected]/patch-log/patch-1859

* modified files

--- orig/base/src/utils/configmanager.cpp
+++ mod/base/src/utils/configmanager.cpp
@@ -137,7 +137,8 @@
 
   static void create_cmdl_config(std::ostream& os,
                                  const ConfigManager::ParamList& params,
-                                 int argc, const char* argv[])
+                                 int argc, const char* argv[],
+				 bool& help_requested)
   {
     os << "cmdl {
";
 
@@ -148,15 +149,19 @@
         if (is_help(arg))
           {
             print_help(argv[0], params);
-            throw std::runtime_error("No error");
+	    help_requested = true;
           }
         else if (is_param(arg))
           os << arg.substr(2) << "
"; // strip leading "--"
         else
           {
-            std::cerr << "Invalid argument: '" << arg << "'
";
+	    std::stringstream strs;
+
+	    strs << "Invalid argument: '" << arg << "'
";
+
             print_help(argv[0], params);
-            throw std::runtime_error("No error");
+
+            throw std::runtime_error(strs.str().c_str());
           }
       }
     
@@ -178,8 +183,8 @@
         ConfigManager::CPMap::const_iterator cit = cpm.find(param_name);
 
         if (cit == cpm.end())
-          throw std::runtime_error("Unknown cmdl parameter: '--'"
-                                   + param_name);
+          throw std::runtime_error("Unknown cmdl parameter: '--"
+                                   + param_name + "'");
 
         check_type(sr, param_name, cit->second.m_type);
       }
@@ -199,7 +204,7 @@
   ConfigManager::ConfigManager(const std::string& cfile_name,
                              int argc, const char* argv[],
                              const ParamList& params)
-    : m_params(params), m_cf_file(0), m_cf_cmdl(0)
+    : m_params(params), m_cf_file(0), m_cf_cmdl(0), m_help_requested(false)
   {
     for (ConfigManager::ParamList::const_iterator it = params.begin();
          it != params.end(); ++it)
@@ -224,7 +229,7 @@
 
         //        std::cout << "processing cmdl...
";
         std::ostringstream ccmdl;
-        create_cmdl_config(ccmdl, m_params, argc, argv);
+        create_cmdl_config(ccmdl, m_params, argc, argv, m_help_requested);
 
         std::istringstream ccmdl_is(ccmdl.str().c_str());
 
@@ -232,9 +237,8 @@
 
         check_cf_cmdl(m_params, m_cf_cmdl, m_cpm);
 
-        //#if (ENGINE_VERBOSITY > 0)
-        dump(*this, std::cout, m_params);
-        //#endif
+	if (!help_requested())
+	  dump(*this, std::cout, m_params);
       }
     catch (std::exception& e)
       {
@@ -256,6 +260,11 @@
   {
   }
 
+  bool ConfigManager::help_requested() const
+  {
+    return m_help_requested;
+  }
+
   bool ConfigManager::get_bool_param(const std::string& param_name) const
   {
     CPMap::const_iterator it = m_cpm.find(param_name);


--- orig/base/src/utils/configmanager.h
+++ mod/base/src/utils/configmanager.h
@@ -1,6 +1,6 @@
 /* This source file is a part of the GePhex Project.
 
- Copyright (C) 2001-2004
+ Copyright (C) 2001-2005
 
  Georg Seidel <[email protected]> 
  Martin Bayer <[email protected]> 
@@ -71,6 +71,11 @@
 
       ~ConfigManager();
 
+      /*!
+       * True iff the first cmdline parameter was "--help" or "-h"
+       */
+      bool        help_requested() const;
+
       bool        get_bool_param(const std::string& param_name)   const;
       int         get_int_param(const std::string& param_name)    const;
       std::string get_string_param(const std::string& param_name) const;
@@ -81,6 +86,8 @@
       ConfigFilePtr m_cf_cmdl;
 
       CPMap m_cpm;
+
+      bool m_help_requested;
     };
 }
 


--- orig/doc/documentation.xml
+++ mod/doc/documentation.xml
@@ -6,15 +6,13 @@
  <bookinfo>
   <title>The GePhex Book</title>
   <author>
-   <firstname>Martin</firstname>
-   <surname>Bayer</surname>
+   <firstname>Martin</firstname> <surname>Bayer</surname>
    <affiliation>
     <address><email>[email protected]</email></address>
    </affiliation>
   </author>
   <author>
-   <firstname>Georg</firstname>
-   <surname>Seidel</surname>
+   <firstname>Georg</firstname> <surname>Seidel</surname>
    <affiliation>
     <address><email>[email protected]</email></address>
    </affiliation>
@@ -49,7 +47,7 @@
 <holder>Martin Bayer</holder>
 <holder>Georg Seidel</holder>
 </copyright>
-
+  
   <abstract>
 <para>GePhex is an interactive effect system for video jockeys. The effects can be controlled with external devices like joysticks, web-cams, or midi-devices. New effects can be designed in a GUI (Graphical User Interface) by composing basic effects into more complex ones.</para>
 
@@ -95,14 +93,52 @@
 
 <itemizedlist>
 
-  <listitem><para>The project started in the late summer 2001.</para></listitem>
-  <listitem><para>In autumn 2002 was the first public vjing session at the fmi party on the campus of the university of Passau, Germany.</para></listitem>
+  <listitem><para>
+      The project started in the late summer 2001.
+  </para></listitem>
+
+  <listitem><para>
+      In autumn 2002 was the first public vjing session at the fmi party
+      on the campus of the university of Passau, Germany.
+  </para></listitem>
+
+  <listitem><para>
+      In autumn 2003 there was a public session in Vienna and another
+      session at the fmi party in Passau, Germany.
+  </para></listitem>
 
-  <listitem><para>In autumn 2003 there was a public session in Vienna and another session at the fmi party in Passau, Germany. </para></listitem>
+  <listitem><para>
+      In December 2003 we released the first stable version (0.0.4).
+  </para></listitem>
+
+  <listitem><para>
+      In June 2004 we released the second stable version (0.4).
+      At this time we also started with the design of version 0.5,
+      which will be a complete rewrite. As of the time of this
+      writing (March 2005), there is only a minimal prototype system of
+      gephex-0.5.
+  </para></listitem>
+
+  <listitem><para>
+      In November 2004, we were invited to the 
+      <ulink url="http://www.piksel.org"><citetitle>piksel</citetitle></ulink>
+      meeting in Bergen, Norway. We released version 0.4.1 shortly before.
+  </para></listitem>
 
-  <listitem><para>In December 2003 we released the first stable version (0.0.4).     </para></listitem>
+  <listitem><para>
+      Version 0.4.2 was released some weeks after piksel. It includes
+      support for 
+      <ulink url="http://www.piksel.org/Frei0r"> 
+	<citetitle>frei0r</citetitle></ulink>,
+      a simple effect API we designed in Norway,
+      and some other stuff we did there (e.g. v4l2 support).
+  </para></listitem>
 
-  <listitem><para>In June 2004 we released the second stable version (0.4). </para></listitem>
+  <listitem><para>
+      In February 2005, experimental support for Mac OS X and ports of most 
+      <ulink url="http://effectv.sf.net"><citetitle>effecTV</citetitle></ulink>
+      effects was added to version 0.4.3.
+  </para></listitem>
 
 </itemizedlist>
 
@@ -144,7 +180,7 @@
     module_path          = [/home/tmp/seidel/gphx/lib/gephex/modules/]
     type_path            = [/home/tmp/seidel/gphx/lib/gephex/types/]
     frei0r_path          = [/home/cip/seidel/.frei0r-1/lib/]
-    graph_path           = [/home/cip/seidel/.gephex/graphs/]
+    graph_path           = [/home/cip/seidel/.gephex/0.4/graphs/]
     ipc_unix_node_prefix = [/tmp/gephex_socket_]
     ipc_type             = [inet]
     ipc_port             = [6666]
@@ -1109,7 +1145,7 @@
 
  <sect1>
    <title> Starting GePhex </title>
-     <sect2>  <title> UN*X </title>
+     <sect2>  <title> UNIX </title>
        <para>
           You can start GePhex by executing 
           <filename>gephex</filename>.
@@ -1342,26 +1378,48 @@
  </para>
   <sect1><title>The three States of Graphs in the Renderer</title>
 <para>
-The Renderer knows three states for a graph:
-<itemizedlist>
-<listitem><para>The graph is not loaded. No internal state of the modules is stored and obvious no calculation is done in this state.</para></listitem>
-<listitem><para>The graph is loaded in the renderer. The modules remember their internal states e.g. the framebuffer of an xfader with loopback. But no calculation is allowed in this state.</para></listitem>
-<listitem><para>Only in the state active are any calculations done.</para></listitem>
+  The Renderer knows three states for a graph:
+  <itemizedlist>
+    <listitem><para>
+	The graph is not loaded. No internal state of the modules is
+	stored and obvious no calculation is done in this state.
+    </para></listitem>
+
+    <listitem><para>
+	The graph is loaded in the renderer. The modules remember their
+	internal states e.g. the framebuffer of an xfader with loopback.
+	But no calculation is allowed in this state.
+    </para></listitem>
+
+    <listitem><para>
+	Only in the state active are any calculations done.
+    </para></listitem>
+
 </itemizedlist>
 </para>
+
+<para>
+  So how can I distinguish these states? How can I change between them?
+  What do they imply for the usage of gephex?
+</para>
   </sect1>
 
  </chapter>
 
 
 <chapter><title>Example Graphs</title>
-    <para> On Un*x, the examples are installed automatically when you run
-GePhex for the first time. If not, it might be necessary to remove the
-<filename>~/.gephex</filename> directory from an older version of GePhex.
-<note> <para> This could delete your graphs, so backup
-<filename>~/.gephex/graphs</filename> if necessary.
-</para> </note>
-</para>
+
+    <para>
+      On UNIX systems, the examples are installed automatically when 
+      you run GePhex for the first time. If not, it might be necessary
+      to remove the <filename>~/.gephex/0.4</filename> directory from an
+      older version of GePhex.
+
+      <note><para>
+	  This could delete your graphs, so backup
+	  <filename>~/.gephex/0.4/graphs</filename> if necessary.
+      </para> </note>
+    </para>
 
 <sect1><title>Example1: Tunnel-Vision</title>
   <para>


--- orig/engine/src/engine/main.cpp
+++ mod/engine/src/engine/main.cpp
@@ -278,6 +278,10 @@
 
       utils::ConfigManager config(get_cfile_name(), argc, argv, params);
 
+      // If the help message was requested, we simply return
+      if (config.help_requested())
+	return 0;
+
       // This is a hack to communicate the media path to
       // loaded modules.
       static const char* GEPHEX_MEDIA_PATH = "GEPHEX_MEDIA_PATH";


--- orig/qtgui/src/gui/main.cpp
+++ mod/qtgui/src/gui/main.cpp
@@ -181,6 +181,10 @@
 
       utils::ConfigManager config(get_cfile_name(), argc, argv, params);
 
+      // If the help message was requested, we simply return
+      if (config.help_requested())
+	return 0;
+
       std::string ipc_type = config.get_string_param("ipc_type");
       std::string ipc_locator = "";
         if (ipc_type == "inet")
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.