Example #1
0
 public VideoRenderer(AllocatorPresenter allocator)
     : base(allocator)
 {
     _updateQueue.Enqueue(new FrameVideo(1, 1, 1));
     _updateQueue.Enqueue(new FrameVideo(1, 1, 1));
     _updateQueue.Enqueue(new FrameVideo(1, 1, 1));
 }
Example #2
0
        public RenderVideo()
        {
            SetStyle(
                ControlStyles.Opaque | ControlStyles.UserPaint | ControlStyles.ResizeRedraw | ControlStyles.AllPaintingInWmPaint,
                true);

            var allocator = new AllocatorPresenter();

            _allocator            = allocator;
            _videoLayer           = new VideoRenderer(allocator);
            _osdLayer             = new OsdRenderer(allocator);
            _iconLayer            = new IconRenderer(allocator);
            _videoLayer.IsVisible = true;

            _allocator.Register(_videoLayer);
            _allocator.Register(_osdLayer);
            _allocator.Register(_iconLayer);

            _allocator.PresentCompleted += AllocatorPresenter_OnPresentCompleted;

            IsSyncSupported = true;
            VideoFilter     = VideoFilter.None;
            ScaleMode       = ScaleMode.FixedPixelSize;
        }
Example #3
0
 public IconRenderer(AllocatorPresenter allocator)
     : base(allocator)
 {
 }
Example #4
0
 public OsdRenderer(AllocatorPresenter allocator)
     : base(allocator)
 {
 }
Example #5
0
 public RendererBase(AllocatorPresenter allocator)
 {
     Allocator = allocator;
 }