Example #1
0
    private static void OnError(IntPtr p, string message)
    {
        myGstUnityBridgeTexture self = ((GCHandle)p).Target as myGstUnityBridgeTexture;

        if (self.m_Events.m_OnError != null)
        {
            self.m_EventProcessor.QueueEvent(() =>
            {
                self.m_Events.m_OnError.Invoke(message);
            });
        }
    }
Example #2
0
    private static void OnFinish(IntPtr p)
    {
        myGstUnityBridgeTexture self = ((GCHandle)p).Target as myGstUnityBridgeTexture;

        self.m_EventProcessor.QueueEvent(() =>
        {
            if (self.m_Events.m_OnFinish != null)
            {
                self.m_Events.m_OnFinish.Invoke();
            }
            if (self.m_Loop)
            {
                self.Position = 0;
            }
        });
    }
Example #3
0
    private static void OnQos(IntPtr p,
                              long current_jitter, ulong current_running_time, ulong current_stream_time, ulong current_timestamp,
                              double proportion, ulong processed, ulong dropped)
    {
        myGstUnityBridgeTexture self = ((GCHandle)p).Target as myGstUnityBridgeTexture;

        if (self.m_Events.m_OnQOS != null)
        {
            self.m_EventProcessor.QueueEvent(() =>
            {
                QosData data = new QosData()
                {
                    current_jitter       = current_jitter,
                    current_running_time = current_running_time,
                    current_stream_time  = current_stream_time,
                    current_timestamp    = current_timestamp,
                    proportion           = proportion,
                    processed            = processed,
                    dropped = dropped
                };
                self.m_Events.m_OnQOS.Invoke(data);
            });
        }
    }