2012-07-26 134 views
2

我已經花了最後兩個星期到處搜尋,試圖獲得如何做到這一點的提示。這是我第一次問,當我說我不喜歡尋求幫助時,請相信我。如何獲取C#中的音頻/視頻和捕獲設備列表?

但我在我的繩索末端,我能找到的是如何使用C#中的其他人的框架列出可用的音頻和視頻設備。我想要做的就是列出可用的C#音頻和視頻設備連接到一臺電腦,無需任何額外的第三方框架。

如果你們有任何人可以幫忙,我將不勝感激。就像我說的,我正在試圖找出如何做到這一點。

謝謝!

回答

0

谷歌搜索後"C# get video capture devices"。我結束了在這兩個CodeProject上的文章:

你會看到有很多的COM互操作涉及的。從它的聲音來看,我不確定你是否準備好了解這一點,因爲它可能是一項繁瑣的工作。我會考慮使用那裏的東西,而不是重新發明輪子。畢竟,他們都在public domain

此外,還有這個職位上的StackOverflow其中有一些相關鏈接:

+0

謝謝!這使我指出了正確的方向! – VincePaltop 2012-07-26 05:28:44

1

嘗試aForge.net http://www.aforgenet.com/這是相當簡單的做正是,或者您可以使用自己的準備如果對於你來說已經足夠了,你可以進行對話

-2
 /// <summary> 
     /// The DirectSoundEnumerate function enumerates the DirectSound Odrivers installed in the system. 
     /// </summary> 
     /// <param name="lpDSEnumCallback">callback function</param> 
     /// <param name="lpContext">User context</param> 
     [DllImport("dsound.dll", EntryPoint = "DirectSoundEnumerateA", SetLastError = true, CharSet = CharSet.Unicode, ExactSpelling = true, CallingConvention = CallingConvention.StdCall)] 
     static extern void DirectSoundEnumerate(DevicesEnumCallback lpDSEnumCallback, IntPtr lpContext); 


     /// <summary> 
     /// The DirectSoundEnumerate function enumerates the DirectSound Input drivers installed in the system. 
     /// </summary> 
     /// <param name="lpDSEnumCallback">callback function</param> 
     /// <param name="lpContext">User context</param> 
     [DllImport("dsound.dll", EntryPoint = "DirectSoundCaptureEnumerateA", SetLastError = true, CharSet = CharSet.Unicode, ExactSpelling = true, CallingConvention = CallingConvention.StdCall)] 
     static extern void DirectSoundCaptureEnumerate(DevicesEnumCallback lpDSEnumCallback, IntPtr lpContext); 
+2

@jam:這裏沒什麼可說明的。這些是針對過時的僅音頻API的P/Invoke聲明。它並不真正回答原來的問題。 – 2013-10-02 11:12:03

相關問題