Reputation: 2543
I need to render video from multiple IP cameras into several controls within the client application. On top of the video, I should be able to add some OSD such as timestamp and camera name. What I'm trying to do has nothing to do with 3D since we're talking about digital video with some text on it.
Which API is more suitable for this purpose? Direct3D or Direct2D? Performance should also be a consideration here.
Upvotes: 1
Views: 1972
Reputation: 2634
It used to be that Direct2D was a poor choice for Windows Phone (if you care about that system) because it wasn't supported, but Win Phone 8.1 has it now, so less of an issue. My experience with D2D was that it offered fast, high quality 2D rendering, and I would say it is a good choice. You might want to take a look at this article on Code Project. That looks appropriate for your purposes. If you are certain you only need MS system support, then you're all set. Another way to go would be a cross platform system like nanovg, which offers nice 2D rendering and would work on a Mac. Of course, you'd need to figure out how to do the video part on non windows systems.
Regarding D3D, you could certainly do it that way, but my guess would be it would make some things trickier to do. Don't forget you can combine the two as well...
Upvotes: 3