Homebrew installs leptonica as 'libleptonica.dylib', not 'liblept.dylib'.
Changed AC_CHECK_LIB from [lept] to [leptonica] to match the actual
library name on macOS.
Fixes#1173 - Error in ./configure enabling hardsubx on Mac
Fixes#1306 - Add HARDSUBX compilation docs for macOS
The configure.ac script failed on macOS with "binary operator expected"
because pkg-config output was unquoted. When pkg-config returns multiple
libraries (e.g., "-ltesseract -lcurl"), the unquoted expansion caused
`test ! -z` to receive multiple arguments instead of a single string.
Changes:
- Quote pkg-config output in TESSERACT_PRESENT conditional (mac & linux)
- Add macOS section to docs/HARDSUBX.txt with all build methods
- Add GitHub Actions jobs to test HARDSUBX builds on macOS:
- build_shell_hardsubx: Tests ./build.command -hardsubx
- build_autoconf_hardsubx: Tests ./configure --enable-hardsubx
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The include "../lib_hash/sha2.h" in params.c requires an include path
that makes "../lib_hash" resolve to "thirdparty/lib_hash".
Changed -I../src/lib_hash (which doesn't exist) to
-I../src/thirdparty/lib_hash. With this path, the compiler searches
for "../lib_hash/sha2.h" as:
../src/thirdparty/lib_hash/../lib_hash/sha2.h
= ../src/thirdparty/lib_hash/sha2.h ✓
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add a new `-system-libs` flag to mac/build.command that uses
system-installed libraries via pkg-config instead of bundled ones.
This enables Homebrew formula compatibility while preserving the
default standalone build behavior.
When `-system-libs` is passed:
- Uses pkg-config for: freetype2, gpac, libpng, libprotobuf-c,
libutf8proc, zlib
- Does not compile bundled thirdparty sources
- Links against system libraries
Default behavior (no flag):
- Compiles bundled libraries as before
- No change to existing builds
Also adds a CI job `build_shell_system_libs` to test the new flag.
Refs #1580, #1534🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Update all build configuration files to require Rust 1.87.0+
- Add clippy.toml with MSRV configuration as requested
- Maintain modern Rust features like is_multiple_of()
- Fixes build compatibility issue #1765
* Removal: Removed redundant C code already ported to Rust
* Removal: C formatting
* Removal: More Removal and CI issues in Mac
* Removal: CI issues in Mac
* Removal: Changes due to Rebase
* Removal: Failing CI on mac
* Removal: Failing regression test on dvdraw
* 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 461ef55e7b.
* 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
* 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
* 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 e456fee942.
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
* Fix Mac Build processes
For all:
Add Neon files to libpng for Apple Silicon
Update compilation.md documentation
For autoconf:
Make Linux and Mac Makefile.am and configure.ac identical
Fix wrong location for zvbi/bcd.h in both Mac/Linux
For cmake::
Include GPAC config for Darwin in Mac version
For mac/build.command:
Update for new zvbi location
* Update CHANGES.TXT for Mac Build commit
* 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
5c0c9cf71e 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
f49dc371b5) 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 9164c08979)
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
5c0c9cf71e 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
b46c4e8a2d. 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.
* cea708: Fix missing new line in log message
* subtype: Remove unused CC_708 type
CEA-708 inputs are coerced to CC_608 before hitting encode_sub.
GCC warns:
src/lib_ccx/ccx_encoders_common.c: In function ‘encode_sub’:
src/lib_ccx/ccx_encoders_common.c:1119:2: warning: enumeration value ‘CC_708’ not handled in switch [-Wswitch]
1119 | switch (sub->type)
| ^~~~~~
* build: Disable pointer-sign warning
This warning triggers all over the codebase due to the widespread use of
unsigned char arrays for parsed subtitle strings and them being passed
to string functions that expect signed ones. Since this won't actually
cause issues, silence the warning across the entire codebase.
* splitbysentence: Fix warnings
GCC warns:
src/lib_ccx/ccx_encoders_splitbysentence.c: In function ‘sbs_is_pointer_on_sentence_breaker’:
src/lib_ccx/ccx_encoders_splitbysentence.c:170:7: warning: variable ‘p’ set but not used [-Wunused-but-set-variable]
170 | char p = *(current - 1);
| ^
src/lib_ccx/ccx_encoders_splitbysentence.c: In function ‘sbs_find_insert_point_partial’:
src/lib_ccx/ccx_encoders_splitbysentence.c:231:1: warning: multi-line comment [-Wcomment]
231 | // sprintf(fmtbuf, "SBS: sbs_find_insert_point_partial: compare\n\
| ^
src/lib_ccx/ccx_encoders_splitbysentence.c:263:1: warning: multi-line comment [-Wcomment]
263 | // LOG_DEBUG("SBS: sbs_find_insert_point_partial: LEFT CHANGED,\n\tbuf:[%s]\n\tstr:[%s]\n\
| ^
src/lib_ccx/ccx_encoders_splitbysentence.c:297:1: warning: multi-line comment [-Wcomment]
297 | // sprintf(fmtbuf, "SBS: sbs_find_insert_point_partial: REPLACE ENTIRE TAIL !!\n\
| ^
src/lib_ccx/ccx_encoders_splitbysentence.c:222:6: warning: unused variable ‘i’ [-Wunused-variable]
222 | int i; // top level indexer for strings
| ^
src/lib_ccx/ccx_encoders_splitbysentence.c: In function ‘reformat_cc_bitmap_through_sentence_buffer’:
src/lib_ccx/ccx_encoders_splitbysentence.c:730:8: warning: unused variable ‘str’ [-Wunused-variable]
730 | char *str;
| ^~~
src/lib_ccx/ccx_encoders_splitbysentence.c:729:6: warning: unused variable ‘i’ [-Wunused-variable]
729 | int i = 0;
| ^
src/lib_ccx/ccx_encoders_splitbysentence.c:728:6: warning: unused variable ‘used’ [-Wunused-variable]
728 | int used;
| ^~~~
src/lib_ccx/ccx_encoders_splitbysentence.c:727:18: warning: unused variable ‘ms_end’ [-Wunused-variable]
727 | LLONG ms_start, ms_end;
| ^~~~~~
src/lib_ccx/ccx_encoders_splitbysentence.c:727:8: warning: unused variable ‘ms_start’ [-Wunused-variable]
727 | LLONG ms_start, ms_end;
| ^~~~~~~~
src/lib_ccx/ccx_encoders_splitbysentence.c:726:20: warning: unused variable ‘rect’ [-Wunused-variable]
726 | struct cc_bitmap* rect;
| ^~~~
* spupng: Fix warnings
GCC warns:
src/lib_ccx/ccx_encoders_spupng.c: In function ‘init_face’:
src/lib_ccx/ccx_encoders_spupng.c:644:6: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
644 | if (error = FT_New_Face(ft_library, font, 0, face))
| ^~~~~
src/lib_ccx/ccx_encoders_spupng.c:651:6: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
651 | if (error = FT_Set_Pixel_Sizes(*face, 0, FONT_SIZE))
| ^~~~~
src/lib_ccx/ccx_encoders_spupng.c: In function ‘spupng_export_string2png’:
src/lib_ccx/ccx_encoders_spupng.c:698:7: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
698 | if (error = FT_Init_FreeType(&ft_library))
| ^~~~~
src/lib_ccx/ccx_encoders_spupng.c:706:6: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
706 | if (error = init_face(&face_regular, ccx_options.enc_cfg.render_font))
| ^~~~~
src/lib_ccx/ccx_encoders_spupng.c:708:6: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
708 | if (error = init_face(&face_italics, ccx_options.enc_cfg.render_font_italics))
| ^~~~~
src/lib_ccx/ccx_encoders_spupng.c:850:9: warning: unused variable ‘height’ [-Wunused-variable]
850 | int height = slot->bitmap.rows;
| ^~~~~~
src/lib_ccx/ccx_encoders_spupng.c:849:9: warning: unused variable ‘width’ [-Wunused-variable]
849 | int width = slot->bitmap.width;
| ^~~~~
src/lib_ccx/ccx_encoders_webvtt.c: In function ‘write_webvtt_header’:
src/lib_ccx/ccx_encoders_webvtt.c:263:1: warning: control reaches end of non-void function [-Wreturn-type]
263 | }
| ^
* webvtt: Fix missing return warning
The return value of this function is never used, so just drop the
values.
GCC warns:
src/lib_ccx/ccx_encoders_webvtt.c: In function ‘write_webvtt_header’:
src/lib_ccx/ccx_encoders_webvtt.c:263:1: warning: control reaches end of non-void function [-Wreturn-type]
263 | }
| ^
* gxf: Fix MIN macro redefinition warning
GCC warns:
src/lib_ccx/ccx_gxf.c:23: warning: "MIN" redefined
23 | #define MIN(a, b) ( (a < b) ? a : b)
|
In file included from src/lib_ccx/ccx_demuxer.h:8,
from src/lib_ccx/ccx_gxf.h:4,
from src/lib_ccx/ccx_gxf.c:13:
src/lib_ccx/utility.h:8: note: this is the location of the previous definition
8 | #define MIN(X, Y) (((X) < (Y)) ? (X) : (Y))
|
* dvd: Fix unused variable warnings
GCC warns:
src/lib_ccx/dvd_subtitle_decoder.c: In function ‘get_bitmap’:
src/lib_ccx/dvd_subtitle_decoder.c:133:9: warning: unused variable ‘discard’ [-Wunused-variable]
133 | int discard = get_bits(ctx, &nextbyte, &pos, &m);
| ^~~~~~~
src/lib_ccx/dvd_subtitle_decoder.c:172:9: warning: unused variable ‘discard’ [-Wunused-variable]
172 | int discard = get_bits(ctx, &nextbyte, &pos, &m);
| ^~~~~~~
src/lib_ccx/dvd_subtitle_decoder.c: In function ‘write_dvd_sub’:
src/lib_ccx/dvd_subtitle_decoder.c:320:6: warning: unused variable ‘ret’ [-Wunused-variable]
320 | int ret =0;
| ^~~
* es_functions: Fix unused variable warning
This also removes the stale commented code that used this variable.
GCC warns:
src/lib_ccx/es_functions.c: In function ‘read_pic_info’:
src/lib_ccx/es_functions.c:682:7: warning: unused variable ‘frame_type_to_char’ [-Wunused-variable]
682 | char frame_type_to_char[] = { '?', 'I', 'P','B', 'D', '?', '?','?' };
| ^~~~~~~~~~~~~~~~~~
* dvb: Fix unused variable warning when OCR is disabled
GCC warns:
src/lib_ccx/dvb_subtitle_decoder.c: In function ‘write_dvb_sub’:
src/lib_ccx/dvb_subtitle_decoder.c:1509:6: warning: unused variable ‘ret’ [-Wunused-variable]
1509 | int ret = 0;
| ^~~
* general_loop: Fix warnings
GCC warns:
src/lib_ccx/general_loop.c: In function ‘general_loop’:
src/lib_ccx/general_loop.c:1113:15: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
1113 | (enc_ctx && (enc_ctx->srt_counter || enc_ctx->cea_708_counter) ||
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
At top level:
src/lib_ccx/general_loop.c:25:28: warning: ‘DO_NOTHING’ defined but not used [-Wunused-const-variable=]
25 | const static unsigned char DO_NOTHING[] = {0x80, 0x80};
| ^~~~~~~~~~
* networking: Fix unknown pragma warning for non-MSVC compilers
GCC warns:
src/lib_ccx/networking.c:22: warning: ignoring #pragma warning [-Wunknown-pragmas]
22 | #pragma warning( suppress : 4005)
|
* networking: Fix unused variable warnings on non-Windows platforms
GCC warns:
src/lib_ccx/networking.c: In function ‘net_udp_read’:
src/lib_ccx/networking.c:342:12: warning: variable ‘addr’ set but not used [-Wunused-but-set-variable]
342 | in_addr_t addr;
| ^~~~
src/lib_ccx/networking.c:340:12: warning: unused variable ‘len’ [-Wunused-variable]
340 | socklen_t len = sizeof(source_addr);
| ^~~
src/lib_ccx/networking.c:338:7: warning: unused variable ‘ip’ [-Wunused-variable]
338 | char ip[INET_ADDRSTRLEN];
| ^~
* params: Fix unused variable warning when OCR is disabled
GCC warns:
src/lib_ccx/params.c: In function ‘version’:
src/lib_ccx/params.c:1015:8: warning: unused variable ‘leptversion’ [-Wunused-variable]
1015 | char *leptversion;
| ^~~~~~~~~~~
* params_dump: Fix empty encoding when ASCII is used
GCC warns:
src/lib_ccx/params_dump.c: In function ‘params_dump’:
src/lib_ccx/params_dump.c:110:2: warning: enumeration value ‘CCX_ENC_ASCII’ not handled in switch [-Wswitch]
110 | switch (ccx_options.enc_cfg.encoding)
| ^~~~~~
* params_dump: Fix comparison between mismatching enums
GCC warns:
src/lib_ccx/params_dump.c: In function ‘print_file_report’:
src/lib_ccx/params_dump.c:402:18: warning: comparison between ‘enum ccx_stream_type’ and ‘enum ccx_stream_mode_enum’ [-Wenum-compare]
402 | (info->stream == CCX_SM_TRANSPORT ||
| ^~
src/lib_ccx/params_dump.c:403:18: warning: comparison between ‘enum ccx_stream_type’ and ‘enum ccx_stream_mode_enum’ [-Wenum-compare]
403 | info->stream == CCX_SM_PROGRAM ||
| ^~
src/lib_ccx/params_dump.c:404:18: warning: comparison between ‘enum ccx_stream_type’ and ‘enum ccx_stream_mode_enum’ [-Wenum-compare]
404 | info->stream == CCX_SM_ASF ||
| ^~
src/lib_ccx/params_dump.c:405:18: warning: comparison between ‘enum ccx_stream_type’ and ‘enum ccx_stream_mode_enum’ [-Wenum-compare]
405 | info->stream == CCX_SM_WTV))
| ^~
* telxcc: Fix unused variable warning
GCC warns:
src/lib_ccx/telxcc.c: In function ‘process_telx_packet’:
src/lib_ccx/telxcc.c:928:10: warning: unused variable ‘flag_subtitle’ [-Wunused-variable]
928 | uint8_t flag_subtitle;
| ^~~~~~~~~~~~~
* ts_functions: Fix unused variable warnings
GCC warns:
src/lib_ccx/ts_functions.c: In function ‘get_pts’:
src/lib_ccx/ts_functions.c:642:11: warning: variable ‘pes_packet_length’ set but not used [-Wunused-but-set-variable]
642 | uint16_t pes_packet_length;
| ^~~~~~~~~~~~~~~~~
src/lib_ccx/ts_functions.c:641:10: warning: variable ‘pes_stream_id’ set but not used [-Wunused-but-set-variable]
641 | uint8_t pes_stream_id;
| ^~~~~~~~~~~~~
* ts_tables_epg: Fix warnings
GCC warns:
src/lib_ccx/ts_tables_epg.c: In function ‘EPG_add_event’:
src/lib_ccx/ts_tables_epg.c:380:6: warning: unused variable ‘isnew’ [-Wunused-variable]
380 | int isnew=true, j;
| ^~~~~
src/lib_ccx/ts_tables_epg.c: In function ‘EPG_DVB_decode_string’:
src/lib_ccx/ts_tables_epg.c:469:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
469 | int ret=-1;
| ^~~
src/lib_ccx/ts_tables_epg.c: In function ‘EPG_ATSC_decode_EIT’:
src/lib_ccx/ts_tables_epg.c:802:25: warning: variable ‘emt_location’ set but not used [-Wunused-but-set-variable]
802 | uint8_t title_length, emt_location;
| ^~~~~~~~~~~~
src/lib_ccx/ts_tables_epg.c:764:10: warning: variable ‘table_id’ set but not used [-Wunused-but-set-variable]
764 | uint8_t table_id;
| ^~~~~~~~
src/lib_ccx/ts_tables_epg.c: In function ‘EPG_ATSC_decode_VCT’:
src/lib_ccx/ts_tables_epg.c:837:10: warning: variable ‘table_id’ set but not used [-Wunused-but-set-variable]
837 | uint8_t table_id;
| ^~~~~~~~
src/lib_ccx/ts_tables_epg.c: In function ‘EPG_DVB_decode_EIT’:
src/lib_ccx/ts_tables_epg.c:883:10: warning: variable ‘segment_last_section_number’ set but not used [-Wunused-but-set-variable]
883 | uint8_t segment_last_section_number;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
src/lib_ccx/ts_tables_epg.c:882:10: warning: variable ‘last_section_number’ set but not used [-Wunused-but-set-variable]
882 | uint8_t last_section_number;
| ^~~~~~~~~~~~~~~~~~~
src/lib_ccx/ts_tables_epg.c: In function ‘parse_EPG_packet’:
src/lib_ccx/ts_tables_epg.c:1041:11: warning: unused variable ‘transport_error_indicator’ [-Wunused-variable]
1041 | unsigned transport_error_indicator = (tspacket[1]&0x80)>>7;
| ^~~~~~~~~~~~~~~~~~~~~~~~~
* matroska: Fix unused variable warning
The call is left alone since it might create a decoder context.
GCC warns:
src/lib_ccx/matroska.c: In function ‘matroska_save_all’:
src/lib_ccx/matroska.c:1182:27: warning: unused variable ‘dec_ctx’ [-Wunused-variable]
1182 | struct lib_cc_decode *dec_ctx = update_decoder_list(mkv_ctx->ctx);
| ^~~~~~~
* utility: Only define MIN when necessary
GCC warns:
In file included from src/lib_ccx/ccx_demuxer.h:8,
from src/lib_ccx/lib_ccx.h:15,
from src/gpacmp4/mp4.c:6:
src/lib_ccx/utility.h:8: warning: "MIN" redefined
8 | #define MIN(X, Y) (((X) < (Y)) ? (X) : (Y))
|
In file included from src/gpacmp4/gpac/tools.h:33,
from src/gpacmp4/gpac/isomedia.h:50,
from src/gpacmp4/mp4.c:5:
src/gpacmp4/gpac/setup.h:324: note: this is the location of the previous definition
324 | #define MIN(X, Y) ((X)<(Y)?(X):(Y))
|
* Fix indentation, use switch instead of if
* Remove confusing comment
Enums are abstractions and should be used as such. They shouldn't be
used like integers.
* Return a const char* instead of char * allocated on heap
* Test return value inline
* Add SCC output
* Add CCD format
* Add channel header to CCD
* Return const pointer
* Revert formatting change
* Colour -> Color
* Fix formatting
* Move comment to relevant place
* Improve readability
* Fix formatting
* Fix erroneous comment
* Use different parity function not requiring GNU extension
* Use enum instead of int
* Fix bug
* Implement channel functionality
* Fix CI errors
* Fix CI build
* Add options to help menu
* Mention change in changelog
* Add file to build systems
* Remove uneeded link against zlib
* Remove the use of <stdbool.h> and use const char
* Rewrite SCC formatter
* Use fdprintf
* Implementation of text renderer
* Fix some characters being cut
* Fix encoding and other bugs
* Add black background & fix bugs
* Fix more bugs
* Change to relative path
* Add a font option & Default font for MacOS & Fix anti-aliasing
* Document -font & enlarge default canvas
* Update README.md
* Delete README.MAC.TXT
No longer accurate given work done to integrate Mac into build processes.
* Change to use project's PNG/ZLIB libraries
* Fix Mac build command
Makes OCR an optional parameter
Adds python API file to build
* Update README.md