Beispiel #1
0
    private List <NormalizedLandmarkList> FetchNextMultiFaceLandmarks()
    {
        if (!multiFaceLandmarksStreamPoller.Next(multiFaceLandmarksPacket)) // blocks
        {
            Debug.LogWarning($"Failed to fetch next packet from {multiFaceLandmarksStream}");
            return(new List <NormalizedLandmarkList>());
        }

        return(multiFaceLandmarksPacket.GetValue());
    }
    private List <Landmark[]> FetchNextLandmarks()
    {
        if (!landmarkPresenceStreamPoller.Next(landmarkPresencePacket)) // blocks
        {
            return(new List <Landmark[]>());
        }

        bool isLandmarkPresent = landmarkPresencePacket.GetValue();

        if (!isLandmarkPresent)
        {
            return(new List <Landmark[]>());
        }

        if (!landmarkStreamPoller.Next(landmarkListPacket))
        {
            return(new List <Landmark[]>());
        }

        return(landmarkListPacket.GetValue());
    }