Example #1
0
    /// <summary>
    ///     需注意,此回调在分线程中运行
    /// </summary>
    /// <param name="content"></param>
    void onVideoFramePrepared(byte[] content)
    {
        // 当第一次收到实景信号后,返回成功信号
        if (!_hasReceiveFrame)
        {
            _hasReceiveFrame = true;

            Debug.Log("收到实时信号.");

            //_onConnectLiveShowAction.Invoke();
        }


        if (!_currentFrameLock)
        {
            _currentFrameLock = true;

            _currentBytes = content;

            if (_showLive)
            {
                ScreenFactoryInvoker.AddCommand(new VideoDecodeTask(content, _liveScreen));
            }
            _currentFrameLock = false;
        }
    }
Example #2
0
    void onVideoFramePrepared(byte[] content)
    {
        Debug.Log("On Video Frame Prepared");


        if (!_testLock)
        {
            _testLock = true;

            //VideoDecodeTask videoDecodeTask = new VideoDecodeTask(content, _screen);
            //videoDecodeTasks.Enqueue(videoDecodeTask);

            ScreenFactoryInvoker.AddCommand(new VideoDecodeTask(content, _screen));


            _testLock = false;
        }
    }