Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there a way to manually EOS in python object? #1833

Open
erfansafaie opened this issue Apr 22, 2024 · 2 comments
Open

Is there a way to manually EOS in python object? #1833

erfansafaie opened this issue Apr 22, 2024 · 2 comments

Comments

@erfansafaie
Copy link

erfansafaie commented Apr 22, 2024

Hello @dusty-nv.
I have two questions:
1- How we can send EOS event or closing the stream manually in python? Or any object in c++? (without OpenGl window)

2- Is OpenGL window run in main thread? I have a Qt app and I use videoSource and videoOutput objects. When I clicked start recording video in my app it will start recording in other thread. Finally, I close OpenGL window, recorded video is saved but OpenGL window not close and freeze! It will close when I close my app. So I think showing window is running on main thread?!

@dusty-nv
Copy link
Owner

dusty-nv commented Apr 23, 2024

Hi @erfansafaie, the OpenGL window runs in the same thread as from where you call it from - you can find the source here:

https://github.com/dusty-nv/jetson-utils/blob/af7c667c6367fe6599d8046c213d0cb3b8221ae3/display/glDisplay.cpp

Also to close videoOutput interface, call videoOutput->Close() - for GStreamer pipelines, this will gracefully shut them down and send EOS (so the video files/ect should be seekable)

@erfansafaie
Copy link
Author

erfansafaie commented May 7, 2024

I appreciate your response and help.
Is it work in python the same(videoOutput.Close())? I read the binding codes and Close function, I think it's not working like destructor in C++.

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

No branches or pull requests

2 participants