在C#Windows应用程序中播放MemoryStream中的视频或字节数组 [英] Play video from MemoryStream or byte Array in C# Windows Application

查看:663
本文介绍了在C#Windows应用程序中播放MemoryStream中的视频或字节数组的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



i希望在c#windows应用程序中从MemoryStream或字节数组播放视频

i我保存视频文件byte []在sql数据库中。 column的数据类型是varbinary(MAX)。

i我在c#.netFramwork 4.0中使用来自WMPlib的axWindowsMediaPlayer(visual studio 2010)

我的要求是从MemoryStream或byte Array播放视频没有在任何位置创建任何临时文件或任何其他文件。



i在sql中保存视频文件byte []并在运行时从sql读取该字节数组并播放视频。



注意: - 从MEMORYSTREAM或BYTE ARRAY播放视频,无需在任何位置创建任何TEMP文件或任何其他文件。





请帮帮我..这很紧急....



提前谢谢。

hi all,

i want to play video from MemoryStream or byte Array in c# windows application
i am save video file byte[] in sql database. datatype of column is varbinary(MAX).
i am using axWindowsMediaPlayer from WMPlib in c# .netFramwork 4.0 (visual studio 2010)
my requirement is play video from MemoryStream or byte Array without create any temp file or any other file in any location.

i saved video file byte[] in sql and read that byte array at run time from sql and play video.

NOTE:- PLAY VIDEO FROM MEMORYSTREAM OR BYTE ARRAY WITHOUT CREATE ANY TEMP FILE OR ANY OTHER FILE IN ANY LOCATION.


please help me.. it's urgent....

thank you in advance.

推荐答案

创建ActiveX控件并嵌入Windows Media Player。在应用程序中嵌入Windows Media Player后,您可以设置组件的URL属性,并且您将能够看到您的组件正在从URL加载视频。



否则,您需要从服务器流式传输它或创建一个临时文件并从那里播放。
Create an ActiveX control and embed Windows Media Player. Once you have the Windows Media Player embedded in your application, you can set the URL property of the component and you will be able to see your component is loading the video from the URL.

Otherwise, you will need to stream it from a server or create a temporary file and play it from there.


这篇关于在C#Windows应用程序中播放MemoryStream中的视频或字节数组的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆