void DecodeNextFramePacket()
    {
        if (PendingInputFrames == null || PendingInputFrames.Count == 0)
        {
            return;
        }

        if (Decoder == null)
        {
            Decoder = new PopH264.Decoder(DecoderParams, DecodeOnSeperateThread);
        }

        var PendingInputFrame = PendingInputFrames[0];

        if (VerboseDebug)
        {
            Debug.Log("Push frame data #" + PendingInputFrame.FrameNumber);
        }
        var PushResult = Decoder.PushFrameData(PendingInputFrame);

        if (!PushResult)
        {
            //	decoder error
            Debug.LogError("Decoder Push returned: " + PushResult + " (decoder error!)");
        }

        if (PendingOutputFrameTimes == null)
        {
            PendingOutputFrameTimes = new List <int>();
        }
        PendingOutputFrameTimes.Add(PendingInputFrame.FrameNumber);
        PendingInputFrames.RemoveAt(0);
    }
    void DecodeH264(byte[] Data)
    {
        if (Decoder == null)
        {
            Decoder = new PopH264.Decoder();
        }

        Decoder.PushFrameData(Data, FrameNumber++);
    }
Exemple #3
0
    public void PushData(byte[] Data, long TimeStamp)
    {
        if (Decoder == null)
        {
            Decoder = new PopH264.Decoder(DecoderParams, ThreadedDecoding);
        }

        Debug.Log("pushing x" + Data.Length);
        Decoder.PushFrameData(Data, (int)TimeStamp);
    }