我使用Flex英雄預發佈4.5,這是一個Android的Flex移動應用程序。旋轉原始相機(不只是視頻)在Android的空氣
我有一種情況,原始相機正在屏幕上顯示,並且正在網絡流中傳輸。顯然,現在在Android的AIR中,如果你只是使用縱向的原始相機,它實際上並沒有在縱向上拍攝相機...它的方向錯誤是90度。所以,這裏有一個代碼片段,我旋轉了視頻,它在手機上看起來很棒。但是,我需要將凸輪附加到網絡流上併發送它......但它會發送橫向視頻,並且我不想在遠端調整它。我無法將視頻附加到網絡流中......任何人都有什麼想法可以做,而不僅僅是等待AIR更新呢?
//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...
編輯:我知道我可以告訴遠端只是旋轉視頻對象其使用顯示橫向相機。但由於許多原因,這不是我想要接受的解決方案。希望adobe能儘快解決這個問題。但直到那時我只是好奇,如果有人知道我可以旋轉相機並將其附加到網絡流。
你應該問這在預發佈網站上。 – 2011-04-25 21:17:48
顯然我做到了。沒有反應。所以,我試圖傳播,看看我能否接觸到任何可能對這個主題有所瞭解的人。我也相信這個問題出現在面向公衆的捲餅預覽中。 – brybam 2011-04-25 21:44:16