TMediaPlayer错误-不支持的媒体文件 [英] TMediaPlayer Error - Unsupported Media File

查看:85
本文介绍了TMediaPlayer错误-不支持的媒体文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试从Firemonkey XE7 Windows应用程序播放mp3文件.通过放置一个TMediaPlayer组件,为它分配一个.mp3文件,然后播放它,这应该是一个简单的任务.但是,出现以下错误:

I am trying to play a mp3 file from Firemonkey XE7 windows application. It should have been a simple task by putting a TMediaPlayer component, assigning it a .mp3 file, and just playing it. However, I get the following error:

Application Error
Exception EReadError in module MediaPlayerTest.exe at 00000000000012139E.
Error reading MediaPlayer1.FileName: Unsupported media file testfile.mp3.

我也尝试过.wav,但它也不起作用.(已经安装了音频编解码器,并且Windows Media Player可以成功播放媒体文件.)

I have also tried .wav, and it didn't work either. (Audio codec have already been installed and the media files can successfully be played by windows media player.)

然后我尝试在另一台计算机上编译相同的程序,并且可以成功编译该程序,并且mp3可以正常播放.

I then try compiling the very same program on another computer, and it can be compiled successfully and the mp3 plays just fine.

有人知道为什么它不能在一台计算机上编译但可以在另一台计算机上编译吗?

Does anyone know why it doesn't compile on one computer but does on another?

推荐答案

当安装在VM中时,它似乎是Direct X的限制.我安装了其他媒体编解码器(基本的k-lite编解码器包),播放器在此之后运行良好任何代码更改.另外,提交了错误报告,希望研发能够解决该问题

It appears to be a limitation of Direct X when installed in a VM. I installed a different media codec (the basic k-lite codec pack) and the player worked fine after that without any code changes. Also, filed a bug report so hopefully R&D can address it

这篇关于TMediaPlayer错误-不支持的媒体文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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