第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

Android相機(jī)無(wú)法使用。startPreview失敗

Android相機(jī)無(wú)法使用。startPreview失敗

Android相機(jī)無(wú)法使用。startPreview失敗這是Activity類(lèi):public class NightCamActivity extends Activity {     private GLSurfaceView mGLView;     CameraSurfaceView surface_view;     @Override     public void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         // Create a GLSurfaceView instance and set it         // as the ContentView for this Activity         Debug.out("Welcome");         surface_view = new CameraSurfaceView(this);         mGLView = new MySurfaceView(this);         setContentView(mGLView);         addContentView(surface_view, new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));     }     @Override     protected void onPause() {         super.onPause();         // The following call pauses the rendering thread.         // If your OpenGL application is memory intensive,         // you should consider de-allocating objects that         // consume significant memory here.         mGLView.onPause();     }     @Override     protected void onResume() {         super.onResume();         // The following call resumes a paused rendering thread.         // If you de-allocated graphic objects for onPause()         // this is a good place to re-allocate them.         mGLView.onResume();     }}MySurfaceView類(lèi):class MySurfaceView extends GLSurfaceView{     public MySurfaceView(NightCamActivity context){         super(context);         // Create an OpenGL ES 2.0 context.         Debug.out("Mysurfaceview welcome");         setEGLContextClientVersion(2);         // Set the Renderer for drawing on the GLSurfaceView         MyRenderer renderer = new MyRenderer();         renderer.takeContext(context);         context.surface_view.renderer = renderer;         setRenderer(renderer);     }}
查看完整描述

3 回答

?
天涯盡頭無(wú)女友

TA貢獻(xiàn)1831條經(jīng)驗(yàn) 獲得超9個(gè)贊

我有同樣的問(wèn)題,刪除/播放預(yù)覽大小設(shè)置對(duì)我不起作用。我通過(guò)下一行代碼修復(fù)它:

mHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);

現(xiàn)在它對(duì)我來(lái)說(shuō)很好!


查看完整回答
反對(duì) 回復(fù) 2019-08-27
  • 3 回答
  • 0 關(guān)注
  • 1247 瀏覽
慕課專(zhuān)欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)