Open polaris0227 opened 8 years ago
Hi, I just discovered this project and encountered the same problem.
After quickly investigating the issue, I think I found a race condition in CaptureSource.java code. When the capture is stopped in the main thread, stop() is called and Command.EndOfFile is added to the command queue. Meanwhile, getFrame() function may be called from another thread, and if stop() was previously called, the command queue is cleared and I think there is a chance that Command.EndOfFile may be never processed. I tried to comment the line that clears the command queue and it solved the problem in my case.
But I didn't have time to investigate further and see what are the real consequences of commenting this line (it may create a bug elsewhere).
It would be nice if someone with a good knowledge of this code reviews this.
Regards, Julien
I faced the same problem. Any solution?
Same problem here, any help ???
@vtproduction jhognon 's solution worked for me
@jhognon your solution works for me, thank you!!!
Glad it helped :)
I opened a new issue related to this one: https://github.com/INDExOS/media-for-mobile/issues/69
Hope it helps
Hi, I've got an issue when finishing record. Sample app also has this issue. Sometimes it works good, but sometimes app freeze about 10 seconds and says "Capturing failed. Cannot stop capture thread." message when finish record, and after that recording doesn't work even restart app. I've found some code in CapturePipeline.java as below:
I think there is problem at pipeline.stop() in "!!!DANGER!!!" Hope someone help me to resolve this problem. Regards.