Merge branch 'master' into add_manufacturer_model_to_monitors

This commit is contained in:
Isaac Connor 2021-09-28 19:44:31 -04:00
commit 9bbdd36252
5 changed files with 12 additions and 5 deletions

View File

@ -109,7 +109,7 @@ Event::Event(
"INSERT INTO `Events` "
"( `MonitorId`, `StorageId`, `Name`, `StartDateTime`, `Width`, `Height`, `Cause`, `Notes`, `StateId`, `Orientation`, `Videoed`, `DefaultVideo`, `SaveJPEGs`, `Scheme` )"
" VALUES "
"( %d, %d, 'New Event', from_unixtime( %ld ), %d, %d, '%s', '%s', %d, %d, %d, '%s', %d, '%s' )",
"( %d, %d, 'New Event', from_unixtime(%" PRId64 "), %u, %u, '%s', '%s', %d, %d, %d, '%s', %d, '%s' )",
monitor->Id(),
storage->Id(),
static_cast<int64>(std::chrono::system_clock::to_time_t(start_time)),
@ -124,7 +124,6 @@ Event::Event(
save_jpegs,
storage->SchemeString().c_str()
);
id = zmDbDoInsert(sql);
if ( !SetPath(storage) ) {

View File

@ -213,7 +213,7 @@ void zm_dump_codecpar(const AVCodecParameters *par) {
void zm_dump_codec(const AVCodecContext *codec) {
Debug(1, "Dumping codec_context codec_type %d %s codec_id %d %s width %d height %d timebase %d/%d format %s profile %d level %d "
"gop_size %d has_b_frames %d max_b_frames %d me_cmp %d me_range %d qmin %d qmax %d bit_rate %ld extradata:%d:%s",
"gop_size %d has_b_frames %d max_b_frames %d me_cmp %d me_range %d qmin %d qmax %d bit_rate %" PRId64 " extradata:%d:%s",
codec->codec_type,
av_get_media_type_string(codec->codec_type),
codec->codec_id,

View File

@ -61,13 +61,15 @@ static enum AVPixelFormat find_fmt_by_hw_type(const enum AVHWDeviceType type) {
case AV_HWDEVICE_TYPE_DXVA2:
return AV_PIX_FMT_DXVA2_VLD;
case AV_HWDEVICE_TYPE_D3D11VA:
return = AV_PIX_FMT_D3D11;
return AV_PIX_FMT_D3D11;
case AV_HWDEVICE_TYPE_VDPAU:
return AV_PIX_FMT_VDPAU;
case AV_HWDEVICE_TYPE_CUDA:
return AV_PIX_FMT_CUDA;
#ifdef AV_HWDEVICE_TYPE_MMAL
case AV_HWDEVICE_TYPE_MMAL:
return AV_PIX_FMT_MMAL;
#endif
case AV_HWDEVICE_TYPE_VIDEOTOOLBOX:
return AV_PIX_FMT_VIDEOTOOLBOX;
default:

View File

@ -195,6 +195,7 @@ void PacketQueue::clearPackets(const std::shared_ptr<ZMPacket> &add_packet) {
add_packet->packet.stream_index, video_stream_id, add_packet->keyframe, keep_keyframes, packet_counts[video_stream_id], pre_event_video_packet_count,
( *(pktQueue.begin()) != add_packet )
);
Warning("Keyframe interval may be larger than MaxImageBufferCount and PreEventCount. Please increase MaxImageBufferCount");
return;
}
std::unique_lock<std::mutex> lck(mutex);

View File

@ -69,6 +69,11 @@
// setlocale( LC_CTYPE, 'en_GB' ); Character class settings 4.3.0 and after
// setlocale( LC_TIME, 'en_GB' ); Date and time formatting 4.3.0 and after
setlocale( LC_TIME, 'en_GB.utf8' );
define("DATE_FMT_CONSOLE_LONG", "%a %d %b, %Hh%M");
define( "STRF_FMT_DATETIME_SHORT", "%d/%m/%y %H:%M:%S" );
define( "STRF_FMT_DATETIME_SHORTER", "%x %H:%M:%S" );
// Simple String Replacements
$SLANG = array(
'SystemLog' => 'System Log',