Skip to content
This repository was archived by the owner on May 29, 2025. It is now read-only.

Commit 9c19ed9

Browse files
Merge pull request #7 from ricohapi/bugfix/v1.2.3
Fix Dynamic Stitching and Zenith Correction issue for THETA X
2 parents 62c4883 + e85393b commit 9c19ed9

File tree

16 files changed

+83
-120
lines changed

16 files changed

+83
-120
lines changed

.idea/gradle.xml

Lines changed: 3 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

Lines changed: 0 additions & 14 deletions
This file was deleted.

.idea/runConfigurations.xml

Lines changed: 0 additions & 12 deletions
This file was deleted.

README.md

Lines changed: 35 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,40 @@
1-
# Wireless Live Streaming plug-in
1+
# Wireless Live Streaming Plugin
22

3-
Version: 1.2.2
4-
5-
Wireless Live Streaming plug-in can stream live 360 movie to RTMP server (e.g. YouTube) directly from RICOH THETA.
3+
## Overview
4+
Wireless Live Streaming Plugin can stream live 360 movie to YouTube via RTMP directly from RICOH THETA.
65

76
## History
8-
* Version 1.2.2 (2022/09/06): Following settings are added for THETA X 1.20 or later.
9-
・4K (3840 x 2160) 15FPS
10-
・2K (1920 x 1080) 15FPS
11-
・1K (1024 x 576) 15FPS
12-
* Version 1.2.1 (2022/05/26): Support THETA X.
13-
* Version 1.1.4 (2021/11/02): Removed bitrate measurement function.
14-
RTMPS is supported.
15-
Added 44.8KHz audio sample rate.
16-
* Version 1.1.1 (2019/05/08): THETA Z1 is supported.
17-
* Version.1.0.9 (2018/07/23): Initial version.
18-
19-
## Development Environment
20-
21-
* RICOH THETA X (Version 1.20.0)
22-
* RICOH THETA Z1 (Version 2.10.3)
23-
* RICOH THETA V (Version 3.80.2)
24-
25-
Tips : How to update your RICOH THETA firmware:
26-
> * [THETA X](https://support.theta360.com/en/manual/x/content/update/update_01.html)
27-
> * [THETA Z1](https://support.theta360.com/en/manual/z1/content/update/update_01.html)
28-
> * [THETA V](https://support.theta360.com/en/manual/v/content/update/update_01.html)
7+
* ver 1.2.3 (2023/04/18): Bugfix related to dynamic stitching and zenith correction for THETA X.
8+
* ver 1.2.2 (2022/09/06): Following settings are added for THETA X 1.20 or later.
9+
* 4K (3840 x 2160) 15FPS
10+
* 2K (1920 x 1080) 15FPS
11+
* 1K (1024 x 576) 15FPS
12+
* ver 1.2.0 (2022/02/21): Support THETA X.
13+
* ver 1.1.4 (2021/11/02):
14+
* Removed bitrate measurement function.
15+
* RTMPS is supported.
16+
* Added 44.8KHz audio sample rate.
17+
* ver 1.1.1 (2019/05/08): THETA Z1 is supported.
18+
* ver.1.0.9 (2018/07/23): Initial version.
19+
20+
## Requirement
21+
22+
### Supported Device
23+
24+
* RICOH THETA X Version 2.00.0
25+
* RICOH THETA Z1 Version 2.30.1
26+
* RICOH THETA V Version 3.82.1
27+
28+
### Development Environment
29+
30+
* Android Studio Chipmunk | 2021.2.1 Patch 2
31+
* Windows 10 Version 21H2
32+
* macOS Version 13.2.1 Ventura
33+
* Gradle Plugin Version 4.2.2
34+
* Gradle Version 6.7.1
35+
* compileSdkVersion 29
36+
* minSdkVersion 25
37+
* targetSdkVersion 25
2938

3039
## Install
3140
Android Studio installs apk after building automatically. Or use the following command after build.
@@ -34,14 +43,12 @@ Android Studio installs apk after building automatically. Or use the following c
3443
adb install -r app-debug.apk
3544
```
3645

37-
### Give permissions for this plug-in. (THETA V/Z1 only)
46+
### Give permissions for this plug-in.
3847

3948
Using desktop viewing with an app as Vysor, open Settings app and turns on the permissions at "Apps"> "Wireless Live Streaming"> "Permissions"
4049

4150
## How to Use
4251

43-
See also [this article](https://www.thetalab.ricoh/plugin/wireless-live-streaming/) of THETA Lab., how to use Wireless LIVE Streaming plug-in.
44-
4552
If "stream name" can be used repeatedly, plug-in settings (input of "stream name" and "primary server URL") are required only once at the beginning. In this case, you can start streaming just by pressing the shutter button after setting streaming events on YouTube.
4653

4754
The following steps are for the first use.

app/build.gradle

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
apply plugin: 'com.android.application'
22

33
android {
4-
compileSdkVersion 30
5-
buildToolsVersion project.ANDROID_BUILD_TOOLS_VERSION
4+
compileSdkVersion 29
65

76
defaultConfig {
87
applicationId "com.theta360.cloudstreaming"
9-
minSdkVersion Integer.parseInt(project.ANDROID_BUILD_MIN_SDK_VERSION)
10-
targetSdkVersion Integer.parseInt(project.ANDROID_BUILD_TARGET_SDK_VERSION)
11-
versionCode 9
12-
versionName "1.2.2"
8+
minSdkVersion 25
9+
targetSdkVersion 29
10+
versionCode 10
11+
versionName "1.2.3"
1312

1413
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
1514
}

app/src/main/java/com/theta360/cloudstreaming/MainActivity.java

Lines changed: 15 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -548,9 +548,6 @@ protected void onStop() {
548548
if (settingPolling != null) {
549549
settingPolling.exit();
550550
}
551-
if (scheduleStreaming != null) {
552-
scheduleStreaming.exit();
553-
}
554551
if (delayJudgmentService != null) {
555552
delayJudgmentService.shutdownNow();
556553
}
@@ -820,52 +817,35 @@ private void createScheduleStreaming() {
820817
scheduleStreaming = new ScheduleStreaming();
821818

822819
try {
823-
scheduleStreamingService = Executors.newSingleThreadExecutor();
824-
scheduleStreamingService.execute(scheduleStreaming);
820+
scheduleStreaming.run();
825821
} catch (Exception e) {
826822
e.printStackTrace();
827823
unexpectedError("E002");
828-
} finally {
829-
scheduleStreamingService.shutdown();
830824
}
831825
}
832826

833-
private class ScheduleStreaming implements Runnable {
834-
private boolean isScheduleStreaming = false;
835-
private String measureServerUrl;
836-
private String measureStreamName;
837-
private int measureWidth = 0;
838-
private int measureHeight = 0;
839-
private boolean isExit = false;
827+
private class ScheduleStreaming {
828+
private boolean isDuringStartStop = false;
840829

841830
// Schedule streaming
842831
public void setSchedule() {
843-
isScheduleStreaming = true;
844-
}
845-
846-
/**
847-
* End thread
848-
*/
849-
public void exit() {
850-
isExit = true;
832+
run();
851833
}
852834

853-
@Override
854835
public void run() {
855-
while(!isExit) {
856836

857-
// Ignore streaming instructions during streaming preparation.
858-
if (!isScheduleStreaming) {
859-
continue;
860-
}
837+
// Ignore streaming instructions during streaming preparation.
838+
if (isDuringStartStop) {
839+
return;
840+
}
861841

862-
try {
863-
streaming();
864-
} catch (Exception e) {
865-
Timber.i("ScheduleStreaming : " + e.getMessage());
866-
} finally {
867-
isScheduleStreaming = false;
868-
}
842+
try {
843+
isDuringStartStop = true;
844+
streaming();
845+
} catch (Exception e) {
846+
Timber.i("ScheduleStreaming : " + e.getMessage());
847+
} finally {
848+
isDuringStartStop = false;
869849
}
870850
}
871851
}

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ buildscript {
99
jcenter()
1010
}
1111
dependencies {
12-
classpath 'com.android.tools.build:gradle:4.0.2'
12+
classpath 'com.android.tools.build:gradle:4.2.2'
1313
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1414

1515
// NOTE: Do not place your application dependencies here; they belong

gradle.properties

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,6 @@ android.injected.testOnly=false
2222
org.gradle.parallel=true
2323
org.gradle.configureondemand=true
2424

25-
ANDROID_BUILD_SDK_VERSION=27
26-
ANDROID_BUILD_TOOLS_VERSION=28.0.3
27-
ANDROID_BUILD_MIN_SDK_VERSION=25
28-
ANDROID_BUILD_TARGET_SDK_VERSION=25
2925
ANDROID_SUPPORT_VERSION=27.1.1
3026

3127
TIMBER_VERSION=4.6.0
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Thu May 26 16:21:37 JST 2022
1+
#Tue Apr 18 10:58:17 JST 2023
22
distributionBase=GRADLE_USER_HOME
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.9.4-bin.zip
44
distributionPath=wrapper/dists
55
zipStorePath=wrapper/dists
66
zipStoreBase=GRADLE_USER_HOME

pedroLibrary/encoder/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ android {
1616
consumerProguardFiles 'proguard-rules.pro'
1717
}
1818
}
19-
buildToolsVersion '28.0.3'
2019

2120
afterEvaluate {
2221
publishing {

0 commit comments

Comments
 (0)