inst_sh := $(CURDIR)/inst.sh
-install: binstall $(sinstall)
+install: bin_install $(MAK_INSTALLS)
-uninstall: buninstall $(suninstall)
+uninstall: bin_uninstall $(MAK_UNINSTALLS)
.PHONY: binstall cinstall cuninstall dinstall
export mkinstalldirs install_sh inst_sh
# install to bin
-binstall: install-recursive
- cp -a COPYING README models Cinelerra_factory ffmpeg msg info tips bin/.
+bin_install: install-recursive
+ cp -a COPYING README models Cinelerra_factory ffmpeg msg info tips \
+ lv2_blacklist.txt bin/.
sed -e 's/\<cin\>/$(WANT_CIN)/g' < image/cin.desktop \
> "bin/applications/$(WANT_CIN).desktop"
cp -a image/cin.svg "bin/pixmaps/$(WANT_CIN)".svg
cp -a $$d bin/plugins/picon/.; \
done
-cp -a db/utils/new_db "bin/cin_db"
- cp -av lv2_blacklist.txt bin/.
-buninstall:
+bin_uninstall:
rm -rf bin
# with system_build
-cinstall:
- cd bin; $(inst_sh) "$(DESTDIR)$(bindir)" "$(WANT_CIN)" \
- cin_db zmpeg3{cat,cc2txt,ifochk,show,toc}
- cd bin; $(inst_sh) "$(DESTDIR)$(WANT_CINLIB_DIR)" \
- bdwrite cutads lv2ui
- -cd bin; $(inst_sh) "$(DESTDIR)$(WANT_CINLIB_DIR)" \
- hveg2enc mpeg2enc mplex mplexlo
+sys_install: $(CIN_INSTALLS)
+ cd bin; $(inst_sh) "$(DESTDIR)$(bindir)" "$(WANT_CIN)" bdwrite
cd bin; $(inst_sh) "$(DESTDIR)$(datadir)/$(WANT_CIN)" \
- COPYING README models Cinelerra_factory ffmpeg msg info tips doc \
- lv2 lv2_blacklist.txt
+ COPYING README models Cinelerra_factory ffmpeg msg info tips doc
cd bin/locale; $(inst_sh) "$(DESTDIR)$(localedir)" .
cd bin/plugins; $(inst_sh) "$(DESTDIR)$(WANT_PLUGIN_DIR)" .
- cd bin/ladspa; $(inst_sh) "$(DESTDIR)$(WANT_LADSPA_DIR)" .
cd bin/applications; $(inst_sh) "$(DESTDIR)$(datadir)/applications" .
cd bin/pixmaps; $(inst_sh) "$(DESTDIR)$(datadir)/pixmaps" .
-cuninstall:
+sys_uninstall: $(CIN_UNINSTALLS)
rm -f "$(DESTDIR)$(bindir)/$(WANT_CIN)"
- rm -f "$(DESTDIR)$(bindir)"/zmpeg3{cat,cc2txt,ifochk,show,toc}
- rm -f "$(DESTDIR)$(bindir)/cin_db"
rm -rf "$(DESTDIR)$(WANT_CINLIB_DIR)"
rm -rf "$(DESTDIR)$(datadir)/$(WANT_CIN)"
rm -rf "$(DESTDIR)$(localedir)"/*/"LC_MESSAGES/$(WANT_CIN).mo"
rm -rf "$(DESTDIR)$(WANT_PLUGIN_DIR)"
- rm -rf "$(DESTDIR)$(WANT_LADSPA_DIR)"
rm -f "$(DESTDIR)$(datadir)/applications/$(WANT_CIN).desktop"
rm -f "$(DESTDIR)$(datadir)/pixmaps/$(WANT_CIN)".{svg,xpm}
# without system_build
-dinstall:
+dvl_install:
cp Makefile.devel Makefile
-duninstall:
+dvl_uninstall:
rm -f Makefile
+# with-libzmpeg3
+zmp_install:
+ cd bin; $(inst_sh) "$(DESTDIR)$(bindir)" \
+ zmpeg3{cat,cc2txt,ifochk,show,toc}
+ cd bin; $(inst_sh) "$(DESTDIR)$(WANT_CINLIB_DIR)" \
+ hveg2enc mpeg2enc mplex mplexlo
+
+zmp_uninstall:
+ rm -f "$(DESTDIR)$(bindir)"/zmpeg3{cat,cc2txt,ifochk,show,toc}
+
+# with-commercial
+com_install:
+ cd bin; $(inst_sh) "$(DESTDIR)$(bindir)" cin_db
+ cd bin; $(inst_sh) "$(DESTDIR)$(WANT_CINLIB_DIR)" cutads
+
+com_uninstall:
+ rm -f "$(DESTDIR)$(bindir)/cin_db"
+
+# with-ladspa
+lad_install:
+ cd bin/ladspa; $(inst_sh) "$(DESTDIR)$(WANT_LADSPA_DIR)" .
+
+lad_uninstall:
+ rm -rf "$(DESTDIR)$(WANT_LADSPA_DIR)"
+
+# with-lv2
+lv2_install:
+ cd bin; $(inst_sh) "$(DESTDIR)$(WANT_CINLIB_DIR)" lv2ui
+ cd bin; $(inst_sh) "$(DESTDIR)$(datadir)/$(WANT_CIN)" \
+ lv2 lv2_blacklist.txt
+
+lv2_uninstall:
+
val-%:
@echo $($(subst val-,,$@))
./autogen.sh
CC=clang CXX=clang++ CFLAGS="-g -O2 -DFFMPEG3" ./configure --with-single-user \
--disable-static-build --without-lv2 --disable-lame --disable-twolame \
- --with-oss --without-gl --without-firewire --without-dv --without-dvb \
- --without-video4linux2 --without-xxf86vm --without-ladspa-build \
+ --with-oss --without-alsa --without-gl --without-firewire --without-dv \
+ --without-dvb --without-video4linux2 --without-xxf86vm --without-ladspa-build \
--without-libzmpeg --without-commercial --without-thirdparty
gmake 2>&1 | tee log
+diff --git a/cinelerra-5.1/Makefile.devel b/cinelerra-5.1/Makefile.devel
+index a12d8f2b..f892f648 100644
+--- a/cinelerra-5.1/Makefile.devel
++++ b/cinelerra-5.1/Makefile.devel
+@@ -4,7 +4,7 @@ TOPDIR := $(CURDIR)
+ CFLAGS ?= -ggdb
+ export CFLAGS_ := $(CFLAGS)
+
+-cpus:=$(shell grep -c "^proc" /proc/cpuinfo)
++cpus:=$(shell sysctl -n hw.ncpu)
+ jobs:=-j$(shell echo $$(($(cpus) + $(cpus)/2 +2)))
+ MAKEJ := $(MAKE) $(jobs)
+
diff --git a/cinelerra-5.1/cinelerra/Makefile b/cinelerra-5.1/cinelerra/Makefile
index 18590e3a..a60c71d1 100644
--- a/cinelerra-5.1/cinelerra/Makefile
AC_DEFUN([CHECK_WITH], [
AC_ARG_WITH([$1],
+@@ -126,7 +137,7 @@ AC_SUBST(MAK_INSTALLS)
+ AC_SUBST(MAK_UNINSTALLS)
+
+ if test "x$WANT_JOBS" = "xauto"; then
+- CPUS=`grep -c "^proc" /proc/cpuinfo`
++ CPUS=`sysctl -n hw.ncpu`
+ WANT_JOBS=`expr $CPUS + $CPUS / 2 + 2`
+ fi
+
diff --git a/cinelerra-5.1/db/tdb.h b/cinelerra-5.1/db/tdb.h
index 8ee88002..9a17091e 100644
--- a/cinelerra-5.1/db/tdb.h
float* get_values();
diff --git a/cinelerra-5.1/guicast/bcresources.C b/cinelerra-5.1/guicast/bcresources.C
-index e3400600..3cf616f8 100644
+index e3400600..b32d0a6f 100644
--- a/cinelerra-5.1/guicast/bcresources.C
+++ b/cinelerra-5.1/guicast/bcresources.C
-@@ -695,7 +695,7 @@ new_vframes(20,default_medium_7segment,
+@@ -38,6 +38,7 @@
+ #include <iconv.h>
+ #include <sys/ipc.h>
+ #include <sys/shm.h>
++#include <sys/sysctl.h>
+ #include <X11/extensions/XShm.h>
+ #include <fontconfig/fontconfig.h>
+ #include <fontconfig/fcfreetype.h>
+@@ -297,23 +298,12 @@ int BC_Resources::machine_cpus = 1;
+
+ int BC_Resources::get_machine_cpus()
+ {
+- int cpus = 1;
+- FILE *proc = fopen("/proc/cpuinfo", "r");
+- if( proc ) {
+- char string[BCTEXTLEN], *cp;
+- while(!feof(proc) && fgets(string, sizeof(string), proc) ) {
+- if( !strncasecmp(string, "processor", 9) &&
+- (cp = strchr(string, ':')) != 0 ) {
+- int n = atol(cp+1) + 1;
+- if( n > cpus ) cpus = n;
+- }
+- else if( !strncasecmp(string, "cpus detected", 13) &&
+- (cp = strchr(string, ':')) != 0 )
+- cpus = atol(cp+1);
+- }
+- fclose(proc);
+- }
+- return cpus;
++ int mib[2], ncpu;
++ size_t len = sizeof(ncpu);
++ mib[0] = CTL_HW;
++ mib[1] = HW_NCPU;
++ if( sysctl(mib, 2, &ncpu, &len, 0, 0) ) ncpu = 1;
++ return ncpu;
+ }
+
+ void BC_Resources::new_vframes(int n, VFrame *vframes[], ...)
+@@ -695,7 +685,7 @@ new_vframes(20,default_medium_7segment,
generic_button_margin = 15;
draw_clock_background=1;
shm_reply = 1;
// Initialize
-@@ -1681,6 +1681,87 @@ BC_FontEntry *BC_Resources::find_fontentry(const char *displayname, int style,
+@@ -1681,6 +1671,87 @@ BC_FontEntry *BC_Resources::find_fontentry(const char *displayname, int style,
return style_match;
}
size_t BC_Resources::encode(const char *from_enc, const char *to_enc,
char *input, int input_length, char *output, int output_length)
{
-@@ -1688,10 +1769,12 @@ size_t BC_Resources::encode(const char *from_enc, const char *to_enc,
+@@ -1688,10 +1759,12 @@ size_t BC_Resources::encode(const char *from_enc, const char *to_enc,
iconv_t cd;
char *outbase = output;
to_enc = "UTF-8";
if(input_length < 0)
-@@ -1701,32 +1784,45 @@ size_t BC_Resources::encode(const char *from_enc, const char *to_enc,
+@@ -1701,32 +1774,45 @@ size_t BC_Resources::encode(const char *from_enc, const char *to_enc,
if(strcmp(from_enc, to_enc) && inbytes)
{
#include "filesystem.h"
#include "formattools.h"
#include "language.h"
+#ifdef HAVE_DV
#include "libdv.h"
+#endif
#include "libmjpeg.h"
#include "maxchannels.h"
#include "mwindow.h"
format_text->update(File::formattostr(asset->format));
switch(driver) {
+#ifdef HAVE_DV
case CAPTURE_IEC61883:
case CAPTURE_FIREWIRE:
locked_compressor = (char*)CODEC_TAG_DVSD;
break;
-
+#endif
case VIDEO4LINUX2JPEG:
locked_compressor = (char*)CODEC_TAG_MJPEG;
break;
#define HAVE_STDINT_H
#endif /* HAVE_STDINT_H */
-#include "mjpegtools/yuv4mpeg.h"
+#define Y4M_UNKNOWN -1
+#define Y4M_ILACE_NONE 0 /* non-interlaced, progressive frame */
+#define Y4M_ILACE_TOP_FIRST 1 /* interlaced, top-field first */
+#define Y4M_ILACE_BOTTOM_FIRST 2 /* interlaced, bottom-field first */
+#define Y4M_ILACE_MIXED 3 /* mixed, "refer to frame header" */
+
#include "interlacemodes.h"
// AUTO FIX METHOD ====================
#include "condition.h"
#include "cursors.h"
#include "devicedvbinput.h"
+#ifdef HAVE_DV
#include "libdv.h"
+#endif
#include "edl.h"
#include "edlsession.h"
#include "keys.h"
#include "edl.h"
#include "edlsession.h"
#include "file.inc"
+#ifdef HAVE_DV
#include "libdv.h"
+#endif
#include "libmjpeg.h"
#include "mainmenu.h"
#include "mutex.h"
// Fix asset using legacy routine
const char *vcodec = 0;
switch(driver) {
+#ifdef HAVE_DVB
case CAPTURE_IEC61883:
case CAPTURE_FIREWIRE:
vcodec = CODEC_TAG_DVSD;
break;
-
+#endif
case VIDEO4LINUX2JPEG:
vcodec = CODEC_TAG_MJPEG;
break;
test "x$WANT_CINLIB_DIR" = "xauto" && WANT_CINLIB_DIR='$$CIN_PATH'
test "x$WANT_PLUGIN_DIR" = "xauto" && WANT_PLUGIN_DIR='$$CIN_LIB/plugins'
test "x$WANT_LADSPA_DIR" = "xauto" && WANT_LADSPA_DIR='$$CIN_LIB/ladspa'
- sinstall=dinstall
- suninstall=duninstall
else
lcldir=`test "x$prefix" = "xNONE" && prefix=$ac_default_prefix; \
test "x$exec_prefix" = "xNONE" && exec_prefix="${prefix}"; \
test "x$WANT_CINLIB_DIR" = "xauto" && WANT_CINLIB_DIR="$usrlib/$WANT_CIN"
test "x$WANT_PLUGIN_DIR" = "xauto" && WANT_PLUGIN_DIR="$WANT_CINLIB_DIR/plugins"
test "x$WANT_LADSPA_DIR" = "xauto" && WANT_LADSPA_DIR="$WANT_CINLIB_DIR/ladspa"
- sinstall=cinstall
- suninstall=cuninstall
fi
-AC_SUBST(sinstall)
-AC_SUBST(suninstall)
+
+CIN_INSTALLS=""
+CIN_UNINSTALLS=""
+if test "x$WANT_LIBZMPEG" = "xyes"; then
+ CIN_INSTALLS+=" zmp_install"
+ CIN_UNINSTALLS+=" zmp_uninstall"
+fi
+if test "x$WANT_COMMERCIAL" = "xyes"; then
+ CIN_INSTALLS+=" com_install"
+ CIN_UNINSTALLS+=" com_uninstall"
+fi
+if test "x$WANT_LADSPA_BUILD" = "xyes"; then
+ CIN_INSTALLS+=" lad_install "
+ CIN_UNINSTALLS+=" lad_uninstall "
+fi
+if test "x$WANT_LV2" = "xyes"; then
+ CIN_INSTALLS+=" lv2_install "
+ CIN_UNINSTALLS+=" lv2_uninstall "
+fi
+AC_SUBST(CIN_INSTALLS)
+AC_SUBST(CIN_UNINSTALLS)
+
+if test "x$WANT_CINBIN_BUILD" = "xyes"; then
+ MAK_INSTALLS="dvl_install"
+ MAK_UNINSTALLS="dvl_uninstall"
+else
+ MAK_INSTALLS=" sys_install"
+ MAK_UNINSTALLS="sys_uninstall"
+fi
+AC_SUBST(MAK_INSTALLS)
+AC_SUBST(MAK_UNINSTALLS)
if test "x$WANT_JOBS" = "xauto"; then
CPUS=`grep -c "^proc" /proc/cpuinfo`