Files
ccextractor/mac/Makefile.am

320 lines
12 KiB
Makefile
Raw Permalink Normal View History

AUTOMAKE_OPTIONS = foreign
ACLOCAL_AMFLAGS = -I m4/
bin_PROGRAMS = ccextractor
ccextractor_SOURCES = \
../src/ccextractor.c \
../src/ccextractor.h \
../src/thirdparty/libpng/pngstruct.h \
../src/thirdparty/libpng/pngpriv.h \
../src/thirdparty/libpng/pnginfo.h \
../src/thirdparty/libpng/pnglibconf.h \
../src/thirdparty/libpng/pngconf.h \
../src/thirdparty/libpng/pngdebug.h \
../src/thirdparty/libpng/png.h \
../src/thirdparty/libpng/png.c \
../src/thirdparty/libpng/pngerror.c \
../src/thirdparty/libpng/pngget.c \
../src/thirdparty/libpng/pngmem.c \
../src/thirdparty/libpng/pngpread.c \
../src/thirdparty/libpng/pngread.c \
../src/thirdparty/libpng/pngrio.c \
../src/thirdparty/libpng/pngrtran.c \
../src/thirdparty/libpng/pngrutil.c \
../src/thirdparty/libpng/pngset.c \
../src/thirdparty/libpng/pngtrans.c \
../src/thirdparty/libpng/pngwio.c \
../src/thirdparty/libpng/pngwrite.c \
../src/thirdparty/libpng/pngwtran.c \
../src/thirdparty/libpng/pngwutil.c \
../src/lib_ccx/ccx_common_common.h \
../src/lib_ccx/ccx_common_option.h \
../src/lib_ccx/utility.h \
../src/lib_ccx/activity.h \
../src/lib_ccx/asf_constants.h \
../src/lib_ccx/avc_functions.h \
../src/lib_ccx/cc_bitstream.h \
../src/lib_ccx/ccx_common_option.c \
../src/lib_ccx/ccx_common_common.c \
../src/lib_ccx/utility.c \
../src/lib_ccx/activity.c \
../src/lib_ccx/asf_functions.c \
../src/lib_ccx/avc_functions.c \
../src/lib_ccx/cc_bitstream.c \
../src/lib_ccx/ccx_common_char_encoding.c \
../src/lib_ccx/ccx_common_char_encoding.h \
../src/lib_ccx/ccx_common_constants.c \
../src/lib_ccx/ccx_common_constants.h \
../src/lib_ccx/ccx_common_platform.h \
../src/lib_ccx/ccx_common_structs.h \
../src/lib_ccx/ccx_common_timing.c \
../src/lib_ccx/ccx_common_timing.h \
../src/lib_ccx/ccx_decoders_608.c \
../src/lib_ccx/ccx_decoders_608.h \
../src/lib_ccx/ccx_decoders_708.c \
../src/lib_ccx/ccx_decoders_708_encoding.c \
../src/lib_ccx/ccx_decoders_708_encoding.h \
../src/lib_ccx/ccx_decoders_708.h \
../src/lib_ccx/ccx_decoders_708_output.c \
../src/lib_ccx/ccx_decoders_708_output.h \
../src/lib_ccx/ccx_decoders_common.c \
../src/lib_ccx/ccx_decoders_common.h \
../src/lib_ccx/ccx_decoders_isdb.c \
../src/lib_ccx/ccx_decoders_isdb.h \
../src/lib_ccx/ccx_decoders_structs.h \
../src/lib_ccx/ccx_decoders_vbi.c \
../src/lib_ccx/ccx_decoders_vbi.h \
../src/lib_ccx/ccx_decoders_xds.c \
../src/lib_ccx/ccx_decoders_xds.h \
../src/lib_ccx/ccx_demuxer.c \
../src/lib_ccx/ccx_demuxer.h \
2017-12-07 13:31:53 -08:00
../src/lib_ccx/ccx_demuxer_mxf.c \
../src/lib_ccx/ccx_demuxer_mxf.h \
../src/lib_ccx/ccx_dtvcc.c \
../src/lib_ccx/ccx_dtvcc.h \
../src/lib_ccx/ccx_encoders_common.c \
../src/lib_ccx/ccx_encoders_common.h \
../src/lib_ccx/ccx_encoders_curl.c \
../src/lib_ccx/ccx_encoders_g608.c \
../src/lib_ccx/ccx_encoders_helpers.c \
../src/lib_ccx/ccx_encoders_helpers.h \
../src/lib_ccx/ccx_encoders_mcc.c \
../src/lib_ccx/ccx_encoders_mcc.h \
../src/lib_ccx/ccx_encoders_sami.c \
../src/lib_ccx/ccx_encoders_scc.c \
../src/lib_ccx/ccx_encoders_smptett.c \
../src/lib_ccx/ccx_encoders_splitbysentence.c \
../src/lib_ccx/ccx_encoders_spupng.c \
../src/lib_ccx/ccx_encoders_srt.c \
../src/lib_ccx/ccx_encoders_ssa.c \
../src/lib_ccx/ccx_encoders_structs.h \
../src/lib_ccx/ccx_encoders_transcript.c \
../src/lib_ccx/ccx_encoders_webvtt.c \
../src/lib_ccx/ccx_encoders_xds.c \
../src/lib_ccx/ccx_encoders_xds.h \
../src/lib_ccx/ccx_gxf.c \
../src/lib_ccx/ccx_gxf.h \
../src/lib_ccx/ccx_mp4.h \
../src/lib_ccx/compile_info.h \
../src/lib_ccx/compile_info_real.h \
../src/lib_ccx/configuration.c \
../src/lib_ccx/configuration.h \
../src/lib_ccx/disable_warnings.h \
../src/lib_ccx/dvb_subtitle_decoder.c \
../src/lib_ccx/dvb_subtitle_decoder.h \
../src/lib_ccx/dvd_subtitle_decoder.c \
../src/lib_ccx/dvd_subtitle_decoder.h \
../src/lib_ccx/es_functions.c \
../src/lib_ccx/es_userdata.c \
../src/lib_ccx/ffmpeg_intgr.c \
../src/lib_ccx/ffmpeg_intgr.h \
../src/lib_ccx/file_buffer.h \
../src/lib_ccx/file_functions.c \
../src/lib_ccx/general_loop.c \
../src/lib_ccx/hamming.h \
../src/lib_ccx/hardsubx.c \
../src/lib_ccx/hardsubx_classifier.c \
../src/lib_ccx/hardsubx_decoder.c \
../src/lib_ccx/hardsubx.h \
../src/lib_ccx/hardsubx_imgops.c \
../src/lib_ccx/hardsubx_utility.c \
../src/lib_ccx/lib_ccx.c \
../src/lib_ccx/lib_ccx.h \
../src/lib_ccx/list.h \
../src/lib_ccx/matroska.c \
../src/lib_ccx/matroska.h \
../src/lib_ccx/vobsub_decoder.c \
../src/lib_ccx/vobsub_decoder.h \
../src/lib_ccx/mp4.c \
../src/lib_ccx/myth.c \
../src/lib_ccx/networking.c \
../src/lib_ccx/networking.h \
../src/lib_ccx/ocr.c \
../src/lib_ccx/ocr.h \
../src/lib_ccx/output.c \
../src/lib_ccx/params.c \
../src/lib_ccx/params_dump.c \
../src/lib_ccx/sequencing.c \
../src/lib_ccx/stdintmsc.h \
../src/lib_ccx/stream_functions.c \
../src/lib_ccx/teletext.h \
../src/lib_ccx/telxcc.c \
../src/lib_ccx/ts_functions.c \
../src/lib_ccx/ts_functions.h \
../src/lib_ccx/ts_info.c \
../src/lib_ccx/ts_tables.c \
../src/lib_ccx/ts_tables_epg.c \
../src/lib_ccx/wtv_constants.h \
../src/lib_ccx/wtv_functions.c \
../src/thirdparty/zlib/adler32.c \
../src/thirdparty/zlib/compress.c \
../src/thirdparty/zlib/crc32.c \
../src/thirdparty/zlib/crc32.h \
../src/thirdparty/zlib/deflate.c \
../src/thirdparty/zlib/deflate.h \
../src/thirdparty/zlib/gzclose.c \
../src/thirdparty/zlib/gzguts.h \
../src/thirdparty/zlib/gzlib.c \
../src/thirdparty/zlib/gzread.c \
../src/thirdparty/zlib/gzwrite.c \
../src/thirdparty/zlib/infback.c \
../src/thirdparty/zlib/inffast.c \
../src/thirdparty/zlib/inffast.h \
../src/thirdparty/zlib/inffixed.h \
../src/thirdparty/zlib/inflate.c \
../src/thirdparty/zlib/inflate.h \
../src/thirdparty/zlib/inftrees.c \
../src/thirdparty/zlib/inftrees.h \
../src/thirdparty/zlib/trees.c \
../src/thirdparty/zlib/trees.h \
../src/thirdparty/zlib/uncompr.c \
../src/thirdparty/zlib/zconf.h \
../src/thirdparty/zlib/zlib.h \
../src/thirdparty/zlib/zutil.c \
../src/thirdparty/zlib/zutil.h \
../src/thirdparty/utf8proc/utf8proc.c \
../src/thirdparty/utf8proc/utf8proc.h \
../src/thirdparty/lib_hash/sha2.c \
../src/thirdparty/lib_hash/sha2.h \
../src/lib_ccx/zvbi/bcd.h \
../src/lib_ccx/zvbi/bit_slicer.c \
../src/lib_ccx/zvbi/bit_slicer.h \
../src/lib_ccx/zvbi/decoder.c \
../src/lib_ccx/zvbi/macros.h \
../src/lib_ccx/zvbi/misc.h \
../src/lib_ccx/zvbi/raw_decoder.c \
../src/lib_ccx/zvbi/raw_decoder.h \
../src/lib_ccx/zvbi/sampling_par.c \
../src/lib_ccx/zvbi/sampling_par.h \
../src/lib_ccx/zvbi/sliced.h \
../src/lib_ccx/zvbi/zvbi_decoder.h \
../src/freetype/* \
../src/thirdparty/freetype/autofit/autofit.c \
../src/thirdparty/freetype/base/ftbase.c \
../src/thirdparty/freetype/base/ftbbox.c \
../src/thirdparty/freetype/base/ftbdf.c \
../src/thirdparty/freetype/base/ftbitmap.c \
../src/thirdparty/freetype/base/ftcid.c \
../src/thirdparty/freetype/base/ftfntfmt.c \
../src/thirdparty/freetype/base/ftfstype.c \
../src/thirdparty/freetype/base/ftgasp.c \
../src/thirdparty/freetype/base/ftglyph.c \
../src/thirdparty/freetype/base/ftgxval.c \
../src/thirdparty/freetype/base/ftinit.c \
../src/thirdparty/freetype/base/ftlcdfil.c \
../src/thirdparty/freetype/base/ftmm.c \
../src/thirdparty/freetype/base/ftotval.c \
../src/thirdparty/freetype/base/ftpatent.c \
../src/thirdparty/freetype/base/ftpfr.c \
../src/thirdparty/freetype/base/ftstroke.c \
../src/thirdparty/freetype/base/ftsynth.c \
../src/thirdparty/freetype/base/ftsystem.c \
../src/thirdparty/freetype/base/fttype1.c \
../src/thirdparty/freetype/base/ftwinfnt.c \
../src/thirdparty/freetype/bdf/bdf.c \
../src/thirdparty/freetype/bzip2/ftbzip2.c \
../src/thirdparty/freetype/cache/ftcache.c \
../src/thirdparty/freetype/cff/cff.c \
../src/thirdparty/freetype/cid/type1cid.c \
../src/thirdparty/freetype/gzip/ftgzip.c \
../src/thirdparty/freetype/include/ft2build.h \
../src/thirdparty/freetype/lzw/ftlzw.c \
../src/thirdparty/freetype/pcf/pcf.c \
../src/thirdparty/freetype/pfr/pfr.c \
../src/thirdparty/freetype/psaux/psaux.c \
../src/thirdparty/freetype/pshinter/pshinter.c \
../src/thirdparty/freetype/psnames/psnames.c \
../src/thirdparty/freetype/raster/raster.c \
../src/thirdparty/freetype/sfnt/sfnt.c \
../src/thirdparty/freetype/smooth/smooth.c \
../src/thirdparty/freetype/truetype/truetype.c \
../src/thirdparty/freetype/type1/type1.c \
../src/thirdparty/freetype/type42/type42.c \
../src/thirdparty/freetype/winfonts/winfnt.c
if SYS_IS_APPLE_SILICON
ccextractor_SOURCES += ../src/thirdparty/libpng/arm/arm_init.c \
../src/thirdparty/libpng/arm/filter_neon_intrinsics.c \
../src/thirdparty/libpng/arm/palette_neon_intrinsics.c
endif
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
ccextractor_LDFLAGS = $(shell pkg-config --libs gpac)
GPAC_CPPFLAGS = $(shell pkg-config --cflags gpac)
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/
ccextractor_CPPFLAGS += $(GPAC_CPPFLAGS)
[rust] add parser (#1619) * feat: unpack gpac * fix: linux ci * fix: mac build * fix: remove unused [no ci] * fix: ignore config.h [no ci] * temp commit, will drop this soon * fix: install gpac * fix: gpac * fix: formatting * fix: preproccessor directive * fix: comment display version for now * fix: display dlls code * fix: bundle vcruntime in hardsubx windows * fix: again * fix: erros in ci * fix: ci * fix: add vcruntime in additional dependencies * fix: try to copy vcruntime after build * fix: space in runtime library * fix: remove for now [no ci] * fix: things in vcxproj * fix: ci for leptonica sys * fix: docs * fix: copy dlls on post build event * fix: copy vcruntime after build * feat: add arguments through clap * fix: type of some arguments * fix: "-" and "--" in comments * fix: format files * fix: add argument parsing till mkvlang * fix: one todo item * chore: lint fixes * fix: nocodec value * fix: for nocodec * fix: add cfg feature for hardsubx * feat: complete till startcreditstext * fix: add more notes, args: option affect processed * feat: port all till network stuff * fix: complete almost all argument parsing * fix: error free code * fix: complete params port * fix: hardsubx erros * feat: clean up main function * fix: pr reviews * fix: make input,output function better * fix: variant not used warning * fix: warnings * fix: all clippy warnings * feat: add tests * feat: add tests * chore: lint fixes * fix: move unit tests to correct folder * fix: remove unncessary files * fix: make function for parse_args * fix: review changes * fix: Impl CcxOptions whenever I could * fix: try to convert rust to c * chore: push c code * fix: add more rust to c conversions * fix: use set methods for bitfield * fix: errors * fix: arguments parsing * fix: all issues * fix: many errors * chore: lint fix * fix: err * fix: unsafe function error * fix: unsafe warning * fix: safety lint * chore: add docs * fix: windows build * fix: function * fix: dependencies * fix: set_binary_mode * chore: lint fix * fix: set_binary_mode for windows * fix: error * fix: undefined reference error * chore: remove comment * fix: output field * chore: fix lint * fix: ru1, ru2, ru3 * fix: undef before * fix: parameter and update deps * chore: update vcpkg * feat: add release-with-debug profile * fix; uncomment code * fix: update visual studio to 2022 * chore: update docs * fix: use default vcpkg * fix: caching logic on release ci * fix: vcpkg caching * fix: add setup vcpkg * chore: remove unneccesary formatting * fix: Always write 2 bytes for UTF-16BE * fix: formatting * feat: add rest of the notes to bring continuity * fix: remove extra line * fix: add hardsubx note * fix: source code format error * chore: lint fixes acc to rustfmt * feat: add unit test ci * fix: conversion of strings, add file queue handling * fix: decoder cfg * fix: update dependencies * chore: lint fix * chore: add safety doc * fix: default value for CcxOptions * fix(rust): default value for teletext * fix: leptonica version for windows * fix: format errors * fix: workflow * Revert "fix: leptonica version for windows" This reverts commit 461ef55e7b89b6c57bea8c9035bf7bb18955c052. * fix: pin ffmpeg to 6 for mac * fix(parser): default values and unwrap's * fix(parser): hardsubx fixes * chore(parse): lint fixes * fix(windows): switch back to sdk 2019 * fix(workflow): windows workflow revert * fix(windows): revert to old files which were working before * fix(workflow): pin vcpkg packages * chore(rust): downgrade leptonica * fix(windows): move vcpkg.json to correct place * fix(windows): improve vcxproj * fix(windows): workflow * fix(windows): workflow * fix(windows): workflow clone from vcpkg everytime * fix(workflow): error * fix(workflow): don't skip building vcpkg * fix: remove depth from vcpkg * temporary commit * fix(windows): pin gpac and use local vcpkg manifest properly * fix(windows): install vcpkg dependencies manually * fix(windows): update dll names * fix(windows); dependencies copy * fix(windows): don't continue on error for release * fix(macos): build ffmpeg for mac workflow * fix: move ffmpeg to current workspace * fix: re-add profile for windows * fix: pkg config for mac * fix(mac): use ffmpeg@6 from brew * fix(macos): there is no ffmpeg_prebuilt * fix(macos): specify ffmpeg pkg config * fix(macos): globally define pkg config * fix(macos): add ffmpeg include and libs dir * fix(macos): include ffmpeg headers in makefile * fix: include ffmpeg libraries and include directories * fix: try to manually specify ffmpeg header in rust * fix: also include leptonica headres * fix: leptonica name * fix: test * fix: string null when output_filename is empty * fix: error * fix: remove cflgas * fix(mac): disable cmake ocr hardsubx * chore: update gitignore * fix: null if string is empty * fix: allow --in * chore: bump version to 1.0 in rust * chore: add space to trigger sp * fix: don't panic with rust * fix: add double dashes to indicate parameters * chore: update CHANGES.txt * fix: test * fix(workflow): update workflow name * fix(rust): linux output_filename in sampleplatform * fix(rust): parser default values * fix(rust): exit with MalformedParameter instead of panic * fix(decoder): revert always write 2 bytes * chore(rust): format * chore: update lock file * fix(test): test lib_ccxr and rename to test * fix(mac): remove failing cmake_ocr test * fix: ci errors * fix: feature related changes * fix: trim down default features * fix: don't check clippy for all features
2024-08-10 16:25:21 +05:30
ccextractor_CPPFLAGS += $(FFMPEG_CPPFLAGS)
[IMPROVEMENT] Update GPAC to version 1.0.1 (#1328) * Add update_gpac.py Add a Python script that partially automates updating GPAC to a newer version. * Update GPAC to version 1.0.1 Update the vendored version of GPAC to version 1.0.1. * Add necessary GPAC header files Add some GPAC header files that GPAC needs to compile. * Define _GF_CONFIG_H_ to fix Linux build failing gpac/configuration.h has a series of default configuration options for various platforms, but it doesn't have a case for Linux and it results in a compilation error if it encounters an unknown platform. The settings in configuration.h don't appear to try to set any defaults for Linux anyway, so we can disable all use of those configuration.h settings by defining _GF_CONFIG_H_. * Add some more necessary GPAC header files Add a few more header files necessary to get GPAC to compile. * Fix renamed and removed media types Some mp4 media types ("clcp", "c608") were renamed by GPAC. "c708" appears to have been removed, so we can just add the definition of that to the top of mp4.c. * Remove Remotery from updated GPAC Remotery appears to be some code for profiling GPAC which we aren't using, and including Remotery.c and Remotery.h ends up pulling in a lot of files, so it's easier to just remove the include of Remotery.h and the single use of it in os_divers.c * Remove unused box definitions Remove box definitions that we don't use from box_funcs.c in order to avoid adding too many files from GPAC. * Replace alloc function declarations with defines Replace the GPAC wrappers around the malloc-style functions (gf_malloc, gf_free, etc.) with defines that use the standard C versions of these functions so that we can avoid including GPAC's alloc.c * Remove WebVTT handling code in gf_isom_dump_srt_track Remove the code that handles WebVTT in gf_isom_dump_srt_track to avoid needing to pull in a lot of other files from GPAC. gf_isom_dump_srt_track doesn't appear to be used by ccextractor directly or indirectly (it's only called in gf_isom_text_dump which doesn't appear to be called anywhere else) so it should be fine removing it. * Disable use of Remotery and gzip on Linux Use GPAC_DISABLE_REMOTERY and NO_GZIP to disable Remotery because we aren't interested in profiling (see 5c0c9cf71e17b95dc4fd8015d81040fd03858ce9 for more info) and gzip compression through gzio.c respectively. * Fix compilation errors in GPAC on linux GPAC on linux after the update requires some threading functions and dynamic loading functions in pthread and dl respectively. * Add necessary files for GPAC to compile Add several C and header files that GPAC needs to compile * Disable Remotery and Gzip in all build systems Disable Remotery and gzip (using the same method as f49dc371b5f8c74de7b35615042c9767823a6c05) for: - The linux build script (linux/build) - The mac build script (mac/build.command) - The mac makefile - cmake - bazel - Visual Studio * Add extra GPAC files to several build systems Add the names of several GPAC files that were added in the update to the linux and mac Makefiles and to the Windows Visual Studio project. Adding these filenames isn't necessary for CMake, Bazel, or the linux or mac build scripts because all of them compile all C files recursively in the src/thirdparty/gpacmp4 directory instead of having an explicit list of files to compile. * Change NO_GZIP to GPAC_DISABLE_ZLIB in VS project Instead of defining NO_GZIP to disable gzip support, define GPAC_DISABLE_ZLIB, which does the same thing but also prevents the compiler from trying to zlib. * Avoid using GPAC's configuration.h completely GPAC's configuration.h has a few problems with the defaults that it sets: - It defines GPAC_MEMORY_TRACKING on Windows, which switches to an alternate implementation of malloc, meaning that we would have to pull in alloc.c - It causes compilation errors on Linux (see 9164c0897951f7795e85bc95b1a1eaaf95a16482) This disables using configuration.h by: - Defining GPAC_HAVE_CONFIG_H to make GPAC use a separate config.h file instead of the default configuration.h file - Making an essentially empty config.h file to make attempts to include it not fail This commit also removes configuration.h from the repo to make sure we don't accidentally include it, and removes the _GF_CONFIG_H_ hack from the previously mentioned commit because we don't need it anymore (it's sole purpose was avoiding using configuration.h). * Link pthread and dl on Mac and Linux Add -lpthread and -ldl to link pthread and dl respectively on Mac and Linux. Needed because the update to GPAC 1.0.1 introduced os_thread.c (which uses pthread) and os_module.c (which uses dlsym and related functions). * Remove unused Remotery.h header file 5c0c9cf71e17b95dc4fd8015d81040fd03858ce9 removed the only use of Remotery.h in the GPAC files that we pulled in, so there's no need to keep it around. * Add GPAC update to changelog * Fix cmake build error Building with CMake currently fails because it can't find functions from dl (dlopen, dlsym, etc.) * Fix bazel build error Bazel currently doesn't find the header files in gpac/modules/ when building gpac, most likely because it isn't searching all directories in gpac/ recursively for header files * Define GPAC_HAVE_CONFIG_H in lib_ccx BUILD file lib_ccx indirectly includes gpac/tools.h, which tries to include gpac/configuration.h, which was removed in b46c4e8a2da7709eb0a6cf23b4ecffa9e98bed67. This just copies the solution from that commit to the bazel BUILD file (defining GPAC_HAVE_CONFIG_H so GPAC uses gpac/config.h instead). * Link to dl and pthread in bazel GPAC BUILD file The updated GPAC version requires functions from dl and pthread, which weren't linked to previously when building with bazel.
2021-04-30 04:59:13 -07:00
ccextractor_LDADD=-lm -lpthread -ldl
if SYS_IS_LINUX
ccextractor_CFLAGS += -O3 -s
endif
if SYS_IS_MAC
ccextractor_CFLAGS += -Dfopen64=fopen -Dopen64=open -Dlseek64=lseek
ccextractor_LDADD += -liconv -lz
endif
if SYS_IS_64_BIT
ccextractor_CFLAGS += -DGPAC_64_BITS
endif
Port hardsubx utility (#1443) * set up bindings conversion of hardsubx utility functions (and structs) and set up the module * add low level ffmpeg rust binding * Methods ported: - convert_pts_to_ns - convert_pts_to_ms - convert_pts_to_s A pure rust method was added called _edit_distance_rec that implements levenstein distance calculation using recursion and dynamic programming The port of edit_distance_rec is simply a wrapper that calls above function. This redundancy won't be nevessary as more downstream modules are ported to Rust * put C code of hardsubx_utility under define rust flag * run formatter * make compilation of hardsubx rust modules conditional on the HARDSUBX and the OCR flags. Make ffmpeg a conditional dependency based on those flags * remove namespaced dependency in cargo because that is a nightly feature * add conditioal compilatio of ffmpeg related bindigs in build.rs * make clang argument of -DENABLE_HARDSUBX conditional on cargo feature of hardsubx_ocr * enable specific relevant features for ffmpeg-sys-next * enable hardsubx_ocr feature in windows build * add build feature in ffmpeg-sys-next * ffmpeg build feature is conditional on platform * Revert "ffmpeg build feature is conditional on platform" This reverts commit e456fee942f28d99efeb3b9d684a1fc06a530e1a. This is because conditional features do not work in cargo toml * install yasm in the linux build github action for ocr and hardsubx enabled cmake * turn globals to locals to reduce code * remove redundant attributes * style changes * make import of ffmpeg-sys-next conditional on hardsubx_ocr flag * add --all-features flag in clippy for github workflow * run formatter * fix clippy command * install yasm as part of rust format build check * install libtesseract-dev etc. for clippy build test * readability change * declare the function edit_distance as unsafe * remove commented code * formatting changes * combine declaration and assignment * add build command for building hardsubx rust context to issue: #1445 * make hardsubx rust work with autoconf build. For issue: #1445 * update autoconf for mac for issue #1445
2022-07-13 14:36:30 +05:30
HARDSUBX_FEATURE_RUST=
if HARDSUBX_IS_ENABLED
ccextractor_CFLAGS += -DENABLE_HARDSUBX
ccextractor_CPPFLAGS+= ${libavcodec_CFLAGS}
ccextractor_CPPFLAGS+= ${libavformat_CFLAGS}
[rust] add parser (#1619) * feat: unpack gpac * fix: linux ci * fix: mac build * fix: remove unused [no ci] * fix: ignore config.h [no ci] * temp commit, will drop this soon * fix: install gpac * fix: gpac * fix: formatting * fix: preproccessor directive * fix: comment display version for now * fix: display dlls code * fix: bundle vcruntime in hardsubx windows * fix: again * fix: erros in ci * fix: ci * fix: add vcruntime in additional dependencies * fix: try to copy vcruntime after build * fix: space in runtime library * fix: remove for now [no ci] * fix: things in vcxproj * fix: ci for leptonica sys * fix: docs * fix: copy dlls on post build event * fix: copy vcruntime after build * feat: add arguments through clap * fix: type of some arguments * fix: "-" and "--" in comments * fix: format files * fix: add argument parsing till mkvlang * fix: one todo item * chore: lint fixes * fix: nocodec value * fix: for nocodec * fix: add cfg feature for hardsubx * feat: complete till startcreditstext * fix: add more notes, args: option affect processed * feat: port all till network stuff * fix: complete almost all argument parsing * fix: error free code * fix: complete params port * fix: hardsubx erros * feat: clean up main function * fix: pr reviews * fix: make input,output function better * fix: variant not used warning * fix: warnings * fix: all clippy warnings * feat: add tests * feat: add tests * chore: lint fixes * fix: move unit tests to correct folder * fix: remove unncessary files * fix: make function for parse_args * fix: review changes * fix: Impl CcxOptions whenever I could * fix: try to convert rust to c * chore: push c code * fix: add more rust to c conversions * fix: use set methods for bitfield * fix: errors * fix: arguments parsing * fix: all issues * fix: many errors * chore: lint fix * fix: err * fix: unsafe function error * fix: unsafe warning * fix: safety lint * chore: add docs * fix: windows build * fix: function * fix: dependencies * fix: set_binary_mode * chore: lint fix * fix: set_binary_mode for windows * fix: error * fix: undefined reference error * chore: remove comment * fix: output field * chore: fix lint * fix: ru1, ru2, ru3 * fix: undef before * fix: parameter and update deps * chore: update vcpkg * feat: add release-with-debug profile * fix; uncomment code * fix: update visual studio to 2022 * chore: update docs * fix: use default vcpkg * fix: caching logic on release ci * fix: vcpkg caching * fix: add setup vcpkg * chore: remove unneccesary formatting * fix: Always write 2 bytes for UTF-16BE * fix: formatting * feat: add rest of the notes to bring continuity * fix: remove extra line * fix: add hardsubx note * fix: source code format error * chore: lint fixes acc to rustfmt * feat: add unit test ci * fix: conversion of strings, add file queue handling * fix: decoder cfg * fix: update dependencies * chore: lint fix * chore: add safety doc * fix: default value for CcxOptions * fix(rust): default value for teletext * fix: leptonica version for windows * fix: format errors * fix: workflow * Revert "fix: leptonica version for windows" This reverts commit 461ef55e7b89b6c57bea8c9035bf7bb18955c052. * fix: pin ffmpeg to 6 for mac * fix(parser): default values and unwrap's * fix(parser): hardsubx fixes * chore(parse): lint fixes * fix(windows): switch back to sdk 2019 * fix(workflow): windows workflow revert * fix(windows): revert to old files which were working before * fix(workflow): pin vcpkg packages * chore(rust): downgrade leptonica * fix(windows): move vcpkg.json to correct place * fix(windows): improve vcxproj * fix(windows): workflow * fix(windows): workflow * fix(windows): workflow clone from vcpkg everytime * fix(workflow): error * fix(workflow): don't skip building vcpkg * fix: remove depth from vcpkg * temporary commit * fix(windows): pin gpac and use local vcpkg manifest properly * fix(windows): install vcpkg dependencies manually * fix(windows): update dll names * fix(windows); dependencies copy * fix(windows): don't continue on error for release * fix(macos): build ffmpeg for mac workflow * fix: move ffmpeg to current workspace * fix: re-add profile for windows * fix: pkg config for mac * fix(mac): use ffmpeg@6 from brew * fix(macos): there is no ffmpeg_prebuilt * fix(macos): specify ffmpeg pkg config * fix(macos): globally define pkg config * fix(macos): add ffmpeg include and libs dir * fix(macos): include ffmpeg headers in makefile * fix: include ffmpeg libraries and include directories * fix: try to manually specify ffmpeg header in rust * fix: also include leptonica headres * fix: leptonica name * fix: test * fix: string null when output_filename is empty * fix: error * fix: remove cflgas * fix(mac): disable cmake ocr hardsubx * chore: update gitignore * fix: null if string is empty * fix: allow --in * chore: bump version to 1.0 in rust * chore: add space to trigger sp * fix: don't panic with rust * fix: add double dashes to indicate parameters * chore: update CHANGES.txt * fix: test * fix(workflow): update workflow name * fix(rust): linux output_filename in sampleplatform * fix(rust): parser default values * fix(rust): exit with MalformedParameter instead of panic * fix(decoder): revert always write 2 bytes * chore(rust): format * chore: update lock file * fix(test): test lib_ccxr and rename to test * fix(mac): remove failing cmake_ocr test * fix: ci errors * fix: feature related changes * fix: trim down default features * fix: don't check clippy for all features
2024-08-10 16:25:21 +05:30
ccextractor_CPPFLAGS+= ${libavutil_CFLAGS}
ccextractor_CPPFLAGS+= ${libswscale_CFLAGS}
AV_LIB = ${libavcodec_LIBS}
AV_LIB += ${libavformat_LIBS}
AV_LIB += ${libavutil_LIBS}
AV_LIB += ${libswscale_LIBS}
ccextractor_LDADD += $(AV_LIB)
Port hardsubx utility (#1443) * set up bindings conversion of hardsubx utility functions (and structs) and set up the module * add low level ffmpeg rust binding * Methods ported: - convert_pts_to_ns - convert_pts_to_ms - convert_pts_to_s A pure rust method was added called _edit_distance_rec that implements levenstein distance calculation using recursion and dynamic programming The port of edit_distance_rec is simply a wrapper that calls above function. This redundancy won't be nevessary as more downstream modules are ported to Rust * put C code of hardsubx_utility under define rust flag * run formatter * make compilation of hardsubx rust modules conditional on the HARDSUBX and the OCR flags. Make ffmpeg a conditional dependency based on those flags * remove namespaced dependency in cargo because that is a nightly feature * add conditioal compilatio of ffmpeg related bindigs in build.rs * make clang argument of -DENABLE_HARDSUBX conditional on cargo feature of hardsubx_ocr * enable specific relevant features for ffmpeg-sys-next * enable hardsubx_ocr feature in windows build * add build feature in ffmpeg-sys-next * ffmpeg build feature is conditional on platform * Revert "ffmpeg build feature is conditional on platform" This reverts commit e456fee942f28d99efeb3b9d684a1fc06a530e1a. This is because conditional features do not work in cargo toml * install yasm in the linux build github action for ocr and hardsubx enabled cmake * turn globals to locals to reduce code * remove redundant attributes * style changes * make import of ffmpeg-sys-next conditional on hardsubx_ocr flag * add --all-features flag in clippy for github workflow * run formatter * fix clippy command * install yasm as part of rust format build check * install libtesseract-dev etc. for clippy build test * readability change * declare the function edit_distance as unsafe * remove commented code * formatting changes * combine declaration and assignment * add build command for building hardsubx rust context to issue: #1445 * make hardsubx rust work with autoconf build. For issue: #1445 * update autoconf for mac for issue #1445
2022-07-13 14:36:30 +05:30
HARDSUBX_FEATURE_RUST += --features "hardsubx_ocr"
endif
if OCR_IS_ENABLED
ccextractor_CFLAGS += -DENABLE_OCR -DPN3G_NO_CONFIG_H
LEPT_LIB = ${lept_LIBS}
LEPT_CPPFLAG = ${lept_CFLAGS}
if TESSERACT_PRESENT
TESS_LIB = ${tesseract_LIBS}
TESS_CPPFLAG = ${tesseract_CFLAGS}
else
#fix for raspberry pi not having a pkgconfig file for tesseract
if TESSERACT_PRESENT_RPI
TESS_LIB = -ltesseract
TESS_CPPFLAG = -I/usr/include/tesseract
endif
endif
ccextractor_CPPFLAGS += $(TESS_CPPFLAG)
ccextractor_CPPFLAGS += $(LEPT_CPPFLAG)
ccextractor_LDADD += $(TESS_LIB)
ccextractor_LDADD += $(LEPT_LIB)
endif
Port hardsubx utility (#1443) * set up bindings conversion of hardsubx utility functions (and structs) and set up the module * add low level ffmpeg rust binding * Methods ported: - convert_pts_to_ns - convert_pts_to_ms - convert_pts_to_s A pure rust method was added called _edit_distance_rec that implements levenstein distance calculation using recursion and dynamic programming The port of edit_distance_rec is simply a wrapper that calls above function. This redundancy won't be nevessary as more downstream modules are ported to Rust * put C code of hardsubx_utility under define rust flag * run formatter * make compilation of hardsubx rust modules conditional on the HARDSUBX and the OCR flags. Make ffmpeg a conditional dependency based on those flags * remove namespaced dependency in cargo because that is a nightly feature * add conditioal compilatio of ffmpeg related bindigs in build.rs * make clang argument of -DENABLE_HARDSUBX conditional on cargo feature of hardsubx_ocr * enable specific relevant features for ffmpeg-sys-next * enable hardsubx_ocr feature in windows build * add build feature in ffmpeg-sys-next * ffmpeg build feature is conditional on platform * Revert "ffmpeg build feature is conditional on platform" This reverts commit e456fee942f28d99efeb3b9d684a1fc06a530e1a. This is because conditional features do not work in cargo toml * install yasm in the linux build github action for ocr and hardsubx enabled cmake * turn globals to locals to reduce code * remove redundant attributes * style changes * make import of ffmpeg-sys-next conditional on hardsubx_ocr flag * add --all-features flag in clippy for github workflow * run formatter * fix clippy command * install yasm as part of rust format build check * install libtesseract-dev etc. for clippy build test * readability change * declare the function edit_distance as unsafe * remove commented code * formatting changes * combine declaration and assignment * add build command for building hardsubx rust context to issue: #1445 * make hardsubx rust work with autoconf build. For issue: #1445 * update autoconf for mac for issue #1445
2022-07-13 14:36:30 +05:30
ccextractor_LDADD += ./rust/@RUST_TARGET_SUBDIR@/libccx_rust.a
Port hardsubx utility (#1443) * set up bindings conversion of hardsubx utility functions (and structs) and set up the module * add low level ffmpeg rust binding * Methods ported: - convert_pts_to_ns - convert_pts_to_ms - convert_pts_to_s A pure rust method was added called _edit_distance_rec that implements levenstein distance calculation using recursion and dynamic programming The port of edit_distance_rec is simply a wrapper that calls above function. This redundancy won't be nevessary as more downstream modules are ported to Rust * put C code of hardsubx_utility under define rust flag * run formatter * make compilation of hardsubx rust modules conditional on the HARDSUBX and the OCR flags. Make ffmpeg a conditional dependency based on those flags * remove namespaced dependency in cargo because that is a nightly feature * add conditioal compilatio of ffmpeg related bindigs in build.rs * make clang argument of -DENABLE_HARDSUBX conditional on cargo feature of hardsubx_ocr * enable specific relevant features for ffmpeg-sys-next * enable hardsubx_ocr feature in windows build * add build feature in ffmpeg-sys-next * ffmpeg build feature is conditional on platform * Revert "ffmpeg build feature is conditional on platform" This reverts commit e456fee942f28d99efeb3b9d684a1fc06a530e1a. This is because conditional features do not work in cargo toml * install yasm in the linux build github action for ocr and hardsubx enabled cmake * turn globals to locals to reduce code * remove redundant attributes * style changes * make import of ffmpeg-sys-next conditional on hardsubx_ocr flag * add --all-features flag in clippy for github workflow * run formatter * fix clippy command * install yasm as part of rust format build check * install libtesseract-dev etc. for clippy build test * readability change * declare the function edit_distance as unsafe * remove commented code * formatting changes * combine declaration and assignment * add build command for building hardsubx rust context to issue: #1445 * make hardsubx rust work with autoconf build. For issue: #1445 * update autoconf for mac for issue #1445
2022-07-13 14:36:30 +05:30
if DEBUG_RELEASE
CARGO_RELEASE_ARGS=
else
CARGO_RELEASE_ARGS=--release
endif
./rust/@RUST_TARGET_SUBDIR@/libccx_rust.a:
cd ../src/rust && \
CARGO_TARGET_DIR=../../mac/rust $(CARGO) build $(HARDSUBX_FEATURE_RUST) $(CARGO_RELEASE_ARGS);
Port hardsubx utility (#1443) * set up bindings conversion of hardsubx utility functions (and structs) and set up the module * add low level ffmpeg rust binding * Methods ported: - convert_pts_to_ns - convert_pts_to_ms - convert_pts_to_s A pure rust method was added called _edit_distance_rec that implements levenstein distance calculation using recursion and dynamic programming The port of edit_distance_rec is simply a wrapper that calls above function. This redundancy won't be nevessary as more downstream modules are ported to Rust * put C code of hardsubx_utility under define rust flag * run formatter * make compilation of hardsubx rust modules conditional on the HARDSUBX and the OCR flags. Make ffmpeg a conditional dependency based on those flags * remove namespaced dependency in cargo because that is a nightly feature * add conditioal compilatio of ffmpeg related bindigs in build.rs * make clang argument of -DENABLE_HARDSUBX conditional on cargo feature of hardsubx_ocr * enable specific relevant features for ffmpeg-sys-next * enable hardsubx_ocr feature in windows build * add build feature in ffmpeg-sys-next * ffmpeg build feature is conditional on platform * Revert "ffmpeg build feature is conditional on platform" This reverts commit e456fee942f28d99efeb3b9d684a1fc06a530e1a. This is because conditional features do not work in cargo toml * install yasm in the linux build github action for ocr and hardsubx enabled cmake * turn globals to locals to reduce code * remove redundant attributes * style changes * make import of ffmpeg-sys-next conditional on hardsubx_ocr flag * add --all-features flag in clippy for github workflow * run formatter * fix clippy command * install yasm as part of rust format build check * install libtesseract-dev etc. for clippy build test * readability change * declare the function edit_distance as unsafe * remove commented code * formatting changes * combine declaration and assignment * add build command for building hardsubx rust context to issue: #1445 * make hardsubx rust work with autoconf build. For issue: #1445 * update autoconf for mac for issue #1445
2022-07-13 14:36:30 +05:30
EXTRA_DIST = ../src/lib_ccx/ccfont2.xbm ../src/thirdparty/utf8proc/utf8proc_data.c fonts/ icon/
Port hardsubx utility (#1443) * set up bindings conversion of hardsubx utility functions (and structs) and set up the module * add low level ffmpeg rust binding * Methods ported: - convert_pts_to_ns - convert_pts_to_ms - convert_pts_to_s A pure rust method was added called _edit_distance_rec that implements levenstein distance calculation using recursion and dynamic programming The port of edit_distance_rec is simply a wrapper that calls above function. This redundancy won't be nevessary as more downstream modules are ported to Rust * put C code of hardsubx_utility under define rust flag * run formatter * make compilation of hardsubx rust modules conditional on the HARDSUBX and the OCR flags. Make ffmpeg a conditional dependency based on those flags * remove namespaced dependency in cargo because that is a nightly feature * add conditioal compilatio of ffmpeg related bindigs in build.rs * make clang argument of -DENABLE_HARDSUBX conditional on cargo feature of hardsubx_ocr * enable specific relevant features for ffmpeg-sys-next * enable hardsubx_ocr feature in windows build * add build feature in ffmpeg-sys-next * ffmpeg build feature is conditional on platform * Revert "ffmpeg build feature is conditional on platform" This reverts commit e456fee942f28d99efeb3b9d684a1fc06a530e1a. This is because conditional features do not work in cargo toml * install yasm in the linux build github action for ocr and hardsubx enabled cmake * turn globals to locals to reduce code * remove redundant attributes * style changes * make import of ffmpeg-sys-next conditional on hardsubx_ocr flag * add --all-features flag in clippy for github workflow * run formatter * fix clippy command * install yasm as part of rust format build check * install libtesseract-dev etc. for clippy build test * readability change * declare the function edit_distance as unsafe * remove commented code * formatting changes * combine declaration and assignment * add build command for building hardsubx rust context to issue: #1445 * make hardsubx rust work with autoconf build. For issue: #1445 * update autoconf for mac for issue #1445
2022-07-13 14:36:30 +05:30