Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pure C# Silverlight video encoding lib?

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!)

like image 960
Rella Avatar asked Feb 15 '10 17:02

Rella


2 Answers

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

like image 105
Mark Mullin Avatar answered Oct 13 '22 03:10

Mark Mullin


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.

like image 35
Timothy Lee Russell Avatar answered Oct 13 '22 01:10

Timothy Lee Russell