Skip to content

Commit 4b5f68a

Browse files
authored
[FEAT] Remove share module (#1737)
* replaced nanomsg with nanomsg_sys * feat: Share Module - squash commits * Share Module: Added Documentation * Share Module: Removed Sharing Service * Share: formatting issues * Share: failing CI * Share: failing CI * Share: Removed protobuf * Share Module: Update CHANGES.txt * Share Module: Update Cargo.lock * Share Module: Update CHANGES.txt * Share Module: Update Cargo.toml * Share Module: Update Cargo.toml
1 parent 25a447d commit 4b5f68a

40 files changed

+16
-5716
lines changed

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,6 @@ src/lib_hash/.deps/
106106
src/lib_hash/.dirstamp
107107
src/libpng/.deps/
108108
src/libpng/.dirstamp
109-
src/protobuf-c/.deps/
110-
src/protobuf-c/.dirstamp
111109
src/utf8proc/.deps/
112110
src/utf8proc/.dirstamp
113111
src/zlib/.deps/

docs/CHANGES.TXT

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
1.0 (to be released)
22
-----------------
3+
- Removed the Share Module
34
- Fix: Regression failures on DVD files
45
- Fix: Segmentation faults on MP4 files with CEA-708 captions
56
- Refactor: Remove API structures from ccextractor

docs/using_cmake_build.txt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Step 2) create a separate directory where you want to build the target.
1313

1414
Step 3) make the build system using cmake. Params in [] are optional and have
1515
been explained later in the document.
16-
~> cmake [-DWITH_FFMPEG=ON] [-DWITH_OCR=ON] [-DWITH_SHARING=ON]
16+
~> cmake [-DWITH_FFMPEG=ON] [-DWITH_OCR=ON]
1717
[-DWITH_HARDSUBX=ON] ../src/
1818

1919
Step 4) Compile the code.
@@ -29,9 +29,6 @@ cmake -DWITH_FFMPEG=ON ../src/
2929
If you want to build CCExtractor with OCR you need to pass
3030
cmake -DWITH_OCR=ON ../src/
3131

32-
If you want to build CCExtractor with Sharing and Translating service:
33-
cmake -DWITH_SHARING=ON ../src/
34-
3532
If you want to build CCExtractor with HARDSUBX support
3633
cmake -DWITH_HARDSUBX=ON ../src/
3734

linux/Makefile.am

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -123,10 +123,6 @@ ccextractor_SOURCES = \
123123
../src/lib_ccx/ccx_gxf.c \
124124
../src/lib_ccx/ccx_gxf.h \
125125
../src/lib_ccx/ccx_mp4.h \
126-
../src/lib_ccx/ccx_share.c \
127-
../src/lib_ccx/ccx_share.h \
128-
../src/lib_ccx/ccx_sub_entry_message.pb-c.c \
129-
../src/lib_ccx/ccx_sub_entry_message.pb-c.h \
130126
../src/lib_ccx/compile_info.h \
131127
../src/lib_ccx/compile_info_real.h \
132128
../src/lib_ccx/configuration.c \
@@ -206,8 +202,6 @@ ccextractor_SOURCES = \
206202
../src/thirdparty/utf8proc/utf8proc.h \
207203
../src/thirdparty/lib_hash/sha2.c \
208204
../src/thirdparty/lib_hash/sha2.h \
209-
../src/thirdparty/protobuf-c/protobuf-c.c \
210-
../src/thirdparty/protobuf-c/protobuf-c.h \
211205
../src/lib_ccx/zvbi/bcd.h \
212206
../src/lib_ccx/zvbi/bit_slicer.c \
213207
../src/lib_ccx/zvbi/bit_slicer.h \
@@ -272,7 +266,7 @@ endif
272266

273267
ccextractor_CFLAGS = -std=gnu99 -Wno-write-strings -Wno-pointer-sign -D_FILE_OFFSET_BITS=64 -DVERSION_FILE_PRESENT -DFT2_BUILD_LIBRARY -DGPAC_DISABLE_VTT -DGPAC_DISABLE_OD_DUMP -DGPAC_DISABLE_REMOTERY -DNO_GZIP
274268

275-
ccextractor_CPPFLAGS =-I../src/lib_ccx/ -I/usr/include/ -I../src/thirdparty/libpng/ -I../src/thirdparty/zlib/ -I../src/lib_ccx/zvbi/ -I../src/thirdparty/lib_hash/ -I../src/thirdparty/protobuf-c/ -I../src/thirdparty -I../src/ -I../src/thirdparty/freetype/include/
269+
ccextractor_CPPFLAGS =-I../src/lib_ccx/ -I/usr/include/ -I../src/thirdparty/libpng/ -I../src/thirdparty/zlib/ -I../src/lib_ccx/zvbi/ -I../src/thirdparty/lib_hash/ -I../src/thirdparty -I../src/ -I../src/thirdparty/freetype/include/
276270

277271

278272
ccextractor_LDADD=-lm -lpthread -ldl -lgpac

linux/build

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,12 @@ if [ "$bit_os" == "64" ]
3535
then
3636
BLD_FLAGS="$BLD_FLAGS -DGPAC_64_BITS"
3737
fi
38-
BLD_INCLUDE="-I../src -I /usr/include/leptonica/ -I /usr/include/tesseract/ -I../src/lib_ccx/ -I /usr/include/gpac/ -I../src/thirdparty/libpng -I../src/thirdparty/zlib -I../src/lib_ccx/zvbi -I../src/thirdparty/lib_hash -I../src/thirdparty/protobuf-c -I../src/thirdparty -I../src/thirdparty/freetype/include"
38+
BLD_INCLUDE="-I../src -I /usr/include/leptonica/ -I /usr/include/tesseract/ -I../src/lib_ccx/ -I /usr/include/gpac/ -I../src/thirdparty/libpng -I../src/thirdparty/zlib -I../src/lib_ccx/zvbi -I../src/thirdparty/lib_hash -I../src/thirdparty -I../src/thirdparty/freetype/include"
3939
SRC_LIBPNG="$(find ../src/thirdparty/libpng/ -name '*.c')"
4040
SRC_ZLIB="$(find ../src/thirdparty/zlib/ -name '*.c')"
4141
SRC_CCX="$(find ../src/lib_ccx/ -name '*.c')"
4242
SRC_GPAC="$(find /usr/include/gpac/ -name '*.c')"
4343
SRC_HASH="$(find ../src/thirdparty/lib_hash/ -name '*.c')"
44-
SRC_PROTOBUF="$(find ../src/thirdparty/protobuf-c/ -name '*.c')"
4544
SRC_UTF8PROC="../src/thirdparty/utf8proc/utf8proc.c"
4645
SRC_FREETYPE="../src/thirdparty/freetype/autofit/autofit.c
4746
../src/thirdparty/freetype/base/ftbase.c
@@ -84,7 +83,7 @@ SRC_FREETYPE="../src/thirdparty/freetype/autofit/autofit.c
8483
../src/thirdparty/freetype/type1/type1.c
8584
../src/thirdparty/freetype/type42/type42.c
8685
../src/thirdparty/freetype/winfonts/winfnt.c"
87-
BLD_SOURCES="../src/ccextractor.c $SRC_CCX $SRC_GPAC $SRC_ZLIB $SRC_LIBPNG $SRC_HASH $SRC_PROTOBUF $SRC_UTF8PROC $SRC_FREETYPE"
86+
BLD_SOURCES="../src/ccextractor.c $SRC_CCX $SRC_GPAC $SRC_ZLIB $SRC_LIBPNG $SRC_HASH $SRC_UTF8PROC $SRC_FREETYPE"
8887
BLD_LINKER="$BLD_LINKER -lm -zmuldefs -l tesseract -l leptonica -lpthread -ldl -lgpac"
8988

9089
echo "Running pre-build script..."

linux/module_generator

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ SRC_ZLIB="$(find ../src/thirdparty/zlib/ -name '*.c')"
44
SRC_ZVBI="$(find ../src/thirdparty/zvbi/ -name '*.c')"
55
SRC_CCX="$(find ../src/lib_ccx/ -name '*.c')"
66
SRC_HASH="$(find ../src/thirdparty/lib_hash/ -name '*.c')"
7-
SRC_PROTOBUF="$(find ../src/thirdparty/protobuf-c/ -name '*.c')"
87
SRC_UTF8PROC="../src/utf8proc/utf8proc.c"
9-
BLD_SOURCES="../src/ccextractor.c ../src/ccextractorapi_wrap.c $SRC_CCX $SRC_ZLIB $SRC_ZVBI $SRC_LIBPNG $SRC_HASH $SRC_PROTOBUF $SRC_UTF8PROC"
8+
BLD_SOURCES="../src/ccextractor.c ../src/ccextractorapi_wrap.c $SRC_CCX $SRC_ZLIB $SRC_ZVBI $SRC_LIBPNG $SRC_HASH $SRC_UTF8PROC"
109

1110
python setup.py $BLD_SOURCES

mac/Makefile.am

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,6 @@ ccextractor_SOURCES = \
9595
../src/lib_ccx/ccx_gxf.c \
9696
../src/lib_ccx/ccx_gxf.h \
9797
../src/lib_ccx/ccx_mp4.h \
98-
../src/lib_ccx/ccx_share.c \
99-
../src/lib_ccx/ccx_share.h \
100-
../src/lib_ccx/ccx_sub_entry_message.pb-c.c \
101-
../src/lib_ccx/ccx_sub_entry_message.pb-c.h \
10298
../src/lib_ccx/compile_info.h \
10399
../src/lib_ccx/compile_info_real.h \
104100
../src/lib_ccx/configuration.c \
@@ -178,8 +174,6 @@ ccextractor_SOURCES = \
178174
../src/thirdparty/utf8proc/utf8proc.h \
179175
../src/thirdparty/lib_hash/sha2.c \
180176
../src/thirdparty/lib_hash/sha2.h \
181-
../src/thirdparty/protobuf-c/protobuf-c.c \
182-
../src/thirdparty/protobuf-c/protobuf-c.h \
183177
../src/lib_ccx/zvbi/bcd.h \
184178
../src/lib_ccx/zvbi/bit_slicer.c \
185179
../src/lib_ccx/zvbi/bit_slicer.h \
@@ -247,7 +241,7 @@ ccextractor_CFLAGS = -std=gnu99 -Wno-write-strings -Wno-pointer-sign -D_FILE_OFF
247241
ccextractor_LDFLAGS = $(shell pkg-config --libs gpac)
248242
GPAC_CPPFLAGS = $(shell pkg-config --cflags gpac)
249243

250-
ccextractor_CPPFLAGS =-I../src/lib_ccx/ -I../src/thirdparty/libpng/ -I../src/thirdparty/zlib/ -I../src/lib_ccx/zvbi/ -I../src/thirdparty/lib_hash/ -I../src/thirdparty/protobuf-c/ -I../src/thirdparty -I../src/ -I../src/thirdparty/freetype/include/
244+
ccextractor_CPPFLAGS =-I../src/lib_ccx/ -I../src/thirdparty/libpng/ -I../src/thirdparty/zlib/ -I../src/lib_ccx/zvbi/ -I../src/thirdparty/lib_hash/ -I../src/thirdparty -I../src/ -I../src/thirdparty/freetype/include/
251245
ccextractor_CPPFLAGS += $(GPAC_CPPFLAGS)
252246
ccextractor_CPPFLAGS += $(FFMPEG_CPPFLAGS)
253247

mac/build.command

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,11 @@
22
cd `dirname $0`
33
BLD_FLAGS="-std=gnu99 -Wno-write-strings -Wno-pointer-sign -D_FILE_OFFSET_BITS=64 -DVERSION_FILE_PRESENT -Dfopen64=fopen -Dopen64=open -Dlseek64=lseek -DFT2_BUILD_LIBRARY -DGPAC_DISABLE_VTT -DGPAC_DISABLE_OD_DUMP -DGPAC_DISABLE_REMOTERY -DNO_GZIP -DDISABLE_RUST"
44
[[ $1 = "OCR" ]] && BLD_FLAGS="$BLD_FLAGS -DENABLE_OCR"
5-
BLD_INCLUDE="-I../src/ -I../src/lib_ccx -I../src/lib_hash -I../src/thirdparty/libpng -I../src/thirdparty -I../src/thirdparty/protobuf-c -I../src/thirdparty/zlib -I../src/thirdparty/freetype/include `pkg-config --cflags --silence-errors gpac`"
5+
BLD_INCLUDE="-I../src/ -I../src/lib_ccx -I../src/lib_hash -I../src/thirdparty/libpng -I../src/thirdparty -I../src/thirdparty/zlib -I../src/thirdparty/freetype/include `pkg-config --cflags --silence-errors gpac`"
66
[[ $1 = "OCR" ]] && BLD_INCLUDE="$BLD_INCLUDE `pkg-config --cflags --silence-errors tesseract`"
77
SRC_CCX="$(find ../src/lib_ccx -name '*.c')"
88
SRC_LIB_HASH="$(find ../src/thirdparty/lib_hash -name '*.c')"
99
SRC_LIBPNG="$(find ../src/thirdparty/libpng -name '*.c')"
10-
SRC_PROTOBUF="$(find ../src/thirdparty/protobuf-c -name '*.c')"
1110
SRC_UTF8="../src/thirdparty/utf8proc/utf8proc.c"
1211
SRC_ZLIB="$(find ../src/thirdparty/zlib -name '*.c')"
1312
SRC_FREETYPE="../src/thirdparty/freetype/autofit/autofit.c \
@@ -51,7 +50,7 @@ SRC_FREETYPE="../src/thirdparty/freetype/autofit/autofit.c \
5150
../src/thirdparty/freetype/type1/type1.c \
5251
../src/thirdparty/freetype/type42/type42.c \
5352
../src/thirdparty/freetype/winfonts/winfnt.c"
54-
BLD_SOURCES="../src/ccextractor.c $SRC_API $SRC_CCX $SRC_LIB_HASH $SRC_LIBPNG $SRC_PROTOBUF $SRC_UTF8 $SRC_ZLIB $SRC_ZVBI $SRC_FREETYPE"
53+
BLD_SOURCES="../src/ccextractor.c $SRC_API $SRC_CCX $SRC_LIB_HASH $SRC_LIBPNG $SRC_UTF8 $SRC_ZLIB $SRC_ZVBI $SRC_FREETYPE"
5554
BLD_LINKER="-lm -liconv -lpthread -ldl `pkg-config --libs --silence-errors tesseract` `pkg-config --libs --silence-errors gpac`"
5655
[[ $1 = "OCR" ]] && BLD_LINKER="$BLD_LINKER `pkg-config --libs --silence-errors tesseract` `pkg-config --libs --silence-errors lept`"
5756

src/BUILD

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,10 @@ cc_binary(
44
"ccextractor.h"],
55
deps = [
66
"//src/lib_ccx:lib_ccx",
7-
"//src/thirdparty/protobuf-c:protobuf-c",
87
"//src/thirdparty/zlib:zlib",
98
"//src/thirdparty/freetype:freetype"
109
],
11-
copts = [ "-Isrc/thirdparty/protobuf-c", "-Isrc/thirdparty/libpng", "-Isrc" ]
10+
copts = [ "-Isrc/thirdparty/libpng", "-Isrc" ]
1211
)
1312

1413
exports_files (["ccextractor.h"], ["//src/lib_ccx:__pkg__"])

src/CMakeLists.txt

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ include (CTest)
55

66
option (WITH_FFMPEG "Build using FFmpeg demuxer and decoder" OFF)
77
option (WITH_OCR "Build with OCR (Optical Character Recognition) feature" OFF)
8-
option (WITH_SHARING "Build with sharing and translation support" OFF)
98
option (WITH_HARDSUBX "Build with support for burned-in subtitles" OFF)
109
option (WITHOUT_RUST "Build without Rust library" OFF)
1110

@@ -52,7 +51,6 @@ include_directories(${PROJECT_SOURCE_DIR})
5251
include_directories(${PROJECT_SOURCE_DIR}/lib_ccx)
5352
include_directories(${PROJECT_SOURCE_DIR}/lib_ccx/zvbi)
5453
include_directories(${PROJECT_SOURCE_DIR}/thirdparty)
55-
include_directories(${PROJECT_SOURCE_DIR}/thirdparty/protobuf-c)
5654
include_directories(${PROJECT_SOURCE_DIR}/thirdparty/lib_hash)
5755
include_directories(${PROJECT_SOURCE_DIR}/thirdparty/libpng)
5856

@@ -72,7 +70,6 @@ include_directories(${PROJECT_SOURCE_DIR}/thirdparty/zlib)
7270
include_directories(${PROJECT_SOURCE_DIR}/thirdparty/freetype/include)
7371
aux_source_directory(${PROJECT_SOURCE_DIR}/thirdparty/lib_hash/ SOURCEFILE)
7472
aux_source_directory(${PROJECT_SOURCE_DIR}/thirdparty/libpng/ SOURCEFILE)
75-
aux_source_directory(${PROJECT_SOURCE_DIR}/thirdparty/protobuf-c/ SOURCEFILE)
7673
aux_source_directory(${PROJECT_SOURCE_DIR}/thirdparty/zlib/ SOURCEFILE)
7774
aux_source_directory(${PROJECT_SOURCE_DIR}/lib_ccx/zvbi/ SOURCEFILE)
7875

@@ -206,21 +203,6 @@ if (PKG_CONFIG_FOUND AND WITH_OCR)
206203
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DENABLE_OCR")
207204
endif (PKG_CONFIG_FOUND AND WITH_OCR)
208205

209-
########################################################
210-
# Build with CC sharing and translation support
211-
########################################################
212-
213-
if (PKG_CONFIG_FOUND AND WITH_SHARING)
214-
215-
pkg_check_modules (NANOMSG REQUIRED libnanomsg)
216-
set (EXTRA_LIBS ${EXTRA_LIBS} ${NANOMSG_STATIC_LIBRARIES})
217-
218-
include_directories ("${PROJECT_SOURCE_DIR}/thirdparty/protobuf-c/")
219-
aux_source_directory ("${PROJECT_SOURCE_DIR}/thirdparty/protobuf-c/" SOURCEFILE)
220-
221-
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DENABLE_SHARING")
222-
endif (PKG_CONFIG_FOUND AND WITH_SHARING)
223-
224206
########################################################
225207
# Build for hardsubx using avformat, avutil, avcodec and
226208
# swscale

0 commit comments

Comments
 (0)