Skip to content

Commit

Permalink
Merge pull request #7 from ricohapi/bugfix/v1.2.1
Browse files Browse the repository at this point in the history
bugfix and add description of VIDEO_PREVIEW_SWITCH parameter
  • Loading branch information
KATSUYA2 authored Oct 18, 2022
2 parents dcb9a7d + c314bbf commit e659a9d
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 6 deletions.
15 changes: 13 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# THETA X Plug-in : Camera API Sample

Version: 1.2.0
Version: 1.2.1

This sample project shows how to implement a plug-in using Camera API for RICOH THETA X.
The program language is Kotlin, please checkout [java branch](https://github.com/ricohapi/theta-plugin-camera-api-sample-x/tree/java) to see Java code.
Expand Down Expand Up @@ -42,7 +42,7 @@ The program language is Kotlin, please checkout [java branch](https://github.com

### Supported Device

* RICOH THETA X (Version 1.00.2, 1.10.1, 1.20.0)
* RICOH THETA X (Version 1.00.2, 1.10.1, 1.20.0, 1.30.0)
* RICOH THETA V and Z1 are NOT supported.

### Development Environment
Expand Down Expand Up @@ -220,6 +220,17 @@ The program language is Kotlin, please checkout [java branch](https://github.com
| QUALITY_6K | 0x0E | 128_000 | 1 | 3(AAC) | 48_000 | 1500 | 2(MPEG_4) | 1 | 64_000_000 | 2(H264) | 2880 | 5760 | 30 |
| QUALITY_8K | 0x0D | 128_000 | 1 | 3(AAC) | 48_000 | 1500 | 2(MPEG_4) | 1 | 64_000_000 | 2(H264) | 3840 | 7680 | 10 |

* Tips : You can disable showing liveview picture during video recording by setting following Camera.Parameter.

```java
/**
* @brief disable generating liveview picture during video recording, e.g. to reduce power.
* @value 0 : enable (default)
* 1 : disable
*/
p.set(Camera.Parameters.VIDEO_PREVIEW_SWITCH, 0)
```

### Low power preview mode (available Version 1.20.0 or later)

* Preview will run at 15 fps as low power mode by setting preview frame rate to zero like following.
Expand Down
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ android {
applicationId "com.theta360.sample.camera"
minSdkVersion 26
targetSdkVersion 29
versionCode 4
versionName "1.2.0"
versionCode 5
versionName "1.2.1"

testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
Expand Down
5 changes: 3 additions & 2 deletions app/src/main/java/com/theta360/sample/camera/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -432,15 +432,15 @@ class MainActivity : PluginActivity(), MediaRecorder.OnInfoListener {
//FYI: use setProfile to set configuration easily
val shooting_mode: String = findViewById<Spinner>(R.id.spinner_ric_shooting_mode_video).selectedItem.toString()
when (shooting_mode) {
"RicVideoRecording1920" -> {
"RicMovieRecording1920" -> {
setProfile(CamcorderProfile.get(CamcorderProfile.QUALITY_2K))
setVideoEncodingIFrameInterval(1.0f)
}
"RicMovieRecording3840" -> {
setProfile(CamcorderProfile.get(CamcorderProfile.QUALITY_4K))
setVideoEncodingIFrameInterval(1.0f)
}
"RicVideoRecording5760" -> {
"RicMovieRecording5760" -> {
setProfile(CamcorderProfile.get(CamcorderProfile.QUALITY_6K))
setVideoEncodingIFrameInterval(1.0f)
}
Expand Down Expand Up @@ -528,6 +528,7 @@ class MainActivity : PluginActivity(), MediaRecorder.OnInfoListener {
}
MODE.VIDEO -> {
p.set(RIC_SHOOTING_MODE, ric_shooting_mode_video)
p.set(Camera.Parameters.VIDEO_PREVIEW_SWITCH, 0)
}
}

Expand Down

0 comments on commit e659a9d

Please sign in to comment.