python: Port cpp tests and add examples#2
Conversation
- resizing the frame is sufficient for the encoder to realize that it should shutdown existing session and open a new encoding session. - there was a bug upstream where setting width/height on the encoder did not bump the MTime of the encoder and so, the frame size was equal to the encoder size and the responsibility of re-initializing the context fell on the MTime logic which was flawed because the encoder did not bump the MTime. As a result, this code needed to manually call `_reset`. - this has been fixed upstream in Kitware/VTKStreaming#2, so I'm changing the code here.
- resizing the frame is sufficient for the encoder to realize that it should shutdown existing session and open a new encoding session. - there was a bug upstream where setting width/height on the encoder did not bump the MTime of the encoder and so, the frame size was equal to the encoder size and the responsibility of re-initializing the context fell on the MTime logic which was flawed because the encoder did not bump the MTime. As a result, this code needed to manually call `_reset`. - this has been fixed upstream in Kitware/VTKStreaming#2, so I'm changing the code here.
- resizing the frame is sufficient for the encoder to realize that it should shutdown existing session and open a new encoding session. - there was a bug upstream where setting width/height on the encoder did not bump the MTime of the encoder and so, the frame size was equal to the encoder size and the responsibility of re-initializing the context fell on the MTime logic which was flawed because the encoder did not bump the MTime. As a result, this code needed to manually call `_reset`. - this has been fixed upstream in Kitware/VTKStreaming#2, so I'm changing the code here.
- resizing the frame is sufficient for the encoder to realize that it should shutdown existing session and open a new encoding session. - there was a bug upstream where setting width/height on the encoder did not bump the MTime of the encoder and so, the frame size was equal to the encoder size and the responsibility of re-initializing the context fell on the MTime logic which was flawed because the encoder did not bump the MTime. As a result, this code needed to manually call `_reset`. - this has been fixed upstream in Kitware/VTKStreaming#2, so I'm changing the code here.
615f246 to
8b7e64d
Compare
|
I'm not sure this is intended, but the only tests that are run are the import one, and the vpx ones on MacOS only. Having tests that are all skipped is barely useful. Of course the NVENC one can not run without a NV GPU but the VPX ones should be run everywhere. |
import vtkmodules.vtkRenderingOpenGL2 # noqa: F401 (register the OpenGL factory)
from vtkmodules.vtkRenderingCore import vtkRenderWindow
win = vtkRenderWindow()
win.SetOffScreenRendering(True)
win.SetSize(32, 32)
win.Render()@AlexyPellegrini Any ideas on how to enable opengl in github actions? I can look it up but if you've figured it out for another project, we could use your help.. |
On Linux we should be able to get something working by setting the environment variable Edit: |
|
I'm merging this one because the NVENC tests atleast run locally. |
No description provided.