Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
e474692
chore: ignore local build artifacts and backups
Dec 10, 2025
0499f4f
rust: add SMPTE-TT encoder skeleton
Dec 10, 2025
0c510c1
rust: add initial SMPTE-TT encoder skeleton
Dec 12, 2025
8107a94
rust: add initial SMPTE-TT encoder skeleton
Dec 12, 2025
0820e95
Fix SMPTE-TT encoder helper: pointer→slice conversion, XML escaping, …
Dec 12, 2025
b71ad40
Complete SMPTE-TT encoder port to Rust
Dec 14, 2025
2264917
Add C FFI exports and remove C implementation
Dec 14, 2025
8ee175a
Exclude smptett C file from CMake builds
invalid-email-address Dec 16, 2025
554de1b
Merge upstream master, resolve .gitignore conflict
invalid-email-address Dec 16, 2025
02b33ea
Revert "Exclude smptett C file from CMake builds"
invalid-email-address Dec 16, 2025
ac74813
fix: Complete Rust SMPTE-TT migration with working build
invalid-email-address Dec 16, 2025
9a64f02
fix: Make Rust required
invalid-email-address Dec 16, 2025
74671d3
fix: Ensure C SMPTE-TT file is excluded when Rust is available
invalid-email-address Dec 16, 2025
ba50d03
fix: Complete Rust SMPTE-TT encoder integration for macOS
invalid-email-address Dec 19, 2025
caf2744
fix: Exclude C SMPTE-TT file from Mac build.command script
invalid-email-address Dec 19, 2025
b2e3b64
ci: Add Rust installation to Mac CMake workflows
invalid-email-address Dec 19, 2025
519599f
fix: Use Corrosion properly for Rust library integration
invalid-email-address Dec 19, 2025
02cb9e4
ci: Source cargo environment before running cmake on Linux
invalid-email-address Dec 20, 2025
78e94a0
ci: Add Rust installation to all Linux workflow jobs
invalid-email-address Dec 20, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/workflows/build_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ jobs:
steps:
- name: Install dependencies
run: sudo apt update && sudo apt-get install libgpac-dev libtesseract-dev libavcodec-dev libavdevice-dev libx11-dev libxcb1-dev libxcb-shm0-dev
- name: Install Rust
run: |
curl --proto "=https" --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y

- uses: actions/checkout@v6
- name: build
run: ./build -hardsubx
Expand All @@ -47,6 +51,10 @@ jobs:
steps:
- name: Install dependencies
run: sudo apt update && sudo apt-get install libgpac-dev
- name: Install Rust
run: |
curl --proto "=https" --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y

- uses: actions/checkout@v6
- name: run autogen
run: ./autogen.sh
Expand All @@ -65,6 +73,10 @@ jobs:
steps:
- name: Install dependencies
run: sudo apt update && sudo apt-get install libgpac-dev
- name: Install Rust
run: |
curl --proto "=https" --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y

- uses: actions/checkout@v6
- name: cmake
run: mkdir build && cd build && cmake ../src
Expand All @@ -79,8 +91,13 @@ jobs:
- uses: actions/checkout@v6
- name: Install dependencies
run: sudo apt update && sudo apt install libgpac-dev libtesseract-dev libavformat-dev libavdevice-dev libswscale-dev yasm
- name: Install Rust
run: |
curl --proto "=https" --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y

- name: cmake
run: |

mkdir build && cd build
cmake -DWITH_OCR=ON -DWITH_HARDSUBX=ON ../src
- name: build
Expand All @@ -94,6 +111,10 @@ jobs:
steps:
- name: Install dependencies
run: sudo apt update && sudo apt-get install libgpac-dev
- name: Install Rust
run: |
curl --proto "=https" --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y

- uses: actions/checkout@v6
- name: cache
uses: actions/cache@v5
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/build_mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ jobs:
runs-on: macos-latest
steps:
- uses: actions/checkout@v6
- name: Install Rust
run: |
curl --proto "=https" --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: dependencies
run: brew install gpac
- uses: actions/checkout@v6
Expand All @@ -78,6 +82,10 @@ jobs:
runs-on: macos-latest
steps:
- uses: actions/checkout@v6
- name: Install Rust
run: |
curl --proto "=https" --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: Install dependencies
run: brew install pkg-config autoconf automake libtool tesseract leptonica gpac ffmpeg
- name: cmake
Expand Down
15 changes: 15 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,21 @@ windows/*/CACHEDIR.TAG
windows/.rustc_info.json
linux/configure~

# local junk
build-system/
*.backup
*.save
*.patch
*.a
README.srt
no_subs.ts

fix_hardsubx.cmake
fix_libraries.cmake
mac/configure~
*.current


# Plans and temporary files
plans/
tess.log
Expand Down
2 changes: 1 addition & 1 deletion mac/build.command
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ if [[ "$ENABLE_OCR" == "true" ]]; then
BLD_INCLUDE="$BLD_INCLUDE `pkg-config --cflags --silence-errors tesseract`"
fi

SRC_CCX="$(find ../src/lib_ccx -name '*.c')"
SRC_CCX="$(find ../src/lib_ccx -name '*.c' | grep -v ccx_encoders_smptett.c)"
SRC_LIB_HASH="$(find ../src/thirdparty/lib_hash -name '*.c')"
SRC_LIBPNG="$(find ../src/thirdparty/libpng -name '*.c')"
SRC_UTF8="../src/thirdparty/utf8proc/utf8proc.c"
Expand Down
22 changes: 18 additions & 4 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -246,11 +246,25 @@ add_executable (ccextractor ${SOURCEFILE} ${FREETYPE_SOURCE} ${UTF8PROC_SOURCE})
# Build with Rust library
########################################################

if (PKG_CONFIG_FOUND)
add_subdirectory (rust)
set (EXTRA_LIBS ${EXTRA_LIBS} ccx_rust)
endif (PKG_CONFIG_FOUND)
# Rust is REQUIRED for DTVCC and SMPTE-TT functionality
find_program(CARGO cargo PATHS $ENV{HOME}/.cargo/bin REQUIRED)
message(STATUS "Found cargo: ${CARGO}")

# Build Rust library using Corrosion (in rust/CMakeLists.txt)
add_subdirectory(rust)

# Platform-specific system libraries needed for Rust
if(APPLE)
set(RUST_EXTRA_LIBS pthread dl m "-framework Security" "-framework CoreFoundation")
elseif(WIN32)
set(RUST_EXTRA_LIBS ws2_32 userenv bcrypt ntdll)
else()
set(RUST_EXTRA_LIBS pthread dl m)
endif()

set(EXTRA_LIBS ${EXTRA_LIBS} ccx_rust ${RUST_EXTRA_LIBS})
set(RUST_AVAILABLE TRUE)
message(STATUS "Rust available, using Rust implementations")

target_link_libraries (ccextractor ${EXTRA_LIBS})
target_include_directories (ccextractor PUBLIC ${EXTRA_INCLUDES})
Expand Down
3 changes: 3 additions & 0 deletions src/lib_ccx/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ endif (WITH_OCR)

aux_source_directory ("${PROJECT_SOURCE_DIR}/lib_ccx/" SOURCEFILE)

# Rust is available, using Rust SMPTE-TT implementation
list(REMOVE_ITEM SOURCEFILE "${PROJECT_SOURCE_DIR}/lib_ccx/ccx_encoders_smptett.c")

add_library (ccx ${SOURCEFILE} ccx_dtvcc.h ccx_dtvcc.c ccx_encoders_mcc.c ccx_encoders_mcc.h)
target_link_libraries (ccx ${EXTRA_LIBS})
target_include_directories (ccx PUBLIC ${EXTRA_INCLUDES})
Expand Down
Loading
Loading