Skip to content

python: Port cpp tests and add examples#2

Merged
jspanchu merged 5 commits into
wheelfrom
port-cpp-tests-to-python
Jul 2, 2026
Merged

python: Port cpp tests and add examples#2
jspanchu merged 5 commits into
wheelfrom
port-cpp-tests-to-python

Conversation

@jspanchu

Copy link
Copy Markdown
Member

No description provided.

jspanchu added a commit to Kitware/trame-rca that referenced this pull request Jun 12, 2026
- 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.
jspanchu added a commit to Kitware/trame-rca that referenced this pull request Jun 12, 2026
- 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.
jspanchu added a commit to Kitware/trame-rca that referenced this pull request Jun 12, 2026
- 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.
Justineantoine pushed a commit to Kitware/trame-rca that referenced this pull request Jun 15, 2026
- 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.
@jspanchu jspanchu force-pushed the port-cpp-tests-to-python branch from 615f246 to 8b7e64d Compare June 15, 2026 14:31
@AlexyPellegrini

AlexyPellegrini commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

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.

Comment thread tests/video_test_utils.py
@jspanchu

Copy link
Copy Markdown
Member Author

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.

  1. github actions machines do not have nvidia gpus.

  2. the vpx tests need opengl rendering. it looks like this snippet of code fails/crashes so video_test_utils.requires_rendering() returns False and none of them run.

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..

@AlexyPellegrini

AlexyPellegrini commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

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 LIBGL_ALWAYS_SOFTWARE=1 if mesa is installed.
On Windows tho I don't know, I'm surprised a software implementation isn't available by default, I guess that's due to runner using Windows Server not regular end user Windows versions...

Edit:
Looks like F3D from Mathieu have a Mesa for windows, might be worth a try https://github.com/f3d-app/install-mesa-windows-action

@jspanchu

jspanchu commented Jul 2, 2026

Copy link
Copy Markdown
Member Author

I'm merging this one because the NVENC tests atleast run locally.

@jspanchu jspanchu merged commit 6fcba2a into wheel Jul 2, 2026
3 checks passed
@jspanchu jspanchu deleted the port-cpp-tests-to-python branch July 3, 2026 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants