<HTML>
<HEAD>
<TITLE>Re: [mythtv] Remove Fill Packets</TITLE>
</HEAD>
<BODY>
<FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
<BR>
<BR>
On 4/27/15, 10:35 AM, "Ryan Lavender" <<a href="ryanlavender@comcast.net">ryanlavender@comcast.net</a>> wrote:<BR>
<BR>
</SPAN></FONT><BLOCKQUOTE><FONT SIZE="2"><FONT FACE="Verdana, Helvetica, Arial"><SPAN STYLE='font-size:10pt'>On 24/04/15 20:17, Ryan Lavender wrote: <BR>
<FONT COLOR="#661366">> Hi Ryan, <BR>
> <BR>
> Ok, I've had a closer look at the code (not that I understand how all of <BR>
> it fits together) and it seems that this feature is not (currently) <BR>
> available for Firewire cards. <BR>
> <BR>
> stuarta has just pushed a change to Master to strip fill packets for <BR>
> Firewire recorders. _</FONT><FONT COLOR="#0222BC"><U><a href="https://github.com/MythTV/mythtv/commit/b0138ce_">https://github.com/MythTV/mythtv/commit/b0138ce_</a></U></FONT><FONT COLOR="#661366"> <BR>
> should apply to 0.27 too so give it a go. <BR>
> <BR>
> Richard. <BR>
> <BR>
> Weird, but it doesn’t work for me. I get 0-byte recordings. What I did <BR>
> to make it work was add this to firewiredevice.cpp: <BR>
> <BR>
> Put all of the content of the function BroadcastToListeners inside an IF <BR>
> statement: if(!(data[1] == 0x1F && data[2] == 0xFF)) <BR>
> <BR>
> However, mythtv sometimes has trouble tuning certain channels, and I <BR>
> feel it may be related. <BR>
</FONT><BR>
<FONT COLOR="#000080">I really don't know the code that well but I would guess that <BR>
BroadcastToListeners is called whenever there is new data. That new <BR>
data may not be the start of a packet, so your code will filter out <BR>
chunks of data that happen to 0x1FFF in the 'wrong' place. <BR>
<BR>
I don't understand how the change stuarta made would cause 0-byte <BR>
recordings unless *every* packet were padding (and then there would be <BR>
nothing to watch anyway). <BR>
<BR>
Can you check that with no changes, everything works fine, but with the <BR>
following, you get 0-byte recordings? <BR>
<BR>
bool FirewireRecorder::ProcessTSPacket(const TSPacket &tspacket) <BR>
{ <BR>
const uint pid = tspacket.PID(); <BR>
<BR>
if (pid == 0x1fff) // Stuffing <BR>
return true; <BR>
<BR>
<BR>
Richard. <BR>
</FONT></SPAN></FONT><SPAN STYLE='font-size:10pt'><FONT FACE="Consolas, Courier New, Courier"><BR>
</FONT></SPAN></FONT><FONT COLOR="#008000"><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>That is what happened when I tried it the first time. Would you like me to try it again?<BR>
<BR>
</SPAN></FONT></FONT><FONT COLOR="#FF0000"><FONT SIZE="2"><FONT FACE="Verdana, Helvetica, Arial"><SPAN STYLE='font-size:10pt'>Please. As I said, it doesn't really make sense that that change would <BR>
cause 0-byte recordings but since I don't know exactly what code changes <BR>
you made, and I don't have the hardware to test it myself, it would be <BR>
good to make sure that the 0-byte recordings really only occur when only <BR>
that change is made. <BR>
<BR>
Richard. <BR>
</SPAN></FONT></FONT></FONT></BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
I’m going to test it again, but I think I should mention that I also have a patch in my code modeled after <a href="https://github.com/MythTV/mythtv/pull/10">https://github.com/MythTV/mythtv/pull/10</a>. See also the ticket: <a href="https://code.mythtv.org/trac/ticket/7205">https://code.mythtv.org/trac/ticket/7205</a> . My cable box doesn’t have PMT/PAT in the mpeg-ts stream. I think when I apply the patch for the fill packets, it breaks my PSIP generation code.<BR>
</SPAN></FONT>
</BODY>
</HTML>