示例#1
0
        void input_aas_push(byte *psd, int len)
        {
            //Read metadata header
            int port = psd[0] | (psd[1] << 8);
            int seq  = psd[2] | (psd[3] << 8);

            //Offset data region
            psd += 4;
            len -= 4;

            //Marshal the data into a byte array
            byte[] payload = new byte[len];

            fixed(byte *payloadPtr = payload)
            Utils.Memcpy(payloadPtr, psd, len);

            //Make frame
            FrameAas frame = new FrameAas
            {
                payload  = payload,
                port     = (ushort)port,
                sequence = (ushort)seq
            };

            //Dispatch
            OnAasFrame?.Invoke(frame);
        }
示例#2
0
 public void Process(FrameAas frame)
 {
     if (frame.port == 0x5100 || (frame.port >= 0x5201 && frame.port <= 0x5207))
     {
         // PSD frame.ports
         //output_id3(st, frame.port & 0x7, buf + 4, len - 4);
     }
     else if (frame.port == 0x20)
     {
         // Station Information Guide
         //parse_sig(st, buf + 4, len - 4);
     }
     else if (frame.port >= 0x401 && frame.port <= 0x50FF)
     {
         //process_frame.port(st, frame.port, buf + 4, len - 4);
     }
     else
     {
         throw new Exception("unknown AAS frame port");
     }
 }
示例#3
0
 private void Frame_OnAasFrame(FrameAas frame)
 {
     OnAasFrame?.Invoke(this, frame);
 }