Example #1
0
    // Update is called once per frame
    void Update()
    {
#if UNITY_STANDALONE_WIN || UNITY_EDITOR
        Win32Api.StretchDesktopCapture();
        desktopTexture.LoadRawTextureData(Win32Api.pPixelData, 4 * StreamSize.width * StreamSize.height);
        desktopTexture.Apply();
        webRtcCore.FrameGate_Input(desktopTexture);
#elif UNITY_IPHONE
        webRtcCore.FrameGate_Input(SubCameraTexture);
#endif
        if (webRtcCore != null)
        {
            webRtcCore.Update();
        }
    }
Example #2
0
    // Update is called once per frame
    void Update()
    {
        long timestamp_us = DateTime.Now.Ticks / 10;   //time stamp micro sec

        webRtcCore.FrameGate_Input(SubCameraTexture, timestamp_us);
        webRtcCore.Update();
//        Debug.Log("got frame timestamp is : " + webRtcCore.ReceivedTexture2D_timesatmp_us);
    }