Disconnect and Reconnect in PrimeCapture instead of in constructor and descructor. Fixes camera not reconnecting.
parent
cc0f095c38
commit
3089839f83
|
@ -105,8 +105,6 @@ void RemoteCameraRtsp::Initialise() {
|
|||
buffer.size(max_size);
|
||||
|
||||
FFMPEGInit();
|
||||
|
||||
Connect();
|
||||
}
|
||||
|
||||
void RemoteCameraRtsp::Terminate() {
|
||||
|
@ -128,6 +126,9 @@ int RemoteCameraRtsp::Disconnect() {
|
|||
}
|
||||
|
||||
int RemoteCameraRtsp::PrimeCapture() {
|
||||
if (rtspThread) Disconnect();
|
||||
Connect();
|
||||
|
||||
Debug(2, "Waiting for sources");
|
||||
for (int i = 100; i && !zm_terminate && !rtspThread->hasSources(); i--) {
|
||||
usleep(100000);
|
||||
|
|
Loading…
Reference in New Issue