// Change the routing of this source to another destination public static bool routing_change(IntPtr p_instance, ref source_t p_source) { if (IntPtr.Size == 8) { return(UnsafeNativeMethods.routing_change_64(p_instance, ref p_source)); } else { return(UnsafeNativeMethods.routing_change_32(p_instance, ref p_source)); } }
// Retrieve the source information for the given router instance. // This can throw an ArgumentException or ArgumentNullException! public static source_t routing_get_source_name(IntPtr p_instance, ref source_t p_failover_source) { if (IntPtr.Size == 8) { return((source_t)Marshal.PtrToStructure(UnsafeNativeMethods.routing_get_source_name_64(p_instance), typeof(source_t))); } else { return((source_t)Marshal.PtrToStructure(UnsafeNativeMethods.routing_get_source_name_32(p_instance), typeof(source_t))); } }
// This will assign a new fail-over source for this video source. What this means is that if this video source was to fail // any receivers would automatically switch over to use this source, unless this source then came back online. You can specify // NULL to clear the source. public static void send_set_failover(IntPtr p_instance, ref source_t p_failover_source) { if (IntPtr.Size == 8) { UnsafeNativeMethods.send_set_failover_64(p_instance, ref p_failover_source); } else { UnsafeNativeMethods.send_set_failover_32(p_instance, ref p_failover_source); } }
internal static extern bool routing_change_32(IntPtr p_instance, ref source_t p_source);
internal static extern void send_set_failover_32(IntPtr p_instance, ref source_t p_failover_source);
public static extern void send_set_failover(IntPtr p_instance, ref source_t p_failover_source);
private void HookManager_KeyPress(object sender, KeyPressEventArgs e) { this.source = source_t.KEY_PRESSED; this.Notify(); }
private void HookManager_MouseMove(object sender, MouseEventArgs e) { this.source = source_t.MOUSE_MOVED; this.Notify(); }