Commit Graph

40 Commits

Author SHA1 Message Date
Cameron Gutman f8f5e8e869 Don't discard all excess frames before rendering
This prevents the render queue's pacing logic from working and
interferes with renderers that take a full v-sync period between
their waitToRender() and renderFrame() callbacks.
2022-04-24 17:04:32 -05:00
Cameron Gutman 6d3d51553b Wait on our D3D11 swapchain before rendering to reduce latency 2022-04-07 21:46:48 -05:00
Cameron Gutman 474591c6a5 Use a separate callback to indicate EOS instead of renderFrame() 2022-04-07 21:30:20 -05:00
Cameron Gutman 51e9ab83ad Send a null AVFrame to indicate end of stream to allow renderers to do render thread cleanup 2020-05-13 18:55:21 -07:00
Cameron Gutman de7b973239 Plumb presentation time from server into AVFrame.pts field 2019-11-11 18:03:47 -08:00
Cameron Gutman c2b12868bb Move DisplayLinkVsyncSource back into VTRenderer to reduce latency 2019-05-11 18:33:12 -07:00
Cameron Gutman 53138d7c16 Name threads for easier debugging 2019-05-03 21:18:58 -07:00
Cameron Gutman 859a5a5e0c Allow a renderer to opt-out of the render thread and use that for SDL on OGL 2019-04-09 21:46:14 -07:00
Cameron Gutman c48ed7bb0d Fix undefined variable usage after 2703efedef 2019-03-23 20:25:19 -07:00
Cameron Gutman 052194714a Adjust thread priorities based on recent refactoring 2019-03-17 00:45:31 -07:00
Cameron Gutman e5a8b49c93 Limit the number of queued frames in Pacer to prevent excessive memory consumption if the renderer gets blocked for a while 2019-02-18 12:13:45 -08:00
Cameron Gutman 80a40ac5f9 Increase frame drop threshold 2019-02-16 23:13:35 -08:00
Cameron Gutman ab4127f940 Use presence of a frame after rendering rather than render time for frame dropping 2019-02-15 22:44:52 -08:00
Cameron Gutman f03d12b677 Use a separate render thread even with a V-Sync source 2019-02-15 22:09:50 -08:00
Cameron Gutman 81c6202582 Rename renderFrameAtVsync() to renderFrame() in preparation for further refactoring 2019-02-15 21:07:02 -08:00
Cameron Gutman 4471a858db Fix miscounted pacer dropped frames in non-pacing mode 2019-01-22 21:21:29 -08:00
Cameron Gutman 9799b82d53 Improve long render time logic 2019-01-22 20:55:35 -08:00
Cameron Gutman 78915e0b99 Use a separate render thread when not using frame pacing 2019-01-22 20:31:31 -08:00
Cameron Gutman 1f972b1828 Require several consecutive long render times to drop a frame 2019-01-21 17:58:42 -08:00
Cameron Gutman c064f87889 Drop a frame if the rendering time exceeds the v-sync period 2019-01-20 19:59:29 -08:00
Cameron Gutman cfabaf334e Add frame pacing toggle 2018-12-25 12:57:00 -08:00
Cameron Gutman c054536fab Count Pacer delay in frame stats 2018-12-25 12:09:45 -08:00
Cameron Gutman a0249b4337 Add video stats for performance overlay 2018-09-25 00:47:59 -07:00
Cameron Gutman c9a7c15f98 Improve unsupported FPS options and performance 2018-09-08 15:09:46 -07:00
Cameron Gutman 475a39cb73 Recreate the decoder when moving to a new display to allow Pacer to get the new refresh rate 2018-09-06 19:42:53 -07:00
Cameron Gutman 4dba74e2f9 Fix handling of undefined and non-matching refresh rate 2018-09-06 19:16:59 -07:00
Cameron Gutman dae21f2638 Detect native panel resolution on Retina displays. Fixes #59 2018-09-04 00:21:37 -04:00
Cameron Gutman af6e99cbac Select the highest full-screen refresh rate that our stream FPS evenly divides 2018-09-03 22:54:41 -04:00
Cameron Gutman fa93364ddd Ensure the CVDisplayLink is synchronized to the display that our window is on 2018-09-03 20:19:24 -04:00
Cameron Gutman 5bf88cfe96 Fix Mac build 2018-08-20 18:57:11 -07:00
Cameron Gutman f7d3c10c9d Plumb the ability to disable V-sync through the video renderers 2018-08-20 18:19:42 -07:00
Cameron Gutman 6b395c816f Allow Pacer to wait for frames up until a few ms before v-sync for better smoothness and lower latency 2018-08-20 17:53:35 -07:00
Cameron Gutman d6e7173af0 Add a VsyncSource for renderers that already block for V-sync 2018-08-20 17:24:47 -07:00
Cameron Gutman 62f765b2b4 Switch DXVA2 to IDirect3D9Ex APIs for more detailed control of rendering 2018-08-19 21:53:39 -07:00
Cameron Gutman 345e800abd Always submit frames to Pacer if it's using a frame queue 2018-08-16 17:59:33 -07:00
Cameron Gutman 404eaa44e4 Implement frame pacing for Windows using D3DKMTWaitForVerticalBlankEvent 2018-08-16 01:29:53 -07:00
Cameron Gutman 8e257ab241 Remove unused function 2018-08-16 00:04:28 -07:00
Cameron Gutman 7d61acb2a8 Use Pacer to drive all rendering 2018-08-15 23:57:03 -07:00
Cameron Gutman f6a451d6e7 Add PoC VsyncSource for Windows using DwmFlush(). Soon to be replaced with D3DKMTWaitForVerticalBlankEvent(). 2018-08-15 23:20:56 -07:00
Cameron Gutman e68a15c825 Move the Vsync logic from VTRenderer into a VsyncSource 2018-08-15 22:02:15 -07:00