基于CS模式,服务端安装于System下,拥有系统权限。客户端安装于data下(普通安装),通过aidl和服务断通讯。
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
dependencies {compile 'com.github.Tornaco:SystemRecApi:v1.3'}
所有API均集成于RecBridgeServiceProxy
RecBridgeServiceProxy proxy = RecBridgeServiceProxy.from(this);
RecBridgeServiceProxy.from(context)
.start(IParam.builder()
.audioSource(settingsProvider.getInt(SettingsProvider.Key.AUDIO_SOURCE))
.frameRate(settingsProvider.getInt(SettingsProvider.Key.FAME_RATE))
.audioBitrate(settingsProvider.getInt(SettingsProvider.Key.AUDIO_BITRATE_RATE_K))
.orientation(settingsProvider.getInt(SettingsProvider.Key.ORIENTATION))
.resolution(settingsProvider.getString(SettingsProvider.Key.RESOLUTION))
.stopOnScreenOff(settingsProvider.getBoolean(SettingsProvider.Key.SCREEN_OFF_STOP))
.useMediaProjection(!isPlatformBridge)
.stopOnShake(settingsProvider.getBoolean(SettingsProvider.Key.SHAKE_STOP))
.shutterSound(settingsProvider.getBoolean(SettingsProvider.Key.SHUTTER_SOUND))
.path(SettingsProvider.get().createVideoFilePath())
.showNotification(true)
.showTouch(settingsProvider.getBoolean(SettingsProvider.Key.SHOW_TOUCH))
.build(),
proxy.stop();
proxy.watch(new IWatcher.Stub() {
@Override
public void onStart() throws RemoteException {
}
@Override
public void onStop() throws RemoteException {
}
@Override
public void onElapsedTimeChange(String s) throws RemoteException {
}
});
$ claude mcp add SystemRecApi \
-- python -m otcore.mcp_server <graph>