From efa5246e9610548448a6e4d505fdc6bdb5da84eb Mon Sep 17 00:00:00 2001 From: Good Guy Date: Sun, 26 Mar 2017 15:35:44 -0600 Subject: [PATCH] enable titler stroker, rework xlat.sh, disable latex in theora build --- cinelerra-5.1/plugins/titler/titler.C | 2 +- cinelerra-5.1/plugins/titler/titler.h | 1 + cinelerra-5.1/plugins/titler/titlerwindow.C | 12 +++++----- cinelerra-5.1/po/xlat.sh | 25 ++++++++------------- cinelerra-5.1/thirdparty/Makefile | 2 +- 5 files changed, 18 insertions(+), 24 deletions(-) diff --git a/cinelerra-5.1/plugins/titler/titler.C b/cinelerra-5.1/plugins/titler/titler.C index dde50aa3..aa4619fb 100644 --- a/cinelerra-5.1/plugins/titler/titler.C +++ b/cinelerra-5.1/plugins/titler/titler.C @@ -91,7 +91,7 @@ TitleConfig::TitleConfig() outline_color = WHITE; outline_alpha = 0xff; color_stroke = 0xff0000; - stroke_width = 1.0; + stroke_width = 0.0; motion_strategy = NO_MOTION; line_pitch = 0; loop = 0; diff --git a/cinelerra-5.1/plugins/titler/titler.h b/cinelerra-5.1/plugins/titler/titler.h index dd16988a..eff6db54 100644 --- a/cinelerra-5.1/plugins/titler/titler.h +++ b/cinelerra-5.1/plugins/titler/titler.h @@ -21,6 +21,7 @@ #ifndef TITLE_H #define TITLE_H +#define USE_STROKER #define KW_NUDGE _("nudge") #define KW_COLOR _("color") diff --git a/cinelerra-5.1/plugins/titler/titlerwindow.C b/cinelerra-5.1/plugins/titler/titlerwindow.C index c295a943..a38da02a 100644 --- a/cinelerra-5.1/plugins/titler/titlerwindow.C +++ b/cinelerra-5.1/plugins/titler/titlerwindow.C @@ -355,8 +355,7 @@ void TitleWindow::create_objects() outline = new TitleOutline(client, this, x, y1); outline->create_objects(); x += outline->get_w() + 2*margin; -#ifdef USE_STOKER -// to different to be used +#ifdef USE_STROKER add_tool(stroker_title = new BC_Title(x, y, _("Stroker:"))); stroker = new TitleStroker(client, this, x, y1); stroker->create_objects(); @@ -690,7 +689,7 @@ void TitleWindow::update() text->update(&client->config.wtext[0]); speed->update(client->config.pixels_per_second); outline->update((int64_t)client->config.outline_size); -#ifdef USE_STOKER +#ifdef USE_STROKER stroker->update((int64_t)client->config.stroke_width); #endif timecode->update(client->config.timecode); @@ -1002,7 +1001,7 @@ void TitleWindow::check_style(const char *font_name, int update) if( has_norm && has_bold ) bold->enable(); else bold->disable(); if( has_norm && has_ital ) italic->enable(); else italic->disable(); if( update ) { - int style = 0; + int style = stroker && atof(stroker->get_text()) ? BC_FONT_OUTLINE : 0; if( bold->get_value() ) style |= BC_FONT_BOLD; if( italic->get_value() ) style |= BC_FONT_ITALIC; client->config.style = style; @@ -1086,6 +1085,7 @@ int TitleOutline::handle_event() return 1; } + TitleStroker::TitleStroker(TitleMain *client, TitleWindow *window, int x, int y) : BC_TumbleTextBox(window, (int64_t)client->config.stroke_width, (int64_t)0, (int64_t)1000, x, y, 70) @@ -1095,8 +1095,8 @@ TitleStroker::TitleStroker(TitleMain *client, TitleWindow *window, int x, int y) } int TitleStroker::handle_event() { - client->config.stroke_width = atol(get_text()); - if( client->config.stroke_width > 1 ) + client->config.stroke_width = atof(get_text()); + if( client->config.stroke_width ) client->config.style |= BC_FONT_OUTLINE; else client->config.style &= ~BC_FONT_OUTLINE; diff --git a/cinelerra-5.1/po/xlat.sh b/cinelerra-5.1/po/xlat.sh index f4c7182d..51c3e88c 100755 --- a/cinelerra-5.1/po/xlat.sh +++ b/cinelerra-5.1/po/xlat.sh @@ -9,31 +9,23 @@ # #undef MSGQUAL # #define MSGQUAL 0 # -if [ $# -lt 1 -o ! -d "$1" ]; then - echo 1>&2 "usage: $0 //cinelerra-src [/tmp] > //cin.po" - exit 1 -fi -cin_dir=`basename "$1"` -tmp_dir=`mktemp -d -p ${2:-/tmp} cin_XXXXXX` -trap "rm -rf '$tmp_dir'" EXIT - -#need a copy of src dir for editing -echo 1>&2 "copy" -cp -a "$1" "$tmp_dir/." -cd "$tmp_dir/$cin_dir" +cin_dir=`mktemp -d -p /tmp cin_XXXXXX` +trap "rm -rf '$cin_dir'" EXIT +mkdir -p "$cin_dir" echo 1>&2 "edit" -for d in guicast/ cinelerra/ plugins/*; do +for d in guicast cinelerra plugins/*; do if [ ! -d "$d" ]; then continue; fi - ls -1 $d/*.[Ch] $d/*.inc 2> /dev/null + mkdir -p "$cin_dir/$d" + ls -1 "$d"/*.[Ch] "$d"/*.inc 2> /dev/null done | while read f ; do #qualifier is reset using #define MSGQUAL "qual_id" #this changes: # code C_("xxx") [... code _("yyy")] #to: # code D_("qual_id#xxx") [... code D_("qual_id#yyy")] - sed -n -i "$f" -f - <<<'1,1{x; s/.*/_("/; x} + sed -n "$f" > "$cin_dir/$f" -f - <<<'1,1{x; s/.*/_("/; x} :n1 s/^\(#define MSGQUAL[ ]\)/\1/; t n4 :n2 s/\&2 "scan" -for d in guicast/ cinelerra/ plugins/*; do +cd "$cin_dir" +for d in guicast cinelerra plugins/*; do if [ ! -d "$d" ]; then continue; fi ls -1 $d/*.[Ch] $d/*.inc 2> /dev/null done | xgettext --no-wrap -L C++ -k_ -kN_ -kD_ -f - -o - diff --git a/cinelerra-5.1/thirdparty/Makefile b/cinelerra-5.1/thirdparty/Makefile index 09e872cc..aa653566 100644 --- a/cinelerra-5.1/thirdparty/Makefile +++ b/cinelerra-5.1/thirdparty/Makefile @@ -195,7 +195,7 @@ libraw1394.cfg_params?= --enable-shared=no; ln -sf src libraw1394 libtheora.cfg_vars?=PKG_CONFIG_PATH=$(call bld_path,libogg):$(call bld_path,libvorbis) libtheora.cflags?="$(call inc_path,libogg,include) $(call inc_path,libogg,src) $(call inc_path,libvorbis,include)" libtheora.ldflags?="$(call ld_path,libvorbis,lib/.libs) $(call ld_path,libogg,src/.libs)" -libtheora.cfg_params?= --disable-examples --enable-shared=no +libtheora.cfg_params?= --disable-examples --disable-spec --enable-shared=no libuuid.cfg_params?=--enable-shared=no libvorbis.cfg_params?= --disable-oggtest --enable-shared=no openjpeg.cfg_params?= -DBUILD_SHARED_LIBS:BOOL=OFF -- 2.26.2