mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-19 01:53:27 +02:00
Fix code style
Signed-off-by: Crepieux Pierre <pierre.crepieux@orange.com>
This commit is contained in:
@@ -25,7 +25,7 @@ module.exports = syrup.serial()
|
||||
.dependency(require('./options'))
|
||||
.define(function(options, adb, minicap, display, screenOptions) {
|
||||
var log = logger.createLogger('device:plugins:screen:stream')
|
||||
log.info("ScreenGrabber option set to %s", options.screenGrabber)
|
||||
log.info('ScreenGrabber option set to %s', options.screenGrabber)
|
||||
|
||||
function FrameProducer(config, grabber) {
|
||||
EventEmitter.call(this)
|
||||
@@ -230,7 +230,7 @@ module.exports = syrup.serial()
|
||||
|
||||
FrameProducer.prototype._startService = function() {
|
||||
log.info('Launching screen service %s', this.grabber)
|
||||
return minicap.run(this.grabber,util.format(
|
||||
return minicap.run(this.grabber, util.format(
|
||||
'-S -Q %d -P %s'
|
||||
, options.screenJpegQuality
|
||||
, this.frameConfig.toString()
|
||||
@@ -450,7 +450,7 @@ module.exports = syrup.serial()
|
||||
|
||||
return createServer()
|
||||
.then(function(wss) {
|
||||
log.info("creating FrameProducer: %s", options.screenGrabber)
|
||||
log.info('creating FrameProducer: %s', options.screenGrabber)
|
||||
var frameProducer = new FrameProducer(
|
||||
new FrameConfig(display.properties, display.properties))
|
||||
var broadcastSet = frameProducer.broadcastSet = new BroadcastSet()
|
||||
|
||||
@@ -60,7 +60,8 @@ module.exports = syrup.serial()
|
||||
, mode: 0755
|
||||
})
|
||||
, apk: new Resource({
|
||||
src: pathutil.match([pathutil.module('@devicefarmer/minicap-prebuilt/prebuilt/noarch/minicap.apk')])
|
||||
src: pathutil.match([pathutil.module(
|
||||
'@devicefarmer/minicap-prebuilt/prebuilt/noarch/minicap.apk')])
|
||||
, dest: ['/data/local/tmp/minicap.apk']
|
||||
, comm: 'minicap.apk'
|
||||
, mode: 0755
|
||||
@@ -156,14 +157,16 @@ module.exports = syrup.serial()
|
||||
, resources.bin.dest
|
||||
, cmd
|
||||
)
|
||||
} else if(mode === 'minicap-apk' && resources.apk.src !== undefined ) {
|
||||
runCmd = util.format(
|
||||
}
|
||||
else if(mode === 'minicap-apk' && resources.apk.src !== undefined) {
|
||||
runCmd = util.format(
|
||||
'CLASSPATH=%s app_process /system/bin io.devicefarmer.minicap.Main %s'
|
||||
, resources.apk.dest
|
||||
, cmd
|
||||
)
|
||||
} else {
|
||||
log.error("Missing resources/unknown minicap grabber: %s", mode)
|
||||
}
|
||||
else {
|
||||
log.error('Missing resources/unknown minicap grabber: %s', mode)
|
||||
}
|
||||
log.info(runCmd)
|
||||
return adb.shell(options.serial, runCmd)
|
||||
|
||||
Reference in New Issue
Block a user