示例#1
0
        public override void InitializeStream()
        {
            if (isOpen)
            {
                return;
            }

            lastReceivedFrame = null;

            if (m_audioStreamEnabled)
            {
                Debug.Log("Mvx2: Audio stream enabled, will attempt to run the source with audio");
                m_audioStream.playbackMode = GetSupportedAudioPlaybackMode(playbackMode);
                m_audioStream.minimalBufferedAudioDuration = minimalBufferedAudioDuration;
                m_audioStream.additionalTargets            = additionalTargets;
                m_audioStream.dataStreamDefinition         = dataStreamDefinition;
                m_audioStream.InitializeStream();

                if (m_audioStream.isOpen)
                {
                    return;
                }
                else
                {
                    Debug.Log("Mvx: Failed to run audio stream, simple frame-rate based stream will be used");
                }
            }
            else
            {
                Debug.Log("Mvx2: Audio stream disabled, simple frame-rate based stream will be used");
            }

            m_simpleStream.playbackMode         = playbackMode;
            m_simpleStream.followStreamFPS      = followStreamFPS;
            m_simpleStream.additionalTargets    = additionalTargets;
            m_simpleStream.dataStreamDefinition = dataStreamDefinition;
            m_simpleStream.InitializeStream();
        }