|
- int iDir = this.playerInfo.getiAVStreamDir();
- // 当前设备媒体最大能力
- if (this.playerInfo.getiAVStreamDir() != -1) {
- if (iDir != 0) {
- if ((iDir & BVCU_MediaDir.BVCU_MEDIADIR_AUDIORECV) == BVCU_MediaDir.BVCU_MEDIADIR_AUDIORECV && (iDir & BVCU_MediaDir.BVCU_MEDIADIR_VIDEORECV) == BVCU_MediaDir.BVCU_MEDIADIR_VIDEORECV) {
- iDir = 10;
- }
- }
- }
- BVCU_DialogInfo dialogInfo = new BVCU_DialogInfo();
- dialogInfo.stParam = new BVCU_DialogParam();
- dialogInfo.stParam.iTargetCount = 1;
- dialogInfo.stParam.pTarget = new BVCU_DialogTarget[1];
- dialogInfo.stParam.pTarget[0] = new BVCU_DialogTarget();
- dialogInfo.stParam.pTarget[0].iIndexMajor = this.playerInfo.getTargetIndex();
- dialogInfo.stParam.pTarget[0].iIndexMinor = -1;
- dialogInfo.stParam.pTarget[0].szID = this.playerInfo.getPUID();
- dialogInfo.stParam.iAVStreamDir = iDir;
- dialogInfo.stControlParam = new BVCU_DialogControlParam();
- dialogInfo.stControlParam.stRender = new BVCU_DialogControlParam_Render();
- //配置streamPlayerSurfaceHolder
- dialogInfo.stControlParam.stRender.hWnd = streamPlayerSurfaceHolder.getSurface();
- BVCU_Display_Param display_param = new BVCU_Display_Param();
- display_param.fMulZoom = 1;
- display_param.iAngle = 270;
- dialogInfo.stControlParam.stRender.stDisplayParam = display_param;
- int videoToken = BVCU.getSDK().openDialog(dialogInfo);
- this.playerInfo.setVideoToken(videoToken);
- Log.d(TAG, "surfaceCreated");
- // if (videoToken1 != 0 && videoToken1 != -1) {
- BVCU.getSDK().controlDialog(videoToken, dialogInfo.stControlParam);
- Log.i(TAG, "SurfaceView1 width=" + streamPlayerSurfaceView.getWidth() + ", height=" + streamPlayerSurfaceView.getHeight());
- streamPlayerLoading.setVisibility(View.GONE);
copycode
|
|