vs2005直接编译WinCE6.0下的Media Player

来源:互联网 发布:2016年癌症数据 编辑:程序博客网 时间:2024/05/01 19:32

WinCE下的MediaPlayer在Sigma 8652上,可以正常播放高清影片。只需要简单修改一下MediaPlayer的界面,

就可以当作成熟的高清播放产品了。但是,对于TCC8900平台,WinCE提供的MediaPlayer,在播放高清影片时,

就不正常,不能直接使用。因此,需要修改MediaPlayer,将Media Player能够直接编译成应用程序进行修改调试。

以下是在VS2005中编译Media Player的过程:

1. 创建一个空的工程:msceplayer

 

 

 

 

 

 

 

 

 

2. 将WinCE的CEPlayer代码复制到msceplayer目录下:

我的WinCE安装在C盘,CEPlayer源代码位于:C:/WINCE600/PUBLIC/DIRECTX/SDK/SAMPLES/WMP/CEPLAYER

 

3. 在VS2005中,将CEPlayer下的cpp文件加入到source,将h文件加入header,将资源文件加入resource。

 

 

4.制定include文件所在位置:

 

 

5. 增加CEPLAYER_SKIN与 _CRT_SECURE_NO_DEPRECATE这两个预处理

 

 

  6. 编译

1>------ Build started: Project: msceplayer, Configuration: Debug magellan (ARMV4I) ------
1>Compiling...
1>optionsdlg.cpp
1>./CEPLAYER/optionsdlg.cpp(146) : error C3861: 'WaitForAPIReady': identifier not found
1>playlistmgr.cpp
1>./CEPLAYER/playlistmgr.cpp(1242) : error C3861: 'WaitForAPIReady': identifier not found
1>Generating Code...
1>Build log was saved at "file://d:/work/project/msceplayer/msceplayer/magellan(ARMV4I)/Debug/BuildLog.htm"
1>msceplayer - 2 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

WaitForAPIReady() 这个API在pkfuncs.h,在optionsdlg.cpp与playlistmgr.cpp添加#include <pkfuncs.h>

 

 7. 添加库:commctrl.lib coredll.lib Strmiids.lib

 

 

别忘了指定库所在目录位置。

 

8. 编译成功,可以运行。但是这个时候有个问题,就是CE的按钮没有出现。修改resouce.h与ceplayer.rc文件,去掉

#ifdef CEPLAYER_SKIN 与#endif,让其缺省就支持皮肤功能。这个应该是VS2005的一个bug。

 

9. WinCE下的Media Player在很早就有了,界面适合小屏幕,针对高清大屏幕,该软件的按钮在操作时,会有闪烁现象,

修改刷新代码,可以消除闪烁现象。这算作一个瑕疵,奇怪的是这么多年微软竟然没有修改该瑕疵。在WinCE7里,CEPlayer

被重新用C#实现。 


原文地址:http://blog.csdn.net/richard_wu2005/article/details/6246003#comments 

——S5pv210 用wince6.0 的media player 也不能流畅播放720P的电影。难道这个是..............也要修改这个播放器的源码?