<div dir="ltr">On Tue, Aug 2, 2016 at 10:26 PM Marc Rawji <<a href="mailto:mrawji@gmail.com">mrawji@gmail.com</a>> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello (again),<div><br></div><div>I am trying to write an external recorder. I don't quite understand the message flow that I am seeing in my recorder. I am seeing a StartStreaming, followed by a StropStreaming, then a StartStreaming, then it streams to the frontend.</div><div><br></div><div>See my annotated and trimmed logs (removed Calls with no impact on the streaming, and the many many SendBytes):</div><div><div>2016-08-01 22:13:01,922 root        : DEBUG received TuneChannel:2<br></div><div>2016-08-01 22:13:01,975 root        : DEBUG received StartStreaming<br></div><div><div>2016-08-01 22:13:04,788 root        : DEBUG returning OK:Started  //Took approx 3 seconds to start getting data</div><div>2016-08-01 22:13:04,790 root        : DEBUG received SendBytes<br></div><div>2016-08-01 22:13:04,877 root        : DEBUG returning OK              //Sending 1 SendBytes of data to STDOUT</div></div><div>2016-08-01 22:13:04,895 root        : DEBUG received StopStreaming // as soon as i start sending data, i get a StopStreaming<br></div><div><div>2016-08-01 22:13:05,899 root        : DEBUG returning OK:Stopped</div></div><div>2016-08-01 22:13:06,007 root        : DEBUG received StartStreaming // as soon as it stops, then it asks me to start it again<br></div></div><div><div>2016-08-01 22:13:08,423 root        : DEBUG returning OK:Started // takes 2.5 seconds to start getting data</div><div>2016-08-01 22:13:08,430 root        : DEBUG received SendBytes  // we now send data<br></div><div>2016-08-01 22:13:08,602 root        : DEBUG returning OK<br></div></div><div><send bytes is repeated and I see data on frontend></div><div><br></div><div>On the backend, i only see this in the same time period:</div><div><div>2016-08-01 22:13:01.933523 N  ApplyRecordRecGroupChange: LiveTV to LiveTV (2)</div><div>2016-08-01 22:13:05.955482 N  AutoExpire: CalcParams(): Max required Free Space: 2.0 GB w/freq: 15 min</div><div>2016-08-01 22:13:05.957646 W  LoadFromProgram(): SQL contains LIMIT clause, caller should be updated to use limit parameter instead</div><div>2016-08-01 22:13:05.969135 N  ApplyRecordRecGroupChange: LiveTV to LiveTV (2)</div><div>2016-08-01 22:13:05.969857 I  TVRec[1]: TuningNewRecorder - CreateRecorder()</div><div>2016-08-01 22:13:05.971848 E  RecBase[1](/home/mrawji/recorder/record.sh): SetStrOption(...recordingtype): Option not in profile.</div><div>2016-08-01 22:13:05.971860 E  RecBase[1](/home/mrawji/recorder/record.sh): SetIntOption(...recordmpts): Option not in profile.</div></div><div><br></div><div><br></div><div><br></div><div>Does anyone know why I get a Start, followed by a Stop, then another Start? </div><div><br></div><div>Thanks,</div><div>Marc</div><a href="https://forum.mythtv.org" rel="noreferrer" target="_blank"></a></div></blockquote><div> <br></div><div>Mythbackend first checks to make sure the 'signal' is valid.  I have a dream of changing it to hand off the stream from the SignalMonitor to the Recorder, where it would not Start/Stop/Restart, but that is a major architecture change.<br><br></div><div>When running mythbackend, I would recommend using `-v channel,record` to see more useful information.<br><br></div><div>John<br><br></div></div></div>