-
-
Notifications
You must be signed in to change notification settings - Fork 340
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
Unable to restart camera with aravissrc gstreamer #907
Comments
Any ideas for this? |
The issue comes from the fact you are setting the state on the source element, not the pipeline. Replace |
I'm not an expert in gstreamer. You have better chance to an get explanation on why elements are only destroyed when the pipeline is stopped on the gstreamer discourse instance: https://discourse.gstreamer.org/ |
I struggled with the same thing. My application is based on the Deepstream runtime_source_add_delete. I dont know if this is the correct solution, but my testing revealed that the |
Otherwise a stopped source can not be restarted, because the camera is still in use. Fix #907
Thanks @Summengardin Could you please test #914 ? |
Thank you! Yes, #914 fixes this @sean-kiwi, fyi |
Otherwise a stopped source can not be restarted, because the camera is still in use. Fix #907
Thanks, I'll have a look. I made a fair bit of progress on this too, will post my findings when I get some time. My main concern with modifying the stop function, is if this will always kill the camera source? I.e it is no longer possible to just pause and play the same source without destroying it? |
Yes, you're right. May be it was not a good idea after all to destroy the camera in the stop function. The thing is, in the sample code you posted, the source element is destroyed only after the pipeline is also destroyed. Which I do not understand. The gstreamer documentation says the element is unrefed when I guess the first step would be to fix the sample code to be in accordance with the pipeline manipulation documentation. I have created a branch here #918 that builds it as one of the aravis sample codes. |
Pausing the source, wouldn't that normally be done using Using the stop method is described to free resources. Here I will look at #918 to stay in touch on this |
From memory the paused state has no effect on a live source, but I will double check. I did manage to get the camera to consistently be destroyed without setting pipeline to null. The main issue was clearing the message bus which holds on to references. After that I still had a few issues in reconnecting the new source, I think related to flushing old data, but I'll confirm that and share when I get a chance. Perhaps your other additions in this branch related to caps will help |
Describe the bug
I need the ability to remove and recreate the arravissrc element of the gstreamer pipeline, so that if my camera has any issues I can restart it without having to restart my entire pipeline.
To Reproduce
Expected behavior
Camera able to restart without crashing gstreamer pipeline
Camera description:
Lucid Pheonix
GigE
Platform description:
Additional context
My main query is about safely destroying the camera object, and if/how to use g_object_unref or gst_object_unref.
The text was updated successfully, but these errors were encountered: