Advertisement

01.11.2006 at 06:37PM PST, ID: 21693415
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

DirectShow video playback on Windows Mobile 5.0 using Visual Studio 2005

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 your free trial to view this solution
Question Stats
Zone: Programming
Question Asked By: cprice404
Solution Provided By: umahesh
Participating Experts: 4
Solution Grade: A
Views: 179
Translate:
Loading Advertisement...
01.12.2006 at 03:41AM PST, ID: 15680216

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
01.12.2006 at 05:06AM PST, ID: 15680762

Rank: Sage

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
01.12.2006 at 06:52AM PST, ID: 15681722

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
01.12.2006 at 06:55AM PST, ID: 15681736

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
01.12.2006 at 03:21PM PST, ID: 15687216

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
01.12.2006 at 03:22PM PST, ID: 15687222

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
01.12.2006 at 03:23PM PST, ID: 15687229

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
01.12.2006 at 03:35PM PST, ID: 15687317

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
01.12.2006 at 05:49PM PST, ID: 15688033

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
01.12.2006 at 06:47PM PST, ID: 15688327

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
01.12.2006 at 06:49PM PST, ID: 15688341

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
01.12.2006 at 07:10PM PST, ID: 15688434

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
01.12.2006 at 07:49PM PST, ID: 15688617

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
01.12.2006 at 08:03PM PST, ID: 15688687

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
01.12.2006 at 08:06PM PST, ID: 15688710

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
01.12.2006 at 08:14PM PST, ID: 15688747

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
01.12.2006 at 08:38PM PST, ID: 15688846

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
01.12.2006 at 08:44PM PST, ID: 15688866

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
01.12.2006 at 09:00PM PST, ID: 15688911

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
01.12.2006 at 09:02PM PST, ID: 15688921

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
01.13.2006 at 12:35AM PST, ID: 15689760

Rank: Master

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
01.13.2006 at 12:38AM PST, ID: 15689770

Rank: Master

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
01.13.2006 at 02:05AM PST, ID: 15690092

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
01.13.2006 at 06:47AM PST, ID: 15691712

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
01.13.2006 at 09:03AM PST, ID: 15693159

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
01.13.2006 at 09:13AM PST, ID: 15693269

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
01.13.2006 at 09:28AM PST, ID: 15693426

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
01.13.2006 at 10:36AM PST, ID: 15694055

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
01.13.2006 at 08:27PM PST, ID: 15698552

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
01.13.2006 at 09:06PM PST, ID: 15698678

Rank: Master

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
01.13.2006 at 09:11PM PST, ID: 15698692

Rank: Master

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
01.15.2006 at 08:10AM PST, ID: 15705151

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
Loading Advertisement...
Microsoft
  • Internet Protocols
  • Applications
  • Development
  • OS
  • Hardware
  • Windows Security
Apple
  • Operating Systems
  • Hardware
  • Programming
  • Networking
  • Software
Internet
  • Search Engines
  • File Sharing
  • WebTrends / Stats
  • Spy / Ad Blockers
  • Web Browsers
  • New Net Users
  • Web Development
  • Chat / IM
  • Anti Spam
  • Web Servers
  • Anti-Virus
  • Email Clients
Gamers
  • Tips
  • Online / MMORPG
  • Puzzle
  • Emulators
  • Action / Adventure
  • Role Playing
  • Consoles
  • Game Programming
  • Strategy
  • Sports
  • Misc
  • Computer Games
Digital Living
  • Hardware
  • New Net Users
  • New Users
  • Software
  • Digital Music
  • Gaming World
  • Home Security
  • Apple
  • Networking Hardware
Virus & Spyware
  • Vulnerabilities
  • IDS
  • Encryption
  • Anti-Virus
  • Operating Systems Security
  • Software Firewalls
  • WebApplications
  • Cell Phones
  • Operating Systems
  • Internet
  • Hardware Firewalls
Hardware
  • Handhelds / PDAs
  • Displays / Monitors
  • Components
  • Networking Hardware
  • Peripherals
  • Laptops/Notebooks
  • Storage
  • Servers
  • Desktops
  • New Users
  • Misc
  • Apple
Software
  • System Utilities
  • Industry Specific
  • Network Management
  • Photos / Graphics
  • Page Layout
  • VMWare
  • Misc
  • Web Development
  • OS
  • CYGWIN
  • Voice Recognition
  • Message Queue
  • Quality Assurance
  • Security
  • Firewalls
  • MultiMedia Applications
  • Development
  • Database
  • Office / Productivity
  • Business Management
  • OS/2 Apps
  • Server Software
  • Internet / Email
ITPro
  • OS
  • Storage
  • Encryption
  • Operating Systems Security
  • Apple Hardware
  • Laptops & Notebooks
  • Servers
  • Networking Hardware
  • Peripherals
  • Devices
  • Displays / Monitors
  • WebTrends / Stats
  • Search Engines
  • Firewalls
  • WebApplications
  • IDS
  • Vulnerabilities
  • Email Clients
  • File Sharing
  • Spy / Ad Blockers
  • Web Browsers
  • Web Servers
  • Networking
  • Anti-Virus
  • Chat / IM
  • Anti Spam
Developer
  • Web Servers
  • Web Browsers
  • Game Programming
  • Dev Tools
  • Industry Specific
  • Office / Productivity
  • Database
  • CYGWIN
  • Web Development
  • Search Engines
  • File Sharing
  • WebTrends / Stats
  • Programming
  • Content Management
  • Application Servers
  • Protocols
Storage
  • Removable Backup Media
  • Storage Technology
  • Servers
  • Grid
  • Remote Access
  • Backup / Restore
  • Misc
  • Hard Drives
OS
  • Miscellaneous
  • Security
  • Development
  • Linux
  • VMWare
  • MainFrame OS
  • Unix
  • Apple
  • OS / 2
  • AS / 400
  • BeOS
  • Microsoft
  • VMS / OpenVMS
Database
  • Oracle
  • Miscellaneous
  • MySQL
  • Software
  • Sybase
  • Contact Management
  • PostgreSQL
  • Data Manipulation
  • Clarion
  • InterSystems Cache
  • Siebel
  • MUMPS
  • OLAP
  • SQLBase
  • SAS
  • GIS & GPS
  • 4GL
  • Berkeley DB
  • DB2
  • Informix
  • Interbase / Firebird
  • FoxPro
  • Reporting
  • LDAP
  • Filemaker Pro
  • MS SQL Server
  • dBase
  • MS Access
Security
  • Misc
  • Web Browsers
  • Software Firewalls
  • Operating Systems Security
  • File Sharing
  • Spy / Ad Blockers
  • Vulnerabilities
  • WebApplications
  • IDS
  • Anti-Virus
  • Encryption
  • Anti Spam
  • Email Clients
  • VPN
  • Chat / IM
Programming
  • Editors IDEs
  • Installation
  • Handhelds / PDAs
  • Multimedia Programming
  • System / Kernel
  • Algorithms
  • Game
  • Signal Processing
  • Project Management
  • Open Source
  • Database
  • Misc
  • Languages
  • Processor Platforms
  • Theory
Web Development
  • Scripting
  • Blogs
  • Web Servers
  • Software
  • Search Engines
  • Web Graphics
  • Images
  • Internet Marketing
  • Images and Photos
  • Components
  • Document Imaging
  • Web Languages/Standards
  • Illustration
  • WebApplications
  • Fonts
  • WebTrends / Stats
  • Authoring
  • Digital Camera Software
  • Miscellaneous
Networking
  • Protocols
  • Apple Networking
  • Network Management
  • Message Queue
  • Application Servers
  • Content Management
  • File Servers
  • Email Servers
  • Misc
  • Java Editors & IDEs
  • Wireless
  • Networking Hardware
  • Backup / Restore
  • System Utilities
  • ISPs & Hosting
  • Web Servers
  • Storage Technology
  • Removable Backup Media
  • Servers
  • Broadband
  • Grid
  • OS / 2
  • Novell Netware
  • Unix Networking
  • Windows Networking
  • Security
  • Telecommunications
  • Operating Systems
  • Linux Networking
Other
  • Community Advisor
  • Lounge
  • Community Support
  • New Net Users
  • Philosophy / Religion
  • Math / Science
  • Miscellaneous
  • URLs
  • Expert Lounge
  • Politics
  • Puzzles / Riddles
Community Support
  • Suggestions
  • New to EE
  • New Topics
  • Community Advisor
  • CleanUp
  • Announcements
  • General
  • Feedback
  • Input
  • EE Bugs
 
01.12.2006 at 03:41AM PST, ID: 15680216
Make sure you DirectX Include/Lib path are BEFORE the Microsoft Includes.
 
01.12.2006 at 05:06AM PST, ID: 15680762

Rank: Sage

why dont you use windows media player?
 
01.12.2006 at 06:52AM PST, ID: 15681722
mahesh1402:  thank you for your comment.  However the compile error is coming from this line:

pEvent->SetNotifyWindow((OAHWND)g_hwnd, WM_GRAPHNOTIFY, 0);

the specific compile error is:

syntax error:  missing ')' before ';'

if you look at the line that is causing the compile error, you will notice that syntactically it looks perfectly correct.  The parentheses are matched up.  This implies to me that whatever the compiler is replacing WM_GRAPHNOTIFY with (due to the #define line), is causing the syntax error.  The define line is:

#define WM_GRAPHNOTIFY  WM_APP + 1

I have no idea what the previous definition for "WM_APP" might be, but I'm assuming that it most include some kind of special character like a semicolon.  That's the only thing I can think of that would cause the syntax error at compile time--because the line looks perfectly syntactically correct to me.
 
01.12.2006 at 06:55AM PST, ID: 15681736
Mikal613:  Thank you for your comment, however, as I stated in my original post:

"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 understand that WMP is included in the WinMobile 5.0 platform that I am using for testing, but that does me no good because it won't be available on my final target platform.
 
01.12.2006 at 03:21PM PST, ID: 15687216
is the line before the pEvent correct?

if it is then i don't see how it wont work, as puzzled as you, as you said, the syntax is perfectly correct.

BTW, WM_APP is defined as 0x8000, so there is no error there.

It is most likely that something in the code before this is stuffed up and the compiler only picked up the error now.

what you can try, is repleace the code with

pEvent->SetNotifyWindow(Null, 0, 0);

does that stil give you syntax error? if so then maybe the lines before it are really messed up

Also, doesnt the SetNotifyWindow thing belong to <dshow.h>? *I'm not sure about the CE5 header*
Assisted Solution
 
01.12.2006 at 03:22PM PST, ID: 15687222
on another Note, TCPMP is a open source project isnt it?
 
01.12.2006 at 03:23PM PST, ID: 15687229
also, try doing this:


pEvent->SetNotifyWindow((OAHWND)g_hwnd, (0x8000 + 1), 0);
 
01.12.2006 at 03:35PM PST, ID: 15687317
TCPMP *used* to be an open source project, and technically I think they are still willing to provide source under certain circumstances, but they no longer make the source available in their download package.  I am under the impression that they are in the process of changing their licensing model.  I have sent them e-mail to try to get an idea of what their plans are for the licensing model, and what requirements they now have for acquiring the source, but I haven't heard back from them yet.  I expect that those folks are pretty darn busy and am not expecting them to be very responsive in getting back to me, which is one of the reasons I'm leaning towards rolling my own player instead of trying to integrate theirs.  It's a shame because I am confident that my company would be willing to pay them for some commercial support but it just doesn't seem likely that they are going to have the time or interest in that.

Thank you for the code suggestions, and especially for the info about the definition of WM_APP.  Your suggestions make a lot of sense, and those are some good clues as to how I can try to figure out what's wrong.  I will try them out and post any further info that I can glean.
 
01.12.2006 at 05:49PM PST, ID: 15688033
sakuya_su, you are my hero :)

thanks to your help I solved a big part of my problem.  i am giving you at least 250 points of the 500 for this question.

unfortunately i am still having a problem, so i would like to ask a further question or two and see if you or anyone else can help before i "accept" a final answer.

The problem is, WM_APP was never being defined.  I thought that was supposed to happen from including <windows.h>, but apparently either I am wrong about that or it is different for WinCE/WinMobile than it is for other Win32 OS's.

so, for the time being, I changed:

#define WM_GRAPHNOTIFY  WM_APP + 1

to

#define WM_GRAPHNOTIFY  (0x8000 + 1)

and now my app compiles and deploys to the WinMobile5.0 emulator successfully.  Unfortunately, the program crashes on this line:

pGraph->RenderFile(L"\\mymovie.avi", NULL);

I get an exception window that reads:

Unhandled exception at 0x00011198 in DirectShowWM5_cpp_Win32.exe:
0xC0000005: Access violation reading location 0x00000000.

Forgive me if this is a stupid question but it's been a while since I've written C++ code, and I've *NEVER* written DirectShow code.  To me, the 0x00000000 instantly implies that I'm somehow trying to do something to a pointer that is set to NULL.  But I copied and pasted this code straight from Microsoft's sample code so I don't know how I could have screwed anything up.  I will be happy to paste my full source if it would be useful but it is pretty much EXACTLY the same as the sample code at the Microsoft URL in my first post in this thread.

The only thing that I could think of was that maybe the filepath that I was specifying was invalid, or that the DirectShow libraries installed on the emulator don't support the video format of my file.  So I've tried moving the file to different folders and adjusting my string accordingly, and I've tried several different file formats:  AVI, MPG, WMV.  I can successfully play the WMV file in the Windows Media Player that is installed in the emulator--but none of the other formats will play in WMP.

The fact that the WMV file will play in WMP implies in my mind that the required codecs for WMV are alive and well on the emulator... so I would think that the DirectShow code should be able to AT LEAST play a WMV file.  But I get the same exception with the "Access Violation 0x00000000" even with the WMV file.  I have the WMV file stored in the root directory of the emulator's filesystem so I don't see how I could possibly have the path string wrong in my code.

So here are my two questions for now:
1) Anybody know what file(s) i need to #include to get WM_APP defined?  I will poke through the .h files in the SDK and see if I can answer that question myself but any suggestions would be great.
2) Anyone familiar enough with DirectShow to have any idea why I am getting this "Accesss Violation 0x00000000" exception?  Where am I screwing up and leaving a pointer NULL?

sakuya_su, again, thanks so much for your help, i'm a lot closer now than i was before!!
 
01.12.2006 at 06:47PM PST, ID: 15688327
apparently, if you use an Pocket PC you'll notice that there are only 3 format WMP can play on a PPC:
 - WMV... duh, its MS
 - Avi with either:
   1. Microsoft MPEG-4 V1 Encoder
   2. or the MS MPEG-4 V2 Encoder

if the code you called upon can actually play WMV< then the code is working? try converting ur Avi to a MPEG-4 Version2 avi file(its actually a WMV file but you can rename it to avi XD).

to do that, you can use the Windows Media Encoder (free)

as for the WM_APP...
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/windowing/messagesandmessagequeues/messagesandmessagequeuesreference/messagesandmessagequeuesmessages/wm_app.asp

it says its declared in winuser.h and includede in windows.h... but what the heck, if it dont work you can just define your own.

good luck
 
01.12.2006 at 06:49PM PST, ID: 15688341
both the MS MPEG-4 V1 and V2 encoder actualy encodes to WMV by defualt, but it is possible to call those encoders with graphedit and attach them to a AVI Muxer, so you can get Avi files with those 2 codecs to play on WMP
 
01.12.2006 at 07:10PM PST, ID: 15688434
Thanks for the info about WM_APP.  I'm not too concerned about that issue because I will either find the right header file, or just define it myself like you suggested.

My program still doesn't work though.  I tried a WMV file--that was the first format I tried since I assumed it was the most likely to work with Microsoft libraries.  It plays fine in the actual Windows Media Player application that was pre-installed on the PocketPC emulator.  But when I try to play it from my DirectShow program, my program still crashes on this line:

pGraph->RenderFile(L"\\mymovie.wmv", NULL);

It still gives me the same exception:

Unhandled exception at 0x00011198 in DirectShowWM5_cpp_Win32.exe:
0xC0000005: Access violation reading location 0x00000000.

The null pointer thing makes me think that there's something else wrong besides the file format--but I'm not sure...
 
01.12.2006 at 07:49PM PST, ID: 15688617
yeah

RenderFile is:

pGraph->RenderFile(Path, NULL);

now, the problem with yours is... "\\myhomemovie.wmv" is not a valid path name.. as \\means a network path

try..

hr = pGraph->RenderFile(L"C:\\Media\\Example.avi", 0);


look at this:
http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/directx9_c/directx/htm/igraphbuilderrenderfile.asp
 
01.12.2006 at 08:03PM PST, ID: 15688687
Thanks for spending so much of yo