Hello,
I am a developer working on an application that will run on the Windows CE 5.0 Core platform. The application requires video playback, and I am having trouble finding an acceptable way to implement this. I have a lot of flexibility over the file format of the video files that will be played. I don't necessarily need to support multiple formats... if I can get even one format working then that should be sufficient. MPG, WMV, AVI, or MOV would all work and if I can support more than one of them (which I know that DirectShow is capable of) then that will be a great advantage. The video files will all be stored on local storage, so I do not need to be able to support network streaming at this point, though leaving open the possibility of adding that functionality in the future would be a huge plus.
The target device will be running a Samsung ARM 400 MHz processor, so it seems to me that the solution will have to include some library that can take advantage of hardware rendering. Initial tests with software-only rendering have provided little hope that that type of solution could be acceptable with our limited processor speed.
The Windows CE 5.0 OS Image that we will be using does NOT include the Windows Media Player or associated OCX, so that is not a possibility. Right now I am leaning towards using the DirectShow library, which definitely WILL be available on my target device. But I am not locked into DirectShow if I can find a better solution. I am also considering licensing the third-party TCPMP player from CoreCodec, but our requirements seem so simple, theoretically, that I would prefer to avoid incurring additional third-party licensing and support costs if at all possible. Especially in light of the fact that DirectShow is available for no extra cost as part of our OS platform.
I have a device in my possession, for performance testing, that has the same chip that our final target device has, but I do not have access to our final target hardware at this point in time. The device that I do have is running Windows Mobile 5.0. This is NOT our target OS, as I mentioned above... but Windows Mobile does claim to support DirectShow, so I assume that if I can get a DirectShow video player application to compile on run on the WinMobile 5.0 device, the application should run OK on the real target device when I get my hands on it. I am aware that I need to avoid using any WinMobile5.0 features that may not be available in our target OS of WinCE 5.0 Core.
Developing an application for the Windows Mobile 5.0 platform requires Visual Studio 2005, so that seems like a requirement at this point. Also, I expect VS2005 to be much more useful in the future for new devices that we may want to support than if we developed the application using embedded VC++ or some combination of that and Visual Studio.NET 2003.
At this point, I am simply trying to get a simple DirectShow video playback application to compile in VS2005 and deploy and run it on the Windows Mobile 5.0 emulator or on my physical WM5.0 device. I am using a Visual C++ Smart Device Win32 Application project in VS2005, and have virtually copied and pasted my code from the DirectShow for WinCE 5.0 sample code available on MSDN here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wcemultimedia5/html/wce50condirectshowsamplecode.aspI can not get it to compile. It is not a link error, it is a compile error that has to do with these two lines of code:
#define WM_GRAPHNOTIFY WM_APP + 1
and
pEvent->SetNotifyWindow((O
AHWND)g_hw
nd, WM_GRAPHNOTIFY, 0);
The compile error is about syntax. It says this:
syntax error : missing ')' before ';'
I can give more specific details about the compile error if that would be useful, but I strongly suspect that it has to do with the definition of "WM_APP" being incompatible with its use in this fashion. I'm assuming this is to do some change to that definition that occurred between VS2003 and VS2005. Microsoft's sample code page doesn't seem to state it specifically, but I suspect that it was written and tested under VS2003 and not VS2005.
So the ideal answer to this question and a solution that I would gladly award 500 points for would be if someone can give me a working example of how to modify Microsoft's sample code (from the link above) to compile in VS2005 and successfully deploy to the WM5.0 emulator (optional) and my physical WM5.0 device (required).
However if anyone has any other suggestions or comments about my approach or an alternative than seems more desirable or has a higher probability of success, I will divy up so points for any useful information about that as well.
One other factor: there will be an ActiveX component involved in the application as well, for the User Interface. I know that without third-party software, this will have to be accomplished via C++ as well. However, besides the video playback and the ActiveX control, I am hoping to implement as much of the rest of the application logic as possible in C#. So after I get a working standalone VS2005 C++ app playing video via DirectShow (which is my immediate goal so I can test performance on the hardware), I am hoping to create a new project that is a wrapper DLL rather than an actual application, and to have the ability to access that and any other C++ code from through the wrapper DLLs from the main C# application. This is not an absolute requirement but would be a HUGE benefit unless it might cause performance issues.
All feedback is welcome! Thanks in advance!
Start Free Trial