From 72da869b22f826e26cc19b4530ee9f97e4b78ab1 Mon Sep 17 00:00:00 2001
From: Andrew Randrianasulu <randrianasulu@gmail.com>
Date: Fri, 17 Dec 2021 03:16:44 +0300
Subject: [PATCH 09/24] EXPERIMENTAL: add bd_profile array to bdcreate.C (so in
 future we can diff between encoders)

---
 cinelerra-5.1/cinelerra/bdcreate.C | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/cinelerra-5.1/cinelerra/bdcreate.C b/cinelerra-5.1/cinelerra/bdcreate.C
index 150f835d..20a953e2 100644
--- a/cinelerra-5.1/cinelerra/bdcreate.C
+++ b/cinelerra-5.1/cinelerra/bdcreate.C
@@ -62,6 +62,13 @@ static struct bd_format {
 	{ "720x480   29.97p*",	 720,480,  29.97,  0, ILACE_MODE_NOTINTERLACED },
 };
 
+static struct bd_profile {
+	const char *name;
+} bd_profiles[] = {
+	{"bluray.m2ts"},
+};
+
+
 const int64_t CreateBD_Thread::BD_SIZE = 25000000000;
 const int CreateBD_Thread::BD_STREAMS = 1;
 const int CreateBD_Thread::BD_WIDTH = 1920;
@@ -316,7 +323,7 @@ int CreateBD_Thread::create_bd_jobs(ArrayList<BatchRenderJob*> *jobs, const char
 	strcpy(asset->fformat, "m2ts");
 
 	asset->audio_data = 1;
-	strcpy(asset->acodec, "bluray.m2ts");
+	strcpy(asset->acodec, bd_profiles[0].name);
 	//mwindow->defaults->get("DEFAULT_BLURAY_ACODEC", asset->acodec);
 	FFMPEG::set_option_path(option_path, "audio/%s", asset->acodec);
 	FFMPEG::load_options(option_path, asset->ff_audio_options,
@@ -324,7 +331,7 @@ int CreateBD_Thread::create_bd_jobs(ArrayList<BatchRenderJob*> *jobs, const char
 	asset->ff_audio_bitrate = bd_kaudio_rate * 1000;
 
 	asset->video_data = 1;
-	const char *vcodec = "bluray.m2ts";
+	const char *vcodec = bd_profiles[0].name;
 	switch( asset->interlace_mode ) {
 	case ILACE_MODE_TOP_FIRST:    vcodec = "bluray_tff.m2ts";  break;
 	case ILACE_MODE_BOTTOM_FIRST: vcodec = "bluray_bff.m2ts";  break;
-- 
2.34.1

