Ejemplo n.º 1
0
            //JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
            //ORIGINAL LINE: public void addRenderCallback(@NonNull IRenderCallback callback)
            public void AddRenderCallback(IRenderView_IRenderCallback callback)
            {
                mRenderCallbackMap[callback] = callback;

                IRenderView_ISurfaceHolder surfaceHolder = null;

                if (mSurfaceHolder != null)
                {
                    if (surfaceHolder == null)
                    {
                        SurfaceRenderView t = null;
                        mWeakSurfaceView.TryGetTarget(out t);
                        surfaceHolder = new InternalSurfaceHolder(t, mSurfaceHolder);
                    }
                    callback.onSurfaceCreated(surfaceHolder, mWidth, mHeight);
                }

                if (mIsFormatChanged)
                {
                    if (surfaceHolder == null)
                    {
                        SurfaceRenderView t = null;
                        mWeakSurfaceView.TryGetTarget(out t);
                        surfaceHolder = new InternalSurfaceHolder(t, mSurfaceHolder);
                    }
                    callback.onSurfaceChanged(surfaceHolder, mFormat, mWidth, mHeight);
                }
            }
Ejemplo n.º 2
0
            public void SurfaceDestroyed(ISurfaceHolder holder)
            {
                mSurfaceHolder   = null;
                mIsFormatChanged = false;
                mFormat          = 0;
                mWidth           = 0;
                mHeight          = 0;
                SurfaceRenderView t = null;

                mWeakSurfaceView.TryGetTarget(out t);
                IRenderView_ISurfaceHolder surfaceHolder = new InternalSurfaceHolder(t, mSurfaceHolder);

                foreach (IRenderView_IRenderCallback renderCallback in mRenderCallbackMap.Keys)
                {
                    renderCallback.onSurfaceDestroyed(surfaceHolder);
                }
            }
Ejemplo n.º 3
0
            public void SurfaceChanged(ISurfaceHolder holder, [GeneratedEnum] Format format, int width, int height)
            {
                mSurfaceHolder   = holder;
                mIsFormatChanged = true;
                mFormat          = (int)format;
                mWidth           = width;
                mHeight          = height;

                // mMeasureHelper.setVideoSize(width, height);
                SurfaceRenderView t = null;

                mWeakSurfaceView.TryGetTarget(out t);
                IRenderView_ISurfaceHolder surfaceHolder = new InternalSurfaceHolder(t, mSurfaceHolder);

                foreach (IRenderView_IRenderCallback renderCallback in mRenderCallbackMap.Keys)
                {
                    renderCallback.onSurfaceChanged(surfaceHolder, (int)format, width, height);
                }
            }
Ejemplo n.º 4
0
 //JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
 //ORIGINAL LINE: public SurfaceCallback(@NonNull SurfaceRenderView surfaceView)
 public SurfaceCallback(SurfaceRenderView surfaceView)
 {
     mWeakSurfaceView = new WeakReference <SurfaceRenderView>(surfaceView);
 }
Ejemplo n.º 5
0
 //JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
 //ORIGINAL LINE: public InternalSurfaceHolder(@NonNull SurfaceRenderView surfaceView, @Nullable android.view.SurfaceHolder surfaceHolder)
 public InternalSurfaceHolder(SurfaceRenderView surfaceView, ISurfaceHolder surfaceHolder)
 {
     mSurfaceView   = surfaceView;
     mSurfaceHolder = surfaceHolder;
 }