Credit Andrea with Windows.tex changes based on reading updates in CV manual
[goodguy/cin-manual-latex.git] / parts / Developer.tex
index 6b13612a2b8fc8b05284189f09b91f03f376bc5e..34d355f38c0ba780867b0f6c97199225379028be 100644 (file)
@@ -20,7 +20,7 @@ So, an example of what happens in 4 steps for a single-user build would be as fo
 
 \begin{enumerate}[nosep]
        \item unpack/patch source code: \\
-       \texttt{git clone --depth 1 ``git:/{\dots}/target'' cinelerra5} \\
+       \texttt{git clone -{}-depth 1 ``git:/{\dots}/target'' cinelerra5} \\
        \texttt{./autogen.sh}
        \item configure build:\\
        \texttt{./configure --with-single-user}
@@ -98,18 +98,35 @@ FFmpeg is a \textit{strongly connected} component in the build linkage and widel
        \item \texttt{./configure} {\dots}
 \end{itemize}
 
-Specific information on using the current ffmpeg GIT repository follows.  You have to supply the actual URL location of the ffmpeg git as you can see in this example \texttt{bld.sh} script:
+\section{Experimental Builds}
+\label{sec:experimental_builds}
+\index{build!experimental}
+
+The main compilation we have seen leads to building \CGG{} with its own internal ffmpeg, which includes its stability and feature patches. Normally ffmpeg is updated to version x.1 of each release. The reasons why it is best to use thirdparty with their static versions of the libraries and ffmpeg are explained in detail in \nameref{sec:latest_libraries} and in \nameref{sub:unbundled_builds}.
+
+You can still compile \CGG{} with ffmpeg-git to enjoy the latest version. This build may lead to feature variation and less stability, but in most cases will work perfectly fine.
+You have to supply the actual URL location of the ffmpeg git as you can see in this example \texttt{bld.sh} script:
+
+\begin{lstlisting}[numbers=none]
+       #!/bin/bash
+       ./autogen.sh
+       ./configure --with-single-user --with-booby --with-git-ffmpeg=https://git.ffmpeg.org/ffmpeg.git
+       make && make install ) 2>1 | tee log
+       mv Makefile Makefile.cfg
+       cp Makefile.devel Makefile
+\end{lstlisting}
+
+Since the procedure for obtaining the latest ffmpeg version is not always kept up-to-date and the line numbers will always change, you may have to create some patch first. Generally those line numbers are only updated by a developer when a new stable version with worthwhile features is actually included in the \CGG{} build. FFmpeg is constantly changing and many times the git version is not as stable as desired.
+
+Finally, it is possible to compile \CGG{} so that it uses ffmpeg which is already installed on the system. This build takes less time to compile and may increase performance in both rendering and timeline manipulation. Again, there may be variations in functionality and less stability.
+Getting a build to work in a system environment is not easy. If you have already installed libraries which are normally in the thirdparty build, getting them to be recognized means you have to install the devel version
+so the header files which match the library interfaces exist. If you want to build using only the thirdparty libraries installed in your system, just include \texttt{-–without-thirdparty} to your configure script. For example:
 
 \begin{lstlisting}[numbers=none]
-#!/bin/bash
-./autogen.sh
-./configure --with-single-user --with-booby --with-git-ffmpeg=https://git.ffmpeg.org/ffmpeg.git
-make && make install ) 2>1 | tee log
-mv Makefile Makefile.cfg
-cp Makefile.devel Makefile
+./confgure --with-single-user --disable-static-build --without-thirdparty --without-libdpx
 \end{lstlisting}
 
-Since the procedure for obtaining the latest ffmpeg version is not always kept up-to-date and the line numbers will always change, you may have to create that patch first. Generally those line numbers are only updated by a developer when a new stable version with worthwhile features is actually included in the \CGG{} build. FFmpeg is constantly changing and many times the git version is not as stable as desired.
+The library, libdpx, is just such an example of lost functionality: this build of \CGG{} will not be able to use the DPX format.
 
 \section{Configuration Features}
 \label{sec:configuration_features}
@@ -210,6 +227,7 @@ Optional Features:
   --enable-openjpeg       build openjpeg (auto)
   --enable-libogg         build libogg (auto)
   --enable-libsndfile     build libsndfile (auto)
+  --enable-libsvtav1      build libsvtav1 (no)
   --enable-libtheora      build libtheora (auto)
   --enable-libuuid        build libuuid (yes)
   --enable-libvorbis      build libvorbis (auto)
@@ -317,12 +335,13 @@ Individual package libraries can be rebuilt, via:
 
 The rule targets create the set of thirdparty packages which are built from local source archive copies of thirdparty source code and patches, if needed.  The build rule set of dependencies allows for compiling multiple thirdparty programs simultaneously using maximum computer resources.  This parallel build speeds up the process considerably.  For example, these are full static build timings on the production build machine (full build includes building all thirdparty programs as well as all of \CGG{}):
 
-\hspace{2em}
-\begin{tabular}{@{}rcr}
-       1 cpu & = & 61 mins\\
-       12 cpus & = & 7.5 mins\\
-       24 cpus & = & 2 mins\\
-\end{tabular}
+\begin{center}
+       \begin{tabular}{@{}lcr}
+               1 cpu & = & 61 mins\\
+               12 cpus & = & 7.5 mins\\
+               24 cpus & = & 2 mins\\
+       \end{tabular}
+\end{center}
 
 \section{Using the very latest Libraries}
 \label{sec:latest_libraries}
@@ -388,14 +407,6 @@ compile; and use binaries that you do not know what they contain since no source
 Look into opencv4/opencv2/core/types.hpp:711;27
 \end{description}
 
-\textbf{webp}
-\begin{description}[noitemsep]
-     \item Status - currently at version 1.1.0
-     \item Problem - requires cmake 3.5 
-     \item Workaround already in use by \CGG{} - leaving out of Ubuntu14, Ubuntu, Centos7
-     \item Your workaround - upgrade on those systems to cmake 3.5
-\end{description}
-
 \textbf{libaom}
 \begin{description}[noitemsep]
      \item Status - currently at version 3.0.0 for older O/S and 3.1.1 for newer O/S
@@ -470,7 +481,10 @@ It comes back with the routine as:
 \label{sec:valgrind_support_level}
 \index{build!valgrind}
 
-Valgrind is a memory mis-management detector.  It shows you memory leaks, deallocation errors, mismanaged threads, rogue reads/writes, etc.  \CGG{} memory management is designed to work with Valgrind detection methods.  This assists in developing reliable code.  Use of Valgrind points out problems so that they can be fixed.  For example, when this version of \CGG{} shuts down, it deallocates memory instead of just stopping, thus making memory leak detection possible.
+Valgrind is a memory mis-management detector.  It shows you memory leaks, deallocation errors, mismanaged threads, rogue reads/writes, etc.  \CGG{} memory management is designed to work with Valgrind detection methods.  This assists in developing reliable code.  Use of Valgrind points out problems so that they can be fixed.  For example, when this version of \CGG{} shuts down, it deallocates memory instead of just stopping, thus making memory leak detection possible.  An alternative to Valgrind is
+\textit{heaptrack} which has good documentation and for large programs can run
+faster.  You can find the source and information about it at {\small\url{https://github.com/KDE/heaptrack}}.
+\index{valgrind!heaptrack}
 
 The best way to compile and run valgrind is to run the developer static build. This takes 2 steps and you must already have gdb and valgrind installed:
 
@@ -500,6 +514,10 @@ It is impossible to test everything with valgrind because some things are just t
 deadly. The listing of the memory leaks can be quite voluminous so locating the \textit{LEAK SUMMARY} section
 towards the end of the report is most useful.
 
+Another very useful valgrind run to locate unitialized variables while executing is:
+
+\hspace{2em}\texttt{valgrind -{}-log-file=/tmp/log -{}-tool=memcheck\\
+       -{}-num-callers=32 ./ci}
 
 \section{CFLAGS has -Wall}
 \label{sec:cflags_has_-wall}