媒体播放器/记录器(声子) [英] Media player/recorder (phonon)

查看:126
本文介绍了媒体播放器/记录器(声子)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想开发一个媒体播放器/记录器.

I would like to develop a media player/recorder.

主要目标平台是Windows,可以很好地支持其他操作系统,但这并不是一个高优先级.它应该能够播放wav,mp3,avi等格式.它还应该能够记录音频(麦克风)和视频(网络摄像头或捕获卡).

The primary target platform is Windows, support for other OSs would be nice, but that's not a high priority. It should be able to play formats like wav, mp3, avi. It should also be able to record audio (microphone) and video (webcam or capture card).

由于我对QT和C ++有一定的经验,因此我研究了具有DS后端的QT(4.7.2)声子.但不幸的是,即使使用QT演示随附的MediaPlayer示例,我也无法播放简单的AVI.我只能听到声音,却看不到视频.

As I have some experience with QT and C++, I looked at QT (4.7.2) phonon with DS backend. But unfortunately I was unable to play a simple AVI, even with the MediaPlayer sample that comes with the QT demos. I could only hear sound, but saw no video.

开发人员计算机是64位Vista.我还尝试了另一款64位Vista操作系统,但没有任何运气.然后终于在32位Win7(QT MinGW)上运行了.但是,当我将该MediaPlayer可执行文件及其dll复制到64位计算机上并尝试运行它时,它再次失败.

The developer machine is a 64-bit Vista. I also tried it on another 64-bit Vista without any luck. On a 32-bit Win7 (QT MinGW) it then finally worked. But when I copied that MediaPlayer executable and its dlls to the 64bit machines and tried to run it, it again failed.

在64位计算机上QT声子是否存在已知问题?我也听说过VLC声子后端.那可以解决吗? QT声子是否足够成熟,可以在其之上开发商业应用?还是直接访问DirectShow也许更明智?

Is there a known problem with QT phonon on 64 bit machines? I also heard of a VLC phonon backend. Could that be solution? Is QT phonon mature enough to develop a commercial application on top of it? Or is it maybe more wise to access directshow directly?

谢谢

推荐答案

Directshow只是一个编程框架或API,它不能保证您将能够在每台计算机上播放每种可能的视频格式,因为它依赖于<安装在系统上的href ="http://en.wikipedia.org/wiki/Codec" rel ="nofollow">编解码器以解压缩音频/视频流.一种特定格式的编解码器可能在一个系统中可用,而在另一个系统中不可用.最重要的是,由于无法在32位应用程序中使用以64位模式构建的编解码器,因此64位体系结构增加了更多的复杂性.您在32位Phonon播放器上面临的问题很可能是由缺少或不兼容32位"的编解码器引起的.
另一方面,VLC是一个自包含的应用程序,它不依赖于DirectShow或系统上安装的任何编解码器,因此使用它代替DirectShow可能是一个好主意,但是您需要阅读 VLC法律条款,并决定是否仍然可以将其用于您的目的.

Directshow is just a programming framework or API, it does not guarantee that you will be able to play every possible video format on every computer, since it relies on codecs installed on the system to decompress the audio/video streams. A codec for one specific format might be available in one system an not in anotherone. On top of that, 64 bits architecture adds even more complexity, since codecs built in 64 bits mode cannot be used from 32 bits applications and vice-versa. The issue you are facing on the 32 bits Phonon player is very likelly to be caused by a missing or "not 32 bits compatible" codec.
VLC on the other hand is a self contained application, it does not depend on DirectShow or in any codec installed on the system, so it might be a good idea to use it instead of DirectShow, however you will need to read VLC legal terms and decide if you can still use it for your purposes.

这篇关于媒体播放器/记录器(声子)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆