Exemplo n.º 1
0
        //public static void GetTotalReaderCount(object mk_media_source)
        //{
        //    IntPtr ptr = (IntPtr)mk_media_source;
        //    Thread.Sleep(1000);
        //    int readCount = MediaServer.mk_media_source_get_total_reader_count(ref ptr);
        //}

        public static void del_on_mk_flow_report(ref IntPtr mk_media_info, UInt64 total_bytes, UInt64 total_seconds, int is_player, ref IntPtr mk_sock_info)
        {
            try
            {
                string vhost  = Marshal.PtrToStringAnsi(MediaServer.mk_media_info_get_vhost(ref mk_media_info));
                string schema = Marshal.PtrToStringAnsi(MediaServer.mk_media_info_get_schema(ref mk_media_info));
                string app    = Marshal.PtrToStringAnsi(MediaServer.mk_media_info_get_app(ref mk_media_info));
                string stream = Marshal.PtrToStringAnsi(MediaServer.mk_media_info_get_stream(ref mk_media_info));
                //MediaServer.mk_media_source_find(schema, vhost, app, stream, IntPtr.Zero, media_Source_Find_Cb);
                //int readCount = MediaServer.mk_media_info_get_total_reader_count(ref mk_media_info);
                //StringBuilder stringBuilder = new StringBuilder(64);
                //string peer_ip = Marshal.PtrToStringAnsi(MediaServer.mk_sock_info_peer_ip(ref mk_sock_info,ref stringBuilder));
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
                Console.WriteLine(ex.StackTrace);
            }
        }