播放从内存流视频

编程入门 行业动态 更新时间:2024-10-24 14:27:48
本文介绍了播放从内存流视频的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

找不到任何令人满意的答案任何地方迄今为止...

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

我的工作,需要从数据库BLOB加载视频文件,并发挥它的应用程序窗口中一个C#的WinForms .NET3.5应用程序。 该数据库是一个本地文件(无服务器参与)。

I'm working on a C# WinForms .NET3.5 application that needs to load video files from a database BLOB and play it inside the application window. The database is a local file (no servers involved).

我不认为这将文件保存到硬盘驱动器是一个很好的解决方案,因为它可能是费时,而且我已经在内存流文件反正。

I don't think that saving the file to the hard drive is a good solution since it might be time consuming, and I already have the file in a memory stream anyway.

我需要能够发挥尽可能多类型的视频格式为可能的(codeCS?)。 包括DIVX,XVID,MPEG,AVI,3GP等。

I need to be able to play as much types of video formats as possible (codecs?). Including divX, XVid, mpeg, avi, 3gp, etc.

我正在寻找一个易于使用的工作code样品,或现有的第三方组件。

I'm looking for an easy-to-use working code sample, or an existing third party component.

建议喜欢的DirectShow或VLC它几乎不需要具有视频渲染,过滤器,图表和什么,而不是都出了问题,一个主要的程度,除非有工作示例。

Suggestions like DirectShow or VLC which require almost having a major degree in video rendering, filters, graphs and what-not are out of the question, unless there's a working sample.

任何想法?

感谢你。

推荐答案

你是对最流行的方法是使用DirectShow的,但在这种情况下,你必须建立图等,这是不容易的开始使用DirectShow的,如果你有没有有这方面的经验。

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.

另一个相当丰富的想法(正如你写了一个总体思路)是挂钩像ReadFile和SetFilePointer文件的调用,并把这些调用的MemoryStream的方法(读取,求),因此调用code会认为,它与真正存在的文件。

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.

例如这里的一篇文章,说明如何播放加密逐块,打不解密整个文件的视频,并且不丢弃解密块到磁盘: boxedapp/encrypted_video_streaming.html

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: boxedapp/encrypted_video_streaming.html

更多推荐

播放从内存流视频

本文发布于:2023-11-08 15:49:24,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1569800.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:内存   视频

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!