I google my question but can't find something to help me to solve my problem. So excuse me if this question is a duplicate.
In my app, I use the sdk ooVoo that use it's own VideoRenderer.
My problem is that the camera preview is not in the right orientation.
I forced my activity to have the orientation Landscape (because my app is meant to be played only on glasses).
For the moment, the SurfaceView of my camera preview have an offset of 90 degrees.
So I tried to call the setRotation(-90)
method of the surfaceView but it translate the preview.
I also tried to setPivot in onStart
to be sure that I could use getX()
from surfaceView.
Here is a preview of the activity with a call of setRotation(-10)
(because setRotation(-90)
give me a black square) : ScreenShot
Do you know what I do wrong ?
PS : Here is the code
public class ConferenceActivity extends Activity
{
private static final String LOGTAG = "ConferenceActivity";
SurfaceView myCameraView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Log.w(LOGTAG, "onCreate");
setContentView(R.layout.activity_conference);
myCameraView = (SurfaceView)findViewById(R.id.myVideoSurface);
myCameraView.setRotation(-10);
}
...
}
[EDIT]
As mentioned by a developer of the ooVoo team, I changed the SurfaceView by a GLSurfaceView.
But I still have the same problem of the 90 degree offset of the the view.