Skip to content

Commit

Permalink
Merge branch 'master' of github.com:ZoneMinder/zoneminder
Browse files Browse the repository at this point in the history
  • Loading branch information
Isaac Connor committed Jul 14, 2024
2 parents a24fbe4 + c8a4933 commit 1990c52
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/zm_packetqueue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -334,15 +334,11 @@ void PacketQueue::clearPackets(const std::shared_ptr<ZMPacket> &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++;
Expand Down
3 changes: 3 additions & 0 deletions web/skins/classic/views/js/monitor.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
28 changes: 28 additions & 0 deletions web/skins/classic/views/monitor.php
Original file line number Diff line number Diff line change
Expand Up @@ -1300,6 +1300,34 @@ class="nav-link<?php echo $tab == $name ? ' active' : '' ?>"
);
echo htmlSelect('newMonitor[DefaultCodec]', $codecs, $monitor->DefaultCodec()); ?>
</li>
<li>
<?php
$stream_available = canView('Stream') and $monitor->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 = '<div class="colThumbnail" style="'.$thmbHeight.'"><a';
$imgHTML .= $stream_available ? ' href="?view=watch&amp;mid='.$monitor->Id().'">' : '>';
$imgHTML .= '<img id="thumbnail' .$monitor->Id(). '" src="' .$stillSrc. '" style="'
.$thmbWidth.$thmbHeight. '" stream_src="' .$streamSrc. '" still_src="' .$stillSrc. '"'.
($options['width'] ? ' width="'.$options['width'].'"' : '' ).
($options['height'] ? ' height="'.$options['height'].'"' : '' ).
' loading="lazy" /></a></div>';
echo $imgHTML;
?>
</li>
<?php
break;
case 'timestamp' :
Expand Down

0 comments on commit 1990c52

Please sign in to comment.