Permalink
Browse files

Merge pull request #2 from CCExtractor/master

Merge
  • Loading branch information...
MatejMecka committed Nov 13, 2018
2 parents a99cf6e + 38fc6e5 commit b485af80f1c6b6e395442bfffc35aff91d0b2070
@@ -6,6 +6,7 @@
[![Sample-Platform Build Status Windows](https://sampleplatform.ccextractor.org/static/img/status/build-windows.svg?maxAge=1800)](https://sampleplatform.ccextractor.org/test/master/windows)
[![Sample-Platform Build Status Linux](https://sampleplatform.ccextractor.org/static/img/status/build-linux.svg?maxAge=1800)](https://sampleplatform.ccextractor.org/test/master/linux)
[![SourceForge](https://img.shields.io/badge/SourceForge%20downloads-213k%2Ftotal-brightgreen.svg)](https://sourceforge.net/projects/ccextractor/)
![GitHub Releases (by Release)](https://img.shields.io/github/downloads/ccextractor/ccextractor/v0.87/total.svg)

CCExtractor is a tool used to produce subtitles for TV recordings from almost anywhere in the world. We intend to keep up with all sources and formats.

@@ -1,6 +1,9 @@
0.88(2018-10-24) (unreleased)
-----------------
- New: Add support for tesseract 4.0
- Optimize: Remove multiple RGB to grey conversion in OCR.
- Fix: Update UTF8Proc to 2.2.0
- Fix: Warn instead of fatal when a 0xFF marker is missing

0.87 (2018-10-23)
-----------------
@@ -326,6 +326,10 @@ ccextractor_CFLAGS += -DPAC_CONFIG_DARWIN -Dfopen64=fopen -Dopen64=open -Dlseek6
ccextractor_LDADD += -liconv -lz
endif

if SYS_IS_64_BIT
ccextractor_CFLAGS += -DGPAC_64_BITS
endif

if HARDSUBX_IS_ENABLED
ccextractor_CFLAGS += -DENABLE_HARDSUBX
ccextractor_CPPFLAGS+= ${libavcodec_CFLAGS}
@@ -1,5 +1,10 @@
#!/bin/bash
BLD_FLAGS="-std=gnu99 -Wno-write-strings -DGPAC_CONFIG_LINUX -D_FILE_OFFSET_BITS=64 -DVERSION_FILE_PRESENT -DENABLE_OCR -DFT2_BUILD_LIBRARY -DGPAC_DISABLE_VTT -DGPAC_DISABLE_OD_DUMP"
bit_os=$(getconf LONG_BIT)
if [ "$bit_os"=="64" ]
then
BLD_FLAGS="$BLD_FLAGS -DGPAC_64_BITS"
fi
BLD_INCLUDE="-I../src -I /usr/include/leptonica/ -I /usr/include/tesseract/ -I../src/lib_ccx/ -I../src/gpacmp4/ -I../src/libpng/ -I../src/zlib/ -I../src/zvbi -I../src/lib_hash -I../src/protobuf-c -I../src/utf8proc -I../src/freetype/include"
SRC_LIBPNG="$(find ../src/libpng/ -name '*.c')"
SRC_ZLIB="$(find ../src/zlib/ -name '*.c')"
@@ -91,4 +96,4 @@ if [[ "$out" != "" ]] ; then
echo "Compilation successful, compiler message shown in previous lines"
else
echo "Compilation successful, no compiler messages."
fi
fi
@@ -1,5 +1,10 @@
#!/bin/bash
BLD_FLAGS="-g -std=gnu99 -Wno-write-strings -DGPAC_CONFIG_LINUX -D_FILE_OFFSET_BITS=64 -DVERSION_FILE_PRESENT -DENABLE_OCR -DENABLE_HARDSUBX -DFT2_BUILD_LIBRARY -DGPAC_DISABLE_VTT -DGPAC_DISABLE_OD_DUMP"
bit_os=$(getconf LONG_BIT)
if [ "$bit_os"=="64" ]
then
BLD_FLAGS="$BLD_FLAGS -DGPAC_64_BITS"
fi
BLD_INCLUDE="-I../src -I /usr/local/include -I /usr/include/leptonica/ -I /usr/include/tesseract/ -I../src/lib_ccx/ -I../src/gpacmp4/ -I../src/libpng/ -I../src/zlib/ -I../src/zvbi -I../src/lib_hash -I../src/protobuf-c -I../src/freetype/include"
SRC_LIBPNG="$(find ../src/libpng/ -name '*.c')"
SRC_ZLIB="$(find ../src/zlib/ -name '*.c')"
@@ -1,5 +1,10 @@
#!/bin/bash
BLD_FLAGS="-g -std=gnu99 -Wno-write-strings -Wno-unused-result -DGPAC_CONFIG_LINUX -D_FILE_OFFSET_BITS=64 -DVERSION_FILE_PRESENT -DENABLE_OCR -DFT2_BUILD_LIBRARY -DGPAC_DISABLE_VTT -DGPAC_DISABLE_OD_DUMP"
bit_os=$(getconf LONG_BIT)
if [ "$bit_os"=="64" ]
then
BLD_FLAGS="$BLD_FLAGS -DGPAC_64_BITS"
fi
BLD_INCLUDE="-I../src -I /usr/local/include/leptonica/ -I /usr/local/include/tesseract/ -I /usr/include/leptonica/ -I /usr/include/tesseract/ -I../src/lib_ccx/ -I../src/gpacmp4/ -I../src/libpng/ -I../src/zlib/ -I../src/zvbi -I../src/lib_hash -I../src/protobuf-c -I../src/utf8proc -I../src/freetype/include"
SRC_LIBPNG="$(find ../src/libpng/ -name '*.c')"
SRC_ZLIB="$(find ../src/zlib/ -name '*.c')"
@@ -115,6 +115,7 @@ AM_CONDITIONAL(TESSERACT_PRESENT_RPI, [ test -d "/usr/include/tesseract" && test
AM_CONDITIONAL(SYS_IS_LINUX, [ test `uname -s` = "Linux"])
AM_CONDITIONAL(SYS_IS_MAC, [ test `uname -s` = "Darwin"])
AM_CONDITIONAL(BUILD_WITH_GUI, [test "x$with_gui" = "xyes"])
AM_CONDITIONAL(SYS_IS_64_BIT,[test `getconf LONG_BIT` = "64"])

AC_CONFIG_FILES([Makefile])
AC_OUTPUT
@@ -42,6 +42,10 @@ configure_file (

add_definitions(-DVERSION_FILE_PRESENT -DFT2_BUILD_LIBRARY -DGPAC_DISABLE_VTT -DGPAC_DISABLE_OD_DUMP)

if(CMAKE_SIZEOF_VOID_P EQUAL 8)
add_definitions(-DGPAC_64_BITS)
endif()

include_directories ("${PROJECT_SOURCE_DIR}")
include_directories ("${PROJECT_SOURCE_DIR}/lib_ccx/")
include_directories ("${PROJECT_SOURCE_DIR}/utf8proc/")
@@ -500,10 +500,11 @@ void user_data_registered_itu_t_t35 (struct avc_ctx *ctx, unsigned char *userbuf
if (cc_tmp_data+local_cc_count*3 >= userend)
fatal(CCX_COMMON_EXIT_BUG_BUG,
"Syntax problem: Too many caption blocks.");
if (cc_tmp_data[local_cc_count*3]!=0xFF)
fatal(CCX_COMMON_EXIT_BUG_BUG,
"Syntax problem: Final 0xFF marker missing.");

if (cc_tmp_data[local_cc_count*3]!=0xFF){
// See GitHub Issue #1001 for the related change
mprint ("\rWarning! Syntax problem: Final 0xFF marker missing. Continuing...\n");
break; // Skip Block
}
// Save the data and process once we know the sequence number
if ( ( (ctx->cc_count + local_cc_count) * 3) + 1 > ctx->cc_databufsize)
{
@@ -1661,15 +1661,17 @@ static int write_dvb_sub(struct lib_cc_decode *dec_ctx, struct cc_subtitle *sub)
// Perform OCR
#ifdef ENABLE_OCR
char *ocr_str = NULL;
if (ctx->ocr_ctx) {
if (ctx->ocr_ctx)
{
ret = ocr_rect(ctx->ocr_ctx, rect, &ocr_str, region->bgcolor, dec_ctx->ocr_quantmode);
if (ret >= 0)
rect->ocr_text = ocr_str;
else
rect->ocr_text = NULL;
dbg_print(CCX_DMT_DVB, "\nOCR Result: %s\n", rect->ocr_text ? rect->ocr_text : "NULL");
}
else {
else
{
rect->ocr_text = NULL;
}
#endif
@@ -1889,7 +1891,7 @@ int parse_dvb_description(struct dvb_config* cfg, unsigned char*data,
/* setting language to undefined if not found in language lkup table */
char lang_name[4];
dbg_print(CCX_DMT_DVB, "DVBSUB - LANGUAGE \"");

for(int char_index = 0; char_index < 3; char_index++)
{
lang_name[char_index] = cctolower(data[char_index]);
Oops, something went wrong.

0 comments on commit b485af8

Please sign in to comment.