private void ParseAncillaryData() { for (int i = 0; i < _ancPacketCount; i++) { AncPacket packet = _ancPackets[i]; if (packet.dataId1 == 0x60 && packet.dataId2 == 0x60) { Debug.Log(i + " Found SMPTE 12M-2 timecode"); } else if (packet.dataId1 == 0x51 && packet.dataId2 == 0x53) { Debug.Log(i + " Blackmagic SDI Camera remote control"); } else if (packet.dataId1 == 0x44 && packet.dataId2 == 0x04) { Debug.Log(i + " ARRI packet"); } else { Debug.Log(i + " Unknown packet " + packet.dataId1 + " " + packet.dataId2 + " " + packet.dataByteCount); } } }
private void DebugAncillaryData() { Debug.Log("New Ancillary data retrieved at time " + _ancFrameTimeStamp + ": " + _ancPacketCount + " packets with " + _ancDataByteCount + " bytes of data"); for (int i = 0; i < _ancPacketCount; i++) { Debug.Log("Packet " + i); AncPacket packet = _ancPackets[i]; Debug.Log("ID1: " + packet.dataId1 + " ID2: " + packet.dataId2 + " StreamIndex: " + packet.dataStreamIndex + " frameLine: " + packet.frameLine + " dataOffset: " + packet.dataByteOffset + " dataBytes: " + packet.dataByteCount); for (int j = 0; j < packet.dataByteCount; j++) { Debug.Log("byte " + j + ": " + _ancData[packet.dataByteOffset + j] + " 0x" + _ancData[packet.dataByteOffset + j].ToString("X2")); } } System.IO.File.WriteAllBytes("ancdata.bin", _ancData); }