Skip to content

[FIX]: Add ATSC VCT virtual channel numbers and call signs to XMLTV output#1837

Merged
cfsmp3 merged 1 commit into
CCExtractor:masterfrom
x15sr71:fix/atsc-vct-xmltv-mapping
Dec 17, 2025
Merged

[FIX]: Add ATSC VCT virtual channel numbers and call signs to XMLTV output#1837
cfsmp3 merged 1 commit into
CCExtractor:masterfrom
x15sr71:fix/atsc-vct-xmltv-mapping

Conversation

@x15sr71

@x15sr71 x15sr71 commented Dec 17, 2025

Copy link
Copy Markdown
Contributor

In raising this pull request, I confirm the following (please check boxes):

  • I have read and understood the contributors guide.
  • I have checked that another pull request for this purpose does not exist.
  • I have considered, and confirmed that this submission will be valuable to others.
  • I accept that this submission may not be used, and the pull request closed at the will of the maintainer.
  • I give this submission freely, and claim no ownership to its content.
  • I have mentioned this change in the changelog.

My familiarity with the project is as follows (check one):

  • I have never used CCExtractor.
  • I have used CCExtractor just a couple of times.
  • I absolutely love CCExtractor, but have not contributed previously.
  • I am an active contributor to CCExtractor.

Description

XMLTV channel definitions now include ATSC VCT-derived virtual channel numbers (major.minor) and call signs, emitted as separate <display-name> elements and associated with the existing channel ID (program number).

Example output:

<channel id="1">
  <display-name>5.1</display-name>
  <display-name>KPIX-TV</display-name>
</channel>

This follows the XMLTV DTD (display-name+) and the approach discussed in #1835

Note: This PR also adds a changelog entry for the previously merged PR #1773

@cfsmp3 cfsmp3 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent work! This is a clean, well-implemented enhancement from a proven contributor.

Review Results

  • All Linux builds pass
  • Correct ATSC A/65 bit extraction for major/minor channel numbers
  • Proper UTF-16BE to UTF-8 conversion for VCT short_name
  • Good edge case handling (empty names, whitespace trimming, fallbacks)
  • XML-safe output using EPG_fprintxml()
  • XMLTV DTD compliant (multiple display-name elements)
  • Rust FFI properly updated
  • Changelog updated (including missing entry for #1773)

ATSC A/65 Verification

The bit extraction is correct per Section 6.4:

major_channel_num = ((offset[14] & 0x0F) << 6) | ((offset[15] & 0xFC) >> 2);  // ✅
minor_channel_num = ((offset[15] & 0x03) << 8) | offset[16];                   // ✅

Great follow-up to #1773 - the ATSC XMLTV support is now much more complete!

Approved and merging.

@cfsmp3 cfsmp3 merged commit 0b3ad40 into CCExtractor:master Dec 17, 2025
17 of 19 checks passed
@x15sr71 x15sr71 deleted the fix/atsc-vct-xmltv-mapping branch December 17, 2025 06:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants