I have C Static Library for Capturing Video from Camera.It uses Direct X to Interface Camera.
I wanted to create API in .Net C# for Capturing Video and do not want to use DirectX. The Target OS is Windows 8.Api Should be in Such way it should work on Both Desktop and Metro Mode of the Windows 8.
Any Help will be Appreciated.
As per comments above:
DirectX is at the heart of Windows 8 / Metro...
Several sessions on DirectX in Metro were held at BUILD - see http://www.buildwindows.com/Sessions/Tagged/DirectX
Regarding DirectX in Metro see for example http://channel9.msdn.com/Events/BUILD/BUILD2011/PLAT-766T
As the whole API (WinRT etc.) is not final right now it is sure not easy to port your code right now but from what I understand it will possible...
Another point: the Metro API is packaged as WinRT which is COM with several new aspects... this API is usable from .NET + native code (like C/C++)!
Related
We have a custom built data visualization control to draw charts. It was developed using win GDI APIs and the application is built using C++ COM/ATL.
Now we have a requirement to port this module to C# .NET (for maintainability).
The requirement is that the ported .NET control should work in Windows 7 and above (preferably Vista also). The straight forward approach is to start porting the code and replace the C win GDI APIs with .NET GDI+ APIs.
However one additional requirement is to investigate the possibility of reusing the newly written C# .NET code and deploy the same as apps in IOS/Android/Windows mobile (cross platform). I have come across Xamarin, but it looks like I cannot reuse the C# .NET code containing win GDI+ APIs directly.
Q1) Is it possible to reuse the ported GDI+ C# .NET code for developing mobile apps (may be using Xamarin)
Q2) If the answer for above is No, and we chose to start developing the control from scratch(in contrast to porting), What are the alternative approaches? i.e. what rendering libraries can we use?
Suggestions regarding existing visualization libraries which can be used in Xamarin, so that the developed app will work on all platforms are also welcome. The catch is the library needs to provide flexibility for us to add custom interactions to the visualizations.
Thanks!
For some reason everything I've found online says that the Accelerometer class is only for winRT applications and I can't use it unless I code against winRT. I dont understand what winRT is. And my app can't be a metro style app because I need special access to different APIs that I've read can only be accessed in a WPF app. Also windows 8 metro style apps wont work with windows 7 which I would like my app to work for. Also I've only recently started programming so explain it to me like I'm a 4 year old.
Thanks!
The accelerometer you are referring to is a specific WinRT (Windows RunTime) class which is not available in .NET.
WinRT API was made for phones and tablets, but also integrated in Windows 8 / 8.1. It's basically the API for 'Metro' apps and therefore requires such an app. It will definitely not work for Windows 7, since WinRT is not available for this OS. I'm also somehow wondering, why you would need an accelerometer on Win7 (Notebook?), but that is a different topic.
I've once tried to get WinRT stuff working in C#.NET, and to my knowledge, this is not possible.
If you can provide us any additional information about your idea, maybe we can offer you an acceptable alternative.
Is it possible to use DirectX in C# to create metro game for windows store? XNA isn't supported as far as i know so what are capabilities to create game for metro?
Yes is possible, you can use SharpDX, new version supports Windows store apps (WinRT).
SharpDX is open source project and you can use it in your commercial applications without a charge, more here : http://sharpdx.org/about/licensing
here is the example of usage and some tips :
http://channel9.msdn.com/coding4fun/blog/Making-Modern-UI-Managed-DirectX-Apps-with-SharpDX-Updated-for-Win-8VS2012-RTM
You can leverage your XNA investment via MonoGame which in turn relies on SharpDX. Check out Bob Familiar's blog posts to get started. (And yes, it's also free).
I you know C++, you can write the graphic part of your project in a separate Library written in C++ and using DirectX directly.
Im trying to create a media player (in C# .net 4.0) that will work on windows XP (SP3), vista and 7. Normally I would just go the easy way and use WPF's own MediaElement, but since that relies on Windows Media Player 10 or newer, that wont work as Windows XP SP3 may only have WPM9.
First I tried downloading Jerimiah Morill's WPF MediaKit sample application, but this used the EVR which wont show on my test machine (a Windows xp SP3 only with default codecs and default programs, plus the various .Net framework installations). I also downloaded the binaries and tore these apart, creating a new project only with reference to the DirectShow-dll and the bare minimums from the WPF mediakit, this time with no reference whatsoever to EVR. Still no luck. This i'm having a hard time understanding - should'nt even Windows XP be able to play movies using VMR stright out of the box?
I found some samples of media players where one of these works. This one is called DxPlay and uses directshow's graphbuilder, but is built in winforms, has some rather raw-looking code, and will not scale, seek, handle audio, and in general seems rather sketchy.
So, Is there any easy way to create a media player that will play on all the mentioned platforms without pushing WMP10+? I had high hopes for WPF MediaKit, but something is preventing it from playing on Windows XP SP3 (any solution to this would be very interesting).
Thank you very much in advance!
-ruNury
I would try to wrap VLC media player in your .Net project.
Here are some .Net projects that might help you:
http://vlcdotnet.codeplex.com/
http://sourceforge.net/projects/libvlcnet/
http://www.codeproject.com/Articles/109639/nVLC
MSDN suggest EVR (Enhanced Video Renderer) for video output in systems where it is supported: Windows Vista and later. With its introduction, its predecessors - Video Mixing Renderer filter (versions 7 and 9) were cut on smooth scaling of video. Video Mixing Renderer 7 is also less capable in terms of customization, however it consumes far less resources (does not use Direct 3D) and you can output way more videos at once.
Your standard solution here is to support both VMR and EVR output and use the latter starting Windows Vista, fall back to the former otherwise.
EVR is "unofficially" installed in Windows XP with .NET runtime and can be used with an instantiation trick: you the respective DLL is not COM registered and you cannot create an instance using CoCreateInstance API, however you succeed if you do CoLoadLibrary, DllGetClassObject and friends.
For C# development you typically consume DirectShow through DirectShow.NET Library.
I want to display camera output from a mobile phone (with Windows mobile OS) using openCV and C# / C++. If you have any useful link / code, please share in this thread.
Use the native API for doing this if you can, unless there's a specific reason you want to use OpenCV.
Windows Mobile: using phone's camera with C#
There's a couple of useful links on this site.