This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System.Collections; | |
| using System.Collections.Generic; | |
| using UnityEngine; | |
| namespace OVROSX { | |
| public class HeadTracking : MonoBehaviour { | |
| public static HeadTracking instance { get; private set; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System.Collections; | |
| using System.Collections.Generic; | |
| using UnityEngine; | |
| namespace OVROSX { | |
| class MouseMoveTracker { | |
| private float baseV = 0.0f; | |
| private float diffV = 0.0f; | |
| private float baseH = 0.0f; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| static OVRInput() | |
| { | |
| controllers = new List<OVRControllerBase> | |
| { | |
| #if UNITY_ANDROID && !UNITY_EDITOR | |
| new OVRControllerGamepadAndroid(), | |
| new OVRControllerTouchpad(), | |
| new OVRControllerLTrackedRemote(), | |
| new OVRControllerRTrackedRemote(), | |
| #elif UNITY_STANDALONE_OSX || UNITY_EDITOR_OSX |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static ControllerState4 GetControllerState4(uint controllerMask) | |
| { | |
| #if UNITY_EDITOR | |
| if (controllerMask == (uint)OVRInput.Controller.RTrackedRemote) { | |
| ControllerState4 state = new ControllerState4(); | |
| state.ConnectedControllers = (uint)Controller.RTrackedRemote; | |
| state.RIndexTrigger = OVROSX.JoyconTracker.Instance.GetTriggerState() ? 1.0f : 0.0f; | |
| return state; | |
| } else { | |
| ControllerState4 controllerState = new ControllerState4(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| OVRPose tracker = OVRManager.tracker.GetPose(); | |
| trackerAnchor.localRotation = tracker.orientation; | |
| #if UNITY_EDITOR_OSX | |
| // OS X Editorの時は、カメラの向き設定を差し替える | |
| centerEyeAnchor.localRotation = OVROSX.JoyconTracker.Instance.GetLeftOrientation(); | |
| leftEyeAnchor.localRotation = centerEyeAnchor.localRotation; | |
| rightEyeAnchor.localRotation = centerEyeAnchor.localRotation; | |
| #elif UNITY_2017_2_OR_NEWER |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private var channelListener: SoraAudioChannel.Listener = object : SoraAudioChannel.Listener { | |
| override fun onConnect(channel: SoraAudioChannel) { | |
| ui?.changeStateText("CONNECTED") | |
| } | |
| override fun onClose(channel: SoraAudioChannel) { | |
| ui?.changeStateText("CLOSED") | |
| close() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| bool PeerConnection::AddStream(MediaStreamInterface* local_stream) { | |
| TRACE_EVENT0("webrtc", "PeerConnection::AddStream"); | |
| if (IsClosed()) { | |
| return false; | |
| } | |
| if (!CanAddLocalMediaStream(local_streams_, local_stream)) { | |
| return false; | |
| } | |
| local_streams_->AddStream(local_stream); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| - (instancetype)initWithSource:(RTCVideoSource *)source { | |
| if (self = [super init]) { | |
| self.source = source; | |
| // CI ContextとColorSpaceを準備しておく | |
| self.context = | |
| [CIContext contextWithOptions:@{kCIContextUseSoftwareRenderer: @NO}]; | |
| _colorSpace = CGColorSpaceCreateDeviceRGB(); | |
| self.filters = @[].mutableCopy; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| RTCVideoSource *source = [factory videoSource]; | |
| // VideoSourceからFilterを準備し | |
| MyVideoSourceFilter *filter = [[MyVideoSourceFilter alloc] initWithSource:source]; | |
| // Capturerには、Filterを渡す | |
| RTCVideoCapturer *capturer = [[RTCCameraVideoCapturer alloc] initWithDelegate:filter]; | |
| RTCVideoTrack *trakc = [factory videoTrackWithSource:source trackId:trackId]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ... | |
| RTCVideoSource *source = [factory videoSource]; | |
| RTCVideoCapturer *capturer = [[RTCCameraVideoCapturer alloc] initWithDelegate:source]; | |
| RTCVideoTrack *trakc = [factory videoTrackWithSource:source trackId:trackId]; | |
| // ... |