commit
aaff61f72f
|
@ -414,7 +414,7 @@ This returns number of events per monitor that were recorded in the last one hou
|
|||
|
||||
curl "http://server/zm/api/events/consoleEvents/1%20hour.json"
|
||||
|
||||
This returns number of events per monitor that were recorded in the last day where there were atleast 10 frames that were alarms"
|
||||
This returns number of events per monitor that were recorded in the last day where there were at least 10 frames that were alarms"
|
||||
|
||||
::
|
||||
|
||||
|
@ -645,7 +645,7 @@ will display a live feed from monitor id 1, scaled down by 50% in quality and re
|
|||
|
||||
PTZ on live streams
|
||||
-------------------
|
||||
PTZ commands are pretty cryptic in ZoneMinder. This is not meant to be an exhaustive guide, but just something to whet your appetite:
|
||||
PTZ commands are pretty cryptic in ZoneMinder. This is not meant to be an exhaustive guide, but just something to wet your appetite:
|
||||
|
||||
|
||||
Lets assume you have a monitor, with ID=6. Let's further assume you want to pan it left.
|
||||
|
|
|
@ -115,7 +115,7 @@ A sample output on Ubuntu:
|
|||
tmpfs 2.6G 923M 1.7G 36% /run/shm
|
||||
|
||||
|
||||
The key item here is tmpfs --> the example above shows we have allocated 1.7G of mapped memory space of which 36% is used which is a healthy number. If you are seeing ``Use%`` going beyond 70% you should probaby increase the mapped memory.
|
||||
The key item here is tmpfs --> the example above shows we have allocated 1.7G of mapped memory space of which 36% is used which is a healthy number. If you are seeing ``Use%`` going beyond 70% you should probably increase the mapped memory.
|
||||
|
||||
For example, if you want to increase this limit to 70% of your memory, add the following to ``/etc/fstab``
|
||||
``tmpfs SHMPATH tmpfs defaults,noexec,nosuid,size=70% 0 0``
|
||||
|
@ -432,7 +432,7 @@ Here are some commands to get information about your hardware. Some commands are
|
|||
* ``[[zmu]] -m 0 -q -v`` -- Returns various information regarding a monitor configuration.
|
||||
* ``[[ipcs]] `` -- Provides information on the ipc facilities for which the calling process has read access.
|
||||
* ``[[ipcrm]] `` -- The ipcrm command can be used to remove an IPC object from the kernel.
|
||||
* ``cat /proc/interrupts`` -- This will dispaly what interrupts your hardware is using.
|
||||
* ``cat /proc/interrupts`` -- This will display what interrupts your hardware is using.
|
||||
|
||||
Why am I getting a 403 access error with my web browser when trying to access http //localhost/zm?
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
|
@ -70,7 +70,7 @@ To install the version in bookworm stable, just run the following command.
|
|||
|
||||
If instead you prefer to install the newer version using backports, run the following commands.
|
||||
The first line will add this bookworm-backports repository.
|
||||
The backports repository is deactivated by default, so with the second line we explicityly state we want the backported version of zoneminder.
|
||||
The backports repository is deactivated by default, so with the second line we explicitly state we want the backported version of zoneminder.
|
||||
|
||||
::
|
||||
|
||||
|
@ -171,7 +171,7 @@ To install the version in bullseye stable, just run the following command.
|
|||
|
||||
If instead you prefer to install the newer version using backports, run the following commands.
|
||||
The first line will add bullseye-backports repository.
|
||||
The backports repository is deactivated by default, so with the second line we explicityly state we want the backported version of zoneminder.
|
||||
The backports repository is deactivated by default, so with the second line we explicitly state we want the backported version of zoneminder.
|
||||
|
||||
::
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
An Easy To Use Docker Image
|
||||
===========================
|
||||
If you are interested in trying out ZoneMinder quickly, user Dan Landon maintains an easy to use docker image for ZoneMinder. With a few simple configuration changes, it also provides complete Event Notification Server and Machine Learning hook support. Please follow instructions in his repostory. He maintains two repositories:
|
||||
If you are interested in trying out ZoneMinder quickly, user Dan Landon maintains an easy to use docker image for ZoneMinder. With a few simple configuration changes, it also provides complete Event Notification Server and Machine Learning hook support. Please follow instructions in his repository. He maintains two repositories:
|
||||
|
||||
* If you want to run the latest stable release, please use his `zoneminder machine learning repository <https://github.com/dlandon/zoneminder.machine.learning>`__.
|
||||
* If you want to run the latest zoneminder master, please use his `zoneminder master repository <https://github.com/dlandon/zoneminder.master-docker>`__.
|
||||
|
|
|
@ -25,7 +25,7 @@ New installs
|
|||
|
||||
For systemd based linux distros, inspect the zoneminder service file, typically found under /lib/systemd/system. Changes may be required for multiserver to function correctly. For example, the service file may check for a running instance of mysql or mariadb running locally on the server. This check will need to be removed. Rather than edit the service file directly, copy the service file to /etc/systemd/system and edit the file in that location.
|
||||
|
||||
2. On each ZoneMinder server, edit zm.conf. Find the ZM_DB_HOST variable and set it to the name or ip address of your Database Server. Find the ZM_SERVER_HOST and enter a name for this ZoneMinder server. Use a name easily recognizable by you. This name is not used by ZoneMinder for dns or any other form of network conectivity.
|
||||
2. On each ZoneMinder server, edit zm.conf. Find the ZM_DB_HOST variable and set it to the name or ip address of your Database Server. Find the ZM_SERVER_HOST and enter a name for this ZoneMinder server. Use a name easily recognizable by you. This name is not used by ZoneMinder for dns or any other form of network connectivity.
|
||||
|
||||
3. Copy the file /usr/share/zoneminder/db/zm_create.sql from one of the ZoneMinder Servers to the machine targeted as the Database Server.
|
||||
|
||||
|
@ -52,7 +52,7 @@ Note that these commands are just an example and might not be secure enough for
|
|||
|
||||
.. sidebar :: Note
|
||||
|
||||
The location of the ZoneMinder events folder varies by distro. This folder is often found under "/var/lib/zoneminder/events" for RedHat based distros and "/var/cache/zoneminder/events" for Debain based distros. This folder is NOT a Symbolic Link!
|
||||
The location of the ZoneMinder events folder varies by distro. This folder is often found under "/var/lib/zoneminder/events" for RedHat based distros and "/var/cache/zoneminder/events" for Debian based distros. This folder is NOT a Symbolic Link!
|
||||
|
||||
10. Open your browser and point it to the web console on any of the ZoneMinder Servers (they will all be the same). Open Options, click the Servers tab,and populate this screen with all of your ZoneMinder Servers. Each server has a field for its name and its hostname. The name is what you used for ZM_SERVER_HOST in step 2. The hostname is the network name or ip address ZoneMinder should use.
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ Procedure
|
|||
|
||||
- If the desired distro is not in the first list, then open the `packpack project README <https://github.com/packpack/packpack/blob/master/README.md>`_ and check if the desired distro is theoretically supported. If it is, then continue to step 2 with the understanding that you are heading out into uncharted territory. There could be problems.
|
||||
|
||||
- If the desired distro does not appear in either list, then unfortuantely you cannot use the procedure described here.
|
||||
- If the desired distro does not appear in either list, then unfortunately you cannot use the procedure described here.
|
||||
|
||||
- If the desired distro architecture is arm, refer to `Appendix A - Enable Qemu On the Host`_ to enable qemu emulation on your amd64 host machine.
|
||||
|
||||
|
|
|
@ -73,7 +73,7 @@ Install ZoneMinder for Apache web server:
|
|||
|
||||
.. sidebar :: Note
|
||||
|
||||
A virtual package called zoneminder exists. This package contains no files and will pull in the zoneminder-httpd package for backwards compatiblity.
|
||||
A virtual package called zoneminder exists. This package contains no files and will pull in the zoneminder-httpd package for backwards compatibility.
|
||||
|
||||
::
|
||||
|
||||
|
@ -213,7 +213,7 @@ Now clone the ZoneMinder git repository from your home folder:
|
|||
|
||||
This will create a sub-folder called zoneminder, which will contain the latest development source code.
|
||||
|
||||
If you have previsouly cloned the ZoneMinder git repo and wish to update it to the most recent, then issue these commands instead:
|
||||
If you have previously cloned the ZoneMinder git repo and wish to update it to the most recent, then issue these commands instead:
|
||||
|
||||
::
|
||||
|
||||
|
|
|
@ -150,7 +150,7 @@ Orientation
|
|||
WebSite
|
||||
^^^^^^^
|
||||
|
||||
This Source Type allows one to configure an arbitrary website as a non-recordable, fully interactive, monitor in ZoneMinder. Note that sites with self-signed certificates will not display until the end user first manually navigates to the site and accpets the unsigned certificate. Also note that some sites will set an X-Frame option in the header, which discourages their site from being displayed within a frame. ZoneMinder will detect this condition and present a warning in the log. When this occurs, the end user can choose to install a browser plugin or extension to workaround this issue.
|
||||
This Source Type allows one to configure an arbitrary website as a non-recordable, fully interactive, monitor in ZoneMinder. Note that sites with self-signed certificates will not display until the end user first manually navigates to the site and accepts the unsigned certificate. Also note that some sites will set an X-Frame option in the header, which discourages their site from being displayed within a frame. ZoneMinder will detect this condition and present a warning in the log. When this occurs, the end user can choose to install a browser plugin or extension to workaround this issue.
|
||||
|
||||
Website URL
|
||||
Enter the full http or https url to the desired website.
|
||||
|
|
|
@ -34,7 +34,7 @@ Here is what the filter window looks like
|
|||
* Update used disk space: calculates how much disk space is currently taken by the event and updates the db record.
|
||||
* Create video for all matches: creates a video file of all the events that match
|
||||
* Create video for all matches: ffmpeg will be used to create a video file (mp4) out of all the stored jpgs if using jpeg storage.
|
||||
* Execute command on all matches: Allows you to execute any arbitrary command on the matched events. You can use replacement tokens as subsequent arguents to the command, the last argument will be the absolute path to the event, preceded by replacement arguents. eg: /usr/bin/script.sh %MN% will execute as /usr/bin/script.sh MonitorName /path/to/event. Please note that urls may contain characters like & that need quoting. So you may need to put quotes around them like /usr/bin/scrupt.sh "%MN%".
|
||||
* Execute command on all matches: Allows you to execute any arbitrary command on the matched events. You can use replacement tokens as subsequent arguments to the command, the last argument will be the absolute path to the event, preceded by replacement arguments. eg: /usr/bin/script.sh %MN% will execute as /usr/bin/script.sh MonitorName /path/to/event. Please note that urls may contain characters like & that need quoting. So you may need to put quotes around them like /usr/bin/scrupt.sh "%MN%".
|
||||
* Delete all matches: Deletes all the matched events.
|
||||
* Email details of all matches: Sends an email to the configured address with details about the event.
|
||||
* Copy all matches: copies the event files to another location, specified in the Copy To dropdown. The other location must be setup in the Storage Tab under options.
|
||||
|
|
|
@ -26,7 +26,7 @@ We strongly recommend enabling authentication right away. There are some situati
|
|||
* Enable OPT_USE_AUTH - this automatically switches to authentication mode with a default user (more on that later)
|
||||
* Select a random string for AUTH_HASH_SECRET - this is used to make the authentication logic more secure, so
|
||||
please generate your own string and make sure it is sufficiently randomized and long. Note that if you plan to use APIs with ZoneMinder (needed by zmNinja/other apps), it is mandatory that you have this field populated
|
||||
* The other options highlighed above should already be set, but if not, please make sure they are
|
||||
* The other options highlighted above should already be set, but if not, please make sure they are
|
||||
* Note that if you are planning to use zmNinja and plan to use ZM authentication, you must also:
|
||||
|
||||
* set ``AUTH_RELAY`` to hashed
|
||||
|
@ -112,7 +112,7 @@ This brings up the new monitor window:
|
|||
* In Analysis FPS, we've put in 5FPS here. Note that you should not put an FPS that is greater than the camera FPS. In my case, 5FPS is sufficient for my needs
|
||||
|
||||
.. note::
|
||||
Leave Maximum FPS and Alarm Maximum FPS **empty** if you are configuring an IP camera. In older versions of ZoneMinder, you were encouraged to put a value here, but that is no longer recommended. Infact, if you see your feed going much slower than the feed is supposed to go, or you get a lot of buffering/display issues, make sure this is empty. If you need to control camera FPS, please do it directly on the camera (via its own web interface, for example)
|
||||
Leave Maximum FPS and Alarm Maximum FPS **empty** if you are configuring an IP camera. In older versions of ZoneMinder, you were encouraged to put a value here, but that is no longer recommended. In fact, if you see your feed going much slower than the feed is supposed to go, or you get a lot of buffering/display issues, make sure this is empty. If you need to control camera FPS, please do it directly on the camera (via its own web interface, for example)
|
||||
|
||||
|
||||
* We are done for the General tab. Let's move to the next tab
|
||||
|
|
|
@ -2,7 +2,7 @@ Options - API
|
|||
---------------
|
||||
|
||||
.. note::
|
||||
The ZoneMinder web interface does not use APIs and therefore, the tokens discussed here don't apply to the ZoneMinder UI. These only appy to apps that use the ZoneMinder API, like zmNinja.
|
||||
The ZoneMinder web interface does not use APIs and therefore, the tokens discussed here don't apply to the ZoneMinder UI. These only apply to apps that use the ZoneMinder API, like zmNinja.
|
||||
|
||||
The API option screen allows you enable/disable APIs on a per user basis. Furthermore, it also allows you to "revoke" tokens allotted to users. Starting ZoneMinder 1.34, the API ecosystem was overhauled and we now support JWT tokens with a concept of refresh tokens and access tokens. This allows for authentication without the need for sending passwords with each authentication request. For a more detailed understanding of how this works, please refer to :doc:`/api`. Over time, more control will be added to this screen.
|
||||
|
||||
|
|
|
@ -43,4 +43,4 @@ WEB_H_EVENTS_VIEW, WEB_M_EVENTS_VIEW, WEB_L_EVENTS_VIEW - Stored events can be v
|
|||
|
||||
WEB_H_SHOW_PROGRESS, WEB_M_SHOW_PROGRESS, WEB_L_SHOW_PROGRESS - When viewing events an event navigation panel and progress bar is shown below the event itself. This allows you to jump to specific points in the event, but can can also dynamically update to display the current progress of the event replay itself. This progress is calculated from the actual event duration and is not directly linked to the replay itself, so on limited bandwidth connections may be out of step with the replay. This option allows you to turn off the progress display, whilst still keeping the navigation aspect, where bandwidth prevents it functioning effectively.
|
||||
|
||||
WEB_H_AJAX_TIMEOUT, WEB_M_AJAX_TIMEOUT, WEB_L_AJAX_TIMEOUT - The newer versions of the live feed and event views use Ajax to request information from the server and populate the views dynamically. This option allows you to specify a timeout if required after which requests are abandoned. A timeout may be necessary if requests would overwise hang such as on a slow connection. This would tend to consume a lot of browser memory and make the interface unresponsive. Ordinarily no requests should timeout so this setting should be set to a value greater than the slowest expected response. This value is in milliseconds but if set to zero then no timeout will be used.
|
||||
WEB_H_AJAX_TIMEOUT, WEB_M_AJAX_TIMEOUT, WEB_L_AJAX_TIMEOUT - The newer versions of the live feed and event views use Ajax to request information from the server and populate the views dynamically. This option allows you to specify a timeout if required after which requests are abandoned. A timeout may be necessary if requests would otherwise hang such as on a slow connection. This would tend to consume a lot of browser memory and make the interface unresponsive. Ordinarily no requests should timeout so this setting should be set to a value greater than the slowest expected response. This value is in milliseconds but if set to zero then no timeout will be used.
|
|
@ -22,9 +22,9 @@ STRICT_VIDEO_CONFIG - With some video devices errors can be reported in setting
|
|||
|
||||
LD_PRELOAD - Some older cameras require the use of the v4l1 compat library. This setting allows the setting of the path to the library, so that it can be loaded by zmdc.pl before launching zmc.
|
||||
|
||||
V4L_MULTI_BUFFER - Performance when using Video 4 Linux devices is usually best if multiple buffers are used allowing the next image to be captured while the previous one is being processed. If you have multiple devices on a card sharing one input that requires switching then this approach can sometimes cause frames from one source to be mixed up with frames from another. Switching this option off prevents multi buffering resulting in slower but more stable image capture. This option is ignored for non-local cameras or if only one input is present on a capture chip. This option addresses a similar problem to the ZM_CAPTURES_PER_FRAME option and you should normally change the value of only one of the options at a time. If you have different capture cards that need different values you can ovveride them in each individual monitor on the source page.
|
||||
V4L_MULTI_BUFFER - Performance when using Video 4 Linux devices is usually best if multiple buffers are used allowing the next image to be captured while the previous one is being processed. If you have multiple devices on a card sharing one input that requires switching then this approach can sometimes cause frames from one source to be mixed up with frames from another. Switching this option off prevents multi buffering resulting in slower but more stable image capture. This option is ignored for non-local cameras or if only one input is present on a capture chip. This option addresses a similar problem to the ZM_CAPTURES_PER_FRAME option and you should normally change the value of only one of the options at a time. If you have different capture cards that need different values you can override them in each individual monitor on the source page.
|
||||
|
||||
CAPTURES_PER_FRAME - If you are using cameras attached to a video capture card which forces multiple inputs to share one capture chip, it can sometimes produce images with interlaced frames reversed resulting in poor image quality and a distinctive comb edge appearance. Increasing this setting allows you to force additional image captures before one is selected as the captured frame. This allows the capture hardware to 'settle down' and produce better quality images at the price of lesser capture rates. This option has no effect on (a) network cameras, or (b) where multiple inputs do not share a capture chip. This option addresses a similar problem to the ZM_V4L_MULTI_BUFFER option and you should normally change the value of only one of the options at a time. If you have different capture cards that need different values you can ovveride them in each individual monitor on the source page.
|
||||
CAPTURES_PER_FRAME - If you are using cameras attached to a video capture card which forces multiple inputs to share one capture chip, it can sometimes produce images with interlaced frames reversed resulting in poor image quality and a distinctive comb edge appearance. Increasing this setting allows you to force additional image captures before one is selected as the captured frame. This allows the capture hardware to 'settle down' and produce better quality images at the price of lesser capture rates. This option has no effect on (a) network cameras, or (b) where multiple inputs do not share a capture chip. This option addresses a similar problem to the ZM_V4L_MULTI_BUFFER option and you should normally change the value of only one of the options at a time. If you have different capture cards that need different values you can override them in each individual monitor on the source page.
|
||||
|
||||
FORCED_ALARM_SCORE - The 'zmu' utility can be used to force an alarm on a monitor rather than rely on the motion detection algorithms. This option determines what score to give these alarms to distinguish them from regular ones. It must be 255 or less.
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ Options - Storage
|
|||
|
||||
Storage tab is used to setup storage areas for recorded Events. To add a new area use the Add New Storage button.
|
||||
|
||||
By default storage on local drive is automatically set up on installion. When no area is specified events will be
|
||||
By default storage on local drive is automatically set up on installation. When no area is specified events will be
|
||||
stored to a default built-in location, which for example on Ubuntu is /var/cache/zoneminder/events.
|
||||
|
||||
Name: Storage names - can be anything
|
||||
|
|
|
@ -22,7 +22,7 @@ AUTH_RELAY - When ZoneMinder is running in authenticated mode it can pass user d
|
|||
|
||||
AUTH_HASH_SECRET - When ZoneMinder is running in hashed authenticated mode it is necessary to generate hashed strings containing encrypted sensitive information such as usernames and passwords. Although these strings are reasonably secure the addition of a random secret increases security substantially. Note that if you are using the new token based APIs, then this field is mandatory with ZM 1.34 and above.
|
||||
|
||||
AUTH_HASH_IPS - When ZoneMinder is running in hashed authenticated mode it can optionally include the requesting IP address in the resultant hash. This adds an extra level of security as only requests from that address may use that authentication key. However in some circumstances, such as access over mobile networks, the requesting address can change for each request which will cause most requests to fail. This option allows you to control whether IP addresses are included in the authentication hash on your system. If you experience intermitent problems with authentication, switching this option off may help. It is recommended you keep this off if you use mobile apps like zmNinja over mobile carrier networks - several APNs change the IP very frequently which may result in authentication failures.
|
||||
AUTH_HASH_IPS - When ZoneMinder is running in hashed authenticated mode it can optionally include the requesting IP address in the resultant hash. This adds an extra level of security as only requests from that address may use that authentication key. However in some circumstances, such as access over mobile networks, the requesting address can change for each request which will cause most requests to fail. This option allows you to control whether IP addresses are included in the authentication hash on your system. If you experience intermittent problems with authentication, switching this option off may help. It is recommended you keep this off if you use mobile apps like zmNinja over mobile carrier networks - several APNs change the IP very frequently which may result in authentication failures.
|
||||
|
||||
AUTH_HASH_TTL - Time before ZM auth will expire (does not apply to API tokens). The default has traditionally been 2 hours. A new hash will automatically be regenerated at half this value.
|
||||
|
||||
|
|
|
@ -570,7 +570,7 @@ class tev__Capabilities
|
|||
/// Attribute "EventBrokerProtocols" of type xs:string.
|
||||
@ std::string* EventBrokerProtocols 0; ///< Optional attribute.
|
||||
/// <PRE><BLOCKQUOTE>
|
||||
/// 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.
|
||||
/// </BLOCKQUOTE></PRE>
|
||||
///
|
||||
/// Attribute "MaxEventBrokers" of type xs:int.
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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`,"
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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"<<endl;
|
||||
// clog<<__FUNCTION__<<" Could not find corresponding sensor name"<<endl;
|
||||
// } else {
|
||||
//
|
||||
// }
|
||||
|
|
|
@ -1007,7 +1007,7 @@ int RemoteCameraHttp::GetResponse() {
|
|||
content_length = start_ptr - (char *)buffer;
|
||||
Debug(2, "Got end of image by pattern (crlf--), content-length = %d", content_length);
|
||||
} else {
|
||||
Debug(2, "Did not find end of image by patten (crlf--) yet, content-length = %d", content_length);
|
||||
Debug(2, "Did not find end of image by pattern (crlf--) yet, content-length = %d", content_length);
|
||||
}
|
||||
} // end if MULTI_IMAGE
|
||||
} else {
|
||||
|
|
|
@ -54,7 +54,7 @@ class ZoneMinderDeviceSource: public FramedSource {
|
|||
// split packet in frames
|
||||
virtual std::list< std::pair<unsigned char*, size_t> > 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);
|
||||
|
|
|
@ -53,7 +53,7 @@ class H264_ZoneMinderFifoSource : public H26X_ZoneMinderFifoSource {
|
|||
const std::string &fifo
|
||||
);
|
||||
|
||||
// overide ZoneMinderFifoSource
|
||||
// override ZoneMinderFifoSource
|
||||
virtual std::list< std::pair<unsigned char*,size_t> > 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<unsigned char*,size_t> > splitFrames(unsigned char* frame, size_t &frameSize) override;
|
||||
|
||||
protected:
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue