THETA X - SDK - Camera API Examples and Documentation Status

Stream does come out as dual fisheye, but not only that, like there is only 1 lens coming through for some reason. not sure if some specific change is required, but this code works fine for Z1 as is. After testing a lot I realized that when I set preview size it will instantly exit with error:
E/AndroidRuntime: FATAL EXCEPTION: RenderThread
Process: tours.flow.hdrstreaming, PID: 7215
java.lang.RuntimeException: setParameters failed
at android.hardware.Camera.native_setParameters(Native Method)
at android.hardware.Camera.setParameters(Camera.java:2234)
at tours.flow.hdrstreaming.e.j.n(:253)
at tours.flow.hdrstreaming.e.j.e(:51)
at tours.flow.hdrstreaming.e.m$a.run(:115)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:214)
at tours.flow.hdrstreaming.e.m.m(:97)
at tours.flow.hdrstreaming.e.m.n(Unknown Source:0)
at tours.flow.hdrstreaming.e.e.run(Unknown Source:2)
at java.lang.Thread.run(Thread.java:919)

So I pulled supported preview sizes and 3840x1920 wasn’t there at all. I was playing with my HDR wireless live streamign plugin to see how easily to modify to support X, I would rather not expose the whole code.

Thanks!

1 Like

This information is all we need at the moment. Thank you for reporting this. I’ve included your problem into the agenda we have with a manager at RICOH.

I’ll also test the CameraAPI myself in the future.

2 Likes

hi, @craig,
I tested again, updated firmware of camera and used SDK 3.0.2. I would really need some help on this from Ricoh. can’t set preview size. On original Camera.java class would be useful if someone would modify it’s code to make a working preview of camera on Theta X. Thanks!

I’ve added this to the Thursday (tomorrow) agenda with a RICOH manager. I’m also linking to this discussion so a wider group of people at RICOH can understand that the question is coming from a serious developer (you) in the community.

Thanks, @craig ,
I spent some time looking into pluginlibrary too and noticed also there are classes like import android.hardware.Camera; used by me currently and in official Ricohs live streaming plugin the same class is used to open and set parameters of the camera. However I pluginlibrary/sdk there are also camera classes like theta360.hardware.Camera; or com.theta360.pluginlibrary.factory.Camera; is it possible that some special setup is needed to make it work? I found out by debugging that need to call method notificationCameraClose(); otherwise camera will not be able to connect to… Also I do not think this is documented anywhere at the moment. :frowning: Lot of these “small” findings are making impossible to proceed with Theta X…

I added the additional information you provided to the written report.

It’s possible that some special setup is needed. Though, I don’t know for sure. Just to let you know that you’re not alone, I have the same problems you are describing. I can make the plug-ins, but am having difficulty accessing all the camera resources. It seems like I need another class or package or some additional example of how to access the resources.

To be honest, I have been thinking that the problem was with my low programming skill, so I didn’t want to bring it up too aggressively.

However, if I guy with your experience is having problems, I think we need some additional information and possibly a tip to import another library class.

I think we both miss some information from Ricoh on this. Clearly it shouldn’t be required to build different apps, same Ricohs Wireless live streaming plugin works on both z1 and X, so it should work for us too, there are just some small code pieces missing, like that notificationcameraclose method I found earlier.

1 Like

@craig ,
also there is a github project by ricoh, created 1.5 month ago: ricohapi/theta-plugin-camera-api-sample-x · GitHub , wondering if it may help us with camera api? Why is it empty for so long? Could you please ask them to provide some information?

Thanks!

1 Like

@biviel we’re sending this thread to RICOH. Can if you have any more information that you’re having with SDK version 3.0.2 GitHub - ricohapi/theta-plugin-sdk: RICOH THETA Plug-in SDK and library version 3.0.2 GitHub - ricohapi/theta-plugin-library


Update

I received this advice:

Tips for using Camera API for X are following.

  1. import Plug-in Library (v3.0.0 or later).
  2. import com.theta360.hardware.Camera, etc. not com.android.hardware.Camera, for X. Because THETA X provides 360 camera related features via com.theta360 packages. This is very different point from THETA V/Z1.
  3. implement Camera API code, with referring to the upcoming sample code. Many APIs are designed to have same name and same interface as native com.android APIs.

I know the web API for the Theta X only went live at the end of February, but is there a timeline for when we can expect the Camera API (theta360.hardware.Camera.*) to be ready for use and documented? I have a pretty heavily-used internal plugin that we developed for the Z1 that I’d like to update for the X, but with the forked android.Camera → theta360.hardware.Camera API and the other hardware changes I’ve not yet been able to get it to run on the X.

We relied pretty heavily on the sample camera project (GitHub - ricohapi/theta-plugin-camera-api-sample: THETA Sample Plug-in: CameraAPI Capture Plugin) when developing the plugin, and I see that there is an empty equivalent sample for the X (ricohapi/theta-plugin-camera-api-sample-x · GitHub). Is there a timeline for when that sample project using the (new) Camera API to build plugins for the Theta X will be available? I’ve got a couple dozen fresh new Xs that are useless to me until we can get this plugin updated!

(Alternatively, has anyone here got a working plugin using the Camera API on the Theta X that they’d be willing to let me have a peek at? Get in touch if so!)

@tfountain , I merged the topic with the original one from Laszlo (@biviel ) . I will try and get more information on the status of theta-plugin-camera-api-sample-x

I am in communication with the head developer and definitely know the team is working on this.

hi, @craig , @jcasman ,

there is now a sample for camera api, posted by Ricoh: GitHub - ricohapi/theta-plugin-camera-api-sample-x: THETA X Plug-in : Camera API Sample

I will start looking into it ASAP.

Regards

1 Like

We have the THETA X Sample Plug-in working in our office.

2 Likes

@craig, @jcasman ,
I forgot to highlight and say thank you, both of you, for asking(forcing) Ricoh to provide this example ASAP! :slight_smile: Thank you!

2 Likes

thanks. Note that the developer at RICOH is super cooperative and wanted to share it. He was working at 2am on vacation. All Jesse and I did was to point out your post in the forum and also the post from Trevor. It’s really your voice as a voice of a experienced developer that is moving things along. If the people at RICOH can see that there’s a real need from real developers like you, it helps to set priorities. Your tests and listing of requirements were very useful as you were willing to post in the forum and it is easy for us to share a link to the forum.

2 Likes

Please forward my THANKS to that Ricoh developer if you are in direct connection with him!

1 Like

hi!

I spent some time analyzing the example and trying to make changes in my HDR wireless live streaming plugin to make it work for Theta X too. I got runtime exceptions and I couldn’t make it run properly by using the new theta360.camera class. Mainly seems that there is a conceptual change and at Camera.open we need to pass application context too, which isn’t clear for me why? Anyway I will have to spend probably much more time because of these changes in SDK/API… I’m able to run camera in dual fisheye mode, but unable to control the camera properly, probably it would make sense if I download the full source code of plugin library and try to debug there and not using it by reference in build.gradle.

Will come back and update you here, once I’ve more clarity and have some time to play with.

We’re hoping to get the source code for the RICOH Wireless Live Streaming plug-in that works on the X. However, I think the delay might be due to required checks for legal compliance on the licenses.

1 Like

Regarding Theta X - would like to share an important information. Using Vysor, I managed to switch to Android OS Settings:

With adb command: adb shell am start -a android.settings.SETTINGS

This was we can go and open Apps and grant required permissions as we used to in earlier versions of Theta.

Regards

1 Like

Looks like version 1.2.0 of theta-plugin-camera-api-sample-x was just released.

Is it really streaming at 8K?

dual-fish streaming

1 Like