Exemplo n.º 1
0
        public static void OnPacketFound(RtmpPacketInterop obj)
        {
            AmfContainer deserializedOutput = null;

//
//            var x = "new byte[]{";
//            foreach(var b in obj.GetBytes())
//            {
//                x += b.ToString("x2") + ",";
//            }
//            x += "};";

            using (var newStream = new MemoryStream(obj.GetBytes()))
            {
                var streamCopy = PruneStreamChunkDelimiters(newStream, obj);

                Console.WriteLine("Found packet {2} from {0} length {1}", obj.GetSourceIP(), obj.GetLength(),
                                  obj.GetRtmpPacketType());


                deserializedOutput = AMFSerializerUtil <AmfContainer> .DeserializeAmf(streamCopy);
            }

            Visualize(deserializedOutput, 0);
        }
Exemplo n.º 2
0
        public static string Message(string methodName, object [] args)
        {
            var remoteObject = new ActionScriptRemoteObject
            {
                Name      = methodName,
                Arguments = args
            };

            return(AMFSerializerUtil <ActionScriptRemoteObject> .ConvertToBase64(remoteObject));
        }