W3C home > Mailing lists > Public > public-media-capture-logs@w3.org > January 2017

Re: [mediacapture-image] is grabFrame necessary?

From: Miguel Casas-Sanchez via GitHub <sysbot+gh@w3.org>
Date: Wed, 11 Jan 2017 17:36:49 +0000
To: public-media-capture-logs@w3.org
Message-ID: <issue_comment.created-271936440-1484156208-sysbot+gh@w3.org>
It's possible to have a `MediaStream` and retrieve its contents via 
casting it to a `<video>`, drawing the contents of the latter to a 
`<canvas>` to then retrieve the pixels via its context (let's call the
 this the indirect path) but:
- it's inefficient: the described indirect path needs a `<video>`, a 
`<canvas>` and a `CanvasRenderingContext2D`.
- `<canvas>` will in all likelihood draw using the system's GPU, which
 further reduces the speed of the indirect path due to the round trip 
to the GPU plus the necessary texture resolutions.
- `<canvas>` has more possibilities of becoming tainted than an 
`ImageCapture` created out of a `MediaStream`


-- 
GitHub Notification of comment by miguelao
Please view or discuss this issue at 
https://github.com/w3c/mediacapture-image/issues/144#issuecomment-271936440
 using your GitHub account
Received on Wednesday, 11 January 2017 17:36:55 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:27:31 UTC