Giter Club home page Giter Club logo

systemrecapi's Introduction

SystemRecApi

基于CS模式,服务端安装于System下,拥有系统权限。客户端安装于data下(普通安装),通过aidl和服务断通讯。

客户端Gradle编译

  • Add it in your root build.gradle at the end of repositories:
	allprojects {
		repositories {
			...
			maven { url 'https://jitpack.io' }
		}
	}
  • Add the dependency
dependencies {compile 'com.github.Tornaco:SystemRecApi:v1.3'}

Build in travis

Build Status

服务端的API调用(先确保服务端已经安装)

所有API均集成于RecBridgeServiceProxy

  1. 获取其实例
RecBridgeServiceProxy proxy = RecBridgeServiceProxy.from(this);
  1. 开始录制
 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(),
  1. 停止录制
proxy.stop();
  1. 监听(sticky)
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 {

            }
        });

systemrecapi's People

Contributors

chargermc avatar pixelpetals avatar tornaco avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.