[mythtv] Recorded TS has no PCRs with HDHomerun (some network only)

Steve Malenfant smalenfant at gmail.com
Sat Mar 28 03:16:59 UTC 2009


I was having issues with an Amino STB to stream some content to it from the
MythTv Recording with NBC and ABC in my area using HDHomerun. I found that
mythtv drops the packets that don't have payload but that could contain PCR
information. FOX and CBS seems to work just fine.
What would be the proper place to put in the code to fix this? Just
eliminate the if condition for "if (tspacket.HasPayload())"?
I also looked at the DVB code to write transport packet to disk and this
issue might not be there since all packets are written to disk which match
the kernel filter (I believe).

Thanks.

In hdhrrecorder.cpp :
bool HDHRRecorder::ProcessTSPacket(const TSPacket& tspacket)
{
    bool ok = !tspacket.TransportError();
    if (ok && !tspacket.ScramplingControl())
    {
        if (tspacket.HasAdaptationField())
            GetStreamData()->HandleAdaptationFieldControl(&tspacket);
*        if (tspacket.HasPayload())
*        {
            const unsigned int lpid = tspacket.PID();

            if ((GetStreamData()->VideoPIDSingleProgram() > 0x1fff) &&
                _wait_for_keyframe_option)
            {
                _wait_for_keyframe_option = false;
            }
....

In tspacket.h :
bool HasPayload() const { return bool(_tsdata[3] & 0x10); }

Dvbnsoop dump of the source (before recording, these packets are not in the
myth recorded streams) :
------------------------------------------------------------
Sync-Byte 0x47: 71 (0x47)
Transport_error_indicator: 0 (0x00)  [= packet ok]
Payload_unit_start_indicator: 0 (0x00)  [= Packet data continues]
transport_priority: 0 (0x00)
PID: 49 (0x0031)  [= ]
transport_scrambling_control: 0 (0x00)  [= No scrambling of TS packet
payload]
*adaptation_field_control: 2 (0x02)  [= adaptation_field only, no payload]
*continuity_counter: 15 (0x0f)  [= (duplicate packet)]
    Adaptation_field:
        adaptation_field_length: 183 (0xb7)
        discontinuity_indicator: 0 (0x00)
        random_access_indicator: 0 (0x00)
        elementary_stream_priotity_indicator: 0 (0x00)
        PCR_flag: 1 (0x01)
        OPCR_flag: 0 (0x00)
        splicing_point_flag: 0 (0x00)
        transport_private_data_flag: 0 (0x00)
        adaptation_field_extension_flag: 0 (0x00)
        program_clock_reference:
            baseH: 0 (0x00)
            baseL: 3234034074 (0xc0c3719a)
            reserved: 63 (0x3f)
            extension: 237 (0x00ed)
             ==> program_clock_reference: 970210222437 (0xe1e5092165)  [=
PCR-Timestamp: 9:58:53.711942]
        (Stuffing_bytes length: 176)
        Stuffing bytes:
              0000:  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
................
              0010:  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
................
              0020:  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
................
              0030:  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
................
              0040:  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
................
              0050:  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
................
              0060:  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
................
              0070:  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
................
              0080:  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
................
              0090:  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
................
              00a0:  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
................
==========================================================
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mythtv.org/pipermail/mythtv-dev/attachments/20090327/d2dddf94/attachment.htm>


More information about the mythtv-dev mailing list