Пример #1
0
    public void Initialize()
    {
        m_HasBeenInitialized = true;

        m_EventProcessor = GetComponent <EventProcessor>();
        if (m_EventProcessor == null)
        {
            m_EventProcessor = gameObject.AddComponent <EventProcessor>();
        }

        GStreamerNativeMethods.GUBUnityDebugLogPFN log_handler = null;
        if (m_DebugOutput.m_Enabled)
        {
            log_handler = (int level, string message) => Debug.logger.Log((LogType)level, "GUB", message);
        }

        GStreamerNativeMethods.Ref(m_DebugOutput.m_GStreamerDebugString.Length == 0 ? null : m_DebugOutput.m_GStreamerDebugString, log_handler);

        m_instanceHandle = GCHandle.Alloc(this);
        m_Pipeline       = new GStreamerNativeMethods(name + GetInstanceID(), OnFinish, OnError, OnQos, (IntPtr)m_instanceHandle);

#if (UNITY_EDITOR || UNITY_STANDALONE) && OCULUS
        audioGUID = "{" + OVRManager.audioOutId + "}";
#endif
    }
Пример #2
0
    void Initialize()
    {
        GStreamerNativeMethods.GUBUnityDebugLogPFN log_handler = null;
        if (Application.isEditor)
        {
            log_handler = (int level, string message) => Debug.logger.Log((LogType)level, "GUB", message);
        }

        GStreamerNativeMethods.Ref("2", log_handler);
        m_instanceHandle = GCHandle.Alloc(this);
        m_Pipeline       = new GStreamerNativeMethods(name + GetInstanceID(), OnFinish, null, null, (System.IntPtr)m_instanceHandle);
    }