- Posts: 6
- Joined: Thu Nov 21, 2019 8:57 pm
- Real Name: Cam Leeper
I have a DeckLink Quad HDMI Recorder. I am looking to keep track of each HDMI ports Connected/Disconnected state.
What I have:
I have seen in the CSharpStills example that the VideoFrameArrived handler is used to see if invalid frames are coming and if so an error dialog is shot out and won't allow captures. I have implemented something similar. I have started streams for all 4 and if I receive so many consecutive invalid/valid frames then I determine it is disconnected or connected. That means from the card all 4 inputs are enabled and sending streams all the time. On my application I am constantly handling frames for all 4 inputs whether they are connected or not. It seems too busy and inefficient...
There has to be a better way:
I'm thinking the DeckLink card is sending out some event, callback, flag or something else that I can handle on more of a true Disconnect/Connnect event basis. This is what I have looked at:
What I have:
I have seen in the CSharpStills example that the VideoFrameArrived handler is used to see if invalid frames are coming and if so an error dialog is shot out and won't allow captures. I have implemented something similar. I have started streams for all 4 and if I receive so many consecutive invalid/valid frames then I determine it is disconnected or connected. That means from the card all 4 inputs are enabled and sending streams all the time. On my application I am constantly handling frames for all 4 inputs whether they are connected or not. It seems too busy and inefficient...
There has to be a better way:
I'm thinking the DeckLink card is sending out some event, callback, flag or something else that I can handle on more of a true Disconnect/Connnect event basis. This is what I have looked at:
- 1. IDeckLinkInput
DoesSupportVideoMode is the closest thing I could find in IDeckLinkInput... No arguments or outputs that provide anything around a connection status.
DoesSupportVideoMode(BMDVideoConnection connection,BMDDisplayMode requestedMode,BMDPixelFormat requestedPixelFormat,BMDSupportedVideoModeFlags flags, bool **supported)
The DoesSupportVideoMode method indicates whether a given display mode is supported
Name | Direction | Description
connection | in |Input connection to check (see BMDVideoConnection for details).
requestedMode | in | Display mode to check
requestedPixelFormat | in | Pixel format to check
flags | in | Input video mode flags (see BMDSupportedVideoModeFlags for details).
supported | out | Returns true if the display mode is supported.
2. At first I thought I could use the IDeckLinkNotification[Callback] but then I read in 2.4.4 "A callback notification can be provided to an application when a Thunderbolt or USB 3.0 based DeckLink device is connected or disconnected." I have PCIe card...
3. IBMDStreamingH264InputCallback has H264VideoInputConnectorChanged but I think this is for the H.264 Pro Recorder