Fix mjpeg wont open multiple streams when port is not 80 (#13502)
Signed-off-by: Matthew Skinner <matt@pcmus.com>
This commit is contained in:
parent
0306f4508f
commit
3aac15df62
@ -1406,7 +1406,7 @@ public class IpCameraHandler extends BaseThingHandler {
|
||||
}
|
||||
}
|
||||
|
||||
boolean streamIsStopped(String url) {
|
||||
private boolean streamIsStopped(String url) {
|
||||
ChannelTracking channelTracking = channelTrackingMap.get(url);
|
||||
if (channelTracking != null) {
|
||||
if (channelTracking.getChannel().isActive()) {
|
||||
@ -1732,7 +1732,9 @@ public class IpCameraHandler extends BaseThingHandler {
|
||||
localFfmpeg.stopConverting();
|
||||
ffmpegSnapshot = null;
|
||||
}
|
||||
onvifCamera.disconnect();
|
||||
if (!thing.getThingTypeUID().getId().equals(GENERIC_THING)) {// generic cameras do not have ONVIF support
|
||||
onvifCamera.disconnect();
|
||||
}
|
||||
openChannels.close();
|
||||
}
|
||||
|
||||
|
||||
@ -187,11 +187,10 @@ public class CameraServlet extends IpCameraServlet {
|
||||
if (handler.mjpegUri.isEmpty() || "ffmpeg".equals(handler.mjpegUri)) {
|
||||
output = new StreamOutput(resp);
|
||||
} else {
|
||||
ChannelTracking tracker = handler.channelTrackingMap.get(handler.mjpegUri);
|
||||
ChannelTracking tracker = handler.channelTrackingMap.get(handler.getTinyUrl(handler.mjpegUri));
|
||||
if (tracker == null || !tracker.getChannel().isOpen()) {
|
||||
logger.debug("Not the first stream requested but the stream from camera was closed");
|
||||
handler.openCamerasStream();
|
||||
openStreams.closeAllStreams();
|
||||
}
|
||||
output = new StreamOutput(resp, handler.mjpegContentType);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user