Closed ahmadi219 closed 8 years ago
Valid points. I will fix the bugs when i get some time.
The for loop in the Ffmpeg thread function is to attempt to keep the frame rate at whatever it was set to (i.e. it will duplicate frames if they aren't given fast enough, and drop frames if it can't keep up)
The for loop in the live555 thread function is to keep live555 streaming if it stops for whatever reason. This should never happen though.
I hope this answers your question
I've looked into the first point, the issue has now been fixed. Thank you for finding it.
The second point, writeDummyFrame() is private and should not be called externally (especially if the FFMPEG thread has been started). I might actually remove that function as it no longer is applicable. If you want to use writeDummyFrame() I suggest re-writing the thread function to call writeDummyFrame() instead of writeFrame(char * data).
The intended use of this project is simply: 1) create the FFMPEG thread and forward any setup you want as shown in the example 2) send RGB frames using SendNewFrame function at any time or whenever you have one to send
Feel free to start another git based on this project and re-write anything to suit your needs.
I think this issue has been resolved.
Please open another issue if there are more problems
Hello I am worked on this project. Some changes may be required : 1) for h265 you should set preset to "fast" or higher (like h264 in function SetupCodec) and set zero-latency 2)if you want to use function writeDummyFrame() instead of TempRGBFrame that you created in while(1) loop, it will not worked and throws an exception, because you delete some portion of code that exist in previous version of project which ffmpegClass stopped while setupCodec not complete (in Function)
why you use for( ; ;) loop in Function ? what it do ? Thanks a lot for your project