日期:2014-05-19  浏览次数:21094 次

C#获得视频数据后,用哪个API显示出来
获得最原始的视频数据后,比如
获得
byte[]   k;
k是视频数据

用哪个API显示出来一贞贞的播放

谁有过经验的请指导。
最好有代码!!谢谢。

------解决方案--------------------
感兴趣,帮顶
------解决方案--------------------
using System;

namespace winvfw
{
/// <summary>
/// CDrawDibDraw 的摘要说明。
/// </summary>
#region CDrawDibDraw类
internal class CDrawDibDraw
{
private IntPtr handleTo;
private int dWidth;
private int dHeight;
internal CDrawDibDraw()
{

}
internal CDrawDibDraw(IntPtr _handleTo,int _dWidth,int _dHeight)
{
this.handleTo=_handleTo;
this.dHeight=_dHeight;
this.dWidth=_dWidth;
}
internal IntPtr SetHandleTo
{
set
{
this.handleTo=value;
}
}
internal int SetWidth
{
set
{
if(value> 0)
{
this.dWidth=value;
}
}
}
internal int SetHeight
{
set
{
if(value> 0)
{
this.dHeight=value;
}
}
}
/// <summary>
/// 画图片
/// </summary>
/// <param name= "_bmpDate "> 图片数据 </param>
/// <param name= "_btm "> 图片结构 </param>
internal void ShowBmp(byte [] _bmpDate,AVICAP.BITMAPINFOHEADER _btm)
{
IntPtr hdc =AVICAP.GetDC(this.handleTo);
IntPtr hdd=AVICAP.DrawDibOpen();
bool s=AVICAP.DrawDibBegin(hdd,IntPtr.Zero,this.dWidth,this.dHeight,ref

_btm,_btm.biWidth,_btm.biHeight,AVICAP.DDF_SAME_HDC);
try
{

bool scess=AVICAP.DrawDibDraw(hdd,hdc,0,0,this.dWidth,this.dHeight,ref

_btm,_bmpDate,0,0,_btm.biWidth,_btm.biHeight,AVICAP.DDF_SAME_DRAW|AVICAP.DDF_SAME_HDC);

}
catch(Exception ex)
{
throw ex;
}
}
}
#endregion
}