Пример #1
0
        private VideoTrack CreateVideoTrack(IVideoCapturer videoCapturer)
        {
            _surfaceTextureHelper = SurfaceTextureHelper.Create("CaptureThread", _eglBase.EglBaseContext);

            _videoSource = _factory.CreateVideoSource(true);
            videoCapturer.Initialize(_surfaceTextureHelper, _context, _videoSource.CapturerObserver);
            videoCapturer.StartCapture(VideoWidth, VideoHeight, 30);

            _localVideoTrack = _factory.CreateVideoTrack("ARDAMSv0", _videoSource);
            _localVideoTrack.SetEnabled(true);
            _localVideoTrack.AddSink(_localVideoSink);
            return(_localVideoTrack);
        }
 public PlatformVideoCapturer(Context context, VideoSource videoSource, IVideoCapturer videoCapturer, IEglBaseContext eglBaseContext) : base(videoCapturer)
 {
     _videoCapturer        = videoCapturer;
     _surfaceTextureHelper = SurfaceTextureHelper.Create("VIDEO CAPTURE THREAD", eglBaseContext);
     _videoCapturer.Initialize(_surfaceTextureHelper, context, videoSource.CapturerObserver);
 }