airtest.core.android.cap_methods.minicap module¶
-
class
Minicap
(adb, projection=None, rotation_watcher=None, display_id=None, ori_function=None)[源代码]¶ 基类:
airtest.core.android.cap_methods.base_cap.BaseCap
super fast android screenshot method from stf minicap.
reference https://github.com/openstf/minicap
-
VERSION
= 5¶
-
RECVTIMEOUT
= None¶
-
CMD
= 'LD_LIBRARY_PATH=/data/local/tmp /data/local/tmp/minicap'¶
-
install
()[源代码]¶ Install minicap
Reference: https://github.com/openstf/minicap/blob/master/run.sh
返回: None
-
get_frame
(projection=None)[源代码]¶ - Get the single frame from minicap -s, this method slower than get_frames
- 1. shell cmd 1. remove log info 1.
- Args:
- projection: screenshot projection, default is None which means using self.projection
- Returns:
- jpg data
-
get_stream
(lazy=True)[源代码]¶ Get stream, it uses `adb forward`and socket communication. Use minicap ``lazy``mode (provided by gzmaruijie) for long connections - returns one latest frame from the server
参数: lazy – True or False Returns:
-
snapshot
(ensure_orientation=True, projection=None)[源代码]¶ 参数: - ensure_orientation – True or False whether to keep the orientation same as display
- projection – the size of the desired projection, (width, height)
Returns:
-