magreenblatt wrote:thunderbird wrote:will using a Custom scheme handler to send base 64 encoded image data be faster than simply sending the encoded string as a parameter to the native c++ function?
If you're doing the processing in the browser process then likely yes. You can also base64 encode the image and process it in the renderer process by passing the encoded string to a bound JS function.
I am actually passing it to a bound JS function.
magreenblatt wrote:thunderbird wrote:I am actually trying to continuously send frames from a video and process them and display them back in the browser.
Are you trying to process them in realtime? What frame rate do you need to achieve?
The base64 encoding and decoding is a lot faster than the array implementation but it still a little slow . I am actually capturing frames from a webcam, encode it in base64 format, pass it to the c++ function and process it.
I am not sure if my frame-rate calculation is accurate but when I capture and process the frames natively using c++ I get a frame-rate of around 10 to 15 frames per second. This drops to around 4 to 5 frames per second when I capture frames using JavaScript and process it at c++ side though I have some cleaning up to do in the code which should increase the fps by at least a couple of seconds.
Update 1:
When run from Visual Studio I am able to get a constant frame-rate of around 13-14 fps now which is pretty good performance wise in Release mode. In Debug mode I still get 4 to 6 FPS.
Update 2:
When run normally from the exe file, I get a frame rate of 27-29 which is good enough for what I am trying to achieve.