prasannavl / WinApi

A simple, direct, ultra-thin CLR library for high-performance Win32 Native Interop
Apache License 2.0
823 stars 101 forks source link

need sample to playback video (.mp4 file) from stream / byteArray #21

Closed samdubey closed 6 years ago

samdubey commented 6 years ago

Can we use this library to playback video using memory stream?

prasannavl commented 6 years ago

Hi, sure you should be able to. Being the lightest weight wrapper around WinAPI - you can use whatever you like to draw on it. Traditional windows drawing APIs, DirectX or OpenGL textures as the most efficient implementation, or Skia canvas - you name it. It already has samples for all of it. But I'm afraid the playing mp4 from stream specifically is beyond the scope of this library - It can just be done in so many ways, with some many different libraries using all of the above mentioned. But the encoding/decoding on whether you use one of Windows Media APIs, or something external say, ffmeg is entirely upto you.

I'd be happy to incorporate a PR, if someone does come up with such a sample, though I suspect is going to be unlikely considering the variations and other complexities involved - and as such I'm going to close this. You probably want a higher level library if you're looking for something without having to deal with all of this.