From 9fb794f4d0cfba96521c9de264e487a82361ff7b Mon Sep 17 00:00:00 2001 From: m-bene Date: Fri, 25 Apr 2014 13:23:06 +0200 Subject: [PATCH 01/38] add option field zo monitors --- db/zm_update-1.27.1.sql | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/db/zm_update-1.27.1.sql b/db/zm_update-1.27.1.sql index f9f62079f..df2029fbf 100644 --- a/db/zm_update-1.27.1.sql +++ b/db/zm_update-1.27.1.sql @@ -155,3 +155,21 @@ SET @s = (SELECT IF( PREPARE stmt FROM @s; EXECUTE stmt; + +-- +-- Add Monitor Options field; used for specifying Ffmpeg AVoptions like rtsp_transport tcp +-- +SET @s = (SELECT IF( + (SELECT COUNT(*) + FROM INFORMATION_SCHEMA.COLUMNS + WHERE table_name = 'Monitors' + AND table_schema = DATABASE() + AND column_name = 'Options' + ) > 0, +"SELECT 'Column Options already exists in Monitors'", +"ALTER TABLE `Monitors` ADD `Options` varchar(255) not null default '' AFTER `Path`" +)); + +PREPARE stmt FROM @s; +EXECUTE stmt; + From 1d9d84cc4990bcccafc8f58c84f23b0b3cf36317 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Wed, 30 Apr 2014 10:10:34 -0400 Subject: [PATCH 02/38] max executable --- utils/zm-alarm.pl | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 utils/zm-alarm.pl diff --git a/utils/zm-alarm.pl b/utils/zm-alarm.pl old mode 100644 new mode 100755 From ceff5a98ea007437af89dde854d81dda4c6636c8 Mon Sep 17 00:00:00 2001 From: m-bene Date: Mon, 5 May 2014 13:29:12 +0200 Subject: [PATCH 03/38] add generic Option field to ffmpeg and libvlc cameras --- db/zm_update-1.27.1.sql | 2 +- src/zm_ffmpeg_camera.cpp | 18 ++++++++++++++--- src/zm_ffmpeg_camera.h | 4 +++- src/zm_libvlc_camera.cpp | 22 +++++++++++++++++---- src/zm_libvlc_camera.h | 6 ++++-- src/zm_monitor.cpp | 26 ++++++++----------------- src/zm_monitor.h | 1 + src/zm_utils.cpp | 30 +++++++++++++++++++++++++++++ src/zm_utils.h | 4 ++++ web/skins/classic/views/monitor.php | 16 ++++++++++++++- web/skins/flat/views/monitor.php | 16 ++++++++++++++- 11 files changed, 114 insertions(+), 31 deletions(-) diff --git a/db/zm_update-1.27.1.sql b/db/zm_update-1.27.1.sql index df2029fbf..b234285bf 100644 --- a/db/zm_update-1.27.1.sql +++ b/db/zm_update-1.27.1.sql @@ -157,7 +157,7 @@ PREPARE stmt FROM @s; EXECUTE stmt; -- --- Add Monitor Options field; used for specifying Ffmpeg AVoptions like rtsp_transport tcp +-- Add Monitor Options field; used for specifying Ffmpeg AVoptions like rtsp_transport http or libVLC options -- SET @s = (SELECT IF( (SELECT COUNT(*) diff --git a/src/zm_ffmpeg_camera.cpp b/src/zm_ffmpeg_camera.cpp index c69907d9c..8db581c72 100644 --- a/src/zm_ffmpeg_camera.cpp +++ b/src/zm_ffmpeg_camera.cpp @@ -23,9 +23,10 @@ #include "zm_ffmpeg_camera.h" -FfmpegCamera::FfmpegCamera( int p_id, const std::string &p_path, int p_width, int p_height, int p_colours, int p_brightness, int p_contrast, int p_hue, int p_colour, bool p_capture ) : +FfmpegCamera::FfmpegCamera( int p_id, const std::string &p_path, const std::string &p_options, int p_width, int p_height, int p_colours, int p_brightness, int p_contrast, int p_hue, int p_colour, bool p_capture ) : Camera( p_id, FFMPEG_SRC, p_width, p_height, p_colours, ZM_SUBPIX_ORDER_DEFAULT_FOR_COLOUR(p_colours), p_brightness, p_contrast, p_hue, p_colour, p_capture ), - mPath( p_path ) + mPath( p_path ), + mOptions( p_options ) { if ( capture ) { @@ -110,12 +111,23 @@ void FfmpegCamera::Terminate() int FfmpegCamera::PrimeCapture() { Info( "Priming capture from %s", mPath.c_str() ); + + // Open the input, not necessarily a file #if LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(53, 4, 0) if ( av_open_input_file( &mFormatContext, mPath.c_str(), NULL, 0, NULL ) !=0 ) #else - if ( avformat_open_input( &mFormatContext, mPath.c_str(), NULL, NULL ) !=0 ) + // Handle options + AVDictionary *opts = 0; + StringVector opVect = split(Options(), ","); + for (int i=0; i 1) + av_dict_set(&opts, trimSpaces(parts[0]), trimSpaces(parts[1])); + } + if ( avformat_open_input( &mFormatContext, mPath.c_str(), NULL, &opts ) !=0 ) #endif Fatal( "Unable to open input %s due to: %s", mPath.c_str(), strerror(errno) ); diff --git a/src/zm_ffmpeg_camera.h b/src/zm_ffmpeg_camera.h index 3b24c4d6f..0da0237da 100644 --- a/src/zm_ffmpeg_camera.h +++ b/src/zm_ffmpeg_camera.h @@ -34,6 +34,7 @@ class FfmpegCamera : public Camera { protected: std::string mPath; + std::string mOptions; int frameCount; @@ -52,10 +53,11 @@ protected: #endif public: - FfmpegCamera( int p_id, const std::string &path, int p_width, int p_height, int p_colours, int p_brightness, int p_contrast, int p_hue, int p_colour, bool p_capture ); + FfmpegCamera( int p_id, const std::string &path, const std::string &p_options, int p_width, int p_height, int p_colours, int p_brightness, int p_contrast, int p_hue, int p_colour, bool p_capture ); ~FfmpegCamera(); const std::string &Path() const { return( mPath ); } + const std::string &Options() const { return( mOptions ); } void Initialise(); void Terminate(); diff --git a/src/zm_libvlc_camera.cpp b/src/zm_libvlc_camera.cpp index 8c56a5346..f127fe3a0 100644 --- a/src/zm_libvlc_camera.cpp +++ b/src/zm_libvlc_camera.cpp @@ -61,9 +61,10 @@ void LibvlcUnlockBuffer(void* opaque, void* picture, void *const *planes) } } -LibvlcCamera::LibvlcCamera( int p_id, const std::string &p_path, int p_width, int p_height, int p_colours, int p_brightness, int p_contrast, int p_hue, int p_colour, bool p_capture ) : +LibvlcCamera::LibvlcCamera( int p_id, const std::string &p_path, const std::string &p_options, int p_width, int p_height, int p_colours, int p_brightness, int p_contrast, int p_hue, int p_colour, bool p_capture ) : Camera( p_id, LIBVLC_SRC, p_width, p_height, p_colours, ZM_SUBPIX_ORDER_DEFAULT_FOR_COLOUR(p_colours), p_brightness, p_contrast, p_hue, p_colour, p_capture ), - mPath( p_path ) + mPath( p_path ), + mOptions( p_options ) { mLibvlcInstance = NULL; mLibvlcMedia = NULL; @@ -115,6 +116,10 @@ LibvlcCamera::~LibvlcCamera() libvlc_release(mLibvlcInstance); mLibvlcInstance = NULL; } + if (mOptArgV != NULL) + { + delete[] mOptArgV; + } } void LibvlcCamera::Initialise() @@ -137,8 +142,17 @@ void LibvlcCamera::Terminate() int LibvlcCamera::PrimeCapture() { Info("Priming capture from %s", mPath.c_str()); - - mLibvlcInstance = libvlc_new (0, NULL); + + StringVector opVect = split(Options(), ","); + + if (opVect.size() > 0) + { + mOptArgV = new char*[opVect.size()];cmd + for (int i=0; i< opVect.size(); i++) + mOptArgV[i] = opVect[i].c_str(); + } + + mLibvlcInstance = libvlc_new (opVect.size(), optArgV); if(mLibvlcInstance == NULL) Fatal("Unable to create libvlc instance due to: %s", libvlc_errmsg()); diff --git a/src/zm_libvlc_camera.h b/src/zm_libvlc_camera.h index 0e5d94821..75d97ad72 100644 --- a/src/zm_libvlc_camera.h +++ b/src/zm_libvlc_camera.h @@ -45,7 +45,8 @@ class LibvlcCamera : public Camera { protected: std::string mPath; - + std::string mOptions; + unisgned char **mOptArgV; LibvlcPrivateData mLibvlcData; std::string mTargetChroma; uint8_t mBpp; @@ -55,10 +56,11 @@ protected: libvlc_media_player_t *mLibvlcMediaPlayer; public: - LibvlcCamera( int p_id, const std::string &path, int p_width, int p_height, int p_colours, int p_brightness, int p_contrast, int p_hue, int p_colour, bool p_capture ); + LibvlcCamera( int p_id, const std::string &path, const std::string &p_options, int p_width, int p_height, int p_colours, int p_brightness, int p_contrast, int p_hue, int p_colour, bool p_capture ); ~LibvlcCamera(); const std::string &Path() const { return( mPath ); } + const std::string &Options() const { return( mOptions ); } void Initialise(); void Terminate(); diff --git a/src/zm_monitor.cpp b/src/zm_monitor.cpp index 9b84ced6b..479ea6c4b 100644 --- a/src/zm_monitor.cpp +++ b/src/zm_monitor.cpp @@ -56,21 +56,6 @@ #endif // ZM_MEM_MAPPED //============================================================================= -std::string trimSpaces(std::string str) -{ - // Trim Both leading and trailing spaces - size_t startpos = str.find_first_not_of(" \t"); // Find the first character position after excluding leading blank spaces - size_t endpos = str.find_last_not_of(" \t"); // Find the first character position from reverse af - - // if all spaces or empty return an empty string - if(( std::string::npos == startpos ) || ( std::string::npos == endpos)) - { - return std::string(""); - } - else - return str.substr( startpos, endpos-startpos+1 ); -} - std::vector split(const std::string &s, char delim) { std::vector elems; std::stringstream ss(s); @@ -2306,11 +2291,11 @@ int Monitor::LoadFfmpegMonitors( const char *file, Monitor **&monitors, Purpose static char sql[ZM_SQL_MED_BUFSIZ]; if ( !file[0] ) { - strncpy( sql, "select Id, Name, Function+0, Enabled, LinkedMonitors, Path, Width, Height, Colours, Palette, Orientation+0, Deinterlacing, Brightness, Contrast, Hue, Colour, EventPrefix, LabelFormat, LabelX, LabelY, ImageBufferCount, WarmupCount, PreEventCount, PostEventCount, StreamReplayBuffer, AlarmFrameCount, SectionLength, FrameSkip, MotionFrameSkip, MaxFPS, AlarmMaxFPS, FPSReportInterval, RefBlendPerc, AlarmRefBlendPerc, TrackMotion from Monitors where Function != 'None' and Type = 'Ffmpeg'", sizeof(sql) ); + strncpy( sql, "select Id, Name, Function+0, Enabled, LinkedMonitors, Path, Options, Width, Height, Colours, Palette, Orientation+0, Deinterlacing, Brightness, Contrast, Hue, Colour, EventPrefix, LabelFormat, LabelX, LabelY, ImageBufferCount, WarmupCount, PreEventCount, PostEventCount, StreamReplayBuffer, AlarmFrameCount, SectionLength, FrameSkip, MotionFrameSkip, MaxFPS, AlarmMaxFPS, FPSReportInterval, RefBlendPerc, AlarmRefBlendPerc, TrackMotion from Monitors where Function != 'None' and Type = 'Ffmpeg'", sizeof(sql) ); } else { - snprintf( sql, sizeof(sql), "select Id, Name, Function+0, Enabled, LinkedMonitors, Path, Width, Height, Colours, Palette, Orientation+0, Deinterlacing, Brightness, Contrast, Hue, Colour, EventPrefix, LabelFormat, LabelX, LabelY, ImageBufferCount, WarmupCount, PreEventCount, PostEventCount, StreamReplayBuffer, AlarmFrameCount, SectionLength, FrameSkip, MotionFrameSkip, MaxFPS, AlarmMaxFPS, FPSReportInterval, RefBlendPerc, AlarmRefBlendPerc, TrackMotion from Monitors where Function != 'None' and Type = 'Ffmpeg' and Path = '%s'", file ); + snprintf( sql, sizeof(sql), "select Id, Name, Function+0, Enabled, LinkedMonitors, Path, Options, Width, Height, Colours, Palette, Orientation+0, Deinterlacing, Brightness, Contrast, Hue, Colour, EventPrefix, LabelFormat, LabelX, LabelY, ImageBufferCount, WarmupCount, PreEventCount, PostEventCount, StreamReplayBuffer, AlarmFrameCount, SectionLength, FrameSkip, MotionFrameSkip, MaxFPS, AlarmMaxFPS, FPSReportInterval, RefBlendPerc, AlarmRefBlendPerc, TrackMotion from Monitors where Function != 'None' and Type = 'Ffmpeg' and Path = '%s'", file ); } if ( mysql_query( &dbconn, sql ) ) { @@ -2339,6 +2324,7 @@ int Monitor::LoadFfmpegMonitors( const char *file, Monitor **&monitors, Purpose const char *linked_monitors = dbrow[col]; col++; const char *path = dbrow[col]; col++; + const char *options = dbrow[col]; col++; int width = atoi(dbrow[col]); col++; int height = atoi(dbrow[col]); col++; @@ -2379,6 +2365,7 @@ int Monitor::LoadFfmpegMonitors( const char *file, Monitor **&monitors, Purpose Camera *camera = new FfmpegCamera( id, path, // File + options, cam_width, cam_height, colours, @@ -2441,7 +2428,7 @@ int Monitor::LoadFfmpegMonitors( const char *file, Monitor **&monitors, Purpose Monitor *Monitor::Load( int id, bool load_zones, Purpose purpose ) { static char sql[ZM_SQL_MED_BUFSIZ]; - snprintf( sql, sizeof(sql), "select Id, Name, Type, Function+0, Enabled, LinkedMonitors, Device, Channel, Format, Protocol, Method, Host, Port, Path, User, Pass, Width, Height, Colours, Palette, Orientation+0, Deinterlacing, Brightness, Contrast, Hue, Colour, EventPrefix, LabelFormat, LabelX, LabelY, ImageBufferCount, WarmupCount, PreEventCount, PostEventCount, StreamReplayBuffer, AlarmFrameCount, SectionLength, FrameSkip, MotionFrameSkip, MaxFPS, AlarmMaxFPS, FPSReportInterval, RefBlendPerc, AlarmRefBlendPerc, TrackMotion, SignalCheckColour from Monitors where Id = %d", id ); + snprintf( sql, sizeof(sql), "select Id, Name, Type, Function+0, Enabled, LinkedMonitors, Device, Channel, Format, Protocol, Method, Host, Port, Path, Options, User, Pass, Width, Height, Colours, Palette, Orientation+0, Deinterlacing, Brightness, Contrast, Hue, Colour, EventPrefix, LabelFormat, LabelX, LabelY, ImageBufferCount, WarmupCount, PreEventCount, PostEventCount, StreamReplayBuffer, AlarmFrameCount, SectionLength, FrameSkip, MotionFrameSkip, MaxFPS, AlarmMaxFPS, FPSReportInterval, RefBlendPerc, AlarmRefBlendPerc, TrackMotion, SignalCheckColour from Monitors where Id = %d", id ); if ( mysql_query( &dbconn, sql ) ) { Error( "Can't run query: %s", mysql_error( &dbconn ) ); @@ -2477,6 +2464,7 @@ Monitor *Monitor::Load( int id, bool load_zones, Purpose purpose ) std::string host = dbrow[col]; col++; std::string port = dbrow[col]; col++; std::string path = dbrow[col]; col++; + std::string options = dbrow[col]; col++; std::string user = dbrow[col]; col++; std::string pass = dbrow[col]; col++; @@ -2617,6 +2605,7 @@ Monitor *Monitor::Load( int id, bool load_zones, Purpose purpose ) camera = new FfmpegCamera( id, path.c_str(), + options, cam_width, cam_height, colours, @@ -2636,6 +2625,7 @@ Monitor *Monitor::Load( int id, bool load_zones, Purpose purpose ) camera = new LibvlcCamera( id, path.c_str(), + options, cam_width, cam_height, colours, diff --git a/src/zm_monitor.h b/src/zm_monitor.h index 2576c3cd0..1347f283d 100644 --- a/src/zm_monitor.h +++ b/src/zm_monitor.h @@ -30,6 +30,7 @@ #include "zm_zone.h" #include "zm_event.h" #include "zm_camera.h" +#include "zm_utils.h" #include "zm_image_analyser.h" diff --git a/src/zm_utils.cpp b/src/zm_utils.cpp index d2938b7cd..51beb377d 100644 --- a/src/zm_utils.cpp +++ b/src/zm_utils.cpp @@ -27,6 +27,36 @@ unsigned int sseversion = 0; +std::string trimSet(std::string str, std::string trimset) { + // Trim Both leading and trailing sets + size_t startpos = str.find_first_not_of(trimset); // Find the first character position after excluding leading blank spaces + size_t endpos = str.find_last_not_of(trimset); // Find the first character position from reverse af + + // if all spaces or empty return an empty string + if(( std::string::npos == startpos ) || ( std::string::npos == endpos)) + { + return std::string(""); + } + else + return str.substr( startpos, endpos-startpos+1 ); +} + +std::string trimSpaces(std::string str) +{ + return trimSet(str, " \t"); +} + +std::string replaceAll(std::string str, std::string from, std::string to) { + if(from.empty()) + return str; + size_t start_pos = 0; + while((start_pos = str.find(from, start_pos)) != std::string::npos) { + str.replace(start_pos, from.length(), to); + start_pos += to.length(); // In case 'to' contains 'from', like replacing 'x' with 'yx' + } + return str; +} + const std::string stringtf( const char *format, ... ) { va_list ap; diff --git a/src/zm_utils.h b/src/zm_utils.h index 2be9b373b..6536024a9 100644 --- a/src/zm_utils.h +++ b/src/zm_utils.h @@ -27,6 +27,10 @@ typedef std::vector StringVector; +std::string trimSpaces(std::string str); +std::string trimSet(std::string str, std::string trimset); +std::string replaceAll(std::string str, std::string from, std::string to); + const std::string stringtf( const char *format, ... ); const std::string stringtf( const std::string &format, ... ); diff --git a/web/skins/classic/views/monitor.php b/web/skins/classic/views/monitor.php index 2417c3dd7..03e444c71 100644 --- a/web/skins/classic/views/monitor.php +++ b/web/skins/classic/views/monitor.php @@ -63,6 +63,7 @@ else 'Method' => "", 'Host' => "", 'Path' => "", + 'Options' => "", 'Port' => "80", 'User' => "", 'Pass' => "", @@ -506,6 +507,12 @@ if ( $tab != 'source' || ($newMonitor['Type'] != 'Local' && $newMonitor['Type'] + + @@ -722,7 +729,7 @@ switch ( $tab ) @@ -734,6 +741,13 @@ switch ( $tab ) + + + diff --git a/web/skins/flat/views/monitor.php b/web/skins/flat/views/monitor.php index 2752bbb8c..42d122886 100644 --- a/web/skins/flat/views/monitor.php +++ b/web/skins/flat/views/monitor.php @@ -63,6 +63,7 @@ else 'Method' => "", 'Host' => "", 'Path' => "", + 'Options' => "", 'Port' => "80", 'User' => "", 'Pass' => "", @@ -507,6 +508,12 @@ if ( $tab != 'source' || ($newMonitor['Type'] != 'Local' && $newMonitor['Type'] + + @@ -723,7 +730,7 @@ switch ( $tab ) @@ -735,6 +742,13 @@ switch ( $tab ) + + + From ae0ee9b3b3a2bd9f4f8e890bd647c967d45dbb31 Mon Sep 17 00:00:00 2001 From: m-bene Date: Mon, 5 May 2014 15:54:13 +0200 Subject: [PATCH 04/38] testing/fixing --- src/zm_ffmpeg_camera.cpp | 4 ++-- src/zm_libvlc_camera.cpp | 11 +++++++---- src/zm_libvlc_camera.h | 2 +- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/zm_ffmpeg_camera.cpp b/src/zm_ffmpeg_camera.cpp index 8db581c72..cbe128b11 100644 --- a/src/zm_ffmpeg_camera.cpp +++ b/src/zm_ffmpeg_camera.cpp @@ -121,11 +121,11 @@ int FfmpegCamera::PrimeCapture() // Handle options AVDictionary *opts = 0; StringVector opVect = split(Options(), ","); - for (int i=0; i 1) - av_dict_set(&opts, trimSpaces(parts[0]), trimSpaces(parts[1])); + av_dict_set(&opts, trimSpaces(parts[0]).c_str(), trimSpaces(parts[1]).c_str(), 0); } if ( avformat_open_input( &mFormatContext, mPath.c_str(), NULL, &opts ) !=0 ) #endif diff --git a/src/zm_libvlc_camera.cpp b/src/zm_libvlc_camera.cpp index f127fe3a0..f88009311 100644 --- a/src/zm_libvlc_camera.cpp +++ b/src/zm_libvlc_camera.cpp @@ -147,12 +147,15 @@ int LibvlcCamera::PrimeCapture() if (opVect.size() > 0) { - mOptArgV = new char*[opVect.size()];cmd - for (int i=0; i< opVect.size(); i++) - mOptArgV[i] = opVect[i].c_str(); + mOptArgV = new char*[opVect.size()]; + Debug(2, "Size of Option Array: %d",opVect.size()); + for (size_t i=0; i< opVect.size(); i++) { + mOptArgV[i] = (char *)opVect[i].c_str(); + Debug(2, "set option %d to %s", i, opVect[i].c_str()); + } } - mLibvlcInstance = libvlc_new (opVect.size(), optArgV); + mLibvlcInstance = libvlc_new (opVect.size(), (const char* const*)mOptArgV); if(mLibvlcInstance == NULL) Fatal("Unable to create libvlc instance due to: %s", libvlc_errmsg()); diff --git a/src/zm_libvlc_camera.h b/src/zm_libvlc_camera.h index 75d97ad72..45a1e029f 100644 --- a/src/zm_libvlc_camera.h +++ b/src/zm_libvlc_camera.h @@ -46,7 +46,7 @@ class LibvlcCamera : public Camera protected: std::string mPath; std::string mOptions; - unisgned char **mOptArgV; + char **mOptArgV; LibvlcPrivateData mLibvlcData; std::string mTargetChroma; uint8_t mBpp; From a6a9d9f2708bebdc4df97f1e7db372f24e5adfe9 Mon Sep 17 00:00:00 2001 From: m-bene Date: Thu, 8 May 2014 02:30:54 +0200 Subject: [PATCH 05/38] add Options field to zm_create.sql.in --- db/zm_create.sql.in | 1 + 1 file changed, 1 insertion(+) diff --git a/db/zm_create.sql.in b/db/zm_create.sql.in index 3b2b54cbb..71276d352 100644 --- a/db/zm_create.sql.in +++ b/db/zm_create.sql.in @@ -329,6 +329,7 @@ CREATE TABLE `Monitors` ( `Port` varchar(8) NOT NULL default '', `SubPath` varchar(64) NOT NULL default '', `Path` varchar(255) NOT NULL default '', + `Options` varchar(255) not null default '', `User` varchar(64) NOT NULL default '', `Pass` varchar(64) NOT NULL default '', `Width` smallint(5) unsigned NOT NULL default '0', From c1557a99e5e1bdc450db6e589604107898c7ca8c Mon Sep 17 00:00:00 2001 From: m-bene Date: Thu, 15 May 2014 15:06:01 +0200 Subject: [PATCH 06/38] add debug and warn messages --- src/zm_ffmpeg_camera.cpp | 13 +++++++++++-- src/zm_libvlc_camera.cpp | 2 +- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/zm_ffmpeg_camera.cpp b/src/zm_ffmpeg_camera.cpp index cbe128b11..588235d63 100644 --- a/src/zm_ffmpeg_camera.cpp +++ b/src/zm_ffmpeg_camera.cpp @@ -121,11 +121,20 @@ int FfmpegCamera::PrimeCapture() // Handle options AVDictionary *opts = 0; StringVector opVect = split(Options(), ","); + Debug(2, "Number of Options: %d",opVect.size()); for (size_t i=0; i 1) - av_dict_set(&opts, trimSpaces(parts[0]).c_str(), trimSpaces(parts[1]).c_str(), 0); + if (parts.size() > 1) { + if (av_dict_set(&opts, trimSpaces(parts[0]).c_str(), trimSpaces(parts[1]).c_str(), 0)) { + Debug(2, "set option %d to %s", i, trimSpaces(parts[1]).c_str()); + } + else + { + Warning( "Error trying to set option %s to '%s'", i, trimSpaces(parts[1]).c_str() ); + } + + } } if ( avformat_open_input( &mFormatContext, mPath.c_str(), NULL, &opts ) !=0 ) #endif diff --git a/src/zm_libvlc_camera.cpp b/src/zm_libvlc_camera.cpp index f88009311..f1b031040 100644 --- a/src/zm_libvlc_camera.cpp +++ b/src/zm_libvlc_camera.cpp @@ -148,7 +148,7 @@ int LibvlcCamera::PrimeCapture() if (opVect.size() > 0) { mOptArgV = new char*[opVect.size()]; - Debug(2, "Size of Option Array: %d",opVect.size()); + Debug(2, "Number of Options: %d",opVect.size()); for (size_t i=0; i< opVect.size(); i++) { mOptArgV[i] = (char *)opVect[i].c_str(); Debug(2, "set option %d to %s", i, opVect[i].c_str()); From 5cb7cd916fd5834150133bfeb432357a2aec8e9b Mon Sep 17 00:00:00 2001 From: m-bene Date: Thu, 15 May 2014 15:13:39 +0200 Subject: [PATCH 07/38] add quotes to option debug/warn messages --- src/zm_ffmpeg_camera.cpp | 2 +- src/zm_libvlc_camera.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/zm_ffmpeg_camera.cpp b/src/zm_ffmpeg_camera.cpp index 588235d63..8fe040def 100644 --- a/src/zm_ffmpeg_camera.cpp +++ b/src/zm_ffmpeg_camera.cpp @@ -127,7 +127,7 @@ int FfmpegCamera::PrimeCapture() StringVector parts = split(opVect[i],"="); if (parts.size() > 1) { if (av_dict_set(&opts, trimSpaces(parts[0]).c_str(), trimSpaces(parts[1]).c_str(), 0)) { - Debug(2, "set option %d to %s", i, trimSpaces(parts[1]).c_str()); + Debug(2, "set option %d to '%s'", i, trimSpaces(parts[1]).c_str()); } else { diff --git a/src/zm_libvlc_camera.cpp b/src/zm_libvlc_camera.cpp index f1b031040..aecd11175 100644 --- a/src/zm_libvlc_camera.cpp +++ b/src/zm_libvlc_camera.cpp @@ -151,7 +151,7 @@ int LibvlcCamera::PrimeCapture() Debug(2, "Number of Options: %d",opVect.size()); for (size_t i=0; i< opVect.size(); i++) { mOptArgV[i] = (char *)opVect[i].c_str(); - Debug(2, "set option %d to %s", i, opVect[i].c_str()); + Debug(2, "set option %d to '%s'", i, opVect[i].c_str()); } } From 6016206f98b6f9c7c9af806a8aad42edadb0df43 Mon Sep 17 00:00:00 2001 From: m-bene Date: Thu, 15 May 2014 15:42:27 +0200 Subject: [PATCH 08/38] modify debug message --- src/zm_ffmpeg_camera.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/zm_ffmpeg_camera.cpp b/src/zm_ffmpeg_camera.cpp index 8fe040def..53c17cb5b 100644 --- a/src/zm_ffmpeg_camera.cpp +++ b/src/zm_ffmpeg_camera.cpp @@ -126,12 +126,12 @@ int FfmpegCamera::PrimeCapture() { StringVector parts = split(opVect[i],"="); if (parts.size() > 1) { - if (av_dict_set(&opts, trimSpaces(parts[0]).c_str(), trimSpaces(parts[1]).c_str(), 0)) { - Debug(2, "set option %d to '%s'", i, trimSpaces(parts[1]).c_str()); + if (!av_dict_set(&opts, trimSpaces(parts[0]).c_str(), trimSpaces(parts[1]).c_str(), 0)) { + Debug(2, "set option %d '%s' to '%s'", i, trimSpaces(parts[0]).c_str(), trimSpaces(parts[1]).c_str()); } else { - Warning( "Error trying to set option %s to '%s'", i, trimSpaces(parts[1]).c_str() ); + Warning( "Error trying to set option %d '%s' to '%s'", i, trimSpaces(parts[0]).c_str(), trimSpaces(parts[1]).c_str() ); } } From 1b4f9c082cf04081e5497c0b30eb5ecb2bdf844f Mon Sep 17 00:00:00 2001 From: m-bene Date: Thu, 15 May 2014 16:01:29 +0200 Subject: [PATCH 09/38] change check for av_dict_set success --- src/zm_ffmpeg_camera.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/zm_ffmpeg_camera.cpp b/src/zm_ffmpeg_camera.cpp index 53c17cb5b..76f5aa802 100644 --- a/src/zm_ffmpeg_camera.cpp +++ b/src/zm_ffmpeg_camera.cpp @@ -126,7 +126,7 @@ int FfmpegCamera::PrimeCapture() { StringVector parts = split(opVect[i],"="); if (parts.size() > 1) { - if (!av_dict_set(&opts, trimSpaces(parts[0]).c_str(), trimSpaces(parts[1]).c_str(), 0)) { + if ( av_dict_set(&opts, trimSpaces(parts[0]).c_str(), trimSpaces(parts[1]).c_str(), 0) == 0 ) { Debug(2, "set option %d '%s' to '%s'", i, trimSpaces(parts[0]).c_str(), trimSpaces(parts[1]).c_str()); } else From 9a71a0068a48c49f02198a1419e611dc929272c5 Mon Sep 17 00:00:00 2001 From: m-bene Date: Sat, 17 May 2014 04:33:33 +0200 Subject: [PATCH 10/38] add help window for ffmpeg/libvlc options --- src/zm_ffmpeg_camera.cpp | 8 ++-- src/zm_libvlc_camera.cpp | 1 + web/lang/big5_big5.php | 15 ++++++++ web/lang/cn_zh.php | 15 ++++++++ web/lang/cs_cz.php | 15 ++++++++ web/lang/de_de.php | 15 ++++++++ web/lang/dk_dk.php | 15 ++++++++ web/lang/en_gb.php | 14 +++++++ web/lang/es_ar.php | 15 ++++++++ web/lang/es_es.php | 1 + web/lang/et_ee.php | 15 ++++++++ web/lang/fr_fr.php | 15 ++++++++ web/lang/he_il.php | 15 ++++++++ web/lang/hu_hu.php | 15 ++++++++ web/lang/it_it.php | 15 ++++++++ web/lang/ja_jp.php | 15 ++++++++ web/lang/nl_nl.php | 51 +++++++++++++++++--------- web/lang/pl_pl.php | 15 ++++++++ web/lang/pt_br.php | 15 ++++++++ web/lang/ro_ro.php | 17 +++++++++ web/lang/ru_ru.php | 15 ++++++++ web/lang/se_se.php | 1 + web/skins/classic/views/monitor.php | 2 +- web/skins/classic/views/optionhelp.php | 2 +- web/skins/classic/views/options.php | 4 +- web/skins/flat/views/monitor.php | 2 +- web/skins/flat/views/optionhelp.php | 2 +- web/skins/flat/views/options.php | 4 +- 28 files changed, 305 insertions(+), 29 deletions(-) mode change 100755 => 100644 web/lang/he_il.php mode change 100755 => 100644 web/lang/ro_ro.php diff --git a/src/zm_ffmpeg_camera.cpp b/src/zm_ffmpeg_camera.cpp index 76f5aa802..42ae3c748 100644 --- a/src/zm_ffmpeg_camera.cpp +++ b/src/zm_ffmpeg_camera.cpp @@ -126,12 +126,14 @@ int FfmpegCamera::PrimeCapture() { StringVector parts = split(opVect[i],"="); if (parts.size() > 1) { - if ( av_dict_set(&opts, trimSpaces(parts[0]).c_str(), trimSpaces(parts[1]).c_str(), 0) == 0 ) { - Debug(2, "set option %d '%s' to '%s'", i, trimSpaces(parts[0]).c_str(), trimSpaces(parts[1]).c_str()); + parts[0] = trimSpaces(parts[0]); + parts[1] = trimSpaces(parts[1]); + if ( av_dict_set(&opts, parts[0].c_str(), parts[1].c_str(), 0) == 0 ) { + Debug(2, "set option %d '%s' to '%s'", i, parts[0].c_str(), parts[1].c_str()); } else { - Warning( "Error trying to set option %d '%s' to '%s'", i, trimSpaces(parts[0]).c_str(), trimSpaces(parts[1]).c_str() ); + Warning( "Error trying to set option %d '%s' to '%s'", i, parts[0].c_str(), parts[1].c_str() ); } } diff --git a/src/zm_libvlc_camera.cpp b/src/zm_libvlc_camera.cpp index aecd11175..577bdd2e6 100644 --- a/src/zm_libvlc_camera.cpp +++ b/src/zm_libvlc_camera.cpp @@ -150,6 +150,7 @@ int LibvlcCamera::PrimeCapture() mOptArgV = new char*[opVect.size()]; Debug(2, "Number of Options: %d",opVect.size()); for (size_t i=0; i< opVect.size(); i++) { + opVect[i] = trimSpaces(opVect[i]); mOptArgV[i] = (char *)opVect[i].c_str(); Debug(2, "set option %d to '%s'", i, opVect[i].c_str()); } diff --git a/web/lang/big5_big5.php b/web/lang/big5_big5.php index 957a41bbb..5ba7860e6 100644 --- a/web/lang/big5_big5.php +++ b/web/lang/big5_big5.php @@ -383,6 +383,7 @@ $SLANG = array( 'Last' => 'Last', 'Layout' => 'Layout', // Added - 2009-02-08 'Level' => 'Level', // Added - 2011-06-16 + 'Libvlc' => 'Libvlc', 'LimitResultsPost' => 'results only;', // This is used at the end of the phrase 'Limit to first N results only' 'LimitResultsPre' => 'Limit to first', // This is used at the beginning of the phrase 'Limit to first N results only' 'Line' => 'Line', // Added - 2011-06-16 @@ -863,6 +864,20 @@ function zmVlang( $langVarArray, $count ) // These overrides are in the form show below where the array key represents the option name minus the initial ZM_ // So for example, to override the help text for ZM_LANG_DEFAULT do $OLANG = array( + 'OPTIONS_FFMPEG' => array( + 'Help' => "Parameters in this field are passwd on to FFmpeg. Multiple parameters can be separated by ,~~ ". + "Examples (do not enter quotes)~~~~". + "\"rtsp_transport=tcp\" Use TCP instead of UDP for the data stream from the camera~~~~". + "\"rtsp_transport=http\" Use http tunneling for the data stream from the camera~~~~". + "\"loglevel=debug\" Set verbosiy of FFmpeg (quiet, panic, fatal, error, warning, info, verbose, debug)" + ), + 'OPTIONS_LIBVLC' => array( + 'Help' => "Parameters in this field are passwd on to libVLC. Multiple parameters can be separated by ,~~ ". + "Examples (do not enter quotes)~~~~". + "\"--rtsp-tcp\" Use TCP instead of UDP for the data stream from the camera~~~~". + "\"--verbose=2\" Set verbosity of libVLC" + ), + // 'LANG_DEFAULT' => array( // 'Prompt' => "This is a new prompt for this option", // 'Help' => "This is some new help for this option which will be displayed in the popup window when the ? is clicked" diff --git a/web/lang/cn_zh.php b/web/lang/cn_zh.php index ef730341a..96e306c68 100644 --- a/web/lang/cn_zh.php +++ b/web/lang/cn_zh.php @@ -379,6 +379,7 @@ $SLANG = array( 'Last' => '最后', 'Layout' => '布局', 'Level' => 'Level', // Added - 2011-06-16 + 'Libvlc' => 'Libvlc', 'LimitResultsPost' => '个结果', // This is used at the end of the phrase 'Limit to first N results only' 'LimitResultsPre' => '仅限于开始', // This is used at the beginning of the phrase 'Limit to first N results only' 'Line' => 'Line', // Added - 2011-06-16 @@ -858,6 +859,20 @@ function zmVlang( $langVarArray, $count ) // These overrides are in the form show below where the array key represents the option name minus the initial ZM_ // So for example, to override the help text for ZM_LANG_DEFAULT do $OLANG = array( + 'OPTIONS_FFMPEG' => array( + 'Help' => "Parameters in this field are passwd on to FFmpeg. Multiple parameters can be separated by ,~~ ". + "Examples (do not enter quotes)~~~~". + "\"rtsp_transport=tcp\" Use TCP instead of UDP for the data stream from the camera~~~~". + "\"rtsp_transport=http\" Use http tunneling for the data stream from the camera~~~~". + "\"loglevel=debug\" Set verbosiy of FFmpeg (quiet, panic, fatal, error, warning, info, verbose, debug)" + ), + 'OPTIONS_LIBVLC' => array( + 'Help' => "Parameters in this field are passwd on to libVLC. Multiple parameters can be separated by ,~~ ". + "Examples (do not enter quotes)~~~~". + "\"--rtsp-tcp\" Use TCP instead of UDP for the data stream from the camera~~~~". + "\"--verbose=2\" Set verbosity of libVLC" + ), + // 'LANG_DEFAULT' => array( // 'Prompt' => "This is a new prompt for this option", // 'Help' => "This is some new help for this option which will be displayed in the popup window when the ? is clicked" diff --git a/web/lang/cs_cz.php b/web/lang/cs_cz.php index 420954368..445989fbb 100644 --- a/web/lang/cs_cz.php +++ b/web/lang/cs_cz.php @@ -379,6 +379,7 @@ $SLANG = array( 'Last' => 'Posledn', 'Layout' => 'Layout', // Added - 2009-02-08 'Level' => 'Level', // Added - 2011-06-16 + 'Libvlc' => 'Libvlc', 'LimitResultsPost' => 'vsledk', // This is used at the end of the phrase 'Limit to first N results only' 'LimitResultsPre' => 'Zobrazit pouze prvnch', // This is used at the beginning of the phrase 'Limit to first N results only' 'Line' => 'Line', // Added - 2011-06-16 @@ -859,6 +860,20 @@ function zmVlang( $langVarArray, $count ) // These overrides are in the form show below where the array key represents the option name minus the initial ZM_ // So for example, to override the help text for ZM_LANG_DEFAULT do $OLANG = array( + 'OPTIONS_FFMPEG' => array( + 'Help' => "Parameters in this field are passwd on to FFmpeg. Multiple parameters can be separated by ,~~ ". + "Examples (do not enter quotes)~~~~". + "\"rtsp_transport=tcp\" Use TCP instead of UDP for the data stream from the camera~~~~". + "\"rtsp_transport=http\" Use http tunneling for the data stream from the camera~~~~". + "\"loglevel=debug\" Set verbosiy of FFmpeg (quiet, panic, fatal, error, warning, info, verbose, debug)" + ), + 'OPTIONS_LIBVLC' => array( + 'Help' => "Parameters in this field are passwd on to libVLC. Multiple parameters can be separated by ,~~ ". + "Examples (do not enter quotes)~~~~". + "\"--rtsp-tcp\" Use TCP instead of UDP for the data stream from the camera~~~~". + "\"--verbose=2\" Set verbosity of libVLC" + ), + // 'LANG_DEFAULT' => array( // 'Prompt' => "This is a new prompt for this option", // 'Help' => "This is some new help for this option which will be displayed in the popup window when the ? is clicked" diff --git a/web/lang/de_de.php b/web/lang/de_de.php index 16c192409..02816eb08 100644 --- a/web/lang/de_de.php +++ b/web/lang/de_de.php @@ -379,6 +379,7 @@ $SLANG = array( 'Last' => 'Letztes', 'Layout' => 'Layout', // Added - 2009-02-08 'Level' => 'Level', // Added - 2011-06-16 + 'Libvlc' => 'Libvlc', 'LimitResultsPost' => 'Ergebnisse;', // This is used at the end of the phrase 'Limit to first N results only' 'LimitResultsPre' => 'Begrenze nur auf die ersten', // This is used at the beginning of the phrase 'Limit to first N results only' 'Line' => 'Line', // Added - 2011-06-16 @@ -859,6 +860,20 @@ function zmVlang( $langVarArray, $count ) // These overrides are in the form show below where the array key represents the option name minus the initial ZM_ // So for example, to override the help text for ZM_LANG_DEFAULT do $OLANG = array( + 'OPTIONS_FFMPEG' => array( + 'Help' => "Im Feld Optionen knnen Parameter angegeben werden, die direkt an FFmpeg weitergegeben werden. Mehrere Parameter knnen mit , getrennt werden. ". + "Einige Bespiele: (Anfhrungszeichen nicht eingeben)~~~~". + "\"rtsp_transport=tcp\" Verwenden von TCP statt UDP fr die bermittlung des Datenstroms von der Kamera~~~~". + "\"rtsp_transport=http\" Verwenden von http tunneling fr die bermittlung des Datenstroms von der Kamera~~~~". + "\"loglevel=debug\" Gibt an wie viele Status/Debug Meldungen angezeigt werden sollen (quiet, panic, fatal, error, warning, info, verbose, debug)" + ), + 'OPTIONS_LIBVLC' => array( + 'Help' => "Im Feld Optionen knnen Parameter angegeben werden, die direkt an Libvlc weitergegeben werden. Mehrere Parameter knnen mit , getrennt werden. ". + "Einige Bespiele: (Anfhrungszeichen nicht eingeben)~~~~". + "\"--rtsp-tcp\" Verwenden von TCP statt UDP fr die bermittlung des Datenstroms von der Kamera~~~~". + "\"--verbose=2\" Gibt an wie viele Status/Debug Meldungen angezeigt werden sollen" + ), + // 'LANG_DEFAULT' => array( // 'Prompt' => "This is a new prompt for this option", // 'Help' => "This is some new help for this option which will be displayed in the popup window when the ? is clicked" diff --git a/web/lang/dk_dk.php b/web/lang/dk_dk.php index 97cafe5b7..a0cbd1817 100644 --- a/web/lang/dk_dk.php +++ b/web/lang/dk_dk.php @@ -380,6 +380,7 @@ $SLANG = array( 'Last' => 'Sidste', 'Layout' => 'Layout', // Added - 2009-02-08 'Level' => 'Level', // Added - 2011-06-16 + 'Libvlc' => 'Libvlc', 'LimitResultsPost' => 'results only;', // This is used at the end of the phrase 'Limit to first N results only' 'LimitResultsPre' => 'Limit to first', // This is used at the beginning of the phrase 'Limit to first N results only' 'Line' => 'Line', // Added - 2011-06-16 @@ -860,6 +861,20 @@ function zmVlang( $langVarArray, $count ) // These overrides are in the form show below where the array key represents the option name minus the initial ZM_ // So for example, to override the help text for ZM_LANG_DEFAULT do $OLANG = array( + 'OPTIONS_FFMPEG' => array( + 'Help' => "Parameters in this field are passwd on to FFmpeg. Multiple parameters can be separated by ,~~ ". + "Examples (do not enter quotes)~~~~". + "\"rtsp_transport=tcp\" Use TCP instead of UDP for the data stream from the camera~~~~". + "\"rtsp_transport=http\" Use http tunneling for the data stream from the camera~~~~". + "\"loglevel=debug\" Set verbosiy of FFmpeg (quiet, panic, fatal, error, warning, info, verbose, debug)" + ), + 'OPTIONS_LIBVLC' => array( + 'Help' => "Parameters in this field are passwd on to libVLC. Multiple parameters can be separated by ,~~ ". + "Examples (do not enter quotes)~~~~". + "\"--rtsp-tcp\" Use TCP instead of UDP for the data stream from the camera~~~~". + "\"--verbose=2\" Set verbosity of libVLC" + ), + // 'LANG_DEFAULT' => array( // 'Prompt' => "This is a new prompt for this option", // 'Help' => "This is some new help for this option which will be displayed in the popup window when the ? is clicked" diff --git a/web/lang/en_gb.php b/web/lang/en_gb.php index b6f695f9c..84fef6e9d 100644 --- a/web/lang/en_gb.php +++ b/web/lang/en_gb.php @@ -860,6 +860,20 @@ function zmVlang( $langVarArray, $count ) // These overrides are in the form show below where the array key represents the option name minus the initial ZM_ // So for example, to override the help text for ZM_LANG_DEFAULT do $OLANG = array( + 'OPTIONS_FFMPEG' => array( + 'Help' => "Parameters in this field are passwd on to FFmpeg. Multiple parameters can be separated by ,~~ ". + "Examples (do not enter quotes)~~~~". + "\"rtsp_transport=tcp\" Use TCP instead of UDP for the data stream from the camera~~~~". + "\"rtsp_transport=http\" Use http tunneling for the data stream from the camera~~~~". + "\"loglevel=debug\" Set verbosiy of FFmpeg (quiet, panic, fatal, error, warning, info, verbose, debug)" + ), + 'OPTIONS_LIBVLC' => array( + 'Help' => "Parameters in this field are passwd on to libVLC. Multiple parameters can be separated by ,~~ ". + "Examples (do not enter quotes)~~~~". + "\"--rtsp-tcp\" Use TCP instead of UDP for the data stream from the camera~~~~". + "\"--verbose=2\" Set verbosity of libVLC" + ), + // 'LANG_DEFAULT' => array( // 'Prompt' => "This is a new prompt for this option", // 'Help' => "This is some new help for this option which will be displayed in the popup window when the ? is clicked" diff --git a/web/lang/es_ar.php b/web/lang/es_ar.php index 7279ae2a5..96fd1dd18 100644 --- a/web/lang/es_ar.php +++ b/web/lang/es_ar.php @@ -330,6 +330,7 @@ $SLANG = array( 'Last' => 'Ultimo', 'Layout' => 'Layout', // Added - 2009-02-08 'Level' => 'Level', // Added - 2011-06-16 + 'Libvlc' => 'Libvlc', 'LimitResultsPost' => 'Resultados;', // This is used at the end of the phrase 'Limit to first N results only' 'LimitResultsPre' => 'Solo los primeros', // This is used at the beginning of the phrase 'Limit to first N results only' 'Line' => 'Line', // Added - 2011-06-16 @@ -716,6 +717,20 @@ function zmVlang( $langVarArray, $count ) } $OLANG = array( + 'OPTIONS_FFMPEG' => array( + 'Help' => "Parameters in this field are passwd on to FFmpeg. Multiple parameters can be separated by ,~~ ". + "Examples (do not enter quotes)~~~~". + "\"rtsp_transport=tcp\" Use TCP instead of UDP for the data stream from the camera~~~~". + "\"rtsp_transport=http\" Use http tunneling for the data stream from the camera~~~~". + "\"loglevel=debug\" Set verbosiy of FFmpeg (quiet, panic, fatal, error, warning, info, verbose, debug)" + ), + 'OPTIONS_LIBVLC' => array( + 'Help' => "Parameters in this field are passwd on to libVLC. Multiple parameters can be separated by ,~~ ". + "Examples (do not enter quotes)~~~~". + "\"--rtsp-tcp\" Use TCP instead of UDP for the data stream from the camera~~~~". + "\"--verbose=2\" Set verbosity of libVLC" + ), + ); ?> diff --git a/web/lang/es_es.php b/web/lang/es_es.php index 1803739ff..5cf8be100 100644 --- a/web/lang/es_es.php +++ b/web/lang/es_es.php @@ -376,6 +376,7 @@ $SLANG = array( 'Last' => 'Último', 'Layout' => 'Diseño', 'Level' => 'Nivel', + 'Libvlc' => 'Libvlc', 'LimitResultsPost' => 'Sólo resultados', // This is used at the end of the phrase 'Limit to first N results only' 'LimitResultsPre' => 'Limitar al primero', // This is used at the beginning of the phrase 'Limit to first N results only' 'Line' => 'Línea', diff --git a/web/lang/et_ee.php b/web/lang/et_ee.php index db9660e1b..346a1d225 100644 --- a/web/lang/et_ee.php +++ b/web/lang/et_ee.php @@ -374,6 +374,7 @@ $SLANG = array( 'Last' => 'Viimane', 'Layout' => 'Layout', 'Level' => 'Level', // Added - 2011-06-16 + 'Libvlc' => 'Libvlc', 'LimitResultsPost' => 'results only', // This is used at the end of the phrase 'Limit to first N results only' 'LimitResultsPre' => 'Limit to first', // This is used at the beginning of the phrase 'Limit to first N results only' 'Line' => 'Line', // Added - 2011-06-16 @@ -852,6 +853,20 @@ function zmVlang( $langVarArray, $count ) // These overrides are in the form show below where the array key represents the option name minus the initial ZM_ // So for example, to override the help text for ZM_LANG_DEFAULT do $OLANG = array( + 'OPTIONS_FFMPEG' => array( + 'Help' => "Parameters in this field are passwd on to FFmpeg. Multiple parameters can be separated by ,~~ ". + "Examples (do not enter quotes)~~~~". + "\"rtsp_transport=tcp\" Use TCP instead of UDP for the data stream from the camera~~~~". + "\"rtsp_transport=http\" Use http tunneling for the data stream from the camera~~~~". + "\"loglevel=debug\" Set verbosiy of FFmpeg (quiet, panic, fatal, error, warning, info, verbose, debug)" + ), + 'OPTIONS_LIBVLC' => array( + 'Help' => "Parameters in this field are passwd on to libVLC. Multiple parameters can be separated by ,~~ ". + "Examples (do not enter quotes)~~~~". + "\"--rtsp-tcp\" Use TCP instead of UDP for the data stream from the camera~~~~". + "\"--verbose=2\" Set verbosity of libVLC" + ), + // 'LANG_DEFAULT' => array( // 'Prompt' => "This is a new prompt for this option", // 'Help' => "This is some new help for this option which will be displayed in the popup window when the ? is clicked" diff --git a/web/lang/fr_fr.php b/web/lang/fr_fr.php index 37a135db6..4715d856c 100644 --- a/web/lang/fr_fr.php +++ b/web/lang/fr_fr.php @@ -379,6 +379,7 @@ $SLANG = array( 'Last' => 'Dernier', 'Layout' => 'Layout', // Added - 2009-02-08 'Level' => 'Level', // Added - 2011-06-16 + 'Libvlc' => 'Libvlc', 'LimitResultsPost' => 'results only;', // This is used at the end of the phrase 'Limit to first N results only' 'LimitResultsPre' => 'Limit to first', // This is used at the beginning of the phrase 'Limit to first N results only' 'Line' => 'Line', // Added - 2011-06-16 @@ -859,6 +860,20 @@ function zmVlang( $langVarArray, $count ) // These overrides are in the form show below where the array key represents the option name minus the initial ZM_ // So for example, to override the help text for ZM_LANG_DEFAULT do $OLANG = array( + 'OPTIONS_FFMPEG' => array( + 'Help' => "Parameters in this field are passwd on to FFmpeg. Multiple parameters can be separated by ,~~ ". + "Examples (do not enter quotes)~~~~". + "\"rtsp_transport=tcp\" Use TCP instead of UDP for the data stream from the camera~~~~". + "\"rtsp_transport=http\" Use http tunneling for the data stream from the camera~~~~". + "\"loglevel=debug\" Set verbosiy of FFmpeg (quiet, panic, fatal, error, warning, info, verbose, debug)" + ), + 'OPTIONS_LIBVLC' => array( + 'Help' => "Parameters in this field are passwd on to libVLC. Multiple parameters can be separated by ,~~ ". + "Examples (do not enter quotes)~~~~". + "\"--rtsp-tcp\" Use TCP instead of UDP for the data stream from the camera~~~~". + "\"--verbose=2\" Set verbosity of libVLC" + ), + // 'LANG_DEFAULT' => array( // 'Prompt' => "This is a new prompt for this option", // 'Help' => "This is some new help for this option which will be displayed in the popup window when the ? is clicked" diff --git a/web/lang/he_il.php b/web/lang/he_il.php old mode 100755 new mode 100644 index 604af4710..81fe3d37e --- a/web/lang/he_il.php +++ b/web/lang/he_il.php @@ -379,6 +379,7 @@ $SLANG = array( 'Last' => '', 'Layout' => 'Layout', // Added - 2009-02-08 'Level' => 'Level', // Added - 2011-06-16 + 'Libvlc' => 'Libvlc', 'LimitResultsPost' => ' ;', // This is used at the end of the phrase 'Limit to first N results only' 'LimitResultsPre' => ' ', // This is used at the beginning of the phrase 'Limit to first N results only' 'Line' => 'Line', // Added - 2011-06-16 @@ -859,6 +860,20 @@ function zmVlang( $langVarArray, $count ) // These overrides are in the form show below where the array key represents the option name minus the initial ZM_ // So for example, to override the help text for ZM_LANG_DEFAULT do $OLANG = array( + 'OPTIONS_FFMPEG' => array( + 'Help' => "Parameters in this field are passwd on to FFmpeg. Multiple parameters can be separated by ,~~ ". + "Examples (do not enter quotes)~~~~". + "\"rtsp_transport=tcp\" Use TCP instead of UDP for the data stream from the camera~~~~". + "\"rtsp_transport=http\" Use http tunneling for the data stream from the camera~~~~". + "\"loglevel=debug\" Set verbosiy of FFmpeg (quiet, panic, fatal, error, warning, info, verbose, debug)" + ), + 'OPTIONS_LIBVLC' => array( + 'Help' => "Parameters in this field are passwd on to libVLC. Multiple parameters can be separated by ,~~ ". + "Examples (do not enter quotes)~~~~". + "\"--rtsp-tcp\" Use TCP instead of UDP for the data stream from the camera~~~~". + "\"--verbose=2\" Set verbosity of libVLC" + ), + // 'LANG_DEFAULT' => array( // 'Prompt' => "This is a new prompt for this option", // 'Help' => "This is some new help for this option which will be displayed in the popup window when the ? is clicked" diff --git a/web/lang/hu_hu.php b/web/lang/hu_hu.php index 0015bfd81..5753d2e6c 100644 --- a/web/lang/hu_hu.php +++ b/web/lang/hu_hu.php @@ -419,6 +419,7 @@ $SLANG = array( 'Last' => 'Utolsó', 'Layout' => 'Elrendezés', 'Level' => 'Szint', + 'Libvlc' => 'Libvlc', 'LimitResultsPost' => 'találatra', // This is used at the end of the phrase 'Limit to first N results only' 'LimitResultsPre' => 'Csak az első', // This is used at the beginning of the phrase 'Limit to first N results only' 'Line' => 'Sor', @@ -897,6 +898,20 @@ function zmVlang( $langVarArray, $count ) // These overrides are in the form show below where the array key represents the option name minus the initial ZM_ // So for example, to override the help text for ZM_LANG_DEFAULT do $OLANG = array( + 'OPTIONS_FFMPEG' => array( + 'Help' => "Parameters in this field are passwd on to FFmpeg. Multiple parameters can be separated by ,~~ ". + "Examples (do not enter quotes)~~~~". + "\"rtsp_transport=tcp\" Use TCP instead of UDP for the data stream from the camera~~~~". + "\"rtsp_transport=http\" Use http tunneling for the data stream from the camera~~~~". + "\"loglevel=debug\" Set verbosiy of FFmpeg (quiet, panic, fatal, error, warning, info, verbose, debug)" + ), + 'OPTIONS_LIBVLC' => array( + 'Help' => "Parameters in this field are passwd on to libVLC. Multiple parameters can be separated by ,~~ ". + "Examples (do not enter quotes)~~~~". + "\"--rtsp-tcp\" Use TCP instead of UDP for the data stream from the camera~~~~". + "\"--verbose=2\" Set verbosity of libVLC" + ), + // 'LANG_DEFAULT' => array( // 'Prompt' => "This is a new prompt for this option", // 'Help' => "This is some new help for this option which will be displayed in the popup window when the ? is clicked" diff --git a/web/lang/it_it.php b/web/lang/it_it.php index 8ebc25b17..d6cc2e1bf 100644 --- a/web/lang/it_it.php +++ b/web/lang/it_it.php @@ -384,6 +384,7 @@ $SLANG = array( 'Last' => 'Ultimo', 'Layout' => 'Layout', // Added - 2009-02-08 'Level' => 'Level', // Added - 2011-06-16 + 'Libvlc' => 'Libvlc', 'LimitResultsPost' => 'risultati;', // This is used at the end of the phrase 'Limit to first N results only' 'LimitResultsPre' => 'Limita ai primi', // This is used at the beginning of the phrase 'Limit to first N results only' 'Line' => 'Line', // Added - 2011-06-16 @@ -864,6 +865,20 @@ function zmVlang( $langVarArray, $count ) // These overrides are in the form show below where the array key represents the option name minus the initial ZM_ // So for example, to override the help text for ZM_LANG_DEFAULT do $OLANG = array( + 'OPTIONS_FFMPEG' => array( + 'Help' => "Parameters in this field are passwd on to FFmpeg. Multiple parameters can be separated by ,~~ ". + "Examples (do not enter quotes)~~~~". + "\"rtsp_transport=tcp\" Use TCP instead of UDP for the data stream from the camera~~~~". + "\"rtsp_transport=http\" Use http tunneling for the data stream from the camera~~~~". + "\"loglevel=debug\" Set verbosiy of FFmpeg (quiet, panic, fatal, error, warning, info, verbose, debug)" + ), + 'OPTIONS_LIBVLC' => array( + 'Help' => "Parameters in this field are passwd on to libVLC. Multiple parameters can be separated by ,~~ ". + "Examples (do not enter quotes)~~~~". + "\"--rtsp-tcp\" Use TCP instead of UDP for the data stream from the camera~~~~". + "\"--verbose=2\" Set verbosity of libVLC" + ), + // 'LANG_DEFAULT' => array( // 'Prompt' => "This is a new prompt for this option", // 'Help' => "This is some new help for this option which will be displayed in the popup window when the ? is clicked" diff --git a/web/lang/ja_jp.php b/web/lang/ja_jp.php index dec87549c..78c3fad4c 100644 --- a/web/lang/ja_jp.php +++ b/web/lang/ja_jp.php @@ -379,6 +379,7 @@ $SLANG = array( 'Last' => 'ŏI', 'Layout' => 'Layout', // Added - 2009-02-08 'Level' => 'Level', // Added - 2011-06-16 + 'Libvlc' => 'Libvlc', 'LimitResultsPost' => 'results only;', // This is used at the end of the phrase 'Limit to first N results only' 'LimitResultsPre' => 'Limit to first', // This is used at the beginning of the phrase 'Limit to first N results only' 'Line' => 'Line', // Added - 2011-06-16 @@ -859,6 +860,20 @@ function zmVlang( $langVarArray, $count ) // These overrides are in the form show below where the array key represents the option name minus the initial ZM_ // So for example, to override the help text for ZM_LANG_DEFAULT do $OLANG = array( + 'OPTIONS_FFMPEG' => array( + 'Help' => "Parameters in this field are passwd on to FFmpeg. Multiple parameters can be separated by ,~~ ". + "Examples (do not enter quotes)~~~~". + "\"rtsp_transport=tcp\" Use TCP instead of UDP for the data stream from the camera~~~~". + "\"rtsp_transport=http\" Use http tunneling for the data stream from the camera~~~~". + "\"loglevel=debug\" Set verbosiy of FFmpeg (quiet, panic, fatal, error, warning, info, verbose, debug)" + ), + 'OPTIONS_LIBVLC' => array( + 'Help' => "Parameters in this field are passwd on to libVLC. Multiple parameters can be separated by ,~~ ". + "Examples (do not enter quotes)~~~~". + "\"--rtsp-tcp\" Use TCP instead of UDP for the data stream from the camera~~~~". + "\"--verbose=2\" Set verbosity of libVLC" + ), + // 'LANG_DEFAULT' => array( // 'Prompt' => "This is a new prompt for this option", // 'Help' => "This is some new help for this option which will be displayed in the popup window when the ? is clicked" diff --git a/web/lang/nl_nl.php b/web/lang/nl_nl.php index f7d6370da..3fa061165 100644 --- a/web/lang/nl_nl.php +++ b/web/lang/nl_nl.php @@ -130,7 +130,7 @@ $SLANG = array( 'BadFPSReportInterval' => 'FPS rapport interval buffer en aantal moet een nummer groter dan nul zijn', 'BadFormat' => 'Formaat moet een nummer nul of groter zijn', 'BadFrameSkip' => 'Frame skip aantal moet een nummer nul of groter zijn', - 'BadMotionFrameSkip' => 'Motion Frame skip count must be an integer of zero or more', + 'BadMotionFrameSkip' => 'Motion Frame skip count must be an integer of zero or more', 'BadHeight' => 'Hoogte moet een geldige waarde zijn', 'BadHost' => 'Host moet een juiste address or hostname zijn, laat http:// weg ', 'BadImageBufferCount' => 'Foto buffer groote moet een nummer 10 of groter zijn', @@ -151,7 +151,7 @@ $SLANG = array( 'BadWebColour' => 'Web kleur moeten een geldige webkleurwaarde bevatten', 'BadWidth' => 'Breedte moet ingevuld worden', 'Bandwidth' => 'Bandbreedte', - 'BandwidthHead' => 'Bandwidth', // This is the end of the bandwidth status on the top of the console, different in many language due to phrasing + 'BandwidthHead' => 'Bandwidth', // This is the end of the bandwidth status on the top of the console, different in many language due to phrasing 'BlobPx' => 'Blob px', 'BlobSizes' => 'Blob grootte', 'Blobs' => 'Blobs', @@ -319,12 +319,12 @@ $SLANG = array( 'First' => 'Eerste', 'FlippedHori' => 'Horizontaal gedraait', 'FlippedVert' => 'Vertikaal gedraait', - 'FnNone' => 'None', // Added 2013.08.16. - 'FnMonitor' => 'Monitor', // Added 2013.08.16. - 'FnModect' => 'Modect', // Added 2013.08.16. - 'FnRecord' => 'Record', // Added 2013.08.16. - 'FnMocord' => 'Mocord', // Added 2013.08.16. - 'FnNodect' => 'Nodect', // Added 2013.08.16. + 'FnNone' => 'None', // Added 2013.08.16. + 'FnMonitor' => 'Monitor', // Added 2013.08.16. + 'FnModect' => 'Modect', // Added 2013.08.16. + 'FnRecord' => 'Record', // Added 2013.08.16. + 'FnMocord' => 'Mocord', // Added 2013.08.16. + 'FnNodect' => 'Nodect', // Added 2013.08.16. 'Focus' => 'Focus', 'ForceAlarm' => 'Forceeer alarm', 'Format' => 'Formaat', @@ -332,7 +332,7 @@ $SLANG = array( 'FrameId' => 'Frame id', 'FrameRate' => 'Frame rate', 'FrameSkip' => 'Frame overgeslagen', - 'MotionFrameSkip' => 'Motion Frame Skip', + 'MotionFrameSkip' => 'Motion Frame Skip', 'Frames' => 'Frames', 'Func' => 'Func', 'Function' => 'Functie', @@ -376,6 +376,7 @@ $SLANG = array( 'Last' => 'Laatste', 'Layout' => 'Layout', // Added - 2009-02-08 'Level' => 'Nivo', // Added - 2011-06-16 + 'Libvlc' => 'Libvlc', 'LimitResultsPost' => 'resultaten;', // This is used at the end of the phrase 'Limit to first N results only' 'LimitResultsPre' => 'beperk tot eerste', // This is used at the beginning of the phrase 'Limit to first N results only' 'Line' => 'Lijn', // Added - 2011-06-16 @@ -469,11 +470,11 @@ $SLANG = array( 'Month' => 'Maand', 'More' => 'Meer', // Added - 2011-06-16 'Move' => 'Verplaats', - 'MtgDefault' => 'Default', // Added 2013.08.15. - 'Mtg2widgrd' => '2-wide grid', // Added 2013.08.15. - 'Mtg3widgrd' => '3-wide grid', // Added 2013.08.15. - 'Mtg4widgrd' => '4-wide grid', // Added 2013.08.15. - 'Mtg3widgrx' => '3-wide grid, scaled, enlarge on alarm', // Added 2013.08.15. + 'MtgDefault' => 'Default', // Added 2013.08.15. + 'Mtg2widgrd' => '2-wide grid', // Added 2013.08.15. + 'Mtg3widgrd' => '3-wide grid', // Added 2013.08.15. + 'Mtg4widgrd' => '4-wide grid', // Added 2013.08.15. + 'Mtg3widgrx' => '3-wide grid, scaled, enlarge on alarm', // Added 2013.08.15. 'MustBeGe' => 'Moet groter zijn of gelijk aan', 'MustBeLe' => 'Moet kleiner zijn of gelijk aan', 'MustConfirmPassword' => 'Je moet je wachtwoord bevestigen', @@ -641,10 +642,10 @@ $SLANG = array( 'TimeDelta' => 'Tijd Delta', 'TimeStamp' => 'Tijdstempel', 'Timeline' => 'Tijdslijn', - 'TimelineTip1' => 'Pass your mouse over the graph to view a snapshot image and event details.', // Added 2013.08.15. - 'TimelineTip2' => 'Click on the coloured sections of the graph, or the image, to view the event.', // Added 2013.08.15. - 'TimelineTip3' => 'Click on the background to zoom in to a smaller time period based around your click.', // Added 2013.08.15. - 'TimelineTip4' => 'Use the controls below to zoom out or navigate back and forward through the time range.', // Added 2013.08.15. + 'TimelineTip1' => 'Pass your mouse over the graph to view a snapshot image and event details.', // Added 2013.08.15. + 'TimelineTip2' => 'Click on the coloured sections of the graph, or the image, to view the event.', // Added 2013.08.15. + 'TimelineTip3' => 'Click on the background to zoom in to a smaller time period based around your click.', // Added 2013.08.15. + 'TimelineTip4' => 'Use the controls below to zoom out or navigate back and forward through the time range.', // Added 2013.08.15. 'Timestamp' => 'Tijdstempel', 'TimestampLabelFormat' => 'Tijdstempel Label Format', 'TimestampLabelX' => 'Tijdstempel Label X', @@ -853,6 +854,20 @@ function zmVlang( $langVarArray, $count ) // These overrides are in the form show below where the array key represents the option name minus the initial ZM_ // So for example, to override the help text for ZM_LANG_DEFAULT do $OLANG = array( + 'OPTIONS_FFMPEG' => array( + 'Help' => "Parameters in this field are passwd on to FFmpeg. Multiple parameters can be separated by ,~~ ". + "Examples (do not enter quotes)~~~~". + "\"rtsp_transport=tcp\" Use TCP instead of UDP for the data stream from the camera~~~~". + "\"rtsp_transport=http\" Use http tunneling for the data stream from the camera~~~~". + "\"loglevel=debug\" Set verbosiy of FFmpeg (quiet, panic, fatal, error, warning, info, verbose, debug)" + ), + 'OPTIONS_LIBVLC' => array( + 'Help' => "Parameters in this field are passwd on to libVLC. Multiple parameters can be separated by ,~~ ". + "Examples (do not enter quotes)~~~~". + "\"--rtsp-tcp\" Use TCP instead of UDP for the data stream from the camera~~~~". + "\"--verbose=2\" Set verbosity of libVLC" + ), + // 'LANG_DEFAULT' => array( // 'Prompt' => "This is a new prompt for this option", // 'Help' => "This is some new help for this option which will be displayed in the popup window when the ? is clicked" diff --git a/web/lang/pl_pl.php b/web/lang/pl_pl.php index 065966b5a..65117a977 100644 --- a/web/lang/pl_pl.php +++ b/web/lang/pl_pl.php @@ -379,6 +379,7 @@ $SLANG = array( 'Last' => 'Ostatni', 'Layout' => 'Layout', // Added - 2009-02-08 'Level' => 'Level', // Added - 2011-06-16 + 'Libvlc' => 'Libvlc', 'LimitResultsPost' => 'wynikw;', // This is used at the end of the phrase 'Limit to first N results only' 'LimitResultsPre' => 'Ogranicz do pocztkowych', // This is used at the beginning of the phrase 'Limit to first N results only' 'Line' => 'Line', // Added - 2011-06-16 @@ -838,6 +839,20 @@ function zmVlang( $langVarArray, $count ) // These overrides are in the form show below where the array key represents the option name minus the initial ZM_ // So for example, to override the help text for ZM_LANG_DEFAULT do $OLANG = array( + 'OPTIONS_FFMPEG' => array( + 'Help' => "Parameters in this field are passwd on to FFmpeg. Multiple parameters can be separated by ,~~ ". + "Examples (do not enter quotes)~~~~". + "\"rtsp_transport=tcp\" Use TCP instead of UDP for the data stream from the camera~~~~". + "\"rtsp_transport=http\" Use http tunneling for the data stream from the camera~~~~". + "\"loglevel=debug\" Set verbosiy of FFmpeg (quiet, panic, fatal, error, warning, info, verbose, debug)" + ), + 'OPTIONS_LIBVLC' => array( + 'Help' => "Parameters in this field are passwd on to libVLC. Multiple parameters can be separated by ,~~ ". + "Examples (do not enter quotes)~~~~". + "\"--rtsp-tcp\" Use TCP instead of UDP for the data stream from the camera~~~~". + "\"--verbose=2\" Set verbosity of libVLC" + ), + // 'LANG_DEFAULT' => array( // 'Prompt' => "This is a new prompt for this option", // 'Help' => "This is some new help for this option which will be displayed in the popup window when the ? is clicked" diff --git a/web/lang/pt_br.php b/web/lang/pt_br.php index f9dd90c1b..1deecf89b 100644 --- a/web/lang/pt_br.php +++ b/web/lang/pt_br.php @@ -319,6 +319,7 @@ $SLANG = array( 'Last' => 'ltimo', 'Layout' => 'Layout', // Added - 2009-02-08 'Level' => 'Level', // Added - 2011-06-16 + 'Libvlc' => 'Libvlc', 'LimitResultsPost' => 'resultados somente;', // This is used at the end of the phrase 'Limit to first N results only' 'LimitResultsPre' => 'Limitar aos primeiros', // This is used at the beginning of the phrase 'Limit to first N results only' 'Line' => 'Line', // Added - 2011-06-16 @@ -799,6 +800,20 @@ function zmVlang( $langVarArray, $count ) // These overrides are in the form show below where the array key represents the option name minus the initial ZM_ // So for example, to override the help text for ZM_LANG_DEFAULT do $OLANG = array( + 'OPTIONS_FFMPEG' => array( + 'Help' => "Parameters in this field are passwd on to FFmpeg. Multiple parameters can be separated by ,~~ ". + "Examples (do not enter quotes)~~~~". + "\"rtsp_transport=tcp\" Use TCP instead of UDP for the data stream from the camera~~~~". + "\"rtsp_transport=http\" Use http tunneling for the data stream from the camera~~~~". + "\"loglevel=debug\" Set verbosiy of FFmpeg (quiet, panic, fatal, error, warning, info, verbose, debug)" + ), + 'OPTIONS_LIBVLC' => array( + 'Help' => "Parameters in this field are passwd on to libVLC. Multiple parameters can be separated by ,~~ ". + "Examples (do not enter quotes)~~~~". + "\"--rtsp-tcp\" Use TCP instead of UDP for the data stream from the camera~~~~". + "\"--verbose=2\" Set verbosity of libVLC" + ), + // 'LANG_DEFAULT' => array( // 'Prompt' => "This is a new prompt for this option", // 'Help' => "This is some new help for this option which will be displayed in the popup window when the ? is clicked" diff --git a/web/lang/ro_ro.php b/web/lang/ro_ro.php old mode 100755 new mode 100644 index b48f3c2d7..8078d57e1 --- a/web/lang/ro_ro.php +++ b/web/lang/ro_ro.php @@ -350,6 +350,7 @@ $SLANG = array( 'Last' => 'Ultim', 'Layout' => 'Layout', // Added - 2009-02-08 'Level' => 'Level', // Added - 2011-06-16 + 'Libvlc' => 'Libvlc', 'LimitResultsPost' => 'rezultate', 'LimitResultsPre' => 'Limitează la primele', 'Line' => 'Line', // Added - 2011-06-16 @@ -1296,6 +1297,22 @@ $OLANG = array( 'Prompt' => "Cât de des (în secunde) se vor schimba imaginile în ciclul de monitorizare.", 'Help' => "Ciclul de monitorizare este metoda de schimbare continuă a imaginilor monitoarelor. Această opţiune determină cât de des va fi actulizat cu o nouă imagine." ), + +// Options on Monitor view + 'OPTIONS_FFMPEG' => array( + 'Help' => "Parameters in this field are passwd on to FFmpeg. Multiple parameters can be separated by ,~~ ". + "Examples (do not enter quotes)~~~~". + "\"rtsp_transport=tcp\" Use TCP instead of UDP for the data stream from the camera~~~~". + "\"rtsp_transport=http\" Use http tunneling for the data stream from the camera~~~~". + "\"loglevel=debug\" Set verbosiy of FFmpeg (quiet, panic, fatal, error, warning, info, verbose, debug)" + ), + 'OPTIONS_LIBVLC' => array( + 'Help' => "Parameters in this field are passwd on to libVLC. Multiple parameters can be separated by ,~~ ". + "Examples (do not enter quotes)~~~~". + "\"--rtsp-tcp\" Use TCP instead of UDP for the data stream from the camera~~~~". + "\"--verbose=2\" Set verbosity of libVLC" + ), + // End of Phone Bandwidth tab // ); diff --git a/web/lang/ru_ru.php b/web/lang/ru_ru.php index a64f6f75a..6e22e3113 100644 --- a/web/lang/ru_ru.php +++ b/web/lang/ru_ru.php @@ -379,6 +379,7 @@ $SLANG = array( 'Last' => '', 'Layout' => 'Layout', // Added - 2009-02-08 'Level' => 'Level', // Added - 2011-06-16 + 'Libvlc' => 'Libvlc', 'LimitResultsPost' => 'results only;', // This is used at the end of the phrase 'Limit to first N results only' 'LimitResultsPre' => 'Limit to first', // This is used at the beginning of the phrase 'Limit to first N results only' 'Line' => 'Line', // Added - 2011-06-16 @@ -858,6 +859,20 @@ function zmVlang( $langVarArray, $count ) // These overrides are in the form show below where the array key represents the option name minus the initial ZM_ // So for example, to override the help text for ZM_LANG_DEFAULT do $OLANG = array( + 'OPTIONS_FFMPEG' => array( + 'Help' => "Parameters in this field are passwd on to FFmpeg. Multiple parameters can be separated by ,~~ ". + "Examples (do not enter quotes)~~~~". + "\"rtsp_transport=tcp\" Use TCP instead of UDP for the data stream from the camera~~~~". + "\"rtsp_transport=http\" Use http tunneling for the data stream from the camera~~~~". + "\"loglevel=debug\" Set verbosiy of FFmpeg (quiet, panic, fatal, error, warning, info, verbose, debug)" + ), + 'OPTIONS_LIBVLC' => array( + 'Help' => "Parameters in this field are passwd on to libVLC. Multiple parameters can be separated by ,~~ ". + "Examples (do not enter quotes)~~~~". + "\"--rtsp-tcp\" Use TCP instead of UDP for the data stream from the camera~~~~". + "\"--verbose=2\" Set verbosity of libVLC" + ), + // 'LANG_DEFAULT' => array( // 'Prompt' => "This is a new prompt for this option", // 'Help' => "This is some new help for this option which will be displayed in the popup window when the ? is clicked" diff --git a/web/lang/se_se.php b/web/lang/se_se.php index f430a1d3a..65fd774e4 100644 --- a/web/lang/se_se.php +++ b/web/lang/se_se.php @@ -380,6 +380,7 @@ $SLANG = array( 'Last' => 'Sist', 'Layout' => 'Layout', // Added - 2009-02-08 'Level' => 'Level', // Added - 2011-06-16 + 'Libvlc' => 'Libvlc', 'LimitResultsPost' => 'resultaten;', // This is used at the end of the phrase 'Limit to first N results only' 'LimitResultsPre' => 'Begrnsa till frsta', // This is used at the beginning of the phrase 'Limit to first N results only' 'Line' => 'Line', // Added - 2011-06-16 diff --git a/web/skins/classic/views/monitor.php b/web/skins/classic/views/monitor.php index 03e444c71..996a3f34f 100644 --- a/web/skins/classic/views/monitor.php +++ b/web/skins/classic/views/monitor.php @@ -747,7 +747,7 @@ switch ( $tab ) { ?> - +  () diff --git a/web/skins/classic/views/optionhelp.php b/web/skins/classic/views/optionhelp.php index 5ac37527b..e02720b24 100644 --- a/web/skins/classic/views/optionhelp.php +++ b/web/skins/classic/views/optionhelp.php @@ -19,7 +19,7 @@ // $optionHelpIndex = preg_replace( '/^ZM_/', '', $_REQUEST['option'] ); -$optionHelpText = !empty($OLANG[$optionHelpIndex])?$OLANG[$optionHelpIndex]:$config[$_REQUEST['option']]['Help']; +$optionHelpText = !empty($OLANG[$optionHelpIndex])?$OLANG[$optionHelpIndex]['Help']:$config[$_REQUEST['option']]['Help']; $optionHelpText = validHtmlStr($optionHelpText); $optionHelpText = preg_replace( "/~~/", "
", $optionHelpText ); diff --git a/web/skins/classic/views/options.php b/web/skins/classic/views/options.php index d984b3248..a48db7da7 100644 --- a/web/skins/classic/views/options.php +++ b/web/skins/classic/views/options.php @@ -85,7 +85,7 @@ foreach ( $tabs as $name=>$value ) if($tab == 'skins') { $current_skin = $_COOKIE['zmSkin']; if (isset($_GET['skin-choice'])) { - setcookie('zmSkin',$_GET['skin-choice']); + setcookie('zmSkin',$_GET['skin-choice'], time()+3600*24*30*12*10 ); //header("Location: index.php?view=options&tab=skins&reset_parent=1"); echo ""; } @@ -210,7 +210,7 @@ else foreach ( $configCat as $name=>$value ) { $shortName = preg_replace( '/^ZM_/', '', $name ); - $optionPromptText = !empty($OLANG[$shortName])?$OLANG[$shortName]:$value['Prompt']; + $optionPromptText = !empty($OLANG[$shortName])?$OLANG[$shortName]['Prompt']:$value['Prompt']; ?> diff --git a/web/skins/flat/views/monitor.php b/web/skins/flat/views/monitor.php index 42d122886..fb4e279c0 100644 --- a/web/skins/flat/views/monitor.php +++ b/web/skins/flat/views/monitor.php @@ -748,7 +748,7 @@ switch ( $tab ) { ?> - + diff --git a/web/skins/flat/views/optionhelp.php b/web/skins/flat/views/optionhelp.php index 5ac37527b..e02720b24 100644 --- a/web/skins/flat/views/optionhelp.php +++ b/web/skins/flat/views/optionhelp.php @@ -19,7 +19,7 @@ // $optionHelpIndex = preg_replace( '/^ZM_/', '', $_REQUEST['option'] ); -$optionHelpText = !empty($OLANG[$optionHelpIndex])?$OLANG[$optionHelpIndex]:$config[$_REQUEST['option']]['Help']; +$optionHelpText = !empty($OLANG[$optionHelpIndex])?$OLANG[$optionHelpIndex]['Help']:$config[$_REQUEST['option']]['Help']; $optionHelpText = validHtmlStr($optionHelpText); $optionHelpText = preg_replace( "/~~/", "
", $optionHelpText ); diff --git a/web/skins/flat/views/options.php b/web/skins/flat/views/options.php index d984b3248..a48db7da7 100644 --- a/web/skins/flat/views/options.php +++ b/web/skins/flat/views/options.php @@ -85,7 +85,7 @@ foreach ( $tabs as $name=>$value ) if($tab == 'skins') { $current_skin = $_COOKIE['zmSkin']; if (isset($_GET['skin-choice'])) { - setcookie('zmSkin',$_GET['skin-choice']); + setcookie('zmSkin',$_GET['skin-choice'], time()+3600*24*30*12*10 ); //header("Location: index.php?view=options&tab=skins&reset_parent=1"); echo ""; } @@ -210,7 +210,7 @@ else foreach ( $configCat as $name=>$value ) { $shortName = preg_replace( '/^ZM_/', '', $name ); - $optionPromptText = !empty($OLANG[$shortName])?$OLANG[$shortName]:$value['Prompt']; + $optionPromptText = !empty($OLANG[$shortName])?$OLANG[$shortName]['Prompt']:$value['Prompt']; ?> From de107f77ba919d4f42c9c40745243dd144b27f0b Mon Sep 17 00:00:00 2001 From: m-bene Date: Sat, 17 May 2014 04:51:01 +0200 Subject: [PATCH 11/38] fix option help text for overlooked languages --- web/lang/es_es.php | 14 ++++++++++++++ web/lang/se_se.php | 14 ++++++++++++++ web/skins/classic/views/options.php | 2 +- web/skins/flat/views/options.php | 2 +- 4 files changed, 30 insertions(+), 2 deletions(-) diff --git a/web/lang/es_es.php b/web/lang/es_es.php index 5cf8be100..fd6912def 100644 --- a/web/lang/es_es.php +++ b/web/lang/es_es.php @@ -761,6 +761,20 @@ function zmVlang( $langVarArray, $count ) $OLANG = array( + 'OPTIONS_FFMPEG' => array( + 'Help' => "Parameters in this field are passwd on to FFmpeg. Multiple parameters can be separated by ,~~ ". + "Examples (do not enter quotes)~~~~". + "\"rtsp_transport=tcp\" Use TCP instead of UDP for the data stream from the camera~~~~". + "\"rtsp_transport=http\" Use http tunneling for the data stream from the camera~~~~". + "\"loglevel=debug\" Set verbosiy of FFmpeg (quiet, panic, fatal, error, warning, info, verbose, debug)" + ), + 'OPTIONS_LIBVLC' => array( + 'Help' => "Parameters in this field are passwd on to libVLC. Multiple parameters can be separated by ,~~ ". + "Examples (do not enter quotes)~~~~". + "\"--rtsp-tcp\" Use TCP instead of UDP for the data stream from the camera~~~~". + "\"--verbose=2\" Set verbosity of libVLC" + ), + ); ?> diff --git a/web/lang/se_se.php b/web/lang/se_se.php index 65fd774e4..2a5c1550f 100644 --- a/web/lang/se_se.php +++ b/web/lang/se_se.php @@ -864,6 +864,20 @@ $OLANG = array( 'Prompt' => "Vlj sprk fr ZoneMinder", 'Help' => "ZoneMinder kan anvnda annat sprk n engelska i menyer och texter. Vlj hr det sprk du vill anvnda till ZoneMinder." ), + 'OPTIONS_FFMPEG' => array( + 'Help' => "Parameters in this field are passwd on to FFmpeg. Multiple parameters can be separated by ,~~ ". + "Examples (do not enter quotes)~~~~". + "\"rtsp_transport=tcp\" Use TCP instead of UDP for the data stream from the camera~~~~". + "\"rtsp_transport=http\" Use http tunneling for the data stream from the camera~~~~". + "\"loglevel=debug\" Set verbosiy of FFmpeg (quiet, panic, fatal, error, warning, info, verbose, debug)" + ), + 'OPTIONS_LIBVLC' => array( + 'Help' => "Parameters in this field are passwd on to libVLC. Multiple parameters can be separated by ,~~ ". + "Examples (do not enter quotes)~~~~". + "\"--rtsp-tcp\" Use TCP instead of UDP for the data stream from the camera~~~~". + "\"--verbose=2\" Set verbosity of libVLC" + ), + ); ?> diff --git a/web/skins/classic/views/options.php b/web/skins/classic/views/options.php index a48db7da7..a322bbb0a 100644 --- a/web/skins/classic/views/options.php +++ b/web/skins/classic/views/options.php @@ -85,7 +85,7 @@ foreach ( $tabs as $name=>$value ) if($tab == 'skins') { $current_skin = $_COOKIE['zmSkin']; if (isset($_GET['skin-choice'])) { - setcookie('zmSkin',$_GET['skin-choice'], time()+3600*24*30*12*10 ); + setcookie('zmSkin',$_GET['skin-choice'] ); //header("Location: index.php?view=options&tab=skins&reset_parent=1"); echo ""; } diff --git a/web/skins/flat/views/options.php b/web/skins/flat/views/options.php index a48db7da7..a322bbb0a 100644 --- a/web/skins/flat/views/options.php +++ b/web/skins/flat/views/options.php @@ -85,7 +85,7 @@ foreach ( $tabs as $name=>$value ) if($tab == 'skins') { $current_skin = $_COOKIE['zmSkin']; if (isset($_GET['skin-choice'])) { - setcookie('zmSkin',$_GET['skin-choice'], time()+3600*24*30*12*10 ); + setcookie('zmSkin',$_GET['skin-choice'] ); //header("Location: index.php?view=options&tab=skins&reset_parent=1"); echo ""; } From f62afdb8ccbe9c9b313e876de5e6b395b40e9ccb Mon Sep 17 00:00:00 2001 From: m-bene Date: Sat, 17 May 2014 20:41:22 +0200 Subject: [PATCH 12/38] add select list for rtsp method for ffmpeg and libvlc --- src/zm_ffmpeg_camera.cpp | 13 ++++++++++++- src/zm_ffmpeg_camera.h | 4 +++- src/zm_libvlc_camera.cpp | 11 ++++++++++- src/zm_libvlc_camera.h | 4 +++- src/zm_monitor.cpp | 8 ++++++-- web/skins/classic/views/monitor.php | 5 +++-- web/skins/classic/views/options.php | 2 +- web/skins/flat/views/monitor.php | 5 +++-- web/skins/flat/views/options.php | 2 +- 9 files changed, 42 insertions(+), 12 deletions(-) diff --git a/src/zm_ffmpeg_camera.cpp b/src/zm_ffmpeg_camera.cpp index 42ae3c748..9a61fc889 100644 --- a/src/zm_ffmpeg_camera.cpp +++ b/src/zm_ffmpeg_camera.cpp @@ -23,9 +23,10 @@ #include "zm_ffmpeg_camera.h" -FfmpegCamera::FfmpegCamera( int p_id, const std::string &p_path, const std::string &p_options, int p_width, int p_height, int p_colours, int p_brightness, int p_contrast, int p_hue, int p_colour, bool p_capture ) : +FfmpegCamera::FfmpegCamera( int p_id, const std::string &p_path, const std::string &p_method, const std::string &p_options, int p_width, int p_height, int p_colours, int p_brightness, int p_contrast, int p_hue, int p_colour, bool p_capture ) : Camera( p_id, FFMPEG_SRC, p_width, p_height, p_colours, ZM_SUBPIX_ORDER_DEFAULT_FOR_COLOUR(p_colours), p_brightness, p_contrast, p_hue, p_colour, p_capture ), mPath( p_path ), + mMethod( p_method ), mOptions( p_options ) { if ( capture ) @@ -121,6 +122,15 @@ int FfmpegCamera::PrimeCapture() // Handle options AVDictionary *opts = 0; StringVector opVect = split(Options(), ","); + + // Set transport method as specified by method field, rtpUni is default + if ( Method() == "rtpMulti" ) + opVect.add("rtsp_transport=udp_multicast"); + else if ( Method() == "rtpRtsp" ) + opVect.add("rtsp_transport=tcp"); + else if ( Method() == "rtpRtspHttp" ) + opVect.add("rtsp_transport=http"); + Debug(2, "Number of Options: %d",opVect.size()); for (size_t i=0; i 0) { diff --git a/src/zm_libvlc_camera.h b/src/zm_libvlc_camera.h index 45a1e029f..96414cb88 100644 --- a/src/zm_libvlc_camera.h +++ b/src/zm_libvlc_camera.h @@ -45,6 +45,7 @@ class LibvlcCamera : public Camera { protected: std::string mPath; + std::string mMethod; std::string mOptions; char **mOptArgV; LibvlcPrivateData mLibvlcData; @@ -56,11 +57,12 @@ protected: libvlc_media_player_t *mLibvlcMediaPlayer; public: - LibvlcCamera( int p_id, const std::string &path, const std::string &p_options, int p_width, int p_height, int p_colours, int p_brightness, int p_contrast, int p_hue, int p_colour, bool p_capture ); + LibvlcCamera( int p_id, const std::string &path, const std::string &p_method, const std::string &p_options, int p_width, int p_height, int p_colours, int p_brightness, int p_contrast, int p_hue, int p_colour, bool p_capture ); ~LibvlcCamera(); const std::string &Path() const { return( mPath ); } const std::string &Options() const { return( mOptions ); } + const std::string &Method() const { return( mMethod ); } void Initialise(); void Terminate(); diff --git a/src/zm_monitor.cpp b/src/zm_monitor.cpp index 479ea6c4b..bc9c3ec08 100644 --- a/src/zm_monitor.cpp +++ b/src/zm_monitor.cpp @@ -2291,11 +2291,11 @@ int Monitor::LoadFfmpegMonitors( const char *file, Monitor **&monitors, Purpose static char sql[ZM_SQL_MED_BUFSIZ]; if ( !file[0] ) { - strncpy( sql, "select Id, Name, Function+0, Enabled, LinkedMonitors, Path, Options, Width, Height, Colours, Palette, Orientation+0, Deinterlacing, Brightness, Contrast, Hue, Colour, EventPrefix, LabelFormat, LabelX, LabelY, ImageBufferCount, WarmupCount, PreEventCount, PostEventCount, StreamReplayBuffer, AlarmFrameCount, SectionLength, FrameSkip, MotionFrameSkip, MaxFPS, AlarmMaxFPS, FPSReportInterval, RefBlendPerc, AlarmRefBlendPerc, TrackMotion from Monitors where Function != 'None' and Type = 'Ffmpeg'", sizeof(sql) ); + strncpy( sql, "select Id, Name, Function+0, Enabled, LinkedMonitors, Path, Method, Options, Width, Height, Colours, Palette, Orientation+0, Deinterlacing, Brightness, Contrast, Hue, Colour, EventPrefix, LabelFormat, LabelX, LabelY, ImageBufferCount, WarmupCount, PreEventCount, PostEventCount, StreamReplayBuffer, AlarmFrameCount, SectionLength, FrameSkip, MotionFrameSkip, MaxFPS, AlarmMaxFPS, FPSReportInterval, RefBlendPerc, AlarmRefBlendPerc, TrackMotion from Monitors where Function != 'None' and Type = 'Ffmpeg'", sizeof(sql) ); } else { - snprintf( sql, sizeof(sql), "select Id, Name, Function+0, Enabled, LinkedMonitors, Path, Options, Width, Height, Colours, Palette, Orientation+0, Deinterlacing, Brightness, Contrast, Hue, Colour, EventPrefix, LabelFormat, LabelX, LabelY, ImageBufferCount, WarmupCount, PreEventCount, PostEventCount, StreamReplayBuffer, AlarmFrameCount, SectionLength, FrameSkip, MotionFrameSkip, MaxFPS, AlarmMaxFPS, FPSReportInterval, RefBlendPerc, AlarmRefBlendPerc, TrackMotion from Monitors where Function != 'None' and Type = 'Ffmpeg' and Path = '%s'", file ); + snprintf( sql, sizeof(sql), "select Id, Name, Function+0, Enabled, LinkedMonitors, Path, Method, Options, Width, Height, Colours, Palette, Orientation+0, Deinterlacing, Brightness, Contrast, Hue, Colour, EventPrefix, LabelFormat, LabelX, LabelY, ImageBufferCount, WarmupCount, PreEventCount, PostEventCount, StreamReplayBuffer, AlarmFrameCount, SectionLength, FrameSkip, MotionFrameSkip, MaxFPS, AlarmMaxFPS, FPSReportInterval, RefBlendPerc, AlarmRefBlendPerc, TrackMotion from Monitors where Function != 'None' and Type = 'Ffmpeg' and Path = '%s'", file ); } if ( mysql_query( &dbconn, sql ) ) { @@ -2324,6 +2324,7 @@ int Monitor::LoadFfmpegMonitors( const char *file, Monitor **&monitors, Purpose const char *linked_monitors = dbrow[col]; col++; const char *path = dbrow[col]; col++; + const char *method = dbrow[col]; col++; const char *options = dbrow[col]; col++; int width = atoi(dbrow[col]); col++; @@ -2365,6 +2366,7 @@ int Monitor::LoadFfmpegMonitors( const char *file, Monitor **&monitors, Purpose Camera *camera = new FfmpegCamera( id, path, // File + method, options, cam_width, cam_height, @@ -2605,6 +2607,7 @@ Monitor *Monitor::Load( int id, bool load_zones, Purpose purpose ) camera = new FfmpegCamera( id, path.c_str(), + method, options, cam_width, cam_height, @@ -2625,6 +2628,7 @@ Monitor *Monitor::Load( int id, bool load_zones, Purpose purpose ) camera = new LibvlcCamera( id, path.c_str(), + method, options, cam_width, cam_height, diff --git a/web/skins/classic/views/monitor.php b/web/skins/classic/views/monitor.php index 996a3f34f..070d78a3d 100644 --- a/web/skins/classic/views/monitor.php +++ b/web/skins/classic/views/monitor.php @@ -1,7 +1,7 @@ "/> @@ -747,6 +747,7 @@ switch ( $tab ) { ?> +  () $value ) if($tab == 'skins') { $current_skin = $_COOKIE['zmSkin']; if (isset($_GET['skin-choice'])) { - setcookie('zmSkin',$_GET['skin-choice'] ); + setcookie('zmSkin',$_GET['skin-choice']); //header("Location: index.php?view=options&tab=skins&reset_parent=1"); echo ""; } diff --git a/web/skins/flat/views/monitor.php b/web/skins/flat/views/monitor.php index fb4e279c0..4d88b839a 100644 --- a/web/skins/flat/views/monitor.php +++ b/web/skins/flat/views/monitor.php @@ -502,7 +502,7 @@ if ( $tab != 'source' || $newMonitor['Type'] != 'Remote' ) @@ -748,7 +748,8 @@ switch ( $tab ) { ?> - + +  () diff --git a/web/skins/flat/views/options.php b/web/skins/flat/views/options.php index a322bbb0a..aeb17e3cb 100644 --- a/web/skins/flat/views/options.php +++ b/web/skins/flat/views/options.php @@ -85,7 +85,7 @@ foreach ( $tabs as $name=>$value ) if($tab == 'skins') { $current_skin = $_COOKIE['zmSkin']; if (isset($_GET['skin-choice'])) { - setcookie('zmSkin',$_GET['skin-choice'] ); + setcookie('zmSkin',$_GET['skin-choice']); //header("Location: index.php?view=options&tab=skins&reset_parent=1"); echo ""; } From a81b9b8ce250b42b7c4352fe293b766f36c8943a Mon Sep 17 00:00:00 2001 From: m-bene Date: Sat, 17 May 2014 21:48:08 +0200 Subject: [PATCH 13/38] change examples for options --- src/zm_ffmpeg_camera.cpp | 6 +++--- src/zm_libvlc_camera.cpp | 6 +++--- web/lang/big5_big5.php | 6 +++--- web/lang/cn_zh.php | 6 +++--- web/lang/cs_cz.php | 6 +++--- web/lang/de_de.php | 18 +++++++++--------- web/lang/dk_dk.php | 6 +++--- web/lang/en_gb.php | 6 +++--- web/lang/es_ar.php | 6 +++--- web/lang/es_es.php | 6 +++--- web/lang/et_ee.php | 6 +++--- web/lang/fr_fr.php | 6 +++--- web/lang/he_il.php | 6 +++--- web/lang/hu_hu.php | 6 +++--- web/lang/it_it.php | 7 ++++--- web/lang/ja_jp.php | 6 +++--- web/lang/nl_nl.php | 6 +++--- web/lang/pl_pl.php | 6 +++--- web/lang/pt_br.php | 6 +++--- web/lang/ro_ro.php | 7 ++++--- web/lang/ru_ru.php | 6 +++--- web/lang/se_se.php | 6 +++--- 22 files changed, 74 insertions(+), 72 deletions(-) diff --git a/src/zm_ffmpeg_camera.cpp b/src/zm_ffmpeg_camera.cpp index 9a61fc889..81e6b2b51 100644 --- a/src/zm_ffmpeg_camera.cpp +++ b/src/zm_ffmpeg_camera.cpp @@ -125,11 +125,11 @@ int FfmpegCamera::PrimeCapture() // Set transport method as specified by method field, rtpUni is default if ( Method() == "rtpMulti" ) - opVect.add("rtsp_transport=udp_multicast"); + opVect.push_back("rtsp_transport=udp_multicast"); else if ( Method() == "rtpRtsp" ) - opVect.add("rtsp_transport=tcp"); + opVect.push_back("rtsp_transport=tcp"); else if ( Method() == "rtpRtspHttp" ) - opVect.add("rtsp_transport=http"); + opVect.push_back("rtsp_transport=http"); Debug(2, "Number of Options: %d",opVect.size()); for (size_t i=0; i 0) { diff --git a/web/lang/big5_big5.php b/web/lang/big5_big5.php index 5ba7860e6..f218109c1 100644 --- a/web/lang/big5_big5.php +++ b/web/lang/big5_big5.php @@ -867,14 +867,14 @@ $OLANG = array( 'OPTIONS_FFMPEG' => array( 'Help' => "Parameters in this field are passwd on to FFmpeg. Multiple parameters can be separated by ,~~ ". "Examples (do not enter quotes)~~~~". - "\"rtsp_transport=tcp\" Use TCP instead of UDP for the data stream from the camera~~~~". - "\"rtsp_transport=http\" Use http tunneling for the data stream from the camera~~~~". + "\"allowed_media_types=video\" Set datatype to request fromcam (audio, video, data)~~~~". + "\"reorder_queue_size=nnn\" Set number of packets to buffer for handling of reordered packets~~~~". "\"loglevel=debug\" Set verbosiy of FFmpeg (quiet, panic, fatal, error, warning, info, verbose, debug)" ), 'OPTIONS_LIBVLC' => array( 'Help' => "Parameters in this field are passwd on to libVLC. Multiple parameters can be separated by ,~~ ". "Examples (do not enter quotes)~~~~". - "\"--rtsp-tcp\" Use TCP instead of UDP for the data stream from the camera~~~~". + "\"--rtp-client-port=nnn\" Set local port to use for rtp data~~~~". "\"--verbose=2\" Set verbosity of libVLC" ), diff --git a/web/lang/cn_zh.php b/web/lang/cn_zh.php index 96e306c68..b0b76ba93 100644 --- a/web/lang/cn_zh.php +++ b/web/lang/cn_zh.php @@ -862,14 +862,14 @@ $OLANG = array( 'OPTIONS_FFMPEG' => array( 'Help' => "Parameters in this field are passwd on to FFmpeg. Multiple parameters can be separated by ,~~ ". "Examples (do not enter quotes)~~~~". - "\"rtsp_transport=tcp\" Use TCP instead of UDP for the data stream from the camera~~~~". - "\"rtsp_transport=http\" Use http tunneling for the data stream from the camera~~~~". + "\"allowed_media_types=video\" Set datatype to request fromcam (audio, video, data)~~~~". + "\"reorder_queue_size=nnn\" Set number of packets to buffer for handling of reordered packets~~~~". "\"loglevel=debug\" Set verbosiy of FFmpeg (quiet, panic, fatal, error, warning, info, verbose, debug)" ), 'OPTIONS_LIBVLC' => array( 'Help' => "Parameters in this field are passwd on to libVLC. Multiple parameters can be separated by ,~~ ". "Examples (do not enter quotes)~~~~". - "\"--rtsp-tcp\" Use TCP instead of UDP for the data stream from the camera~~~~". + "\"--rtp-client-port=nnn\" Set local port to use for rtp data~~~~". "\"--verbose=2\" Set verbosity of libVLC" ), diff --git a/web/lang/cs_cz.php b/web/lang/cs_cz.php index 445989fbb..3d996b003 100644 --- a/web/lang/cs_cz.php +++ b/web/lang/cs_cz.php @@ -863,14 +863,14 @@ $OLANG = array( 'OPTIONS_FFMPEG' => array( 'Help' => "Parameters in this field are passwd on to FFmpeg. Multiple parameters can be separated by ,~~ ". "Examples (do not enter quotes)~~~~". - "\"rtsp_transport=tcp\" Use TCP instead of UDP for the data stream from the camera~~~~". - "\"rtsp_transport=http\" Use http tunneling for the data stream from the camera~~~~". + "\"allowed_media_types=video\" Set datatype to request fromcam (audio, video, data)~~~~". + "\"reorder_queue_size=nnn\" Set number of packets to buffer for handling of reordered packets~~~~". "\"loglevel=debug\" Set verbosiy of FFmpeg (quiet, panic, fatal, error, warning, info, verbose, debug)" ), 'OPTIONS_LIBVLC' => array( 'Help' => "Parameters in this field are passwd on to libVLC. Multiple parameters can be separated by ,~~ ". "Examples (do not enter quotes)~~~~". - "\"--rtsp-tcp\" Use TCP instead of UDP for the data stream from the camera~~~~". + "\"--rtp-client-port=nnn\" Set local port to use for rtp data~~~~". "\"--verbose=2\" Set verbosity of libVLC" ), diff --git a/web/lang/de_de.php b/web/lang/de_de.php index 02816eb08..28002aec8 100644 --- a/web/lang/de_de.php +++ b/web/lang/de_de.php @@ -861,17 +861,17 @@ function zmVlang( $langVarArray, $count ) // So for example, to override the help text for ZM_LANG_DEFAULT do $OLANG = array( 'OPTIONS_FFMPEG' => array( - 'Help' => "Im Feld Optionen knnen Parameter angegeben werden, die direkt an FFmpeg weitergegeben werden. Mehrere Parameter knnen mit , getrennt werden. ". - "Einige Bespiele: (Anfhrungszeichen nicht eingeben)~~~~". - "\"rtsp_transport=tcp\" Verwenden von TCP statt UDP fr die bermittlung des Datenstroms von der Kamera~~~~". - "\"rtsp_transport=http\" Verwenden von http tunneling fr die bermittlung des Datenstroms von der Kamera~~~~". - "\"loglevel=debug\" Gibt an wie viele Status/Debug Meldungen angezeigt werden sollen (quiet, panic, fatal, error, warning, info, verbose, debug)" + 'Help' => "Parameters in this field are passwd on to FFmpeg. Multiple parameters can be separated by ,~~ ". + "Examples (do not enter quotes)~~~~". + "\"allowed_media_types=video\" Set datatype to request fromcam (audio, video, data)~~~~". + "\"reorder_queue_size=nnn\" Set number of packets to buffer for handling of reordered packets~~~~". + "\"loglevel=debug\" Set verbosiy of FFmpeg (quiet, panic, fatal, error, warning, info, verbose, debug)" ), 'OPTIONS_LIBVLC' => array( - 'Help' => "Im Feld Optionen knnen Parameter angegeben werden, die direkt an Libvlc weitergegeben werden. Mehrere Parameter knnen mit , getrennt werden. ". - "Einige Bespiele: (Anfhrungszeichen nicht eingeben)~~~~". - "\"--rtsp-tcp\" Verwenden von TCP statt UDP fr die bermittlung des Datenstroms von der Kamera~~~~". - "\"--verbose=2\" Gibt an wie viele Status/Debug Meldungen angezeigt werden sollen" + 'Help' => "Parameters in this field are passwd on to libVLC. Multiple parameters can be separated by ,~~ ". + "Examples (do not enter quotes)~~~~". + "\"--rtp-client-port=nnn\" Set local port to use for rtp data~~~~". + "\"--verbose=2\" Set verbosity of libVLC" ), // 'LANG_DEFAULT' => array( diff --git a/web/lang/dk_dk.php b/web/lang/dk_dk.php index a0cbd1817..927440513 100644 --- a/web/lang/dk_dk.php +++ b/web/lang/dk_dk.php @@ -864,14 +864,14 @@ $OLANG = array( 'OPTIONS_FFMPEG' => array( 'Help' => "Parameters in this field are passwd on to FFmpeg. Multiple parameters can be separated by ,~~ ". "Examples (do not enter quotes)~~~~". - "\"rtsp_transport=tcp\" Use TCP instead of UDP for the data stream from the camera~~~~". - "\"rtsp_transport=http\" Use http tunneling for the data stream from the camera~~~~". + "\"allowed_media_types=video\" Set datatype to request fromcam (audio, video, data)~~~~". + "\"reorder_queue_size=nnn\" Set number of packets to buffer for handling of reordered packets~~~~". "\"loglevel=debug\" Set verbosiy of FFmpeg (quiet, panic, fatal, error, warning, info, verbose, debug)" ), 'OPTIONS_LIBVLC' => array( 'Help' => "Parameters in this field are passwd on to libVLC. Multiple parameters can be separated by ,~~ ". "Examples (do not enter quotes)~~~~". - "\"--rtsp-tcp\" Use TCP instead of UDP for the data stream from the camera~~~~". + "\"--rtp-client-port=nnn\" Set local port to use for rtp data~~~~". "\"--verbose=2\" Set verbosity of libVLC" ), diff --git a/web/lang/en_gb.php b/web/lang/en_gb.php index 84fef6e9d..75082e541 100644 --- a/web/lang/en_gb.php +++ b/web/lang/en_gb.php @@ -863,14 +863,14 @@ $OLANG = array( 'OPTIONS_FFMPEG' => array( 'Help' => "Parameters in this field are passwd on to FFmpeg. Multiple parameters can be separated by ,~~ ". "Examples (do not enter quotes)~~~~". - "\"rtsp_transport=tcp\" Use TCP instead of UDP for the data stream from the camera~~~~". - "\"rtsp_transport=http\" Use http tunneling for the data stream from the camera~~~~". + "\"allowed_media_types=video\" Set datatype to request fromcam (audio, video, data)~~~~". + "\"reorder_queue_size=nnn\" Set number of packets to buffer for handling of reordered packets~~~~". "\"loglevel=debug\" Set verbosiy of FFmpeg (quiet, panic, fatal, error, warning, info, verbose, debug)" ), 'OPTIONS_LIBVLC' => array( 'Help' => "Parameters in this field are passwd on to libVLC. Multiple parameters can be separated by ,~~ ". "Examples (do not enter quotes)~~~~". - "\"--rtsp-tcp\" Use TCP instead of UDP for the data stream from the camera~~~~". + "\"--rtp-client-port=nnn\" Set local port to use for rtp data~~~~". "\"--verbose=2\" Set verbosity of libVLC" ), diff --git a/web/lang/es_ar.php b/web/lang/es_ar.php index 96fd1dd18..ee1508723 100644 --- a/web/lang/es_ar.php +++ b/web/lang/es_ar.php @@ -720,14 +720,14 @@ $OLANG = array( 'OPTIONS_FFMPEG' => array( 'Help' => "Parameters in this field are passwd on to FFmpeg. Multiple parameters can be separated by ,~~ ". "Examples (do not enter quotes)~~~~". - "\"rtsp_transport=tcp\" Use TCP instead of UDP for the data stream from the camera~~~~". - "\"rtsp_transport=http\" Use http tunneling for the data stream from the camera~~~~". + "\"allowed_media_types=video\" Set datatype to request fromcam (audio, video, data)~~~~". + "\"reorder_queue_size=nnn\" Set number of packets to buffer for handling of reordered packets~~~~". "\"loglevel=debug\" Set verbosiy of FFmpeg (quiet, panic, fatal, error, warning, info, verbose, debug)" ), 'OPTIONS_LIBVLC' => array( 'Help' => "Parameters in this field are passwd on to libVLC. Multiple parameters can be separated by ,~~ ". "Examples (do not enter quotes)~~~~". - "\"--rtsp-tcp\" Use TCP instead of UDP for the data stream from the camera~~~~". + "\"--rtp-client-port=nnn\" Set local port to use for rtp data~~~~". "\"--verbose=2\" Set verbosity of libVLC" ), diff --git a/web/lang/es_es.php b/web/lang/es_es.php index fd6912def..1e80f6500 100644 --- a/web/lang/es_es.php +++ b/web/lang/es_es.php @@ -764,14 +764,14 @@ $OLANG = array( 'OPTIONS_FFMPEG' => array( 'Help' => "Parameters in this field are passwd on to FFmpeg. Multiple parameters can be separated by ,~~ ". "Examples (do not enter quotes)~~~~". - "\"rtsp_transport=tcp\" Use TCP instead of UDP for the data stream from the camera~~~~". - "\"rtsp_transport=http\" Use http tunneling for the data stream from the camera~~~~". + "\"allowed_media_types=video\" Set datatype to request fromcam (audio, video, data)~~~~". + "\"reorder_queue_size=nnn\" Set number of packets to buffer for handling of reordered packets~~~~". "\"loglevel=debug\" Set verbosiy of FFmpeg (quiet, panic, fatal, error, warning, info, verbose, debug)" ), 'OPTIONS_LIBVLC' => array( 'Help' => "Parameters in this field are passwd on to libVLC. Multiple parameters can be separated by ,~~ ". "Examples (do not enter quotes)~~~~". - "\"--rtsp-tcp\" Use TCP instead of UDP for the data stream from the camera~~~~". + "\"--rtp-client-port=nnn\" Set local port to use for rtp data~~~~". "\"--verbose=2\" Set verbosity of libVLC" ), diff --git a/web/lang/et_ee.php b/web/lang/et_ee.php index 346a1d225..b4cfa6b44 100644 --- a/web/lang/et_ee.php +++ b/web/lang/et_ee.php @@ -856,14 +856,14 @@ $OLANG = array( 'OPTIONS_FFMPEG' => array( 'Help' => "Parameters in this field are passwd on to FFmpeg. Multiple parameters can be separated by ,~~ ". "Examples (do not enter quotes)~~~~". - "\"rtsp_transport=tcp\" Use TCP instead of UDP for the data stream from the camera~~~~". - "\"rtsp_transport=http\" Use http tunneling for the data stream from the camera~~~~". + "\"allowed_media_types=video\" Set datatype to request fromcam (audio, video, data)~~~~". + "\"reorder_queue_size=nnn\" Set number of packets to buffer for handling of reordered packets~~~~". "\"loglevel=debug\" Set verbosiy of FFmpeg (quiet, panic, fatal, error, warning, info, verbose, debug)" ), 'OPTIONS_LIBVLC' => array( 'Help' => "Parameters in this field are passwd on to libVLC. Multiple parameters can be separated by ,~~ ". "Examples (do not enter quotes)~~~~". - "\"--rtsp-tcp\" Use TCP instead of UDP for the data stream from the camera~~~~". + "\"--rtp-client-port=nnn\" Set local port to use for rtp data~~~~". "\"--verbose=2\" Set verbosity of libVLC" ), diff --git a/web/lang/fr_fr.php b/web/lang/fr_fr.php index 4715d856c..0bc09ff40 100644 --- a/web/lang/fr_fr.php +++ b/web/lang/fr_fr.php @@ -863,14 +863,14 @@ $OLANG = array( 'OPTIONS_FFMPEG' => array( 'Help' => "Parameters in this field are passwd on to FFmpeg. Multiple parameters can be separated by ,~~ ". "Examples (do not enter quotes)~~~~". - "\"rtsp_transport=tcp\" Use TCP instead of UDP for the data stream from the camera~~~~". - "\"rtsp_transport=http\" Use http tunneling for the data stream from the camera~~~~". + "\"allowed_media_types=video\" Set datatype to request fromcam (audio, video, data)~~~~". + "\"reorder_queue_size=nnn\" Set number of packets to buffer for handling of reordered packets~~~~". "\"loglevel=debug\" Set verbosiy of FFmpeg (quiet, panic, fatal, error, warning, info, verbose, debug)" ), 'OPTIONS_LIBVLC' => array( 'Help' => "Parameters in this field are passwd on to libVLC. Multiple parameters can be separated by ,~~ ". "Examples (do not enter quotes)~~~~". - "\"--rtsp-tcp\" Use TCP instead of UDP for the data stream from the camera~~~~". + "\"--rtp-client-port=nnn\" Set local port to use for rtp data~~~~". "\"--verbose=2\" Set verbosity of libVLC" ), diff --git a/web/lang/he_il.php b/web/lang/he_il.php index 81fe3d37e..83f165cef 100644 --- a/web/lang/he_il.php +++ b/web/lang/he_il.php @@ -863,14 +863,14 @@ $OLANG = array( 'OPTIONS_FFMPEG' => array( 'Help' => "Parameters in this field are passwd on to FFmpeg. Multiple parameters can be separated by ,~~ ". "Examples (do not enter quotes)~~~~". - "\"rtsp_transport=tcp\" Use TCP instead of UDP for the data stream from the camera~~~~". - "\"rtsp_transport=http\" Use http tunneling for the data stream from the camera~~~~". + "\"allowed_media_types=video\" Set datatype to request fromcam (audio, video, data)~~~~". + "\"reorder_queue_size=nnn\" Set number of packets to buffer for handling of reordered packets~~~~". "\"loglevel=debug\" Set verbosiy of FFmpeg (quiet, panic, fatal, error, warning, info, verbose, debug)" ), 'OPTIONS_LIBVLC' => array( 'Help' => "Parameters in this field are passwd on to libVLC. Multiple parameters can be separated by ,~~ ". "Examples (do not enter quotes)~~~~". - "\"--rtsp-tcp\" Use TCP instead of UDP for the data stream from the camera~~~~". + "\"--rtp-client-port=nnn\" Set local port to use for rtp data~~~~". "\"--verbose=2\" Set verbosity of libVLC" ), diff --git a/web/lang/hu_hu.php b/web/lang/hu_hu.php index 5753d2e6c..130899a27 100644 --- a/web/lang/hu_hu.php +++ b/web/lang/hu_hu.php @@ -901,14 +901,14 @@ $OLANG = array( 'OPTIONS_FFMPEG' => array( 'Help' => "Parameters in this field are passwd on to FFmpeg. Multiple parameters can be separated by ,~~ ". "Examples (do not enter quotes)~~~~". - "\"rtsp_transport=tcp\" Use TCP instead of UDP for the data stream from the camera~~~~". - "\"rtsp_transport=http\" Use http tunneling for the data stream from the camera~~~~". + "\"allowed_media_types=video\" Set datatype to request fromcam (audio, video, data)~~~~". + "\"reorder_queue_size=nnn\" Set number of packets to buffer for handling of reordered packets~~~~". "\"loglevel=debug\" Set verbosiy of FFmpeg (quiet, panic, fatal, error, warning, info, verbose, debug)" ), 'OPTIONS_LIBVLC' => array( 'Help' => "Parameters in this field are passwd on to libVLC. Multiple parameters can be separated by ,~~ ". "Examples (do not enter quotes)~~~~". - "\"--rtsp-tcp\" Use TCP instead of UDP for the data stream from the camera~~~~". + "\"--rtp-client-port=nnn\" Set local port to use for rtp data~~~~". "\"--verbose=2\" Set verbosity of libVLC" ), diff --git a/web/lang/it_it.php b/web/lang/it_it.php index d6cc2e1bf..8842cfacf 100644 --- a/web/lang/it_it.php +++ b/web/lang/it_it.php @@ -868,16 +868,17 @@ $OLANG = array( 'OPTIONS_FFMPEG' => array( 'Help' => "Parameters in this field are passwd on to FFmpeg. Multiple parameters can be separated by ,~~ ". "Examples (do not enter quotes)~~~~". - "\"rtsp_transport=tcp\" Use TCP instead of UDP for the data stream from the camera~~~~". - "\"rtsp_transport=http\" Use http tunneling for the data stream from the camera~~~~". + "\"allowed_media_types=video\" Set datatype to request fromcam (audio, video, data)~~~~". + "\"reorder_queue_size=nnn\" Set number of packets to buffer for handling of reordered packets~~~~". "\"loglevel=debug\" Set verbosiy of FFmpeg (quiet, panic, fatal, error, warning, info, verbose, debug)" ), 'OPTIONS_LIBVLC' => array( 'Help' => "Parameters in this field are passwd on to libVLC. Multiple parameters can be separated by ,~~ ". "Examples (do not enter quotes)~~~~". - "\"--rtsp-tcp\" Use TCP instead of UDP for the data stream from the camera~~~~". + "\"--rtp-client-port=nnn\" Set local port to use for rtp data~~~~". "\"--verbose=2\" Set verbosity of libVLC" ), + // 'LANG_DEFAULT' => array( // 'Prompt' => "This is a new prompt for this option", diff --git a/web/lang/ja_jp.php b/web/lang/ja_jp.php index 78c3fad4c..89f19bb1d 100644 --- a/web/lang/ja_jp.php +++ b/web/lang/ja_jp.php @@ -863,14 +863,14 @@ $OLANG = array( 'OPTIONS_FFMPEG' => array( 'Help' => "Parameters in this field are passwd on to FFmpeg. Multiple parameters can be separated by ,~~ ". "Examples (do not enter quotes)~~~~". - "\"rtsp_transport=tcp\" Use TCP instead of UDP for the data stream from the camera~~~~". - "\"rtsp_transport=http\" Use http tunneling for the data stream from the camera~~~~". + "\"allowed_media_types=video\" Set datatype to request fromcam (audio, video, data)~~~~". + "\"reorder_queue_size=nnn\" Set number of packets to buffer for handling of reordered packets~~~~". "\"loglevel=debug\" Set verbosiy of FFmpeg (quiet, panic, fatal, error, warning, info, verbose, debug)" ), 'OPTIONS_LIBVLC' => array( 'Help' => "Parameters in this field are passwd on to libVLC. Multiple parameters can be separated by ,~~ ". "Examples (do not enter quotes)~~~~". - "\"--rtsp-tcp\" Use TCP instead of UDP for the data stream from the camera~~~~". + "\"--rtp-client-port=nnn\" Set local port to use for rtp data~~~~". "\"--verbose=2\" Set verbosity of libVLC" ), diff --git a/web/lang/nl_nl.php b/web/lang/nl_nl.php index 3fa061165..877fddec0 100644 --- a/web/lang/nl_nl.php +++ b/web/lang/nl_nl.php @@ -857,14 +857,14 @@ $OLANG = array( 'OPTIONS_FFMPEG' => array( 'Help' => "Parameters in this field are passwd on to FFmpeg. Multiple parameters can be separated by ,~~ ". "Examples (do not enter quotes)~~~~". - "\"rtsp_transport=tcp\" Use TCP instead of UDP for the data stream from the camera~~~~". - "\"rtsp_transport=http\" Use http tunneling for the data stream from the camera~~~~". + "\"allowed_media_types=video\" Set datatype to request fromcam (audio, video, data)~~~~". + "\"reorder_queue_size=nnn\" Set number of packets to buffer for handling of reordered packets~~~~". "\"loglevel=debug\" Set verbosiy of FFmpeg (quiet, panic, fatal, error, warning, info, verbose, debug)" ), 'OPTIONS_LIBVLC' => array( 'Help' => "Parameters in this field are passwd on to libVLC. Multiple parameters can be separated by ,~~ ". "Examples (do not enter quotes)~~~~". - "\"--rtsp-tcp\" Use TCP instead of UDP for the data stream from the camera~~~~". + "\"--rtp-client-port=nnn\" Set local port to use for rtp data~~~~". "\"--verbose=2\" Set verbosity of libVLC" ), diff --git a/web/lang/pl_pl.php b/web/lang/pl_pl.php index 65117a977..9ba171fcb 100644 --- a/web/lang/pl_pl.php +++ b/web/lang/pl_pl.php @@ -842,14 +842,14 @@ $OLANG = array( 'OPTIONS_FFMPEG' => array( 'Help' => "Parameters in this field are passwd on to FFmpeg. Multiple parameters can be separated by ,~~ ". "Examples (do not enter quotes)~~~~". - "\"rtsp_transport=tcp\" Use TCP instead of UDP for the data stream from the camera~~~~". - "\"rtsp_transport=http\" Use http tunneling for the data stream from the camera~~~~". + "\"allowed_media_types=video\" Set datatype to request fromcam (audio, video, data)~~~~". + "\"reorder_queue_size=nnn\" Set number of packets to buffer for handling of reordered packets~~~~". "\"loglevel=debug\" Set verbosiy of FFmpeg (quiet, panic, fatal, error, warning, info, verbose, debug)" ), 'OPTIONS_LIBVLC' => array( 'Help' => "Parameters in this field are passwd on to libVLC. Multiple parameters can be separated by ,~~ ". "Examples (do not enter quotes)~~~~". - "\"--rtsp-tcp\" Use TCP instead of UDP for the data stream from the camera~~~~". + "\"--rtp-client-port=nnn\" Set local port to use for rtp data~~~~". "\"--verbose=2\" Set verbosity of libVLC" ), diff --git a/web/lang/pt_br.php b/web/lang/pt_br.php index 1deecf89b..91830ebf4 100644 --- a/web/lang/pt_br.php +++ b/web/lang/pt_br.php @@ -803,14 +803,14 @@ $OLANG = array( 'OPTIONS_FFMPEG' => array( 'Help' => "Parameters in this field are passwd on to FFmpeg. Multiple parameters can be separated by ,~~ ". "Examples (do not enter quotes)~~~~". - "\"rtsp_transport=tcp\" Use TCP instead of UDP for the data stream from the camera~~~~". - "\"rtsp_transport=http\" Use http tunneling for the data stream from the camera~~~~". + "\"allowed_media_types=video\" Set datatype to request fromcam (audio, video, data)~~~~". + "\"reorder_queue_size=nnn\" Set number of packets to buffer for handling of reordered packets~~~~". "\"loglevel=debug\" Set verbosiy of FFmpeg (quiet, panic, fatal, error, warning, info, verbose, debug)" ), 'OPTIONS_LIBVLC' => array( 'Help' => "Parameters in this field are passwd on to libVLC. Multiple parameters can be separated by ,~~ ". "Examples (do not enter quotes)~~~~". - "\"--rtsp-tcp\" Use TCP instead of UDP for the data stream from the camera~~~~". + "\"--rtp-client-port=nnn\" Set local port to use for rtp data~~~~". "\"--verbose=2\" Set verbosity of libVLC" ), diff --git a/web/lang/ro_ro.php b/web/lang/ro_ro.php index 8078d57e1..74da43406 100644 --- a/web/lang/ro_ro.php +++ b/web/lang/ro_ro.php @@ -1302,17 +1302,18 @@ $OLANG = array( 'OPTIONS_FFMPEG' => array( 'Help' => "Parameters in this field are passwd on to FFmpeg. Multiple parameters can be separated by ,~~ ". "Examples (do not enter quotes)~~~~". - "\"rtsp_transport=tcp\" Use TCP instead of UDP for the data stream from the camera~~~~". - "\"rtsp_transport=http\" Use http tunneling for the data stream from the camera~~~~". + "\"allowed_media_types=video\" Set datatype to request fromcam (audio, video, data)~~~~". + "\"reorder_queue_size=nnn\" Set number of packets to buffer for handling of reordered packets~~~~". "\"loglevel=debug\" Set verbosiy of FFmpeg (quiet, panic, fatal, error, warning, info, verbose, debug)" ), 'OPTIONS_LIBVLC' => array( 'Help' => "Parameters in this field are passwd on to libVLC. Multiple parameters can be separated by ,~~ ". "Examples (do not enter quotes)~~~~". - "\"--rtsp-tcp\" Use TCP instead of UDP for the data stream from the camera~~~~". + "\"--rtp-client-port=nnn\" Set local port to use for rtp data~~~~". "\"--verbose=2\" Set verbosity of libVLC" ), + // End of Phone Bandwidth tab // ); diff --git a/web/lang/ru_ru.php b/web/lang/ru_ru.php index 6e22e3113..0c4bfbf3b 100644 --- a/web/lang/ru_ru.php +++ b/web/lang/ru_ru.php @@ -862,14 +862,14 @@ $OLANG = array( 'OPTIONS_FFMPEG' => array( 'Help' => "Parameters in this field are passwd on to FFmpeg. Multiple parameters can be separated by ,~~ ". "Examples (do not enter quotes)~~~~". - "\"rtsp_transport=tcp\" Use TCP instead of UDP for the data stream from the camera~~~~". - "\"rtsp_transport=http\" Use http tunneling for the data stream from the camera~~~~". + "\"allowed_media_types=video\" Set datatype to request fromcam (audio, video, data)~~~~". + "\"reorder_queue_size=nnn\" Set number of packets to buffer for handling of reordered packets~~~~". "\"loglevel=debug\" Set verbosiy of FFmpeg (quiet, panic, fatal, error, warning, info, verbose, debug)" ), 'OPTIONS_LIBVLC' => array( 'Help' => "Parameters in this field are passwd on to libVLC. Multiple parameters can be separated by ,~~ ". "Examples (do not enter quotes)~~~~". - "\"--rtsp-tcp\" Use TCP instead of UDP for the data stream from the camera~~~~". + "\"--rtp-client-port=nnn\" Set local port to use for rtp data~~~~". "\"--verbose=2\" Set verbosity of libVLC" ), diff --git a/web/lang/se_se.php b/web/lang/se_se.php index 2a5c1550f..968804fed 100644 --- a/web/lang/se_se.php +++ b/web/lang/se_se.php @@ -867,14 +867,14 @@ $OLANG = array( 'OPTIONS_FFMPEG' => array( 'Help' => "Parameters in this field are passwd on to FFmpeg. Multiple parameters can be separated by ,~~ ". "Examples (do not enter quotes)~~~~". - "\"rtsp_transport=tcp\" Use TCP instead of UDP for the data stream from the camera~~~~". - "\"rtsp_transport=http\" Use http tunneling for the data stream from the camera~~~~". + "\"allowed_media_types=video\" Set datatype to request fromcam (audio, video, data)~~~~". + "\"reorder_queue_size=nnn\" Set number of packets to buffer for handling of reordered packets~~~~". "\"loglevel=debug\" Set verbosiy of FFmpeg (quiet, panic, fatal, error, warning, info, verbose, debug)" ), 'OPTIONS_LIBVLC' => array( 'Help' => "Parameters in this field are passwd on to libVLC. Multiple parameters can be separated by ,~~ ". "Examples (do not enter quotes)~~~~". - "\"--rtsp-tcp\" Use TCP instead of UDP for the data stream from the camera~~~~". + "\"--rtp-client-port=nnn\" Set local port to use for rtp data~~~~". "\"--verbose=2\" Set verbosity of libVLC" ), From 82447ebb2798c5c663850190a53fc7f0f0e028a9 Mon Sep 17 00:00:00 2001 From: m-bene Date: Sat, 17 May 2014 22:05:57 +0200 Subject: [PATCH 14/38] remove unwanted comment change --- web/skins/classic/views/monitor.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/skins/classic/views/monitor.php b/web/skins/classic/views/monitor.php index 070d78a3d..419cc37f3 100644 --- a/web/skins/classic/views/monitor.php +++ b/web/skins/classic/views/monitor.php @@ -1,7 +1,7 @@ Date: Wed, 4 Jun 2014 11:21:43 -0400 Subject: [PATCH 15/38] add libav-tools as an option instead of ffmpeg --- distros/ubuntu1204/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/distros/ubuntu1204/control b/distros/ubuntu1204/control index 49be18df6..702123e9a 100644 --- a/distros/ubuntu1204/control +++ b/distros/ubuntu1204/control @@ -7,7 +7,7 @@ Standards-Version: 3.9.2 Package: zoneminder Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}, apache2, libapache2-mod-php5, php5, php5-mysql, libphp-serialization-perl, libdate-manip-perl, libmime-lite-perl, libmime-lite-perl, mysql-client, libwww-perl, libarchive-tar-perl, libarchive-zip-perl, libdevice-serialport-perl, libpcre3, ffmpeg, rsyslog | system-log-daemon, libmodule-load-perl, libsys-mmap-perl, libjson-any-perl, netpbm, libavdevice53, libjpeg8, zip, libnet-sftp-foreign-perl +Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}, apache2, libapache2-mod-php5, php5, php5-mysql, libphp-serialization-perl, libdate-manip-perl, libmime-lite-perl, libmime-lite-perl, mysql-client, libwww-perl, libarchive-tar-perl, libarchive-zip-perl, libdevice-serialport-perl, libpcre3, ffmpeg | libav-tools, rsyslog | system-log-daemon, libmodule-load-perl, libsys-mmap-perl, libjson-any-perl, netpbm, libavdevice53, libjpeg8, zip, libnet-sftp-foreign-perl SUggests: mysql-server Description: A video camera security and surveillance solution ZoneMinder is intended for use in single or multi-camera video security From 007eadeb191884b320d7a2971d5fab721413264d Mon Sep 17 00:00:00 2001 From: bountysource-support Date: Wed, 4 Jun 2014 14:42:42 -0700 Subject: [PATCH 16/38] Add Bountysource badge to README Because you have some open bounties, we thought you might want to display this badge in your README! --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index de5710ab3..1515b1362 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ ZoneMinder ========== -[![Build Status](https://travis-ci.org/ZoneMinder/ZoneMinder.png)](https://travis-ci.org/ZoneMinder/ZoneMinder) +[![Build Status](https://travis-ci.org/ZoneMinder/ZoneMinder.png)](https://travis-ci.org/ZoneMinder/ZoneMinder) [![Bountysource](https://api.bountysource.com/badge/team?team_id=204&style=bounties_received)](https://www.bountysource.com/teams/zoneminder/issues?utm_source=ZoneMinder&utm_medium=shield&utm_campaign=bounties_received) All documentation for ZoneMinder is now online at http://www.zoneminder.com/wiki/index.php/Documentation From 5ae3cb89071fd09cb4eeae3cd894220027949281 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Thu, 5 Jun 2014 15:14:12 -0400 Subject: [PATCH 17/38] merge some security fixes from rogerroger288 --- web/includes/actions.php | 15 +++++++++++---- web/includes/functions.php | 5 +++-- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/web/includes/actions.php b/web/includes/actions.php index 8415f927c..20044d8c7 100644 --- a/web/includes/actions.php +++ b/web/includes/actions.php @@ -212,10 +212,17 @@ if ( !empty($action) ) } elseif ( $action == "settings" ) { - $zmuCommand = getZmuCommand( " -m ".$mid." -B".$_REQUEST['newBrightness']." -C".$_REQUEST['newContrast']." -H".$_REQUEST['newHue']." -O".$_REQUEST['newColour'] ); - $zmuOutput = exec( escapeshellcmd( $zmuCommand ) ); + $args = " -m " . escapeshellarg($mid); + $args .= " -B" . escapeshellarg($_REQUEST['newBrightness']); + $args .= " -C" . escapeshellarg($_REQUEST['newContrast']); + $args .= " -H" . escapeshellarg($_REQUEST['newHue']); + $args .= " -O" . escapeshellarg($_REQUEST['newColour']); + + $zmuCommand = getZmuCommand( $args ); + + $zmuOutput = exec( $zmuCommand ); list( $brightness, $contrast, $hue, $colour ) = explode( ' ', $zmuOutput ); - dbQuery( "update Monitors set Brightness = '".$brightness."', Contrast = '".$contrast."', Hue = '".$hue."', Colour = '".$colour."' where Id = '".$mid."'" ); + dbQuery( "update Monitors set Brightness = ?, Contrast = ?, Hue = ?, Colour = ? where Id = ?", array($brightness, $contrast, $hue, $colour, $mid)); } } @@ -462,7 +469,7 @@ if ( !empty($action) ) dbQuery( "update Monitors set ".implode( ", ", $changes )." where Id =?", array($mid) ); if ( isset($changes['Name']) ) { - exec( escapeshellcmd( "mv ".ZM_DIR_EVENTS."/".$monitor['Name']." ".ZM_DIR_EVENTS."/".$_REQUEST['newMonitor']['Name'] ) ); + rename( ZM_DIR_EVENTS."/".$monitor['Name'], ZM_DIR_EVENTS."/".$_REQUEST['newMonitor']['Name']); } if ( isset($changes['Width']) || isset($changes['Height']) ) { diff --git a/web/includes/functions.php b/web/includes/functions.php index fc7f48497..ff6ed2a12 100644 --- a/web/includes/functions.php +++ b/web/includes/functions.php @@ -438,6 +438,7 @@ function outputControlStill( $src, $width, $height, $monitor, $scale, $target ) Date: Thu, 5 Jun 2014 15:18:02 -0400 Subject: [PATCH 18/38] escape username and password inside zm_user by rogerroger288 --- src/zm_user.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/zm_user.cpp b/src/zm_user.cpp index 1ab27a1a1..36d6dcb5d 100644 --- a/src/zm_user.cpp +++ b/src/zm_user.cpp @@ -100,14 +100,18 @@ bool User::canAccess( int monitor_id ) User *zmLoadUser( const char *username, const char *password ) { char sql[ZM_SQL_SML_BUFSIZ] = ""; + char safer_username[200]; + char safer_password[200]; + mysql_real_escape_string(&dbconn, safer_username, username, sizeof safer_username); + mysql_real_escape_string(&dbconn, safer_password, password, sizeof safer_password); if ( password ) { - snprintf( sql, sizeof(sql), "select Username, Password, Enabled, Stream+0, Events+0, Control+0, Monitors+0, System+0, MonitorIds from Users where Username = '%s' and Password = password('%s') and Enabled = 1", username, password ); + snprintf( sql, sizeof(sql), "select Username, Password, Enabled, Stream+0, Events+0, Control+0, Monitors+0, System+0, MonitorIds from Users where Username = '%s' and Password = password('%s') and Enabled = 1", safer_username, safer_password ); } else { - snprintf( sql, sizeof(sql), "select Username, Password, Enabled, Stream+0, Events+0, Control+0, Monitors+0, System+0, MonitorIds from Users where Username = '%s' and Enabled = 1", username ); + snprintf( sql, sizeof(sql), "select Username, Password, Enabled, Stream+0, Events+0, Control+0, Monitors+0, System+0, MonitorIds from Users where Username = '%s' and Enabled = 1", safer_username ); } if ( mysql_query( &dbconn, sql ) ) From baf5da95616114a9d847404cbbcc55c746fe3caa Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Thu, 5 Jun 2014 15:20:04 -0400 Subject: [PATCH 19/38] guard against monitor names being dangerous by rogerroger288 --- web/includes/actions.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web/includes/actions.php b/web/includes/actions.php index 20044d8c7..1d6434599 100644 --- a/web/includes/actions.php +++ b/web/includes/actions.php @@ -520,7 +520,8 @@ if ( !empty($action) ) dbQuery( "insert into Zones set MonitorId = ?, Name = 'All', Type = 'Active', Units = 'Percent', NumCoords = 4, Coords = ?, Area=?, AlarmRGB = 0xff0000, CheckMethod = 'Blobs', MinPixelThreshold = 25, MinAlarmPixels=?, MaxAlarmPixels=?, FilterX = 3, FilterY = 3, MinFilterPixels=?, MaxFilterPixels=?, MinBlobPixels=?, MinBlobs = 1", array( $mid, sprintf( "%d,%d %d,%d %d,%d %d,%d", 0, 0, $_REQUEST['newMonitor']['Width']-1, 0, $_REQUEST['newMonitor']['Width']-1, $_REQUEST['newMonitor']['Height']-1, 0, $_REQUEST['newMonitor']['Height']-1 ), $zoneArea, intval(($zoneArea*3)/100), intval(($zoneArea*75)/100), intval(($zoneArea*3)/100), intval(($zoneArea*75)/100), intval(($zoneArea*2)/100) ) ); //$view = 'none'; mkdir( ZM_DIR_EVENTS.'/'.$mid, 0755 ); - symlink( $mid, ZM_DIR_EVENTS.'/'.$_REQUEST['newMonitor']['Name'] ); + $saferName = basename($_REQUEST['newMonitor']['Name']); + symlink( $mid, ZM_DIR_EVENTS.'/'.$saferName ); if ( isset($_COOKIE['zmGroup']) ) { dbQuery( "UPDATE Groups SET MonitorIds = concat(MonitorIds,',".$mid."') WHERE Id=?", array($_COOKIE['zmGroup']) ); From 0689e8453c6d11a6911794f2de7f07d1d9b65b99 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Thu, 5 Jun 2014 15:21:28 -0400 Subject: [PATCH 20/38] guard against dangerous (old or new) monitor names by rogerroger288 --- web/includes/actions.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web/includes/actions.php b/web/includes/actions.php index 1d6434599..c66226123 100644 --- a/web/includes/actions.php +++ b/web/includes/actions.php @@ -469,7 +469,9 @@ if ( !empty($action) ) dbQuery( "update Monitors set ".implode( ", ", $changes )." where Id =?", array($mid) ); if ( isset($changes['Name']) ) { - rename( ZM_DIR_EVENTS."/".$monitor['Name'], ZM_DIR_EVENTS."/".$_REQUEST['newMonitor']['Name']); + $saferOldName = basename( $monitor['Name'] ); + $saferNewName = basename( $_REQUEST['newMonitor']['Name'] ); + rename( ZM_DIR_EVENTS."/".$saferOldName, ZM_DIR_EVENTS."/".$saferNewName); } if ( isset($changes['Width']) || isset($changes['Height']) ) { From 5bf894d263d03b972fbef23465d498ab1cb874a3 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Thu, 5 Jun 2014 15:23:15 -0400 Subject: [PATCH 21/38] guard against unsafe monitor name --- web/includes/actions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/includes/actions.php b/web/includes/actions.php index c66226123..b00328d9f 100644 --- a/web/includes/actions.php +++ b/web/includes/actions.php @@ -607,8 +607,8 @@ if ( !empty($action) ) foreach( $markEids as $markEid ) deleteEvent( $markEid ); - deletePath( ZM_DIR_EVENTS."/".$monitor['Name'] ); - deletePath( ZM_DIR_EVENTS."/".$monitor['Id'] ); + deletePath( ZM_DIR_EVENTS."/".basename($monitor['Name']) ); + deletePath( ZM_DIR_EVENTS."/".$monitor['Id'] ); // I'm trusting the Id. } } } From caa0cb0fd5a645134e48ae3dbb277e6600763403 Mon Sep 17 00:00:00 2001 From: Kfir Itzhak Date: Fri, 6 Jun 2014 08:58:35 +0300 Subject: [PATCH 22/38] Bump version to v1.27.1 to fix upgrade db issues --- CMakeLists.txt | 2 +- configure.ac | 2 +- version | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 23cb73c84..d847d819a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,7 +10,7 @@ # cmake_minimum_required (VERSION 2.6) project (zoneminder) -set(zoneminder_VERSION "1.27") +set(zoneminder_VERSION "1.27.1") # CMake does not allow out-of-source build if CMakeCache.exists in the source folder. Abort and notify the user to save him from headache why it doesn't work. if((NOT (CMAKE_BINARY_DIR STREQUAL CMAKE_SOURCE_DIR)) AND (EXISTS "${CMAKE_SOURCE_DIR}/CMakeCache.txt")) diff --git a/configure.ac b/configure.ac index 4fd61e0af..49390ef02 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ AC_PREREQ(2.59) -AC_INIT(zm,1.27,[http://www.zoneminder.com/forums/ - Please check FAQ first],zoneminder,http://www.zoneminder.com/downloads.html) +AC_INIT(zm,1.27.1,[http://www.zoneminder.com/forums/ - Please check FAQ first],zoneminder,http://www.zoneminder.com/downloads.html) AM_INIT_AUTOMAKE AC_CONFIG_SRCDIR(src/zm.h) AC_CONFIG_HEADERS(config.h) diff --git a/version b/version index b0c101e63..08002f86c 100644 --- a/version +++ b/version @@ -1 +1 @@ -1.27 +1.27.1 From a9cd6caeafddb5484afdbe7022ea7a75790504e9 Mon Sep 17 00:00:00 2001 From: Kfir Itzhak Date: Fri, 6 Jun 2014 09:35:02 +0300 Subject: [PATCH 23/38] Minor corrections to cURL code --- src/zm_curl_camera.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/zm_curl_camera.cpp b/src/zm_curl_camera.cpp index 24beba412..da5f7180d 100644 --- a/src/zm_curl_camera.cpp +++ b/src/zm_curl_camera.cpp @@ -123,7 +123,6 @@ int cURLCamera::PreCapture() int cURLCamera::Capture( Image &image ) { bool frameComplete = false; - uint8_t* directbuffer; /* MODE_STREAM specific variables */ bool SubHeadersParsingComplete = false; @@ -131,13 +130,6 @@ int cURLCamera::Capture( Image &image ) std::string frame_content_type; bool need_more_data = false; - /* Request a writeable buffer of the target image */ - directbuffer = image.WriteBuffer(width, height, colours, subpixelorder); - if(directbuffer == NULL) { - Error("Failed requesting writeable buffer for the captured image"); - return (-1); - } - /* Grab the mutex to ensure exclusive access to the shared data */ lock(); @@ -384,7 +376,7 @@ size_t cURLCamera::header_callback( void *buffer, size_t size, size_t nmemb, voi void* cURLCamera::thread_func() { - int tRet; + long tRet; double dSize; c = curl_easy_init(); From 047cff803831dc154a7c8277cd6c4a916e6587be Mon Sep 17 00:00:00 2001 From: Kyle Johnson Date: Tue, 10 Jun 2014 15:43:25 -0400 Subject: [PATCH 24/38] Added contribution and development tips to README --- README.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/README.md b/README.md index 1515b1362..36ef857aa 100644 --- a/README.md +++ b/README.md @@ -133,5 +133,31 @@ perl-TimeDate perl-YAML-Syck php php-cli php-mysql x264 vlc-devel vlc-core libcu This release of ZoneMinder has been tested on and works with ffmpeg version N-55540-g93f4277. +## Contribution Model and Development + +* Source hosted at [GitHub](https://github.com/ZoneMinder/ZoneMinder/) +* Report issues/questions/feature requests on [GitHub Issues](https://github.com/ZoneMinder/ZoneMinder/issues) + +Pull requests are very welcome! If you would like to contribute, +please follow the following steps. Also please create a feature branch +for what you are working on. + +1. Fork the repo +2. Open an issue at our [GitHub Issues](https://github.com/ZoneMinder/ZoneMinder/issues) page and jot down the issue number (e.g. 456) +3. Create your feature branch (`git checkout -b 456-my-new-feature`) +4. Commit your changes (`git commit -am 'Added some feature'`) +5. Push to the branch (`git push origin 456-my-new-feature`) +6. Create new Pull Request +7. The team will then review your changes + +If you are instead working on a bug - not a feature - please do the following: + +1. Fork the repo +2. Open an issue at our [GitHub Issues](https://github.com/ZoneMinder/ZoneMinder/issues) page and jot down the issue number (e.g. 123) +3. Create your feature branch (`git checkout -b 123-short-description `) +4. Commit your changes (`git commit -am 'Added some feature. Fixes #123'`) +5. Push to the branch (`git push origin 123-short-description`) +6. Create new Pull Request +7. The team will then review your changes [![Analytics](https://ga-beacon.appspot.com/UA-15147273-6/ZoneMinder/README.md)](https://github.com/igrigorik/ga-beacon) From b48d06b2795868fb43acba34ed9ebd0c68a46962 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Fri, 13 Jun 2014 16:09:01 -0400 Subject: [PATCH 25/38] change commands to handle if db already has the User and Pass fields --- db/zm_update-1.27.0.sql | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/db/zm_update-1.27.0.sql b/db/zm_update-1.27.0.sql index b5cc865b5..d70aff0c7 100644 --- a/db/zm_update-1.27.0.sql +++ b/db/zm_update-1.27.0.sql @@ -13,11 +13,39 @@ ALTER TABLE Monitors modify column Type enum('Local','Remote','File','Ffmpeg','L -- -- Add required fields for cURL authenication -- -ALTER TABLE `Monitors` ADD `User` VARCHAR(32) NOT NULL AFTER `SubPath`; -ALTER TABLE `Monitors` ADD `Pass` VARCHAR(32) NOT NULL AFTER `User`; + +SET @s = (SELECT IF( + (SELECT COUNT(*) + FROM INFORMATION_SCHEMA.COLUMNS + WHERE table_name = 'Monitors' + AND table_schema = DATABASE() + AND column_name = 'User' + ) > 0, +"SELECT 'Column User exists in Monitors'", +"ALTER TABLE `Monitors` ADD `User` VARCHAR(32) NOT NULL AFTER `SubPath`" +)); + +PREPARE stmt FROM @s; +EXECUTE stmt; + +SET @s = (SELECT IF( + (SELECT COUNT(*) + FROM INFORMATION_SCHEMA.COLUMNS + WHERE table_name = 'Monitors' + AND table_schema = DATABASE() + AND column_name = 'Pass' + ) > 0, +"SELECT 'Column Pass exists in Monitors'", +"ALTER TABLE `Monitors` ADD `Pass` VARCHAR(32) NOT NULL AFTER `User`" +)); + +PREPARE stmt FROM @s; +EXECUTE stmt; -- -- Add default zone preset -- + INSERT INTO ZonePresets VALUES (NULL,'Default','Active','Percent','Blobs',25,NULL,3,75,3,3,3,75,2,NULL,1,NULL,0); + From 8ac6ce17bcdec49b3ae7176763a145804715ded6 Mon Sep 17 00:00:00 2001 From: tim Date: Sun, 15 Jun 2014 13:01:29 -0700 Subject: [PATCH 26/38] Fixed issue DateTime handling in filter queries that broke timeline view. --- web/skins/classic/includes/timeline_functions.php | 2 +- web/skins/flat/includes/timeline_functions.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/web/skins/classic/includes/timeline_functions.php b/web/skins/classic/includes/timeline_functions.php index c74ea0ecb..cf92f8689 100644 --- a/web/skins/classic/includes/timeline_functions.php +++ b/web/skins/classic/includes/timeline_functions.php @@ -232,7 +232,7 @@ function parseFilterToTree( $filter ) $value = "'$value'"; break; case 'DateTime': - $value = strftime( STRF_FMT_DATETIME_DB, strtotime( $value ) ); + $value = "'".strftime( STRF_FMT_DATETIME_DB, strtotime( $value ) )."'"; break; case 'Date': $value = "to_days( '".strftime( STRF_FMT_DATETIME_DB, strtotime( $value ) )."' )"; diff --git a/web/skins/flat/includes/timeline_functions.php b/web/skins/flat/includes/timeline_functions.php index c74ea0ecb..cf92f8689 100644 --- a/web/skins/flat/includes/timeline_functions.php +++ b/web/skins/flat/includes/timeline_functions.php @@ -232,7 +232,7 @@ function parseFilterToTree( $filter ) $value = "'$value'"; break; case 'DateTime': - $value = strftime( STRF_FMT_DATETIME_DB, strtotime( $value ) ); + $value = "'".strftime( STRF_FMT_DATETIME_DB, strtotime( $value ) )."'"; break; case 'Date': $value = "to_days( '".strftime( STRF_FMT_DATETIME_DB, strtotime( $value ) )."' )"; From 0f4e9eb3e4e0ad40039ee0b3aed3e6802bb8f888 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Tue, 17 Jun 2014 10:54:42 -0400 Subject: [PATCH 27/38] add these dependencies, apparently they are required for sftp upload --- distros/debian/control | 2 +- distros/ubuntu1204/control | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/distros/debian/control b/distros/debian/control index d774fb45f..14ac3bcab 100644 --- a/distros/debian/control +++ b/distros/debian/control @@ -7,7 +7,7 @@ Standards-Version: 3.9.2 Package: zoneminder Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}, apache2, libapache2-mod-php5, php5, php5-mysql, libphp-serialization-perl, libdate-manip-perl, libmime-lite-perl, libmime-lite-perl, mysql-client, libwww-perl, libarchive-tar-perl, libarchive-zip-perl, libdevice-serialport-perl, libpcre3, ffmpeg, rsyslog | system-log-daemon, libmodule-load-perl, libsys-mmap-perl, libjson-any-perl, netpbm, libavdevice53, libjpeg8, zip, libnet-sftp-foreign-perl +Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}, apache2, libapache2-mod-php5, php5, php5-mysql, libphp-serialization-perl, libdate-manip-perl, libmime-lite-perl, libmime-lite-perl, mysql-client, libwww-perl, libarchive-tar-perl, libarchive-zip-perl, libdevice-serialport-perl, libpcre3, ffmpeg, rsyslog | system-log-daemon, libmodule-load-perl, libsys-mmap-perl, libjson-any-perl, netpbm, libavdevice53, libjpeg8, zip, libnet-sftp-foreign-perl, libio-pty-perl, libexpect-perl Recommends: mysql-server Description: A video camera security and surveillance solution ZoneMinder is intended for use in single or multi-camera video security diff --git a/distros/ubuntu1204/control b/distros/ubuntu1204/control index 702123e9a..f572d9702 100644 --- a/distros/ubuntu1204/control +++ b/distros/ubuntu1204/control @@ -7,7 +7,7 @@ Standards-Version: 3.9.2 Package: zoneminder Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}, apache2, libapache2-mod-php5, php5, php5-mysql, libphp-serialization-perl, libdate-manip-perl, libmime-lite-perl, libmime-lite-perl, mysql-client, libwww-perl, libarchive-tar-perl, libarchive-zip-perl, libdevice-serialport-perl, libpcre3, ffmpeg | libav-tools, rsyslog | system-log-daemon, libmodule-load-perl, libsys-mmap-perl, libjson-any-perl, netpbm, libavdevice53, libjpeg8, zip, libnet-sftp-foreign-perl +Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}, apache2, libapache2-mod-php5, php5, php5-mysql, libphp-serialization-perl, libdate-manip-perl, libmime-lite-perl, libmime-lite-perl, mysql-client, libwww-perl, libarchive-tar-perl, libarchive-zip-perl, libdevice-serialport-perl, libpcre3, ffmpeg | libav-tools, rsyslog | system-log-daemon, libmodule-load-perl, libsys-mmap-perl, libjson-any-perl, netpbm, libavdevice53, libjpeg8, zip, libnet-sftp-foreign-perl, libio-pty-perl, libexpect-perl SUggests: mysql-server Description: A video camera security and surveillance solution ZoneMinder is intended for use in single or multi-camera video security From 0592276f53954bfbd5e641aa0c00f1971ede6817 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Tue, 24 Jun 2014 11:22:08 -0400 Subject: [PATCH 28/38] fix mysql_escape_string calls after referring to docs --- src/zm_user.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/zm_user.cpp b/src/zm_user.cpp index 36d6dcb5d..75b180235 100644 --- a/src/zm_user.cpp +++ b/src/zm_user.cpp @@ -100,10 +100,12 @@ bool User::canAccess( int monitor_id ) User *zmLoadUser( const char *username, const char *password ) { char sql[ZM_SQL_SML_BUFSIZ] = ""; - char safer_username[200]; - char safer_password[200]; - mysql_real_escape_string(&dbconn, safer_username, username, sizeof safer_username); - mysql_real_escape_string(&dbconn, safer_password, password, sizeof safer_password); + char safer_username[65]; // current db username size is 32 + char safer_password[129]; // current db password size is 64 + + // According to docs, size of safer_whatever must be 2*length+1 due to unicode conversions + null terminator. + mysql_real_escape_string(&dbconn, safer_username, username, 32 ); + mysql_real_escape_string(&dbconn, safer_password, password, 64 ); if ( password ) { From b2323cb36d2b6c6dc5fe064c5dedfb1264179283 Mon Sep 17 00:00:00 2001 From: Carlo Landmeter Date: Wed, 25 Jun 2014 11:19:15 +0200 Subject: [PATCH 29/38] scripts: BusyBox compatibility BusyBox killall does not support long options using short options instead --- scripts/zmdc.pl.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/zmdc.pl.in b/scripts/zmdc.pl.in index c891553d5..579e093ab 100644 --- a/scripts/zmdc.pl.in +++ b/scripts/zmdc.pl.in @@ -784,14 +784,14 @@ sub killAll sleep( $delay ); foreach my $daemon ( @daemons ) { - my $cmd = "killall --quiet --signal TERM $daemon"; + my $cmd = "killall -q -s TERM $daemon"; Debug( $cmd ); qx( $cmd ); } sleep( $delay ); foreach my $daemon ( @daemons ) { - my $cmd = "killall --quiet --signal KILL $daemon"; + my $cmd = "killall -q -s KILL $daemon"; Debug( $cmd ); qx( $cmd ); } From 11718f0559e0303fdf92fb5ab5e1081a8762fe1b Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Wed, 25 Jun 2014 13:39:31 -0400 Subject: [PATCH 30/38] The users tab should always be available. It is useful to configure users BEFORE turning on auth. --- web/skins/classic/views/options.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/web/skins/classic/views/options.php b/web/skins/classic/views/options.php index aeb17e3cb..e7875660d 100644 --- a/web/skins/classic/views/options.php +++ b/web/skins/classic/views/options.php @@ -43,8 +43,7 @@ $tabs['medband'] = $SLANG['MediumBW']; $tabs['lowband'] = $SLANG['LowBW']; $tabs['phoneband'] = $SLANG['PhoneBW']; $tabs['eyeZm'] = "eyeZm"; -if ( ZM_OPT_USE_AUTH ) - $tabs['users'] = $SLANG['Users']; +$tabs['users'] = $SLANG['Users']; if ( isset($_REQUEST['tab']) ) $tab = validHtmlStr($_REQUEST['tab']); From 5fac727c2f78cb0eabf9c1d2121393f211445868 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Wed, 25 Jun 2014 13:40:37 -0400 Subject: [PATCH 31/38] Users tab should always be available --- web/skins/flat/views/options.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/web/skins/flat/views/options.php b/web/skins/flat/views/options.php index aeb17e3cb..e7875660d 100644 --- a/web/skins/flat/views/options.php +++ b/web/skins/flat/views/options.php @@ -43,8 +43,7 @@ $tabs['medband'] = $SLANG['MediumBW']; $tabs['lowband'] = $SLANG['LowBW']; $tabs['phoneband'] = $SLANG['PhoneBW']; $tabs['eyeZm'] = "eyeZm"; -if ( ZM_OPT_USE_AUTH ) - $tabs['users'] = $SLANG['Users']; +$tabs['users'] = $SLANG['Users']; if ( isset($_REQUEST['tab']) ) $tab = validHtmlStr($_REQUEST['tab']); From 623837115b92b28197cb1b235dd6945aa5812082 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Wed, 25 Jun 2014 14:01:45 -0400 Subject: [PATCH 32/38] fix missing ARRAY() around params to dbFetchOne --- web/skins/classic/views/user.php | 2 +- web/skins/flat/views/user.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/web/skins/classic/views/user.php b/web/skins/classic/views/user.php index 091ca3309..0aaa19175 100644 --- a/web/skins/classic/views/user.php +++ b/web/skins/classic/views/user.php @@ -25,7 +25,7 @@ if ( !canEdit( 'System' ) && !$selfEdit ) $view = "error"; return; } -if ( !($newUser = dbFetchOne( 'SELECT * FROM Users WHERE Id = ?', NULL, $_REQUEST['uid']) ) ); { +if ( !($newUser = dbFetchOne( 'SELECT * FROM Users WHERE Id = ?', NULL, ARRAY($_REQUEST['uid'])) ) ); { $newUser = array(); $newUser['Username'] = $SLANG['NewUser']; $newUser['Enabled'] = 1; diff --git a/web/skins/flat/views/user.php b/web/skins/flat/views/user.php index 091ca3309..0aaa19175 100644 --- a/web/skins/flat/views/user.php +++ b/web/skins/flat/views/user.php @@ -25,7 +25,7 @@ if ( !canEdit( 'System' ) && !$selfEdit ) $view = "error"; return; } -if ( !($newUser = dbFetchOne( 'SELECT * FROM Users WHERE Id = ?', NULL, $_REQUEST['uid']) ) ); { +if ( !($newUser = dbFetchOne( 'SELECT * FROM Users WHERE Id = ?', NULL, ARRAY($_REQUEST['uid'])) ) ); { $newUser = array(); $newUser['Username'] = $SLANG['NewUser']; $newUser['Enabled'] = 1; From c58c4a9720e74de4f7c480f3598f279ea7598077 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Wed, 25 Jun 2014 15:28:10 -0400 Subject: [PATCH 33/38] add the glue to define HOST_OS and use it to detect BSD and use different arguments to killall --- configure.ac | 28 ++++++++++++++++++++++++++++ scripts/zmdc.pl.in | 22 ++++++++++++++-------- 2 files changed, 42 insertions(+), 8 deletions(-) diff --git a/configure.ac b/configure.ac index 49390ef02..431a3dcc1 100644 --- a/configure.ac +++ b/configure.ac @@ -386,6 +386,34 @@ fi AC_SUBST(PERL_MM_PARMS) AC_SUBST(EXTRA_PERL_LIB) +# +# Platform specific setup +# +############################# +AC_CANONICAL_HOST +# Check for which host we are on and setup a few things +# specifically based on the host +case $host_os in + darwin* ) + # Do something specific for mac + HOST_OS='darwin' + ;; + linux*) + # Do something specific for linux + HOST_OS='linux' + ;; + *BSD*) + # Do something specific for BSD + HOST_OS='BSD' + ;; + *) + #Default Case + AC_MSG_ERROR([Your platform is not currently supported]) + ;; +esac + +AC_SUBST(HOST_OS) + AC_CONFIG_FILES([Makefile zm.conf zmconfgen.pl db/Makefile db/zm_create.sql misc/Makefile misc/apache.conf misc/logrotate.conf misc/syslog.conf scripts/Makefile scripts/zm scripts/zmaudit.pl scripts/zmcontrol.pl scripts/zmdc.pl scripts/zmfilter.pl scripts/zmpkg.pl scripts/zmtrack.pl scripts/zmcamtool.pl scripts/zmtrigger.pl scripts/zmupdate.pl scripts/zmvideo.pl scripts/zmwatch.pl scripts/zmx10.pl scripts/zmdbbackup scripts/zmdbrestore scripts/zmeventdump scripts/zmlogrotate.conf scripts/ZoneMinder/lib/ZoneMinder/Base.pm scripts/ZoneMinder/lib/ZoneMinder/Config.pm scripts/ZoneMinder/lib/ZoneMinder/Memory.pm scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm src/Makefile src/zm_config.h web/Makefile web/ajax/Makefile web/css/Makefile web/graphics/Makefile web/includes/Makefile web/includes/config.php web/js/Makefile web/lang/Makefile web/skins/Makefile web/skins/classic/Makefile web/skins/classic/ajax/Makefile web/skins/classic/css/Makefile web/skins/classic/graphics/Makefile web/skins/classic/includes/Makefile web/skins/classic/js/Makefile web/skins/classic/lang/Makefile web/skins/classic/views/Makefile web/skins/classic/views/css/Makefile web/skins/classic/views/js/Makefile web/skins/mobile/Makefile web/skins/mobile/ajax/Makefile web/skins/mobile/css/Makefile web/skins/mobile/graphics/Makefile web/skins/mobile/includes/Makefile web/skins/mobile/lang/Makefile web/skins/mobile/views/Makefile web/skins/mobile/views/css/Makefile web/tools/Makefile web/tools/mootools/Makefile web/views/Makefile web/skins/xml/Makefile web/skins/xml/views/Makefile web/skins/xml/includes/Makefile web/skins/flat/Makefile web/skins/flat/ajax/Makefile web/skins/flat/css/Makefile web/skins/flat/graphics/Makefile web/skins/flat/includes/Makefile web/skins/flat/js/Makefile web/skins/flat/lang/Makefile web/skins/flat/views/Makefile web/skins/flat/views/css/Makefile web/skins/flat/views/js/Makefile]) # Create the definitions for compilation and defaults for the database diff --git a/scripts/zmdc.pl.in b/scripts/zmdc.pl.in index c891553d5..5df490947 100644 --- a/scripts/zmdc.pl.in +++ b/scripts/zmdc.pl.in @@ -782,16 +782,22 @@ sub killAll { my $delay = shift; sleep( $delay ); + my $killall; + if ( '@HOST_OS@' eq 'BSD' ) { + $killall = 'killall -'; + } else { + $killall = 'killall -q -s '; + } + foreach my $daemon ( @daemons ) { + + my $cmd = $killall ."TERM $daemon"; + Debug( $cmd ); + qx( $cmd ); + } + sleep( $delay ); foreach my $daemon ( @daemons ) { - my $cmd = "killall --quiet --signal TERM $daemon"; - Debug( $cmd ); - qx( $cmd ); - } - sleep( $delay ); - foreach my $daemon ( @daemons ) - { - my $cmd = "killall --quiet --signal KILL $daemon"; + my $cmd = $killall."KILL $daemon"; Debug( $cmd ); qx( $cmd ); } From 20bccdf43101b7121c1bd868d321712cce5816c1 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Wed, 25 Jun 2014 16:23:10 -0400 Subject: [PATCH 34/38] use the size of the username and password when calling mysql_escape_string --- src/zm_user.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/zm_user.cpp b/src/zm_user.cpp index 75b180235..20acfe6bd 100644 --- a/src/zm_user.cpp +++ b/src/zm_user.cpp @@ -102,10 +102,10 @@ User *zmLoadUser( const char *username, const char *password ) char sql[ZM_SQL_SML_BUFSIZ] = ""; char safer_username[65]; // current db username size is 32 char safer_password[129]; // current db password size is 64 - + // According to docs, size of safer_whatever must be 2*length+1 due to unicode conversions + null terminator. - mysql_real_escape_string(&dbconn, safer_username, username, 32 ); - mysql_real_escape_string(&dbconn, safer_password, password, 64 ); + mysql_real_escape_string(&dbconn, safer_username, username, sizeof( username ) ); + mysql_real_escape_string(&dbconn, safer_password, password, sizeof( password ) ); if ( password ) { From 90b06060af808f2d23e1b26e13d487019200ea0f Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Thu, 26 Jun 2014 11:17:09 -0400 Subject: [PATCH 35/38] fix missing ExtendAlarmFrames column when add Default ZonePreset --- db/zm_update-1.27.0.sql | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/db/zm_update-1.27.0.sql b/db/zm_update-1.27.0.sql index d70aff0c7..11009c65f 100644 --- a/db/zm_update-1.27.0.sql +++ b/db/zm_update-1.27.0.sql @@ -46,6 +46,4 @@ EXECUTE stmt; -- Add default zone preset -- -INSERT INTO ZonePresets VALUES (NULL,'Default','Active','Percent','Blobs',25,NULL,3,75,3,3,3,75,2,NULL,1,NULL,0); - - +INSERT INTO ZonePresets VALUES (NULL,'Default','Active','Percent','Blobs',25,NULL,3,75,3,3,3,75,2,NULL,1,NULL,0,0); From e2987067f4648fe99efb13afbe38d01fddce0f78 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Thu, 26 Jun 2014 13:09:52 -0400 Subject: [PATCH 36/38] add avtools instead of ffmpg --- distros/ubuntu1204/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/distros/ubuntu1204/control b/distros/ubuntu1204/control index f572d9702..0826e4cad 100644 --- a/distros/ubuntu1204/control +++ b/distros/ubuntu1204/control @@ -2,7 +2,7 @@ Source: zoneminder Section: net Priority: optional Maintainer: Isaac Connor -Build-Depends: debhelper (>= 7.0.50), autoconf, automake, dpatch, libphp-serialization-perl, libgnutls-dev, libmysqlclient-dev, libdbd-mysql-perl, libdate-manip-perl, libwww-perl, libjpeg8-dev, libpcre3-dev, libavcodec-dev, libavformat-dev (>= 3:0.svn20090204), libswscale-dev (>= 3:0.svn20090204), libavutil-dev, libv4l-dev (>= 0.8.3), libbz2-dev, libtool, libsys-mmap-perl, ffmpeg, libnetpbm10-dev, libavdevice-dev, libdevice-serialport-perl, libpcre3, libarchive-zip-perl, libmime-lite-perl, libjpeg8, dh-autoreconf +Build-Depends: debhelper (>= 7.0.50), autoconf, automake, dpatch, libphp-serialization-perl, libgnutls-dev, libmysqlclient-dev, libdbd-mysql-perl, libdate-manip-perl, libwww-perl, libjpeg8-dev, libpcre3-dev, libavcodec-dev, libavformat-dev (>= 3:0.svn20090204), libswscale-dev (>= 3:0.svn20090204), libavutil-dev, libv4l-dev (>= 0.8.3), libbz2-dev, libtool, libsys-mmap-perl, ffmpeg | libav-tools, libnetpbm10-dev, libavdevice-dev, libdevice-serialport-perl, libpcre3, libarchive-zip-perl, libmime-lite-perl, libjpeg8, dh-autoreconf Standards-Version: 3.9.2 Package: zoneminder From 8f4fb8bb64a5736ad2dfff734b28a0bb4ad778c0 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Thu, 26 Jun 2014 14:44:37 -0400 Subject: [PATCH 37/38] fix mysql_escape_String call. Must use strlen, not sizeof --- src/zm_user.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/zm_user.cpp b/src/zm_user.cpp index 20acfe6bd..97ab2e2f1 100644 --- a/src/zm_user.cpp +++ b/src/zm_user.cpp @@ -104,8 +104,8 @@ User *zmLoadUser( const char *username, const char *password ) char safer_password[129]; // current db password size is 64 // According to docs, size of safer_whatever must be 2*length+1 due to unicode conversions + null terminator. - mysql_real_escape_string(&dbconn, safer_username, username, sizeof( username ) ); - mysql_real_escape_string(&dbconn, safer_password, password, sizeof( password ) ); + mysql_real_escape_string(&dbconn, safer_username, username, strlen( username ) ); + mysql_real_escape_string(&dbconn, safer_password, password, strlen( password ) ); if ( password ) { From 6e22278f74cacbc1559a202632a194248d364780 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Fri, 27 Jun 2014 12:47:56 -0400 Subject: [PATCH 38/38] password might be null when auth_relay is none. --- src/zm_user.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/zm_user.cpp b/src/zm_user.cpp index 97ab2e2f1..36cb8a37e 100644 --- a/src/zm_user.cpp +++ b/src/zm_user.cpp @@ -97,6 +97,7 @@ bool User::canAccess( int monitor_id ) } // Function to load a user from username and password +// Please note that in auth relay mode = none, password is NULL User *zmLoadUser( const char *username, const char *password ) { char sql[ZM_SQL_SML_BUFSIZ] = ""; @@ -105,14 +106,11 @@ User *zmLoadUser( const char *username, const char *password ) // According to docs, size of safer_whatever must be 2*length+1 due to unicode conversions + null terminator. mysql_real_escape_string(&dbconn, safer_username, username, strlen( username ) ); - mysql_real_escape_string(&dbconn, safer_password, password, strlen( password ) ); - if ( password ) - { + if ( password ) { + mysql_real_escape_string(&dbconn, safer_password, password, strlen( password ) ); snprintf( sql, sizeof(sql), "select Username, Password, Enabled, Stream+0, Events+0, Control+0, Monitors+0, System+0, MonitorIds from Users where Username = '%s' and Password = password('%s') and Enabled = 1", safer_username, safer_password ); - } - else - { + } else { snprintf( sql, sizeof(sql), "select Username, Password, Enabled, Stream+0, Events+0, Control+0, Monitors+0, System+0, MonitorIds from Users where Username = '%s' and Enabled = 1", safer_username ); }