<div dir="ltr">Hi Everyone,<div><br></div><div>I've been working on an external recorder for a while. It works most of the time, but recently i've been getting new errors.</div><div><br></div><div>First, the sequence of calls for a successful play look like this:</div><div>StartStreaming</div><div>StopStreaming</div><div>StartStreaming</div><div><br></div><div>There's only a few milliseconds between the StopStreaming and the 2nd StartStreaming, so my code allows for it and that seems to work just fine... The StopStreaming in the logs below is probably a red herring.</div><div><br></div><div>My problem below is that I am getting a "Resource temporarily unavailable (11)" when mythtv is trying to read from the stdin (the stdout of my program with the video stream)</div><div><br></div><div>This seems to happen from this call:</div><div><a href="https://github.com/MythTV/mythtv/blob/master/mythtv/libs/libmythtv/recorders/ExternalStreamHandler.cpp#L125">https://github.com/MythTV/mythtv/blob/master/mythtv/libs/libmythtv/recorders/ExternalStreamHandler.cpp#L125</a><br></div><div><br></div><div>The STDIN stream is configured to be non blocking, so the errno 11 isn't unexpected:</div><div><a href="https://github.com/MythTV/mythtv/blob/master/mythtv/libs/libmythtv/recorders/ExternalStreamHandler.cpp#L343">https://github.com/MythTV/mythtv/blob/master/mythtv/libs/libmythtv/recorders/ExternalStreamHandler.cpp#L343</a><br></div><div><br></div><div>I am not sure what to change to keep this from happening.... it fails about 50% of the time, which is annoying.<br></div><div><br></div><div>I am looking for advice on a fix, or how to troubleshoot. I am running 0.29 on Ubuntu 16.04. </div><div><br></div><div>Thanks!</div><div>Marc</div><div><br></div><div>Trimmed logs from mythbackend:<br></div><div><div>Nov 21 21:23:30  mythbackend: mythbackend[1286]: I TVRecEvent recorders/ExternalStreamHandler.cpp:1077 (ProcessCommand) ExternalRec(/home/recorder1/record.sh): ProcessCommand('Version?') = 'OK:1.0'</div><div>Nov 21 21:23:30 mythbackend: mythbackend[1286]: W TVRecEvent recorders/ExternalStreamHandler.cpp:1066 (ProcessCommand) ExternalRec(/home/recorder1/record.sh): External Recorder did not respond to 'StopStreaming'</div><div>Nov 21 21:23:30  mythbackend: mythbackend[1286]: I TVRecEvent recorders/ExternalStreamHandler.cpp:1077 (ProcessCommand) ExternalRec(/home/recorder1/record.sh): ProcessCommand('StopStreaming') = 'OK:Stopped'</div><div>Nov 21 21:23:30  mythbackend: mythbackend[1286]: E TVRecEvent recorders/ExternalStreamHandler.cpp:130 (Read) Failed to read from External Recorder: #012#011#011#011eno: Resource temporarily unavailable (11)</div><div>Nov 21 21:23:30 everest mythbackend: mythbackend[1286]: E TVRecEvent recorders/ExternalStreamHandler.cpp:151 (GetStatus) ExternIO::GetStatus: already in error state: 'Failed to read from External Recorder: #012#011#011#011eno: Resource temporarily unavailable (11)'</div><div>Nov 21 21:23:30 mythbackend: mythbackend[1286]: I TVRecEvent recorders/ExternalStreamHandler.cpp:1014 (StopStreaming) ExternalRec(/home/recorder1/record.sh): Streaming stopped</div><div>Nov 21 21:23:30  mythbackend: mythbackend[1286]: E ExternSH recorders/ExternalStreamHandler.cpp:625 (run) ExternalRec(/home/recorder1/record.sh): Failed to read from External Recorder: Failed to read from External Recorder: #012#011#011#011eno: Resource temporarily unavailable (11)</div><div><br></div></div></div>