Beispiel #1
0
        public static string StopRealPlayRtsp(string app, string stream)
        {
            string key = GetKey(app, stream);

            if (!dic_playProxy_media.ContainsKey(key))
            {
                return(key + ":未找到");
            }
            IntPtr playProxy = dic_playProxy_media[key].ctx;

            MediaServer.mk_proxy_player_release(playProxy);
            dic_playProxy_media.Remove(key);


            if (RedisHelper.GetDatabase().HashExists("live", key))
            {
                bool ret1 = RedisHelper.GetDatabase().HashDelete("live", key);
                Console.WriteLine("删除" + key + ":" + ret1);
            }
            else
            {
                Console.WriteLine($"redis中未找到hash(live),HashFiled:{key}");
            }
            return(key + ":停止拉流");
        }