Added jpeg quality config settings.
git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@444 e3e1d417-86f3-4887-817a-d78f3d33393f
This commit is contained in:
parent
9da5287549
commit
f6f3f1c158
|
@ -20,27 +20,32 @@
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
#define ZM_VERSION "<from zmconfig>" // ZoneMinder verson number
|
#define ZM_VERSION "<from zmconfig>" // ZoneMinder verson number
|
||||||
#define ZM_DB_SERVER "<from zmconfig>" // Machine on which the database server is running (from zmconfig)
|
#define ZM_DB_SERVER "<from zmconfig>" // Machine on which the database server is running
|
||||||
#define ZM_DB_NAME "<from zmconfig>" // Database containing the tables (from zmconfig)
|
#define ZM_DB_NAME "<from zmconfig>" // Database containing the tables
|
||||||
#define ZM_DB_USERA "<from zmconfig>" // Privileged DB user name, needs at least select, insert, update and delete privileges (from zmconfig)
|
#define ZM_DB_USERA "<from zmconfig>" // Privileged DB user name, needs at least select, insert, update and delete privileges
|
||||||
#define ZM_DB_PASSA "<from zmconfig>" // Privileged DB user password (from zmconfig)
|
#define ZM_DB_PASSA "<from zmconfig>" // Privileged DB user password
|
||||||
#define ZM_DB_USERB "<from zmconfig>" // Unprivileged DB user name, need just select privilege. (from zmconfig)
|
#define ZM_DB_USERB "<from zmconfig>" // Unprivileged DB user name, need just select privilege.
|
||||||
#define ZM_DB_PASSB "<from zmconfig>" // Unprivileged DB user password (from zmconfig)
|
#define ZM_DB_PASSB "<from zmconfig>" // Unprivileged DB user password
|
||||||
|
|
||||||
#define ZM_HTTP_VERSION "<from zmconfig>" // The version of HTTP that ZoneMinder will use to connect (from zmconfig)
|
#define ZM_HTTP_VERSION "<from zmconfig>" // The version of HTTP that ZoneMinder will use to connect
|
||||||
#define ZM_HTTP_UA "<from zmconfig>" // The user agent that ZoneMinder uses to identify itself (from zmconfig)
|
#define ZM_HTTP_UA "<from zmconfig>" // The user agent that ZoneMinder uses to identify itself
|
||||||
#define ZM_HTTP_TIMEOUT <from zmconfig> // How long ZoneMinder waits before giving up on images (millseconds) (from zmconfig)
|
#define ZM_HTTP_TIMEOUT <from zmconfig> // How long ZoneMinder waits before giving up on images (millseconds)
|
||||||
|
|
||||||
#define ZM_SHM_KEY <from zmconfig> // Shared memory key to use, only change if it clashes with another application (from zmconfig)
|
#define ZM_SHM_KEY <from zmconfig> // Shared memory key to use, only change if it clashes with another application
|
||||||
|
|
||||||
#define ZM_DIR_EVENTS "<from zmconfig>" // Local path to where events directory lives (from zmconfig)
|
#define ZM_DIR_EVENTS "<from zmconfig>" // Local path to where events directory lives
|
||||||
|
|
||||||
#define ZM_FORCED_ALARM_SCORE <from zmconfig> // Score to give X10 forced alarms (from zmconfig)
|
#define ZM_FORCED_ALARM_SCORE <from zmconfig> // Score to give X10 forced alarms
|
||||||
|
|
||||||
#define ZM_RECORD_EVENT_STATS <from zmconfig> // Whether to record event statistical information, change to no if too slow (from zmconfig)
|
#define ZM_RECORD_EVENT_STATS <from zmconfig> // Whether to record event statistical information, change to no if too slow
|
||||||
|
|
||||||
#define ZM_STRICT_VIDEO_CONFIG <from zmconfig> // Whether to allow errors in setting video config to be fatal
|
#define ZM_STRICT_VIDEO_CONFIG <from zmconfig> // Whether to allow errors in setting video config to be fatal
|
||||||
#define ZM_LOCAL_BGR_INVERT <from zmconfig> // Invert BGR colours to RGB
|
#define ZM_LOCAL_BGR_INVERT <from zmconfig> // Invert BGR colours to RGB
|
||||||
#define ZM_BLEND_ALARMED_IMAGES <from zmconfig> // Whether alarmed images are blended to update the reference image
|
|
||||||
#define ZM_NO_MAX_FPS_ON_ALARM <from zmconfig> // Should any Maximum FPS be ignored if an alarm occurs
|
#define ZM_JPEG_FILE_QUALITY <from zmconfig> // Set the JPEG quality setting for the saved event files
|
||||||
|
#define ZM_JPEG_IMAGE_QUALITY <from zmconfig> // Set the JPEG quality setting for the streamed 'live' images
|
||||||
|
|
||||||
|
#define ZM_BLEND_ALARMED_IMAGES <from zmconfig> // Whether alarmed images are blended to update the reference image
|
||||||
|
|
||||||
|
#define ZM_NO_MAX_FPS_ON_ALARM <from zmconfig> // Should any Maximum FPS be ignored if an alarm occurs
|
||||||
|
|
||||||
|
|
|
@ -123,7 +123,7 @@ void Image::WriteJpeg( const char *filename ) const
|
||||||
}
|
}
|
||||||
jpeg_set_defaults(&cinfo);
|
jpeg_set_defaults(&cinfo);
|
||||||
cinfo.dct_method = JDCT_FASTEST;
|
cinfo.dct_method = JDCT_FASTEST;
|
||||||
//jpeg_set_quality(&cinfo, 100, false);
|
jpeg_set_quality(&cinfo, ZM_JPEG_FILE_QUALITY, false);
|
||||||
jpeg_start_compress(&cinfo, TRUE);
|
jpeg_start_compress(&cinfo, TRUE);
|
||||||
|
|
||||||
JSAMPROW row_pointer; /* pointer to a single row */
|
JSAMPROW row_pointer; /* pointer to a single row */
|
||||||
|
@ -198,7 +198,7 @@ void Image::EncodeJpeg( JOCTET *outbuffer, int *outbuffer_size ) const
|
||||||
}
|
}
|
||||||
jpeg_set_defaults(&cinfo);
|
jpeg_set_defaults(&cinfo);
|
||||||
cinfo.dct_method = JDCT_FASTEST;
|
cinfo.dct_method = JDCT_FASTEST;
|
||||||
//jpeg_set_quality(&cinfo, 100, false);
|
jpeg_set_quality(&cinfo, ZM_JPEG_IMAGE_QUALITY, false);
|
||||||
jpeg_start_compress(&cinfo, TRUE);
|
jpeg_start_compress(&cinfo, TRUE);
|
||||||
|
|
||||||
JSAMPROW row_pointer; /* pointer to a single row */
|
JSAMPROW row_pointer; /* pointer to a single row */
|
||||||
|
|
|
@ -219,6 +219,20 @@ my @options =
|
||||||
help => "Some cameras or video cards capture images in BGR (Blue-Green-Red) order even when the paletter says RGB. If you see strange colours casts on your images then it may be worth trying this option to see if that corrects the issue. Note this option will apply only to local cameras and not those over a network.",
|
help => "Some cameras or video cards capture images in BGR (Blue-Green-Red) order even when the paletter says RGB. If you see strange colours casts on your images then it may be worth trying this option to see if that corrects the issue. Note this option will apply only to local cameras and not those over a network.",
|
||||||
type => $types{boolean},
|
type => $types{boolean},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name => "ZM_JPEG_FILE_QUALITY",
|
||||||
|
default => "70",
|
||||||
|
description => "Set the JPEG quality setting for the saved event files (1-100)",
|
||||||
|
help => "When ZoneMinder detects an event it will save the images associated with that event to files. These files are in the JPEG format and can be viewed or streamed later. This option specifies what image quality should be used to save these files. A higher number means better quality but less compression so will take up more disk space and take longer to view over a slow connection. By contrast a low number means smaller, quicker to view, files but at the price of lower quality images.",
|
||||||
|
type => $types{integer},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name => "ZM_JPEG_IMAGE_QUALITY",
|
||||||
|
default => "70",
|
||||||
|
description => "Set the JPEG quality setting for the streamed 'live' images (1-100)",
|
||||||
|
help => "When viewing a 'live' stream for a monitor ZoneMinder will grab an image from the buffer and encode it into JPEG format before sending it. This option specifies what image quality should be used to encode these images. A higher number means better quality but less compression so will take longer to view over a slow connection. By contrast a low number means quicker to view files but at the price of lower quality images. This option does not apply when viewing still images as these are just read from disk and so will be encoded at the quality specified by the previous option.",
|
||||||
|
type => $types{integer},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name => "ZM_BLEND_ALARMED_IMAGES",
|
name => "ZM_BLEND_ALARMED_IMAGES",
|
||||||
default => "yes",
|
default => "yes",
|
||||||
|
|
Loading…
Reference in New Issue