Migrate to FlatBuffers and unify Mobile/TV modules
No files matched your search
@@ -0,0 +1 @@
|
||||
/build
|
||||
@@ -0,0 +1,49 @@
|
||||
plugins {
|
||||
id 'com.android.library'
|
||||
id 'kotlin-android'
|
||||
}
|
||||
|
||||
apply from: project(':common').projectDir.absolutePath + '/variables.gradle'
|
||||
|
||||
android {
|
||||
namespace 'com.hyperion.grabber.common'
|
||||
compileSdk 34
|
||||
|
||||
defaultConfig {
|
||||
minSdk 21
|
||||
targetSdk 34
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
vectorDrawables.useSupportLibrary = true
|
||||
multiDexEnabled true
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
targetCompatibility JavaVersion.VERSION_17
|
||||
sourceCompatibility JavaVersion.VERSION_17
|
||||
}
|
||||
|
||||
kotlinOptions {
|
||||
jvmTarget = '17'
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
||||
implementation "androidx.core:core-ktx:1.12.0"
|
||||
implementation "androidx.appcompat:appcompat:1.6.1"
|
||||
implementation "androidx.constraintlayout:constraintlayout:2.1.4"
|
||||
implementation "androidx.preference:preference-ktx:1.2.1"
|
||||
implementation "androidx.localbroadcastmanager:localbroadcastmanager:1.1.0"
|
||||
implementation 'com.google.flatbuffers:flatbuffers-java:23.5.26'
|
||||
testImplementation 'junit:junit:4.13.2'
|
||||
androidTestImplementation 'androidx.test:runner:1.5.2'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PROJECTION" />
|
||||
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:supportsRtl="true"
|
||||
tools:targetApi="lollipop">
|
||||
<service
|
||||
android:name="com.hyperion.grabber.common.HyperionScreenService"
|
||||
android:exported="true"
|
||||
android:foregroundServiceType="mediaProjection">
|
||||
<intent-filter>
|
||||
<action android:name="com.hyperion.grabber.common.HyperionScreenService" />
|
||||
<action android:name="com.hyperion.grabber.service.ACTION_START" />
|
||||
<action android:name="com.hyperion.grabber.service.ACTION_STOP" />
|
||||
<action android:name="com.hyperion.grabber.service.ACTION_STATUS" />
|
||||
<action android:name="com.hyperion.grabber.service.ACTION_EXIT" />
|
||||
</intent-filter>
|
||||
</service>
|
||||
|
||||
<receiver
|
||||
android:name=".HyperionGrabberBootReceiver"
|
||||
android:exported="true"
|
||||
android:label="HyperionGrabberBootReceiver">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.BOOT_COMPLETED" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
|
||||
<activity android:name=".BootActivity" android:theme="@style/Theme.Transparent" android:exported="true"/>
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace hyperionnet;
|
||||
|
||||
table Reply {
|
||||
error:string;
|
||||
video:int = -1;
|
||||
registered:int = -1;
|
||||
}
|
||||
|
||||
root_type Reply;
|
||||
@@ -0,0 +1,46 @@
|
||||
namespace hyperionnet;
|
||||
|
||||
// A priority value of -1 clears all priorities
|
||||
table Register {
|
||||
origin:string (required);
|
||||
priority:int;
|
||||
}
|
||||
|
||||
table RawImage {
|
||||
data:[ubyte];
|
||||
width:int = -1;
|
||||
height:int = -1;
|
||||
}
|
||||
|
||||
table NV12Image {
|
||||
data_y:[ubyte];
|
||||
data_uv:[ubyte];
|
||||
width:int;
|
||||
height:int;
|
||||
stride_y:int = 0;
|
||||
stride_uv:int = 0;
|
||||
}
|
||||
|
||||
union ImageType {RawImage, NV12Image}
|
||||
|
||||
table Image {
|
||||
data:ImageType (required);
|
||||
duration:int = -1;
|
||||
}
|
||||
|
||||
table Clear {
|
||||
priority:int;
|
||||
}
|
||||
|
||||
table Color {
|
||||
data:int = -1;
|
||||
duration:int = -1;
|
||||
}
|
||||
|
||||
union Command {Color, Image, Clear, Register}
|
||||
|
||||
table Request {
|
||||
command:Command (required);
|
||||
}
|
||||
|
||||
root_type Request;
|
||||
@@ -0,0 +1,51 @@
|
||||
package com.hyperion.grabber.common;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.media.projection.MediaProjectionManager;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.RequiresApi;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
public class BootActivity extends AppCompatActivity {
|
||||
public static final int REQUEST_MEDIA_PROJECTION = 1;
|
||||
|
||||
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
MediaProjectionManager manager = (MediaProjectionManager)
|
||||
getSystemService(Context.MEDIA_PROJECTION_SERVICE);
|
||||
if (manager != null) {
|
||||
startActivityForResult(manager.createScreenCaptureIntent(), REQUEST_MEDIA_PROJECTION);
|
||||
} else {
|
||||
finish();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
if (requestCode == REQUEST_MEDIA_PROJECTION) {
|
||||
if (resultCode == Activity.RESULT_OK) {
|
||||
startScreenRecorder(this, resultCode, data);
|
||||
}
|
||||
finish();
|
||||
}
|
||||
}
|
||||
|
||||
public static void startScreenRecorder(Context context, int resultCode, Intent data) {
|
||||
Intent intent = new Intent(context, HyperionScreenService.class);
|
||||
intent.setAction(HyperionScreenService.ACTION_START);
|
||||
intent.putExtra(HyperionScreenService.EXTRA_RESULT_CODE, resultCode);
|
||||
intent.putExtras(data);
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
context.startForegroundService(intent);
|
||||
} else {
|
||||
context.startService(intent);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.hyperion.grabber.common;
|
||||
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Build;
|
||||
import androidx.annotation.RequiresApi;
|
||||
|
||||
import com.hyperion.grabber.common.util.Preferences;
|
||||
|
||||
public class HyperionGrabberBootReceiver extends BroadcastReceiver {
|
||||
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
|
||||
@Override
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
if (Intent.ACTION_BOOT_COMPLETED.equals(intent.getAction())) {
|
||||
Preferences preferences = new Preferences(context);
|
||||
if (preferences.getBoolean(R.string.pref_key_boot)) {
|
||||
final Intent i = new Intent(context, BootActivity.class);
|
||||
i.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION
|
||||
|Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS
|
||||
|Intent.FLAG_ACTIVITY_NO_HISTORY
|
||||
|Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
|
||||
context.startActivity(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,108 @@
|
||||
package com.hyperion.grabber.common;
|
||||
|
||||
import android.app.Notification;
|
||||
import android.app.NotificationChannel;
|
||||
import android.app.NotificationManager;
|
||||
import android.app.PendingIntent;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.graphics.drawable.Icon;
|
||||
import android.os.Build;
|
||||
import androidx.annotation.RequiresApi;
|
||||
import androidx.core.app.NotificationCompat;
|
||||
|
||||
public class HyperionNotification {
|
||||
private final String NOTIFICATION_CHANNEL_ID = "com.hyperion.grabber.notification";
|
||||
private final String NOTIFICATION_CHANNEL_LABEL;
|
||||
private final String NOTIFICATION_TITLE;
|
||||
private final String NOTIFICATION_DESCRIPTION;
|
||||
private final int PENDING_INTENT_REQUEST_CODE = 0;
|
||||
private final NotificationManager mNotificationManager;
|
||||
private final Context mContext;
|
||||
private Notification.Action mAction = null;
|
||||
|
||||
HyperionNotification (Context ctx, NotificationManager manager) {
|
||||
mNotificationManager = manager;
|
||||
mContext = ctx;
|
||||
NOTIFICATION_TITLE = mContext.getString(R.string.app_name);
|
||||
NOTIFICATION_DESCRIPTION = mContext.getString(R.string.notification_description);
|
||||
NOTIFICATION_CHANNEL_LABEL = mContext.getString(R.string.notification_channel_label);
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
mNotificationManager.createNotificationChannel(makeChannel());
|
||||
}
|
||||
}
|
||||
|
||||
private int getPendingIntentFlags() {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
|
||||
return PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE;
|
||||
} else {
|
||||
return PendingIntent.FLAG_UPDATE_CURRENT;
|
||||
}
|
||||
}
|
||||
|
||||
public void setAction(int code, String label, Intent intent) {
|
||||
PendingIntent pendingIntent = PendingIntent.getService(mContext, code,
|
||||
intent, getPendingIntentFlags());
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||
mAction = new Notification.Action.Builder(
|
||||
Icon.createWithResource(mContext, R.drawable.ic_notification_icon),
|
||||
label,
|
||||
pendingIntent
|
||||
).build();
|
||||
} else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT_WATCH) {
|
||||
mAction = new Notification.Action.Builder(
|
||||
R.drawable.ic_notification_icon,
|
||||
label,
|
||||
pendingIntent
|
||||
).build();
|
||||
}
|
||||
}
|
||||
|
||||
public Notification buildNotification() {
|
||||
PendingIntent pIntent = null;
|
||||
Intent intent = mContext.getPackageManager().getLaunchIntentForPackage(mContext.getPackageName());
|
||||
if (intent != null) {
|
||||
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
|
||||
pIntent = PendingIntent.getActivity(mContext, PENDING_INTENT_REQUEST_CODE,
|
||||
intent, getPendingIntentFlags());
|
||||
}
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
Notification.Builder builder = new Notification.Builder(mContext, NOTIFICATION_CHANNEL_ID)
|
||||
.setOngoing(true)
|
||||
.setSmallIcon(R.drawable.ic_notification_icon)
|
||||
.setContentTitle(NOTIFICATION_TITLE)
|
||||
.setContentText(NOTIFICATION_DESCRIPTION);
|
||||
if (mAction != null) {
|
||||
builder.addAction(mAction);
|
||||
}
|
||||
if (pIntent != null) {
|
||||
builder.setContentIntent(pIntent);
|
||||
}
|
||||
return builder.build();
|
||||
} else {
|
||||
NotificationCompat.Builder builder = new NotificationCompat.Builder(mContext, NOTIFICATION_CHANNEL_ID)
|
||||
.setVibrate(null)
|
||||
.setSound(null)
|
||||
.setOngoing(true)
|
||||
.setPriority(NotificationCompat.PRIORITY_MAX)
|
||||
.setSmallIcon(R.drawable.ic_notification_icon)
|
||||
.setContentTitle(NOTIFICATION_TITLE)
|
||||
.setContentText(NOTIFICATION_DESCRIPTION);
|
||||
if (pIntent != null) {
|
||||
builder.setContentIntent(pIntent);
|
||||
}
|
||||
return builder.build();
|
||||
}
|
||||
}
|
||||
|
||||
@RequiresApi(api = Build.VERSION_CODES.O)
|
||||
private NotificationChannel makeChannel() {
|
||||
NotificationChannel notificationChannel = new NotificationChannel(NOTIFICATION_CHANNEL_ID,
|
||||
NOTIFICATION_CHANNEL_LABEL, NotificationManager.IMPORTANCE_DEFAULT);
|
||||
notificationChannel.setDescription(NOTIFICATION_CHANNEL_LABEL);
|
||||
notificationChannel.enableVibration(false);
|
||||
notificationChannel.setSound(null,null);
|
||||
return notificationChannel;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,352 @@
|
||||
package com.hyperion.grabber.common;
|
||||
|
||||
import android.annotation.TargetApi;
|
||||
import android.graphics.PixelFormat;
|
||||
import android.hardware.display.DisplayManager;
|
||||
import android.hardware.display.VirtualDisplay;
|
||||
import android.media.Image;
|
||||
import android.media.ImageReader;
|
||||
import android.media.MediaCodec;
|
||||
import android.media.projection.MediaProjection;
|
||||
import android.os.Build;
|
||||
import android.os.Handler;
|
||||
import android.os.HandlerThread;
|
||||
import androidx.annotation.RequiresApi;
|
||||
import android.util.Log;
|
||||
|
||||
import com.hyperion.grabber.common.network.HyperionThread;
|
||||
import com.hyperion.grabber.common.util.BorderProcessor;
|
||||
import com.hyperion.grabber.common.util.HyperionGrabberOptions;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
|
||||
public class HyperionScreenEncoder extends HyperionScreenEncoderBase {
|
||||
private static final String TAG = "HyperionScreenEncoder";
|
||||
private static final boolean DEBUG = false;
|
||||
|
||||
private static final int MAX_IMAGE_READER_IMAGES = 2;
|
||||
|
||||
private static final int MAX_CAPTURE_WIDTH = 128;
|
||||
private static final int MAX_CAPTURE_HEIGHT = 72;
|
||||
|
||||
private VirtualDisplay mVirtualDisplay;
|
||||
private ImageReader mImageReader;
|
||||
private HandlerThread mCaptureThread;
|
||||
private Handler mCaptureHandler;
|
||||
private volatile boolean mRunning = false;
|
||||
|
||||
private int mCaptureWidth;
|
||||
private int mCaptureHeight;
|
||||
|
||||
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
|
||||
HyperionScreenEncoder(final HyperionThread.HyperionThreadListener listener,
|
||||
final MediaProjection projection, final int width, final int height,
|
||||
final int density, HyperionGrabberOptions options) {
|
||||
super(listener, projection, width, height, density, options);
|
||||
|
||||
// Calculate capture dimensions maintaining aspect ratio
|
||||
// Use very small resolution to minimize HDR tonemapping overhead
|
||||
float aspectRatio = (float) width / height;
|
||||
if (aspectRatio >= 1.0f) {
|
||||
// Landscape
|
||||
mCaptureWidth = Math.min(MAX_CAPTURE_WIDTH, getGrabberWidth());
|
||||
mCaptureHeight = Math.max(1, (int) (mCaptureWidth / aspectRatio));
|
||||
} else {
|
||||
// Portrait
|
||||
mCaptureHeight = Math.min(MAX_CAPTURE_HEIGHT, getGrabberHeight());
|
||||
mCaptureWidth = Math.max(1, (int) (mCaptureHeight * aspectRatio));
|
||||
}
|
||||
|
||||
// Ensure dimensions are even (required by some devices)
|
||||
mCaptureWidth = (mCaptureWidth / 2) * 2;
|
||||
mCaptureHeight = (mCaptureHeight / 2) * 2;
|
||||
if (mCaptureWidth < 2) mCaptureWidth = 2;
|
||||
if (mCaptureHeight < 2) mCaptureHeight = 2;
|
||||
|
||||
if (DEBUG) {
|
||||
Log.d(TAG, "Capture dimensions: " + mCaptureWidth + "x" + mCaptureHeight);
|
||||
}
|
||||
|
||||
try {
|
||||
prepare();
|
||||
} catch (MediaCodec.CodecException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@TargetApi(Build.VERSION_CODES.M)
|
||||
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
|
||||
private void prepare() throws MediaCodec.CodecException {
|
||||
if (DEBUG) Log.d(TAG, "Preparing encoder");
|
||||
|
||||
mCaptureThread = new HandlerThread(TAG + "-Capture", android.os.Process.THREAD_PRIORITY_BACKGROUND);
|
||||
mCaptureThread.start();
|
||||
mCaptureHandler = new Handler(mCaptureThread.getLooper());
|
||||
|
||||
int displayFlags = DisplayManager.VIRTUAL_DISPLAY_FLAG_PUBLIC;
|
||||
|
||||
mImageReader = ImageReader.newInstance(
|
||||
mCaptureWidth,
|
||||
mCaptureHeight,
|
||||
PixelFormat.RGBA_8888,
|
||||
MAX_IMAGE_READER_IMAGES
|
||||
);
|
||||
|
||||
mVirtualDisplay = mMediaProjection.createVirtualDisplay(
|
||||
TAG,
|
||||
mCaptureWidth, mCaptureHeight, mDensity,
|
||||
displayFlags,
|
||||
mImageReader.getSurface(),
|
||||
mDisplayCallback,
|
||||
mHandler);
|
||||
|
||||
startCaptureLoop();
|
||||
}
|
||||
|
||||
private void startCaptureLoop() {
|
||||
mRunning = true;
|
||||
setCapturing(true);
|
||||
|
||||
final long frameIntervalNs = 1_000_000_000L / mFrameRate;
|
||||
|
||||
mCaptureHandler.post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (!mRunning || !isCapturing()) {
|
||||
return;
|
||||
}
|
||||
|
||||
long startTime = System.nanoTime();
|
||||
|
||||
Image img = null;
|
||||
try {
|
||||
img = mImageReader.acquireLatestImage();
|
||||
if (img != null) {
|
||||
sendImage(img);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
if (DEBUG) Log.w(TAG, "Frame capture error: " + e.getMessage());
|
||||
} finally {
|
||||
if (img != null) {
|
||||
try {
|
||||
img.close();
|
||||
} catch (Exception ignored) {}
|
||||
}
|
||||
}
|
||||
|
||||
long elapsed = System.nanoTime() - startTime;
|
||||
long delayMs = Math.max(1, (frameIntervalNs - elapsed) / 1_000_000L);
|
||||
|
||||
if (mRunning && mCaptureHandler != null) {
|
||||
mCaptureHandler.postDelayed(this, delayMs);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void stopRecording() {
|
||||
if (DEBUG) Log.i(TAG, "stopRecording Called");
|
||||
mRunning = false;
|
||||
setCapturing(false);
|
||||
|
||||
if (mCaptureHandler != null) {
|
||||
mCaptureHandler.removeCallbacksAndMessages(null);
|
||||
}
|
||||
|
||||
if (mVirtualDisplay != null) {
|
||||
mVirtualDisplay.release();
|
||||
mVirtualDisplay = null;
|
||||
}
|
||||
|
||||
if (mCaptureThread != null) {
|
||||
mCaptureThread.quitSafely();
|
||||
mCaptureThread = null;
|
||||
mCaptureHandler = null;
|
||||
}
|
||||
|
||||
mHandler.getLooper().quit();
|
||||
clearAndDisconnect();
|
||||
|
||||
if (mImageReader != null) {
|
||||
mImageReader.close();
|
||||
mImageReader = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void resumeRecording() {
|
||||
if (DEBUG) Log.i(TAG, "resumeRecording Called");
|
||||
if (!isCapturing() && mImageReader != null) {
|
||||
startCaptureLoop();
|
||||
}
|
||||
}
|
||||
|
||||
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
|
||||
@Override
|
||||
public void setOrientation(int orientation) {
|
||||
if (mVirtualDisplay != null && orientation != mCurrentOrientation) {
|
||||
mCurrentOrientation = orientation;
|
||||
|
||||
int temp = mCaptureWidth;
|
||||
mCaptureWidth = mCaptureHeight;
|
||||
mCaptureHeight = temp;
|
||||
|
||||
mRunning = false;
|
||||
setCapturing(false);
|
||||
|
||||
if (mCaptureHandler != null) {
|
||||
mCaptureHandler.removeCallbacksAndMessages(null);
|
||||
}
|
||||
|
||||
mVirtualDisplay.resize(mCaptureWidth, mCaptureHeight, mDensity);
|
||||
|
||||
if (mImageReader != null) {
|
||||
mImageReader.close();
|
||||
}
|
||||
|
||||
mImageReader = ImageReader.newInstance(
|
||||
mCaptureWidth,
|
||||
mCaptureHeight,
|
||||
PixelFormat.RGBA_8888,
|
||||
MAX_IMAGE_READER_IMAGES
|
||||
);
|
||||
|
||||
mVirtualDisplay.setSurface(mImageReader.getSurface());
|
||||
startCaptureLoop();
|
||||
}
|
||||
}
|
||||
|
||||
private VirtualDisplay.Callback mDisplayCallback = new VirtualDisplay.Callback() {
|
||||
@Override
|
||||
public void onPaused() {
|
||||
if (DEBUG) Log.d(TAG, "VirtualDisplay paused");
|
||||
mRunning = false;
|
||||
setCapturing(false);
|
||||
}
|
||||
|
||||
@RequiresApi(api = Build.VERSION_CODES.KITKAT_WATCH)
|
||||
@Override
|
||||
public void onResumed() {
|
||||
if (DEBUG) Log.d(TAG, "VirtualDisplay resumed");
|
||||
if (!mRunning) {
|
||||
startCaptureLoop();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStopped() {
|
||||
if (DEBUG) Log.d(TAG, "VirtualDisplay stopped");
|
||||
mRunning = false;
|
||||
setCapturing(false);
|
||||
}
|
||||
};
|
||||
|
||||
private byte[] getPixels(ByteBuffer buffer, int width, int height, int rowStride,
|
||||
int pixelStride, int firstX, int firstY) {
|
||||
int effectiveWidth = width - firstX * 2;
|
||||
int effectiveHeight = height - firstY * 2;
|
||||
|
||||
if (effectiveWidth <= 0 || effectiveHeight <= 0) {
|
||||
effectiveWidth = width;
|
||||
effectiveHeight = height;
|
||||
firstX = 0;
|
||||
firstY = 0;
|
||||
}
|
||||
|
||||
byte[] pixels = new byte[effectiveWidth * effectiveHeight * 3];
|
||||
int pixelIndex = 0;
|
||||
|
||||
for (int y = firstY; y < height - firstY; y++) {
|
||||
int rowOffset = y * rowStride;
|
||||
for (int x = firstX; x < width - firstX; x++) {
|
||||
int offset = rowOffset + x * pixelStride;
|
||||
pixels[pixelIndex++] = (byte) (buffer.get(offset) & 0xff); // R
|
||||
pixels[pixelIndex++] = (byte) (buffer.get(offset + 1) & 0xff); // G
|
||||
pixels[pixelIndex++] = (byte) (buffer.get(offset + 2) & 0xff); // B
|
||||
}
|
||||
}
|
||||
|
||||
return pixels;
|
||||
}
|
||||
|
||||
private byte[] getAverageColor(ByteBuffer buffer, int width, int height, int rowStride,
|
||||
int pixelStride, int firstX, int firstY) {
|
||||
long totalRed = 0, totalGreen = 0, totalBlue = 0;
|
||||
int pixelCount = 0;
|
||||
|
||||
int startY = Math.max(0, firstY);
|
||||
int endY = Math.min(height, height - firstY);
|
||||
int startX = Math.max(0, firstX);
|
||||
int endX = Math.min(width, width - firstX);
|
||||
|
||||
for (int y = startY; y < endY; y++) {
|
||||
int rowOffset = y * rowStride;
|
||||
for (int x = startX; x < endX; x++) {
|
||||
int offset = rowOffset + x * pixelStride;
|
||||
totalRed += buffer.get(offset) & 0xff;
|
||||
totalGreen += buffer.get(offset + 1) & 0xff;
|
||||
totalBlue += buffer.get(offset + 2) & 0xff;
|
||||
pixelCount++;
|
||||
}
|
||||
}
|
||||
|
||||
byte[] avgColor = new byte[3];
|
||||
if (pixelCount > 0) {
|
||||
avgColor[0] = (byte) (totalRed / pixelCount);
|
||||
avgColor[1] = (byte) (totalGreen / pixelCount);
|
||||
avgColor[2] = (byte) (totalBlue / pixelCount);
|
||||
}
|
||||
|
||||
return avgColor;
|
||||
}
|
||||
|
||||
private void sendImage(Image img) {
|
||||
if (img == null) return;
|
||||
|
||||
Image.Plane[] planes = img.getPlanes();
|
||||
if (planes == null || planes.length == 0) return;
|
||||
|
||||
Image.Plane plane = planes[0];
|
||||
ByteBuffer buffer = plane.getBuffer();
|
||||
if (buffer == null) return;
|
||||
|
||||
int width = img.getWidth();
|
||||
int height = img.getHeight();
|
||||
int pixelStride = plane.getPixelStride();
|
||||
int rowStride = plane.getRowStride();
|
||||
int firstX = 0;
|
||||
int firstY = 0;
|
||||
|
||||
if (mRemoveBorders || mAvgColor) {
|
||||
mBorderProcessor.parseBorder(buffer, width, height, rowStride, pixelStride);
|
||||
BorderProcessor.BorderObject border = mBorderProcessor.getCurrentBorder();
|
||||
if (border != null && border.isKnown()) {
|
||||
firstX = border.getHorizontalBorderIndex();
|
||||
firstY = border.getVerticalBorderIndex();
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
if (mAvgColor) {
|
||||
mListener.sendFrame(
|
||||
getAverageColor(buffer, width, height, rowStride, pixelStride, firstX, firstY),
|
||||
1,
|
||||
1
|
||||
);
|
||||
} else {
|
||||
int effectiveWidth = width - firstX * 2;
|
||||
int effectiveHeight = height - firstY * 2;
|
||||
if (effectiveWidth > 0 && effectiveHeight > 0) {
|
||||
mListener.sendFrame(
|
||||
getPixels(buffer, width, height, rowStride, pixelStride, firstX, firstY),
|
||||
effectiveWidth,
|
||||
effectiveHeight
|
||||
);
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
if (DEBUG) Log.w(TAG, "Error sending frame: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,144 @@
|
||||
package com.hyperion.grabber.common;
|
||||
|
||||
import android.content.res.Configuration;
|
||||
import android.media.projection.MediaProjection;
|
||||
import android.os.Handler;
|
||||
import android.os.HandlerThread;
|
||||
import android.os.Process;
|
||||
import android.util.Log;
|
||||
|
||||
import com.hyperion.grabber.common.network.HyperionThread;
|
||||
import com.hyperion.grabber.common.util.BorderProcessor;
|
||||
import com.hyperion.grabber.common.util.HyperionGrabberOptions;
|
||||
|
||||
public class HyperionScreenEncoderBase {
|
||||
static final boolean DEBUG = false;
|
||||
private static final String TAG = "ScreenEncoderBase";
|
||||
private final int CLEAR_COMMAND_DELAY_MS = 100;
|
||||
private final int INIT_ORIENTATION;
|
||||
|
||||
final boolean mRemoveBorders = false; // enables detecting borders for standard grabbing - disabled for now
|
||||
final boolean mAvgColor;
|
||||
final int mWidthScaled;
|
||||
final int mFrameRate;
|
||||
final int mHeightScaled;
|
||||
final int mDensity;
|
||||
boolean mIsCapturing = false;
|
||||
int mCurrentOrientation;
|
||||
|
||||
BorderProcessor mBorderProcessor;
|
||||
Handler mHandler;
|
||||
MediaProjection mMediaProjection;
|
||||
HyperionThread.HyperionThreadListener mListener;
|
||||
|
||||
HyperionScreenEncoderBase(final HyperionThread.HyperionThreadListener listener,
|
||||
final MediaProjection projection, int width, int height,
|
||||
final int density, HyperionGrabberOptions options) {
|
||||
if (DEBUG) Log.d(TAG, "Encoder starting");
|
||||
|
||||
mListener = listener;
|
||||
mMediaProjection = projection;
|
||||
mDensity = density;
|
||||
mFrameRate = options.getFrameRate();
|
||||
mAvgColor = options.useAverageColor();
|
||||
|
||||
int blackThreshold = options.getBlackThreshold();
|
||||
mBorderProcessor = new BorderProcessor(blackThreshold);
|
||||
|
||||
mCurrentOrientation = INIT_ORIENTATION = width > height ? Configuration.ORIENTATION_LANDSCAPE :
|
||||
Configuration.ORIENTATION_PORTRAIT;
|
||||
|
||||
if (DEBUG) {
|
||||
Log.d(TAG, "Density: " + String.valueOf(mDensity));
|
||||
Log.d(TAG, "Frame Rate: " + String.valueOf(mFrameRate));
|
||||
Log.d(TAG, "Original Width: " + String.valueOf(width));
|
||||
Log.d(TAG, "Original Height: " + String.valueOf(height));
|
||||
Log.d(TAG, "Average Color Only: " + String.valueOf(mAvgColor));
|
||||
Log.d(TAG, "Black Pixel Threshold: " + String.valueOf(blackThreshold));
|
||||
}
|
||||
|
||||
int divisor = options.findDivisor(width, height);
|
||||
|
||||
mHeightScaled = (height / divisor);
|
||||
mWidthScaled = (width / divisor);
|
||||
|
||||
if (DEBUG) {
|
||||
Log.d(TAG, "Common Divisor: " + String.valueOf(divisor));
|
||||
Log.d(TAG, "Scaled Width: " + String.valueOf(mWidthScaled));
|
||||
Log.d(TAG, "Scaled Height: " + String.valueOf(mHeightScaled));
|
||||
}
|
||||
|
||||
final HandlerThread thread = new HandlerThread(TAG, Process.THREAD_PRIORITY_DISPLAY);
|
||||
thread.start();
|
||||
mHandler = new Handler(thread.getLooper());
|
||||
|
||||
if (DEBUG) Log.d(TAG, "Encoder ready");
|
||||
}
|
||||
|
||||
private Runnable clearAndDisconnectRunner = new Runnable() {
|
||||
public void run() {
|
||||
if (DEBUG) Log.d(TAG, "Clearing LEDs and disconnecting");
|
||||
try {
|
||||
Thread.sleep(CLEAR_COMMAND_DELAY_MS);
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
mListener.clear();
|
||||
mListener.disconnect();
|
||||
}
|
||||
};
|
||||
|
||||
private Runnable clearLightsRunner = new Runnable() {
|
||||
public void run() {
|
||||
if (DEBUG) Log.d(TAG, "Clearing LEDs");
|
||||
try {
|
||||
Thread.sleep(CLEAR_COMMAND_DELAY_MS);
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
mListener.clear();
|
||||
}
|
||||
};
|
||||
|
||||
public void clearLights() {
|
||||
new Thread(clearLightsRunner).start();
|
||||
}
|
||||
|
||||
void clearAndDisconnect() {
|
||||
new Thread(clearAndDisconnectRunner).start();
|
||||
}
|
||||
|
||||
public boolean isCapturing() {
|
||||
return mIsCapturing;
|
||||
}
|
||||
|
||||
public void setCapturing(boolean isCapturing) {
|
||||
mIsCapturing = isCapturing;
|
||||
}
|
||||
|
||||
public void sendStatus() {
|
||||
if (mListener != null) {
|
||||
mListener.sendStatus(isCapturing());
|
||||
}
|
||||
}
|
||||
|
||||
public void stopRecording() {
|
||||
throw new RuntimeException("Stub!");
|
||||
}
|
||||
|
||||
public void resumeRecording() {
|
||||
throw new RuntimeException("Stub!");
|
||||
}
|
||||
|
||||
int getGrabberWidth() {
|
||||
return INIT_ORIENTATION != mCurrentOrientation ? mHeightScaled : mWidthScaled;
|
||||
}
|
||||
|
||||
int getGrabberHeight() {
|
||||
return INIT_ORIENTATION != mCurrentOrientation ? mWidthScaled : mHeightScaled;
|
||||
}
|
||||
|
||||
public void setOrientation(int orientation) {
|
||||
mCurrentOrientation = orientation;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,340 @@
|
||||
package com.hyperion.grabber.common;
|
||||
|
||||
import android.annotation.TargetApi;
|
||||
import android.app.Notification;
|
||||
import android.app.NotificationManager;
|
||||
import android.app.Service;
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.IntentFilter;
|
||||
import android.content.pm.ServiceInfo;
|
||||
import android.media.projection.MediaProjection;
|
||||
import android.media.projection.MediaProjectionManager;
|
||||
import android.os.Build;
|
||||
import android.os.IBinder;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.RequiresApi;
|
||||
import androidx.core.app.ServiceCompat;
|
||||
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
|
||||
import android.util.DisplayMetrics;
|
||||
import android.util.Log;
|
||||
import android.view.WindowManager;
|
||||
|
||||
import com.hyperion.grabber.common.network.HyperionThread;
|
||||
import com.hyperion.grabber.common.util.HyperionGrabberOptions;
|
||||
import com.hyperion.grabber.common.util.Preferences;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
public class HyperionScreenService extends Service {
|
||||
public static final String BROADCAST_ERROR = "SERVICE_ERROR";
|
||||
public static final String BROADCAST_TAG = "SERVICE_STATUS";
|
||||
public static final String BROADCAST_FILTER = "SERVICE_FILTER";
|
||||
private static final boolean DEBUG = false;
|
||||
private static final String TAG = "HyperionScreenService";
|
||||
|
||||
private static final String BASE = "com.hyperion.grabber.service.";
|
||||
public static final String ACTION_START = BASE + "ACTION_START";
|
||||
public static final String ACTION_STOP = BASE + "ACTION_STOP";
|
||||
public static final String ACTION_EXIT = BASE + "ACTION_EXIT";
|
||||
public static final String GET_STATUS = BASE + "ACTION_STATUS";
|
||||
public static final String EXTRA_RESULT_CODE = BASE + "EXTRA_RESULT_CODE";
|
||||
private static final int NOTIFICATION_ID = 1;
|
||||
private static final int NOTIFICATION_EXIT_INTENT_ID = 2;
|
||||
|
||||
private boolean RECONNECT = false;
|
||||
private boolean hasConnected = false;
|
||||
private MediaProjectionManager mMediaProjectionManager;
|
||||
private HyperionThread mHyperionThread;
|
||||
private static MediaProjection _mediaProjection;
|
||||
private int mFrameRate;
|
||||
private int mHorizontalLEDCount;
|
||||
private int mVerticalLEDCount;
|
||||
private boolean mSendAverageColor;
|
||||
private HyperionScreenEncoder mHyperionEncoder;
|
||||
private NotificationManager mNotificationManager;
|
||||
private String mStartError = null;
|
||||
|
||||
HyperionThreadBroadcaster mReceiver = new HyperionThreadBroadcaster() {
|
||||
@Override
|
||||
public void onConnected() {
|
||||
Log.d(TAG, "CONNECTED TO HYPERION INSTANCE");
|
||||
hasConnected = true;
|
||||
notifyActivity();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onConnectionError(int errorID, String error) {
|
||||
Log.e(TAG, "COULD NOT CONNECT TO HYPERION INSTANCE");
|
||||
if (error != null) Log.e(TAG, error);
|
||||
if (!hasConnected) {
|
||||
mStartError = getResources().getString(R.string.error_server_unreachable);
|
||||
haltStartup();
|
||||
}
|
||||
if (RECONNECT && hasConnected) {
|
||||
Log.e(TAG, "AUTOMATIC RECONNECT ENABLED. CONNECTING ...");
|
||||
} else if (!RECONNECT && hasConnected) {
|
||||
mStartError = getResources().getString(R.string.error_connection_lost);
|
||||
stopSelf();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onReceiveStatus(boolean isCapturing) {
|
||||
if (DEBUG) Log.v(TAG, "Received grabber status, notifying activity. Status: " +
|
||||
String.valueOf(isCapturing));
|
||||
notifyActivity();
|
||||
}
|
||||
};
|
||||
|
||||
BroadcastReceiver mEventReceiver = new BroadcastReceiver() {
|
||||
@Override
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
switch (Objects.requireNonNull(intent.getAction())) {
|
||||
case Intent.ACTION_SCREEN_ON:
|
||||
if (DEBUG) Log.v(TAG, "ACTION_SCREEN_ON intent received");
|
||||
if (mHyperionEncoder != null && !isCapturing()) {
|
||||
if (DEBUG) Log.v(TAG, "Encoder not grabbing, attempting to restart");
|
||||
mHyperionEncoder.resumeRecording();
|
||||
}
|
||||
notifyActivity();
|
||||
break;
|
||||
case Intent.ACTION_SCREEN_OFF:
|
||||
if (DEBUG) Log.v(TAG, "ACTION_SCREEN_OFF intent received");
|
||||
if (mHyperionEncoder != null) {
|
||||
if (DEBUG) Log.v(TAG, "Clearing current light data");
|
||||
mHyperionEncoder.clearLights();
|
||||
}
|
||||
break;
|
||||
case Intent.ACTION_CONFIGURATION_CHANGED:
|
||||
if (DEBUG) Log.v(TAG, "ACTION_CONFIGURATION_CHANGED intent received");
|
||||
if (mHyperionEncoder != null && Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
if (DEBUG) Log.v(TAG, "Configuration changed, checking orientation");
|
||||
mHyperionEncoder.setOrientation(getResources().getConfiguration().orientation);
|
||||
}
|
||||
break;
|
||||
case Intent.ACTION_SHUTDOWN:
|
||||
case Intent.ACTION_REBOOT:
|
||||
if (DEBUG) Log.v(TAG, "ACTION_SHUTDOWN|ACTION_REBOOT intent received");
|
||||
stopScreenRecord();
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@Override
|
||||
public void onCreate() {
|
||||
mNotificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
|
||||
super.onCreate();
|
||||
}
|
||||
|
||||
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
|
||||
private boolean prepared() {
|
||||
Preferences prefs = new Preferences(getBaseContext());
|
||||
String host = prefs.getString(R.string.pref_key_host, null);
|
||||
int port = prefs.getInt(R.string.pref_key_port, -1);
|
||||
String priority = prefs.getString(R.string.pref_key_priority, "100");
|
||||
mFrameRate = prefs.getInt(R.string.pref_key_framerate);
|
||||
mHorizontalLEDCount = prefs.getInt(R.string.pref_key_x_led);
|
||||
mVerticalLEDCount = prefs.getInt(R.string.pref_key_y_led);
|
||||
mSendAverageColor = prefs.getBoolean(R.string.pref_key_use_avg_color);
|
||||
RECONNECT = prefs.getBoolean(R.string.pref_key_reconnect);
|
||||
int delay = prefs.getInt(R.string.pref_key_reconnect_delay);
|
||||
|
||||
if (host == null || Objects.equals(host, "0.0.0.0") || Objects.equals(host, "")) {
|
||||
mStartError = getResources().getString(R.string.error_empty_host);
|
||||
return false;
|
||||
}
|
||||
if (port == -1) {
|
||||
mStartError = getResources().getString(R.string.error_empty_port);
|
||||
return false;
|
||||
}
|
||||
if (mHorizontalLEDCount <= 0 || mVerticalLEDCount <= 0) {
|
||||
mStartError = getResources().getString(R.string.error_invalid_led_counts);
|
||||
return false;
|
||||
}
|
||||
mMediaProjectionManager = (MediaProjectionManager) getSystemService(Context.MEDIA_PROJECTION_SERVICE);
|
||||
mHyperionThread = new HyperionThread(mReceiver, host, port, Integer.parseInt(priority), RECONNECT, delay);
|
||||
mHyperionThread.start();
|
||||
mStartError = null;
|
||||
return true;
|
||||
}
|
||||
|
||||
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
|
||||
@Override
|
||||
public int onStartCommand(Intent intent, int flags, int startId) {
|
||||
if (DEBUG) Log.v(TAG, "Start command received");
|
||||
super.onStartCommand(intent, flags, startId);
|
||||
if (intent == null || intent.getAction() == null) {
|
||||
String nullItem = (intent == null ? "intent" : "action");
|
||||
if (DEBUG) Log.v(TAG, "Null " + nullItem + " provided to start command");
|
||||
} else {
|
||||
final String action = intent.getAction();
|
||||
if (DEBUG) Log.v(TAG, "Start command action: " + String.valueOf(action));
|
||||
switch (action) {
|
||||
case ACTION_START:
|
||||
if (mHyperionThread == null) {
|
||||
boolean isPrepared = prepared();
|
||||
if (isPrepared) {
|
||||
// For Android 12+, we must start foreground with mediaProjection type BEFORE getting MediaProjection
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
|
||||
ServiceCompat.startForeground(this, NOTIFICATION_ID, getNotification(),
|
||||
ServiceInfo.FOREGROUND_SERVICE_TYPE_MEDIA_PROJECTION);
|
||||
} else {
|
||||
startForeground(NOTIFICATION_ID, getNotification());
|
||||
}
|
||||
|
||||
startScreenRecord(intent);
|
||||
|
||||
IntentFilter intentFilter = new IntentFilter();
|
||||
intentFilter.addAction(Intent.ACTION_SCREEN_ON);
|
||||
intentFilter.addAction(Intent.ACTION_SCREEN_OFF);
|
||||
intentFilter.addAction(Intent.ACTION_CONFIGURATION_CHANGED);
|
||||
intentFilter.addAction(Intent.ACTION_REBOOT);
|
||||
intentFilter.addAction(Intent.ACTION_SHUTDOWN);
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
|
||||
registerReceiver(mEventReceiver, intentFilter, Context.RECEIVER_NOT_EXPORTED);
|
||||
} else {
|
||||
registerReceiver(mEventReceiver, intentFilter);
|
||||
}
|
||||
} else {
|
||||
haltStartup();
|
||||
}
|
||||
}
|
||||
break;
|
||||
case ACTION_STOP:
|
||||
stopScreenRecord();
|
||||
break;
|
||||
case GET_STATUS:
|
||||
notifyActivity();
|
||||
break;
|
||||
case ACTION_EXIT:
|
||||
stopSelf();
|
||||
break;
|
||||
}
|
||||
}
|
||||
return START_STICKY;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public IBinder onBind(Intent intent) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
if (DEBUG) Log.v(TAG, "Ending service");
|
||||
|
||||
try {
|
||||
unregisterReceiver(mEventReceiver);
|
||||
} catch (Exception e) {
|
||||
if (DEBUG) Log.v(TAG, "Wake receiver not registered");
|
||||
}
|
||||
|
||||
stopScreenRecord();
|
||||
stopForeground(true);
|
||||
notifyActivity();
|
||||
|
||||
super.onDestroy();
|
||||
}
|
||||
|
||||
private void haltStartup() {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
|
||||
ServiceCompat.startForeground(this, NOTIFICATION_ID, getNotification(),
|
||||
ServiceInfo.FOREGROUND_SERVICE_TYPE_MEDIA_PROJECTION);
|
||||
} else {
|
||||
startForeground(NOTIFICATION_ID, getNotification());
|
||||
}
|
||||
stopSelf();
|
||||
}
|
||||
|
||||
private Intent buildExitButton() {
|
||||
Intent notificationIntent = new Intent(this, this.getClass());
|
||||
notificationIntent.setFlags(Intent.FLAG_RECEIVER_FOREGROUND);
|
||||
notificationIntent.setAction(ACTION_EXIT);
|
||||
return notificationIntent;
|
||||
}
|
||||
|
||||
public Notification getNotification() {
|
||||
HyperionNotification notification = new HyperionNotification(this, mNotificationManager);
|
||||
String label = getString(R.string.notification_exit_button);
|
||||
notification.setAction(NOTIFICATION_EXIT_INTENT_ID, label, buildExitButton());
|
||||
return notification.buildNotification();
|
||||
}
|
||||
|
||||
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
|
||||
private void startScreenRecord(final Intent intent) {
|
||||
if (DEBUG) Log.v(TAG, "Start screen recorder");
|
||||
final int resultCode = intent.getIntExtra(EXTRA_RESULT_CODE, 0);
|
||||
// get MediaProjection
|
||||
final MediaProjection projection = mMediaProjectionManager.getMediaProjection(resultCode, intent);
|
||||
WindowManager window = (WindowManager) getSystemService(Context.WINDOW_SERVICE);
|
||||
if (projection != null && window != null) {
|
||||
_mediaProjection = projection;
|
||||
final DisplayMetrics metrics = new DisplayMetrics();
|
||||
window.getDefaultDisplay().getRealMetrics(metrics);
|
||||
final int density = metrics.densityDpi;
|
||||
HyperionGrabberOptions options = new HyperionGrabberOptions(mHorizontalLEDCount,
|
||||
mVerticalLEDCount, mFrameRate, mSendAverageColor);
|
||||
if (DEBUG) Log.v(TAG, "Starting the recorder");
|
||||
mHyperionEncoder = new HyperionScreenEncoder(mHyperionThread.getReceiver(),
|
||||
projection, metrics.widthPixels, metrics.heightPixels,
|
||||
density, options);
|
||||
mHyperionEncoder.sendStatus();
|
||||
}
|
||||
}
|
||||
|
||||
private void stopScreenRecord() {
|
||||
if (DEBUG) Log.v(TAG, "Stop screen recorder");
|
||||
RECONNECT = false;
|
||||
mNotificationManager.cancel(NOTIFICATION_ID);
|
||||
if (mHyperionEncoder != null) {
|
||||
if (DEBUG) Log.v(TAG, "Stopping the current encoder");
|
||||
mHyperionEncoder.stopRecording();
|
||||
}
|
||||
releaseResource();
|
||||
if (mHyperionThread != null) {
|
||||
mHyperionThread.interrupt();
|
||||
}
|
||||
}
|
||||
|
||||
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
|
||||
public void releaseResource() {
|
||||
if (_mediaProjection != null) {
|
||||
_mediaProjection.stop();
|
||||
_mediaProjection = null;
|
||||
}
|
||||
}
|
||||
|
||||
boolean isCapturing() {
|
||||
return mHyperionEncoder != null && mHyperionEncoder.isCapturing();
|
||||
}
|
||||
|
||||
boolean isCommunicating() {
|
||||
return isCapturing() && hasConnected;
|
||||
}
|
||||
|
||||
private void notifyActivity() {
|
||||
Intent intent = new Intent(BROADCAST_FILTER);
|
||||
intent.putExtra(BROADCAST_TAG, isCommunicating());
|
||||
intent.putExtra(BROADCAST_ERROR, mStartError);
|
||||
if (DEBUG) {
|
||||
Log.v(TAG, "Sending status broadcast - communicating: " +
|
||||
String.valueOf(isCommunicating()));
|
||||
if (mStartError != null) {
|
||||
Log.v(TAG, "Startup error: " + mStartError);
|
||||
}
|
||||
}
|
||||
LocalBroadcastManager.getInstance(getApplicationContext()).sendBroadcast(intent);
|
||||
}
|
||||
|
||||
public interface HyperionThreadBroadcaster {
|
||||
// void onResponse(String response);
|
||||
void onConnected();
|
||||
void onConnectionError(int errorHash, String errorString);
|
||||
void onReceiveStatus(boolean isCapturing);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
package com.hyperion.grabber.common;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.ActivityManager;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.media.projection.MediaProjectionManager;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.RequiresApi;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
public class ToggleActivity extends AppCompatActivity {
|
||||
public static final int REQUEST_MEDIA_PROJECTION = 1;
|
||||
|
||||
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
boolean serviceRunning = checkForInstance();
|
||||
|
||||
if (serviceRunning) {
|
||||
stopService();
|
||||
finish();
|
||||
} else {
|
||||
requestPermission();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
if (requestCode == REQUEST_MEDIA_PROJECTION) {
|
||||
if (resultCode == Activity.RESULT_OK) {
|
||||
startScreenRecorder(this, resultCode, data);
|
||||
}
|
||||
|
||||
finish();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private static void startScreenRecorder(Context context, int resultCode, Intent data) {
|
||||
Intent intent = new Intent(context, HyperionScreenService.class);
|
||||
intent.setAction(HyperionScreenService.ACTION_START);
|
||||
intent.putExtra(HyperionScreenService.EXTRA_RESULT_CODE, resultCode);
|
||||
intent.putExtras(data);
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
context.startForegroundService(intent);
|
||||
} else {
|
||||
context.startService(intent);
|
||||
}
|
||||
}
|
||||
|
||||
/** @return whether the service is running */
|
||||
private boolean checkForInstance() {
|
||||
if (isServiceRunning()) {
|
||||
Intent intent = new Intent(this, HyperionScreenService.class);
|
||||
intent.setAction(HyperionScreenService.GET_STATUS);
|
||||
startService(intent);
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private boolean isServiceRunning() {
|
||||
ActivityManager manager = (ActivityManager) getSystemService(Context.ACTIVITY_SERVICE);
|
||||
assert manager != null;
|
||||
for (ActivityManager.RunningServiceInfo service : manager.getRunningServices(Integer.MAX_VALUE)) {
|
||||
if (HyperionScreenService.class.getName().equals(service.service.getClassName())) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
|
||||
private void requestPermission(){
|
||||
MediaProjectionManager manager = (MediaProjectionManager)
|
||||
getSystemService(Context.MEDIA_PROJECTION_SERVICE);
|
||||
if (manager != null) {
|
||||
startActivityForResult(manager.createScreenCaptureIntent(), REQUEST_MEDIA_PROJECTION);
|
||||
}
|
||||
}
|
||||
|
||||
/** stop recording & stop service */
|
||||
|
||||
private void stopService() {
|
||||
Intent stopIntent = new Intent(ToggleActivity.this, HyperionScreenService.class);
|
||||
stopIntent.setAction(HyperionScreenService.ACTION_EXIT);
|
||||
startService(stopIntent);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.hyperion.grabber.common.network;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
public interface HyperionClient {
|
||||
boolean isConnected();
|
||||
void disconnect() throws IOException;
|
||||
void clear(int priority) throws IOException;
|
||||
void clearAll() throws IOException;
|
||||
void setColor(int color, int priority) throws IOException;
|
||||
void setColor(int color, int priority, int duration_ms) throws IOException;
|
||||
void setImage(byte[] data, int width, int height, int priority) throws IOException;
|
||||
void setImage(byte[] data, int width, int height, int priority, int duration_ms) throws IOException;
|
||||
}
|
||||
@@ -0,0 +1,137 @@
|
||||
package com.hyperion.grabber.common.network;
|
||||
|
||||
import com.google.flatbuffers.FlatBufferBuilder;
|
||||
import hyperionnet.Clear;
|
||||
import hyperionnet.Color;
|
||||
import hyperionnet.Command;
|
||||
import hyperionnet.Image;
|
||||
import hyperionnet.ImageType;
|
||||
import hyperionnet.RawImage;
|
||||
import hyperionnet.Register;
|
||||
import hyperionnet.Reply;
|
||||
import hyperionnet.Request;
|
||||
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.net.InetSocketAddress;
|
||||
import java.net.Socket;
|
||||
import java.nio.ByteBuffer;
|
||||
|
||||
public class HyperionFlatBuffers implements HyperionClient {
|
||||
private final int TIMEOUT = 1000;
|
||||
private final Socket mSocket;
|
||||
private final int mPriority;
|
||||
private final FlatBufferBuilder mBuilder;
|
||||
|
||||
public HyperionFlatBuffers(String address, int port, int priority) throws IOException {
|
||||
mSocket = new Socket();
|
||||
mSocket.connect(new InetSocketAddress(address, port), TIMEOUT);
|
||||
mPriority = priority;
|
||||
mBuilder = new FlatBufferBuilder(1024);
|
||||
register();
|
||||
}
|
||||
|
||||
private void register() throws IOException {
|
||||
mBuilder.clear();
|
||||
int originOffset = mBuilder.createString("HyperionAndroidGrabber");
|
||||
int registerOffset = Register.createRegister(mBuilder, originOffset, mPriority);
|
||||
int requestOffset = Request.createRequest(mBuilder, Command.Register, registerOffset);
|
||||
Request.finishRequestBuffer(mBuilder, requestOffset);
|
||||
sendRequest(mBuilder.dataBuffer());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isConnected() {
|
||||
return mSocket != null && mSocket.isConnected();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void disconnect() throws IOException {
|
||||
if (isConnected()) {
|
||||
mSocket.close();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clear(int priority) throws IOException {
|
||||
mBuilder.clear();
|
||||
int clearOffset = Clear.createClear(mBuilder, priority);
|
||||
int requestOffset = Request.createRequest(mBuilder, Command.Clear, clearOffset);
|
||||
Request.finishRequestBuffer(mBuilder, requestOffset);
|
||||
sendRequest(mBuilder.dataBuffer());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clearAll() throws IOException {
|
||||
clear(-1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setColor(int color, int priority) throws IOException {
|
||||
setColor(color, priority, -1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setColor(int color, int priority, int duration_ms) throws IOException {
|
||||
mBuilder.clear();
|
||||
int colorOffset = Color.createColor(mBuilder, color, duration_ms);
|
||||
int requestOffset = Request.createRequest(mBuilder, Command.Color, colorOffset);
|
||||
Request.finishRequestBuffer(mBuilder, requestOffset);
|
||||
sendRequest(mBuilder.dataBuffer());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setImage(byte[] data, int width, int height, int priority) throws IOException {
|
||||
setImage(data, width, height, priority, -1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setImage(byte[] data, int width, int height, int priority, int duration_ms) throws IOException {
|
||||
mBuilder.clear();
|
||||
int dataOffset = RawImage.createDataVector(mBuilder, data);
|
||||
int rawImageOffset = RawImage.createRawImage(mBuilder, dataOffset, width, height);
|
||||
int imageOffset = Image.createImage(mBuilder, ImageType.RawImage, rawImageOffset, duration_ms);
|
||||
int requestOffset = Request.createRequest(mBuilder, Command.Image, imageOffset);
|
||||
Request.finishRequestBuffer(mBuilder, requestOffset);
|
||||
sendRequest(mBuilder.dataBuffer());
|
||||
}
|
||||
|
||||
private void sendRequest(ByteBuffer bb) throws IOException {
|
||||
if (isConnected()) {
|
||||
int size = bb.remaining();
|
||||
byte[] header = new byte[4];
|
||||
header[0] = (byte)((size >> 24) & 0xFF);
|
||||
header[1] = (byte)((size >> 16) & 0xFF);
|
||||
header[2] = (byte)((size >> 8) & 0xFF);
|
||||
header[3] = (byte)((size ) & 0xFF);
|
||||
|
||||
OutputStream output = mSocket.getOutputStream();
|
||||
output.write(header);
|
||||
|
||||
byte[] data = new byte[bb.remaining()];
|
||||
bb.get(data);
|
||||
output.write(data);
|
||||
output.flush();
|
||||
|
||||
receiveReply();
|
||||
}
|
||||
}
|
||||
|
||||
private void receiveReply() throws IOException {
|
||||
// We don't really need to parse the reply for now, but we should consume it
|
||||
// to keep the socket clean.
|
||||
if (mSocket.getInputStream().available() >= 4) {
|
||||
byte[] header = new byte[4];
|
||||
int read = mSocket.getInputStream().read(header, 0, 4);
|
||||
if (read == 4) {
|
||||
int size = ((header[0] & 0xFF) << 24) | ((header[1] & 0xFF) << 16) | ((header[2] & 0xFF) << 8) | (header[3] & 0xFF);
|
||||
if (size > 0) {
|
||||
byte[] data = new byte[size];
|
||||
mSocket.getInputStream().read(data, 0, size);
|
||||
// Reply reply = Reply.getRootAsReply(ByteBuffer.wrap(data));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,124 @@
|
||||
package com.hyperion.grabber.common.network;
|
||||
|
||||
import com.hyperion.grabber.common.HyperionScreenService;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
public class HyperionThread extends Thread {
|
||||
|
||||
private String HOST;
|
||||
private int PORT;
|
||||
private int PRIORITY;
|
||||
private final int FRAME_DURATION = -1;
|
||||
private boolean RECONNECT = false;
|
||||
private boolean HAS_CONNECTED = false;
|
||||
private int RECONNECT_DELAY;
|
||||
private HyperionClient mHyperion;
|
||||
|
||||
HyperionScreenService.HyperionThreadBroadcaster mSender;
|
||||
HyperionThreadListener mReceiver = new HyperionThreadListener() {
|
||||
@Override
|
||||
public void sendFrame(byte[] data, int width, int height) {
|
||||
if (mHyperion != null && mHyperion.isConnected()) {
|
||||
try {
|
||||
mHyperion.setImage(data, width, height, PRIORITY, FRAME_DURATION);
|
||||
} catch (IOException e) {
|
||||
mSender.onConnectionError(e.hashCode(), e.getMessage());
|
||||
e.printStackTrace();
|
||||
if (RECONNECT && HAS_CONNECTED) {
|
||||
reconnectDelay(RECONNECT_DELAY);
|
||||
try {
|
||||
mHyperion = createClient();
|
||||
} catch (IOException i) {
|
||||
i.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clear() {
|
||||
if (mHyperion != null && mHyperion.isConnected()) {
|
||||
try {
|
||||
mHyperion.clear(PRIORITY);
|
||||
} catch (IOException e) {
|
||||
mSender.onConnectionError(e.hashCode(), e.getMessage());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void disconnect() {
|
||||
if (mHyperion != null) {
|
||||
try {
|
||||
mHyperion.disconnect();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendStatus(boolean isGrabbing) {
|
||||
if (mSender != null) {
|
||||
mSender.onReceiveStatus(isGrabbing);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
public HyperionThread(HyperionScreenService.HyperionThreadBroadcaster listener, final String host,
|
||||
final int port, final int priority, final boolean reconnect, final int delay){
|
||||
HOST = host;
|
||||
PORT = port;
|
||||
PRIORITY = priority;
|
||||
RECONNECT = reconnect;
|
||||
RECONNECT_DELAY = delay * 1000;
|
||||
mSender = listener;
|
||||
}
|
||||
|
||||
public HyperionThreadListener getReceiver() {return mReceiver;}
|
||||
|
||||
private HyperionClient createClient() throws IOException {
|
||||
return new HyperionFlatBuffers(HOST, PORT, PRIORITY);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run(){
|
||||
do {
|
||||
try {
|
||||
mHyperion = createClient();
|
||||
} catch (IOException e) {
|
||||
mSender.onConnectionError(e.hashCode(), e.getMessage());
|
||||
e.printStackTrace();
|
||||
if (RECONNECT && HAS_CONNECTED) {
|
||||
reconnectDelay(RECONNECT_DELAY);
|
||||
}
|
||||
} finally {
|
||||
if (mHyperion != null && mSender != null && mHyperion.isConnected()) {
|
||||
HAS_CONNECTED = true;
|
||||
mSender.onConnected();
|
||||
break;
|
||||
}
|
||||
}
|
||||
} while (RECONNECT && HAS_CONNECTED);
|
||||
}
|
||||
|
||||
public void reconnectDelay(long t) {
|
||||
try {
|
||||
Thread.sleep(t);
|
||||
} catch (InterruptedException e) {
|
||||
RECONNECT = false;
|
||||
HAS_CONNECTED = false;
|
||||
Thread.currentThread().interrupt();
|
||||
}
|
||||
}
|
||||
|
||||
public interface HyperionThreadListener {
|
||||
void sendFrame(byte[] data, int width, int height);
|
||||
void clear();
|
||||
void disconnect();
|
||||
void sendStatus(boolean isGrabbing);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,171 @@
|
||||
package com.hyperion.grabber.common.network;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.WorkerThread;
|
||||
import android.util.Log;
|
||||
|
||||
import java.net.InetAddress;
|
||||
import java.net.InetSocketAddress;
|
||||
import java.net.NetworkInterface;
|
||||
import java.net.Socket;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
|
||||
/** Scans the local network for running Hyperion servers
|
||||
* Created by nino on 27-5-18.
|
||||
*/
|
||||
|
||||
public class NetworkScanner {
|
||||
public static final int PORT = 19400;
|
||||
/** The amount of milliseconds we try to connect to a given ip before giving up */
|
||||
private static final int ATTEMPT_TIMEOUT_MS = 50;
|
||||
|
||||
private final String[] ipsToTry;
|
||||
private int lastTriedIndex = -1;
|
||||
|
||||
|
||||
public NetworkScanner() {
|
||||
|
||||
ipsToTry = getIPsToTry();
|
||||
}
|
||||
|
||||
|
||||
/** Scan the next ip address in the list of addresses to try
|
||||
*
|
||||
* @return the hostname (or an ip represented as String) when a Hyperion server was found
|
||||
*/
|
||||
@Nullable
|
||||
@WorkerThread
|
||||
public String tryNext(){
|
||||
|
||||
if (!hasNextAttempt()){
|
||||
throw new IllegalStateException("No more ip addresses to try");
|
||||
}
|
||||
|
||||
Socket socket = new Socket();
|
||||
String ip = ipsToTry[++lastTriedIndex];
|
||||
try {
|
||||
socket.connect(new InetSocketAddress(ip, PORT), ATTEMPT_TIMEOUT_MS);
|
||||
|
||||
if (socket.isConnected()){
|
||||
socket.close();
|
||||
return ip;
|
||||
}
|
||||
|
||||
} catch(Exception e) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
return null;
|
||||
|
||||
}
|
||||
|
||||
/** An indication of how many of the total ip's have been tried
|
||||
*
|
||||
* @return progress in in the range [0.0 .. 1.0]
|
||||
*/
|
||||
public float getProgress() {
|
||||
if (ipsToTry.length == 0){
|
||||
return 1f;
|
||||
}
|
||||
|
||||
return lastTriedIndex / (float)ipsToTry.length;
|
||||
}
|
||||
|
||||
/** True if not all ip's have been tried yet
|
||||
*
|
||||
*/
|
||||
public boolean hasNextAttempt(){
|
||||
return ipsToTry.length > 0 && lastTriedIndex + 1 < ipsToTry.length;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get IP addresses for non-localhost interfaces
|
||||
* @param useIPv4 true=return ipv4, false=return ipv6
|
||||
* @return a list of found addresses (may be empty)
|
||||
*
|
||||
* https://stackoverflow.com/a/13007325
|
||||
*/
|
||||
@NonNull
|
||||
private static List<String> getIPAddresses(boolean useIPv4) {
|
||||
List<String> foundAddresses = new ArrayList<>();
|
||||
try {
|
||||
List<NetworkInterface> interfaces = Collections.list(NetworkInterface.getNetworkInterfaces());
|
||||
for (NetworkInterface intf : interfaces) {
|
||||
List<InetAddress> addrs = Collections.list(intf.getInetAddresses());
|
||||
for (InetAddress addr : addrs) {
|
||||
if (!addr.isLoopbackAddress()) {
|
||||
String sAddr = addr.getHostAddress();
|
||||
//boolean isIPv4 = InetAddressUtils.isIPv4Address(sAddr);
|
||||
boolean isIPv4 = sAddr.indexOf(':')<0;
|
||||
|
||||
if (useIPv4) {
|
||||
if (isIPv4)
|
||||
foundAddresses.add(sAddr);
|
||||
} else {
|
||||
if (!isIPv4) {
|
||||
int delim = sAddr.indexOf('%'); // drop ip6 zone suffix
|
||||
String v6Addr = delim < 0 ? sAddr.toUpperCase() : sAddr.substring(0, delim).toUpperCase();
|
||||
foundAddresses.add(v6Addr);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
// for now eat exceptions
|
||||
Log.e("HYPERION SCANNER", "Could not get ip address", e);
|
||||
}
|
||||
return foundAddresses;
|
||||
}
|
||||
|
||||
private String[] getIPsToTry(){
|
||||
try {
|
||||
List<String> localIpV4Addresses = getIPAddresses(true);
|
||||
String[] allIpsToTry = new String[localIpV4Addresses.size() * 254];
|
||||
|
||||
for (int localIpIdx = 0; localIpIdx < localIpV4Addresses.size(); localIpIdx++) {
|
||||
String localIpV4Address = localIpV4Addresses.get(localIpIdx);
|
||||
String[] ipsToTry = new String[254];
|
||||
|
||||
String[] ipParts = localIpV4Address.split("\\.");
|
||||
|
||||
String ipPrefix = ipParts[0] + "." + ipParts[1] + "." + ipParts[2] + ".";
|
||||
for (int i = 1; i< 255 ; i++){
|
||||
ipsToTry[i-1] = ipPrefix + i;
|
||||
}
|
||||
|
||||
int localNumberInSubnet = Integer.parseInt(ipParts[3]);
|
||||
|
||||
// sort in such a way that ips close to the local ip will be tried first
|
||||
Arrays.sort(ipsToTry, (lhs, rhs) -> {
|
||||
int lhsNumberInSubnet = Integer.parseInt(lhs.split("\\.")[3]);
|
||||
int rhsNumberInSubnet = Integer.parseInt(rhs.split("\\.")[3]);
|
||||
int lhsDistance = Math.abs(lhsNumberInSubnet - localNumberInSubnet);
|
||||
int rhsDistance = Math.abs(rhsNumberInSubnet - localNumberInSubnet);
|
||||
return lhsDistance - rhsDistance;
|
||||
});
|
||||
|
||||
for (int i = 0; i < ipsToTry.length; i++) {
|
||||
// interleave with previously found ip addresses
|
||||
int allIndex = (localIpV4Addresses.size() * i) + localIpIdx;
|
||||
allIpsToTry[allIndex] = ipsToTry[i];
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
return allIpsToTry;
|
||||
} catch (Exception e){
|
||||
// for now eat exceptions
|
||||
Log.e("HYPERION SCANNER", "Error while building list of subnet ip's", e);
|
||||
return new String[]{};
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,186 @@
|
||||
package com.hyperion.grabber.common.util;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
import java.util.Objects;
|
||||
|
||||
public class BorderProcessor {
|
||||
|
||||
private final int MAX_INCONSISTENT_FRAME_COUNT = 10;
|
||||
private final int MAX_UNKNOWN_FRAME_COUNT = 600;
|
||||
private final int BORDER_CHANGE_FRAME_COUNT = 50;
|
||||
|
||||
private final int BLACK_THRESHOLD; // unit to detect how black a pixel is [0..255]
|
||||
private BorderObject mPreviousBorder;
|
||||
private BorderObject mCurrentBorder;
|
||||
private int mConsistentFrames = 0;
|
||||
private int mInconsistentFrames = 0;
|
||||
|
||||
public BorderProcessor(int blackThreshold) {
|
||||
BLACK_THRESHOLD = blackThreshold;
|
||||
}
|
||||
|
||||
public BorderObject getCurrentBorder() { return mCurrentBorder; }
|
||||
|
||||
private void checkNewBorder(BorderObject newBorder) {
|
||||
if (mPreviousBorder != null && mPreviousBorder.equals(newBorder)) {
|
||||
++mConsistentFrames;
|
||||
mInconsistentFrames = 0;
|
||||
} else {
|
||||
++mInconsistentFrames;
|
||||
|
||||
if (mInconsistentFrames <= MAX_INCONSISTENT_FRAME_COUNT) {
|
||||
return;
|
||||
}
|
||||
|
||||
mPreviousBorder = newBorder;
|
||||
mConsistentFrames = 0;
|
||||
}
|
||||
|
||||
if (mCurrentBorder != null && mCurrentBorder.equals(newBorder)) {
|
||||
mInconsistentFrames = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
if (!newBorder.isKnown()) {
|
||||
if (mConsistentFrames == MAX_UNKNOWN_FRAME_COUNT) {
|
||||
mCurrentBorder = newBorder;
|
||||
}
|
||||
} else {
|
||||
if (mCurrentBorder == null || !mCurrentBorder.isKnown() ||
|
||||
mConsistentFrames == BORDER_CHANGE_FRAME_COUNT) {
|
||||
mCurrentBorder = newBorder;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void parseBorder(ByteBuffer buffer, int width, int height, int rowStride,
|
||||
int pixelStride) {
|
||||
checkNewBorder( findBorder(buffer, width, height, rowStride, pixelStride) );
|
||||
}
|
||||
|
||||
private BorderObject findBorder(ByteBuffer buffer, int width, int height, int rowStride,
|
||||
int pixelStride) {
|
||||
|
||||
int width33percent = width / 3;
|
||||
int width66percent = width33percent * 2;
|
||||
int height33percent = height / 3;
|
||||
int height66percent = height33percent * 2;
|
||||
int yCenter = height / 2;
|
||||
int xCenter = width / 2;
|
||||
int firstNonBlackYPixelIndex = -1;
|
||||
int firstNonBlackXPixelIndex = -1;
|
||||
|
||||
// placeholders for the RGB values of each of the 3 pixel positions we check
|
||||
int p1R, p1G, p1B, p2R, p2G, p2B, p3R, p3G, p3B;
|
||||
|
||||
// positions in the byte array that represent 33%, 66%, and center.
|
||||
// used when parsing both the X and Y axis of the image
|
||||
int pos33percent, pos66percent, posCentered;
|
||||
|
||||
buffer.position(0).mark();
|
||||
|
||||
// iterate through the X axis until we either hit 33% of the image width or a non-black pixel
|
||||
for (int x = 0; x < width33percent; x++) {
|
||||
|
||||
// RGB values at 33% height - to left of image
|
||||
pos33percent = (height33percent * rowStride) + (x * pixelStride);
|
||||
p1R = buffer.get(pos33percent) & 0xff;
|
||||
p1G = buffer.get(pos33percent + 1) & 0xff;
|
||||
p1B = buffer.get(pos33percent + 2) & 0xff;
|
||||
|
||||
// RGB values at 66% height - to left of image
|
||||
pos66percent = (height66percent * rowStride) + (x * pixelStride);
|
||||
p2R = buffer.get(pos66percent) & 0xff;
|
||||
p2G = buffer.get(pos66percent + 1) & 0xff;
|
||||
p2B = buffer.get(pos66percent + 2) & 0xff;
|
||||
|
||||
// RGB values at center Y - to right of image
|
||||
posCentered = (yCenter * rowStride) + ((width - x - 1) * pixelStride);
|
||||
p3R = buffer.get(posCentered) & 0xff;
|
||||
p3G = buffer.get(posCentered + 1) & 0xff;
|
||||
p3B = buffer.get(posCentered + 2) & 0xff;
|
||||
|
||||
// check if any of our RGB values DO NOT evaluate as black
|
||||
if (!isBlack(p1R,p1G,p1B) || !isBlack(p2R,p2G,p2B) || !isBlack(p3R,p3G,p3B)) {
|
||||
firstNonBlackXPixelIndex = x;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
buffer.reset();
|
||||
|
||||
// iterate through the Y axis until we either hit 33% of the image height or a non-black pixel
|
||||
for (int y = 0; y < height33percent; y++) {
|
||||
|
||||
// RGB values at 33% width - top of image
|
||||
pos33percent = (width33percent * pixelStride) + (y * rowStride);
|
||||
p1R = buffer.get(pos33percent) & 0xff;
|
||||
p1G = buffer.get(pos33percent + 1) & 0xff;
|
||||
p1B = buffer.get(pos33percent + 2) & 0xff;
|
||||
|
||||
// RGB values at 66% width - top of image
|
||||
pos66percent = (width66percent * pixelStride) + (y * rowStride);
|
||||
p2R = buffer.get(pos66percent) & 0xff;
|
||||
p2G = buffer.get(pos66percent + 1) & 0xff;
|
||||
p2B = buffer.get(pos66percent + 2) & 0xff;
|
||||
|
||||
// RGB values at center X - bottom of image
|
||||
posCentered = (xCenter * pixelStride) + ((height - y - 1) * rowStride);
|
||||
p3R = buffer.get(posCentered) & 0xff;
|
||||
p3G = buffer.get(posCentered + 1) & 0xff;
|
||||
p3B = buffer.get(posCentered + 2) & 0xff;
|
||||
|
||||
// check if any of our RGB values DO NOT evaluate as black
|
||||
if (!isBlack(p1R,p1G,p1B) || !isBlack(p2R,p2G,p2B) || !isBlack(p3R,p3G,p3B)) {
|
||||
firstNonBlackYPixelIndex = y;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return new BorderObject(firstNonBlackXPixelIndex, firstNonBlackYPixelIndex);
|
||||
}
|
||||
|
||||
private boolean isBlack(int red, int green, int blue) {
|
||||
return red < BLACK_THRESHOLD && green < BLACK_THRESHOLD && blue < BLACK_THRESHOLD;
|
||||
}
|
||||
|
||||
public static class BorderObject {
|
||||
private boolean isKnown;
|
||||
private int horizontalBorderIndex;
|
||||
private int verticalBorderIndex;
|
||||
|
||||
BorderObject(int horizontalBorderIndex, int verticalBorderIndex) {
|
||||
this.horizontalBorderIndex = horizontalBorderIndex;
|
||||
this.verticalBorderIndex = verticalBorderIndex;
|
||||
this.isKnown = this.horizontalBorderIndex != -1 && this.verticalBorderIndex != -1;
|
||||
}
|
||||
|
||||
public boolean isKnown() { return isKnown; }
|
||||
public int getHorizontalBorderIndex() { return horizontalBorderIndex; }
|
||||
public int getVerticalBorderIndex() { return verticalBorderIndex; }
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
BorderObject that = (BorderObject) o;
|
||||
return isKnown == that.isKnown &&
|
||||
horizontalBorderIndex == that.horizontalBorderIndex &&
|
||||
verticalBorderIndex == that.verticalBorderIndex;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(isKnown, horizontalBorderIndex, verticalBorderIndex);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "BorderObject{" +
|
||||
"isKnown=" + isKnown +
|
||||
", horizontalBorderIndex=" + horizontalBorderIndex +
|
||||
", verticalBorderIndex=" + verticalBorderIndex +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
package com.hyperion.grabber.common.util;
|
||||
|
||||
import android.util.Log;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.ListIterator;
|
||||
|
||||
public class HyperionGrabberOptions {
|
||||
private static final boolean DEBUG = false;
|
||||
private static final String TAG = "HyperionGrabberOptions";
|
||||
|
||||
private final int MINIMUM_IMAGE_PACKET_SIZE; // how many bytes the minimal acceptable image quality is
|
||||
private final int FRAME_RATE;
|
||||
private final boolean USE_AVERAGE_COLOR;
|
||||
private final int BLACK_THRESHOLD = 5; // The limit each RGB value must be under to be considered a black pixel [0-255]
|
||||
|
||||
public HyperionGrabberOptions(int horizontalLED, int verticalLED, int frameRate, boolean useAvgColor) {
|
||||
|
||||
/*
|
||||
* To determine the minimal acceptable image packet size we take the count of the width & height
|
||||
* of the LED pixels (that the user is driving via their hyperion server) and multiply them
|
||||
* together and then by 3 (1 for each color in RGB). This will give us the count of the bytes
|
||||
* that the minimal acceptable quality should be equal to or greater than.
|
||||
**/
|
||||
MINIMUM_IMAGE_PACKET_SIZE = horizontalLED * verticalLED * 3;
|
||||
FRAME_RATE = frameRate;
|
||||
USE_AVERAGE_COLOR = useAvgColor;
|
||||
|
||||
if (DEBUG) {
|
||||
Log.d(TAG, "Horizontal LED Count: " + String.valueOf(horizontalLED));
|
||||
Log.d(TAG, "Vertical LED Count: " + String.valueOf(verticalLED));
|
||||
Log.d(TAG, "Minimum Image Packet: " + String.valueOf(MINIMUM_IMAGE_PACKET_SIZE));
|
||||
}
|
||||
}
|
||||
|
||||
public int getFrameRate() { return FRAME_RATE; }
|
||||
|
||||
public boolean useAverageColor() { return USE_AVERAGE_COLOR; }
|
||||
|
||||
/**
|
||||
* returns the divisor best suited to be used to meet the minimum image packet size
|
||||
* Since we only want to scale using whole numbers, we need to find what common divisors
|
||||
* are available for the given width & height. We will check those divisors to find the smallest
|
||||
* number (that we can divide our screen dimensions by) that would meet the minimum image
|
||||
* packet size required to match the count of the LEDs on the destination hyperion server.
|
||||
* @param width The original width of the device screen
|
||||
* @param height The original height of the device screen
|
||||
* @return int The divisor bes suited to scale the screen dimensions by
|
||||
**/
|
||||
public int findDivisor(int width, int height) {
|
||||
List<Integer> divisors = getCommonDivisors(width, height);
|
||||
if (DEBUG) Log.d(TAG, "Available Divisors: " + divisors.toString());
|
||||
ListIterator it = divisors.listIterator(divisors.size());
|
||||
|
||||
// iterate backwards since the divisors are listed largest to smallest
|
||||
while (it.hasPrevious()) {
|
||||
int i = (int) it.previous();
|
||||
|
||||
// check if the image packet size for this divisor is >= the minimum image packet size
|
||||
// like above we multiply the dimensions together and then by 3 for each byte in RGB
|
||||
if ((width / i) * (height / i) * 3 >= MINIMUM_IMAGE_PACKET_SIZE)
|
||||
return i;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* gets a list of all the common divisors [large to small] for the given integers.
|
||||
* @param num1 The first integer to find a whole number divisor for
|
||||
* @param num2 The second integer to find a whole number divisor for
|
||||
* @return List A list of the common divisors [large to small] that match the provided integers
|
||||
**/
|
||||
private static List<Integer> getCommonDivisors(int num1, int num2) {
|
||||
List<Integer> list = new ArrayList<>();
|
||||
int min = Math.min(num1, num2);
|
||||
for (int i = 1; i <= min / 2; i++)
|
||||
if (num1 % i == 0 && num2 % i == 0)
|
||||
list.add(i);
|
||||
if (num1 % min == 0 && num2 % min == 0) list.add(min);
|
||||
return list;
|
||||
}
|
||||
|
||||
public int getBlackThreshold() { return BLACK_THRESHOLD; }
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
package com.hyperion.grabber.common.util;
|
||||
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import androidx.annotation.Nullable;
|
||||
import android.util.Log;
|
||||
|
||||
import com.hyperion.grabber.common.network.NetworkScanner;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
|
||||
|
||||
/**
|
||||
* Starts a network scan for a running Hyperion server
|
||||
* and posts progress and results
|
||||
*/
|
||||
public class HyperionScannerTask {
|
||||
private WeakReference<Listener> weakListener;
|
||||
private ExecutorService executor = Executors.newSingleThreadExecutor();
|
||||
private Handler mainHandler = new Handler(Looper.getMainLooper());
|
||||
|
||||
public HyperionScannerTask(Listener listener){
|
||||
weakListener = new WeakReference<>(listener);
|
||||
}
|
||||
|
||||
public void execute() {
|
||||
executor.execute(() -> {
|
||||
String result = doInBackground();
|
||||
mainHandler.post(() -> onPostExecute(result));
|
||||
});
|
||||
}
|
||||
|
||||
private String doInBackground() {
|
||||
Log.d("Hyperion scanner", "starting scan");
|
||||
NetworkScanner networkScanner = new NetworkScanner();
|
||||
|
||||
String result;
|
||||
while (networkScanner.hasNextAttempt()){
|
||||
result = networkScanner.tryNext();
|
||||
|
||||
if (result != null){
|
||||
return result;
|
||||
}
|
||||
|
||||
final float progress = networkScanner.getProgress();
|
||||
mainHandler.post(() -> onProgressUpdate(progress));
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private void onProgressUpdate(Float value) {
|
||||
Log.d("Hyperion scanner", "scan progress: " + value);
|
||||
if(weakListener.get() != null){
|
||||
weakListener.get().onScannerProgress(value);
|
||||
}
|
||||
}
|
||||
|
||||
private void onPostExecute(String result) {
|
||||
Log.d("Hyperion scanner", "scan result: " + result);
|
||||
if(weakListener.get() != null){
|
||||
weakListener.get().onScannerCompleted(result);
|
||||
}
|
||||
}
|
||||
|
||||
public interface Listener {
|
||||
|
||||
void onScannerProgress(float progress);
|
||||
void onScannerCompleted(@Nullable String foundIpAddress);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
package com.hyperion.grabber.common.util
|
||||
|
||||
import android.content.Context
|
||||
import android.content.res.Resources
|
||||
import androidx.preference.PreferenceManager
|
||||
import androidx.annotation.StringRes
|
||||
|
||||
/** Wrapper around SharedPreferences which allows for default values defined in Resources
|
||||
* Main purpose is that defaults are defined in a centralized location and that preferences are
|
||||
* accessed through a unified interface */
|
||||
class Preferences(context: Context) {
|
||||
|
||||
private val preferences = PreferenceManager.getDefaultSharedPreferences(context)
|
||||
private val resources = context.resources
|
||||
|
||||
fun contains(@StringRes keyResourceId: Int): Boolean = preferences.contains(key(keyResourceId))
|
||||
|
||||
fun getString(@StringRes keyResourceId: Int, default: String? = null): String? {
|
||||
return preferences.getString(key(keyResourceId), default)
|
||||
}
|
||||
|
||||
fun putString(@StringRes keyResourceId: Int, value: String){
|
||||
val edit = preferences.edit()
|
||||
edit.putString(key(keyResourceId), value)
|
||||
edit.apply()
|
||||
}
|
||||
|
||||
fun getInt(@StringRes keyResourceId: Int): Int {
|
||||
val default = defaultKey(keyResourceId, "integer").let {
|
||||
if (it == 0){
|
||||
0
|
||||
} else {
|
||||
try {
|
||||
resources.getInteger(it)
|
||||
} catch (e: Resources.NotFoundException) {
|
||||
0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return getInt(keyResourceId, default)
|
||||
}
|
||||
|
||||
fun getInt(@StringRes keyResourceId: Int, default: Int = 0): Int {
|
||||
return getString(keyResourceId)?.let { Integer.parseInt(it) } ?: default
|
||||
}
|
||||
|
||||
fun putInt(@StringRes keyResourceId: Int, value: Int){
|
||||
putString(keyResourceId, value.toString())
|
||||
}
|
||||
|
||||
fun getBoolean(@StringRes keyResourceId: Int): Boolean {
|
||||
val default = defaultKey(keyResourceId, "bool").let {
|
||||
if (it == 0){
|
||||
false
|
||||
} else {
|
||||
try {
|
||||
resources.getBoolean(it)
|
||||
} catch (e: Resources.NotFoundException) {
|
||||
false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return preferences.getBoolean(key(keyResourceId), default)
|
||||
}
|
||||
|
||||
fun getBoolean(@StringRes keyResourceId: Int, default: Boolean): Boolean =
|
||||
preferences.getBoolean(key(keyResourceId), default)
|
||||
|
||||
fun putBoolean(@StringRes keyResourceId: Int, value: Boolean){
|
||||
val edit = preferences.edit()
|
||||
edit.putBoolean(key(keyResourceId), value)
|
||||
edit.apply()
|
||||
}
|
||||
|
||||
private fun key(keyResourceId: Int) = resources.getString(keyResourceId)
|
||||
|
||||
/** @return 0 if not found, resource id otherwise */
|
||||
private fun defaultKey(keyResourceId: Int, type: String): Int {
|
||||
val defaultKeyName = resources.getResourceEntryName(keyResourceId).replace("pref_key_", "pref_default_")
|
||||
return resources.getIdentifier(defaultKeyName, type, resources.getResourcePackageName(keyResourceId))
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
package com.hyperion.grabber.common.views;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.Matrix;
|
||||
import android.graphics.Paint;
|
||||
import android.graphics.Rect;
|
||||
import android.graphics.SweepGradient;
|
||||
import androidx.annotation.Nullable;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.View;
|
||||
|
||||
/**
|
||||
* Created by nino on 26-5-18.
|
||||
*/
|
||||
|
||||
public class SweepGradientView extends View{
|
||||
|
||||
Paint paint;
|
||||
final int[] colors = {Color.RED, Color.MAGENTA, Color.BLUE, Color.CYAN, Color.GREEN, Color.YELLOW, Color.RED};
|
||||
final float[] positions = {0f, 1/6f, 2/6f, 3/6f, 4/6f, 5/6f, 6/6f};
|
||||
|
||||
SweepGradient gradient;
|
||||
|
||||
Rect viewBounds = new Rect();
|
||||
|
||||
Matrix gradientMatrix = new Matrix();
|
||||
|
||||
float rotate = 0f;
|
||||
|
||||
public SweepGradientView(Context context) {
|
||||
this(context, null);
|
||||
}
|
||||
|
||||
public SweepGradientView(Context context, @Nullable AttributeSet attrs) {
|
||||
this(context, attrs, 0);
|
||||
}
|
||||
|
||||
public SweepGradientView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
|
||||
paint = new Paint();
|
||||
paint.setShader(gradient);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
protected void onDraw(Canvas canvas) {
|
||||
|
||||
gradientMatrix.postRotate(rotate++, viewBounds.width()/2, viewBounds.height()/2);
|
||||
gradient.setLocalMatrix(gradientMatrix);
|
||||
|
||||
paint.setShader(gradient);
|
||||
canvas.drawRect(viewBounds, paint);
|
||||
gradientMatrix.reset();
|
||||
invalidate();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
|
||||
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
|
||||
viewBounds.set(0, 0, getMeasuredWidth(), getMeasuredHeight());
|
||||
|
||||
gradient = new SweepGradient(viewBounds.centerX(), viewBounds.centerY(), colors, positions);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package hyperionnet;
|
||||
|
||||
import com.google.flatbuffers.Constants;
|
||||
import com.google.flatbuffers.FlatBufferBuilder;
|
||||
import com.google.flatbuffers.Table;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.ByteOrder;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public final class Clear extends Table {
|
||||
public static void ValidateVersion() { Constants.FLATBUFFERS_23_5_26(); }
|
||||
public static Clear getRootAsClear(ByteBuffer _bb) { return getRootAsClear(_bb, new Clear()); }
|
||||
public static Clear getRootAsClear(ByteBuffer _bb, Clear obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); }
|
||||
public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); }
|
||||
public Clear __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
|
||||
|
||||
public int priority() { int o = __offset(4); return o != 0 ? bb.getInt(o + bb_pos) : 0; }
|
||||
|
||||
public static int createClear(FlatBufferBuilder builder, int priority) {
|
||||
builder.startTable(1);
|
||||
Clear.addPriority(builder, priority);
|
||||
return Clear.endClear(builder);
|
||||
}
|
||||
|
||||
public static void startClear(FlatBufferBuilder builder) { builder.startTable(1); }
|
||||
public static void addPriority(FlatBufferBuilder builder, int priority) { builder.addInt(0, priority, 0); }
|
||||
public static int endClear(FlatBufferBuilder builder) { return builder.endTable(); }
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package hyperionnet;
|
||||
|
||||
import com.google.flatbuffers.Constants;
|
||||
import com.google.flatbuffers.FlatBufferBuilder;
|
||||
import com.google.flatbuffers.Table;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.ByteOrder;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public final class Color extends Table {
|
||||
public static void ValidateVersion() { Constants.FLATBUFFERS_23_5_26(); }
|
||||
public static Color getRootAsColor(ByteBuffer _bb) { return getRootAsColor(_bb, new Color()); }
|
||||
public static Color getRootAsColor(ByteBuffer _bb, Color obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); }
|
||||
public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); }
|
||||
public Color __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
|
||||
|
||||
public int data() { int o = __offset(4); return o != 0 ? bb.getInt(o + bb_pos) : -1; }
|
||||
public int duration() { int o = __offset(6); return o != 0 ? bb.getInt(o + bb_pos) : -1; }
|
||||
|
||||
public static int createColor(FlatBufferBuilder builder, int data, int duration) {
|
||||
builder.startTable(2);
|
||||
Color.addDuration(builder, duration);
|
||||
Color.addData(builder, data);
|
||||
return Color.endColor(builder);
|
||||
}
|
||||
|
||||
public static void startColor(FlatBufferBuilder builder) { builder.startTable(2); }
|
||||
public static void addData(FlatBufferBuilder builder, int data) { builder.addInt(0, data, -1); }
|
||||
public static void addDuration(FlatBufferBuilder builder, int duration) { builder.addInt(1, duration, -1); }
|
||||
public static int endColor(FlatBufferBuilder builder) { return builder.endTable(); }
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package hyperionnet;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public final class Command {
|
||||
private Command() { }
|
||||
public static final byte NONE = 0;
|
||||
public static final byte Color = 1;
|
||||
public static final byte Image = 2;
|
||||
public static final byte Clear = 3;
|
||||
public static final byte Register = 4;
|
||||
|
||||
public static final String[] names = { "NONE", "Color", "Image", "Clear", "Register", };
|
||||
public static String name(int e) { return names[e]; }
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package hyperionnet;
|
||||
|
||||
import com.google.flatbuffers.Constants;
|
||||
import com.google.flatbuffers.FlatBufferBuilder;
|
||||
import com.google.flatbuffers.Table;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.ByteOrder;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public final class Image extends Table {
|
||||
public static void ValidateVersion() { Constants.FLATBUFFERS_23_5_26(); }
|
||||
public static Image getRootAsImage(ByteBuffer _bb) { return getRootAsImage(_bb, new Image()); }
|
||||
public static Image getRootAsImage(ByteBuffer _bb, Image obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); }
|
||||
public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); }
|
||||
public Image __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
|
||||
|
||||
public byte dataType() { int o = __offset(4); return o != 0 ? bb.get(o + bb_pos) : 0; }
|
||||
public Table data(Table obj) { int o = __offset(6); return o != 0 ? __union(obj, o + bb_pos) : null; }
|
||||
public int duration() { int o = __offset(8); return o != 0 ? bb.getInt(o + bb_pos) : -1; }
|
||||
|
||||
public static int createImage(FlatBufferBuilder builder, byte data_type, int dataOffset, int duration) {
|
||||
builder.startTable(3);
|
||||
Image.addDuration(builder, duration);
|
||||
Image.addData(builder, dataOffset);
|
||||
Image.addDataType(builder, data_type);
|
||||
return Image.endImage(builder);
|
||||
}
|
||||
|
||||
public static void startImage(FlatBufferBuilder builder) { builder.startTable(3); }
|
||||
public static void addDataType(FlatBufferBuilder builder, byte dataType) { builder.addByte(0, dataType, 0); }
|
||||
public static void addData(FlatBufferBuilder builder, int dataOffset) { builder.addOffset(1, dataOffset, 0); }
|
||||
public static void addDuration(FlatBufferBuilder builder, int duration) { builder.addInt(2, duration, -1); }
|
||||
public static int endImage(FlatBufferBuilder builder) {
|
||||
int o = builder.endTable();
|
||||
builder.required(o, 6); // data
|
||||
return o;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package hyperionnet;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public final class ImageType {
|
||||
private ImageType() { }
|
||||
public static final byte NONE = 0;
|
||||
public static final byte RawImage = 1;
|
||||
public static final byte NV12Image = 2;
|
||||
|
||||
public static final String[] names = { "NONE", "RawImage", "NV12Image", };
|
||||
public static String name(int e) { return names[e]; }
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package hyperionnet;
|
||||
|
||||
import com.google.flatbuffers.BaseVector;
|
||||
import com.google.flatbuffers.Constants;
|
||||
import com.google.flatbuffers.FlatBufferBuilder;
|
||||
import com.google.flatbuffers.Table;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.ByteOrder;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public final class RawImage extends Table {
|
||||
public static void ValidateVersion() { Constants.FLATBUFFERS_23_5_26(); }
|
||||
public static RawImage getRootAsRawImage(ByteBuffer _bb) { return getRootAsRawImage(_bb, new RawImage()); }
|
||||
public static RawImage getRootAsRawImage(ByteBuffer _bb, RawImage obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); }
|
||||
public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); }
|
||||
public RawImage __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
|
||||
|
||||
public int data(int j) { int o = __offset(4); return o != 0 ? bb.get(__vector(o) + j * 1) & 0xFF : 0; }
|
||||
public int dataLength() { int o = __offset(4); return o != 0 ? __vector_len(o) : 0; }
|
||||
public ByteBuffer dataAsByteBuffer() { return __vector_as_bytebuffer(4, 1); }
|
||||
public int width() { int o = __offset(6); return o != 0 ? bb.getInt(o + bb_pos) : -1; }
|
||||
public int height() { int o = __offset(8); return o != 0 ? bb.getInt(o + bb_pos) : -1; }
|
||||
|
||||
public static int createRawImage(FlatBufferBuilder builder, int dataOffset, int width, int height) {
|
||||
builder.startTable(3);
|
||||
RawImage.addHeight(builder, height);
|
||||
RawImage.addWidth(builder, width);
|
||||
RawImage.addData(builder, dataOffset);
|
||||
return RawImage.endRawImage(builder);
|
||||
}
|
||||
|
||||
public static void startRawImage(FlatBufferBuilder builder) { builder.startTable(3); }
|
||||
public static void addData(FlatBufferBuilder builder, int dataOffset) { builder.addOffset(0, dataOffset, 0); }
|
||||
public static int createDataVector(FlatBufferBuilder builder, byte[] data) { return builder.createByteVector(data); }
|
||||
public static void addWidth(FlatBufferBuilder builder, int width) { builder.addInt(1, width, -1); }
|
||||
public static void addHeight(FlatBufferBuilder builder, int height) { builder.addInt(2, height, -1); }
|
||||
public static int endRawImage(FlatBufferBuilder builder) { return builder.endTable(); }
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package hyperionnet;
|
||||
|
||||
import com.google.flatbuffers.BaseVector;
|
||||
import com.google.flatbuffers.Constants;
|
||||
import com.google.flatbuffers.FlatBufferBuilder;
|
||||
import com.google.flatbuffers.Table;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.ByteOrder;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public final class Register extends Table {
|
||||
public static void ValidateVersion() { Constants.FLATBUFFERS_23_5_26(); }
|
||||
public static Register getRootAsRegister(ByteBuffer _bb) { return getRootAsRegister(_bb, new Register()); }
|
||||
public static Register getRootAsRegister(ByteBuffer _bb, Register obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); }
|
||||
public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); }
|
||||
public Register __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
|
||||
|
||||
public String origin() { int o = __offset(4); return o != 0 ? __string(o + bb_pos) : null; }
|
||||
public ByteBuffer originAsByteBuffer() { return __vector_as_bytebuffer(4, 1); }
|
||||
public ByteBuffer originInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 1); }
|
||||
public int priority() { int o = __offset(6); return o != 0 ? bb.getInt(o + bb_pos) : 0; }
|
||||
|
||||
public static int createRegister(FlatBufferBuilder builder, int originOffset, int priority) {
|
||||
builder.startTable(2);
|
||||
Register.addPriority(builder, priority);
|
||||
Register.addOrigin(builder, originOffset);
|
||||
return Register.endRegister(builder);
|
||||
}
|
||||
|
||||
public static void startRegister(FlatBufferBuilder builder) { builder.startTable(2); }
|
||||
public static void addOrigin(FlatBufferBuilder builder, int originOffset) { builder.addOffset(0, originOffset, 0); }
|
||||
public static void addPriority(FlatBufferBuilder builder, int priority) { builder.addInt(1, priority, 0); }
|
||||
public static int endRegister(FlatBufferBuilder builder) {
|
||||
int o = builder.endTable();
|
||||
builder.required(o, 4); // origin
|
||||
return o;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package hyperionnet;
|
||||
|
||||
import com.google.flatbuffers.Constants;
|
||||
import com.google.flatbuffers.FlatBufferBuilder;
|
||||
import com.google.flatbuffers.Table;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.ByteOrder;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public final class Reply extends Table {
|
||||
public static void ValidateVersion() { Constants.FLATBUFFERS_23_5_26(); }
|
||||
public static Reply getRootAsReply(ByteBuffer _bb) { return getRootAsReply(_bb, new Reply()); }
|
||||
public static Reply getRootAsReply(ByteBuffer _bb, Reply obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); }
|
||||
public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); }
|
||||
public Reply __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
|
||||
|
||||
public String error() { int o = __offset(4); return o != 0 ? __string(o + bb_pos) : null; }
|
||||
public int video() { int o = __offset(6); return o != 0 ? bb.getInt(o + bb_pos) : -1; }
|
||||
public int registered() { int o = __offset(8); return o != 0 ? bb.getInt(o + bb_pos) : -1; }
|
||||
|
||||
public static int createReply(FlatBufferBuilder builder, int errorOffset, int video, int registered) {
|
||||
builder.startTable(3);
|
||||
Reply.addRegistered(builder, registered);
|
||||
Reply.addVideo(builder, video);
|
||||
Reply.addError(builder, errorOffset);
|
||||
return Reply.endReply(builder);
|
||||
}
|
||||
|
||||
public static void startReply(FlatBufferBuilder builder) { builder.startTable(3); }
|
||||
public static void addError(FlatBufferBuilder builder, int errorOffset) { builder.addOffset(0, errorOffset, 0); }
|
||||
public static void addVideo(FlatBufferBuilder builder, int video) { builder.addInt(1, video, -1); }
|
||||
public static void addRegistered(FlatBufferBuilder builder, int registered) { builder.addInt(2, registered, -1); }
|
||||
public static int endReply(FlatBufferBuilder builder) { return builder.endTable(); }
|
||||
public static void finishReplyBuffer(FlatBufferBuilder builder, int offset) { builder.finish(offset); }
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package hyperionnet;
|
||||
|
||||
import com.google.flatbuffers.Constants;
|
||||
import com.google.flatbuffers.FlatBufferBuilder;
|
||||
import com.google.flatbuffers.Table;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.ByteOrder;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public final class Request extends Table {
|
||||
public static void ValidateVersion() { Constants.FLATBUFFERS_23_5_26(); }
|
||||
public static Request getRootAsRequest(ByteBuffer _bb) { return getRootAsRequest(_bb, new Request()); }
|
||||
public static Request getRootAsRequest(ByteBuffer _bb, Request obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); }
|
||||
public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); }
|
||||
public Request __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
|
||||
|
||||
public byte commandType() { int o = __offset(4); return o != 0 ? bb.get(o + bb_pos) : 0; }
|
||||
public Table command(Table obj) { int o = __offset(6); return o != 0 ? __union(obj, o + bb_pos) : null; }
|
||||
|
||||
public static int createRequest(FlatBufferBuilder builder, byte command_type, int commandOffset) {
|
||||
builder.startTable(2);
|
||||
Request.addCommand(builder, commandOffset);
|
||||
Request.addCommandType(builder, command_type);
|
||||
return Request.endRequest(builder);
|
||||
}
|
||||
|
||||
public static void startRequest(FlatBufferBuilder builder) { builder.startTable(2); }
|
||||
public static void addCommandType(FlatBufferBuilder builder, byte commandType) { builder.addByte(0, commandType, 0); }
|
||||
public static void addCommand(FlatBufferBuilder builder, int commandOffset) { builder.addOffset(1, commandOffset, 0); }
|
||||
public static int endRequest(FlatBufferBuilder builder) {
|
||||
int o = builder.endTable();
|
||||
builder.required(o, 6); // command
|
||||
return o;
|
||||
}
|
||||
public static void finishRequestBuffer(FlatBufferBuilder builder, int offset) { builder.finish(offset); }
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:viewportWidth="108"
|
||||
android:viewportHeight="108"
|
||||
android:width="108dp"
|
||||
android:height="108dp">
|
||||
<group
|
||||
android:translateY="-944.3622">
|
||||
<group
|
||||
android:scaleX="0.3899269"
|
||||
android:scaleY="0.3899269"
|
||||
android:translateX="16.56894"
|
||||
android:translateY="625.449">
|
||||
<path
|
||||
android:pathData="M121.07324 1014.8876l0 -52.68557 -50.273435 0 0 52.68557 -22.597657 0 0 -117.05081 22.597657 0 0 51.28906 50.273435 0 0 -51.28906 22.72461 0 0 117.05081z"
|
||||
android:fillColor="#f0ffff" />
|
||||
</group>
|
||||
</group>
|
||||
</vector>
|
||||
@@ -0,0 +1,5 @@
|
||||
<vector android:height="24dp" android:tint="#CCCCCC"
|
||||
android:viewportHeight="24.0" android:viewportWidth="24.0"
|
||||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#FF000000" android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM13,17h-2v-6h2v6zM13,9h-2L11,7h2v2z"/>
|
||||
</vector>
|
||||
@@ -0,0 +1,237 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:viewportWidth="108"
|
||||
android:viewportHeight="108"
|
||||
android:width="108dp"
|
||||
android:height="108dp">
|
||||
<group
|
||||
android:translateY="-944.3622">
|
||||
<group
|
||||
android:scaleX="0.01456667"
|
||||
android:scaleY="0.01456667"
|
||||
android:translateX="-23.16391"
|
||||
android:translateY="921.186">
|
||||
<clip-path
|
||||
android:pathData="M1590.1995 1590.7765l7414.4502 0 0 7414.4502 -7414.4502 0z" />
|
||||
<path
|
||||
android:pathData="M5988 10545c-966 127 -1816 15 -2716 -358C2372 9814 1692 9292 1099 8520 506 7747 178 6955 51 5989 -76 5023 35 4173 408 3273 781 2373 1303 1693 2076 1100 2849 506 3641 178 4607 51 5573 -76 6423 36 7323 409c900 373 1580 895 2173 1667 593 773 921 1565 1048 2531 127 966 15 1816 -357 2716 -373 900 -895 1580 -1668 2173 -773 593 -1565 922 -2531 1049z"
|
||||
android:fillColor="#ffffff" />
|
||||
<path
|
||||
android:pathData="M5297 5298L5067 11c162 -7 299 -7 461 0z"
|
||||
android:fillColor="#ffff00" />
|
||||
<path
|
||||
android:pathData="M5297 5298l231 5287c-162 7 -299 7 -461 0z"
|
||||
android:fillColor="#0000ff" />
|
||||
<path
|
||||
android:pathData="M5297 5298L5528 11c163 7 299 19 460 40z"
|
||||
android:fillColor="#ffea00" />
|
||||
<path
|
||||
android:pathData="M5297 5298l-230 5287c-163 -7 -299 -19 -460 -40z"
|
||||
android:fillColor="#0015ff" />
|
||||
<path
|
||||
android:pathData="M5297 5298L5988 51c161 21 296 45 455 80z"
|
||||
android:fillColor="#ffd500" />
|
||||
<path
|
||||
android:pathData="M5297 5298l-690 5247c-161 -21 -296 -45 -455 -80z"
|
||||
android:fillColor="#002aff" />
|
||||
<path
|
||||
android:pathData="M5297 5298L6443 131c158 36 291 71 446 120z"
|
||||
android:fillColor="#ffc000" />
|
||||
<path
|
||||
android:pathData="M5297 5298l-1145 5167c-158 -36 -291 -71 -446 -120z"
|
||||
android:fillColor="#003fff" />
|
||||
<path
|
||||
android:pathData="M5297 5298L6889 251c155 49 284 96 434 158z"
|
||||
android:fillColor="#ffaa00" />
|
||||
<path
|
||||
android:pathData="M5297 5298l-1591 5047c-155 -49 -284 -96 -434 -158z"
|
||||
android:fillColor="#0055ff" />
|
||||
<path
|
||||
android:pathData="M5297 5298L7323 409c150 62 274 120 418 195z"
|
||||
android:fillColor="#ff9500" />
|
||||
<path
|
||||
android:pathData="M5297 5298l-2025 4889c-150 -62 -274 -120 -418 -195z"
|
||||
android:fillColor="#006aff" />
|
||||
<path
|
||||
android:pathData="M5297 5298L7741 604c144 75 263 144 400 231z"
|
||||
android:fillColor="#ff8000" />
|
||||
<path
|
||||
android:pathData="M5297 5298L2854 9992c-144 -75 -263 -144 -400 -231z"
|
||||
android:fillColor="#007fff" />
|
||||
<path
|
||||
android:pathData="M5297 5298L8141 835c137 87 249 166 378 265z"
|
||||
android:fillColor="#ff6b00" />
|
||||
<path
|
||||
android:pathData="M5297 5298L2454 9761c-137 -87 -249 -166 -378 -265z"
|
||||
android:fillColor="#0094ff" />
|
||||
<path
|
||||
android:pathData="M5297 5298L8519 1100c129 98 234 187 354 296z"
|
||||
android:fillColor="#ff5500" />
|
||||
<path
|
||||
android:pathData="M5297 5298L2076 9496c-129 -98 -234 -187 -354 -296z"
|
||||
android:fillColor="#00aaff" />
|
||||
<path
|
||||
android:pathData="M5297 5298L8873 1396c119 110 216 207 326 327z"
|
||||
android:fillColor="#ff4000" />
|
||||
<path
|
||||
android:pathData="M5297 5298L1722 9200c-119 -110 -217 -207 -326 -327z"
|
||||
android:fillColor="#00bfff" />
|
||||
<path
|
||||
android:pathData="M5297 5298L9199 1723c110 119 198 225 297 353z"
|
||||
android:fillColor="#ff2b00" />
|
||||
<path
|
||||
android:pathData="M5297 5298L1396 8873c-110 -120 -198 -225 -297 -353z"
|
||||
android:fillColor="#00d4ff" />
|
||||
<path
|
||||
android:pathData="M5297 5298L9496 2076c99 129 177 242 265 379z"
|
||||
android:fillColor="#ff1600" />
|
||||
<path
|
||||
android:pathData="M5297 5298L1099 8520C1000 8391 921 8278 834 8141Z"
|
||||
android:fillColor="#00e9ff" />
|
||||
<path
|
||||
android:pathData="M5297 5298L9761 2455c87 137 156 255 231 399z"
|
||||
android:fillColor="#ff0000" />
|
||||
<path
|
||||
android:pathData="M5297 5298L834 8141C747 8004 678 7886 603 7742Z"
|
||||
android:fillColor="#00ffff" />
|
||||
<path
|
||||
android:pathData="M5297 5298L9992 2854c75 144 133 269 195 419z"
|
||||
android:fillColor="#ff0015" />
|
||||
<path
|
||||
android:pathData="M5297 5298L603 7742C528 7598 470 7473 408 7323Z"
|
||||
android:fillColor="#00ffea" />
|
||||
<path
|
||||
android:pathData="M5297 5298l4890 -2025c62 150 109 279 158 434z"
|
||||
android:fillColor="#ff002a" />
|
||||
<path
|
||||
android:pathData="M5297 5298L408 7323C346 7173 299 7044 250 6889Z"
|
||||
android:fillColor="#00ffd5" />
|
||||
<path
|
||||
android:pathData="M5297 5298l5048 -1591c48 155 84 287 119 446z"
|
||||
android:fillColor="#ff003f" />
|
||||
<path
|
||||
android:pathData="M5297 5298L250 6889C202 6734 166 6602 131 6443Z"
|
||||
android:fillColor="#00ffc0" />
|
||||
<path
|
||||
android:pathData="M5297 5298l5167 -1145c35 158 59 293 80 454l0 0z"
|
||||
android:fillColor="#ff0055" />
|
||||
<path
|
||||
android:pathData="M5297 5298L131 6443C96 6285 72 6150 51 5989Z"
|
||||
android:fillColor="#00ffaa" />
|
||||
<path
|
||||
android:pathData="M5297 5298l5247 -691c21 161 33 298 40 460z"
|
||||
android:fillColor="#ff006a" />
|
||||
<path
|
||||
android:pathData="M5297 5298l-5246 691 0 0C30 5828 18 5691 11 5529Z"
|
||||
android:fillColor="#00ff95" />
|
||||
<path
|
||||
android:pathData="M5297 5298l5287 -231c8 162 8 300 0 462z"
|
||||
android:fillColor="#ff007f" />
|
||||
<path
|
||||
android:pathData="M5297 5298L11 5529C3 5367 3 5229 11 5067Z"
|
||||
android:fillColor="#00ff80" />
|
||||
<path
|
||||
android:pathData="M5297 5298l5287 231c-7 162 -19 299 -40 460z"
|
||||
android:fillColor="#ff0094" />
|
||||
<path
|
||||
android:pathData="M5297 5298L11 5067c7 -162 19 -299 40 -460z"
|
||||
android:fillColor="#00ff6b" />
|
||||
<path
|
||||
android:pathData="M5297 5298l5247 691c-21 161 -45 296 -80 454z"
|
||||
android:fillColor="#ff00aa" />
|
||||
<path
|
||||
android:pathData="M5297 5298L51 4607c21 -161 45 -296 80 -454z"
|
||||
android:fillColor="#00ff55" />
|
||||
<path
|
||||
android:pathData="M5297 5298l5167 1145c-35 159 -71 291 -119 446z"
|
||||
android:fillColor="#ff00bf" />
|
||||
<path
|
||||
android:pathData="M5297 5298L131 4153c35 -159 71 -291 119 -446z"
|
||||
android:fillColor="#00ff40" />
|
||||
<path
|
||||
android:pathData="M5297 5298l5048 1591c-49 155 -96 284 -158 434z"
|
||||
android:fillColor="#ff00d4" />
|
||||
<path
|
||||
android:pathData="M5297 5298L250 3707c49 -155 96 -284 158 -434z"
|
||||
android:fillColor="#00ff2b" />
|
||||
<path
|
||||
android:pathData="M5297 5298l4890 2025c-62 150 -120 275 -195 419z"
|
||||
android:fillColor="#ff00e9" />
|
||||
<path
|
||||
android:pathData="M5297 5298L408 3273c62 -150 120 -275 195 -419z"
|
||||
android:fillColor="#00ff16" />
|
||||
<path
|
||||
android:pathData="M5297 5298l4695 2444c-75 144 -144 262 -231 399z"
|
||||
android:fillColor="#ff00ff" />
|
||||
<path
|
||||
android:pathData="M5297 5298L603 2854c75 -144 144 -262 231 -399z"
|
||||
android:fillColor="#00ff00" />
|
||||
<path
|
||||
android:pathData="M5297 5298l4464 2843c-88 137 -166 250 -265 379z"
|
||||
android:fillColor="#ea00ff" />
|
||||
<path
|
||||
android:pathData="M5297 5298L834 2455c87 -137 166 -250 265 -379z"
|
||||
android:fillColor="#15ff00" />
|
||||
<path
|
||||
android:pathData="M5297 5298l4199 3222c-99 128 -187 233 -297 353z"
|
||||
android:fillColor="#d500ff" />
|
||||
<path
|
||||
android:pathData="M5297 5298L1099 2076c99 -128 187 -234 297 -353z"
|
||||
android:fillColor="#2aff00" />
|
||||
<path
|
||||
android:pathData="M5297 5298l3902 3575c-110 120 -207 217 -326 327z"
|
||||
android:fillColor="#c000ff" />
|
||||
<path
|
||||
android:pathData="M5297 5298L1396 1723c109 -120 207 -217 326 -327z"
|
||||
android:fillColor="#3fff00" />
|
||||
<path
|
||||
android:pathData="M5297 5298l3576 3902c-120 109 -225 198 -354 296z"
|
||||
android:fillColor="#aa00ff" />
|
||||
<path
|
||||
android:pathData="M5297 5298L1722 1396c120 -109 225 -198 354 -296z"
|
||||
android:fillColor="#55ff00" />
|
||||
<path
|
||||
android:pathData="M5297 5298l3222 4198c-129 99 -241 178 -378 265z"
|
||||
android:fillColor="#9500ff" />
|
||||
<path
|
||||
android:pathData="M5297 5298L2076 1100c129 -99 241 -178 378 -265z"
|
||||
android:fillColor="#6aff00" />
|
||||
<path
|
||||
android:pathData="M5297 5298l2844 4463c-137 87 -256 156 -400 231z"
|
||||
android:fillColor="#8000ff" />
|
||||
<path
|
||||
android:pathData="M5297 5298L2454 835c137 -87 256 -156 400 -231z"
|
||||
android:fillColor="#7fff00" />
|
||||
<path
|
||||
android:pathData="M5297 5298l2444 4694c-144 75 -268 133 -418 195z"
|
||||
android:fillColor="#6b00ff" />
|
||||
<path
|
||||
android:pathData="M5297 5298L2854 604c144 -75 268 -133 418 -195z"
|
||||
android:fillColor="#94ff00" />
|
||||
<path
|
||||
android:pathData="M5297 5298l2026 4889c-150 62 -279 109 -434 158z"
|
||||
android:fillColor="#5500ff" />
|
||||
<path
|
||||
android:pathData="M5297 5298L3272 409c150 -62 279 -109 434 -158z"
|
||||
android:fillColor="#aaff00" />
|
||||
<path
|
||||
android:pathData="M5297 5298l1592 5047c-155 49 -288 84 -446 120z"
|
||||
android:fillColor="#4000ff" />
|
||||
<path
|
||||
android:pathData="M5297 5298L3706 251c155 -49 288 -84 446 -120z"
|
||||
android:fillColor="#bfff00" />
|
||||
<path
|
||||
android:pathData="M5297 5298l1146 5167c-159 35 -294 59 -455 80z"
|
||||
android:fillColor="#2b00ff" />
|
||||
<path
|
||||
android:pathData="M5297 5298L4152 131c159 -35 294 -59 455 -80z"
|
||||
android:fillColor="#d4ff00" />
|
||||
<path
|
||||
android:pathData="M5297 5298l691 5247 0 0c-161 21 -297 33 -460 40z"
|
||||
android:fillColor="#1600ff" />
|
||||
<path
|
||||
android:pathData="M5297 5298L4607 51c161 -21 297 -33 460 -40z"
|
||||
android:fillColor="#e9ff00" />
|
||||
</group>
|
||||
</group>
|
||||
</vector>
|
||||
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:viewportWidth="48"
|
||||
android:viewportHeight="48"
|
||||
android:width="48dp"
|
||||
android:height="48dp">
|
||||
<path
|
||||
android:pathData="M24.066406 0.0859375C23.029883 0.09279219 21.973089 0.169175 20.882812 0.3125 16.52171 0.8859 12.946816 2.365275 9.4570312 5.046875c-3.4897849 2.6772 -5.847305 5.747447 -7.53125 9.810547 -1.68394195 4.0631 -2.18468307 7.900619 -1.61132808 12.261719 0.57335401 4.3612 2.05331178 7.937934 4.73046878 11.427734 2.677157 3.4853 5.7474081 5.841391 9.8105471 7.525391 4.063139 1.6832 7.900615 2.188534 12.261719 1.615234 4.3611 -0.5734 7.937948 -2.057275 11.427734 -4.734375 3.489788 -2.6772 5.845347 -5.747447 7.529297 -9.810547 1.67941 -4.0631 2.184678 -7.900619 1.611328 -12.261719 -0.57335 -4.3612 -2.053309 -7.937834 -4.730469 -11.427734C40.277918 5.967925 37.207669 3.6117344 33.144531 1.9277344 30.097177 0.66533431 27.175977 0.06537344 24.066406 0.0859375Zm-0.07422 0.86328125A0.50005 0.50005 0 0 1 24.5 1.4550781l0 2.5429688a0.50005 0.50005 0 1 1 -1 0l0 -2.5429688A0.50005 0.50005 0 0 1 23.992188 0.94921875ZM15.365234 2.6640625a0.50005 0.50005 0 0 1 0.46875 0.3164063l0.97461 2.3496093a0.50005 0.50005 0 1 1 -0.923828 0.3828125l-0.97461 -2.3496094a0.50005 0.50005 0 0 1 0.455078 -0.6992187zm17.253907 0a0.50005 0.50005 0 0 1 0.470703 0.6992187l-0.97461 2.3496094A0.50005 0.50005 0 1 1 31.191406 5.3300781l0.97461 -2.3496093A0.50005 0.50005 0 0 1 32.619141 2.6640625ZM8.0527344 7.5527344a0.50005 0.50005 0 0 1 0.359375 0.1523437L10.210938 9.5039062A0.50005 0.50005 0 1 1 9.5039062 10.210938L7.7050781 8.4121094a0.50005 0.50005 0 0 1 0.3476563 -0.859375zm31.8789066 0a0.50005 0.50005 0 0 1 0.363281 0.859375L38.496094 10.210938A0.50005 0.50005 0 1 1 37.789062 9.5039062l1.798829 -1.7988281a0.50005 0.50005 0 0 1 0.34375 -0.1523437zm-27.085938 2.7890626l5.273438 0 0 11.96875 11.732421 0 0 -11.96875 5.302735 0 0 27.316406 -5.302735 0 0 -12.294922 -11.732421 0 0 12.294922 -5.273438 0 0 -27.316406zm-9.6777342 4.527344a0.50005 0.50005 0 0 1 0.1953124 0.04101l2.3496094 0.97461a0.50005 0.50005 0 1 1 -0.3828125 0.923828l-2.3496093 -0.97461a0.50005 0.50005 0 0 1 0.1875 -0.964843zm41.6484372 0.002a0.50005 0.50005 0 0 1 0.203125 0.96289l-2.349609 0.97461a0.50005 0.50005 0 1 1 -0.382813 -0.923828l2.34961 -0.97461a0.50005 0.50005 0 0 1 0.179687 -0.03906zM1.4550781 23.5l2.5546875 0a0.50005 0.50005 0 1 1 0 1l-2.5546875 0a0.50005 0.50005 0 1 1 0 -1zm42.5468749 0l2.542969 0a0.50005 0.50005 0 1 1 0 1l-2.542969 0a0.50005 0.50005 0 1 1 0 -1zM5.5195312 31.148438a0.50005 0.50005 0 0 1 0.203125 0.96289l-2.359375 0.978516A0.50005 0.50005 0 1 1 2.9804688 32.166016L5.3398438 31.1875a0.50005 0.50005 0 0 1 0.1796874 -0.03906zm36.9472658 0a0.50005 0.50005 0 0 1 0.193359 0.03906l2.359375 0.978516a0.50005 0.50005 0 1 1 -0.382812 0.923828l-2.359375 -0.978516a0.50005 0.50005 0 0 1 0.189453 -0.96289zM9.8535156 37.630859A0.50005 0.50005 0 0 1 10.21875 38.490234L8.4121094 40.294922A0.50005 0.50005 0 1 1 7.7050781 39.587891L9.5097656 37.78125a0.50005 0.50005 0 0 1 0.34375 -0.150391zm28.2773434 0a0.50005 0.50005 0 0 1 0.359375 0.150391l1.804688 1.806641a0.50005 0.50005 0 1 1 -0.707031 0.707031L37.78125 38.490234a0.50005 0.50005 0 0 1 0.349609 -0.859375zm-21.789062 4.332032a0.50005 0.50005 0 0 1 0.470703 0.697265l-0.978516 2.359375a0.50005 0.50005 0 1 1 -0.923828 -0.382812l0.978516 -2.359375a0.50005 0.50005 0 0 1 0.453125 -0.314453zm15.302734 0a0.50005 0.50005 0 0 1 0.466797 0.314453l0.978516 2.359375a0.50005 0.50005 0 1 1 -0.923828 0.382812L31.1875 42.660156a0.50005 0.50005 0 0 1 0.457031 -0.697265zm-7.652343 1.521484A0.50005 0.50005 0 0 1 24.5 43.990234l0 2.554688a0.50005 0.50005 0 1 1 -1 0l0 -2.554688a0.50005 0.50005 0 0 1 0.492188 -0.505859z"
|
||||
android:fillColor="#ffffff" />
|
||||
</vector>
|
||||
@@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="72dp"
|
||||
android:height="72dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M13,3h-2v10h2L13,3zM17.83,5.17l-1.42,1.42C17.99,7.86 19,9.81 19,12c0,3.87 -3.13,7 -7,7s-7,-3.13 -7,-7c0,-2.19 1.01,-4.14 2.58,-5.42L6.17,5.17C4.23,6.82 3,9.26 3,12c0,4.97 4.03,9 9,9s9,-4.03 9,-9c0,-2.74 -1.23,-5.18 -3.17,-6.83z"/>
|
||||
</vector>
|
||||
@@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="72dp"
|
||||
android:height="72dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M19.43,12.98c0.04,-0.32 0.07,-0.64 0.07,-0.98s-0.03,-0.66 -0.07,-0.98l2.11,-1.65c0.19,-0.15 0.24,-0.42 0.12,-0.64l-2,-3.46c-0.12,-0.22 -0.39,-0.3 -0.61,-0.22l-2.49,1c-0.52,-0.4 -1.08,-0.73 -1.69,-0.98l-0.38,-2.65C14.46,2.18 14.25,2 14,2h-4c-0.25,0 -0.46,0.18 -0.49,0.42l-0.38,2.65c-0.61,0.25 -1.17,0.59 -1.69,0.98l-2.49,-1c-0.23,-0.09 -0.49,0 -0.61,0.22l-2,3.46c-0.13,0.22 -0.07,0.49 0.12,0.64l2.11,1.65c-0.04,0.32 -0.07,0.65 -0.07,0.98s0.03,0.66 0.07,0.98l-2.11,1.65c-0.19,0.15 -0.24,0.42 -0.12,0.64l2,3.46c0.12,0.22 0.39,0.3 0.61,0.22l2.49,-1c0.52,0.4 1.08,0.73 1.69,0.98l0.38,2.65c0.03,0.24 0.24,0.42 0.49,0.42h4c0.25,0 0.46,-0.18 0.49,-0.42l0.38,-2.65c0.61,-0.25 1.17,-0.59 1.69,-0.98l2.49,1c0.23,0.09 0.49,0 0.61,-0.22l2,-3.46c0.12,-0.22 0.07,-0.49 -0.12,-0.64l-2.11,-1.65zM12,15.5c-1.93,0 -3.5,-1.57 -3.5,-3.5s1.57,-3.5 3.5,-3.5 3.5,1.57 3.5,3.5 -1.57,3.5 -3.5,3.5z"/>
|
||||
</vector>
|
||||
@@ -0,0 +1,31 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="700dp"
|
||||
android:height="375dp"
|
||||
android:viewportWidth="19755.555"
|
||||
android:viewportHeight="10597.0">
|
||||
<path
|
||||
android:pathData="M3514,1618l12727,0l0,7182l-12727,0z"
|
||||
android:fillColor="#FFF"
|
||||
android:strokeWidth="28.222"
|
||||
android:strokeLineJoin="round"/>
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M16241,8959l-12727,0c-91,0 -182,-68 -182,-182l0,-7159c0,-91 68,-182 182,-182l12727,0c91,0 182,68 182,182l0,7182c0,91 -91,159 -182,159zM3696,8618l12386,0l0,-6841l-12386,0l0,6841z"
|
||||
android:strokeWidth="28.222"
|
||||
android:strokeLineJoin="round"/>
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M13037,9936l-6318,0c-91,0 -182,-68 -182,-182s68,-182 182,-182l6318,0c91,0 182,68 182,182s-91,182 -182,182z"
|
||||
android:strokeWidth="28.222"
|
||||
android:strokeLineJoin="round"/>
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M9151,8800l341,0l0,955l-341,0z"
|
||||
android:strokeWidth="28.222"
|
||||
android:strokeLineJoin="round"/>
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M10264,8800l341,0l0,955l-341,0z"
|
||||
android:strokeWidth="28.222"
|
||||
android:strokeLineJoin="round"/>
|
||||
</vector>
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="@drawable/round_rectangle_background"
|
||||
android:state_focused="true" />
|
||||
<item android:drawable="@android:color/transparent" />
|
||||
</selector>
|
||||
@@ -0,0 +1,8 @@
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
|
||||
<corners android:radius="1000dp" />
|
||||
|
||||
<solid android:color="#8333" />
|
||||
|
||||
</shape>
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="#aaa"/>
|
||||
<corners android:radius="10dp"/>
|
||||
<padding android:left="0dp" android:top="0dp" android:right="0dp" android:bottom="0dp" />
|
||||
</shape>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@drawable/ic_launcher_background" />
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
||||
</adaptive-icon>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@drawable/ic_launcher_background" />
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
||||
</adaptive-icon>
|
||||
|
After Width: | Height: | Size: 7.6 KiB |
|
After Width: | Height: | Size: 7.1 KiB |
|
After Width: | Height: | Size: 4.0 KiB |
|
After Width: | Height: | Size: 3.7 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 27 KiB |
@@ -0,0 +1,68 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<resources>
|
||||
<string-array name="pref_list_framerate">
|
||||
<item>10 لقطة في الثانية</item>
|
||||
<item>15 لقطة في الثانية</item>
|
||||
<item>24 لقطة في الثانية</item>
|
||||
<item>30 لقطة في الثانية</item>
|
||||
<item>60 لقطة في الثانية</item>
|
||||
</string-array>
|
||||
<string name="app_name">هايبريون جرابر</string>
|
||||
<string name="pref_title">الإعدادات</string>
|
||||
<string name="enabled">تمكين</string>
|
||||
<string name="disabled">تعطيل</string>
|
||||
<!-- notification button -->
|
||||
<string name="notification_exit_button">خروج</string>
|
||||
<!-- Network scanner -->
|
||||
<string name="scanner_title">مرحبا!</string>
|
||||
<string name="scanner_description">Hyperion Grabber يمكنه بحث الشبكة الخاصة بك لتشغيل خوادم, حتى أنك لن تضطر إلى عزف مع جهاز التحكم عن بعد لكمة في عنوان ip.</string>
|
||||
<string name="scanner_start_scan_button">بدء البحث</string>
|
||||
<string name="scanner_scan_in_progress_text">البحث عن شبكة المحلية الخاصة بك لتشغيل هايبريون خوادم %s</string>
|
||||
<string name="scanner_scan_in_progress_button">يتم البحث</string>
|
||||
<string name="scanner_no_results">لم يتم العثور على نتائج %s</string>
|
||||
<string name="scanner_retry_button">إعادة المحاولة</string>
|
||||
<string name="scanner_manual_setup_button">الإعداد اليدوي</string>
|
||||
<!-- Network Scanner result -->
|
||||
<string name="scan_result_title">و الفائز هو…</string>
|
||||
<string name="scan_result_description">للاحتفال ، قمنا بتحويل جميع المصابيح الخاصة بك إلى اللون الأرجواني %s</string>
|
||||
<string name="scan_result_confirm_button_text">أحبها!</string>
|
||||
<string name="scan_result_alternative_color_button_text">أنا أكره الارجوان</string>
|
||||
<!-- Connection settings -->
|
||||
<string name="pref_group_connection">الاتصال</string>
|
||||
<string name="pref_title_host">هايبريون المضيف</string>
|
||||
<string name="pref_summary_host">المضيف الخاص بك هايبريون سبيل المثال يعمل على</string>
|
||||
<string name="pref_title_port">منفذ Hyperion Protobuf</string>
|
||||
<string name="pref_summary_port">على protobuf المنفذ الخاص هايبريون سبيل المثال</string>
|
||||
<string name="pref_title_y_led">العد العمودي LED</string>
|
||||
<string name="pref_summary_y_led">العد العمودي لمصابيح LED على جهازك</string>
|
||||
<string name="pref_title_x_led">العد الأفقية LED</string>
|
||||
<string name="pref_summary_x_led">العد الأفقى لمصابيح LED على جهازك</string>
|
||||
<string name="pref_title_priority">أولوية الرسالة</string>
|
||||
<string name="pref_summary_priority">رسالة القناة الأولوية لاستخدام</string>
|
||||
<string name="pref_title_reconnect">إعادة الاتصال</string>
|
||||
<string name="pref_summary_reconnect">تلقائي إعادة الاتصال إلى hyperion على الاتصال المفقود</string>
|
||||
<string name="pref_title_reconnect_delay">إعادة الاتصال من التأخير</string>
|
||||
<string name="pref_summary_reconnect_delay">عدد ثواني الانتظار قبل محاولة إعادة الاتصال</string>
|
||||
<!-- Capturing settings -->
|
||||
<string name="pref_group_capturing">التقاط</string>
|
||||
<string name="pref_title_framerate">معدل التقاط</string>
|
||||
<string name="pref_summary_framerate">لقطة في الثانية حيث يتم إرسال البيانات إلى هايبريون</string>
|
||||
<!-- General settings -->
|
||||
<string name="pref_group_general">العام</string>
|
||||
<string name="pref_summary_boot">بدء التقاط الشاشة عند بدء تشغيل الجهاز</string>
|
||||
<string name="pref_title_boot">الاستيلاء على التمهيد</string>
|
||||
<string name="pref_error_missing_field">%s ينبغي أن لا تكون فارغه</string>
|
||||
<string name="pref_error_invalid_field" formatted="false">%s غير صالح لـ %s</string>
|
||||
<string name="error_empty_host">اعدادات المضيف ينبغي أن لا تكون فارغه</string>
|
||||
<string name="error_empty_port">إعداد المنفذ يجب أن لا يكون فارغاً</string>
|
||||
<string name="error_invalid_led_counts">عدد LED أفقي وعمودي يجب أن تكون مجموعة أكبر من 0</string>
|
||||
<string name="error_server_unreachable">لا يمكن الاتصال هايبريون الخادم. التحقق من الإعدادات الخاصة بك وتأكد من هايبريون يعمل</string>
|
||||
<string name="error_connection_lost">تم فقد الاتصال بخادم hyperion الخاص بك ، الآن قم بإيقاف grabber</string>
|
||||
<string name="toast_must_give_permission">يجب منح إذن لتسجيل بيانات الشاشة.</string>
|
||||
<string name="message_service_started">اضغط على \"رجوع\" لإغلاق التطبيق. سيستمر إرسال محتوى الشاشة إلى Hyperion</string>
|
||||
<string name="error_no_host_name_extra">هذا غريب ، من المتوقع اسم مضيف هنا</string>
|
||||
<string name="notification_channel_label">اشعارات Hyperion Grabber</string>
|
||||
<string name="notification_description">حاليا الاستيلاء على محتوى الشاشة</string>
|
||||
<string name="pref_title_use_avg_color">إرسال متوسط لون الشاشة</string>
|
||||
<string name="pref_summary_use_avg_color">يرسل متوسط لون شاشة الجهاز الخاص بك بدلا من صورة منه</string>
|
||||
</resources>
|
||||
@@ -0,0 +1,68 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<resources>
|
||||
<string-array name="pref_list_framerate">
|
||||
<item>10 fps</item>
|
||||
<item>15 fps</item>
|
||||
<item>24 fps</item>
|
||||
<item>30 fps</item>
|
||||
<item>60 fps</item>
|
||||
</string-array>
|
||||
<string name="app_name">Hyperion Grabber</string>
|
||||
<string name="pref_title">Nastavení</string>
|
||||
<string name="enabled">Povoleno</string>
|
||||
<string name="disabled">Zakázáno</string>
|
||||
<!-- notification button -->
|
||||
<string name="notification_exit_button">Ukončit</string>
|
||||
<!-- Network scanner -->
|
||||
<string name="scanner_title">Ahoj!</string>
|
||||
<string name="scanner_description">Hyperion Grabber může vyhledat spuštěné Hyperion servery ve vaší lokální síti, abyste nemuseli zadávat IP adresu vaším dálkovým ovladačem.</string>
|
||||
<string name="scanner_start_scan_button">Spustit hledání</string>
|
||||
<string name="scanner_scan_in_progress_text">Hledání spuštěných Hyperion serverů ve vaší lokální síti %s</string>
|
||||
<string name="scanner_scan_in_progress_button">Hledání...</string>
|
||||
<string name="scanner_no_results">Nebyly nalezeny žádné výsledky %s</string>
|
||||
<string name="scanner_retry_button">opakovat</string>
|
||||
<string name="scanner_manual_setup_button">Ruční nastavení</string>
|
||||
<!-- Network Scanner result -->
|
||||
<string name="scan_result_title">A vítězem se stává...</string>
|
||||
<string name="scan_result_description">Abychom to oslavili, nastavili jsme všechny LED na fialovou %s</string>
|
||||
<string name="scan_result_confirm_button_text">Miluju to!</string>
|
||||
<string name="scan_result_alternative_color_button_text">Nesnáším fialovou</string>
|
||||
<!-- Connection settings -->
|
||||
<string name="pref_group_connection">Připojení</string>
|
||||
<string name="pref_title_host">Hyperion Host</string>
|
||||
<string name="pref_summary_host">Host, ne kterém je spuštěn váš Hyperion server</string>
|
||||
<string name="pref_title_port">Hyperion Protobuf Port</string>
|
||||
<string name="pref_summary_port">Protobuf port vašeho Hyperion serveru</string>
|
||||
<string name="pref_title_y_led">Vertikální počet LED</string>
|
||||
<string name="pref_summary_y_led">Vertikální počet LED na vašem pásku</string>
|
||||
<string name="pref_title_x_led">Horizontální počet LED</string>
|
||||
<string name="pref_summary_x_led">Horizontální počet LED na vašem pásku</string>
|
||||
<string name="pref_title_priority">Priorita komunikace</string>
|
||||
<string name="pref_summary_priority">Priorita kanálu, který se použije pro odesílání dat</string>
|
||||
<string name="pref_title_reconnect">Znovu připojit</string>
|
||||
<string name="pref_summary_reconnect">Automatické opětovné připojení k Hyperion serveru při ztrátě připojení</string>
|
||||
<string name="pref_title_reconnect_delay">Zpoždění opětovného připojení</string>
|
||||
<string name="pref_summary_reconnect_delay">Kolik vteřin čekat před pokusem o opětovné připojení</string>
|
||||
<!-- Capturing settings -->
|
||||
<string name="pref_group_capturing">Zachytávání obsahu</string>
|
||||
<string name="pref_title_framerate">Frekvence snímání</string>
|
||||
<string name="pref_summary_framerate">Počet snímků za sekundu, ve kterém chcete odesílat data na Hyperionu</string>
|
||||
<!-- General settings -->
|
||||
<string name="pref_group_general">Obecné</string>
|
||||
<string name="pref_summary_boot">Spustit grabování při spuštení zařízení</string>
|
||||
<string name="pref_title_boot">Grabování při Bootu</string>
|
||||
<string name="pref_error_missing_field">%s by neměl být prázdný</string>
|
||||
<string name="pref_error_invalid_field" formatted="false">%s neplatí pro %s</string>
|
||||
<string name="error_empty_host">Pole nastavení Host by nemělo být prázdné</string>
|
||||
<string name="error_empty_port">Pole nastavení portu by nemělo být prázdné</string>
|
||||
<string name="error_invalid_led_counts">Horizontální a vertikální počet LED musí být nastaven a větší než 0</string>
|
||||
<string name="error_server_unreachable">Nelze se připojit k Hyperion serveru. Zkontrolujte vaše nastavení a ujistěte se, že je Hyperion spuštěn</string>
|
||||
<string name="error_connection_lost">Spojení s vaším Hyperion serverem bylo ztraceno, grabber se nyní ukončuje</string>
|
||||
<string name="toast_must_give_permission">K zaznamenávání dat na obrazovce musí být uděleno oprávnění.</string>
|
||||
<string name="message_service_started">Stikněte Zpět pro uzavření aplikace. Obsah obrazovky se bude nadále odesílat do Hyperionu.</string>
|
||||
<string name="error_no_host_name_extra">Zvláštní, tady má být hostname</string>
|
||||
<string name="notification_channel_label">Hyperion Grabber notifikace</string>
|
||||
<string name="notification_description">Momentálně se grabuje obsah obrazovky</string>
|
||||
<string name="pref_title_use_avg_color">Odeslat průměrnou barvu obrazovky</string>
|
||||
<string name="pref_summary_use_avg_color">Odesílá průměrnou barvu obrazovky vašeho zařízení namísto přesného obrazu</string>
|
||||
</resources>
|
||||
@@ -0,0 +1,68 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<resources>
|
||||
<string-array name="pref_list_framerate">
|
||||
<item>10 fps</item>
|
||||
<item>15 fps</item>
|
||||
<item>24 fps</item>
|
||||
<item>30 fps</item>
|
||||
<item>60 fps</item>
|
||||
</string-array>
|
||||
<string name="app_name">Hyperion Grabber</string>
|
||||
<string name="pref_title">Einstellungen</string>
|
||||
<string name="enabled">Einschalten</string>
|
||||
<string name="disabled">Ausschalten</string>
|
||||
<!-- notification button -->
|
||||
<string name="notification_exit_button">Beenden</string>
|
||||
<!-- Network scanner -->
|
||||
<string name="scanner_title">Hallo!</string>
|
||||
<string name="scanner_description">Hyperion Grabber kann im Netzwerk nach Servern suchen, so dass Du nicht die IP-Adresse deines Servers manuell eingeben musst.</string>
|
||||
<string name="scanner_start_scan_button">Suche starten</string>
|
||||
<string name="scanner_scan_in_progress_text">Suche nach lokalen Hyperion Servers läuft %s</string>
|
||||
<string name="scanner_scan_in_progress_button">Suche…</string>
|
||||
<string name="scanner_no_results">Kein Server gefunden %s</string>
|
||||
<string name="scanner_retry_button">Wiederholen</string>
|
||||
<string name="scanner_manual_setup_button">Manuelle Einstellung</string>
|
||||
<!-- Network Scanner result -->
|
||||
<string name="scan_result_title">Und der Gewinner ist …</string>
|
||||
<string name="scan_result_description">Jetzt müssten alle deine LEDs Lila aufleuchten %s</string>
|
||||
<string name="scan_result_confirm_button_text">Ich liebe es!</string>
|
||||
<string name="scan_result_alternative_color_button_text">Bitte kein Lila</string>
|
||||
<!-- Connection settings -->
|
||||
<string name="pref_group_connection">Verbindung</string>
|
||||
<string name="pref_title_host">IP Adresse</string>
|
||||
<string name="pref_summary_host">Die IP Adresse auf dem dein Hyperion Server läuft</string>
|
||||
<string name="pref_title_port">Port Nummer</string>
|
||||
<string name="pref_summary_port">Die PROTO Port Nummer von deinem Hyperion Server</string>
|
||||
<string name="pref_title_y_led">Vertikale LEDs</string>
|
||||
<string name="pref_summary_y_led">Die vertikale Anzahl deiner LEDs</string>
|
||||
<string name="pref_title_x_led">Horizontale LEDs</string>
|
||||
<string name="pref_summary_x_led">Die horizontale Anzahl deiner LEDs</string>
|
||||
<string name="pref_title_priority">Priorität</string>
|
||||
<string name="pref_summary_priority">Die Priorität vom Hyperion Grabber</string>
|
||||
<string name="pref_title_reconnect">Verbindungswiederholung</string>
|
||||
<string name="pref_summary_reconnect">Die Verbindung zum Hyperion Server bei Verlust automatisch wiederherstellen</string>
|
||||
<string name="pref_title_reconnect_delay">Verzögerung</string>
|
||||
<string name="pref_summary_reconnect_delay">Die Sekundenanzahl zwischen den Verbindungswiederholungen</string>
|
||||
<!-- Capturing settings -->
|
||||
<string name="pref_group_capturing">Aufnahme</string>
|
||||
<string name="pref_title_framerate">Aufnahmefrequenz</string>
|
||||
<string name="pref_summary_framerate">Wie schnell neue Bilder an den Server gesendet werden sollen</string>
|
||||
<!-- General settings -->
|
||||
<string name="pref_group_general">Allgemein</string>
|
||||
<string name="pref_summary_boot">Hyperion Grabber mit Android starten</string>
|
||||
<string name="pref_title_boot">Autostart</string>
|
||||
<string name="pref_error_missing_field">%s sollte nicht leer sein</string>
|
||||
<string name="pref_error_invalid_field" formatted="false">%s passt nicht zur %s</string>
|
||||
<string name="error_empty_host">Die IP Adresse darf nicht leer sein</string>
|
||||
<string name="error_empty_port">Die Port Nummer darf nicht leer sein</string>
|
||||
<string name="error_invalid_led_counts">Die Anzahl der horizontalen oder vertikalen LEDs müssen größer als 0 sein</string>
|
||||
<string name="error_server_unreachable">Eine Verbindung zum Hyperion Server konnte nicht hergestellt werden. Bitte überprüfe deine Einstellungen und stelle sicher, dass dein Hyperion Server läuft</string>
|
||||
<string name="error_connection_lost">Die Verbindung zum Hyperion Server wurde getrennt. Die Bilderfassung wir angehalten.</string>
|
||||
<string name="toast_must_give_permission">Bitte erlaube die Bilderfassung.</string>
|
||||
<string name="message_service_started">Du kannst Hyperion Grabber mit der Zurück-Taste verlassen. Der Bildschirminhalt wird im Hintergrund an deinen Hyperion Server gesendet.</string>
|
||||
<string name="error_no_host_name_extra">Eigentlich sollte hier eine IP Adresse eingegeben werden</string>
|
||||
<string name="notification_channel_label">Hyperion Grabber Benachrichtigungen</string>
|
||||
<string name="notification_description">Bildschirminhalt wird übertragen</string>
|
||||
<string name="pref_title_use_avg_color">Durchschnittliche Bildschirmfarbe senden</string>
|
||||
<string name="pref_summary_use_avg_color">Es wird die durchschnittliche Farbe jedes Bildes berechnet und deine LEDs leuchten alle nach dieser berechneten Farbe.</string>
|
||||
</resources>
|
||||
@@ -0,0 +1,39 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<resources>
|
||||
<string-array name="pref_list_framerate">
|
||||
<item>10 fps</item>
|
||||
<item>15 fps</item>
|
||||
<item>24 fps</item>
|
||||
<item>30 fps</item>
|
||||
<item>60 fps</item>
|
||||
</string-array>
|
||||
<string name="app_name">Hyperion Grabber</string>
|
||||
<string name="pref_title">Configuraciones</string>
|
||||
<string name="enabled">Habilitado</string>
|
||||
<string name="disabled">Discapacitado</string>
|
||||
<!-- notification button -->
|
||||
<string name="notification_exit_button">Salida</string>
|
||||
<!-- Network scanner -->
|
||||
<string name="scanner_title">¡Hola!</string>
|
||||
<string name="scanner_start_scan_button">Iniciar escaneoe</string>
|
||||
<string name="scanner_scan_in_progress_button">Exploración…</string>
|
||||
<string name="scanner_no_results">No se encontraron resultados %s</string>
|
||||
<string name="scanner_retry_button">reintento</string>
|
||||
<!-- Network Scanner result -->
|
||||
<string name="scan_result_title">Y el ganador es…</string>
|
||||
<string name="scan_result_confirm_button_text">Me encanta!</string>
|
||||
<string name="scan_result_alternative_color_button_text">Odio a púrpura</string>
|
||||
<!-- Connection settings -->
|
||||
<string name="pref_group_connection">Conexión</string>
|
||||
<string name="pref_title_host">Host de Hyperion</string>
|
||||
<string name="pref_summary_host">Host que está ejecutando la instancia de Hyperion</string>
|
||||
<string name="pref_title_port">Hyperion Protobuf puerto</string>
|
||||
<string name="pref_title_priority">Prioridad del mensaje</string>
|
||||
<string name="pref_summary_priority">Canal de prioridad de mensajes a utilizar</string>
|
||||
<string name="pref_title_framerate">Tasa de captura</string>
|
||||
<!-- General settings -->
|
||||
<string name="pref_group_general">General</string>
|
||||
<string name="error_empty_host">La configuración del host no debe estar vacía</string>
|
||||
<string name="error_empty_port">El puerto no debe estar vacío</string>
|
||||
<string name="toast_must_give_permission">Permiso debe concederse a la pantalla de registro de datos</string>
|
||||
</resources>
|
||||
@@ -0,0 +1,68 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<resources>
|
||||
<string-array name="pref_list_framerate">
|
||||
<item>10 images/s</item>
|
||||
<item>15 images/s</item>
|
||||
<item>24 images/s</item>
|
||||
<item>30 images/s</item>
|
||||
<item>60 images/s</item>
|
||||
</string-array>
|
||||
<string name="app_name">Grabber Hyperion</string>
|
||||
<string name="pref_title">Paramètres</string>
|
||||
<string name="enabled">Activé</string>
|
||||
<string name="disabled">Désactivé</string>
|
||||
<!-- notification button -->
|
||||
<string name="notification_exit_button">Fermer</string>
|
||||
<!-- Network scanner -->
|
||||
<string name="scanner_title">Salut !</string>
|
||||
<string name="scanner_description">Le Grabber Hyperion peut analyser votre réseau à la recherche de serveurs en cours d\'exécution. Ainsi, vous n\'aurez pas à manipuler votre télécommande pour indiquer une adresse IP.</string>
|
||||
<string name="scanner_start_scan_button">Lancer la recherche</string>
|
||||
<string name="scanner_scan_in_progress_text">Recherche de serveurs Hyperion sur votre réseau local %s</string>
|
||||
<string name="scanner_scan_in_progress_button">Recherche...</string>
|
||||
<string name="scanner_no_results">Aucun résultat trouvé %s</string>
|
||||
<string name="scanner_retry_button">réessayer</string>
|
||||
<string name="scanner_manual_setup_button">Configuration manuelle</string>
|
||||
<!-- Network Scanner result -->
|
||||
<string name="scan_result_title">Et le gagnant est…</string>
|
||||
<string name="scan_result_description">Pour célébrer ça, nous avons allumer toutes les LEDs en violet %s</string>
|
||||
<string name="scan_result_confirm_button_text">J\'adore !</string>
|
||||
<string name="scan_result_alternative_color_button_text">Je déteste le violet</string>
|
||||
<!-- Connection settings -->
|
||||
<string name="pref_group_connection">Connexion</string>
|
||||
<string name="pref_title_host">Serveur Hyperion</string>
|
||||
<string name="pref_summary_host">Adresse IP de votre serveur Hyperion</string>
|
||||
<string name="pref_title_port">Port Hyperion</string>
|
||||
<string name="pref_summary_port">Port utilisée par votre instance Hyperion.</string>
|
||||
<string name="pref_title_y_led">Nombre de LEDs verticales</string>
|
||||
<string name="pref_summary_y_led">Le nombre de LEDs verticales sur votre matériel</string>
|
||||
<string name="pref_title_x_led">Nombre de LEDs horizontal</string>
|
||||
<string name="pref_summary_x_led">Nombre de LEDs horizontal sur votre matériel</string>
|
||||
<string name="pref_title_priority">Priorité du message</string>
|
||||
<string name="pref_summary_priority">Priorité du canal à utiliser</string>
|
||||
<string name="pref_title_reconnect">Reconnecter</string>
|
||||
<string name="pref_summary_reconnect">Reconnexion automatique à Hyperion en cas de perte de connexion</string>
|
||||
<string name="pref_title_reconnect_delay">Délai de reconnexion</string>
|
||||
<string name="pref_summary_reconnect_delay">Nombre de secondes à attendre avant d\'essayer de se reconnecter</string>
|
||||
<!-- Capturing settings -->
|
||||
<string name="pref_group_capturing">Capture</string>
|
||||
<string name="pref_title_framerate">Fréquence de capture</string>
|
||||
<string name="pref_summary_framerate">Images par seconde envoyées au serveur Hyperion</string>
|
||||
<!-- General settings -->
|
||||
<string name="pref_group_general">Général</string>
|
||||
<string name="pref_summary_boot">Lancer le grabber au démarrage de l\'appareil</string>
|
||||
<string name="pref_title_boot">Capturer au démarrage</string>
|
||||
<string name="pref_error_missing_field">%s ne doit pas être vide</string>
|
||||
<string name="pref_error_invalid_field" formatted="false">%s n\'est pas valide pour %s</string>
|
||||
<string name="error_empty_host">Le réglage de l\'hôte ne doit pas être vide.</string>
|
||||
<string name="error_empty_port">Le réglage du port ne doit pas être vide.</string>
|
||||
<string name="error_invalid_led_counts">Le nombre de LED horizontales et verticales doivent être réglées et supérieur à 0.</string>
|
||||
<string name="error_server_unreachable">Impossible de se connecter au serveur hyperion. Vérifiez vos paramètres et assurez-vous qu\'Hyperion est en cours d´exécution</string>
|
||||
<string name="error_connection_lost">La connexion à votre serveur Hyperion a été perdue. Le grabber va s\'arrêter </string>
|
||||
<string name="toast_must_give_permission">Vous devez accepter l´autorisation pour permettre de capturer l´image à l´écran</string>
|
||||
<string name="message_service_started">Appuyez sur Retour pour fermer l\'application. Le contenu de votre écran continuera d\'être envoyé à Hyperion.</string>
|
||||
<string name="error_no_host_name_extra">C\'est bizarre, il est attendu un nom d\'hôte ici</string>
|
||||
<string name="notification_channel_label">Notifications du Grabber Hyperion</string>
|
||||
<string name="notification_description">Actuellement en train de capturer le contenu de l\'écran</string>
|
||||
<string name="pref_title_use_avg_color">Envoyer la couleur dominante de l\'écran</string>
|
||||
<string name="pref_summary_use_avg_color">Envoie la couleur dominante de l\'écran de votre appareil plutôt qu\'une image de celui-ci</string>
|
||||
</resources>
|
||||
@@ -0,0 +1,68 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<resources>
|
||||
<string-array name="pref_list_framerate">
|
||||
<item>10 fps</item>
|
||||
<item>15 fps</item>
|
||||
<item>24 fps</item>
|
||||
<item>30 fps</item>
|
||||
<item>60 fps</item>
|
||||
</string-array>
|
||||
<string name="app_name">Hyperion Grabber</string>
|
||||
<string name="pref_title">Impostazioni</string>
|
||||
<string name="enabled">Abilitato</string>
|
||||
<string name="disabled">Disabilitato</string>
|
||||
<!-- notification button -->
|
||||
<string name="notification_exit_button">Uscita</string>
|
||||
<!-- Network scanner -->
|
||||
<string name="scanner_title">Ciao!</string>
|
||||
<string name="scanner_description">Hyperion Grabber è in grado di scansionare la tua rete per individuare server in esecuzione, quindi non dovrai inserire un indirizzo IP con il telecomando.</string>
|
||||
<string name="scanner_start_scan_button">Inizia scansione</string>
|
||||
<string name="scanner_scan_in_progress_text">Scansione rete locale per individuare server hyperion in esecuzione %s</string>
|
||||
<string name="scanner_scan_in_progress_button">Scansione ...</string>
|
||||
<string name="scanner_no_results">Nessun risultato trovato %s</string>
|
||||
<string name="scanner_retry_button">Riprova</string>
|
||||
<string name="scanner_manual_setup_button">Configurazione manuale</string>
|
||||
<!-- Network Scanner result -->
|
||||
<string name="scan_result_title">E il vincitore è…</string>
|
||||
<string name="scan_result_description">Per festeggiare, abbiamo acceso tutti i tuoi LED in viola %s</string>
|
||||
<string name="scan_result_confirm_button_text">Lo adoro!</string>
|
||||
<string name="scan_result_alternative_color_button_text">Odio il viola</string>
|
||||
<!-- Connection settings -->
|
||||
<string name="pref_group_connection">Connessione</string>
|
||||
<string name="pref_title_host">Hyperion Host</string>
|
||||
<string name="pref_summary_host">Host dove è in esecuzione l\'istanza di hyperion</string>
|
||||
<string name="pref_title_port">Porta Protobuf Hyperion</string>
|
||||
<string name="pref_summary_port">La porta protobuf della tua istanza hyperion</string>
|
||||
<string name="pref_title_y_led">Conteggio LED verticali</string>
|
||||
<string name="pref_summary_y_led">Il conteggio verticale dei LED sul tuo hardware</string>
|
||||
<string name="pref_title_x_led">Conteggio LED orizzontali</string>
|
||||
<string name="pref_summary_x_led">Il conteggio orizzontale dei LED sul tuo hardware</string>
|
||||
<string name="pref_title_priority">Priorità del messaggio</string>
|
||||
<string name="pref_summary_priority">Canale prioritario del messaggio da utilizzare</string>
|
||||
<string name="pref_title_reconnect">Riconnettere</string>
|
||||
<string name="pref_summary_reconnect">Riconnettersi automaticamente a hyperion in caso di connessione persa</string>
|
||||
<string name="pref_title_reconnect_delay">Ritardo riconnessione</string>
|
||||
<string name="pref_summary_reconnect_delay">Il numero di secondi da attendere prima di provare a riconnettersi</string>
|
||||
<!-- Capturing settings -->
|
||||
<string name="pref_group_capturing">Acquisizione in corso</string>
|
||||
<string name="pref_title_framerate">Velocità di acquisizione</string>
|
||||
<string name="pref_summary_framerate">Fotogrammi al secondo in cui inviare i dati a hyperion</string>
|
||||
<!-- General settings -->
|
||||
<string name="pref_group_general">Generale</string>
|
||||
<string name="pref_summary_boot">Avvia lo screen grabber all\'avvio del dispositivo</string>
|
||||
<string name="pref_title_boot">Inizia acquisizione all\'avvio</string>
|
||||
<string name="pref_error_missing_field">%s non dovrebbe essere vuoto</string>
|
||||
<string name="pref_error_invalid_field" formatted="false">%s non è valido per %s</string>
|
||||
<string name="error_empty_host">Il valore dell\'host non dovrebbe essere vuoto</string>
|
||||
<string name="error_empty_port">Il valore della porta non dovrebbe essere vuoto</string>
|
||||
<string name="error_invalid_led_counts">I conteggi LED orizzontali e verticali devono essere impostati e maggiori di 0</string>
|
||||
<string name="error_server_unreachable">Impossibile connettersi al server hyperion. Controlla le tue impostazioni e assicurati che hyperion sia in esecuzione</string>
|
||||
<string name="error_connection_lost">La connessione al tuo hyperion server è stata persa, l\'acquisizione verrà interrotta</string>
|
||||
<string name="toast_must_give_permission">Deve essere data l\'autorizzazione per registrare i dati dello schermo.</string>
|
||||
<string name="message_service_started">Premi Indietro per chiudere l\'app. Il contenuto dello schermo continuerà ad essere inviato a Hyperion</string>
|
||||
<string name="error_no_host_name_extra">È strano, serve un nome host qui</string>
|
||||
<string name="notification_channel_label">Notifiche di Hyperion Grabber</string>
|
||||
<string name="notification_description">Acquisizione schermo in corso</string>
|
||||
<string name="pref_title_use_avg_color">Invia il colore medio dello schermo</string>
|
||||
<string name="pref_summary_use_avg_color">Invia il colore medio dello schermo del tuo dispositivo piuttosto che un\'immagine di esso</string>
|
||||
</resources>
|
||||
@@ -0,0 +1,68 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<resources>
|
||||
<string-array name="pref_list_framerate">
|
||||
<item>10 fps</item>
|
||||
<item>15 fps</item>
|
||||
<item>24 fps</item>
|
||||
<item>30 fps</item>
|
||||
<item>60 fps</item>
|
||||
</string-array>
|
||||
<string name="app_name">Hyperion Grabber</string>
|
||||
<string name="pref_title">Instellingen</string>
|
||||
<string name="enabled">Ingeschakeld</string>
|
||||
<string name="disabled">Uitgeschakeld</string>
|
||||
<!-- notification button -->
|
||||
<string name="notification_exit_button">Afsluiten</string>
|
||||
<!-- Network scanner -->
|
||||
<string name="scanner_title">Hallo daar!</string>
|
||||
<string name="scanner_description">Hyperion Grabber kan uw netwerk scannen op draaiende servers, zodat u niet hoeft te knoeien met uw afstandsbediening om een ip-adres in te voeren.</string>
|
||||
<string name="scanner_start_scan_button">Scan starten</string>
|
||||
<string name="scanner_scan_in_progress_text">Uw lokale netwerk scannen op Hyperion servers %s</string>
|
||||
<string name="scanner_scan_in_progress_button">Scannen...</string>
|
||||
<string name="scanner_no_results">Geen resultaten gevonden %s</string>
|
||||
<string name="scanner_retry_button">opnieuw proberen</string>
|
||||
<string name="scanner_manual_setup_button">Handmatig instellen</string>
|
||||
<!-- Network Scanner result -->
|
||||
<string name="scan_result_title">En de winnaar is…</string>
|
||||
<string name="scan_result_description">Om dit te vieren, hebben we al je LED\'s paars gemaakt %s </string>
|
||||
<string name="scan_result_confirm_button_text">Mooi hoor!</string>
|
||||
<string name="scan_result_alternative_color_button_text">Ik haat paars</string>
|
||||
<!-- Connection settings -->
|
||||
<string name="pref_group_connection">Verbinding</string>
|
||||
<string name="pref_title_host">Hyperion Hostnaam</string>
|
||||
<string name="pref_summary_host">Host waar uw Hyperion server op draait</string>
|
||||
<string name="pref_title_port">Hyperion Protobuf-poort</string>
|
||||
<string name="pref_summary_port">De Protobuf-poort van uw hyperion-server</string>
|
||||
<string name="pref_title_y_led">Verticale LED\'s</string>
|
||||
<string name="pref_summary_y_led">Het verticale aantal LED\'s van uw apparaat</string>
|
||||
<string name="pref_title_x_led">Horizontale LED\'s</string>
|
||||
<string name="pref_summary_x_led">Het horizontale aantal LED\'s van uw apparaat</string>
|
||||
<string name="pref_title_priority">Hyperion-prioriteit</string>
|
||||
<string name="pref_summary_priority">1 is hoogste, 900 is laagste</string>
|
||||
<string name="pref_title_reconnect">Verloren verbinding herstellen</string>
|
||||
<string name="pref_summary_reconnect">Automatisch opnieuw verbinding maken met Hyperion bij verloren verbinding</string>
|
||||
<string name="pref_title_reconnect_delay">Vertraging voor opnieuw verbinden</string>
|
||||
<string name="pref_summary_reconnect_delay">Het aantal seconden voordat wordt geprobeerd opnieuw verbinding te maken</string>
|
||||
<!-- Capturing settings -->
|
||||
<string name="pref_group_capturing">Opname</string>
|
||||
<string name="pref_title_framerate">Opname-snelheid</string>
|
||||
<string name="pref_summary_framerate">Aantal keer per seconde dat het beeld naar Hyperion gestuurd wordt</string>
|
||||
<!-- General settings -->
|
||||
<string name="pref_group_general">Algemeen</string>
|
||||
<string name="pref_summary_boot">Start schermopname wanneer uw apparaat start</string>
|
||||
<string name="pref_title_boot">Direct starten</string>
|
||||
<string name="pref_error_missing_field">%s mag niet leeg zijn</string>
|
||||
<string name="pref_error_invalid_field" formatted="false">%s is niet geldig voor %s</string>
|
||||
<string name="error_empty_host">Hostinstelling mag niet leeg zijn</string>
|
||||
<string name="error_empty_port">Poortinstelling mag niet leeg zijn</string>
|
||||
<string name="error_invalid_led_counts">Het aantal horizontale & verticale LEDs moet groter zijn dan 0</string>
|
||||
<string name="error_server_unreachable">Kon geen verbinding maken met de Hyperion-server. Controleer uw instellingen en zorg ervoor dat Hyperion actief is</string>
|
||||
<string name="error_connection_lost">De verbinding met uw Hyperion-server is verbroken, schermopname wordt gestopt</string>
|
||||
<string name="toast_must_give_permission">Er moet toestemming worden verleend om scherminhoud door te sturen</string>
|
||||
<string name="message_service_started">Druk op Terug om de app te sluiten. Uw scherminhoud wordt nog steeds naar Hyperion verzonden</string>
|
||||
<string name="error_no_host_name_extra">Dat is raar, ik verwachtte hier een hostnaam</string>
|
||||
<string name="notification_channel_label">Hyperion Grabber Notificaties</string>
|
||||
<string name="notification_description">Scherminhoud wordt doorgestuurd</string>
|
||||
<string name="pref_title_use_avg_color">Stuur Gemiddelde Schermkleur</string>
|
||||
<string name="pref_summary_use_avg_color">Stuurt de gemiddelde kleur van het scherm in plaats van een beeld van het</string>
|
||||
</resources>
|
||||
@@ -0,0 +1,68 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<resources>
|
||||
<string-array name="pref_list_framerate">
|
||||
<item>10 bilder per sekund (FPS)</item>
|
||||
<item>15 bilder per sekund (FPS)</item>
|
||||
<item>24 bilder per sekund (FPS)</item>
|
||||
<item>30 bilder per sekund (FPS)</item>
|
||||
<item>60 bilder per sekund (FPS)</item>
|
||||
</string-array>
|
||||
<string name="app_name">Hyperion Grabber</string>
|
||||
<string name="pref_title">Innstillinger</string>
|
||||
<string name="enabled">Aktivert</string>
|
||||
<string name="disabled">Deaktivert</string>
|
||||
<!-- notification button -->
|
||||
<string name="notification_exit_button">Avslutt</string>
|
||||
<!-- Network scanner -->
|
||||
<string name="scanner_title">Hei der!</string>
|
||||
<string name="scanner_description">Hyperion Grabber kan skanne nettverket etter aktive Hyperion servere, slik at du slipper å fikle med fjernkontrollen for å taste inn en ip-adresse.</string>
|
||||
<string name="scanner_start_scan_button">Start søk</string>
|
||||
<string name="scanner_scan_in_progress_text">Skanner ditt lokale nettverk for aktive Hyperion servere %s</string>
|
||||
<string name="scanner_scan_in_progress_button">Skanner ...</string>
|
||||
<string name="scanner_no_results">Ingen resultater funnet %s</string>
|
||||
<string name="scanner_retry_button">prøv på nytt</string>
|
||||
<string name="scanner_manual_setup_button">Manuelt oppsett</string>
|
||||
<!-- Network Scanner result -->
|
||||
<string name="scan_result_title">Og vinneren er...</string>
|
||||
<string name="scan_result_description">For å feire, har vi gjort alle lysdiodene dine lilla %s</string>
|
||||
<string name="scan_result_confirm_button_text">Digger det!</string>
|
||||
<string name="scan_result_alternative_color_button_text">Jeg hater lilla</string>
|
||||
<!-- Connection settings -->
|
||||
<string name="pref_group_connection">Tilkobling</string>
|
||||
<string name="pref_title_host">Hyperion vert</string>
|
||||
<string name="pref_summary_host">Vertsnavn Hyperion kjører på</string>
|
||||
<string name="pref_title_port">Hyperion Protobuf Port</string>
|
||||
<string name="pref_summary_port">Protobuf porten til Hyperion instansen</string>
|
||||
<string name="pref_title_y_led">Antall vertikale LED</string>
|
||||
<string name="pref_summary_y_led">Antallet vertikale LED koblet til systemet</string>
|
||||
<string name="pref_title_x_led">Antall horisontale LED</string>
|
||||
<string name="pref_summary_x_led">Antallet horisontale LED tilkoblet systemet</string>
|
||||
<string name="pref_title_priority">Meldings prioritet</string>
|
||||
<string name="pref_summary_priority">Prioritert meldingskanal som skal benyttes</string>
|
||||
<string name="pref_title_reconnect">Koble til på nytt</string>
|
||||
<string name="pref_summary_reconnect">Automatisk koble til Hyperion på nytt ved tapt tilkobling</string>
|
||||
<string name="pref_title_reconnect_delay">Forsinkelse for påkoblingsforsøk</string>
|
||||
<string name="pref_summary_reconnect_delay">Antall sekunder å vente før nytt tilkoblingsforsøk</string>
|
||||
<!-- Capturing settings -->
|
||||
<string name="pref_group_capturing">Fanger innhold</string>
|
||||
<string name="pref_title_framerate">Capture rate</string>
|
||||
<string name="pref_summary_framerate">Bilder per sekund (FPS) som skal sendes til Hyperion</string>
|
||||
<!-- General settings -->
|
||||
<string name="pref_group_general">Generelt</string>
|
||||
<string name="pref_summary_boot">Start screen grabber når enheten starter</string>
|
||||
<string name="pref_title_boot">Start grabbing ved restart av systemet</string>
|
||||
<string name="pref_error_missing_field">%s feltet må ikke være tomt</string>
|
||||
<string name="pref_error_invalid_field" formatted="false">%s er ikke gyldig for %s</string>
|
||||
<string name="error_empty_host">Vertsnavn feltet må fylles inn</string>
|
||||
<string name="error_empty_port">Portnummer må fylles inn</string>
|
||||
<string name="error_invalid_led_counts">Horisontale og vertikale LED tellerer må settes, og må være større enn 0</string>
|
||||
<string name="error_server_unreachable">Kunne ikke koble til Hyperion serveren. Kontroller instillingene og sørg for at Hyperion kjører.</string>
|
||||
<string name="error_connection_lost">Tilkoblingen til Hyperion serveren has stoppet, grabber stoppes nå.</string>
|
||||
<string name="toast_must_give_permission">Tillatelser må være gitt for å hente skjermdata.</string>
|
||||
<string name="message_service_started">Trykk Tilbake for å lukke appen. Innholdet på skjermen din vil fortsatt bli sendt til Hyperion</string>
|
||||
<string name="error_no_host_name_extra">Det var underlig, forventet et hostnavn her</string>
|
||||
<string name="notification_channel_label">Hyperion Grabber Varsler</string>
|
||||
<string name="notification_description">Fanger innholdet på skjermen</string>
|
||||
<string name="pref_title_use_avg_color">Send gjennomsnittlig skjermfarge</string>
|
||||
<string name="pref_summary_use_avg_color">Sender gjennomsnittsfargen i enhetens skjerm i stedet for et bilde av det</string>
|
||||
</resources>
|
||||
@@ -0,0 +1,34 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<resources>
|
||||
<string-array name="pref_list_framerate">
|
||||
<item>10 кадров в секунду</item>
|
||||
<item>15 кадров в секунду</item>
|
||||
<item>24 кадра в секунду</item>
|
||||
<item>30 кадров в секунду</item>
|
||||
<item>60 кадров в секунду</item>
|
||||
</string-array>
|
||||
<string name="pref_title">Настройки</string>
|
||||
<string name="enabled">Включено</string>
|
||||
<!-- notification button -->
|
||||
<string name="notification_exit_button">Выход </string>
|
||||
<string name="scanner_scan_in_progress_button">сканирование...</string>
|
||||
<string name="pref_title_priority">Приоритет сообщений</string>
|
||||
<string name="pref_title_reconnect">Заново</string>
|
||||
<string name="pref_summary_reconnect">Автоматическо заново соедините к hyperion припотеряли связи</string>
|
||||
<string name="pref_title_reconnect_delay">Задержка повторного подключения</string>
|
||||
<string name="pref_summary_reconnect_delay">Количество секунд ожидания до попытки повторного подключения</string>
|
||||
<!-- Capturing settings -->
|
||||
<string name="pref_group_capturing">Захват</string>
|
||||
<string name="pref_title_framerate">Частота захвата</string>
|
||||
<!-- General settings -->
|
||||
<string name="pref_group_general">Общие</string>
|
||||
<string name="pref_summary_boot">Запуск захвата экрана при запуске устройства</string>
|
||||
<string name="pref_title_boot">захват при загрузке</string>
|
||||
<string name="pref_error_missing_field">%s не должно быть пустым</string>
|
||||
<string name="pref_error_invalid_field" formatted="false">%s недействительно для %s</string>
|
||||
<string name="error_empty_host">Настройка хоста не должна быть пустой</string>
|
||||
<string name="error_empty_port">Настройка порта не должна быть пустой</string>
|
||||
<string name="error_connection_lost">Соединение с вашим сервером hyperion было потеряно. Грабер останавливаться</string>
|
||||
<string name="toast_must_give_permission">Разрешение должно быть предоставлено для записи экрана данных.</string>
|
||||
<string name="message_service_started">Нажмите «Назад», чтобы закрыть приложение. Содержимое вашего экрана будет по-прежнему отправляться в Hyperion</string>
|
||||
</resources>
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="colorPrimary">#3F51B5</color>
|
||||
<color name="colorPrimaryDark">#303F9F</color>
|
||||
<color name="colorAccent">#FF4081</color>
|
||||
</resources>
|
||||
@@ -0,0 +1,37 @@
|
||||
<resources>
|
||||
<string name="pref_key_host" translatable="false">pref_key_host</string>
|
||||
|
||||
<string name="pref_key_port" translatable="false">pref_key_port</string>
|
||||
<integer name="pref_default_port" translatable="false">19400</integer>
|
||||
|
||||
<string name="pref_key_y_led" translatable="false">pref_key_y_led</string>
|
||||
<integer name="pref_default_y_led" translatable="false">34</integer>
|
||||
|
||||
<string name="pref_key_x_led" translatable="false">pref_key_x_led</string>
|
||||
<integer name="pref_default_x_led" translatable="false">60</integer>
|
||||
|
||||
<string name="pref_key_priority" translatable="false">pref_key_priority</string>
|
||||
<integer name="pref_default_priority" translatable="false">100</integer>
|
||||
|
||||
<string name="pref_key_reconnect" translatable="false">pref_key_reconnect</string>
|
||||
<bool name="pref_default_reconnect" translatable="false">true</bool>
|
||||
|
||||
<string name="pref_key_reconnect_delay" translatable="false">pref_key_reconnect_delay</string>
|
||||
<integer name="pref_default_reconnect_delay" translatable="false">5</integer>
|
||||
|
||||
<string name="pref_key_boot" translatable="false">pref_key_start_on_boot</string>
|
||||
<bool name="pref_default_boot" translatable="false">false</bool>
|
||||
|
||||
<string name="pref_key_framerate" translatable="false">pref_key_framerate</string>
|
||||
<integer name="pref_default_framerate" translatable="false">30</integer>
|
||||
<string-array name="pref_list_framerate_values" translatable="false">
|
||||
<item>10</item>
|
||||
<item>15</item>
|
||||
<item>24</item>
|
||||
<item>30</item>
|
||||
<item>60</item>
|
||||
</string-array>
|
||||
|
||||
<string name="pref_key_use_avg_color" translatable="false">pref_key_use_avg_color</string>
|
||||
<bool name="pref_default_use_avg_color" translatable="false">false</bool>
|
||||
</resources>
|
||||
@@ -0,0 +1,68 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<resources>
|
||||
<string-array name="pref_list_framerate">
|
||||
<item>10 fps</item>
|
||||
<item>15 fps</item>
|
||||
<item>24 fps</item>
|
||||
<item>30 fps</item>
|
||||
<item>60 fps</item>
|
||||
</string-array>
|
||||
<string name="app_name">Hyperion Grabber</string>
|
||||
<string name="pref_title">Settings</string>
|
||||
<string name="enabled">Enabled</string>
|
||||
<string name="disabled">Disabled</string>
|
||||
<!-- notification button -->
|
||||
<string name="notification_exit_button">Exit</string>
|
||||
<!-- Network scanner -->
|
||||
<string name="scanner_title">Hi there!</string>
|
||||
<string name="scanner_description">Hyperion Grabber can scan your network for running servers, so you won\'t have to fiddle with your remote to punch in an ip-address.</string>
|
||||
<string name="scanner_start_scan_button">Start scan</string>
|
||||
<string name="scanner_scan_in_progress_text">Scanning your local network for running hyperion servers %s</string>
|
||||
<string name="scanner_scan_in_progress_button">Scanning…</string>
|
||||
<string name="scanner_no_results">No results found %s</string>
|
||||
<string name="scanner_retry_button">retry</string>
|
||||
<string name="scanner_manual_setup_button">Manual setup</string>
|
||||
<!-- Network Scanner result -->
|
||||
<string name="scan_result_title">And the winner is…</string>
|
||||
<string name="scan_result_description">To celebrate, we have turned all your LEDs purple %s</string>
|
||||
<string name="scan_result_confirm_button_text">Love it!</string>
|
||||
<string name="scan_result_alternative_color_button_text">I hate purple</string>
|
||||
<!-- Connection settings -->
|
||||
<string name="pref_group_connection">Connection</string>
|
||||
<string name="pref_title_host">Hyperion Host</string>
|
||||
<string name="pref_summary_host">Host your hyperion instance is running on</string>
|
||||
<string name="pref_title_port">Hyperion FlatBuffers Port</string>
|
||||
<string name="pref_summary_port">The FlatBuffers port of your hyperion instance (usually 19400)</string>
|
||||
<string name="pref_title_y_led">Vertical LED Count</string>
|
||||
<string name="pref_summary_y_led">The vertical count of LEDs on your hardware</string>
|
||||
<string name="pref_title_x_led">Horizontal LED Count</string>
|
||||
<string name="pref_summary_x_led">The horizontal count of LEDs on your hardware</string>
|
||||
<string name="pref_title_priority">Message Priority</string>
|
||||
<string name="pref_summary_priority">Message priority channel to use</string>
|
||||
<string name="pref_title_reconnect">Reconnect</string>
|
||||
<string name="pref_summary_reconnect">Automatic reconnect to hyperion on lost connection</string>
|
||||
<string name="pref_title_reconnect_delay">Reconnect Delay</string>
|
||||
<string name="pref_summary_reconnect_delay">The number of seconds to wait before trying to reconnect</string>
|
||||
<!-- Capturing settings -->
|
||||
<string name="pref_group_capturing">Capturing</string>
|
||||
<string name="pref_title_framerate">Capture Rate</string>
|
||||
<string name="pref_summary_framerate">Frames per second in which to send data to hyperion</string>
|
||||
<!-- General settings -->
|
||||
<string name="pref_group_general">General</string>
|
||||
<string name="pref_summary_boot">Start screen grabber when device starts</string>
|
||||
<string name="pref_title_boot">Grab on Boot</string>
|
||||
<string name="pref_error_missing_field">%s should not be empty</string>
|
||||
<string name="pref_error_invalid_field" formatted="false">%s is not valid for %s</string>
|
||||
<string name="error_empty_host">Host setting should not be empty</string>
|
||||
<string name="error_empty_port">Port setting should not be empty</string>
|
||||
<string name="error_invalid_led_counts">Horizontal & vertical LED counts must be set and greater than 0</string>
|
||||
<string name="error_server_unreachable">Could not connect to the hyperion server. Check your settings and make sure hyperion is running</string>
|
||||
<string name="error_connection_lost">The connection to your hyperion server has been lost, now stopping the grabber</string>
|
||||
<string name="toast_must_give_permission">Permission must be granted to record screen data.</string>
|
||||
<string name="message_service_started">Press Back to close the app. Your screen content will continue to be sent to Hyperion</string>
|
||||
<string name="error_no_host_name_extra">That\'s weird, expected a hostname here</string>
|
||||
<string name="notification_channel_label">Hyperion Grabber Notifications</string>
|
||||
<string name="notification_description">Currently grabbing screen content</string>
|
||||
<string name="pref_title_use_avg_color">Send Average Screen Color</string>
|
||||
<string name="pref_summary_use_avg_color">Sends the average color of your device\'s screen rather than an image of it</string>
|
||||
</resources>
|
||||
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<style name="Theme.Transparent" parent="Theme.AppCompat.Light.NoActionBar">
|
||||
<item name="android:windowIsTranslucent">true</item>
|
||||
<item name="android:windowBackground">@android:color/transparent</item>
|
||||
<item name="android:windowContentOverlay">@null</item>
|
||||
<item name="android:windowNoTitle">true</item>
|
||||
<item name="android:backgroundDimEnabled">true</item>
|
||||
<item name="colorPrimaryDark">@android:color/transparent</item>
|
||||
<item name="android:windowAnimationStyle">@null</item>
|
||||
</style>
|
||||
</resources>
|
||||
@@ -0,0 +1,118 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<PreferenceScreen
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:title="@string/pref_title">
|
||||
|
||||
<PreferenceCategory
|
||||
android:title="@string/pref_group_connection">
|
||||
|
||||
<EditTextPreference
|
||||
android:capitalize="words"
|
||||
android:inputType="textCapWords"
|
||||
android:key="@string/pref_key_host"
|
||||
android:summary="@string/pref_summary_host"
|
||||
android:maxLines="1"
|
||||
android:selectAllOnFocus="true"
|
||||
android:singleLine="true"
|
||||
android:title="@string/pref_title_host" />
|
||||
|
||||
<EditTextPreference
|
||||
android:defaultValue="@integer/pref_default_port"
|
||||
android:hint="@integer/pref_default_port"
|
||||
android:maxLines="1"
|
||||
android:key="@string/pref_key_port"
|
||||
android:summary="@string/pref_summary_port"
|
||||
android:numeric="integer"
|
||||
android:inputType="phone"
|
||||
android:selectAllOnFocus="true"
|
||||
android:singleLine="true"
|
||||
android:title="@string/pref_title_port" />
|
||||
|
||||
<EditTextPreference
|
||||
android:defaultValue="@integer/pref_default_priority"
|
||||
android:hint="@integer/pref_default_priority"
|
||||
android:maxLines="1"
|
||||
android:key="@string/pref_key_priority"
|
||||
android:summary="@string/pref_summary_priority"
|
||||
android:numeric="integer"
|
||||
android:selectAllOnFocus="true"
|
||||
android:singleLine="true"
|
||||
android:title="@string/pref_title_priority" />
|
||||
|
||||
<CheckBoxPreference
|
||||
android:defaultValue="@bool/pref_default_reconnect"
|
||||
android:key="@string/pref_key_reconnect"
|
||||
android:summary="@string/pref_summary_reconnect"
|
||||
android:title="@string/pref_title_reconnect" />
|
||||
|
||||
<EditTextPreference
|
||||
android:defaultValue="@integer/pref_default_reconnect_delay"
|
||||
android:dependency="@string/pref_key_reconnect"
|
||||
android:hint="@integer/pref_default_reconnect_delay"
|
||||
android:key="@string/pref_key_reconnect_delay"
|
||||
android:maxLines="1"
|
||||
android:numeric="integer"
|
||||
android:selectAllOnFocus="true"
|
||||
android:singleLine="true"
|
||||
android:summary="@string/pref_summary_reconnect_delay"
|
||||
android:title="@string/pref_title_reconnect_delay" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory
|
||||
android:title="@string/pref_group_capturing">
|
||||
|
||||
<EditTextPreference
|
||||
android:defaultValue="@integer/pref_default_x_led"
|
||||
android:hint="@integer/pref_default_x_led"
|
||||
android:maxLines="1"
|
||||
android:key="@string/pref_key_x_led"
|
||||
android:summary="@string/pref_summary_x_led"
|
||||
android:numeric="integer"
|
||||
android:inputType="phone"
|
||||
android:selectAllOnFocus="true"
|
||||
android:singleLine="true"
|
||||
android:title="@string/pref_title_x_led" />
|
||||
|
||||
<EditTextPreference
|
||||
android:defaultValue="@integer/pref_default_y_led"
|
||||
android:hint="@integer/pref_default_y_led"
|
||||
android:maxLines="1"
|
||||
android:key="@string/pref_key_y_led"
|
||||
android:summary="@string/pref_summary_y_led"
|
||||
android:numeric="integer"
|
||||
android:inputType="phone"
|
||||
android:selectAllOnFocus="true"
|
||||
android:singleLine="true"
|
||||
android:title="@string/pref_title_y_led" />
|
||||
|
||||
<ListPreference
|
||||
android:defaultValue="@integer/pref_default_framerate"
|
||||
android:entries="@array/pref_list_framerate"
|
||||
android:entryValues="@array/pref_list_framerate_values"
|
||||
android:key="@string/pref_key_framerate"
|
||||
android:summary="@string/pref_summary_framerate"
|
||||
android:negativeButtonText="@null"
|
||||
android:positiveButtonText="@null"
|
||||
android:title="@string/pref_title_framerate" />
|
||||
|
||||
<CheckBoxPreference
|
||||
android:defaultValue="@bool/pref_default_use_avg_color"
|
||||
android:key="@string/pref_key_use_avg_color"
|
||||
android:title="@string/pref_title_use_avg_color"
|
||||
android:summary="@string/pref_summary_use_avg_color" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory
|
||||
android:title="@string/pref_group_general">
|
||||
|
||||
<CheckBoxPreference
|
||||
android:defaultValue="@bool/pref_default_boot"
|
||||
android:key="@string/pref_key_boot"
|
||||
android:title="@string/pref_title_boot"
|
||||
android:summary="@string/pref_summary_boot" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
</PreferenceScreen>
|
||||
@@ -0,0 +1 @@
|
||||
// AndroidX versions are managed in build.gradle files
|
||||