Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
お世話になっております。今回、多重フレームの処理をMirakurunに追加しましたのでプルリクとして上げさせていただきます。
目的
CATVでISDB-C方式で再送信されているBSの一部チャンネルのストリームを入力したときに、正しいTSが出力できるように多重フレームから目的のTSのみを取り出す処理の追加
(「BSの一部チャンネル」が、具体的にどのチャンネルが該当するかはCATV局によって異なるようです。私の環境ではBS朝日が該当しました。)
処理を行わないことによって起こる問題(確認できているもの)
(VLCでは視聴可能であるようですが、複数のTSで映像が流れている場合は不明です)
検証した環境
$ uname -a
Linux ***** 5.4.0-70-generic #78-Ubuntu SMP Fri Mar 19 13:29:52 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
$ node -v
v10.19.0
追加した処理の概要
多重フレームヘッダ(PIDが0x002Fであるパケット)の相対ストリーム番号/スロット対応情報を取得し、channnels.ymlで指定した相対ストリーム番号に該当するスロットに入っているパケットのみを取り出す処理。
スロット配置法の区別(relative_stream_number_mode)は0(静的割当)であること前提、多重フレーム形式(frame_type)は0x1(15相対ストリーム,52スロット)であること前提で実装しています。この2つの項目は特に検証する処理を入れていません。
実装の際に参考にしたもの
追加コードについて
https://github.com/Chinachu/Mirakurun/pull/15/files を参考に追加しました
nullパケットを落とす前にtsmfの分離処理を追加しました
TSFilterにtsmfの相対ストリーム番号を渡す行を追加しました。
webUIに表示されるように周辺のコード辺を参考に追加しました
編集したファイルが多くなってしまいましたが、もしよろしければご確認のほど宜しくお願い致します。