Skip to content

Blurring of Video #164

Answered by vladmandic
mainisameer asked this question in Q&A
Discussion options

You must be logged in to vote

why not something like this?

  1. main thread grabs frame from video
  2. main thread sends message containing imageData to worker using postMessage
  3. worker receives message and performs blurring
  4. worker sends results as message to main thread
  5. main thread receives the message from worker and immediately goes back to step.1

if its something like that worker is the one controlling timing of issues and there is no throttling of the main thread because it's not running a loop, it's reacting to messages received from worker - and those are not throttled.

so the only question is how to pass video data to worker - by drawing it onto canvas, getting it's imageData and passing it as reference in postMessage…

Replies: 5 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by vladmandic
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested
3 participants
Converted from issue

This discussion was converted from issue #163 on September 08, 2021 18:09.