视频捕获 API 诞生于添加层来共享视频硬件在性能方面不合理的时代。此外,如果有 2 个以上的应用程序与相机配合使用,则必须以某种双方都满意的方式让它们就捕获格式达成一致。因此,它采用了最简单直接的方式:您拿起相机,它就是您的,您可以根据自己的需要进行设置。然而,其他人会等待您发布硬件,然后其他人才能使用它。
音频 API 不久前也专门锁定硬件,但后来操作系统 API 引入了硬件抽象层来共享硬件并在幕后从多个应用程序进行混合。
Video capture APIs come from time when adding layers to share video hardware was unreasonable in terms of performance. Also, with 2+ apps working with a camera one would have to make them agree on capture format in some way that both are satisfied. So it was made the simplest and straightforward way: you grabbed the camera, it's yours and you can set it up for your own needs. However others would wait for you to release the hardware before anyone else can use it.
You can find third party software that shares a camera, which internally grabs it exclusively and then exposes virtual camera that is shareable. This trades off performance for flexibility.
Audio APIs were also locking hardware exclusively some time ago, but then at some point OS APIs introduced hardware abstraction layers to share hardware and do mixing from multiple applications behind the scene.
发布评论
评论(2)
视频捕获 API 诞生于添加层来共享视频硬件在性能方面不合理的时代。此外,如果有 2 个以上的应用程序与相机配合使用,则必须以某种双方都满意的方式让它们就捕获格式达成一致。因此,它采用了最简单直接的方式:您拿起相机,它就是您的,您可以根据自己的需要进行设置。然而,其他人会等待您发布硬件,然后其他人才能使用它。
您可以找到共享相机的第三方软件,该软件在内部独占相机,然后公开可共享的虚拟相机。这会牺牲性能来换取灵活性。
音频 API 不久前也专门锁定硬件,但后来操作系统 API 引入了硬件抽象层来共享硬件并在幕后从多个应用程序进行混合。
Video capture APIs come from time when adding layers to share video hardware was unreasonable in terms of performance. Also, with 2+ apps working with a camera one would have to make them agree on capture format in some way that both are satisfied. So it was made the simplest and straightforward way: you grabbed the camera, it's yours and you can set it up for your own needs. However others would wait for you to release the hardware before anyone else can use it.
You can find third party software that shares a camera, which internally grabs it exclusively and then exposes virtual camera that is shareable. This trades off performance for flexibility.
Audio APIs were also locking hardware exclusively some time ago, but then at some point OS APIs introduced hardware abstraction layers to share hardware and do mixing from multiple applications behind the scene.
这可能是为了避免应用程序在人们通过 Skype 或其他方式使用网络摄像头时监视他们。
This is probably intended to avoid an application spying on people while they are using their webcam through skype or whatever.