首页
论坛
新职位
搜索论坛
什么's new
新职位
新的个人资料帖子
最新活动
会员
目前的访客
新的个人资料帖子
搜索个人资料帖子
VB.NET社区
登录
登记
什么's new
搜索
搜索
仅搜索标题
经过:
新职位
搜索论坛
Menu
Log in
Register
安装应用
安装
首页
论坛
C#
第三方产品
Blackmagic Videohub
您正在使用过期的浏览器。它可能无法正确显示此网站或其他网站。
您应该升级或使用
替代浏览器
.
回复主题
信息
<blockquote data-quote="noumaan" data-source="post: 9425" data-attributes="member: 11321"><p>Hi Folks,</p><p></p><p>i'm trying to write Blackmagic Videohub application in c# but unfortunately BMD does not provide any sample project for C#.</p><p>please someone help me to understand about VideoHub interface and addref in C#</p><p></p><p>My Code is:</p><p>[XCODE=c#]private Videohub.HubMonitor m_hubMonitor;</p><p>public Form1()</p><p>{</p><p> InitializeComponent();</p><p>}</p><p>IVideohubDiscovery videoHubDiscovery;</p><p>public static IVideohub m_hub;</p><p>static IVideohubState m_state;</p><p>private void button1_Click(object sender, EventArgs e)</p><p>{</p><p> videoHubDiscovery = new CVideohubDiscovery();</p><p> try</p><p> {</p><p> videoHubDiscovery.ConnectTo(TBserver.Text, 10000, out m_hub);</p><p> }</p><p> catch(COMException ex)</p><p> {</p><p> if (ex.HResult == -2147467259)</p><p> MessageBox.Show("Connection Timeout");</p><p> return;</p><p> }</p><p> m_hub.GetState(out m_state);</p><p> uint index = 0;</p><p> _BMDVideohubHardwareState hardware = new _BMDVideohubHardwareState();</p><p> System.Diagnostics.Debug.WriteLine("--- Video input ports\n");</p><p> while (index <= 40 - 1)</p><p> {</p><p> m_state.GetLabel(_BMDVideohubPortType.BMDVideohubVideoInputPort, index, out string label);</p><p> m_state.GetHardware(_BMDVideohubPortType.BMDVideohubVideoInputPort, index, out hardware);</p><p> string bstrLabel = label;</p><p> System.Diagnostics.Debug.WriteLine(" \n " + index + " " + hardware.ToString() + " " + bstrLabel);</p><p> index++;</p><p> }</p><p> //m_hubMonitor = new Videohub.HubMonitor(m_hub);</p><p> //m_hub.AddVideohubCallback(m_hubMonitor);</p><p>}[/XCODE]</p><p>i'm getting input ports like this but when i'm trying to get input ports by calling callback i get E_NOINTERFACE error or even i try to get input ports from another method i get same E_NOInterface error</p><p></p><p>callback error line is:</p><p>[XCODE=c#]public HubMonitor(IVideohub hub)</p><p>{</p><p> m_hub = hub;</p><p>}</p><p></p><p>void IVideohubCallback.StateChanged()</p><p>{</p><p> if (m_state == null)</p><p> {</p><p> m_hub.GetState(out m_state); //Getting Error Here NOINTERFACE</p><p> DumpState(m_state);</p><p> }</p><p> else</p><p> {</p><p> m_hub.GetState(out m_state);</p><p> DumpState(m_state);</p><p> }</p><p>}[/XCODE]waiting for help</p><p></p><p>thanks and regards,</p><p>Noumaan</p></blockquote><p></p>
Insert quotes…
确认
发表回复
首页
论坛
C#
第三方产品
Blackmagic Videohub
本网站使用Cookie来帮助个性化内容,调整您的体验并在注册时保持登录状态。
继续使用本网站,即表示您同意我们使用cookie。
接受
了解更多…
最佳
底部