From 4a028c75bea81ad0f03a8004eb076dfff718a469 Mon Sep 17 00:00:00 2001 From: Good Guy Date: Sun, 17 Jun 2018 18:54:36 -0600 Subject: [PATCH] add configure without-thirdparty, without-libzmpeg, without-commercial --- cinelerra-5.1/Makefile.am | 6 +- cinelerra-5.1/Makefile.devel | 7 +- cinelerra-5.1/arch.bld | 11 ++ cinelerra-5.1/cinelerra/Makefile | 116 ++++++++++++++++++--- cinelerra-5.1/cinelerra/aboutprefs.C | 1 - cinelerra-5.1/cinelerra/assetedit.C | 2 + cinelerra-5.1/cinelerra/dvbtune.C | 4 +- cinelerra-5.1/cinelerra/ffmpeg.C | 12 +++ cinelerra-5.1/cinelerra/file.C | 23 +++- cinelerra-5.1/cinelerra/fileac3.C | 5 +- cinelerra-5.1/cinelerra/fileac3.h | 7 +- cinelerra-5.1/cinelerra/filedv.h | 1 - cinelerra-5.1/cinelerra/fileffmpeg.C | 4 + cinelerra-5.1/cinelerra/filempeg.C | 7 +- cinelerra-5.1/cinelerra/filempeg.h | 3 +- cinelerra-5.1/cinelerra/fileogg.h | 1 - cinelerra-5.1/cinelerra/mainmenu.C | 2 + cinelerra-5.1/cinelerra/mwindow.C | 14 ++- cinelerra-5.1/cinelerra/mwindowedit.C | 2 + cinelerra-5.1/cinelerra/mwindowgui.C | 2 + cinelerra-5.1/cinelerra/pluginfclient.C | 3 + cinelerra-5.1/cinelerra/record.C | 29 +++++- cinelerra-5.1/cinelerra/renderfarmclient.C | 6 +- cinelerra-5.1/configure.ac | 38 +++++-- cinelerra-5.1/db/Makefile | 10 ++ cinelerra-5.1/db/utils/Makefile | 8 ++ cinelerra-5.1/deb.bld | 17 +++ cinelerra-5.1/libzmpeg3/Makefile | 10 ++ cinelerra-5.1/libzmpeg3/libzmpeg3.h | 2 + cinelerra-5.1/mpeg2enc/Makefile | 10 ++ cinelerra-5.1/mplexlo/Makefile | 11 ++ cinelerra-5.1/rpm.bld | 20 ++++ cinelerra-5.1/thirdparty/Makefile | 8 ++ 33 files changed, 352 insertions(+), 50 deletions(-) create mode 100755 cinelerra-5.1/arch.bld create mode 100755 cinelerra-5.1/deb.bld create mode 100755 cinelerra-5.1/rpm.bld diff --git a/cinelerra-5.1/Makefile.am b/cinelerra-5.1/Makefile.am index 9b9e7cbd..9b78846c 100644 --- a/cinelerra-5.1/Makefile.am +++ b/cinelerra-5.1/Makefile.am @@ -42,7 +42,7 @@ binstall: install-recursive if [ $$d = picon/cinfinity ]; then continue; fi; \ cp -a $$d bin/plugins/picon/.; \ done - cp -a db/utils/new_db "bin/cin_db" + -cp -a db/utils/new_db "bin/cin_db" cp -av lv2_blacklist.txt bin/. buninstall: @@ -53,7 +53,9 @@ 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 hveg2enc mpeg2enc mplex mplexlo + bdwrite cutads lv2ui + -cd bin; $(inst_sh) "$(DESTDIR)$(WANT_CINLIB_DIR)" \ + hveg2enc mpeg2enc mplex mplexlo cd bin; $(inst_sh) "$(DESTDIR)$(datadir)/$(WANT_CIN)" \ COPYING README models Cinelerra_factory ffmpeg msg info tips doc \ lv2 lv2_blacklist.txt diff --git a/cinelerra-5.1/Makefile.devel b/cinelerra-5.1/Makefile.devel index 30d169f1..ef516090 100644 --- a/cinelerra-5.1/Makefile.devel +++ b/cinelerra-5.1/Makefile.devel @@ -8,8 +8,8 @@ cpus:=$(shell grep -c "^proc" /proc/cpuinfo) jobs:=-j$(shell echo $$(($(cpus) + $(cpus)/2 +2))) MAKEJ := $(MAKE) $(jobs) -SUBDIRS := thirdparty libzmpeg3 mpeg2enc mplexlo\ - db guicast cinelerra plugins doc po +SUBDIRS = thirdparty libzmpeg3 mpeg2enc mplexlo \ + db guicast cinelerra plugins doc po all: mkdir -p bin bin/lv2 @@ -43,9 +43,8 @@ rebuild_all: $(MAKE) -C libzmpeg3 clean +$(MAKEJ) -C libzmpeg3 $(MAKE) -C db clean - +$(MAKEJ) -C db + +$(MAKEJ) -C db all utils $(MAKE) rebuild - +$(MAKEJ) -C db/utils rebuild_install: $(MAKE) -C cinelerra install diff --git a/cinelerra-5.1/arch.bld b/cinelerra-5.1/arch.bld new file mode 100755 index 00000000..99535212 --- /dev/null +++ b/cinelerra-5.1/arch.bld @@ -0,0 +1,11 @@ +#!/bin/bash + +#pacman -S openexr libdv flac + +( ./autogen.sh + ./configure --with-single-user --disable-static-build --without-lv2 \ + --without-firewire --without-dv --without-dvb --without-video4linux2 \ + --without-libzmpeg --without-commercial --without-thirdparty + make && make install ) 2>&1 | tee log +mv Makefile Makefile.cfg +cp Makefile.devel Makefile diff --git a/cinelerra-5.1/cinelerra/Makefile b/cinelerra-5.1/cinelerra/Makefile index 67e14e8a..de121c23 100644 --- a/cinelerra-5.1/cinelerra/Makefile +++ b/cinelerra-5.1/cinelerra/Makefile @@ -1,7 +1,7 @@ export TOPDIR ?= $(CURDIR)/.. include $(TOPDIR)/global_config -OBJS = \ +OBJS := \ $(OBJDIR)/aattachmentpoint.o \ $(OBJDIR)/aautomation.o \ $(OBJDIR)/aboutprefs.o \ @@ -30,7 +30,6 @@ OBJS = \ $(OBJDIR)/audiodvb.o \ $(OBJDIR)/audioesound.o \ $(OBJDIR)/audioidevice.o \ - $(OBJDIR)/audiompeg.o \ $(OBJDIR)/audioodevice.o \ $(OBJDIR)/audiooss.o \ $(OBJDIR)/audiov4l2mpeg.o \ @@ -63,7 +62,6 @@ OBJS = \ $(OBJDIR)/clipedls.o \ $(OBJDIR)/clippopup.o \ $(OBJDIR)/colorpicker.o \ - $(OBJDIR)/commercials.o \ $(OBJDIR)/commonrender.o \ $(OBJDIR)/confirmquit.o \ $(OBJDIR)/confirmsave.o \ @@ -75,18 +73,15 @@ OBJS = \ $(OBJDIR)/cwindowgui.o \ $(OBJDIR)/cwindow.o \ $(OBJDIR)/cwindowtool.o \ - $(OBJDIR)/dbwindow.o \ $(OBJDIR)/dcoffset.o \ $(OBJDIR)/deleteallindexes.o \ $(OBJDIR)/device1394input.o \ $(OBJDIR)/device1394output.o \ $(OBJDIR)/devicedvbinput.o \ - $(OBJDIR)/devicempeginput.o \ $(OBJDIR)/devicev4l2base.o \ $(OBJDIR)/devicev4l2input.o \ $(OBJDIR)/dragcheckbox.o \ $(OBJDIR)/drivesync.o \ - $(OBJDIR)/dvbtune.o \ $(OBJDIR)/dvdcreate.o \ $(OBJDIR)/edithandles.o \ $(OBJDIR)/editlength.o \ @@ -100,12 +95,10 @@ OBJS = \ $(OBJDIR)/exportedl.o \ $(OBJDIR)/fadeengine.o \ $(OBJDIR)/ffmpeg.o \ - $(OBJDIR)/fileac3.o \ $(OBJDIR)/filebaseaudio.o \ $(OBJDIR)/filebase.o \ $(OBJDIR)/filebaseulaw.o \ $(OBJDIR)/filecr2.o \ - $(OBJDIR)/filedb.o \ $(OBJDIR)/filedv.o \ $(OBJDIR)/fileexr.o \ $(OBJDIR)/fileffmpeg.o \ @@ -114,7 +107,6 @@ OBJS = \ $(OBJDIR)/filegif.o \ $(OBJDIR)/filejpeg.o \ $(OBJDIR)/filelist.o \ - $(OBJDIR)/filempeg.o \ $(OBJDIR)/file.o \ $(OBJDIR)/fileogg.o \ $(OBJDIR)/filepng.o \ @@ -180,7 +172,6 @@ OBJS = \ $(OBJDIR)/maskautos.o \ $(OBJDIR)/maskengine.o \ $(OBJDIR)/mbuttons.o \ - $(OBJDIR)/mediadb.o \ $(OBJDIR)/menuaeffects.o \ $(OBJDIR)/menuattacheffect.o \ $(OBJDIR)/menuattachtransition.o \ @@ -310,7 +301,6 @@ OBJS = \ $(OBJDIR)/vdevice1394.o \ $(OBJDIR)/vdevicebase.o \ $(OBJDIR)/vdevicedvb.o \ - $(OBJDIR)/vdevicempeg.o \ $(OBJDIR)/vdeviceprefs.o \ $(OBJDIR)/vdevicev4l2jpeg.o \ $(OBJDIR)/vdevicev4l2mpeg.o \ @@ -345,6 +335,29 @@ OBJS = \ $(OBJDIR)/zwindow.o \ $(OBJDIR)/zwindowgui.o \ +ifneq ($(WANT_LIBZMPEG),no) +OBJS += \ + $(OBJDIR)/audiompeg.o \ + $(OBJDIR)/devicempeginput.o \ + $(OBJDIR)/filempeg.o \ + $(OBJDIR)/vdevicempeg.o \ + +endif +ifneq ($(WANT_COMMERCIAL),no) +OBJS += \ + $(OBJDIR)/commercials.o \ + $(OBJDIR)/dbwindow.o \ + $(OBJDIR)/filedb.o \ + $(OBJDIR)/mediadb.o \ + +endif +ifneq ($(WANT_CIN_3RDPARTY),no) +OBJS += \ + $(OBJDIR)/fileac3.o \ + +endif + +# $(OBJDIR)/dvbtune.o \ # $(OBJDIR)/renderfarmfsclient.o \ # $(OBJDIR)/renderfarmfsserver.o \ @@ -357,13 +370,88 @@ OUTPUT_G = $(OBJDIR)/$(WANT_CIN).debuginfo LIBRARIES := \ $(GUICAST)/$(OBJDIR)/libguicast.a \ - $(LIBZMPEG3)/$(OBJDIR)/libzmpeg3.a \ + +ifneq ($(WANT_LIBZMPEG),no) +LIBRARIES += \ $(MPEG2ENC)/$(OBJDIR)/hveg2enc.a \ + $(LIBZMPEG3)/$(OBJDIR)/libzmpeg3.a \ + +endif +ifneq ($(WANT_COMMERCIAL),no) +LIBRARIES += \ $(TDB)/$(OBJDIR)/db.a \ +endif + LIBS := $(LIBRARIES) + +ifneq ($(WANT_CIN_3RDPARTY),no) LIBS += $(libraries) +else + +LIBS += -lpthread -lm -lbz2 -llzma -lz -lpng -luuid +LIBS += -lX11 -lXau -lXdmcp -lXext -lXfixes -lXv -lXinerama +LIBS += -lfontconfig -lfreetype +LIBS += -lavcodec -lavdevice -lavfilter -lavformat -lavresample -lavutil +LIBS += -lswresample -lswscale +LIBS += -lvpx -lwebp -lwebpmux + +LIBS += $(if $(filter fftw,$(static_pkgs)), -lfftw3) +LIBS += $(if $(filter flac,$(static_pkgs)), -lFLAC) +LIBS += $(if $(filter giflib,$(static_pkgs)), -lgif) +LIBS += $(if $(filter lame,$(static_pkgs)), -lmp3lame) +LIBS += $(if $(filter libjpeg,$(static_pkgs)), -ljpeg) +LIBS += $(if $(filter openjpeg,$(static_pkgs)), -lopenjp2) +LIBS += $(if $(filter libogg,$(static_pkgs)), -logg) +LIBS += $(if $(filter libsndfile,$(static_pkgs)), -lsndfile) +LIBS += $(if $(filter libtheora,$(static_pkgs)), -ltheoradec -ltheoraenc) +LIBS += $(if $(filter libuuid,$(static_pkgs)), -luuid) +LIBS += $(if $(filter libvorbis,$(static_pkgs)), -lvorbis -lvorbisenc -lvorbisfile) +LIBS += $(if $(filter tiff,$(static_pkgs)), -ltiff) +LIBS += $(if $(filter twolame,$(static_pkgs)), -ltwolame) +LIBS += $(if $(filter x264,$(static_pkgs)), -lx264) +LIBS += $(if $(filter x265,$(static_pkgs)), -lx265) +LIBS += $(if $(filter libvpx,$(static_pkgs)), -lvpx) + +ifneq ($(WANT_GL),no) +LIBS += -lGL -lGLU -lGLX +endif +ifneq ($(WANT_XFT),no) +LIBS += -lXft +endif +ifneq ($(WANT_ALSA),no) +LIBS += -lasound +endif +ifneq ($(WANT_OPENEXR),no) +LIBS += -lIex -lIexMath -lIlmImf -lIlmImfUtil +endif +ifneq ($(WANT_DV),no) +LIBS += -ldv +endif +ifneq ($(WANT_FIREWIRE),no) +LIBS += -lavc1394 -lraw1394 -liec61883 -lrom1394 +endif +ifneq ($(WANT_DVB),no) +LIBS += -ldv +endif +ifneq ($(WANT_DL),no) +LIBS += -ldl +endif +ifneq ($(WANT_LIBZMPEG),no) +LIBS += -lmjpegutils +endif +ifneq ($(WANT_OPUS),no) +LIBS += -lopus +endif +ifneq ($(WANT_NUMA),no) +LIBS += -lnuma +endif +ifneq ($(WANT_LV2),no) +LIBS += -llilv-0 -lsratom-0 -lserd-0 -lsord-0 -lsuil-0 +endif +endif +ifneq ($(WANT_COMMERCIAL),no) CUTADS = $(OBJDIR)/cutads CUTOBJ = $(OBJDIR)/cutads.o CUTOBJS = $(CUTOBJ) \ @@ -372,6 +460,7 @@ CUTOBJS = $(CUTOBJ) \ CUTLIBS = \ $(LIBZMPEG3)/$(OBJDIR)/libzmpeg3.a -lX11 \ $(TDB)/$(OBJDIR)/db.a +endif BDWRITE = $(OBJDIR)/bdwrite BDWOBJS = $(OBJDIR)/bdwrite.o @@ -437,6 +526,7 @@ $(OUTPUT): $(OBJS) $(THEME_DATA) $(DCRAW) $(LIBRARIES) $(if $(findstring -ggdb,$(CFLAGS)),,strip $(OUTPUT)) ln -f -s ../bin/$(WANT_CIN) ci +ifneq ($(WANT_COMMERCIAL),no) $(CUTADS): $(CUTOBJS) $(CUTLIBS) $(LIBRARIES) @echo g++ -o $@ $(CUTOBJS) @g++ $(CFLAGS) -pthread -o $@ $(CUTOBJS) $(CUTLIBS) $(LIBS) @@ -445,7 +535,9 @@ $(CUTADS): $(CUTOBJS) $(CUTLIBS) $(LIBRARIES) install-cutads: cp -av $(OBJDIR)/cutads $(BINDIR)/. + install: install-cutads +endif $(BDWRITE): $(BDWOBJS) $(LIBRARIES) @echo g++ -o $@ $(BDWOBJS) diff --git a/cinelerra-5.1/cinelerra/aboutprefs.C b/cinelerra-5.1/cinelerra/aboutprefs.C index 9997efa7..5f286aef 100644 --- a/cinelerra-5.1/cinelerra/aboutprefs.C +++ b/cinelerra-5.1/cinelerra/aboutprefs.C @@ -23,7 +23,6 @@ #include "bcsignals.h" #include "file.h" #include "language.h" -#include "libzmpeg3.h" #include "mwindow.h" #include "theme.h" #include "vframe.h" diff --git a/cinelerra-5.1/cinelerra/assetedit.C b/cinelerra-5.1/cinelerra/assetedit.C index 51fa34fa..0a417e4b 100644 --- a/cinelerra-5.1/cinelerra/assetedit.C +++ b/cinelerra-5.1/cinelerra/assetedit.C @@ -927,9 +927,11 @@ void DetailAssetWindow::create_objects() strncpy(info,_("no info available"),len); if( !mwindow->preferences->get_asset_file_path(asset, file_name) ) { switch( asset->format ) { +#ifdef HAVE_LIBZMPEG case FILE_MPEG: FileMPEG::get_info(asset->path, file_name, &info[0],len); break; +#endif case FILE_FFMPEG: FileFFMPEG::get_info(asset->path, &info[0],len); break; diff --git a/cinelerra-5.1/cinelerra/dvbtune.C b/cinelerra-5.1/cinelerra/dvbtune.C index 60de3f21..1b0d9a1e 100644 --- a/cinelerra-5.1/cinelerra/dvbtune.C +++ b/cinelerra-5.1/cinelerra/dvbtune.C @@ -19,8 +19,8 @@ * */ -#include "../../guicast/bcwindowbase.inc" -#include "../../guicast/clip.h" +#include "guicast/bcwindowbase.inc" +#include "guicast/clip.h" #include "condition.h" #include "devicedvbinput.inc" #include "dvbtune.h" diff --git a/cinelerra-5.1/cinelerra/ffmpeg.C b/cinelerra-5.1/cinelerra/ffmpeg.C index 2ac09f73..541c5f0a 100644 --- a/cinelerra-5.1/cinelerra/ffmpeg.C +++ b/cinelerra-5.1/cinelerra/ffmpeg.C @@ -33,6 +33,12 @@ #include "mwindow.h" #include "vframe.h" +#ifdef FFMPEG3 +#define url filename +#else +#define av_register_all(s) +#define avfilter_register_all(s) +#endif #define VIDEO_INBUF_SIZE 0x10000 #define AUDIO_INBUF_SIZE 0x10000 @@ -1925,6 +1931,7 @@ int FFMPEG::info(char *text, int len) int FFMPEG::init_decoder(const char *filename) { ff_lock("FFMPEG::init_decoder"); + av_register_all(); char file_opts[BCTEXTLEN]; char *bp = strrchr(strcpy(file_opts, filename), '/'); char *sp = strrchr(!bp ? file_opts : bp, '.'); @@ -2070,6 +2077,7 @@ int FFMPEG::init_encoder(const char *filename) return 1; } ff_lock("FFMPEG::init_encoder"); + av_register_all(); char format[BCSTRLEN]; if( get_format(format, "format", file_format) ) strcpy(format, file_format); @@ -2103,7 +2111,9 @@ int FFMPEG::open_encoder(const char *type, const char *spec) return 1; } +#ifdef HAVE_DV if( !strcmp(codec_name, CODEC_TAG_DVSD) ) strcpy(codec_name, "dv"); +#endif else if( !strcmp(codec_name, CODEC_TAG_MJPEG) ) strcpy(codec_name, "mjpeg"); else if( !strcmp(codec_name, CODEC_TAG_JPEG) ) strcpy(codec_name, "jpeg"); @@ -2856,6 +2866,7 @@ int FFMPEG::ff_cpus() int FFVideoStream::create_filter(const char *filter_spec, AVCodecParameters *avpar) { + avfilter_register_all(); const char *sp = filter_spec; char filter_name[BCSTRLEN], *np = filter_name; int i = sizeof(filter_name); @@ -2896,6 +2907,7 @@ int FFVideoStream::create_filter(const char *filter_spec, AVCodecParameters *avp int FFAudioStream::create_filter(const char *filter_spec, AVCodecParameters *avpar) { + avfilter_register_all(); const char *sp = filter_spec; char filter_name[BCSTRLEN], *np = filter_name; int i = sizeof(filter_name); diff --git a/cinelerra-5.1/cinelerra/file.C b/cinelerra-5.1/cinelerra/file.C index 264be2e8..03348e0a 100644 --- a/cinelerra-5.1/cinelerra/file.C +++ b/cinelerra-5.1/cinelerra/file.C @@ -171,9 +171,11 @@ int File::get_options(FormatTools *format, getting_options = 1; format_completion->lock("File::get_options"); switch( asset->format ) { +#ifdef HAVE_CIN_3RDPARTY case FILE_AC3: FileAC3::get_parameters(parent_window, asset, format_window, audio_options, video_options, edl); break; +#endif #ifdef HAVE_DV case FILE_RAWDV: FileDV::get_parameters(parent_window, asset, format_window, @@ -192,11 +194,13 @@ int File::get_options(FormatTools *format, FileFFMPEG::get_parameters(parent_window, asset, format_window, audio_options, video_options, edl); break; +#ifdef HAVE_LIBZMPEG case FILE_AMPEG: case FILE_VMPEG: FileMPEG::get_parameters(parent_window, asset, format_window, audio_options, video_options, edl); break; +#endif case FILE_JPEG: case FILE_JPEG_LIST: FileJPEG::get_parameters(parent_window, asset, format_window, @@ -376,11 +380,13 @@ int File::probe() file = new FileFFMPEG(this->asset, this); return FILE_OK; } +#ifdef HAVE_COMMERCIAL if( !strcmp(pref->name,"DB") ) { // MediaDB if( !FileDB::check_sig(this->asset) ) continue; file = new FileDB(this->asset, this); return FILE_OK; } +#endif if( !strcmp(pref->name,"Scene") ) { // scene file if( !FileScene::check_sig(this->asset, data)) continue; file = new FileScene(this->asset, this); @@ -455,11 +461,13 @@ int File::probe() file = new FileVorbis(this->asset, this); return FILE_OK; } +#ifdef HAVE_LIBZMPEG if( !strcmp(pref->name,"MPEG") ) { // MPEG file if( !FileMPEG::check_sig(this->asset) ) continue; file = new FileMPEG(this->asset, this); return FILE_OK; } +#endif if( !strcmp(pref->name,"EDL") ) { // XML file if( data[0] != '<' ) continue; if( !strncmp(&data[1],"EDL>",4) || @@ -495,10 +503,11 @@ int File::open_file(Preferences *preferences, if( ret != FILE_OK ) return ret; break; } // format already determined +#ifdef HAVE_CIN_3RDPARTY case FILE_AC3: file = new FileAC3(this->asset, this); break; - +#endif case FILE_SCENE: file = new FileScene(this->asset, this); break; @@ -559,17 +568,19 @@ int File::open_file(Preferences *preferences, case FILE_TIFF_LIST: file = new FileTIFF(this->asset, this); break; - +#ifdef HAVE_COMMERCIAL case FILE_DB: file = new FileDB(this->asset, this); break; +#endif +#ifdef HAVE_LIBZMPEG case FILE_MPEG: case FILE_AMPEG: case FILE_VMPEG: file = new FileMPEG(this->asset, this); break; - +#endif case FILE_OGG: file = new FileOGG(this->asset, this); break; @@ -1264,7 +1275,9 @@ const char* File::formattostr(int format) case FILE_FLAC: return _(FLAC_NAME); case FILE_EXR: return _(EXR_NAME); case FILE_EXR_LIST: return _(EXR_LIST_NAME); +#ifdef HAVE_LIBZMPEG case FILE_MPEG: return _(MPEG_NAME); +#endif case FILE_AMPEG: return _(AMPEG_NAME); case FILE_VMPEG: return _(VMPEG_NAME); case FILE_TGA: return _(TGA_NAME); @@ -1346,7 +1359,9 @@ int File::get_best_colormodel(Asset *asset, int driver) #ifdef HAVE_DV case FILE_RAWDV: return FileDV::get_best_colormodel(asset, driver); #endif +#ifdef HAVE_LIBZMPEG case FILE_MPEG: return FileMPEG::get_best_colormodel(asset, driver); +#endif case FILE_JPEG: case FILE_JPEG_LIST: return FileJPEG::get_best_colormodel(asset, driver); #ifdef HAVE_OPENEXR @@ -1361,7 +1376,9 @@ int File::get_best_colormodel(Asset *asset, int driver) case FILE_TGA_LIST: return FileTGA::get_best_colormodel(asset, driver); case FILE_CR2: case FILE_CR2_LIST: return FileCR2::get_best_colormodel(asset, driver); +#ifdef HAVE_COMMERCIAL case FILE_DB: return FileDB::get_best_colormodel(asset, driver); +#endif case FILE_FFMPEG: return FileFFMPEG::get_best_colormodel(asset, driver); } diff --git a/cinelerra-5.1/cinelerra/fileac3.C b/cinelerra-5.1/cinelerra/fileac3.C index 3b9810e9..25276864 100644 --- a/cinelerra-5.1/cinelerra/fileac3.C +++ b/cinelerra-5.1/cinelerra/fileac3.C @@ -1,4 +1,4 @@ - +#ifdef HAVE_CIN_3RDPARTY /* * CINELERRA * Copyright (C) 2008 Adam Williams @@ -438,5 +438,4 @@ int AC3ConfigAudioBitrate::handle_event() return 1; } - - +#endif diff --git a/cinelerra-5.1/cinelerra/fileac3.h b/cinelerra-5.1/cinelerra/fileac3.h index 6683816b..8ae62c76 100644 --- a/cinelerra-5.1/cinelerra/fileac3.h +++ b/cinelerra-5.1/cinelerra/fileac3.h @@ -1,4 +1,3 @@ - /* * CINELERRA * Copyright (C) 2008 Adam Williams @@ -21,6 +20,7 @@ #ifndef FILEAC3_H #define FILEAC3_H +#ifdef HAVE_CIN_3RDPARTY #include #include @@ -100,8 +100,5 @@ public: AC3ConfigAudio *gui; }; - - - - +#endif #endif diff --git a/cinelerra-5.1/cinelerra/filedv.h b/cinelerra-5.1/cinelerra/filedv.h index 843b59b8..64e867e9 100644 --- a/cinelerra-5.1/cinelerra/filedv.h +++ b/cinelerra-5.1/cinelerra/filedv.h @@ -24,7 +24,6 @@ #ifdef HAVE_DV -#include "../config.h" #include "edl.inc" #include "filebase.h" #include "file.inc" diff --git a/cinelerra-5.1/cinelerra/fileffmpeg.C b/cinelerra-5.1/cinelerra/fileffmpeg.C index 6f4db28f..7edc387d 100644 --- a/cinelerra-5.1/cinelerra/fileffmpeg.C +++ b/cinelerra-5.1/cinelerra/fileffmpeg.C @@ -25,6 +25,10 @@ #include "preferences.h" #include "videodevice.inc" +#ifdef FFMPEG3 +#define url filename +#endif + FileFFMPEG::FileFFMPEG(Asset *asset, File *file) : FileBase(asset, file) { diff --git a/cinelerra-5.1/cinelerra/filempeg.C b/cinelerra-5.1/cinelerra/filempeg.C index 9988673f..da71349e 100644 --- a/cinelerra-5.1/cinelerra/filempeg.C +++ b/cinelerra-5.1/cinelerra/filempeg.C @@ -774,6 +774,7 @@ int FileMPEG::skim_video(int track, void *vp, skim_fn fn) +#ifdef HAVE_COMMERCIAL int FileMPEG::toc_nail(void *vp, int track) { File *file = (File *)vp; @@ -788,7 +789,7 @@ int FileMPEG::toc_nail(void *vp, int track) MWindow::commercials->get_frame(file, pid, position, tdat, mw, mh, width, height); return 0; } - +#endif int FileMPEG::create_toc(char *toc_path) { @@ -816,11 +817,13 @@ int FileMPEG::create_toc(char *toc_path) // File needs a table of contents. struct timeval new_time, prev_time, start_time, current_time; gettimeofday(&prev_time, 0); gettimeofday(&start_time, 0); +#ifdef HAVE_COMMERCIAL if( file->preferences->scan_commercials ) { set_skimming(-1, 1, toc_nail, file); if( MWindow::commercials->resetDb() != 0 ) eprintf(_("cant access commercials database")); } +#endif // This gets around the fact that MWindowGUI may be locked. char progress_title[BCTEXTLEN]; sprintf(progress_title, _("Creating %s\n"), toc_file); @@ -864,10 +867,12 @@ int FileMPEG::create_toc(char *toc_path) } } +#ifdef HAVE_COMMERCIAL if( file->preferences->scan_commercials ) { if( !result ) MWindow::commercials->write_ads(asset->path); MWindow::commercials->closeDb(); } +#endif mpeg3_stop_toc(fd); fd = 0; diff --git a/cinelerra-5.1/cinelerra/filempeg.h b/cinelerra-5.1/cinelerra/filempeg.h index a92f29b7..34e779ce 100644 --- a/cinelerra-5.1/cinelerra/filempeg.h +++ b/cinelerra-5.1/cinelerra/filempeg.h @@ -21,6 +21,7 @@ #ifndef FILEMPEG_H #define FILEMPEG_H +#ifdef HAVE_LIBZMPEG #include "bitspopup.inc" #include "condition.inc" @@ -361,5 +362,5 @@ public: ArrayList tools; }; - +#endif #endif diff --git a/cinelerra-5.1/cinelerra/fileogg.h b/cinelerra-5.1/cinelerra/fileogg.h index 1538281b..26a68022 100644 --- a/cinelerra-5.1/cinelerra/fileogg.h +++ b/cinelerra-5.1/cinelerra/fileogg.h @@ -22,7 +22,6 @@ #ifndef FILEOGG_H #define FILEOGG_H -#include "../config.h" #include "edl.inc" #include "filebase.h" #include "file.inc" diff --git a/cinelerra-5.1/cinelerra/mainmenu.C b/cinelerra-5.1/cinelerra/mainmenu.C index 699caa33..0bd56ec3 100644 --- a/cinelerra-5.1/cinelerra/mainmenu.C +++ b/cinelerra-5.1/cinelerra/mainmenu.C @@ -116,8 +116,10 @@ void MainMenu::create_objects() #ifdef HAVE_DVB filemenu->add_item(new ChannelScan(mwindow)); #endif +#ifdef HAVE_COMMERCIAL if( mwindow->has_commercials() ) filemenu->add_item(new DbWindowScan(mwindow)); +#endif filemenu->add_item(new SubttlSWin(mwindow)); filemenu->add_item(render = new RenderItem(mwindow)); diff --git a/cinelerra-5.1/cinelerra/mwindow.C b/cinelerra-5.1/cinelerra/mwindow.C index 9de65dba..c65f99f2 100644 --- a/cinelerra-5.1/cinelerra/mwindow.C +++ b/cinelerra-5.1/cinelerra/mwindow.C @@ -1628,37 +1628,49 @@ void MWindow::set_brender_active(int v, int update) int MWindow::has_commercials() { +#ifdef HAVE_COMMERCIAL return theme->use_commercials; +#else + return 0; +#endif } void MWindow::init_commercials() { +#ifdef HAVE_COMMERCIAL if( !commercials ) { commercials = new Commercials(this); commercial_active = 0; } else commercials->add_user(); +#endif } void MWindow::commit_commercial() { +#ifdef HAVE_COMMERCIAL if( !commercial_active ) return; commercial_active = 0; if( !commercials ) return; commercials->commitDb(); +#endif } void MWindow::undo_commercial() { +#ifdef HAVE_COMMERCIAL if( !commercial_active ) return; commercial_active = 0; if( !commercials ) return; commercials->undoDb(); +#endif } int MWindow::put_commercial() { + int result = 0; +#ifdef HAVE_COMMERCIAL double start = edl->local_session->get_selectionstart(); double end = edl->local_session->get_selectionend(); if( start >= end ) return 0; @@ -1666,7 +1678,6 @@ int MWindow::put_commercial() const char *errmsg = 0; int count = 0; Tracks *tracks = edl->tracks; - int result = 0; //check it for(Track *track=tracks->first; track && !errmsg; track=track->next) { if( track->data_type != TRACK_VIDEO ) continue; @@ -1719,6 +1730,7 @@ int MWindow::put_commercial() undo_commercial(); result = 1; } +#endif return result; } diff --git a/cinelerra-5.1/cinelerra/mwindowedit.C b/cinelerra-5.1/cinelerra/mwindowedit.C index cf818e47..eb066398 100644 --- a/cinelerra-5.1/cinelerra/mwindowedit.C +++ b/cinelerra-5.1/cinelerra/mwindowedit.C @@ -2448,6 +2448,7 @@ void MWindow::add_proxy(int use_scaler, void MWindow::cut_commercials() { +#ifdef HAVE_COMMERCIAL undo->update_undo_before(); commercials->scan_media(); edl->optimize(); @@ -2459,6 +2460,7 @@ void MWindow::cut_commercials() gui->update(1, 2, 1, 1, 1, 1, 0); cwindow->update(1, 0, 0, 0, 1); cwindow->refresh_frame(CHANGE_EDL); +#endif } int MWindow::normalize_speed(EDL *old_edl, EDL *new_edl) diff --git a/cinelerra-5.1/cinelerra/mwindowgui.C b/cinelerra-5.1/cinelerra/mwindowgui.C index 566afd6c..9259dde1 100644 --- a/cinelerra-5.1/cinelerra/mwindowgui.C +++ b/cinelerra-5.1/cinelerra/mwindowgui.C @@ -356,7 +356,9 @@ void MWindowGUI::create_objects() #ifdef HAVE_DVB channel_info = new ChannelInfo(mwindow); #endif +#ifdef HAVE_COMMERCIAL db_window = new DbWindow(mwindow); +#endif swindow = new SWindow(mwindow); if(debug) printf("MWindowGUI::create_objects %d\n", __LINE__); diff --git a/cinelerra-5.1/cinelerra/pluginfclient.C b/cinelerra-5.1/cinelerra/pluginfclient.C index 74c59f4f..c5d02db8 100644 --- a/cinelerra-5.1/cinelerra/pluginfclient.C +++ b/cinelerra-5.1/cinelerra/pluginfclient.C @@ -16,6 +16,9 @@ #include "vframe.h" #include "filexml.h" +#ifdef FFMPEG3 +#define av_filter_iterate(p) ((*(const AVFilter**)(p))=avfilter_next(*(const AVFilter **)(p))) +#endif static void ff_err(int ret, const char *fmt, ...) { diff --git a/cinelerra-5.1/cinelerra/record.C b/cinelerra-5.1/cinelerra/record.C index 473e10c3..96ec0f82 100644 --- a/cinelerra-5.1/cinelerra/record.C +++ b/cinelerra-5.1/cinelerra/record.C @@ -155,19 +155,23 @@ Record::Record(MWindow *mwindow, RecordMenuItem *menu_item) adevice_lock = new Mutex("Record::adevice_lock"); vdevice_lock = new Mutex("Record::vdevice_lock"); batch_lock = new Mutex("Record::batch_lock"); +#ifdef HAVE_COMMERCIAL skim_thread = new SkimDbThread(); cutads_status = new RecordCutAdsStatus(this); blink_status = new RecordBlinkStatus(this); +#endif } Record::~Record() { mwindow->gui->record = 0; stop(); +#ifdef HAVE_COMMERCIAL delete blink_status; delete cutads_status; stop_skimming(); delete skim_thread; +#endif delete deletions; delete picture; delete channeldb; @@ -366,13 +370,17 @@ void Record::run() // Need to stop everything this time - stop_commercial_capture(0); int video_stream = -1; +#ifdef HAVE_COMMERCIAL + stop_commercial_capture(0); +#endif +#ifdef HAVE_LIBZMPEG if( default_asset->format == FILE_MPEG ) { Channel *channel = get_current_channel(); if( channel ) video_stream = channel->video_stream; } +#endif stop(0); edl->Garbage::remove_user(); @@ -1462,7 +1470,7 @@ int Record::check_batch_complete() return result; } - +#ifdef HAVE_COMMERCIAL int Record::skimming(void *vp, int track) { return ((Record*)vp)->skimming(track); @@ -1505,6 +1513,14 @@ void Record::update_skimming(int v) stop_skimming(); } +#else +int Record::skimming(void *vp, int track) { return 1; } +int Record::skimming(int track) { return 1; } +void Record::start_skimming() {} +void Record::stop_skimming() {} +void Record::update_skimming(int v) {} +#endif + RecordRemoteHandler::RecordRemoteHandler(RemoteControl *remote_control) : RemoteHandler(remote_control->gui, GREEN) { @@ -1766,6 +1782,7 @@ int Record::remote_process_key(RemoteControl *remote_control, int key) break; //case UP: case DOWN: case LEFT: case RIGHT: //case KPPLAY: case KPBACK: case KPFORW: +#ifdef HAVE_COMMERCIAL case KPRECD: case 'c': // start capture, mark endpoint if( !deletions ) { start_commercial_capture(); @@ -1785,6 +1802,7 @@ int Record::remote_process_key(RemoteControl *remote_control, int key) case KPAUSE: case 'x': // ignore current commercial mark_commercial_capture(DEL_SKIP); break; +#endif case KPBACK: case 'a': // toggle mute audio if( !monitor_audio ) { set_mute_gain(1); set_play_gain(1); } set_audio_monitoring(monitor_audio ? 0 : 1); @@ -1792,9 +1810,11 @@ int Record::remote_process_key(RemoteControl *remote_control, int key) case 'm': // toggle metering audio set_audio_metering(metering_audio ? 0 : 1); break; +#ifdef HAVE_COMMERCIAL case KPPLAY: case 's': // ignore previous endpoint mark_commercial_capture(DEL_OOPS); break; +#endif case KPFWRD: case KPSLASH: display_channel_info(); break; @@ -1822,7 +1842,7 @@ int Record::remote_process_key(RemoteControl *remote_control, int key) return 1; } - +#ifdef HAVE_COMMERCIAL int Record::start_commercial_capture() { if( deletions != 0 ) return 1; @@ -1860,6 +1880,7 @@ int Record::mark_commercial_capture(int action) deletions->append(new Dele(time, action)); return 0; } +#endif void Record::remote_fill_color(int color) { @@ -1884,6 +1905,7 @@ void Record::set_play_gain(double gain) if( adevice ) adevice->set_play_gain(gain); } +#ifdef HAVE_COMMERCIAL int Record::stop_commercial_capture(int run_job) { if( deletions == 0 ) return 1; @@ -2057,3 +2079,4 @@ run() remote_color(record->status_color); } +#endif diff --git a/cinelerra-5.1/cinelerra/renderfarmclient.C b/cinelerra-5.1/cinelerra/renderfarmclient.C index 97b11f4f..aab7fb4e 100644 --- a/cinelerra-5.1/cinelerra/renderfarmclient.C +++ b/cinelerra-5.1/cinelerra/renderfarmclient.C @@ -594,9 +594,9 @@ void RenderFarmClientThread::init_client_keepalive(int timeout_secs) void RenderFarmClientThread::do_tuner(int socket_fd) { // Currently only 1 tuner driver. Maybe more someday. - DVBTune server(this); - server.main_loop(); - ::close(socket_fd); +// DVBTune server(this); +// server.main_loop(); +// ::close(socket_fd); } diff --git a/cinelerra-5.1/configure.ac b/cinelerra-5.1/configure.ac index d3a03d4b..e9f67c16 100644 --- a/cinelerra-5.1/configure.ac +++ b/cinelerra-5.1/configure.ac @@ -23,6 +23,8 @@ CFG_CFLAGS+=" -D__STDC_LIMIT_MACROS" CFG_CFLAGS+=" -DPNG_SKIP_SETJMP_CHECK=1" CFG_CFLAGS+=" -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64" CFG_CFLAGS+=" -I/usr/include/freetype2" +CFG_CFLAGS+=" -I/usr/include/uuid" +CFG_CFLAGS+=" -I/usr/include/mjpegtools" AC_DEFUN([CHECK_WITH], [ AC_ARG_WITH([$1], @@ -44,6 +46,9 @@ CHECK_WITH([config-dir],[.bcast config dir],[CONFIG_DIR],[$$HOME/.bcast5]) CHECK_WITH([browser],[cin_browser path],[CIN_BROWSER],[firefox]) CHECK_WITH([git-ffmpeg],[git ffmpeg using url],[GIT_FFMPEG],[no]) CHECK_WITH([noelision],[use noelision/libpthread],[NOELISION],[auto]) +CHECK_WITH([libzmpeg],[build libzmpeg],[LIBZMPEG],[yes]) +CHECK_WITH([commercial],[enable commercial capture],[COMMERCIAL],[yes]) +CHECK_WITH([thirdparty],[use thirdparty build],[CIN_3RDPARTY],[yes]) if test "x$WANT_LV2" != "xno"; then GTK2_LIBS=`pkg-config --libs gtk+-2.0` @@ -55,6 +60,10 @@ if test "x$WANT_LV2" != "xno"; then fi fi +if test "x$WANT_COMMERCIAL" = "xyes" -a "x$WANT_LIBZMPEG" != "xyes" ; then + AC_MSG_ERROR([commercial requires libzmpeg support.]) +fi + if test "x$WANT_CINBIN_BUILD" = "xyes"; then WANT_LOCALE_DIR='$$CIN_LIB/locale' test "x$WANT_CINDAT_DIR" = "xauto" && WANT_CINDAT_DIR='$$CIN_PATH' @@ -672,15 +681,20 @@ AC_DEFUN([PKG_SHARED],[ SHARED_LIBS+="$SHARED_$1" echo "AC_HELP_STRING([shared],[$1])" ]) + AC_DEFUN([PKG_STATIC],[ - PKG_$1="yes" - BUILD_$1=1 - AC_SUBST(BUILD_$1) - STATIC_BLDS+=" [$1]" - echo "AC_HELP_STRING([$2],[$1])" + if test "x$WANT_CIN_3RDPARTY" != "xno"; then + PKG_$1="yes" + BUILD_$1=1 + AC_SUBST(BUILD_$1) + STATIC_BLDS+=" [$1]" + echo "AC_HELP_STRING([$2],[$1])" + fi ]) + AC_DEFUN([PKG_FORCED],[PKG_STATIC([$1],[forced])]) +if test "x$WANT_CIN_3RDPARTY" != "xno"; then # order matters for dep in \ ffmpeg/twolame ffmpeg/lame ffmpeg/openjpeg \ @@ -694,6 +708,7 @@ for dep in \ eval "PKG_$needs=yes" fi done +fi AC_DEFUN([PKG_PROVIDE],[ if test "x$BUILD_$1" = "x" ; then @@ -765,8 +780,12 @@ done AC_SUBST(SYSTEM_LIBS) echo "" +if test "x$WANT_CIN_3RDPARTY" != "xno"; then + CFG_CFLAGS+=" -DHAVE_CIN_3RDPARTY" +fi for v in GL XFT XXF86VM OSS ALSA FIREWIRE DV DVB \ - VIDEO4LINUX2 ESOUND PACTL OPENEXR LV2; do + VIDEO4LINUX2 ESOUND PACTL OPENEXR LV2 \ + COMMERCIAL LIBZMPEG; do eval vv="\$WANT_$v" if test "x$vv" != "xno"; then CFG_CFLAGS+=" -DHAVE_$v" @@ -789,7 +808,10 @@ echo " using: with-ladspa-dir = $WANT_LADSPA_DIR" echo " using: with-opencv = $WANT_OPENCV" echo " using: with-git-ffmpeg = $WANT_GIT_FFMPEG" echo " using: with-noelision = $WANT_NOELISION" +echo " using: with-libzmpeg = $WANT_LIBZMPEG" +echo " using: with-commerical = $WANT_COMMERCIAL" echo "" +echo " using: thirdparty build = $WANT_CIN_3RDPARTY" echo " using: single-user = $WANT_CINBIN_BUILD" echo " using: static-build = $WANT_STATIC_BUILD" echo " using: ladspa-build = $WANT_LADSPA_BUILD" @@ -810,7 +832,7 @@ if test "x$HAVE_DL" = "xyes"; then fi if test "x$WANT_OPUS" = "xyes"; then FFMPEG_EXTRA_CFG+=' --enable-libopus' - if "x$HAVE_OPUS" = "xyes" -a "x$BUILD_opus" = "x0"; then + if test "x$HAVE_OPUS" = "xyes" -a "x$BUILD_opus" = "x0"; then EXTRA_LIBS+=' -lopus' CFG_CFLAGS+=' -I/usr/include/opus' fi @@ -826,6 +848,7 @@ if test "x$WANT_NOELISION" != "xno"; then | tail -1` fi +AC_SUBST(WANT_CIN_3RDPARTY) AC_SUBST(EXTRA_LIBS) AC_SUBST(FFMPEG_EXTRA_CFG) AC_SUBST(WANT_X264_HIDEPTH) @@ -861,6 +884,7 @@ echo "export THIRDPARTY EXTRA_LIBS FFMPEG_EXTRA_CFG" echo "" echo "WANT_CIN := $WANT_CIN" +CFG_WANTS+=" CIN_3RDPARTY LIBZMPEG COMMERCIAL" for w in $CFG_WANTS; do ww=WANT_$w; echo "WANT_$w := ${!ww}"; done echo "" diff --git a/cinelerra-5.1/db/Makefile b/cinelerra-5.1/db/Makefile index 9e4ea0b8..38364651 100644 --- a/cinelerra-5.1/db/Makefile +++ b/cinelerra-5.1/db/Makefile @@ -1,6 +1,8 @@ export TOPDIR ?= $(CURDIR)/.. include $(TOPDIR)/global_config +ifneq ($(WANT_COMMERCIAL),no) + $(shell mkdir -p $(OBJDIR)) LIBS := $(OBJDIR)/db.a ../libzmpeg3/$(OBJDIR)/libzmpeg3.a -lasound -lm -lX11 OUTPUT := $(OBJDIR)/db.a s.C @@ -50,3 +52,11 @@ $(OBJDIR)/tdb.o: tdb.C tdb.h $(OBJDIR)/xsch.o: xsch.C tdb.h $(OBJDIR)/xsch: $(OBJDIR)/xsch.o +else +#not WANT_COMMERCIAL +all: +rebuild: +utils: +install: +clean: +endif diff --git a/cinelerra-5.1/db/utils/Makefile b/cinelerra-5.1/db/utils/Makefile index 0e5a8f1a..cd1a4973 100644 --- a/cinelerra-5.1/db/utils/Makefile +++ b/cinelerra-5.1/db/utils/Makefile @@ -1,6 +1,8 @@ export TOPDIR ?= $(CURDIR)/../.. include $(TOPDIR)/global_config +ifneq ($(WANT_COMMERCIAL),no) + $(shell mkdir -p $(OBJDIR)) $(shell echo $(CFLAGS) > $(OBJDIR)/c_flags) CXXFLAGS:=-ggdb -I.. -Wall `cat $(OBJDIR)/c_flags` @@ -61,3 +63,9 @@ install: clean: rm -f $(TARGETS) *.o a.out +else +#not WANT_COMMERCIAL +all: +install: +clean: +endif diff --git a/cinelerra-5.1/deb.bld b/cinelerra-5.1/deb.bld new file mode 100755 index 00000000..b5103339 --- /dev/null +++ b/cinelerra-5.1/deb.bld @@ -0,0 +1,17 @@ +#!/bin/bash + +#apt install libavcodec-dev libavdevice-dev libavfilter-dev libavformat-dev \ +# libavresample-dev libavutil-dev uuid-dev libdv4-dev libmjpegtools-dev \ +# liblilv-dev libsuil-dev libavc1394-dev libraw1394-dev libmp3lame-dev \ +# libopenjp2-7-dev libtwolame-dev libvpx-dev libwebp-dev libwebpmux3 \ +# libx264-dev libx265-dev libopus-dev + +( ./autogen.sh + CFLAGS=-DFFMPEG3 ./configure --with-single-user \ + --disable-static-build --without-thirdparty \ + --without-video4linux2 --without-dvb --with-lv2=auto \ + --without-libzmpeg --without-commercial + make && make install ) 2>&1 | tee log +mv Makefile Makefile.cfg +cp Makefile.devel Makefile + diff --git a/cinelerra-5.1/libzmpeg3/Makefile b/cinelerra-5.1/libzmpeg3/Makefile index 022f1f42..b256c736 100644 --- a/cinelerra-5.1/libzmpeg3/Makefile +++ b/cinelerra-5.1/libzmpeg3/Makefile @@ -1,6 +1,8 @@ export TOPDIR ?= $(CURDIR)/.. include $(TOPDIR)/global_config +ifneq ($(WANT_LIBZMPEG),no) + CC = gcc NASM = nasm USE_MMX ?= 0 @@ -127,3 +129,11 @@ $(OBJDIR)/%.o: %.C $(OBJDIR)/audio/%.o: audio/%.C $(OBJDIR)/video/%.o: video/%.C +else +#not WANT_LIBZMPEG +all: +rebuild: +utils: +clean: +install: +endif diff --git a/cinelerra-5.1/libzmpeg3/libzmpeg3.h b/cinelerra-5.1/libzmpeg3/libzmpeg3.h index 712d1ca0..430ebb4d 100644 --- a/cinelerra-5.1/libzmpeg3/libzmpeg3.h +++ b/cinelerra-5.1/libzmpeg3/libzmpeg3.h @@ -1,5 +1,6 @@ #ifndef LIBMPEG3_H #define LIBMPEG3_H +#ifdef HAVE_LIBZMPEG /* for quicktime build */ #define MAXFRAMESAMPLES 65536 @@ -3092,3 +3093,4 @@ int mpeg3_dvb_get_system_time(mpeg3_t *zsrc, int64_t *tm); } #endif #endif +#endif diff --git a/cinelerra-5.1/mpeg2enc/Makefile b/cinelerra-5.1/mpeg2enc/Makefile index 37ac9a23..80e0f8f9 100644 --- a/cinelerra-5.1/mpeg2enc/Makefile +++ b/cinelerra-5.1/mpeg2enc/Makefile @@ -1,6 +1,8 @@ export TOPDIR ?= $(CURDIR)/.. include $(TOPDIR)/global_config +ifneq ($(WANT_LIBZMPEG),no) + CC = gcc CFLAGS += -I$(TOPDIR)/libzmpeg3 @@ -131,3 +133,11 @@ $(OBJDIR)/quantize_x86.o: quantize_x86.c val-%: @echo $($(subst val-,,$@)) +else +#not WANT_LIBZMPEG +all: +rebuild: +utils: +clean: +install: +endif diff --git a/cinelerra-5.1/mplexlo/Makefile b/cinelerra-5.1/mplexlo/Makefile index 6fb9ca72..c1a8aae8 100644 --- a/cinelerra-5.1/mplexlo/Makefile +++ b/cinelerra-5.1/mplexlo/Makefile @@ -1,6 +1,8 @@ export TOPDIR ?= $(CURDIR)/.. include $(TOPDIR)/global_config +ifneq ($(WANT_LIBZMPEG),no) + $(shell mkdir -p $(OBJDIR)) OBJS = $(OBJDIR)/mplex.o CC = gcc @@ -27,3 +29,12 @@ install: cp $(OUTPUT) $(BINDIR)/. $(OBJDIR)/mplex.o: mplex.c + +else +#not WANT_LIBZMPEG +all: +rebuild: +utils: +clean: +install: +endif diff --git a/cinelerra-5.1/rpm.bld b/cinelerra-5.1/rpm.bld new file mode 100755 index 00000000..59e1476f --- /dev/null +++ b/cinelerra-5.1/rpm.bld @@ -0,0 +1,20 @@ +#!/bin/bash + +#zypper install ffmpeg \ +# libavc1394-devel libavcodec-devel libavdevice-devel libavfilter-devel \ +# libavformat-devel libavresample-devel libavutil-devel libmp3lame-devel \ +# libopus-devel libossp-uuid++16 libossp-uuid16 libossp-uuid_dce16 \ +# libtwolame-devel libvpx-devel libwebp-devel libwebpdecoder2 libwebpextras0 \ +# uuid-devel liblilv-0-devel suil-devel libmjpegutils-devel \ +# libogg-devel libvorbis-devel libtheora-devel libXdmcp-devel + +( ./autogen.sh + CFLAGS="-DFFMPEG3 -I/usr/include/ffmpeg" ./configure \ + --with-single-user --disable-static-build --without-thirdparty \ + --without-video4linux2 --without-dvb --with-lv2=auto \ + --without-libzmpeg --without-commercial \ + --disable-x264 --disable-x265 --disable-openjpeg + make && make install ) 2>&1 | tee log +mv Makefile Makefile.cfg +cp Makefile.devel Makefile + diff --git a/cinelerra-5.1/thirdparty/Makefile b/cinelerra-5.1/thirdparty/Makefile index b5bb2e7e..5865b752 100644 --- a/cinelerra-5.1/thirdparty/Makefile +++ b/cinelerra-5.1/thirdparty/Makefile @@ -28,6 +28,8 @@ include $(TOPDIR)/global_config -include $(TOPDIR)/cin_config BLD := $(THIRDPARTY)/build +ifneq ($(WANT_CIN_3RDPARTY),no) + # package build flags, if needed # need frame pointer for debugs and helps with profiling # NOTE: the trailing blank is MANDITORY or the builds fail @@ -343,7 +345,13 @@ clean: install: cp -a $(ver_mjpegtools)/mpeg2enc/mpeg2enc $(BINDIR)/. cp -a $(ver_mjpegtools)/mplex/mplex $(BINDIR)/. +else +# not WANT_CIN_3RDPARTY +all: +clean: +install: +endif val-%: @echo $($(subst val-,,$@)) -- 2.26.2