声子和图像支持

发布于 2024-07-23 21:02:02 字数 434 浏览 2 评论 0原文

我正在尝试使用 Phonon 和 PyQt 构建一个简单的类似幻灯片的效果。 “幻灯片”将由图像和/或视频组成,但图像应显示一段固定的时间。 当我在 MediaSource 中排列图像时,它仅显示一小会儿。

Phonon 似乎通过后端支持图像(至少在带有 Quicktime 的 OS X 上),但我没有找到任何记录来表明这一点。 Phonon.BackendCapability.availableMimeTypes() 函数仅返回音频和视频格式; 我已成功测试过的所有格式(JPEG、PNG)均未列出。

我需要确定给定的 MediaSource 是否是图像,以便我可以告诉 MediaOjbect 暂停一段给定的时间。 当然,我可以列出一个已知图像格式扩展名的大列表,并检查媒体的文件名 - 但这很混乱。 我怎样才能用声子做到这一点?

I'm trying to build a simple slideshow-like effect using Phonon with PyQt. The "slideshow" will be made up of images and/or video, but the images should display for some fixed period of time. When I queue up an image in a MediaSource, it is displayed for only a short moment.

Phonon appears to support images via the backend (at least on OS X with Quicktime), but I haven't found anything documented to indicate this. The Phonon.BackendCapabilities.availableMimeTypes() function only returns audio and video formats; none of the formats I've successfully tested - JPEG, PNG - are listed.

I need to determine if a given MediaSource is an image or not, so I can tell the MediaOjbect to pause for some given period of time. Of course I can make a big list of known image format extensions, and check the filename of the media - but this is kludgy. How can I do this with Phonon?

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

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

发布评论

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

评论(2

醉生梦死 2024-07-30 21:02:02

Phonon(根据我读到的所有内容)是为显示单个音频/视频文件而设计的,所以我猜如果你想要幻灯片放映,你必须以正常的 Qt 方式显示图像,而不是使用 Phonon 来显示图像。

Phonon (from everything I've read) is designed for displaying individual audio/video files so I would guess if you want a slideshow you'd have to display images in the normal Qt way rather than using Phonon for them.

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