add system build to autoconf/automake
[goodguy/history.git] / cinelerra-5.1 / cinelerra / dvdcreate.C
index c7477269e3642f26096c0cba11410bf1ff8dc475..ed43a03b7f10ca2fc8429fd87bd8da8afcf5a1d6 100644 (file)
@@ -5,6 +5,7 @@
 #include "edit.h"
 #include "edits.h"
 #include "edlsession.h"
+#include "file.h"
 #include "filexml.h"
 #include "keyframe.h"
 #include "labels.h"
@@ -170,9 +171,8 @@ int CreateDVD_Thread::create_dvd_jobs(ArrayList<BatchRenderJob*> *jobs,
        fprintf(fp,"#!/bin/bash\n");
        fprintf(fp,"echo \"running %s\" $# $*\n", script_filename);
        fprintf(fp,"\n");
-       char exe_path[BCTEXTLEN];
-       get_exe_path(exe_path);
-       fprintf(fp,"PATH=$PATH:%s\n",exe_path);
+       const char *exec_path = File::get_cinlib_path();
+       fprintf(fp,"PATH=$PATH:%s\n",exec_path);
        if( !use_ffmpeg ) {
                fprintf(fp,"mplex -f 8 -o $1/dvd.mpg $1/dvd.m2v $1/dvd.ac3\n");
                fprintf(fp,"\n");
@@ -180,6 +180,9 @@ int CreateDVD_Thread::create_dvd_jobs(ArrayList<BatchRenderJob*> *jobs,
        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");
@@ -187,7 +190,8 @@ int CreateDVD_Thread::create_dvd_jobs(ArrayList<BatchRenderJob*> *jobs,
        fprintf(fp,"  </vmgm>\n");
        fprintf(fp,"  <titleset>\n");
        fprintf(fp,"    <titles>\n");
-       fprintf(fp,"    <video format=\"ntsc\" aspect=\"%d:%d\" resolution=\"%dx%d\"/>\n",
+       fprintf(fp,"    <video format=\"%s\" aspect=\"%d:%d\" resolution=\"%dx%d\"/>\n",
+               use_standard == HD_720x576_2500 ? "pal" : "ntsc",
                (int)session->aspect_w, (int)session->aspect_h,
                session->output_w, session->output_h);
        fprintf(fp,"    <audio format=\"ac3\" lang=\"en\"/>\n");
@@ -705,6 +709,7 @@ CreateDVD_GUI::CreateDVD_GUI(CreateDVD_Thread *thread, int x, int y, int w, int
        cancel_x = cancel_y = cancel_w = cancel_h = 0;
        asset_title = 0;
        tmp_path = 0;
+       btmp_path = 0;
        disk_space = 0;
        need_deinterlace = 0;
        need_inverse_telecine = 0;
@@ -734,11 +739,15 @@ void CreateDVD_GUI::create_objects()
        asset_title = new CreateDVD_AssetTitle(this, at_x, at_y, get_w()-at_x-10);
        add_subwindow(asset_title);
        y += title->get_h() + pady/2;
-       title = new BC_Title(x, y, _("tmp path:"), MEDIUMFONT, YELLOW);
+       title = new BC_Title(x, y, _("Work path:"), MEDIUMFONT, YELLOW);
        add_subwindow(title);
        tmp_x = x + title->get_w();  tmp_y = y;
-       tmp_path = new CreateDVD_TmpPath(this, tmp_x, tmp_y,  get_w()-tmp_x-10);
+       tmp_path = new CreateDVD_TmpPath(this, tmp_x, tmp_y,  get_w()-tmp_x-35);
        add_subwindow(tmp_path);
+       btmp_path = new BrowseButton(thread->mwindow, this, tmp_path,
+               tmp_x+tmp_path->get_w(), tmp_y, "/tmp",
+               _("Work path"), _("Select a Work directory:"), 1);
+       add_subwindow(btmp_path);
        y += title->get_h() + pady/2;
        disk_space = new CreateDVD_DiskSpace(this, x, y);
        add_subwindow(disk_space);
@@ -802,7 +811,8 @@ void CreateDVD_GUI::create_objects()
 int CreateDVD_GUI::resize_event(int w, int h)
 {
        asset_title->reposition_window(at_x, at_y, get_w()-at_x-10);
-       tmp_path->reposition_window(tmp_x, tmp_y,  get_w()-tmp_x-10);
+       tmp_path->reposition_window(tmp_x, tmp_y,  get_w()-tmp_x-35);
+       btmp_path->reposition_window(tmp_x+tmp_path->get_w(), tmp_y);
        ok_y = h - ok_h - 10;
        ok->reposition_window(ok_x, ok_y);
        cancel_x = w - cancel_w - 10,