mirror of
https://github.com/openstf/stf
synced 2025-10-04 18:29:17 +02:00
Make jpeg quality configurable.
This commit is contained in:
parent
c35246eb5c
commit
3d74cb48ab
4 changed files with 20 additions and 2 deletions
|
@ -2,6 +2,10 @@
|
|||
|
||||
## HEAD
|
||||
|
||||
### Enhancements
|
||||
|
||||
- You can now set screen JPEG quality with the `SCREEN_JPEG_QUALITY` environment variable at launch time. Can be useful for slow networks.
|
||||
|
||||
### Fixes
|
||||
|
||||
- Fixed Lenovo A806 and most likely other cheap Lenovo devices as well by updating [adbkit](https://github.com/openstf/adbkit).
|
||||
|
|
10
lib/cli.js
10
lib/cli.js
|
@ -64,6 +64,10 @@ program
|
|||
, 'screen WebSocket URL pattern'
|
||||
, String
|
||||
, 'ws://${publicIp}:${publicPort}')
|
||||
.option('--screen-jpeg-quality <quality>'
|
||||
, 'screen JPEG quality'
|
||||
, Number
|
||||
, process.env.SCREEN_JPEG_QUALITY || 80)
|
||||
.option('--connect-url-pattern <pattern>'
|
||||
, 'adb connect URL pattern'
|
||||
, String
|
||||
|
@ -113,6 +117,7 @@ program
|
|||
, '--adb-host', options.adbHost
|
||||
, '--adb-port', options.adbPort
|
||||
, '--screen-ws-url-pattern', options.screenWsUrlPattern
|
||||
, '--screen-jpeg-quality', options.screenJpegQuality
|
||||
, '--connect-url-pattern', options.connectUrlPattern
|
||||
, '--heartbeat-interval', options.heartbeatInterval
|
||||
, '--vnc-initial-size', options.vncInitialSize.join('x')
|
||||
|
@ -182,6 +187,10 @@ program
|
|||
, 'screen WebSocket URL pattern'
|
||||
, String
|
||||
, 'ws://${publicIp}:${publicPort}')
|
||||
.option('--screen-jpeg-quality <quality>'
|
||||
, 'screen JPEG quality'
|
||||
, Number
|
||||
, process.env.SCREEN_JPEG_QUALITY || 80)
|
||||
.option('--heartbeat-interval <ms>'
|
||||
, 'heartbeat interval'
|
||||
, Number
|
||||
|
@ -228,6 +237,7 @@ program
|
|||
, adbHost: options.adbHost
|
||||
, adbPort: options.adbPort
|
||||
, screenWsUrlPattern: options.screenWsUrlPattern
|
||||
, screenJpegQuality: options.screenJpegQuality
|
||||
, screenPort: options.screenPort
|
||||
, connectUrlPattern: options.connectUrlPattern
|
||||
, connectPort: options.connectPort
|
||||
|
|
|
@ -228,7 +228,11 @@ module.exports = syrup.serial()
|
|||
|
||||
FrameProducer.prototype._startService = function() {
|
||||
log.info('Launching screen service')
|
||||
return minicap.run(util.format('-S -P %s', this.frameConfig.toString()))
|
||||
return minicap.run(util.format(
|
||||
'-S -Q %d -P %s'
|
||||
, options.screenJpegQuality
|
||||
, this.frameConfig.toString()
|
||||
))
|
||||
.timeout(10000)
|
||||
}
|
||||
|
||||
|
|
|
@ -59,7 +59,7 @@
|
|||
"lodash": "^4.14.2",
|
||||
"markdown-serve": "^0.3.2",
|
||||
"mime": "^1.3.4",
|
||||
"minicap-prebuilt": "^1.2.0",
|
||||
"minicap-prebuilt": "^1.3.0",
|
||||
"minimatch": "^3.0.3",
|
||||
"my-local-ip": "^1.0.0",
|
||||
"openid": "^2.0.1",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue