]> www.vanbest.org Git - motioneye-debian/commitdiff
slightly better refresh rate
authorCalin Crisan <ccrisan@gmail.com>
Sun, 6 Dec 2015 20:23:34 +0000 (22:23 +0200)
committerCalin Crisan <ccrisan@gmail.com>
Sun, 6 Dec 2015 20:23:34 +0000 (22:23 +0200)
motioneye/static/js/frame.js
motioneye/static/js/main.js

index 03afd011d0ecdecaecd8f308e5357ae01310fc9d..a474de16be74dd97be7377daf11c13efe13b54e6 100644 (file)
@@ -88,13 +88,7 @@ function refreshCameraFrame() {
         return; 
     }
     
-    /* at a refresh interval of 50ms, the refresh rate is limited to 20 fps */
     var count = 1000 / (refreshInterval * cameraFrame.streamingFramerate);
-    if (count <= 2) {
-        /* skipping frames (showing the same frame twice) at this rate won't be visible,
-         * while the effective framerate will be as close as possible to the motion's one */
-        count -= 1;
-    }
     
     if (img.error) {
         /* in case of error, decrease the refresh rate to 1 fps */
index 8482c6c972236dc75bf0d510904ceb5ab0ede393..e1e3986459dc30eb8edfb503f4a2ee656f45dd21 100644 (file)
@@ -4,7 +4,7 @@ var pushConfigReboot = false;
 var refreshDisabled = {}; /* dictionary indexed by cameraId, tells if refresh is disabled for a given camera */
 var fullScreenCameraId = null;
 var inProgress = false;
-var refreshInterval = 50; /* milliseconds */
+var refreshInterval = 15; /* milliseconds */
 var username = '';
 var password = '';
 var basePath = null;
@@ -4270,16 +4270,9 @@ function refreshCameraFrames() {
             return; /* no manual refresh for simple mjpeg cameras */
         }
         
-        /* at a refresh interval of 50ms, the refresh rate is limited to 20 fps */
-        var count = 1000 / (refreshInterval * this.config['streaming_framerate']);
+        var count = parseInt(1000 / (refreshInterval * this.config['streaming_framerate']));
         var serverSideResize = this.config['streaming_server_resize'];
         
-        if (count <= 2) {
-            /* skipping frames (showing the same frame twice) at this rate won't be visible,
-             * while the effective framerate will be as close as possible to the motion's one */
-            count -= 1;
-        }
-        
         if (this.img.error) {
             /* in case of error, decrease the refresh rate to 1 fps */
             count = 1000 / refreshInterval;