DirectShow在C#中的Windows移动策略? [英] Directshow in C# for windows mobile- strategy?

查看:176
本文介绍了DirectShow在C#中的Windows移动策略?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想弄清楚如何添加一些直接显示功能到C#应用程序(.net cf 3.5运行在移动6及以上),我很难知道如何弥合使用之间的差距

I'm trying to figure out how to add some directshow capabilities to a C# application (.net cf 3.5 running on mobile 6 and up), and I'm having a hard time figuring out how to bridge the gap between using unmanaged c++ class(es) in managed C#.

我已经在C ++中编写了我需要的功能:基本上,我有一个管理器类,使用COM来接入所需的directshow功能。 快速免责声明:我是COM的新手,我很高兴将C ++与C#整合。

I've already written the functionality I need in C++: Basically, I have a manager class that uses COM to tap into the needed directshow functionality. Quick Disclaimer: I'm new to COM, and I'm VERY new to integrating C++ with C#.

真的希望有知识的人能够为我进一步研究提供一个基本策略。以下是我研究过的一些问题,以及他们发现的问题:

I'm really hoping that someone knowledgeable can suggest a basic strategy for me to research further. Here are some that I've looked into, and the problems I've found with them:


  1. 创建C ++ DLL,然后从C#调用它。

    PROBLEM:智能设备平台,创建托管C ++ dll不是一个选项,所以C#不幸的是不能直接调用我的c ++ dll。 从C#(通过COM)创建我的非托管C ++dshow manager类的实例是最好的选择?

创建一个C ++ DLL,然后Pinvoke / DLLImport所需的方法。

PROBLEM:我的解决方案有一个事件监听器和东西,所以我需要维护一个管理器类的实例

Create a C++ DLL, then just Pinvoke/DLLImport the methods that are needed.
PROBLEM: My solution has an event listener and stuff, so I need to maintain an instance of the manager class (see option 3), not just call into individual methods.

在C#中复制C ++类,然后通过COM调用dshow方法C#。
PROBLEM:这似乎是对我最好的选择,但从我在这里找到 MSDN ,我需要首先创建管理定义的com接口和类型,不幸的是我找不到directshow TLB文件通过TLBImp.exe导入。所有的WM6 SDK给我的是dshow LIB,PDB和EXP。

Replicate the C++ class in C#, then just call the dshow methods via COM from C#. PROBLEM: This seems like the best option to me, but from what I've found here MSDN, I need to first "create managed definitions of com interfaces and types", and unfortunately I can't find the directshow TLB files to import via TLBImp.exe. All the WM6 SDK gives me are dshow LIBs, PDBs, and EXPs. I can't even find IDL files to create TLBs from, as some sites have suggested.

因为一些网站的建议,我甚至不能找到IDL文件来创建TLB。我还在寻找东西,但是现在卡住了。有什么建议么?
THANKS IN ADVANCE!

As it stands, I'm still looking into things, but kind of stuck now. Any suggestions? THANKS IN ADVANCE!

推荐答案

您可能会看到桌面DShow.NET库作为移植指南。 Alex Mogurenko的最近在WinMo上使用DShow播放音频和视频的博客也是一个很好的资源。

You could probably look at the desktop DShow.NET library as a guide to porting. Alex Mogurenko's recent blog on playing audio and video with DShow on WinMo is also a good resource.

编辑:我想我没有直接回答问题战略。是的,#3是要走的路。封装DShow并调用它,不要添加另一层混乱的间接(COM已经足够混乱)。

I guess I didn't directly answer the question on strategy. Yes, #3 is the way to go. Wrap DShow and call it, don't add yet another layer of confusing indirection (COM is confusing enough already).

这篇关于DirectShow在C#中的Windows移动策略?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆