X-Git-Url: https://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fbdcreate.C;h=2a9de6851f5fe041a93e5e352c030bd1caa98ef2;hb=21f715f2d24d38bd7a0eccb22d64cdf18f0e3df9;hp=7420a31f957907de1c6b3c6a948210a57eb07247;hpb=172ef8e133b80572d7d81b06f6658ce89bf709a3;p=goodguy%2Fcinelerra.git diff --git a/cinelerra-5.1/cinelerra/bdcreate.C b/cinelerra-5.1/cinelerra/bdcreate.C index 7420a31f..2a9de685 100644 --- a/cinelerra-5.1/cinelerra/bdcreate.C +++ b/cinelerra-5.1/cinelerra/bdcreate.C @@ -1,3 +1,23 @@ +/* + * CINELERRA + * Copyright (C) 2016-2020 William Morrow + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published + * by the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA + */ + #include "asset.h" #include "bchash.h" #include "bdcreate.h" @@ -26,12 +46,21 @@ #include #if !defined(__FreeBSD__) #include +#if !defined(__NetBSD__) #include +#endif #else #include #include #endif +#if defined(__NetBSD__) +#include +#ifndef statfs +#define statfs statvfs +#endif +#endif + // BD Creation // selected by timezone @@ -191,8 +220,9 @@ char *BD_BatchRenderJob::create_script(EDL *edl, ArrayList *idxbls) fprintf(fp,"sz=`du -cb $dir/bd.m2ts* | tail -1 | sed -e 's/[ ].*//'`\n"); fprintf(fp,"blks=$((sz/2048 + 4096))\n"); fprintf(fp,"rm -f %s\n", udfs); - fprintf(fp,"if [ -f bd.meta ]; then\n"); - fprintf(fp,"tsmuxer bd.meta $dir/bd.iso \n"); + fprintf(fp,"if [ -f $dir/bd.meta ]; then\n"); + fprintf(fp,"sed -i \"s|bd.m2ts|$dir\/bd.m2ts|g\" $dir/bd.meta\n"); + fprintf(fp,"tsmuxer $dir/bd.meta $dir/bd.iso \n"); fprintf(fp,"mv $dir/bd.iso $dir/bd.udfs\n"); fprintf(fp,"else\n"); fprintf(fp,"mkudffs -b 2048 %s $blks\n", udfs); @@ -346,12 +376,14 @@ int CreateBD_Thread::create_bd_jobs(ArrayList *jobs, const char } - fprintf(fp,"MUXOPT --blu-ray --hdmv-descriptors\n"); + fprintf(fp,"MUXOPT --blu-ray --hdmv-descriptors --auto-chapters=5\n"); fprintf(fp,"V_MPEG4/ISO/AVC, bd.m2ts, track=4113\n"); if(!strcmp(use_profile, "bluray.m2ts")) fprintf(fp,"A_AC3, bd.m2ts, track=4352\n"); if(!strcmp(use_profile, "bluray_lpcm.m2ts")) fprintf(fp,"A_LPCM, bd.m2ts, track=4352\n"); + if(!strcmp(use_profile, "bluray_truehd.m2ts")) + fprintf(fp,"A_MLP, bd.m2ts, track=4352\n"); fprintf(fp,"\n"); fclose(fp); @@ -961,6 +993,7 @@ void CreateBD_GUI::update() need_wide_audio->set_value(thread->use_wide_audio); need_labeled->set_value(thread->use_labeled); need_farmed->set_value(thread->use_farmed); + need_tsmuxer->set_value(thread->use_tsmuxer); } int CreateBD_Thread:: @@ -1010,6 +1043,7 @@ option_presets() use_wide_audio = 0; use_labeled = 0; use_farmed = 0; + use_tsmuxer = 0; if( !mwindow->edl ) return 1; @@ -1218,6 +1252,7 @@ CreateBD_Profile::CreateBD_Profile(CreateBD_GUI *gui, int x, int y) : BC_PopupTextBox(gui, 0, 0, x, y, xS(170),yS(50)) { this->gui = gui; + strcpy(gui->thread->use_profile, "bluray.m2ts"); } CreateBD_Profile::~CreateBD_Profile()