CWAC-Camera now forces landscape - android

I made a prototype of a video recording app using CWAC-Camera version 0.4.2 a while back and I was able to record in portrait mode.
I'm now moving forward with the project and upgraded to the latest version 0.6.3 and if the device is not in landscape it throws an UnsupportedOperationException: Video recording supported only in landscape.
I'd like to use the library but don't want to force the user to landscape for recording. Do I have to implement my own CameraView? I can't seem to find any comments on why landscape is required.
Any guidance would be great.

I can't seem to find any comments on why landscape is required.
Because, AFAIK, portrait recording never worked. It certainly never worked when I tried it -- the recordings all came out landscape.
There is an outstanding issue to restore portrait recording, doing something on devices where the video comes out wrong. I expect to address that in the 0.7.0 timeframe. In the meantime, drop back to 0.6.2, where IIRC portrait recording, with all its flaws, was still allowed.

Related

Landscape orientation on Media pipe Android App.. The camera orientation is wrong once the app is set in landscape mode

I created media pipe android app. And remove the restrictions so that it can work in landscape. But the camera is rotated by 90 degrees in landscape mode. Is there any solution for this?
Yeah, You'll need to modify 3 files. I couldn't get it to work with Auto rotate but its working perfectly if you need it to be always on landscape. Look at the steps I mentioned here: https://github.com/google/mediapipe/issues/568#issuecomment-975439977

Why does my local video stream rotate during calls?

We have a native Android webrtc-based voip app. Only in our Android app (as opposed to other platforms), the local camera stream is rotated after being in a call for a while. Usually it takes about 10 seconds. But sometimes more, even as much as a minute.
The remote will get the stream rotated as well, so it's not a rendering issue.
The stream is always rotated 90 degrees clockwise in portrait orientation, but is correct in one landscape orientation and upside down in the other landscape orientation.
After a while, the stream will be rotated back to the correct orientation again (and back to bugged after a while again).
I've tried several revisions ranging from early 8xxx to the latest (9125), all have the same problem. Apprtc demo has the problem as well. I've tested on several different phones (although only Samsung devices) and the problem exists on all of them.
I was faced with the same issue and I didn't found a right solution, but there is a workaround. I found that the reason of the rotation is cpu overuse detection, it leads to changing quality and it seems there is some bug in this functionality in android implementation. So I just added peerConnectionConstraints.optional.add(new MediaConstraints.KeyValuePair("googCpuOveruseDetection", "false"));
and it prevented this rotation.

Change screen orientation in a Unity Google Cardboard project

I'm just starting a cardboard project as it's really joyful to experiment VR without any huge hardware, but I have a little problem which sounds really basic : the screen orientation. I just would have my game playable in Landscape Right instead of Left as I'm developing on my Xperia Z.
Usually screen orientation's problems are solved by forcing the orientation through the Player's Settings in the Build Menu. But here, the fact is that when I tick the "Landscape Right" box instead of the left one (which is the default setting of the Cardboard API) it correctly inverts my display but my camera stays at the same orientation as before.
From this results that my gyroscope works in reverse and that the ground is seen on the top, with all the texts reversed as well.
I've already done what Eldir tried here (Google cardboard device orientation) but as it wasn't the same problem I'm having, it wasn't efficient.
Do you have any ideas that if the API allows a quick change for this, or if I have to modify the whole parameters of the gyroscope ?
Thanks !

Camera is being rotated 90 degree in air for android

In my AS3 Flex Mobile application for Android, I am using camera and it is being automatically rotated 90 degrees before I even done any video rotation by myself, it seems like it's a known bug in AIR. But I was wondering if anyone found a solution since it's really pretty important feature for mobile application developer.
I've tried to do some rotation manually in my code, but it is only fixes the view on my display, but still sends the wrong video to the receiver.
If any code is required I will add the snippets
Please let me know.
As you mentioned, this is a known bug with AIR. It is not consistent, either. On some devices, it is in the correct orientation but in some (and all iOS devices, I believe, though I haven't fully tested that), it is rotated as you are seeing. For example, it was always oriented correctly on my Nexus 4 and on my Nexus 5, but a friends Moto X is rotated incorrectly.
Unfortunately, I don't believe there is anything you can do short of having the user do a calibration (i.e. overlay a straight line and tell them to place it horizontally and click a button) and rotating the camera display and any images you take with the display.
That being said, if you are using the camera to take photos, I highly recommend using CameraUI instead, which is the native implementation.
I've faced the same issue today but i'm developping in Java, not with AIR so i don't know if it the same, for me the solution was to add this line before starting the recording.
mMediaRecorder.setOrientationHint(90);

Zxing - Changing camera view -90 degrees

First of all, I would like to refer to this Issue on the google groups.
My problem is i want the landscape-native app to work in portrait mode. The way of getting the app into portrait mode is no problem at all, but when you display the app in portrait mode, my problem occurs.
When the Barcode Scanner is starting op, its camera view is (pr. default) at a +90 degree angle. When viewing the app in portrait mode the Barcode Scanner is (naturally) still at a +90 degree angle.
In the referred Issue-page there is displayed a hack to get around the problem, but this does not seem to work on most devices. This does also not work on my targeted devices.
I would like to hear if some of you have got a work around, or found the place in the source where you can 'undo' the 90 degree flipping?
A usable answer will be utmost appriciated :D Unfortunately i can't make progress in the project before this is solved. It is demanded to run in portrait mode ;)
In advance ... Thanks :)
I have implemented this in a private build. It is complicated and I can't share the details. The key steps are:
Call Camera.setDisplayOrientation() to counteract the rotation; see the Android javadoc for some discussion on that
Make sure that Camera.Parameters.setPreviewSize() is called correctly; preview sizes are reported in landscape but need to be set in portrait
(And guess what -- the default orientation of phones is considered portrait but tablets is considered landscape! Make sure you've accounted for that too.)
Finally, the preview data is always in landscape mode. You need to rotate it yourself to read it right-side-up, or otherwise account for that.

Categories

Resources