Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.4'
classpath 'com.android.tools.build:gradle:3.5.2'
}
}

Expand All @@ -24,11 +24,11 @@ task clean(type: Delete) {
}

ext {
supportLibVersion = '27.1.1' // variable that can be referenced to keep support libs consistent
commonLibVersion= '2.12.4'
versionBuildTool = '27.0.3'
versionCompiler = 27
versionTarget = 27
androidXVersion = '1.1.0'
commonLibVersion= '4.1.1'
versionBuildTool = '29.0.2'
versionCompiler = 29
versionTarget = 28
versionNameString = '1.0.0'
javaSourceCompatibility = JavaVersion.VERSION_1_8
javaTargetCompatibility = JavaVersion.VERSION_1_8
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip
10 changes: 3 additions & 7 deletions libuvccamera/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ android {
}

defaultConfig {
minSdkVersion 14
minSdkVersion 18
targetSdkVersion versionTarget
}

Expand Down Expand Up @@ -86,10 +86,6 @@ clean.dependsOn 'ndkClean'
dependencies {
implementation fileTree(dir: new File(buildDir, 'libs'), include: '*.jar')

implementation "com.android.support:support-v4:${supportLibVersion}"
implementation "com.android.support:support-annotations:${supportLibVersion}"

implementation("com.serenegiant:common:${commonLibVersion}") {
exclude module: 'support-v4'
}
implementation "androidx.appcompat:appcompat:${androidXVersion}"
implementation "com.serenegiant:common:${commonLibVersion}"
}
4 changes: 0 additions & 4 deletions libuvccamera/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,4 @@
android:versionCode="2"
android:versionName="1.1" >

<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="22" />

</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,13 @@
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.support.annotation.NonNull;
import android.support.annotation.StringRes;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.widget.Toast;

import androidx.annotation.NonNull;
import androidx.annotation.StringRes;
import androidx.appcompat.app.AppCompatActivity;

import com.serenegiant.dialog.MessageDialogFragmentV4;
import com.serenegiant.utils.BuildCheck;
import com.serenegiant.utils.HandlerThreadHandler;
Expand Down Expand Up @@ -214,7 +215,7 @@ public void run() {
*/
@SuppressLint("NewApi")
@Override
public void onMessageDialogResult(final MessageDialogFragmentV4 dialog, final int requestCode, final String[] permissions, final boolean result) {
public void onMessageDialogResult(@NonNull MessageDialogFragmentV4 dialog, final int requestCode, @NonNull String[] permissions, final boolean result) {
if (result) {
// メッセージダイアログでOKを押された時はパーミッション要求する
if (BuildCheck.isMarshmallow()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,12 @@
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.support.annotation.NonNull;
import android.support.annotation.StringRes;
import android.util.Log;
import android.widget.Toast;

import androidx.annotation.NonNull;
import androidx.annotation.StringRes;

import com.serenegiant.dialog.MessageDialogFragment;
import com.serenegiant.utils.BuildCheck;
import com.serenegiant.utils.HandlerThreadHandler;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,6 @@
import android.widget.CheckedTextView;
import android.widget.Spinner;

import com.serenegiant.usb.DeviceFilter;
import com.serenegiant.usb.USBMonitor;

import com.serenegiant.uvccamera.R;

public class CameraDialog extends DialogFragment {
Expand Down Expand Up @@ -87,7 +84,6 @@ public CameraDialog(/* no arguments */) {
// Fragment need default constructor
}

@SuppressWarnings("deprecation")
@Override
public void onAttach(final Activity activity) {
super.onAttach(activity);
Expand Down Expand Up @@ -148,7 +144,7 @@ private final View initView() {
public void onResume() {
super.onResume();
updateDevices();
final Button button = (Button)getDialog().findViewById(android.R.id.button3);
final Button button = getDialog().findViewById(android.R.id.button3);
if (button != null) {
button.setOnClickListener(mOnClickListener);
}
Expand Down
2 changes: 1 addition & 1 deletion libuvccamera/src/main/jni/Application.mk
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@
#NDK_TOOLCHAIN_VERSION := 4.9

APP_PLATFORM := android-14
APP_ABI := armeabi armeabi-v7a x86 mips
APP_ABI := arm64-v8a armeabi-v7a x86_64 x86
#APP_OPTIM := debug
APP_OPTIM := release
7 changes: 2 additions & 5 deletions usbCameraCommon/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,8 @@ android {
dependencies {
api fileTree(dir: 'libs', include: ['*.jar'])

implementation "com.android.support:support-v4:${supportLibVersion}"
implementation "com.android.support:support-annotations:${supportLibVersion}"
implementation "androidx.appcompat:appcompat:${androidXVersion}"
implementation "com.serenegiant:common:${commonLibVersion}"

implementation("com.serenegiant:common:${commonLibVersion}") {
exclude module: 'support-v4'
}
implementation project(':libuvccamera')
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
import com.serenegiant.usb.UVCCamera;
import com.serenegiant.widget.CameraViewInterface;

import java.io.FileNotFoundException;

public class UVCCameraHandlerMultiSurface extends AbstractUVCCameraHandler {
/**
* create UVCCameraHandlerMultiSurface, use MediaVideoEncoder, try MJPEG, default bandwidth
Expand Down Expand Up @@ -170,7 +172,11 @@ public void captureStill(final String path) {
public void run() {
synchronized (UVCCameraHandlerMultiSurface.this) {
if (mRendererHolder != null) {
mRendererHolder.captureStill(path);
try {
mRendererHolder.captureStill(path);
} catch (FileNotFoundException e) {
e.printStackTrace();
}
updateMedia(path);
}
}
Expand Down
9 changes: 3 additions & 6 deletions usbCameraTest/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ android {

defaultConfig {
applicationId "com.serenegiant.usbcameratest"
minSdkVersion 14
minSdkVersion 18
targetSdkVersion versionTarget
versionCode 8
versionName "3.00"
Expand All @@ -51,11 +51,8 @@ android {
dependencies {
api fileTree(dir: 'libs', include: ['*.jar'])

implementation "com.android.support:support-v4:${supportLibVersion}"
implementation "com.android.support:support-annotations:${supportLibVersion}"
implementation "androidx.appcompat:appcompat:${androidXVersion}"
implementation "com.serenegiant:common:${commonLibVersion}"

implementation("com.serenegiant:common:${commonLibVersion}") {
exclude module: 'support-v4'
}
implementation project(':libuvccamera')
}
2 changes: 1 addition & 1 deletion usbCameraTest/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
android:theme="@style/Theme.AppCompat.Light" >
<activity
android:name="com.serenegiant.usbcameratest.MainActivity"
android:label="@string/app_name" >
Expand Down
9 changes: 3 additions & 6 deletions usbCameraTest0/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ android {

defaultConfig {
applicationId "com.serenegiant.usbcameratest0"
minSdkVersion 14
minSdkVersion 18
targetSdkVersion versionTarget
versionCode 8
versionName "3.00"
Expand All @@ -51,11 +51,8 @@ android {
dependencies {
api fileTree(dir: 'libs', include: ['*.jar'])

implementation "com.android.support:support-v4:${supportLibVersion}"
implementation "com.android.support:support-annotations:${supportLibVersion}"
implementation "androidx.appcompat:appcompat:${androidXVersion}"
implementation "com.serenegiant:common:${commonLibVersion}"

implementation("com.serenegiant:common:${commonLibVersion}") {
exclude module: 'support-v4'
}
implementation project(':libuvccamera')
}
2 changes: 1 addition & 1 deletion usbCameraTest0/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
android:theme="@style/Theme.AppCompat.Light" >
<activity
android:name="com.serenegiant.usbcameratest0.MainActivity"
android:label="@string/app_name" >
Expand Down
7 changes: 2 additions & 5 deletions usbCameraTest2/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,8 @@ android {
dependencies {
api fileTree(dir: 'libs', include: ['*.jar'])

implementation "com.android.support:support-v4:${supportLibVersion}"
implementation "com.android.support:support-annotations:${supportLibVersion}"
implementation "androidx.appcompat:appcompat:${androidXVersion}"
implementation "com.serenegiant:common:${commonLibVersion}"

implementation("com.serenegiant:common:${commonLibVersion}") {
exclude module: 'support-v4'
}
implementation project(':libuvccamera')
}
2 changes: 1 addition & 1 deletion usbCameraTest2/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
android:theme="@style/Theme.AppCompat.Light" >
<activity
android:name="com.serenegiant.usbcameratest2.MainActivity"
android:label="@string/app_name" >
Expand Down
7 changes: 2 additions & 5 deletions usbCameraTest3/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,9 @@ android {
dependencies {
api fileTree(dir: 'libs', include: ['*.jar'])

implementation "com.android.support:support-v4:${supportLibVersion}"
implementation "com.android.support:support-annotations:${supportLibVersion}"
implementation "androidx.appcompat:appcompat:${androidXVersion}"
implementation "com.serenegiant:common:${commonLibVersion}"

implementation("com.serenegiant:common:${commonLibVersion}") {
exclude module: 'support-v4'
}
implementation project(':libuvccamera')
implementation project(':usbCameraCommon')
}
2 changes: 1 addition & 1 deletion usbCameraTest3/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
android:theme="@style/Theme.AppCompat.Light" >
<activity
android:name="com.serenegiant.usbcameratest3.MainActivity"
android:screenOrientation="sensorLandscape"
Expand Down
7 changes: 2 additions & 5 deletions usbCameraTest4/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,9 @@ android {
dependencies {
api fileTree(dir: 'libs', include: ['*.jar'])

implementation "com.android.support:support-v4:${supportLibVersion}"
implementation "com.android.support:support-annotations:${supportLibVersion}"
implementation "androidx.appcompat:appcompat:${androidXVersion}"
implementation "com.serenegiant:common:${commonLibVersion}"

implementation("com.serenegiant:common:${commonLibVersion}") {
exclude module: 'support-v4'
}
implementation project(':libuvccamera')
implementation project(':usbCameraCommon')
}
2 changes: 1 addition & 1 deletion usbCameraTest4/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
android:theme="@style/Theme.AppCompat.Light" >
<activity
android:name=".MainActivity"
android:label="@string/app_name"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

package com.serenegiant.service;

import java.io.FileNotFoundException;
import java.io.IOException;
import java.lang.ref.WeakReference;
import java.lang.reflect.Field;
Expand Down Expand Up @@ -202,8 +203,12 @@ public void stopRecording() {

public void captureStill(final String path) {
if (mRendererHolder != null) {
mRendererHolder.captureStill(path);
sendMessage(obtainMessage(MSG_CAPTURE_STILL, path));
try {
mRendererHolder.captureStill(path);
sendMessage(obtainMessage(MSG_CAPTURE_STILL, path));
} catch (FileNotFoundException e) {
e.printStackTrace();
}
}
}

Expand Down
7 changes: 2 additions & 5 deletions usbCameraTest5/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,9 @@ android {
dependencies {
api fileTree(dir: 'libs', include: ['*.jar'])

implementation "com.android.support:support-v4:${supportLibVersion}"
implementation "com.android.support:support-annotations:${supportLibVersion}"
implementation "androidx.appcompat:appcompat:${androidXVersion}"
implementation "com.serenegiant:common:${commonLibVersion}"

implementation("com.serenegiant:common:${commonLibVersion}") {
exclude module: 'support-v4'
}
implementation project(':libuvccamera')
implementation project(':usbCameraCommon')
}
2 changes: 1 addition & 1 deletion usbCameraTest5/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
android:theme="@style/Theme.AppCompat.Light" >
<activity
android:name="com.serenegiant.usbcameratest5.MainActivity"
android:label="@string/app_name" >
Expand Down
7 changes: 2 additions & 5 deletions usbCameraTest6/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,9 @@ android {
dependencies {
api fileTree(dir: 'libs', include: ['*.jar'])

implementation "com.android.support:support-v4:${supportLibVersion}"
implementation "com.android.support:support-annotations:${supportLibVersion}"
implementation "androidx.appcompat:appcompat:${androidXVersion}"
implementation "com.serenegiant:common:${commonLibVersion}"

implementation("com.serenegiant:common:${commonLibVersion}") {
exclude module: 'support-v4'
}
implementation project(':libuvccamera')
implementation project(':usbCameraCommon')
}
2 changes: 1 addition & 1 deletion usbCameraTest6/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
android:theme="@style/Theme.AppCompat.Light" >
<activity
android:name="com.serenegiant.usbcameratest6.MainActivity"
android:label="@string/app_name"
Expand Down
7 changes: 2 additions & 5 deletions usbCameraTest7/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,9 @@ android {
dependencies {
api fileTree(dir: 'libs', include: ['*.jar'])

implementation "com.android.support:support-v4:${supportLibVersion}"
implementation "com.android.support:support-annotations:${supportLibVersion}"
implementation "androidx.appcompat:appcompat:${androidXVersion}"
implementation "com.serenegiant:common:${commonLibVersion}"

implementation("com.serenegiant:common:${commonLibVersion}") {
exclude module: 'support-v4'
}
implementation project(':libuvccamera')
implementation project(':usbCameraCommon')
}
Loading