求C#旋转视频代码

idilent 2011-10-14 11:10:06
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度。
...全文
185 1 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
风骑士之怒 2011-10-15
  • 打赏
  • 举报
回复
http://www.codeproject.com/Questions/59529/Rotate-video-in-DirectShow.aspx

你试试

111,098

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • AIGC Browser
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧