[vdr] [PATCH] burn-0.0.6i author only + romanian i18n + requant fix from 0.0.6h

Lucian Muresan lucianm at users.sourceforge.net
Thu Sep 22 12:02:59 CEST 2005


Hello,

this is a patch against vdr-burn-0.0.6i from
http://gentoo.fh-luh.de/files/vdrplugin-burn/ which seems to be tha
latest version of the plugin.
@Ralf: Is it this one what you're maintaining at the moment?

The patch depends on the one I posted yesterday for VDR itself, the
ExchangeChars function from vdr/recording.c, I hope that Klaus will
include it in his next release.

What this patch does:
1. Introduces a new "store mode" called "Author only", useful if you'd
like to skip growisofs and the burning itself (for example, if the VDR
machine has no DVD burner, but you'd like to burn the DVD structure via
network on another machine, in windows for example and also want to see
the final result before burning, without having to mount the ISO).
The DVDAUTHOR folder from the temporary folder given as a parameter to
the plugin is moved into the folder specified for ISO images, and
renamed to the DVD title specified in the plugin menu, which could be a
remoteely mounted one. This way, the DVD structure is not wiped out
after exiting VDR.

2. romanian i18n.

3. The known bug about messed up multiple recordings when requanting
unfortunately wasn't cured with this 0.0.6i version, like stated in it's
readme file, so I integrated the fix for 0.0.6h from the vdr-portal.de
thread http://www.vdr-portal.de/board/thread.php?threadid=37768 in this
patch, too.

4. I also adjusted the correction factor for requanting even more, to
1.04, it seems to come even closer to the maximum DVD size without
getting too big.


Regards,
Lucian
-------------- next part --------------
diff -Naur burn-0.0.6i_orig/common.c burn-0.0.6i/common.c
--- burn-0.0.6i_orig/common.c	2005-09-08 11:49:20.000000000 +0200
+++ burn-0.0.6i/common.c	2005-09-22 01:24:42.000000000 +0200
@@ -14,7 +14,7 @@
 
 const char *BurnStates[__STATE_COUNT__] = { "List", "Status" };
 const char *DiskTypes[__TYPE_COUNT__]   = { "DVD with menus", "DVD without menus", "Archive disk" };
-const char *StoreModes[__STORE_COUNT__] = { "Create ISO only", "Write to Disc", "Create ISO and write" };
+const char *StoreModes[__STORE_COUNT__] = { "Author only", "Create ISO only", "Write to Disc", "Create ISO and write" };
 const char *BurnModes[__MODE_COUNT__]   = { "Shrink", "Distribute" };
 
 const char *TitleChars = "abcdefghijklmnopqrstuvwxyz"
diff -Naur burn-0.0.6i_orig/common.h burn-0.0.6i/common.h
--- burn-0.0.6i_orig/common.h	2005-05-10 16:47:04.000000000 +0200
+++ burn-0.0.6i/common.h	2005-09-22 01:25:29.000000000 +0200
@@ -44,6 +44,7 @@
 };
 
 enum eStoreMode {
+	smAuthorOnly,
 	smCreateISO,
 	smBurnISO,
 	smCreateBurn,
diff -Naur burn-0.0.6i_orig/i18n.c burn-0.0.6i/i18n.c
--- burn-0.0.6i_orig/i18n.c	2005-09-11 18:28:28.000000000 +0200
+++ burn-0.0.6i/i18n.c	2005-09-22 01:21:47.000000000 +0200
@@ -21,7 +21,7 @@
     "",
     "",
     "",
-    "",
+    "Arhivare pe DVD",
     "",
     "",
   },
@@ -38,7 +38,7 @@
     "",
     "",
     "",
-    "",
+    "Plugin universal de conversie ºi arhivare",
     "",
     "",
   },
@@ -55,7 +55,7 @@
     "",
     "",
     "",
-    "",
+    "Analizez înregistrãrile...",
     "",
     "",
   },
@@ -72,7 +72,7 @@
     "",
     "",
     "",
-    "",
+    "Înregistrãri marcate pentru arhivare",
     "",
     "",
   },
@@ -89,7 +89,7 @@
     "",
     "",
     "",
-    "",
+    "Nu sunt înregistrãri marcate",
     "",
     "",
   },
@@ -106,7 +106,7 @@
     "",
     "",
     "",
-    "",
+    "Mãrime totalã: %.1f MB",
     "",
     "",
   },
@@ -123,7 +123,7 @@
     "",
     "",
     "",
-    "",
+    "ªterg înregistrarea din listã?",
     "",
     "",
   },
@@ -140,7 +140,7 @@
     "",
     "",
     "",
-    "",
+    "ªterge",
     "",
     "",
   },
@@ -157,7 +157,7 @@
     "",
     "",
     "",
-    "",
+    "Repetã",
     "",
     "",
   },
@@ -174,7 +174,7 @@
     "",
     "",
     "",
-    "",
+    "Arhiveazã",
     "",
     "",
   },
@@ -191,7 +191,7 @@
     "",
     "",
     "",
-    "",
+    "Înregistrãrile vor trebui micºorate!",
     "",
     "",
   },
@@ -208,7 +208,7 @@
     "",
     "",
     "",
-    "",
+    "Stadiu",
     "",
     "",
   },
@@ -225,7 +225,7 @@
     "",
     "",
     "",
-    "",
+    "Nu sunt job-uri active sau în aºteptare",
     "",
     "",
   },
@@ -242,7 +242,7 @@
     "",
     "",
     "",
-    "",
+    "Job-uri în aºteptare",
     "",
     "",
   },
@@ -259,7 +259,7 @@
     "",
     "",
     "",
-    "",
+    "Listã",
     "",
     "",
   },
@@ -276,7 +276,7 @@
     "",
     "",
     "",
-    "",
+    "Job-uri eºuate",
     "",
     "",
   },
@@ -293,7 +293,7 @@
     "",
     "",
     "",
-    "",
+    "Job-uri terminate",
     "",
     "",
   },
@@ -310,7 +310,7 @@
     "",
     "",
     "",
-    "",
+    "Felul DVD-ului",
     "",
     "",
   },
@@ -327,7 +327,7 @@
     "",
     "",
     "",
-    "",
+    "DVD cu meniuri",
     "",
     "",
   },
@@ -344,7 +344,7 @@
     "",
     "",
     "",
-    "",
+    "DVD fãrã meniuri",
     "",
     "",
   },
@@ -361,7 +361,7 @@
     "",
     "",
     "",
-    "",
+    "Disc arhivare",
     "",
     "",
   },
@@ -378,7 +378,7 @@
     "",
     "",
     "",
-    "",
+    "Modul de arhivare",
     "",
     "",
   },
@@ -395,7 +395,7 @@
     "",
     "",
     "",
-    "",
+    "Micºorare la un disc",
     "",
     "",
   },
@@ -412,7 +412,7 @@
     "",
     "",
     "",
-    "",
+    "Distribuit pe multiple discuri",
     "",
     "",
   },
@@ -429,7 +429,7 @@
     "",
     "",
     "",
-    "",
+    "ªterg job-ul din listã?",
     "",
     "",
   },
@@ -446,7 +446,7 @@
     "",
     "",
     "",
-    "",
+    "Repet job-ul?",
     "",
     "",
   },
@@ -463,7 +463,7 @@
     "",
     "",
     "",
-    "",
+    "Vã rog introduceþi un disc gol ºi apãsaþi OK",
     "",
     "",
   },
@@ -480,7 +480,7 @@
     "",
     "",
     "",
-    "",
+    "Renunþã",
     "",
     "",
   },
@@ -497,7 +497,7 @@
     "",
     "",
     "",
-    "",
+    "Redare video",
     "",
     "",
   },
@@ -514,7 +514,7 @@
     "",
     "",
     "",
-    "",
+    "Anulat",
     "",
     "",
   },
@@ -531,7 +531,7 @@
     "",
     "",
     "",
-    "",
+    "Eroare",
     "",
     "",
   },
@@ -548,7 +548,7 @@
     "",
     "",
     "",
-    "",
+    "Job-ul încã e activ, totuºi anulaþi?",
     "",
     "",
   },
@@ -565,7 +565,7 @@
     "",
     "",
     "",
-    "",
+    "Converteºte textul în UTF-8",
     "",
     "",
   },
@@ -582,7 +582,7 @@
     "",
     "",
     "",
-    "",
+    "Job activ (Arhivare: % 3d%%)",
     "",
     "",
   },
@@ -599,7 +599,7 @@
     "",
     "",
     "",
-    "",
+    "Job activ (Verificare: % 3d%%)",
     "",
     "",
   },
@@ -616,7 +616,7 @@
     "",
     "",
     "",
-    "",
+    "Job activ (Conversie...)",
     "",
     "",
   },
@@ -633,7 +633,7 @@
     "",
     "",
     "",
-    "",
+    "titlul DVD-ului",
     "",
     "",
   },
@@ -650,7 +650,7 @@
     "",
     "",
     "",
-    "",
+    "În jos",
     "",
     "",
   },
@@ -667,7 +667,7 @@
     "",
     "",
     "",
-    "",
+    "Pagina urmãtoare",
     "",
     "",
   },
@@ -684,7 +684,7 @@
     "",
     "",
     "",
-    "",
+    "Pagina precedentã",
     "",
     "",
   },
@@ -701,8 +701,26 @@
     "",
     "",
     "",
+    "Destinaþia:",
+    "",
+    "",
+  },
+
+	{ "Author only",
+    "Nur DVD Struktur erzeugen",
+    "",
+    "",
+    "",
+    "",
+    "",
+    "",
+    "",
+    "",
+    "",
     "",
     "",
+    "Genereaza doar structura DVD",
+    "",
     "",
   },
 	{ "Create ISO only",
@@ -718,7 +736,7 @@
     "",
     "",
     "",
-    "",
+    "Creeazã doar imagine ISO",
     "",
     "",
   },
@@ -735,7 +753,7 @@
     "",
     "",
     "",
-    "",
+    "Scrie direct pe DVD",
     "",
     "",
   },
@@ -752,7 +770,7 @@
     "",
     "",
     "",
-    "",
+    "Creeazã imagine ISO ºi scrie DVD",
     "",
     "",
   },
@@ -769,7 +787,7 @@
     "",
     "",
     "",
-    "",
+    "Pune marcaje de arhivare",
     "",
     "",
   },
@@ -786,7 +804,7 @@
     "",
     "",
     "",
-    "",
+    "Înregistrarea este deja arhivatã",
     "",
     "",
   },
@@ -803,7 +821,7 @@
     "",
     "",
     "",
-    "",
+    "Nu s-au putut pune marcaje de arhivare",
     "",
     "",
   },
@@ -820,7 +838,7 @@
     "",
     "",
     "",
-    "",
+    "Indexul urmãtorului DVD de arhivare",
     "",
     "",
   },
@@ -837,7 +855,7 @@
     "",
     "",
     "",
-    "",
+    "INFO",
     "",
     "",
   },
@@ -854,7 +872,7 @@
     "",
     "",
     "",
-    "",
+    "Mãrime DVD",
     "",
     "",
   },
@@ -871,7 +889,7 @@
     "",
     "",
     "",
-    "",
+    "Nu pot accesa unitatea DVD",
     "",
     "",
   },
@@ -888,7 +906,7 @@
     "",
     "",
     "",
-    "",
+    "Verificare dupã scriere",
     "",
     "",
   },
@@ -905,7 +923,7 @@
     "",
     "",
     "",
-    "",
+    "Renunþ la verificarea DVD-ului?",
     "",
     "",
   },
@@ -922,7 +940,7 @@
     "",
     "",
     "",
-    "",
+    "Ascunde informþiile despre cale",
     "",
     "",
   },
@@ -939,7 +957,7 @@
     "",
     "",
     "",
-    "",
+    "Numeroteazã înregistrãrile în meniu",
     "",
     "",
   },
@@ -956,7 +974,7 @@
     "",
     "",
     "",
-    "",
+    "Scrierea DVD-ului s-a încheiat",
     "",
     "",
   },
@@ -973,7 +991,7 @@
     "",
     "",
     "",
-    "",
+    "Scrierea DVD-ului a eºuat",
     "",
     "",
   },
diff -Naur burn-0.0.6i_orig/jobs.c burn-0.0.6i/jobs.c
--- burn-0.0.6i_orig/jobs.c	2005-09-11 17:57:56.000000000 +0200
+++ burn-0.0.6i/jobs.c	2005-09-22 08:50:40.000000000 +0200
@@ -114,9 +114,9 @@
 }
 
 const tTrackInfoArray& cBurnRecording::GetTracks(void) {
-	if (!mTracks.Size()) {
+	//if (!mTracks.Size()) {
 		mTracks = FindTitleTracks(mTempDir);
-	}
+	//}
 	isyslog("BURN: GetTracks of: %s - %s", mTempDir, mTracks[0]->Filename());
 	return mTracks;
 }
diff -Naur burn-0.0.6i_orig/process-dvd.c burn-0.0.6i/process-dvd.c
--- burn-0.0.6i_orig/process-dvd.c	2005-09-11 17:55:38.000000000 +0200
+++ burn-0.0.6i/process-dvd.c	2005-09-22 08:53:35.000000000 +0200
@@ -16,6 +16,7 @@
 #include <vdr/tools.h>
 #include <vdr/interface.h>
 #include <vdr/plugin.h>
+#include <vdr/recording.h> 
 #include <stdlib.h>
 #include <locale.h>
 
@@ -114,10 +115,10 @@
 				SetNextStep();
 				break;
 			} else
-				mFactor = (mSizeMB * 1.05f) / DVDSIZE;
+				mFactor = (mSizeMB * 1.04f) / DVDSIZE;
 		}
 
-		if (SubStep > 0) {
+/*		if (SubStep > 0) {
 			cBurnRecording* rec = mJob->Get(SubStep-1);
                         rec->RefreshTracks();
 			const tTrackInfoArray& tracks = rec->GetTracks();
@@ -127,7 +128,7 @@
 				return false;
 			}
 		}
-
+*/
 		if (SubStep < mJob->Count()) {
 			double factor;
 			double sizeMB;
@@ -221,6 +222,14 @@
 			char *path;
 
 			switch (mJob->StoreMode()) {
+			case smAuthorOnly:
+				char * titlepath;
+				asprintf(&titlepath, "%s", mJob->Title());
+				SetCmdline("vdrburn.sh AUTHORONLY '%s' '%s' '%s'",
+						TempDir(), ISOdir,
+						ExchangeChars(titlepath, true));
+				free(titlepath);
+				break; 
 			case smCreateISO:
 				SetCmdline("vdrburn.sh MKISO '%s' '%s' '%s'",
 						TempDir(), ISOdir,
diff -Naur burn-0.0.6i_orig/vdrburn.sh burn-0.0.6i/vdrburn.sh
--- burn-0.0.6i_orig/vdrburn.sh	2005-09-11 14:47:53.000000000 +0200
+++ burn-0.0.6i/vdrburn.sh	2005-09-22 08:55:44.000000000 +0200
@@ -150,7 +150,7 @@
         else
             ExecCmd requant "$5" < "$4" > "$2/VDRSYNC.$3/requant.mpv"
         fi
-        mv "$2/VDRSYNC.$3/requant.mpv" "$4"
+        mv "$2/VDRSYNC.$3/requant.mpv" "$2/VDRSYNC.$3/vdrsync.mpv" 
         ;;
 
     # Mplex Syntax: TempDir FileName1 FileName2 FileName3
@@ -208,6 +208,12 @@
         fi
         ;;
 
+    # AUTHORONLY Syntax: TempDir IsoDir JobTitle
+    AUTHORONLY)
+	mv -gf "$2/DVDAUTHOR" "$3/$4"
+	chmod -R 0777 "$3/$4"
+        ;;
+
     # MkIso Syntax: TempDir IsoDir JobTitle
     MKISO)
         ExecCmd mkisofs -V "${4:0:32}" -dvd-video "$2/DVDAUTHOR" > "$3/$4.iso"


More information about the vdr mailing list