C#调用DirectShow,在预览中加入回调函数:int ISampleGrabberCB.BufferCB( double SampleTime, IntPtr pBuffer, int BufferLen ){
IntPtr ipSource = m_bmdLogo.Scan0;
IntPtr ipDest = pBuffer; for (int x = 0; x < m_bmdLogo.Height; x++)
{
CopyMemory(ipDest, ipSource, m_bmdLogo.Stride);
ipDest = (IntPtr)(ipDest.ToInt32() + m_stride);
ipSource = (IntPtr)(ipSource.ToInt32() + m_bmdLogo.Stride);
}}以上回调函数,在预览中插入了一个logo,已经成功预览。要求把这段实现改称将预览旋转90度。
IntPtr ipSource = m_bmdLogo.Scan0;
IntPtr ipDest = pBuffer; for (int x = 0; x < m_bmdLogo.Height; x++)
{
CopyMemory(ipDest, ipSource, m_bmdLogo.Stride);
ipDest = (IntPtr)(ipDest.ToInt32() + m_stride);
ipSource = (IntPtr)(ipSource.ToInt32() + m_bmdLogo.Stride);
}}以上回调函数,在预览中插入了一个logo,已经成功预览。要求把这段实现改称将预览旋转90度。
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货