Opened 18 years ago

Closed 18 years ago

#1790 closed defect (fixed)

pes packet assembly in mythtv-eit

Reported by: Janne <janne-mythtv@…> Owned by: danielk
Priority: minor Milestone: 0.20
Component: dvb Version: head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

atached patches fix the issues not entirely

Attachments (11)

crc_check_verbose.diff (679 bytes) - added by Janne <janne-mythtv@…> 18 years ago.
adds verbose output of streamid to ease debugging
ignore_crc_for_unassembled_pespackets.diff (717 bytes) - added by Janne <janne-mythtv@…> 18 years ago.
don't do a CRC check if the packet is incomplete
pes_assembly_robustness.diff (1.5 KB) - added by Janne <janne-mythtv@…> 18 years ago.
adds checks in AssemblePSIP to avoid processing invalid data
buggy_dvb_cards_fix.diff (687 bytes) - added by Janne <janne-mythtv@…> 18 years ago.
may fix issues with buggy dvb cards in [9897]
pes_assembly_pesdata_fix.diff (458 bytes) - added by Janne <janne-mythtv@…> 18 years ago.
reset the pointer to pesdata after copying the buffer
log2.txt (17.5 KB) - added by Mark.Buechler@… 18 years ago.
1st run
log3.txt (59.5 KB) - added by Mark.Buechler@… 18 years ago.
2nd run
snoop2.txt (100.0 KB) - added by Mark.Buechler@… 18 years ago.
transport matches log2.txt
snoop3.txt (95.7 KB) - added by Mark.Buechler@… 18 years ago.
transport matches log3.txt
snoop2a.txt (32.5 KB) - added by Mark.Buechler@… 18 years ago.
Same transport as log2.txt
snoop3a.txt (32.5 KB) - added by Mark.Buechler@… 18 years ago.
Same transport as log3.txt

Download all attachments as: .zip

Change History (24)

Changed 18 years ago by Janne <janne-mythtv@…>

Attachment: crc_check_verbose.diff added

adds verbose output of streamid to ease debugging

Changed 18 years ago by Janne <janne-mythtv@…>

don't do a CRC check if the packet is incomplete

Changed 18 years ago by Janne <janne-mythtv@…>

adds checks in AssemblePSIP to avoid processing invalid data

comment:1 Changed 18 years ago by danielk

(In [9894]) Refs #1790, adds stream id to debug verbose when a PES packet fails the CRC check.

comment:2 Changed 18 years ago by danielk

(In [9895]) Refs #1790. Avoid CRC check when we have an incomplete packet.

This CRC check doesn't prevent the packet assembly from working, but since we added a VERBOSE which prints out a warning whenever we fail a CRC check it results in a lot of false warnings.

comment:3 Changed 18 years ago by danielk

Milestone: 0.20
Resolution: fixed
Status: newclosed

This should have been closed by [9897] which applied a portion of the last patch on this ticket.

comment:4 Changed 18 years ago by Janne <janne-mythtv@…>

Resolution: fixed
Status: closedreopened

[9897] may not work with buggy dvb cards

the second patch fixes hopefully the issues of the pes packet assembly.

I see occasionally failed CRC checks and discarded packets. I'm not sure if they are only caused by reception errors, especially since I see "AddTSPacket: Out of sync!!! Need to wait for next payloadstart" in bursts.

Changed 18 years ago by Janne <janne-mythtv@…>

Attachment: buggy_dvb_cards_fix.diff added

may fix issues with buggy dvb cards in [9897]

Changed 18 years ago by Janne <janne-mythtv@…>

reset the pointer to pesdata after copying the buffer

comment:5 Changed 18 years ago by danielk

(In [9917]) Refs #1790. Patch from Janne to ignore CRC on faulty DVB hardware which rewrites PAT/PMT without recalculating CRC.

comment:6 Changed 18 years ago by danielk

Resolution: fixed
Status: reopenedclosed

(In [9918]) Fixes #1790. Patch from Janne to reset pesdata pointer after a PES packet is copied.

This hopefully addresses the problem with handling multiple PES packets within a single TS packet.

comment:7 Changed 18 years ago by Mark.Buechler@…

Resolution: fixed
Status: closedreopened

Daniel, this still isn't working for me. I have two providers. One is working, the other not. Dvbsnoop shows a valid SDT for both. I'm attaching two backend logs for your viewing pleasure.

Changed 18 years ago by Mark.Buechler@…

Attachment: log2.txt added

1st run

Changed 18 years ago by Mark.Buechler@…

Attachment: log3.txt added

2nd run

comment:8 Changed 18 years ago by Janne <janne-mythtv@…>

Please attach the output of "dvbsnoop -n 5 -crc 0x11".

Please provide backend logs from runs with following verbose options: channel,record,siparser if they differ the options you used.

comment:9 Changed 18 years ago by Mark.Buechler@…

The logs provided have those verbose options exactly. Dvbsnoops attached.

Changed 18 years ago by Mark.Buechler@…

Attachment: snoop2.txt added

transport matches log2.txt

Changed 18 years ago by Mark.Buechler@…

Attachment: snoop3.txt added

transport matches log3.txt

comment:10 Changed 18 years ago by Janne <janne-mythtv@…>

Ok, does the provider transmit a SDT?

Please try dvbsnoop -n 1 -m 0xFF -f 0x42 0x11.

Changed 18 years ago by Mark.Buechler@…

Attachment: snoop2a.txt added

Same transport as log2.txt

Changed 18 years ago by Mark.Buechler@…

Attachment: snoop3a.txt added

Same transport as log3.txt

comment:11 Changed 18 years ago by Mark.Buechler@…

Snoops attached.

comment:12 Changed 18 years ago by anonymous

Ok, after speaking at length with Janne (thanks Janne for your patients), it seems my provider's SDT's tableid 0x42 doesn't at all contain current transport service definitions. Therefore, for me, depending on this table for tuning is a bad thing. the only other table we could use is the NIT tableid 0x40 but then we'd have to compare on network_id instead of original_network_id. May I suggest either a global backend option, or better yet, a per-transport option which tells the tuning methods to ignore the SDT?

But that leaves the problem in mpegstreamdata which ignores redundant PATs. If we're not resetting the version number when we know we've seen the correct networkid, then it will never get reset and tuning will fail.

If I hack the code to reparse the PAT until a valid PAT is seen, then my tuning is ~100% in trunk.

comment:13 Changed 18 years ago by danielk

Resolution: fixed
Status: reopenedclosed
Version: head

Mark, have you tried zeroing out the transportid and networkid in the dtv_multiplex table for this channel? That should force MythTV ignore the SDT table.

PS please respond in mythtv-dev.

Note: See TracTickets for help on using tickets.