From e8aaee4b21d082fc00522c85fcad9018f6f1c842 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Sat, 13 Jul 2024 10:01:00 -0400 Subject: [PATCH 1/4] Put back code that looks for iterators when cleaning packet queue. event thread can now have an iterator that follows analysis --- src/zm_packetqueue.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/zm_packetqueue.cpp b/src/zm_packetqueue.cpp index e6c0777f2b..467b26580b 100644 --- a/src/zm_packetqueue.cpp +++ b/src/zm_packetqueue.cpp @@ -334,15 +334,11 @@ void PacketQueue::clearPackets(const std::shared_ptr &add_packet) { } delete lp; -#if 0 - // There are no threads that follow analysis thread. So there cannot be an it pointing here - // event writing thread technically follows, but packets are copied out of queue if (is_there_an_iterator_pointing_to_packet(zm_packet)) { - if (pktQueue.begin() == next_front) - Warning("Found iterator at beginning of queue. Some thread isn't keeping up"); + Debug(3, "Foudn iterator Counted %d video packets. Which would leave %d in packetqueue tail count is %d", + video_packets_to_delete, packet_counts[video_stream_id]-video_packets_to_delete, tail_count); break; } -#endif if (zm_packet->packet->stream_index == video_stream_id) { keyframe_interval_count++; From 3591c8717cc0eb563ea2144c8a5dc27b1324f08c Mon Sep 17 00:00:00 2001 From: IgorA100 Date: Sun, 14 Jul 2024 16:41:48 +0300 Subject: [PATCH 2/4] Feat: Show the camera image on the monitor editing page on the Viewing tab (monitor.php) --- web/skins/classic/views/monitor.php | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/web/skins/classic/views/monitor.php b/web/skins/classic/views/monitor.php index 706d0e2a40..f4c0820bc0 100644 --- a/web/skins/classic/views/monitor.php +++ b/web/skins/classic/views/monitor.php @@ -1300,6 +1300,34 @@ class="nav-link" ); echo htmlSelect('newMonitor[DefaultCodec]', $codecs, $monitor->DefaultCodec()); ?> +
  • +Type()=='WebSite' or ($monitor->CaptureFPS() && $monitor->Capturing() != 'None'); + $options = array(); + + $ratio_factor = $monitor->ViewWidth() ? $monitor->ViewHeight() / $monitor->ViewWidth() : 1; + $options['width'] = ZM_WEB_LIST_THUMB_WIDTH; + $options['height'] = ZM_WEB_LIST_THUMB_HEIGHT ? ZM_WEB_LIST_THUMB_HEIGHT : ZM_WEB_LIST_THUMB_WIDTH*$ratio_factor; + $options['scale'] = $monitor->ViewWidth() ? intval(100*ZM_WEB_LIST_THUMB_WIDTH / $monitor->ViewWidth()) : 100; + $options['mode'] = 'jpeg'; + $options['frames'] = 1; + + $stillSrc = $monitor->getStreamSrc($options); + $streamSrc = $monitor->getStreamSrc(array('scale'=>$options['scale']*5)); + + $thmbWidth = ( $options['width'] ) ? 'width:'.$options['width'].'px;' : ''; + $thmbHeight = ( $options['height'] ) ? 'height:'.$options['height'].'px;' : ''; + + $imgHTML = '
    ' : '>'; + $imgHTML .= '
    '; + echo $imgHTML; +?> +
  • Date: Sun, 14 Jul 2024 16:46:11 +0300 Subject: [PATCH 3/4] Added thumbnail video animation (monitor.js) --- web/skins/classic/views/js/monitor.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/web/skins/classic/views/js/monitor.js b/web/skins/classic/views/js/monitor.js index 51722b0ecb..824b442aa1 100644 --- a/web/skins/classic/views/js/monitor.js +++ b/web/skins/classic/views/js/monitor.js @@ -393,6 +393,9 @@ function initPage() { } // end if ZM_OPT_USE_GEOLOCATION updateLinkedMonitorsUI(); + + // Setup the thumbnail video animation + if (!isMobile()) initThumbAnimation(); } // end function initPage() function ll2dms(input) { From 3d11c114ac84abf6cdf601a3221217fff9b9554b Mon Sep 17 00:00:00 2001 From: IgorA100 Date: Sun, 14 Jul 2024 16:48:57 +0300 Subject: [PATCH 4/4] Chore: remove extra space (monitor.js) --- web/skins/classic/views/js/monitor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/skins/classic/views/js/monitor.js b/web/skins/classic/views/js/monitor.js index 824b442aa1..8a2e344555 100644 --- a/web/skins/classic/views/js/monitor.js +++ b/web/skins/classic/views/js/monitor.js @@ -393,7 +393,7 @@ function initPage() { } // end if ZM_OPT_USE_GEOLOCATION updateLinkedMonitorsUI(); - + // Setup the thumbnail video animation if (!isMobile()) initThumbAnimation(); } // end function initPage()