@@ -27,6 +27,7 @@ func main() {
2727Usage:
2828 qvh devices [-v]
2929 qvh activate [--udid=<udid>] [-v]
30+ qvh deactivate [--udid=<udid>] [-v]
3031 qvh record <h264file> <wavfile> [--udid=<udid>] [-v]
3132 qvh audio <outfile> (--mp3 | --ogg | --wav) [--udid=<udid>] [-v]
3233 qvh gstreamer [--pipeline=<pipeline>] [--examples] [--udid=<udid>] [-v]
@@ -45,6 +46,8 @@ The commands work as following:
4546
4647 activate enables the video streaming config for the device specified by --udid
4748
49+ deactivate disables the video streaming config for the device specified by --udid (in case it is stuck on streaming config)
50+
4851 record will start video&audio recording. Video will be saved in a raw h264 file playable by VLC.
4952 Audio will be saved in a uncompressed wav file. Run like: "qvh record /home/yourname/out.h264 /home/yourname/out.wav"
5053
@@ -95,6 +98,13 @@ The commands work as following:
9598 activate (device )
9699 return
97100 }
101+
102+ deactivateCommand , _ := arguments .Bool ("deactivate" )
103+ if deactivateCommand {
104+ deactivate (device )
105+ return
106+ }
107+
98108 audioCommand , _ := arguments .Bool ("audio" )
99109 if audioCommand {
100110 outfile , err := arguments .String ("<outfile>" )
@@ -318,6 +328,20 @@ func activate(device screencapture.IosDevice) {
318328 })
319329}
320330
331+ func deactivate (device screencapture.IosDevice ) {
332+ log .Debugf ("Disabling device: %v" , device )
333+ var err error
334+ device , err = screencapture .DisableQTConfig (device )
335+ if err != nil {
336+ printErrJSON (err , "Error disabling QT config" )
337+ return
338+ }
339+
340+ printJSON (map [string ]interface {}{
341+ "device_activated" : device .DetailsMap (),
342+ })
343+ }
344+
321345func record (h264FilePath string , wavFilePath string , device screencapture.IosDevice ) {
322346 log .Debugf ("Writing video output to:'%s' and audio to: %s" , h264FilePath , wavFilePath )
323347
0 commit comments