Commit Graph

64 Commits

Author SHA1 Message Date
Carlos Fernandez
ed42525f44 chore: Bump version to 0.96
Update version strings across all build configurations:
- src/lib_ccx/lib_ccx.h
- linux/configure.ac
- mac/configure.ac
- package_creators/PKGBUILD
- package_creators/ccextractor.spec
- package_creators/debian.sh
- OpenBSD/Makefile

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 05:58:01 +01:00
Carlos Fernandez
8db7fc7a6d fix(mac): Correct leptonica library name in configure.ac
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.
2025-12-20 18:56:02 +01:00
Carlos Fernandez
70404c29ca fix(mac): Fix HARDSUBX configure script and add documentation
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>
2025-12-20 18:41:37 +01:00
Carlos Fernandez
eda489265d fix(mac): Correct lib_hash include path for system-libs build
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>
2025-12-20 18:13:12 +01:00
Carlos Fernandez
6838666b79 build(mac): Add -system-libs flag for Homebrew compatibility
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>
2025-12-20 17:58:46 +01:00
dhanush varma
c9d80e12b8 bump: update MSRV from 1.54.0 to 1.87.0
- 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
2025-11-23 00:10:04 +05:30
Prateek Sunal
42d750950a [FIX] add mac-ocr-hardsubx workflow & ffmpeg variants support (#1745)
## Fix
- Update params and there doc

## Mac OS:
- Fix FFMpeg, tesseract compilation
- Re-add Mac os build hardsubx workflow

## FFMpeg used in workflow:
- MacOS: `8.*`
- Windows: `6.*` (pinned VCPKG supports this)
- Linux: `6.*` (Latest ubuntu runner supports this)
2025-11-03 23:47:42 +05:30
Hridesh MG
ee232b5ded bump version 0.94 -> 0.95 (#1751) 2025-10-26 20:19:55 +05:30
Deepnarayan Sett
ba59eb0887 [FEAT] Removed C code already ported to Rust (#1738)
* 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
2025-09-06 20:16:39 +05:30
Deepnarayan Sett
4b5f68a6a4 [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
2025-08-24 23:23:44 +05:30
Prateek Sunal
9340cc7df6 [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 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
2024-08-10 12:55:21 +02:00
Prateek Sunal
79aaf86593 [FIX] #1549 Configure Script (#1574)
* fix: #1549 backticks

* fix: use single equal to
2023-10-23 07:24:48 -07:00
Prateek Sunal
aa4a76a941 [FEAT] Use system gpac library instead of vendoring gpacmp4 (#1535)
* 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
2023-08-17 20:03:03 +00:00
Prateek Sunal
35e73c1c90 [FIX] Rename generic bitstream.h to cc_bitstream.h #1436 (#1543)
* fix: rename bitstream

* fix: update vcpkg commit hash

* fix: try to fix the linker error
2023-07-05 03:52:51 -07:00
Shashwat Singh
170066f046 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 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
2022-07-13 14:36:30 +05:30
Aditya Pratap Singh
c3fc323150 [IMPROVEMENT] Deprecated the --with-gui flag for linux/configure and mac/configure (#1415)
* Deprecated the --with-gui flag for linux/configure and mac/configure

* Update docs/CHANGES.TXT

Co-authored-by: Willem <github@canihavesome.coffee>

Co-authored-by: Willem <github@canihavesome.coffee>
2022-03-07 13:20:11 +01:00
Carlos Fernandez Sanz
7bcdd6729f Bump version 0.93 -> 0.94 2021-12-14 09:46:01 -08:00
Hugh Mackworth
0ebeec4183 Repair Mac Build processes (#1390)
* 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
2021-11-09 17:30:21 -08:00
Carlos Fernandez Sanz
c7ebd45d9f Version bump, 0.92 -> 0.93 2021-08-16 11:31:28 -07:00
Carlos Fernandez Sanz
ccf2a031e9 Bump version on Mac 0.91 -> 0.92 2021-08-10 04:24:39 -07:00
Carlos Fernandez Sanz
5127da50d1 Push version 0.90 -> 0.91 2021-07-26 09:53:45 -07:00
Carlos Fernandez Sanz
3713283dfc Bump version 0.89 -> 0.90 2021-07-14 00:16:09 -07:00
carlos@ccextractor.org
1d7589e653 Bump version to 0.89 2021-06-13 19:05:33 +00:00
pranavrajpal
8a81a57a24 [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
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.
2021-04-30 04:59:13 -07:00
Carlos Fernandez Sanz
e91a13bb60 Remove python (#1311)
Since this code is both unused an unmaintained I'm making the executive decision to get rid of it to make our life easier.
2021-03-31 09:55:06 -07:00
Carlos Fernandez Sanz
a063be996b Minor file structure reorg (#1310)
Moved zvbi from thirdparty to lib_ccx.
Moved mp4 from gpacmp4 to libccx.
Adjusted build files as needed.
2021-03-31 09:39:54 -07:00
Willem
1b17a04b25 [FIX] Fix Mac build error for reproducible builds (#1232)
* Fix Mac build error for reproducible builds
* Shorten solution with vr8hub's suggestion

Closes #1230
2020-02-16 01:08:21 +01:00
Nils ANDRÉ-CHANG
af6d8282cb [IMPROVEMENT] Move dependencies to a third party directory (#1219)
* Move dependencies in a folder

* Windows

* MacOS
2020-01-30 04:58:37 -08:00
kdrag0n
c5bed1e3b2 [FIX] GCC warning fixes (#1204)
* 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))
      |
2020-01-23 18:49:16 -08:00
Sam Poder
c69d2db52b [FEATURE] Simple MacOS GUI (#1138)
* Create info.md

* Add files via upload

* Update

* Rename info.md to README.md

* Delete InstallCCExtractor.zip

* Add files via upload

* fix bugs

* Update InstallCCExtractorMacGUI.zip

* Create placeholder.md

* Add Source Files

* Create HowToGenerateApp

* Rename HowToGenerateApp to HowToGenerateApp.md

* Done Alert
2020-01-18 17:34:19 -08:00
Nils ANDRÉ-CHANG
19241744d7 [FEATURE] SCC and CCD encoder (#1154)
* 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
2020-01-18 08:52:03 -08:00
Rob
8fec59e753 [FEATURE] Added support for encoding into an MCC File. (CCExtractor#733) (#1097)
* [FEATURE] Added support for encoding into an MCC File. (CCExtractor#733)

* Missed deleting an unused variable declaration as part of a refactor.
2019-09-20 19:58:56 -07:00
Willem
7fe8ab767c Update configure.ac
Bump version
2019-05-21 20:36:05 +02:00
Anshul Maheshwari
86de4151d2 Release 0.87 2018-10-23 06:45:02 +05:30
Chris Lamb
b36429879d Make the build reproducible (#976)
Whilst working on the Reproducible Builds effort [0], we noticed
that ccextractor could not be built reproducibly.

This is due to it including the current date.

This was originally filed in Debian as #896867 [1] and uses the
SOURCE_DATE_EPOCH environment variable [2].

 [0] https://reproducible-builds.org/
 [1] https://bugs.debian.org/896867
 [2] https://reproducible-builds.org/specs/source-date-epoch/

Signed-off-by: Chris Lamb <lamby@debian.org>
2018-04-25 11:17:50 -07:00
lennonwoo
180da3ed5a update build scripts 2018-01-24 15:46:22 +08:00
Null
4a7946ab7d Fix more compilation error 2018-01-11 17:41:56 +08:00
Null
8d9e54130d More build files 2018-01-11 15:01:02 +08:00
Null
a5f17c318d Merge branch 'master' into libgpac 2018-01-10 19:59:52 +08:00
Null
930ca716ca [FEATURE] FreeType-based text renderer (-out=spupng with teletext/EIA608) (#877)
* 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
2018-01-09 10:24:26 -08:00
Hori75
d96b8e0e83 Modify makefile.am for linux and mac 2017-12-31 19:39:39 +07:00
Carlos Fernandez Sanz
c32d350550 Added mxf demuxer to mac/Makefile.am 2017-12-07 13:31:53 -08:00
Mayank Gupta
4573f5e8f6 [IMPROVEMENT]Modify Autoconf scripts to generate mac compatible tarball (#798)
* Modify Autoconf scripts to generate mac compatible tarball

* Update list of GSoC 2017 students
2017-10-18 17:33:58 -07:00
Mayank Gupta
fc3f505189 Add GUI for CCExtractor (GSoC 2017) (#794) 2017-10-11 14:11:39 -07:00
Mayank Gupta
ff950a035d Update Makefile.am for working Autotools build on mac (#791) 2017-10-09 12:30:42 -07:00
Saurabh Shrivastava
2eb5fd26de [FIX] Move files into appropriate directories & fix build scripts. (#781)
* Move wrappers and extracters inside src/ and update CMakeLists.

* Reflect change in path across build scripts.

* Remove redundant source file inclusion.

* Always use supplied libpng.
2017-10-02 12:16:04 -07:00
Hugh Mackworth
01852ef055 Compilation on the Mac (#777)
* 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
2017-10-02 11:59:00 -07:00
Mayank Gupta
bc361a2e86 Add ocr, hardsubx and autotools support for mac 2017-05-11 06:19:16 +03:00
saurabhkapur
83632761a4 tesseract library file included in mac build command (#612)
* tesserac file added in mac build command

* tesserac file added in mac build command

* Delete .DS_Store
2017-01-07 11:52:39 -08:00
Saurabh Shrivastava
8c8a357aa7 Corrected filename. 2016-12-16 11:00:34 +05:30