fprintf(fp,"rm -rf $1/iso\n");
fprintf(fp,"mkdir -p $1/iso\n");
fprintf(fp,"\n");
+// dvdauthor ver 0.7.0 requires this to work
+ fprintf(fp,"export VIDEO_FORMAT=%s\n",
+ use_standard == HD_720x576_2500 ? "PAL" : "NTSC");
fprintf(fp,"dvdauthor -x - <<eof\n");
fprintf(fp,"<dvdauthor dest=\"$1/iso\">\n");
fprintf(fp," <vmgm>\n");
#include "asset.h"
#include "bcwindowbase.h"
#include "bitspopup.h"
+#include "ctype.h"
#include "ffmpeg.h"
#include "filebase.h"
#include "file.h"
FFMPEGConfigVideo::~FFMPEGConfigVideo()
{
+ delete ff_options_dialog;
lock_window("FFMPEGConfigVideo::~FFMPEGConfigVideo");
if(preset_popup) delete preset_popup;
presets.remove_all_objects();
char *FFOptions_Opt::get(char *vp, int sz)
{
- char *cp = vp, *ep = vp+sz-1;
+ char *cp = vp;
*cp = 0;
if( !opt ) return cp;
cp = sz >= 0 ? strncpy(vp,val,sz) : strcpy(vp, val);
if( sz > 0 ) vp[sz-1] = 0;
av_freep(&bp);
- return cp;
}
- *vp = 0;
return cp;
}
panel->update();
}
+void FFOptions_OptPanel::show_tip(const char *tip)
+{
+ if( !tip ) return;
+ int len = strlen(tip);
+ if( len > (int)sizeof(tip_text)-1 ) len = sizeof(tip_text)-1;
+ strncpy(tip_text,tip,len);
+ tip_text[len] = 0;
+ int line_limit = 60;
+ int limit2 = line_limit/2;
+ int limit4 = line_limit/4-2;
+ char *cp = tip_text, *dp = cp+len;
+ int n; char *bp, *ep, *pp, *sp;
+ while( cp < dp ) {
+ for( ep=cp; ep<dp && *ep!='\n'; ++ep );
+ // target about half remaining line, constrain line_limit
+ if( (n=(ep-1-cp)/2) < limit2 || n > line_limit )
+ n = line_limit;
+ // search for last punct, last space before line_limit
+ for( bp=cp, pp=sp=0; --n>=0 && cp<ep; ++cp ) {
+ if( ispunct(*cp) && isspace(*(cp+1)) ) pp = cp;
+ else if( isspace(*cp) ) sp = cp;
+ }
+ // line not empty
+ if( cp < ep ) {
+ // first, after punctuation
+ if( pp && pp-bp >= limit4 )
+ cp = pp+1;
+ // then, on spaces
+ else if( sp ) {
+ cp = sp;
+ }
+ // last, on next space
+ else {
+ while( cp<dp && !isspace(*cp) ) ++cp;
+ }
+ // add new line
+ if( !*cp ) break;
+ *cp++ = '\n';
+ }
+ }
+ fwin->panel->set_tooltip(tip_text);
+ fwin->panel->show_tooltip();
+}
+
int FFOptions_OptPanel::selection_changed()
{
FFOptions_Opt *opt = 0;
opt = opt_name->opt;
}
fwin->update(opt);
- fwin->panel->set_tooltip(!opt ? 0 : opt->tip());
- fwin->panel->show_tooltip();
+ if( opt ) show_tip(opt->tip());
return 1;
}
FFOptionsAudioDialog::~FFOptionsAudioDialog()
{
+ close_window();
}
void FFOptionsAudioDialog::update_options()
FFOptionsVideoDialog::~FFOptionsVideoDialog()
{
+ close_window();
}
void FFOptionsVideoDialog::update_options()
openexr.cfg_params+=--with-ilmbase-prefix=$(call bld_path,ilmbase,usr)
speech_tools.mak_params=-j1
twolame.cfg_params=--enable-shared=no
-x264.cfg_params= --enable-static
-x265.cfg_vars=echo "exec cmake source -DENABLE_SHARED=no" > ./configure; chmod +x ./configure;
+#$(error HAVE_HIGH_DEPTH $(HAVE_HIGH_DEPTH))
+x264.cfg_params= --enable-static $(if $(filter y,$(HAVE_HIGH_DEPTH)),--bit-depth=10)
+x265.cfg_vars=echo "exec cmake source -DENABLE_SHARED=no \
+ $(if $(filter y,$(HAVE_HIGH_DEPTH)),-DBUILD_SHARED_LIBS:BOOL=HIGH_BIT_DEPTH) \
+" > ./configure; chmod +x ./configure;
# compile flag vars
$(foreach tgt,$(TARGETS), \