saki4510t / UVCCamera

library and sample to access to UVC web camera on non-rooted Android device
3.02k stars 1.21k forks source link

Screen Orientation error #137

Open JadeSparkle opened 7 years ago

JadeSparkle commented 7 years ago

Hello.I have problem with 90 degrees of Screen rotation. When I use 'setRequestedOrientation', the camer view is stop. Using network debug , the following message appeared : [SurfaceTexture-1-17555-5] connect(P): BufferQueue has been abandoned There is no error the app rotates 180 degrees. (landscape -> reverse landscape , portrait -> reverse portrait ) Could you please help me?

JadeSparkle commented 7 years ago

I solved the problem myself.
I removed the code below, But I don't know how/why it works.

This is 'onSurfaceTextureSizeChanged' method

UVCCameraTextureView. java

    if (mRenderHandler != null) {
        mRenderHandler.resize(width, height);
    }
    if (mCallback != null) {
        mCallback.onSurfaceChanged(this, getSurface(), width, height);
    }