diff --git a/src/bindings.h b/src/bindings.h index d1f3aa8f03..5fcf865e0a 100644 --- a/src/bindings.h +++ b/src/bindings.h @@ -570,7 +570,7 @@ class tev__Capabilities /// Attribute "EventBrokerProtocols" of type xs:string. @ std::string* EventBrokerProtocols 0; ///< Optional attribute. ///
-/// Maxiumum number of event broker configurations that can be added to the device. +/// Maximum number of event broker configurations that can be added to the device. ///
/// /// Attribute "MaxEventBrokers" of type xs:int. diff --git a/src/zm_buffer.cpp b/src/zm_buffer.cpp index 2365e1c39b..0f9d68a4be 100644 --- a/src/zm_buffer.cpp +++ b/src/zm_buffer.cpp @@ -87,7 +87,7 @@ int Buffer::read_into(int sd, unsigned int bytes, Microseconds timeout) { Error("Error %d %s from select", errno, strerror(errno)); return rv; } else if (rv == 0) { - Debug(1, "timeout"); /* a timeout occured */ + Debug(1, "timeout"); /* a timeout occurred */ return 0; } diff --git a/src/zm_crypt.cpp b/src/zm_crypt.cpp index f6b6be188a..5c5baf0f8b 100644 --- a/src/zm_crypt.cpp +++ b/src/zm_crypt.cpp @@ -134,7 +134,7 @@ bool verifyPassword(const char *username, const char *input_password, const char bool password_correct = false; if ( strlen(db_password_hash) < 4 ) { - // actually, shoud be more, but this is min. for next code + // actually, should be more, but this is min. for next code Error("DB Password is too short or invalid to check"); return false; } diff --git a/src/zm_curl_camera.cpp b/src/zm_curl_camera.cpp index ddd7e52cb5..da62358af0 100644 --- a/src/zm_curl_camera.cpp +++ b/src/zm_curl_camera.cpp @@ -534,10 +534,10 @@ void* cURLCamera::thread_func() { Error("Failed setting password: %s", (*curl_easy_strerror_f)(cRet)); } - /* Authenication preference */ + /* Authentication preference */ cRet = (*curl_easy_setopt_f)(c, CURLOPT_HTTPAUTH, CURLAUTH_ANY); if (cRet != CURLE_OK) - Warning("Failed setting libcurl acceptable http authenication methods: %s", (*curl_easy_strerror_f)(cRet)); + Warning("Failed setting libcurl acceptable http authentication methods: %s", (*curl_easy_strerror_f)(cRet)); /* Work loop */ diff --git a/src/zm_event.cpp b/src/zm_event.cpp index 3481ed4ef0..be607611ed 100644 --- a/src/zm_event.cpp +++ b/src/zm_event.cpp @@ -683,7 +683,7 @@ void Event::Run() { if (packet_queue.empty()) { if (terminate_ or zm_terminate) break; packet_queue_condition.wait(lck); - // Neccessary because we don't hold the lock in the while condition + // Necessary because we don't hold the lock in the while condition } if (!packet_queue.empty()) { packet = packet_queue.front(); diff --git a/src/zm_ffmpeg.cpp b/src/zm_ffmpeg.cpp index 6cbf122e40..3b2bd37795 100644 --- a/src/zm_ffmpeg.cpp +++ b/src/zm_ffmpeg.cpp @@ -396,7 +396,7 @@ int zm_send_packet_receive_frame(AVCodecContext *context, AVFrame *frame, AVPack // The codec may need more samples than it has, perfectly valid Debug(2, "Codec not ready to give us a frame"); } else { - Error("Could not recieve frame (error %d = '%s')", ret, + Error("Could not receive frame (error %d = '%s')", ret, av_make_error_string(ret).c_str()); } return ret; @@ -422,7 +422,7 @@ int zm_send_frame_receive_packet(AVCodecContext *ctx, AVFrame *frame, AVPacket & return 0; } else if (frame) { // May get EOF if frame is NULL because it signals flushing - Error("Could not recieve packet (error %d = '%s')", ret, + Error("Could not receive packet (error %d = '%s')", ret, av_make_error_string(ret).c_str()); } zm_av_packet_unref(&packet); diff --git a/src/zm_image.cpp b/src/zm_image.cpp index 4addab0ab1..87e34cc65c 100644 --- a/src/zm_image.cpp +++ b/src/zm_image.cpp @@ -1604,7 +1604,7 @@ void Image::Overlay( const Image &image ) { subpixelorder, image.subpixelorder); } - /* Grayscale ontop of grayscale - complete */ + /* Grayscale on top of grayscale - complete */ if ( colours == ZM_COLOUR_GRAY8 && image.colours == ZM_COLOUR_GRAY8 ) { const uint8_t* const max_ptr = buffer+size; const uint8_t* psrc = image.buffer; @@ -1618,7 +1618,7 @@ void Image::Overlay( const Image &image ) { psrc++; } - /* RGB24 ontop of grayscale - convert to same format first - complete */ + /* RGB24 on top of grayscale - convert to same format first - complete */ } else if ( colours == ZM_COLOUR_GRAY8 && image.colours == ZM_COLOUR_RGB24 ) { Colourise(image.colours, image.subpixelorder); @@ -1636,7 +1636,7 @@ void Image::Overlay( const Image &image ) { psrc += 3; } - /* RGB32 ontop of grayscale - convert to same format first - complete */ + /* RGB32 on top of grayscale - convert to same format first - complete */ } else if ( colours == ZM_COLOUR_GRAY8 && image.colours == ZM_COLOUR_RGB32 ) { Colourise(image.colours, image.subpixelorder); @@ -1664,7 +1664,7 @@ void Image::Overlay( const Image &image ) { } } - /* Grayscale ontop of RGB24 - complete */ + /* Grayscale on top of RGB24 - complete */ } else if ( colours == ZM_COLOUR_RGB24 && image.colours == ZM_COLOUR_GRAY8 ) { const uint8_t* const max_ptr = buffer+size; const uint8_t* psrc = image.buffer; @@ -1678,7 +1678,7 @@ void Image::Overlay( const Image &image ) { psrc++; } - /* RGB24 ontop of RGB24 - not complete. need to take care of different subpixel orders */ + /* RGB24 on top of RGB24 - not complete. need to take care of different subpixel orders */ } else if ( colours == ZM_COLOUR_RGB24 && image.colours == ZM_COLOUR_RGB24 ) { const uint8_t* const max_ptr = buffer+size; const uint8_t* psrc = image.buffer; @@ -1694,11 +1694,11 @@ void Image::Overlay( const Image &image ) { psrc += 3; } - /* RGB32 ontop of RGB24 - TO BE DONE */ + /* RGB32 on top of RGB24 - TO BE DONE */ } else if ( colours == ZM_COLOUR_RGB24 && image.colours == ZM_COLOUR_RGB32 ) { - Error("Overlay of RGB32 ontop of RGB24 is not supported."); + Error("Overlay of RGB32 on top of RGB24 is not supported."); - /* Grayscale ontop of RGB32 - complete */ + /* Grayscale on top of RGB32 - complete */ } else if ( colours == ZM_COLOUR_RGB32 && image.colours == ZM_COLOUR_GRAY8 ) { const Rgb* const max_ptr = (Rgb*)(buffer+size); Rgb* prdest = (Rgb*)buffer; @@ -1724,11 +1724,11 @@ void Image::Overlay( const Image &image ) { } } - /* RGB24 ontop of RGB32 - TO BE DONE */ + /* RGB24 on top of RGB32 - TO BE DONE */ } else if ( colours == ZM_COLOUR_RGB32 && image.colours == ZM_COLOUR_RGB24 ) { - Error("Overlay of RGB24 ontop of RGB32 is not supported."); + Error("Overlay of RGB24 on top of RGB32 is not supported."); - /* RGB32 ontop of RGB32 - not complete. need to take care of different subpixel orders */ + /* RGB32 on top of RGB32 - not complete. need to take care of different subpixel orders */ } else if ( colours == ZM_COLOUR_RGB32 && image.colours == ZM_COLOUR_RGB32 ) { const Rgb* const max_ptr = (Rgb*)(buffer+size); Rgb* prdest = (Rgb*)buffer; @@ -1940,7 +1940,7 @@ Image *Image::Highlight( unsigned int n_images, Image *images[], const Rgb thres return result; } -/* New function to allow buffer re-using instead of allocationg memory for the delta image every time */ +/* New function to allow buffer re-using instead of allocating memory for the delta image every time */ void Image::Delta(const Image &image, Image* targetimage) const { if ( !(width == image.width && height == image.height && colours == image.colours && subpixelorder == image.subpixelorder) ) { Panic( "Attempt to get delta of different sized images, expected %dx%dx%d %d, got %dx%dx%d %d", diff --git a/src/zm_logger.cpp b/src/zm_logger.cpp index 220721e825..7150f390f5 100644 --- a/src/zm_logger.cpp +++ b/src/zm_logger.cpp @@ -507,7 +507,7 @@ void Logger::logPrint(bool hex, const char *filepath, int line, int level, const if (level <= mFileLevel) { if (!mLogFileFP) { // FIXME unlocking here is a problem. Another thread could sneak in. - // We are using a recursive mutex so unlocking shouldn't be neccessary + // We are using a recursive mutex so unlocking shouldn't be necessary //log_mutex.unlock(); // We do this here so that we only create the file if we ever write to it. openFile(); diff --git a/src/zm_monitor.cpp b/src/zm_monitor.cpp index f05e5cbd97..804191f6d6 100644 --- a/src/zm_monitor.cpp +++ b/src/zm_monitor.cpp @@ -79,7 +79,7 @@ struct Namespace namespaces[] = #endif // This is the official SQL (and ordering of the fields) to load a Monitor. -// It will be used whereever a Monitor dbrow is needed. WHERE conditions can be appended +// It will be used wherever a Monitor dbrow is needed. WHERE conditions can be appended std::string load_monitor_sql = "SELECT `Id`, `Name`, `Deleted`, `ServerId`, `StorageId`, `Type`, `Capturing`+0, `Analysing`+0, `AnalysisSource`+0, `AnalysisImage`+0," "`Recording`+0, `RecordingSource`+0, `Decoding`+0, `RTSP2WebEnabled`, `RTSP2WebType`," diff --git a/src/zm_monitorstream.cpp b/src/zm_monitorstream.cpp index b1aada9bb1..fce4bbebcf 100644 --- a/src/zm_monitorstream.cpp +++ b/src/zm_monitorstream.cpp @@ -713,7 +713,7 @@ void MonitorStream::runStream() { } if (!sendFrame(send_image, last_frame_timestamp)) { - Debug(2, "sendFrame failed, quiting."); + Debug(2, "sendFrame failed, quitting."); zm_terminate = true; break; } @@ -722,7 +722,7 @@ void MonitorStream::runStream() { // Chrome will not display the first frame until it receives another. // Firefox is fine. So just send the first frame twice. if (!sendFrame(send_image, last_frame_timestamp)) { - Debug(2, "sendFrame failed, quiting."); + Debug(2, "sendFrame failed, quitting."); zm_terminate = true; break; } diff --git a/src/zm_mqtt.cpp b/src/zm_mqtt.cpp index 468e355b09..216ce1d9d7 100644 --- a/src/zm_mqtt.cpp +++ b/src/zm_mqtt.cpp @@ -96,7 +96,7 @@ void MQTT::addValue(std::string name, double value) { sensorListIterator = sensorList.find(name); Debug(1, "found sensor: %s", sensorListIterator->first.c_str()); // if(it == sensorList.end()) { - // clog<<__FUNCTION__<<" Could not find coresponding sensor name"< > splitFrames(unsigned char* frame, unsigned frameSize); - // overide FramedSource + // override FramedSource virtual void doGetNextFrame(); virtual void doStopGettingFrames(); virtual unsigned char *extractFrame(unsigned char *data, size_t& size, size_t& outsize); diff --git a/src/zm_rtsp_server_fifo_h264_source.h b/src/zm_rtsp_server_fifo_h264_source.h index cf605f40aa..51ca5e6d58 100644 --- a/src/zm_rtsp_server_fifo_h264_source.h +++ b/src/zm_rtsp_server_fifo_h264_source.h @@ -53,7 +53,7 @@ class H264_ZoneMinderFifoSource : public H26X_ZoneMinderFifoSource { const std::string &fifo ); - // overide ZoneMinderFifoSource + // override ZoneMinderFifoSource virtual std::list< std::pair > splitFrames(unsigned char* frame, size_t &frameSize) override; }; @@ -66,7 +66,7 @@ class H265_ZoneMinderFifoSource : public H26X_ZoneMinderFifoSource { const std::string &fifo ); - // overide ZoneMinderFifoSource + // override ZoneMinderFifoSource virtual std::list< std::pair > splitFrames(unsigned char* frame, size_t &frameSize) override; protected: diff --git a/src/zm_stream.cpp b/src/zm_stream.cpp index 4f0ad11ed2..0340b0c8fc 100644 --- a/src/zm_stream.cpp +++ b/src/zm_stream.cpp @@ -401,7 +401,7 @@ void StreamBase::closeComms() { } // Can't delete any files because another zms might have come along and opened them and is waiting on the lock. if ( lock_fd > 0 ) { - close(lock_fd); //close it rather than unlock it incase it got deleted. + close(lock_fd); //close it rather than unlock it in case it got deleted. } } } // end void StreamBase::closeComms diff --git a/src/zm_utils.cpp b/src/zm_utils.cpp index 3caa257b29..4d20752324 100644 --- a/src/zm_utils.cpp +++ b/src/zm_utils.cpp @@ -474,7 +474,7 @@ std::string mask_authentication(const std::string &url) { std::size_t password_at = masked_url.rfind(":", at_at); if (password_at == std::string::npos) { - // no : means no http:// either so something liek username@192.168.1.1 + // no : means no http:// either so something like username@192.168.1.1 masked_url.replace(0, at_at, at_at, '*'); } else if (masked_url[password_at+1] == '/') { // no password, something like http://username@192.168.1.1 diff --git a/src/zm_videostore.cpp b/src/zm_videostore.cpp index 301116365b..4bbe0c98ce 100644 --- a/src/zm_videostore.cpp +++ b/src/zm_videostore.cpp @@ -246,7 +246,7 @@ bool VideoStore::open() { ret = avcodec_parameters_from_context(video_out_stream->codecpar, video_out_ctx); if (ret < 0) { - Error("Could not initialize stream parameteres"); + Error("Could not initialize stream parameters"); } av_dict_free(&opts); // Reload it for next attempt and/or avformat open @@ -431,7 +431,7 @@ bool VideoStore::open() { video_out_stream = avformat_new_stream(oc, nullptr); ret = avcodec_parameters_from_context(video_out_stream->codecpar, video_out_ctx); if (ret < 0) { - Error("Could not initialize stream parameteres"); + Error("Could not initialize stream parameters"); return false; } } // end if copying or transcoding @@ -510,7 +510,7 @@ bool VideoStore::open() { } #if LIBAVUTIL_VERSION_CHECK(57, 28, 100, 28, 0) - /* Seems like technically we could have multple channels, so let's not implement this for ffmpeg 5 */ + /* Seems like technically we could have multiple channels, so let's not implement this for ffmpeg 5 */ #else if (audio_out_ctx->channels > 1) { Warning("Audio isn't mono, changing it."); @@ -869,7 +869,7 @@ bool VideoStore::setup_resampler() { audio_out_stream->time_base = (AVRational){1, audio_out_ctx->sample_rate}; if ((ret = avcodec_parameters_from_context(audio_out_stream->codecpar, audio_out_ctx)) < 0) { - Error("Could not initialize stream parameteres"); + Error("Could not initialize stream parameters"); return false; } zm_dump_codecpar(audio_out_stream->codecpar);