// Add a connection metadata string to the list of what is sent on each new connection. If someone is already connected then // this string will be sent to them immediately. public static void recv_add_connection_metadata(IntPtr p_instance, ref metadata_frame_t p_metadata) { if (IntPtr.Size == 8) { UnsafeNativeMethods.recv_add_connection_metadata_64(p_instance, ref p_metadata); } else { UnsafeNativeMethods.recv_add_connection_metadata_32(p_instance, ref p_metadata); } }
// Free the buffers returned by capture for metadata public static void send_free_metadata(IntPtr p_instance, ref metadata_frame_t p_metadata) { if (IntPtr.Size == 8) { UnsafeNativeMethods.send_free_metadata_64(p_instance, ref p_metadata); } else { UnsafeNativeMethods.send_free_metadata_32(p_instance, ref p_metadata); } }
// This function will send a meta message to the source that we are connected too. This returns FALSE if we are // not currently connected to anything. public static bool recv_send_metadata(IntPtr p_instance, ref metadata_frame_t p_metadata) { if (IntPtr.Size == 8) { return(UnsafeNativeMethods.recv_send_metadata_64(p_instance, ref p_metadata)); } else { return(UnsafeNativeMethods.recv_send_metadata_32(p_instance, ref p_metadata)); } }
// This allows you to receive metadata from the other end of the connection public static frame_type_e send_capture(IntPtr p_instance, ref metadata_frame_t p_metadata, UInt32 timeout_in_ms) { if (IntPtr.Size == 8) { return(UnsafeNativeMethods.send_capture_64(p_instance, ref p_metadata, timeout_in_ms)); } else { return(UnsafeNativeMethods.send_capture_32(p_instance, ref p_metadata, timeout_in_ms)); } }
internal static extern void recv_add_connection_metadata_32(IntPtr p_instance, ref metadata_frame_t p_metadata);
internal static extern bool recv_send_metadata_32(IntPtr p_instance, ref metadata_frame_t p_metadata);
internal static extern void recv_free_metadata_32(IntPtr p_instance, ref metadata_frame_t p_metadata);
internal static extern frame_type_e recv_capture_v2_32(IntPtr p_instance, ref video_frame_v2_t p_video_data, ref audio_frame_v2_t p_audio_data, ref metadata_frame_t p_metadata, UInt32 timeout_in_ms);
// This will allow you to receive video, audio and metadata frames. // Any of the buffers can be NULL, in which case data of that type // will not be captured in this call. This call can be called simultaneously // on separate threads, so it is entirely possible to receive audio, video, metadata // all on separate threads. This function will return NDIlib_frame_type_none if no // data is received within the specified timeout and NDIlib_frame_type_error if the connection is lost. // Buffers captured with this must be freed with the appropriate free function below. public static frame_type_e recv_capture_v2(IntPtr p_instance, ref video_frame_v2_t p_video_data, ref audio_frame_v2_t p_audio_data, ref metadata_frame_t p_metadata, UInt32 timeout_in_ms) { if (IntPtr.Size == 8) { return(UnsafeNativeMethods.recv_capture_v2_64(p_instance, ref p_video_data, ref p_audio_data, ref p_metadata, timeout_in_ms)); } else { return(UnsafeNativeMethods.recv_capture_v2_32(p_instance, ref p_video_data, ref p_audio_data, ref p_metadata, timeout_in_ms)); } }
internal static extern void send_add_connection_metadata_64(IntPtr p_instance, ref metadata_frame_t p_metadata);
internal static extern void send_free_metadata_64(IntPtr p_instance, ref metadata_frame_t p_metadata);
internal static extern frame_type_e send_capture_32(IntPtr p_instance, ref metadata_frame_t p_metadata, UInt32 timeout_in_ms);
// Add a connection metadata string to the list of what is sent on each new connection. If someone is already connected then // this string will be sent to them immediately. public static void send_add_connection_metadata(IntPtr p_instance, ref metadata_frame_t p_metadata) { if (IntPtr.Size == 8) UnsafeNativeMethods.send_add_connection_metadata_64(p_instance, ref p_metadata); else UnsafeNativeMethods.send_add_connection_metadata_32(p_instance, ref p_metadata); }
public static extern void send_free_metadata(IntPtr p_instance, ref metadata_frame_t p_metadata);
public static extern bool recv_send_metadata(IntPtr p_instance, ref metadata_frame_t p_metadata);
public static extern frame_type_e recv_capture_v2(IntPtr p_instance, IntPtr p_video_data, IntPtr p_audio_data, ref metadata_frame_t p_metadata, UInt32 timeout_in_ms);