Skip to content

Commit 1990c52

Browse files
Merge branch 'master' of github.com:ZoneMinder/zoneminder
2 parents a24fbe4 + c8a4933 commit 1990c52

File tree

3 files changed

+33
-6
lines changed

3 files changed

+33
-6
lines changed

src/zm_packetqueue.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -334,15 +334,11 @@ void PacketQueue::clearPackets(const std::shared_ptr<ZMPacket> &add_packet) {
334334
}
335335
delete lp;
336336

337-
#if 0
338-
// There are no threads that follow analysis thread. So there cannot be an it pointing here
339-
// event writing thread technically follows, but packets are copied out of queue
340337
if (is_there_an_iterator_pointing_to_packet(zm_packet)) {
341-
if (pktQueue.begin() == next_front)
342-
Warning("Found iterator at beginning of queue. Some thread isn't keeping up");
338+
Debug(3, "Foudn iterator Counted %d video packets. Which would leave %d in packetqueue tail count is %d",
339+
video_packets_to_delete, packet_counts[video_stream_id]-video_packets_to_delete, tail_count);
343340
break;
344341
}
345-
#endif
346342

347343
if (zm_packet->packet->stream_index == video_stream_id) {
348344
keyframe_interval_count++;

web/skins/classic/views/js/monitor.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,9 @@ function initPage() {
393393
} // end if ZM_OPT_USE_GEOLOCATION
394394

395395
updateLinkedMonitorsUI();
396+
397+
// Setup the thumbnail video animation
398+
if (!isMobile()) initThumbAnimation();
396399
} // end function initPage()
397400

398401
function ll2dms(input) {

web/skins/classic/views/monitor.php

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1300,6 +1300,34 @@ class="nav-link<?php echo $tab == $name ? ' active' : '' ?>"
13001300
);
13011301
echo htmlSelect('newMonitor[DefaultCodec]', $codecs, $monitor->DefaultCodec()); ?>
13021302
</li>
1303+
<li>
1304+
<?php
1305+
$stream_available = canView('Stream') and $monitor->Type()=='WebSite' or ($monitor->CaptureFPS() && $monitor->Capturing() != 'None');
1306+
$options = array();
1307+
1308+
$ratio_factor = $monitor->ViewWidth() ? $monitor->ViewHeight() / $monitor->ViewWidth() : 1;
1309+
$options['width'] = ZM_WEB_LIST_THUMB_WIDTH;
1310+
$options['height'] = ZM_WEB_LIST_THUMB_HEIGHT ? ZM_WEB_LIST_THUMB_HEIGHT : ZM_WEB_LIST_THUMB_WIDTH*$ratio_factor;
1311+
$options['scale'] = $monitor->ViewWidth() ? intval(100*ZM_WEB_LIST_THUMB_WIDTH / $monitor->ViewWidth()) : 100;
1312+
$options['mode'] = 'jpeg';
1313+
$options['frames'] = 1;
1314+
1315+
$stillSrc = $monitor->getStreamSrc($options);
1316+
$streamSrc = $monitor->getStreamSrc(array('scale'=>$options['scale']*5));
1317+
1318+
$thmbWidth = ( $options['width'] ) ? 'width:'.$options['width'].'px;' : '';
1319+
$thmbHeight = ( $options['height'] ) ? 'height:'.$options['height'].'px;' : '';
1320+
1321+
$imgHTML = '<div class="colThumbnail" style="'.$thmbHeight.'"><a';
1322+
$imgHTML .= $stream_available ? ' href="?view=watch&amp;mid='.$monitor->Id().'">' : '>';
1323+
$imgHTML .= '<img id="thumbnail' .$monitor->Id(). '" src="' .$stillSrc. '" style="'
1324+
.$thmbWidth.$thmbHeight. '" stream_src="' .$streamSrc. '" still_src="' .$stillSrc. '"'.
1325+
($options['width'] ? ' width="'.$options['width'].'"' : '' ).
1326+
($options['height'] ? ' height="'.$options['height'].'"' : '' ).
1327+
' loading="lazy" /></a></div>';
1328+
echo $imgHTML;
1329+
?>
1330+
</li>
13031331
<?php
13041332
break;
13051333
case 'timestamp' :

0 commit comments

Comments
 (0)