views:

881

answers:

5

I have the following requirements:

I need a api that works on CE (x86) + .NET Compact Framework to play videos (Similar to CorePlayer API... Just free)?

Is their anything else available or must I use CorePlayer?

A: 

DirectShow? Check out this page for a starting point. Provided that DirectShow is present on your CE, which I don't know...

EDIT: Since you can use DirectShow, I'd like to add a bit.

As ctacke notes, it can be a lot of work if you do everything manually, but it's pretty straightforward if you can use IGraphBuilder (see the sample I linked above).

I don't know much about DirectShow versions, but the one included with Windows Mobile 6.0 lacks a splitter for MPEG audio. It means, e.g., that out of the box it won't play .mp3 files unless you wrap them in RIFF headers.

atzz
+1  A: 

You could use the MediaPlayer with COM interop. Have a look at this and this.

Also, Media Player may not be installed in your device.

kgiannakakis
Depends on his version of WMP (dictated by the version of CE)
ctacke
A: 

I have full control over the CE image... I can install WMP & DirectShow...

If I use WMP or DirectShow, will I then have codec issues?

rudigrobler
+1  A: 

You need to use DShow and have the codecs for whatever media you intend to play in the image. COM interop for WMP 9.0 (which is what ships up through at least CE 5.0, maybe also in 6.0) is a non-starter for managed code.

If you don't know DShow, it's a fair amount of work - even in native code - as DShow is not a fun or friendly API set.

The plus side is that you don't need WMP at all in the image, so you can typically use a Core CE license (Pro is required to use WMP). I know of a commercial DShow control, but you said you're looking for a free solution and I'm not aware of anything other than rolling your own. Depending on your level of familiarity with COM interop (which you'll need for the DShow stuff) and the use of DShow and filtergraphs, I'd allocate at least a week or two to getting this working.

One added note - the complexity also changes depending on how you want the video displayed. If it's just full-screen then it's a bit less work than getting it inside a Window within your app. Not a lot less, but at least a little.

ctacke
A: 

I bet you can convert some of DirectShow.Net to run on CE if you are looking for a C# solution.

JasonRShaver

related questions