Skip to content
Extraits de code Groupes Projets
Valider 2a385174 rédigé par Seipas's avatar Seipas
Parcourir les fichiers

Hide "not-following times for syllables" warning

parent ff4f7a25
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -35,6 +35,7 @@ let override_style_mode = ref false in
let override_alpha_mode = ref true in
let backup_first_style_mode = ref true in
let guess_backcolor_mode= ref true in
let warning_following_syllable_mode = ref false in
let playResX = ref 800 in
let playResY = ref 600 in
let audio_file = ref "?video" in
......@@ -100,7 +101,7 @@ Arg.parse
let (style_list,event_list) = Toyunda_raw_to_v4p_ass.create_ass_events_and_styles
!font !outline_color !bold !italic !underline !strike_out !scalex !scaley !spacing !angle !borderstyle !outline !shadow !alignment !marginl !marginr
!default_font_size !default_primary_color !default_secondary_color !default_back_color !default_marginv !default_alpha !framerate
!color_threshold !override_style_mode !override_alpha_mode !backup_first_style_mode !guess_backcolor_mode
!color_threshold !override_style_mode !override_alpha_mode !backup_first_style_mode !guess_backcolor_mode !warning_following_syllable_mode
sorted_toyunda positioned_lines in
(*let _ = prerr_endline "[Info] Generate ass\n" in*)
......
Aucun aperçu pour ce type de fichier
......@@ -29,7 +29,7 @@ FORMATV4PASS=ass
# Target par défaut : compilation et nettoyage
all: build clean
all: build standalone clean
# Compilation
build : $(PROGRAM)
......
......@@ -314,7 +314,7 @@ type style = int(*id*) * int(*font_size*) * color(*primaryColour*) * color(*seco
let create_ass_events_and_styles
font outline_color bold italic underline strike_out scalex scaley spacing angle borderstyle outline shadow alignment marginl marginr
default_font_size default_primary_color default_secondary_color default_back_color default_marginv default_alpha framerate
color_threshold override_style_mode override_alpha_mode backup_first_style_mode guess_backcolor_mode
color_threshold override_style_mode override_alpha_mode backup_first_style_mode guess_backcolor_mode warning_following_syllable_mode
sorted_toyunda positioned_lines =
(*For each pipe number*)
......@@ -523,9 +523,13 @@ sorted_toyunda positioned_lines =
then if expected_frame == first_frame
then (sf,"")
else
let _ = Printf.eprintf "[Warning] Expected next syllable frame %d, got %d.\n" expected_frame sf in
let _ = if sf < expected_frame then Printf.eprintf "[ERROR] The previous syllable was too long, printing a negative \\k tag.\n" else () in
(first_frame, String.concat "" ["{\\k";string_of_int ((sf-expected_frame)*100/framerate);"}"])
let _ =
if sf < expected_frame
then Printf.eprintf "[ERROR] The previous syllable was too long (%d>%d), printing a negative \\k tag.\n" expected_frame sf
else if warning_following_syllable_mode
then Printf.eprintf "[Warning] Expected next syllable frame %d, got %d.\n" expected_frame sf
else () in
(first_frame, String.concat "" ["{\\k";string_of_int ((sf-expected_frame)*100/framerate);"}"])
else (first_frame,"") in
let kstring = string_of_int ((ef-sf)*100/framerate) in
(*let _ = Printf.eprintf "[Test] kstring %s for ef-sf = %d-%d = %d | expected_frame=%d first_frame=%d \n" kstring ef sf (ef-sf) expected_frame first_frame in*)
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter