Bug 183 - Allow streaming method to be selectable by bandwidth.

git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@1523 e3e1d417-86f3-4887-817a-d78f3d33393f
This commit is contained in:
stan 2005-10-19 13:30:05 +00:00
parent ab2d99160e
commit b49bd14b0f
8 changed files with 33 additions and 6 deletions

View File

@ -84,6 +84,7 @@ switch ( $bandwidth )
define( "ZM_WEB_VIDEO_BITRATE", ZM_WEB_H_VIDEO_BITRATE ); // What the bitrate of any streamed video should be
define( "ZM_WEB_VIDEO_MAXFPS", ZM_WEB_H_VIDEO_MAXFPS ); // What the maximum frame rate of any streamed video should be
define( "ZM_WEB_IMAGE_SCALING", ZM_WEB_H_IMAGE_SCALING ); // Image scaling for thumbnails, bandwidth versus cpu in rescaling
define( "ZM_WEB_USE_STREAMS", ZM_WEB_H_USE_STREAMS ); // Whether to use streaming or stills for live and events views
define( "ZM_WEB_EVENTS_VIEW", ZM_WEB_H_EVENTS_VIEW ); // What the default view of multiple events should be.
break;
}
@ -99,6 +100,7 @@ switch ( $bandwidth )
define( "ZM_WEB_VIDEO_BITRATE", ZM_WEB_M_VIDEO_BITRATE ); // What the bitrate of any streamed video should be
define( "ZM_WEB_VIDEO_MAXFPS", ZM_WEB_M_VIDEO_MAXFPS ); // What the maximum frame rate of any streamed video should be
define( "ZM_WEB_IMAGE_SCALING", ZM_WEB_M_IMAGE_SCALING ); // Image scaling for thumbnails, bandwidth versus cpu in rescaling
define( "ZM_WEB_USE_STREAMS", ZM_WEB_M_USE_STREAMS ); // Whether to use streaming or stills for live and events views
define( "ZM_WEB_EVENTS_VIEW", ZM_WEB_M_EVENTS_VIEW ); // What the default view of multiple events should be.
break;
}
@ -114,6 +116,7 @@ switch ( $bandwidth )
define( "ZM_WEB_VIDEO_BITRATE", ZM_WEB_L_VIDEO_BITRATE ); // What the bitrate of any streamed video should be
define( "ZM_WEB_VIDEO_MAXFPS", ZM_WEB_L_VIDEO_MAXFPS ); // What the maximum frame rate of any streamed video should be
define( "ZM_WEB_IMAGE_SCALING", ZM_WEB_L_IMAGE_SCALING ); // Image scaling for thumbnails, bandwidth versus cpu in rescaling
define( "ZM_WEB_USE_STREAMS", ZM_WEB_L_USE_STREAMS ); // Whether to use streaming or stills for live and events views
define( "ZM_WEB_EVENTS_VIEW", ZM_WEB_L_EVENTS_VIEW ); // What the default view of multiple events should be.
break;
}

View File

@ -25,7 +25,7 @@ if ( !canView( 'Stream' ) )
}
if ( empty($mode) )
{
if ( canStream() )
if ( ZM_WEB_USE_STREAMS && canStream() )
$mode = "stream";
else
$mode = "still";

View File

@ -25,7 +25,7 @@ if ( !canView( 'Events' ) )
}
if ( !isset($mode) )
{
if ( canStream() )
if ( ZM_WEB_USE_STREAMS && canStream() )
$mode = "stream";
else
$mode = "still";

View File

@ -26,7 +26,7 @@ if ( !canView( 'Stream' ) )
if ( empty($mode) )
{
if ( canStream() )
if ( ZM_WEB_USE_STREAMS && canStream() )
$mode = "stream";
else
$mode = "still";

View File

@ -25,7 +25,7 @@ if ( !canView( 'Stream' ) )
}
if ( empty($mode) )
{
if ( canStream() )
if ( ZM_WEB_USE_STREAMS && canStream() )
$mode = "stream";
else
$mode = "still";

View File

@ -26,7 +26,7 @@ if ( !canView( 'Stream' ) )
if ( empty($mode) )
{
if ( canStream() )
if ( ZM_WEB_USE_STREAMS && canStream() )
$mode = "stream";
else
$mode = "still";

View File

@ -26,7 +26,7 @@ if ( !canView( 'Stream' ) )
if ( empty($mode) )
{
if ( canStream() )
if ( ZM_WEB_USE_STREAMS && canStream() )
$mode = "stream";
else
$mode = "still";

View File

@ -1180,6 +1180,14 @@ my @options =
requires => [ { name=>"ZM_PATH_NETPBM", value=>'/' } ],
category => 'highband',
},
{
name => "ZM_WEB_H_USE_STREAMS",
default => "yes",
description => "Whether to use streaming or stills for live and events views",
help => "Both the live and events views can use streaming to deliver a smoother feed. However over slow connections or in some other circumstances you can prefer to view stills instead. You can configure this globally with ZM_CAN_STREAM but this option allows you to modify your preference based on the bandwidth setting. Note that this option does not prevent you switching to streaming mode but just selects what the initial default setting is.",
type => $types{boolean},
category => 'highband',
},
{
name => "ZM_WEB_H_EVENTS_VIEW",
default => "events",
@ -1270,6 +1278,14 @@ my @options =
requires => [ { name=>"ZM_PATH_NETPBM", value=>"/" } ],
category => 'medband',
},
{
name => "ZM_WEB_M_USE_STREAMS",
default => "yes",
description => "Whether to use streaming or stills for live and events views",
help => "Both the live and events views can use streaming to deliver a smoother feed. However over slow connections or in some other circumstances you can prefer to view stills instead. You can configure this globally with ZM_CAN_STREAM but this option allows you to modify your preference based on the bandwidth setting. Note that this option does not prevent you switching to streaming mode but just selects what the initial default setting is.",
type => $types{boolean},
category => 'medband',
},
{
name => "ZM_WEB_M_EVENTS_VIEW",
default => "events",
@ -1360,6 +1376,14 @@ my @options =
requires => [ { name=>"ZM_PATH_NETPBM", value=>"/" } ],
category => 'lowband',
},
{
name => "ZM_WEB_L_USE_STREAMS",
default => "yes",
description => "Whether to use streaming or stills for live and events views",
help => "Both the live and events views can use streaming to deliver a smoother feed. However over slow connections or in some other circumstances you can prefer to view stills instead. You can configure this globally with ZM_CAN_STREAM but this option allows you to modify your preference based on the bandwidth setting. Note that this option does not prevent you switching to streaming mode but just selects what the initial default setting is.",
type => $types{boolean},
category => 'lowband',
},
{
name => "ZM_WEB_L_EVENTS_VIEW",
default => "events",