private void test() { MKSDK.Context ctx = new MKSDK.Context(); ctx.player = MKSDK.mk_player_create(); MKSDK.mk_player_set_on_result(ctx.player, mk_Play_Event, ref ctx); MKSDK.mk_player_set_on_shutdown(ctx.player, mk_Play_Event, ref ctx); MKSDK.mk_player_set_on_data(ctx.player, mk_Play_Data, ref ctx); MKSDK.mk_player_play(ctx.player, "rtsp://10.20.30.176:554/PR0"); ctx.push_url = "rtsp://127.0.0.1/live/test"; }
public static void recvMKPlayData(ref MKSDK.Context user_data, int track_type, int codec_id, System.IntPtr data, int len, uint dts, uint pts) { }
public static void recvMKPlay_Event(ref MKSDK.Context user_data, int err_code, [System.Runtime.InteropServices.InAttribute()][System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPStr)] string err_msg) { if (err_code == 0)//成功 { } }