Advertisement

01.11.2006 at 06:37PM PST, ID: 21693415
[x]
Attachment Details

DirectShow video playback on Windows Mobile 5.0 using Visual Studio 2005

Asked by cprice404 in Windows MobileProgramming

Tags: windows, mobile, directshow

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.asp

I 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((OAHWND)g_hwnd, 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
[+][-]01.12.2006 at 03:41AM PST, ID: 15680216

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.12.2006 at 05:06AM PST, ID: 15680762

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.12.2006 at 06:52AM PST, ID: 15681722

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01.12.2006 at 06:55AM PST, ID: 15681736

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01.12.2006 at 03:21PM PST, ID: 15687216

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]01.12.2006 at 03:22PM PST, ID: 15687222

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.12.2006 at 03:23PM PST, ID: 15687229

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.12.2006 at 03:35PM PST, ID: 15687317

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01.12.2006 at 05:49PM PST, ID: 15688033

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01.12.2006 at 06:47PM PST, ID: 15688327

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.12.2006 at 06:49PM PST, ID: 15688341

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.12.2006 at 07:10PM PST, ID: 15688434

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01.12.2006 at 07:49PM PST, ID: 15688617

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.12.2006 at 08:03PM PST, ID: 15688687

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01.12.2006 at 08:06PM PST, ID: 15688710

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01.12.2006 at 08:14PM PST, ID: 15688747

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.12.2006 at 08:38PM PST, ID: 15688846

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01.12.2006 at 08:44PM PST, ID: 15688866

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.12.2006 at 09:00PM PST, ID: 15688911

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01.12.2006 at 09:02PM PST, ID: 15688921

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01.13.2006 at 12:35AM PST, ID: 15689760

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.13.2006 at 12:38AM PST, ID: 15689770

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.13.2006 at 02:05AM PST, ID: 15690092

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.13.2006 at 06:47AM PST, ID: 15691712

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01.13.2006 at 09:03AM PST, ID: 15693159

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01.13.2006 at 09:13AM PST, ID: 15693269

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01.13.2006 at 09:28AM PST, ID: 15693426

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01.13.2006 at 10:36AM PST, ID: 15694055

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01.13.2006 at 08:27PM PST, ID: 15698552

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.13.2006 at 09:06PM PST, ID: 15698678

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Windows MobileProgramming
Tags: windows, mobile, directshow
Sign Up Now!
Solution Provided By: umahesh
Participating Experts: 4
Solution Grade: A
 
 
[+][-]01.13.2006 at 09:11PM PST, ID: 15698692

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.15.2006 at 08:10AM PST, ID: 15705151

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32