纯C# Silverlight 视频编码库?
有没有纯 C# Silverlight 视频编码库?
我所说的视频不仅是图片压缩器,还包括音频压缩器...
所以说我正在寻找某种库,不仅用于压缩而且还用于同步化等...也就是说我给它一个网络摄像头,它给了它我是一个容器!)
Is out there any Pure C# Silverlight video encoding lib?
By video I mean not only pictures compressor but also audio compressor...
So to say I'm looking for some kind of lib not only for compressing but also for sinchronisation etc... so to say I give it a web cam it gives me a conteiner!)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您当然不会希望在安全代码中执行此操作,除非您有大量缓冲内存,因为编码器的运行速度会非常缓慢。
一种选择是使用提升的权限运行,然后您可以与外部 COM 包交互 - 请参阅 http://forums.silverlight.net/forums/p/156112/350144.aspx 获取一些有用的链接
这是来自 stackoverflow 的关于一般问题的链接,内容几乎相同 - 在 C# Com 包装器中使用本机 dll 并在 silverlight 中使用 dll
如果您可以创建一个 C# 包装器来调用您选择的任何本机编码 DLL,那么您可以将包装器程序集放入 GAC 中,然后就可以开始了 - 这当然意味着您需要额外安装将此程序集放入 gac 的步骤,这超出了“正常”silverlight 体验
为了使这种分离更易于实现和使用,我们在 .NET Framework 2.0 中引入了所谓的简单沙箱 API,它创建了每个应用程序域,为其沙箱设置了给定的权限,以及不在全局程序集缓存 (GAC) 中的完全受信任的程序集列表,因为 GAC 中的所有程序集都已完全受信任。
取自 http://msdn.microsoft.com/en-us/magazine/cc765416.aspx - 已过时,但我相信仍然准确
You're certainly not going to want to do this in safe code, unless you've got a lot of buffer memory, as the encoder would run glacially slowly.
One option is to run with elevated permissions, and then you can interact with external COM packages - see http://forums.silverlight.net/forums/p/156112/350144.aspx for some useful links
Here's a link from stackoverflow on the general issue that says pretty much the same thing - Using Native dlls in C# Com wrapper and Use dll in silverlight
If you can create a C# wrapper around calls to any native encoding DLL of your choice, then you can put the wrapper assembly in the GAC and you should be good to go - this would of course mean you need an additional install step to get this assembly into the gac, which is outside the 'normal' silverlight experience
To make this separation easier to implement and use, we introduced what we call the simple sandboxing APIs in the .NET Framework 2.0, which create each application domain with a given permission set for its sandbox and a list of fully trusted assemblies that are not in the Global Assembly Cache (GAC), as all assemblies in the GAC are already fully trusted.
taken from http://msdn.microsoft.com/en-us/magazine/cc765416.aspx - dated, but I believe still accurate
截至 2010 年 2 月 15 日,Silverlight 中似乎没有内置方法可以执行此操作。
这是一个讨论此问题的帖子。
Rene Schulte 有一个示例,EdgeCam 镜头 - 保存 Silverlight 4网络摄像头快照为 JPEG,将网络摄像头流保存为连续的 JPEG 图像。
As of February 15, 2010 -- it appears that there is not a built-in way to do this in Silverlight.
Here is a thread that discusses this issue.
Rene Schulte has an example, EdgeCam Shots - Saving Silverlight 4 Webcam Snapshots to JPEG that saves the Webcam stream as sequential JPEG images.