From 48b5a0b3846b512b5fbad17f770567dee79ac631 Mon Sep 17 00:00:00 2001 From: wforums Date: Thu, 9 Oct 2014 23:12:07 +0200 Subject: [PATCH 1/5] Small UCLA fix - --- src/params.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/params.c b/src/params.c index 6e57e1ac..b88aeb6d 100644 --- a/src/params.c +++ b/src/params.c @@ -235,9 +235,6 @@ void set_output_format (const char *format) ccx_options.transcript_settings.showEndTime = 1; ccx_options.transcript_settings.showCC = 0; ccx_options.transcript_settings.showMode = 1; - } else { - // Throw exception - fatal(EXIT_INCOMPATIBLE_PARAMETERS, "timedtranscript cannot be set after -UCLA is used!"); } } else if (strcmp (format,"report")==0) From e8f8d0436936f18f7b5055af59152ad0b85d70f3 Mon Sep 17 00:00:00 2001 From: wforums Date: Fri, 10 Oct 2014 16:37:41 +0200 Subject: [PATCH 2/5] possible fix for ucla timing issue --- src/lib_ccx/ccx_encoders_common.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib_ccx/ccx_encoders_common.c b/src/lib_ccx/ccx_encoders_common.c index c806fd49..85d744a8 100644 --- a/src/lib_ccx/ccx_encoders_common.c +++ b/src/lib_ccx/ccx_encoders_common.c @@ -140,13 +140,13 @@ void write_cc_line_as_transcript2(struct eia608_screen *data, struct encoder_ctx if (ccx_options.transcript_settings.showStartTime){ char buf1[80]; if (ccx_options.transcript_settings.relativeTimestamp){ - millis_to_date(start_time + context->subs_delay, buf1); + millis_to_date(start_time, buf1); fdprintf(context->out->fh, "%s|", buf1); } else { mstotime(start_time + context->subs_delay, &h1, &m1, &s1, &ms1); - time_t start_time_int = (start_time + context->subs_delay) / 1000; - int start_time_dec = (start_time + context->subs_delay) % 1000; + time_t start_time_int = start_time / 1000; + int start_time_dec = start_time % 1000; struct tm *start_time_struct = gmtime(&start_time_int); strftime(buf1, sizeof(buf1), "%Y%m%d%H%M%S", start_time_struct); fdprintf(context->out->fh, "%s%c%03d|", buf1,ccx_options.millis_separator,start_time_dec); From 47264425dfd6ce90a652b8830726e58f7dfd2bc0 Mon Sep 17 00:00:00 2001 From: wforums Date: Fri, 10 Oct 2014 16:47:30 +0200 Subject: [PATCH 3/5] Fix of build script + moving ccfont2 --- linux/build | 2 +- src/{ => lib_ccx}/ccfont2.xbm | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename src/{ => lib_ccx}/ccfont2.xbm (100%) diff --git a/linux/build b/linux/build index 9628415f..aa8f2fc8 100755 --- a/linux/build +++ b/linux/build @@ -1,2 +1,2 @@ #!/bin/bash -gcc -std=gnu99 -Wno-write-strings -DGPAC_CONFIG_LINUX -D_FILE_OFFSET_BITS=64 -I../src/gpacmp4/ -I../src/libpng/ -I../src/zlib/ -o ccextractor $(find ../src/ -name '*.cpp') $(find ../src/ -name '*.c') -lm -zmuldefs +gcc -std=gnu99 -Wno-write-strings -DGPAC_CONFIG_LINUX -D_FILE_OFFSET_BITS=64 -I../src/lib_ccx/ -I../src/gpacmp4/ -I../src/libpng/ -I../src/zlib/ -o ccextractor $(find ../src/ -name '*.cpp') $(find ../src/ -name '*.c') -lm -zmuldefs diff --git a/src/ccfont2.xbm b/src/lib_ccx/ccfont2.xbm similarity index 100% rename from src/ccfont2.xbm rename to src/lib_ccx/ccfont2.xbm From 9d5ce9aaae9a69482113ea4a5e7623d76baefeed Mon Sep 17 00:00:00 2001 From: wforums Date: Fri, 10 Oct 2014 18:49:39 +0200 Subject: [PATCH 4/5] UCLA bug fix? - --- src/lib_ccx/ccx_encoders_common.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/lib_ccx/ccx_encoders_common.c b/src/lib_ccx/ccx_encoders_common.c index 85d744a8..d638def5 100644 --- a/src/lib_ccx/ccx_encoders_common.c +++ b/src/lib_ccx/ccx_encoders_common.c @@ -140,13 +140,13 @@ void write_cc_line_as_transcript2(struct eia608_screen *data, struct encoder_ctx if (ccx_options.transcript_settings.showStartTime){ char buf1[80]; if (ccx_options.transcript_settings.relativeTimestamp){ - millis_to_date(start_time, buf1); + millis_to_date(start_time + context->subs_delay, buf1); fdprintf(context->out->fh, "%s|", buf1); } else { mstotime(start_time + context->subs_delay, &h1, &m1, &s1, &ms1); - time_t start_time_int = start_time / 1000; - int start_time_dec = start_time % 1000; + time_t start_time_int = (start_time + context->subs_delay) / 1000; + int start_time_dec = (start_time + context->subs_delay) % 1000; struct tm *start_time_struct = gmtime(&start_time_int); strftime(buf1, sizeof(buf1), "%Y%m%d%H%M%S", start_time_struct); fdprintf(context->out->fh, "%s%c%03d|", buf1,ccx_options.millis_separator,start_time_dec); @@ -161,8 +161,8 @@ void write_cc_line_as_transcript2(struct eia608_screen *data, struct encoder_ctx } else { mstotime(get_fts() + context->subs_delay, &h2, &m2, &s2, &ms2); - time_t end_time_int = end_time / 1000; - int end_time_dec = end_time % 1000; + time_t end_time_int = (end_time + context->subs_delay) / 1000; + int end_time_dec = (end_time + context->subs_delay) % 1000; struct tm *end_time_struct = gmtime(&end_time_int); strftime(buf2, sizeof(buf2), "%Y%m%d%H%M%S", end_time_struct); fdprintf(context->out->fh, "%s%c%03d|", buf2,ccx_options.millis_separator,end_time_dec); From 26d9584a9326f1c667175fc9d9dca29b12a68943 Mon Sep 17 00:00:00 2001 From: wforums Date: Fri, 10 Oct 2014 18:49:46 +0200 Subject: [PATCH 5/5] Windows projext fix --- windows/ccextractor.vcxproj | 4 +++- windows/ccextractor.vcxproj.filters | 12 +++++++++--- windows/ccextractor.vcxproj.user | 3 +-- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/windows/ccextractor.vcxproj b/windows/ccextractor.vcxproj index 19708f67..4f6137b5 100644 --- a/windows/ccextractor.vcxproj +++ b/windows/ccextractor.vcxproj @@ -11,7 +11,6 @@ - @@ -59,6 +58,7 @@ + @@ -145,6 +145,7 @@ + @@ -159,6 +160,7 @@ + diff --git a/windows/ccextractor.vcxproj.filters b/windows/ccextractor.vcxproj.filters index 5dec1bae..aa06d3c8 100644 --- a/windows/ccextractor.vcxproj.filters +++ b/windows/ccextractor.vcxproj.filters @@ -51,9 +51,6 @@ - - Header Files - Header Files\gpacmp4 @@ -240,6 +237,9 @@ Header Files\ccx_encoders + + Header Files + @@ -557,5 +557,11 @@ Source Files\ccx_encoders + + Source Files + + + Source Files\ccx_common + \ No newline at end of file diff --git a/windows/ccextractor.vcxproj.user b/windows/ccextractor.vcxproj.user index ff5921cf..3f583f64 100644 --- a/windows/ccextractor.vcxproj.user +++ b/windows/ccextractor.vcxproj.user @@ -1,8 +1,7 @@  - - + -in=bin -pn 1 -UCLA -12 -noru -out=ttxt -utf8 -unixts 0 -delay 1412456401000 "E:\Downloads\2014-10-04_2100_US_CNN_Newsroom.ccx.bin" WindowsLocalDebugger \ No newline at end of file