Play videos from memory stream

前端 未结 2 736
闹比i
闹比i 2021-01-13 16:32

Couldn\'t find any satisfying answer anywhere so far...

I\'m working on a C# WinForms .NET3.5 application that needs to load video files from a database BLOB and pla

2条回答
  •  不思量自难忘°
    2021-01-13 17:30

    You are right the most popular approach is to use DirectShow but in this case you have to build graph etc. It's not easy to start using DirectShow if you have not had experience in this area.

    Another quite rich idea (and a "general idea" as you wrote) is to hook file calls like ReadFile and SetFilePointer and translate these calls to memorystream's methods (Read, Seek), so the calling code would think that it works with really existing file.

    For example here an article that shows how to play video that is encrypted chunk by chunk, playing without decryption the whole file, and without dropping decrypted chunks to a disk: http://boxedapp.com/encrypted_video_streaming.html

提交回复
热议问题