Generate MPEG2-TS Program Specific Information (PSI) packets #10

Open
wants to merge 5 commits into
from

Projects

None yet

3 participants

@txase

I have a PACE RNG-110, which emits "raw" MPEG2-TS streams which are missing Program Association Table and Program Map Table packets. MythTV requires these PSIPs for playback, and it's generally a good thing to have them anyways.

This pull request includes the following changes:

  • Adds a new field to capturecard named firewire_gen_psip. PSIPs are generated when this field is non-zero on a firewire device.
  • Adds a checkbox in mythtv-setup for the new field.
  • Creates a new class PSIPGenerator
  • When enabled, the stream from the firewire device is copied into a PSIPGenerator object. Data is appended into a buffer and checked at exponentially increasing intervals until all programs have been fully identified. If a check failed with more than 20 MiB of stream, PSIPGenerator gives up and mythbackend acts as though PSIPGenerator were never used.
  • When PSI data is found, PAT and PMT packets are generated. The firewire device inserts the packets at roughly ATSC specified intervals.
  • When the channel is changed, the PSIPGenerator state is reset.

A 20 MiB checkpoint may seem excessive, but the PACE RNG-110 box starts the stream a couple seconds before any real data is ready. This leads to the first 5-10 MiB being filler MPEG2-TS packets with PID of 0x1fff.

txase added some commits Aug 3, 2011
@txase txase Add firewire_gen_psip boolean to capturecard db schema
If firewire_gen_psip is true, MPEG2-TS PAT and PMT packets will be
generated by MythTV. This is a workaround for cable boxes like the
PACE RNG110 that do not emit these packets.
641b70c
@txase txase Populate gen_psip variable of FireWireDBOptions 386d8ce
@txase txase Add checkbox for firewire PSIP generation a613934
@txase txase Add PSIPGenerator b588a4f
@txase txase Generate PSI packets for broken firmware cable boxes
Fixes #7205

If the firewire_gen_psip option is set for the capture device, generate
MPEG2-TS PAT and PMT packets (aka Program Specific Information (PSI)
packets).
b91b487
@sphery
MythTV member
@dekarl
MythTV member

Just so the reference is tracked both ways... The ticket that this pull request belongs to is http://code.mythtv.org/trac/ticket/7205

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment