• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Rotate RAW CAMERA (because its stuck sideways when in portrait(bug)) in air for android

Guest
Apr 24, 2011 Apr 24, 2011

Copy link to clipboard

Copied

I'm using the Flex Hero Pre-release 4.5 and this is Flex Mobile application for android.

I have a situation where the raw camera is being displayed on the screen and it's being transmitted in a netstream. Apparently right now in AIR for android if you’re simply using the raw camera in portrait it doesnt actually shoot the camera in portrait...it’s 90 degrees in the wrong direction. So, here’s a code snippet where i rotated the video and it looks great on the phone. however, i need to attach the cam to a netstream and send it...but it sends sideways video, and i dont really want to adjust it on the far end. and I can’t attach a video to a netstream...Anyone have any ideas what I could do rather than just waiting for an AIR update for this?

//i know i have width and height mixed up, its because im rotating it in a second and i dont want it to be stretched
                                nearVideo
= new Video(near_video.height,near_video.width);

var m:Matrix = new Matrix();
//rotate here
m
.rotate(Math.PI/2);
this.nearVideo.transform.matrix = m;
//repositioning it so it looks like its fitting in the container correctly
nearVideo
.x=near_video.width;
nearVideo
.y=(near_video.height-near_video.height);

if (Camera.isSupported)
{
nearCam
= Camera.getCamera();
}

nearCam
.setMode(near_video.height,near_video.width,10);
nearVideo
.attachCamera(nearCam);
near_video
.addChild(nearVideo);

//now its all great on screen...but when this comes up

sendStream
.attachCamera(nearCam);

//i’m sending sideways video...
TOPICS
Development

Views

9.0K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Apr 27, 2011 Apr 27, 2011

Copy link to clipboard

Copied

Alright, well this isn't getting anywhere. I created a bug report, so if you're reading this and you're frustrated with the camera simply not working correctly in portrait please vote up the bug report and lets get the camera fixed! thanks!

http://bugs.adobe.com/jira/browse/SDK-30317

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 10, 2012 Apr 10, 2012

Copy link to clipboard

Copied

Android 4.0 + AIR 3.2 still haven't this bug fixed.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Jun 03, 2012 Jun 03, 2012

Copy link to clipboard

Copied

I visited the link to the bug, but it says it's closed...  WRONG!!!  This issue STILL EXISTS!!   And on the iPhone, too... 

I'm running Flex 4.6 and iOS 5.1 on a 5th Generation iPod Touch and it's still there -- I get rotated video...  I've also tried it on my Droid Bionic, running Android 2.3.4 and the newest install of the AIR run-time available on the Marketplace -- same issue.

I'll try this rotation thing and see if that works...  I hope it won't screw up the QR-Codes I'm trying to read...

L.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Aug 13, 2012 Aug 13, 2012

Copy link to clipboard

Copied

+1

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 29, 2012 Aug 29, 2012

Copy link to clipboard

Copied

The issue still persists......I am dis-appointed......Can anybody tell me how this issue will be fixed?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Aug 29, 2012 Aug 29, 2012

Copy link to clipboard

Copied

Its actually not an issue but surely annoying.

The bitmap rotation is all corret, problem lies more in the device which adds rotation data into the image (look for as3 EXIF). But surely, its annoying, it would help out a lot if AIR could by default read the exif data and provide bitmapdata according to the rotation.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 01, 2012 Sep 01, 2012

Copy link to clipboard

Copied

I have fixed it in my own way......Use Orientation property of VideoDisplay object. The following code done the job for me

First add this listner in creationComplete event handler of the view

this.stage.addEventListener(StageOrientationEvent.ORIENTATION_CHANGE, Stage_OrientationChange);

then

private function Stage_OrientationChange(event:StageOrientationEvent):void

{

if (this.stage.deviceOrientation == StageOrientation.ROTATED_LEFT || this.stage.deviceOrientation == StageOrientation.ROTATED_RIGHT)

                    VideoDisplay1.rotation = 0;

          else

                    VideoDisplay1.rotation = -90;

}

Just Chillllllllll.................

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Sep 02, 2012 Sep 02, 2012

Copy link to clipboard

Copied

awesome, did allmost the same thing, tho my app was constant on portrait.

thanks for sharing!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jun 27, 2013 Jun 27, 2013

Copy link to clipboard

Copied

The only problem with this solution is that your only rotating the video itself, meaning that in this guys scenario its not useful because the video will not be rotated on the recieving end on that netstream.

The only solution i can think of would be to also broadcast to the recieving stream devices that the device has rotated, to allow them to also rotate their video objects.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jul 31, 2013 Jul 31, 2013

Copy link to clipboard

Copied

I dont know I''m checking back a month later to see if this is resolved..... this bug has probably existed long before this post was even created (April 26th, 2011).... Sad adobe, very sad

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Aug 04, 2013 Aug 04, 2013

Copy link to clipboard

Copied

This Issue is a known limitation for mobile devices, documented @ http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/media/Camera.html and it is not a Runtime Issue.

A bug is already logged for the same please refer: https://bugbase.adobe.com/index.cfm?event=bug&id=2881235 .

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Aug 06, 2013 Aug 06, 2013

Copy link to clipboard

Copied

I understand it is a known limitation, that was not my point.

My point is that lots of people want this problem to be solved, and even according to the bug you linked:

"... we are working on this issue to improve camera future.

Thanks

Shuo

Adobe "

August 10, 2011

it would be nice to have that is all

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jul 03, 2015 Jul 03, 2015

Copy link to clipboard

Copied

LATEST

Just FYI, its now 2015 and the problem still persists.... -__-

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines