feat: Add --input scc option for SCC input format

Add support for `--input scc` command line option to explicitly specify
SCC (Scenarist Closed Caption) input format, for consistency with other
input format options.

Changes:
- Add `Scc` variant to `InFormat` enum in args.rs
- Handle `InFormat::Scc` in parser.rs to set StreamMode::Scc
- Add `StreamMode::Scc` case in print_cfg() in both Rust and C code

Fixes #1972

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Carlos Fernandez
2026-01-02 21:45:08 +01:00
parent f5dc1cf467
commit 1b0e66bc67
4 changed files with 9 additions and 0 deletions

View File

@@ -285,6 +285,9 @@ static void ccx_demuxer_print_cfg(struct ccx_demuxer *ctx)
case CCX_SM_MXF:
mprint("MXF");
break;
case CCX_SM_SCC:
mprint("SCC");
break;
#ifdef WTV_DEBUG
case CCX_SM_HEX_DUMP:
mprint("Hex");

View File

@@ -990,6 +990,8 @@ pub enum InFormat {
Mkv,
/// Material Exchange Format (MXF).
Mxf,
/// Scenarist Closed Caption (SCC).
Scc,
#[cfg(feature = "wtv_debug")]
// For WTV Debug mode only
Hex,

View File

@@ -327,6 +327,9 @@ impl CcxDemuxer<'_> {
StreamMode::Mxf => {
info!("MXF");
}
StreamMode::Scc => {
info!("SCC");
}
#[cfg(feature = "wtv_debug")]
StreamMode::HexDump => {
info!("Hex");

View File

@@ -311,6 +311,7 @@ impl OptionsExt for Options {
InFormat::Mp4 => self.demux_cfg.auto_stream = StreamMode::Mp4,
InFormat::Mkv => self.demux_cfg.auto_stream = StreamMode::Mkv,
InFormat::Mxf => self.demux_cfg.auto_stream = StreamMode::Mxf,
InFormat::Scc => self.demux_cfg.auto_stream = StreamMode::Scc,
}
}