Java 类org.webrtc.PercentFrameLayout 实例源码

项目:anyRTC-RTCP-Android    文件:RTCVideoView.java   
public VideoView(String strPeerId, Context ctx, EglBase eglBase, int index, int x, int y, int w, int h, AnyRTCVideoLayout videoLayout) {
    this.strPeerId = strPeerId;
    this.index = index;
    this.x = x;
    this.y = y;
    this.w = w;
    this.h = h;
    this.mRTCVideoLayout = videoLayout;

    mLayout = new PercentFrameLayout(ctx);
    mLayout.setLayoutParams(new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.MATCH_PARENT));
    View view = View.inflate(ctx, R.layout.layout_top_right, null);

    mView = (SurfaceViewRenderer) view.findViewById(R.id.suface_view);
    btnClose = (ImageView) view.findViewById(R.id.img_close_render);
    mLocalCamera = (ImageView) view.findViewById(R.id.camera_off);
    mAudioImageView = (ImageView) view.findViewById(R.id.img_audio_close);
    mVideoImageView = (ImageView) view.findViewById(R.id.img_video_close);
    layoutCamera = (RelativeLayout) view.findViewById(R.id.layout_camera);
    mView.init(eglBase.getEglBaseContext(), null);
    mView.setLayoutParams(new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.MATCH_PARENT));
    mLayout.addView(view);
}
项目:anyRTC-Meeting-Android    文件:RTCVideoView.java   
public VideoView(String strPeerId, Context ctx, EglBase eglBase, int index, int x, int y, int w, int h, AnyRTCVideoLayout videoLayout) {
    this.strPeerId = strPeerId;
    this.index = index;
    this.x = x;
    this.y = y;
    this.w = w;
    this.h = h;
    this.mRTCVideoLayout = videoLayout;

    mLayout = new PercentFrameLayout(ctx);
    mLayout.setLayoutParams(new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.MATCH_PARENT));
    View view = View.inflate(ctx, org.anyrtc.meet_kit.R.layout.layout_top_right, null);

    mView = (SurfaceViewRenderer) view.findViewById(org.anyrtc.meet_kit.R.id.suface_view);
    btnClose = (ImageView) view.findViewById(org.anyrtc.meet_kit.R.id.img_close_render);
    mLocalCamera = (ImageView) view.findViewById(org.anyrtc.meet_kit.R.id.camera_off);
    mAudioImageView = (ImageView) view.findViewById(org.anyrtc.meet_kit.R.id.img_audio_close);
    mVideoImageView = (ImageView) view.findViewById(org.anyrtc.meet_kit.R.id.img_video_close);
    layoutCamera = (RelativeLayout) view.findViewById(org.anyrtc.meet_kit.R.id.layout_camera);
    mView.init(eglBase.getEglBaseContext(), null);
    mView.setLayoutParams(new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.MATCH_PARENT));
    mLayout.addView(view);
}
项目:anyRTC-P2P-Android    文件:RTCVideoView.java   
public VideoView(String strPeerId, Context ctx, EglBase eglBase, int index, int x, int y, int w, int h) {
            this.strPeerId = strPeerId;
            this.index = index;
            this.x = x;
            this.y = y;
            this.w = w;
            this.h = h;

            mLayout = new PercentFrameLayout(ctx);
//            mLayout.setBackgroundResource(R.drawable.background);
            mLayout.setLayoutParams(new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.MATCH_PARENT));
            View view = View.inflate(ctx, R.layout.layout_top_right, null);
            mView = (SurfaceViewRenderer) view.findViewById(R.id.suface_view);
            layoutCamera = (RelativeLayout) view.findViewById(R.id.layout_camera);
            mView.init(eglBase.getEglBaseContext(), null);
            mView.setLayoutParams(new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.MATCH_PARENT));
            mLayout.addView(view);
        }