make last_zoom last_scale last_x and last_y members of the StreamBase object instead of static vars so that we can access them in monitorStream

This commit is contained in:
Isaac Connor 2019-09-26 13:51:49 -04:00
parent b787682fa9
commit 492be7cc33
2 changed files with 7 additions and 13 deletions

View File

@ -110,15 +110,6 @@ bool StreamBase::checkCommandQueue() {
}
Image *StreamBase::prepareImage( Image *image ) {
static int last_scale = 0;
static int last_zoom = 0;
static int last_x = 0;
static int last_y = 0;
if ( !last_scale )
last_scale = scale;
if ( !last_zoom )
last_zoom = zoom;
// Do not bother to scale zoomed in images, just crop them and let the browser scale
// Works in FF2 but breaks FF3 which doesn't like image sizes changing in mid stream.

View File

@ -66,9 +66,12 @@ protected:
const char *format;
int replay_rate;
int scale;
int last_scale;
int zoom;
int last_zoom;
double maxfps;
int bitrate;
unsigned short last_x, last_y;
unsigned short x, y;
protected:
@ -117,15 +120,15 @@ public:
type = DEFAULT_TYPE;
format = "";
replay_rate = DEFAULT_RATE;
scale = DEFAULT_SCALE;
zoom = DEFAULT_ZOOM;
last_scale = scale = DEFAULT_SCALE;
last_zoom = zoom = DEFAULT_ZOOM;
maxfps = DEFAULT_MAXFPS;
bitrate = DEFAULT_BITRATE;
paused = false;
step = 0;
x = 0;
y = 0;
last_x = x = 0;
last_y = y = 0;
connkey = 0;
sd = -1;