home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 2
Submit: Bug Reports
[MP2-819] MP2 Server crashes on ATSC OTA channel scan
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="mm1352000" data-source="post: 1265103" data-attributes="member: 82144"><p>You're welcome, and happy new year - I hope you're well. <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile :)" loading="lazy" data-shortname=":)" /></p><p></p><p></p><p>Sure, but I think you'll find it a bit challenging for the following reasons:</p><ol> <li data-xf-list-type="ol">The code bases are too different to enable direct back-porting.</li> <li data-xf-list-type="ol">ATSC mode 0x20 (and some of the other modes) are actually a simple run-length compression of UTF-16. As you have seen from rback's example, each segment can have a different encoding. Somehow these segments with different encodings must be combined. This isn't so straightforward in the C++ world when you have to work with char*. AFAIK TVE 3's TsWriter has no code for doing this.<br /> </li> <li data-xf-list-type="ol">TV library cannot reliably receive UTF-16 strings from TsWriter. In fact, the string must be DVB-compatible, which means default processing will be ISO/IEC 6937.</li> </ol><p>Anyway, the equivalent functions for text decoding - DVB, ATSC, SCTE, OpenTV, MHW etc. - are all in this class:</p><p><a href="https://github.com/MediaPortal/MediaPortal-1/blob/EXP-TVE3.5-MP1-MP2_mm_working/DirectShowFilters/TsWriter/source/TextUtil.cpp" target="_blank">MediaPortal/MediaPortal-1</a></p><p></p><p>Here is the ATSC L-VCT record decoding function:</p><p><a href="https://github.com/MediaPortal/MediaPortal-1/blob/EXP-TVE3.5-MP1-MP2_mm_working/DirectShowFilters/TsWriter/source/ParserLvct.cpp#L597" target="_blank">MediaPortal/MediaPortal-1</a></p><p></p><p>Here is the function used to decode the multiple string structure for extended channel names (and other text such as EPG), a bit like the old DecodeMultipleStrings():</p><p><a href="https://github.com/MediaPortal/MediaPortal-1/blob/EXP-TVE3.5-MP1-MP2_mm_working/DirectShowFilters/TsWriter/source/TextUtil.cpp#L57" target="_blank">MediaPortal/MediaPortal-1</a></p><p></p><p>Here is the function that does the actual string decoding, a bit like the old DecodeString():</p><p><a href="https://github.com/MediaPortal/MediaPortal-1/blob/EXP-TVE3.5-MP1-MP2_mm_working/DirectShowFilters/TsWriter/source/TextUtil.cpp#L677" target="_blank">MediaPortal/MediaPortal-1</a></p><p></p><p></p><p>The applicable spec is here:</p><p><a href="https://www.atsc.org/wp-content/uploads/2015/03/Program-System-Information-Protocol-for-Terrestrial-Broadcast-and-Cable.pdf" target="_blank">https://www.atsc.org/wp-content/uploads/2015/03/Program-System-Information-Protocol-for-Terrestrial-Broadcast-and-Cable.pdf</a></p><p></p><p>Please refer to table 6.41 on page 82.</p><p></p><p>In short, for modes 0x00 - 0x06, 0x09 - 0x10, 0x20 - 0x27, and 0x30 - 0x33, the mode value is the most significant byte of the UTF-16 symbol. In rback's example, the provider wishes to encode <a href="https://www.fileformat.info/info/unicode/char/2019/index.htm" target="_blank">code point 0x2019</a>. They have chosen to do it using compression_type 0x00 (uncompressed), mode 0x20, and the segment byte(s) [0x19]. Mode 0x20 plus byte 0x19 becomes code point 0x2019. If the segment bytes were [0x19, 0x20, 0x21] then the code points would be 0x2019, 0x2020, 0x2021.</p><p></p><p>I hope this is all clear.</p></blockquote><p></p>
[QUOTE="mm1352000, post: 1265103, member: 82144"] You're welcome, and happy new year - I hope you're well. :) Sure, but I think you'll find it a bit challenging for the following reasons: [LIST=1] [*]The code bases are too different to enable direct back-porting. [*]ATSC mode 0x20 (and some of the other modes) are actually a simple run-length compression of UTF-16. As you have seen from rback's example, each segment can have a different encoding. Somehow these segments with different encodings must be combined. This isn't so straightforward in the C++ world when you have to work with char*. AFAIK TVE 3's TsWriter has no code for doing this. [*]TV library cannot reliably receive UTF-16 strings from TsWriter. In fact, the string must be DVB-compatible, which means default processing will be ISO/IEC 6937. [/LIST] Anyway, the equivalent functions for text decoding - DVB, ATSC, SCTE, OpenTV, MHW etc. - are all in this class: [URL="https://github.com/MediaPortal/MediaPortal-1/blob/EXP-TVE3.5-MP1-MP2_mm_working/DirectShowFilters/TsWriter/source/TextUtil.cpp"]MediaPortal/MediaPortal-1[/URL] Here is the ATSC L-VCT record decoding function: [URL="https://github.com/MediaPortal/MediaPortal-1/blob/EXP-TVE3.5-MP1-MP2_mm_working/DirectShowFilters/TsWriter/source/ParserLvct.cpp#L597"]MediaPortal/MediaPortal-1[/URL] Here is the function used to decode the multiple string structure for extended channel names (and other text such as EPG), a bit like the old DecodeMultipleStrings(): [URL="https://github.com/MediaPortal/MediaPortal-1/blob/EXP-TVE3.5-MP1-MP2_mm_working/DirectShowFilters/TsWriter/source/TextUtil.cpp#L57"]MediaPortal/MediaPortal-1[/URL] Here is the function that does the actual string decoding, a bit like the old DecodeString(): [URL="https://github.com/MediaPortal/MediaPortal-1/blob/EXP-TVE3.5-MP1-MP2_mm_working/DirectShowFilters/TsWriter/source/TextUtil.cpp#L677"]MediaPortal/MediaPortal-1[/URL] The applicable spec is here: [URL]https://www.atsc.org/wp-content/uploads/2015/03/Program-System-Information-Protocol-for-Terrestrial-Broadcast-and-Cable.pdf[/URL] Please refer to table 6.41 on page 82. In short, for modes 0x00 - 0x06, 0x09 - 0x10, 0x20 - 0x27, and 0x30 - 0x33, the mode value is the most significant byte of the UTF-16 symbol. In rback's example, the provider wishes to encode [URL='https://www.fileformat.info/info/unicode/char/2019/index.htm']code point 0x2019[/URL]. They have chosen to do it using compression_type 0x00 (uncompressed), mode 0x20, and the segment byte(s) [0x19]. Mode 0x20 plus byte 0x19 becomes code point 0x2019. If the segment bytes were [0x19, 0x20, 0x21] then the code points would be 0x2019, 0x2020, 0x2021. I hope this is all clear. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 2
Submit: Bug Reports
[MP2-819] MP2 Server crashes on ATSC OTA channel scan
Contact us
RSS
Top
Bottom