Windows Mobile / Directdraw:旋转视频流

发布于 2024-08-23 08:16:40 字数 312 浏览 11 评论 0原文

跟进: Directdraw:旋转视频流

我设法预览相机的视频流,但图像旋转 90° 为横向模式。我现在正在寻找一种将相机图像旋转回正常状态的方法,但问题是我什至不知道从哪里开始:这是在 DDSURFACEDESC 结构中的 VideoCaptureFilter、VideoInfoHeader 中完成的吗?只能通过使用附加过滤器来完成旋转吗?是过滤设置吗?

Follow up from: Directdraw: Rotate video stream

I managed to preview the camera's video stream, but the image is rotated by 90° to landscape mode. I'm now searching for a way to rotate the camera image back to normal, but the problem is I don't even know where to start: Is this done in the VideoCaptureFilter, the VideoInfoHeader, in a DDSURFACEDESC structure? Can the rotation only be done by using an additional filter? Is it a filter setting?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

蓬勃野心 2024-08-30 08:16:40

我发现这通常是通过 BI_SRCPREROTATE 标志来完成的:

开发了一个特殊的标志
(BI_SRCPREROTATE) 告诉 GDI 和
视频渲染器
图像的方向
相机方向正确
(渲染时不要旋转)。这
是必要的,因为当你旋转
您还可以在设备上安装 shell
物理旋转设备。当
显示驱动程序将位图旋转到
渲染所需的 shell 和 UI
知道这个特定的位图
不应该旋转。标志是 or d
进入 biCompression 字段
BITMAPINFO 结构。

来自 http://www .tech-archive.net/Archive/PocketPC/microsoft.public.pocketpc.developer/2005-12/msg00850.html

示例代码可能如下所示:

  pVih->bmiHeader.biCompression &= ~BI_SRCPREROTATE;

来自 http://innovator.samsungmobile.com/bbs/discussion/view。 do?parentCategoryId=4&messageId=45549&boardId=224&platformId=2

但是,此方法不适用于我正在使用的 HTC HD2,但它可能适用于其他设备,因此我决定将其添加到我的问题。

I found out that this is usually done with the BI_SRCPREROTATE flag:

A special flag was developed
(BI_SRCPREROTATE) which tells GDI and
the video renderer that the
orientation of the image from the
camera is in the correct orientation
(don't rotate when rendering it). This
is necessary because as you rotate the
shell on the device you also
physically rotate the device. When the
display driver rotates bitmaps to
render the shell and UI it needs to
know that this particular bitmap
shouldn't be rotated. The flag is or'd
into the biCompression field in the
BITMAPINFO structure.

From http://www.tech-archive.net/Archive/PocketPC/microsoft.public.pocketpc.developer/2005-12/msg00850.html

Sample code might look like this:

  pVih->bmiHeader.biCompression &= ~BI_SRCPREROTATE;

From http://innovator.samsungmobile.com/bbs/discussion/view.do?parentCategoryId=4&messageId=45549&boardId=224&platformId=2

This method however is not working with the HTC HD2 I am using, but it might work with other devices, so I decided to add this to my question.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文