DirectShow

J

jcak77

Hi,

Has anyone managed to use DirectShow from managed code om windows
mobile?

I have tried using the DShowNET COM wrapper that can be found on
CodeProject, but it uses a lot of classes from
System.Runtime.InteropServices that are not available in CF 3.5 :-(

Does anybody know an alternative for playing a video inside a managed
application (in its own Form) ? Even a commercial one will be ok...

Thanks,
Julien
 
C

Chris Tacke, MVP

Under WinMo it's much easier to embed the WMP activeX control in your form.
OpenNETCF has a commecial wrapper for it.


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com
 
P

pdr75

Hi,

Has anyone managed to use DirectShow from managed code om windows
mobile?

I have tried using the DShowNET COM wrapper that can be found on
CodeProject, but it uses a lot of classes from
System.Runtime.InteropServices that are not available in CF 3.5 :-(

Does anybody know an alternative for playing a video inside a managed
application (in its own Form) ? Even a commercial one will be ok...

Thanks,
Julien

If you're stuck and have to use DirectShow in your managed app, you'll
have to do some C++ coding. As a starting point, the WM5 SDK R2
contains a sample project called CameraCapture (by default found in
Program Files\Windows Mobile 5.0 SDK R2\Samples\PocketPC\CPP\Win32) -
it's a Win32 project that provides basic a DirectShow implementation
for capturing photos / video from the device's color camera.

Additionally, Marcus Perryman took that project and coverted it into a
C++ dll that can be consumed in a managed app through P/Invoke.

See: http://blogs.msdn.com/marcpe/archive/2006/03/03/542941.aspx

I would imagine that can be used as a launch pad for doing what you
want to do. You'll have to take his DLL project and add in your own
support for playing back video. Video playback examples can be found
in the Direct Show SDK documentation.

Cheers,
Paul
 
J

jcak77

Under WinMo it's much easier to embed the WMP activeX control in your form.
OpenNETCF has a commecial wrapper for it.

Thanks Chris.
At first I was using the WMP activeX control, but I had three problems
with it:
- Video was awfully slow and not sync'ed with audio (which doesn't
happen when WMP is opened as a standalone application). (this wasn't
solved by using directshow)
- I could not hook any UI-related event listener to it. I don't want
its ugly skin to show up so i played the video fullscreen and hide the
ui, but then it seemed impossible to get an event when the user tapped
the video window (for closing it). (This was solved using directshow)

Also, with the directshow approach, I got things working up to the
point I got DirectDraw in my app and could not see the video anymore.
Apparently one process can only have one DIrectDraw instance. I tried
to obtain a IDirectDrawVideo object with no luck. The HTC directshow
libraries reported that they could not find an adequate video codec
(which they could when i didn't use directdraw).

I've given up. The whole platform sucks. This is desktop windows back
in 1996. I hope things get better in a few years...
Thanks.
 
J

jcak77

I've given up.

For reference, as I'm sure other people are facing/will face the same
problem, what I would do if I had some time left to work on this issue
would be to write a fullscreen standalone player in unmanaged code,
using directshow and directdraw, and supporting the exit-on-click
feature. Then I would call this external program from my managed app.
This way, there would not be any intra-process directdraw instance
sharing issue and everything would work ok.

JC
 
C

Chris Tacke, eMVP

Interesting, we created a CF control that wraps the ActiveX control and
don't have any of these issues. Playback is reasonable (same speed as
running in WMP itself) and it can be hosted inside any CF app without the
WMP UI.


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com


Under WinMo it's much easier to embed the WMP activeX control in your
form.
OpenNETCF has a commecial wrapper for it.

Thanks Chris.
At first I was using the WMP activeX control, but I had three problems
with it:
- Video was awfully slow and not sync'ed with audio (which doesn't
happen when WMP is opened as a standalone application). (this wasn't
solved by using directshow)
- I could not hook any UI-related event listener to it. I don't want
its ugly skin to show up so i played the video fullscreen and hide the
ui, but then it seemed impossible to get an event when the user tapped
the video window (for closing it). (This was solved using directshow)

Also, with the directshow approach, I got things working up to the
point I got DirectDraw in my app and could not see the video anymore.
Apparently one process can only have one DIrectDraw instance. I tried
to obtain a IDirectDrawVideo object with no luck. The HTC directshow
libraries reported that they could not find an adequate video codec
(which they could when i didn't use directdraw).

I've given up. The whole platform sucks. This is desktop windows back
in 1996. I hope things get better in a few years...
Thanks.
 
Joined
Mar 24, 2009
Messages
1
Reaction score
0
Hi,

Could you please tell me where can I found that CF control?
That will be very useful for my project.

Chris Tacke said:
Interesting, we created a CF control that wraps the ActiveX control and
don't have any of these issues. Playback is reasonable (same speed as
running in WMP itself) and it can be hosted inside any CF app without the
WMP UI.


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com


"jcak77" wrote in message
news:[email protected]...
On Dec 17, 12:35 pm, "Chris Tacke, MVP"
wrote:
> Under WinMo it's much easier to embed the WMP activeX control in your
> form.
> OpenNETCF has a commecial wrapper for it.


Thanks Chris.
At first I was using the WMP activeX control, but I had three problems
with it:
- Video was awfully slow and not sync'ed with audio (which doesn't
happen when WMP is opened as a standalone application). (this wasn't
solved by using directshow)
- I could not hook any UI-related event listener to it. I don't want
its ugly skin to show up so i played the video fullscreen and hide the
ui, but then it seemed impossible to get an event when the user tapped
the video window (for closing it). (This was solved using directshow)

Also, with the directshow approach, I got things working up to the
point I got DirectDraw in my app and could not see the video anymore.
Apparently one process can only have one DIrectDraw instance. I tried
to obtain a IDirectDrawVideo object with no luck. The HTC directshow
libraries reported that they could not find an adequate video codec
(which they could when i didn't use directdraw).

I've given up. The whole platform sucks. This is desktop windows back
in 1996. I hope things get better in a few years...
Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top