- Posts: 2
- Joined: Tue Dec 29, 2015 7:05 am
titile: how to use multiple H.264ProRecorder
I'm trying to use multiple H.264ProRecorder in C sharp Form application
But I can't figure out how to identify devices over CBMDStreamingDiscovery's callbacks;
For example, when the multiple IDeckLink devices are connected, disconnects one of them and then StreamingDeviceRemoved is called, which device should I think is removed?
IDeckLink.GetDisplayName always return the same name. So it can't be used.
Could you suggest me what is the proper way to do it?
Here's my example code
Software:::::Visual Studio 2013 Professional, .Net framework 4.5, Visual C# Form Appication
Environment:::::Windows 7 Professional 64bit, Intel(R) Core(TM) i7-4470/3.4GHz, RAN16GB
I'm trying to use multiple H.264ProRecorder in C sharp Form application
But I can't figure out how to identify devices over CBMDStreamingDiscovery's callbacks;
For example, when the multiple IDeckLink devices are connected, disconnects one of them and then StreamingDeviceRemoved is called, which device should I think is removed?
IDeckLink.GetDisplayName always return the same name. So it can't be used.
Could you suggest me what is the proper way to do it?
Here's my example code
- Code: Select all
using System;
using System.Collections.Generic
using System.Windows.Forms;
using DeckLinkAPI
namespace Test
{
public partial class Form1 : Form, IBMDStreamingDeviceNotifiationCallback
{
private List<IDeckLink> deviceList;
private CBMDStreamingDiscovery discovery;
public Form1()
{
InitializeComponent();
this.discovery = new CBMDStreamingDiscovery();
this.discovery.InstallDeviceNotification(this);
}
public void StreamingDeviceArrived(IDeckLink device)
{
this.deviceList.Add(device);
}
public void StreamingDeviceModeChanged(IDeckLink device, _BMDStreamingDeviceMode mode)
{
}
public void StreamingDeviceRemoved(IDeckLink device)
{
// idenfify the device by reference value
// is this a correct solution?
// does it always keep the same reference?
this.deviceList.Remove(devie)
}
}
}
Software:::::Visual Studio 2013 Professional, .Net framework 4.5, Visual C# Form Appication
Environment:::::Windows 7 Professional 64bit, Intel(R) Core(TM) i7-4470/3.4GHz, RAN16GB