diff --git a/3d/Assets/3rdParty/HighlightPlus/Runtime/Scripts/HighlightEffect.cs b/3d/Assets/3rdParty/HighlightPlus/Runtime/Scripts/HighlightEffect.cs index b3a1f63..db218da 100644 --- a/3d/Assets/3rdParty/HighlightPlus/Runtime/Scripts/HighlightEffect.cs +++ b/3d/Assets/3rdParty/HighlightPlus/Runtime/Scripts/HighlightEffect.cs @@ -2146,8 +2146,8 @@ namespace HighlightPlus { fxMat.mainTexture = matTexture; fxMat.mainTextureOffset = matTextureOffset; fxMat.mainTextureScale = matTextureScale; - //} - // if (!Application.isMobilePlatform) { // TODO: currently this does not work with URP on Android + + if ((glow > 0 && glowQuality == QualityLevel.Highest && glowVisibility == Visibility.Normal) || (outline > 0 && outlineQuality == QualityLevel.Highest && outlineVisibility == Visibility.Normal)) { fxMat.EnableKeyword(ShaderParams.SKW_DEPTHCLIP); } else { diff --git a/3d/Assets/AVProVideo/Demos/Common/MediaPlayerUI/HorizontalSegmentsPrimitive.cs b/3d/Assets/AVProVideo/Demos/Common/MediaPlayerUI/HorizontalSegmentsPrimitive.cs index 08695c3..079a557 100644 --- a/3d/Assets/AVProVideo/Demos/Common/MediaPlayerUI/HorizontalSegmentsPrimitive.cs +++ b/3d/Assets/AVProVideo/Demos/Common/MediaPlayerUI/HorizontalSegmentsPrimitive.cs @@ -28,7 +28,7 @@ namespace RenderHeads.Media.AVProVideo.Demos.UI _segments = new float[] { 0f, 0f }; } - // TODO: detect whether a change actually occured before setting to dirty + SetVerticesDirty(); } diff --git a/3d/Assets/AVProVideo/Demos/Common/MediaPlayerUI/MediaPlayerUI.cs b/3d/Assets/AVProVideo/Demos/Common/MediaPlayerUI/MediaPlayerUI.cs index 078d079..bfc778c 100644 --- a/3d/Assets/AVProVideo/Demos/Common/MediaPlayerUI/MediaPlayerUI.cs +++ b/3d/Assets/AVProVideo/Demos/Common/MediaPlayerUI/MediaPlayerUI.cs @@ -447,7 +447,7 @@ namespace RenderHeads.Media.AVProVideo.Demos } else { - // TODO: instead of activating the first one, base it on the language/track + // selection stored in the MediaPlayerUI _mediaPlayer.TextTracks.SetActiveTextTrack(_mediaPlayer.TextTracks.GetTextTracks()[0]); } diff --git a/3d/Assets/AVProVideo/Editor/Scripts/Components/MediaPlayerEditor.cs b/3d/Assets/AVProVideo/Editor/Scripts/Components/MediaPlayerEditor.cs index 5049da3..dc90933 100644 --- a/3d/Assets/AVProVideo/Editor/Scripts/Components/MediaPlayerEditor.cs +++ b/3d/Assets/AVProVideo/Editor/Scripts/Components/MediaPlayerEditor.cs @@ -419,7 +419,7 @@ namespace RenderHeads.Media.AVProVideo.Editor UnityEditorInternal.InternalEditorUtility.RepaintAllViews(); GL.sRGBWrite = originalSRGBWrite; } - // TODO: OnDisable - stop the video if it's playing (and unload it?) + #endif } diff --git a/3d/Assets/AVProVideo/Editor/Scripts/Components/MediaPlayerEditor_Platforms.cs b/3d/Assets/AVProVideo/Editor/Scripts/Components/MediaPlayerEditor_Platforms.cs index 155f9b7..2a4cfc0 100644 --- a/3d/Assets/AVProVideo/Editor/Scripts/Components/MediaPlayerEditor_Platforms.cs +++ b/3d/Assets/AVProVideo/Editor/Scripts/Components/MediaPlayerEditor_Platforms.cs @@ -18,7 +18,7 @@ namespace RenderHeads.Media.AVProVideo.Editor private void OnInspectorGUI_SelectPlatform() { - // TODO: support multiple targets? + MediaPlayer media = (this.target) as MediaPlayer; int i = 0; diff --git a/3d/Assets/AVProVideo/Editor/Scripts/Components/MediaPlayerEditor_Player.cs b/3d/Assets/AVProVideo/Editor/Scripts/Components/MediaPlayerEditor_Player.cs index 9c44ebd..c9d3287 100644 --- a/3d/Assets/AVProVideo/Editor/Scripts/Components/MediaPlayerEditor_Player.cs +++ b/3d/Assets/AVProVideo/Editor/Scripts/Components/MediaPlayerEditor_Player.cs @@ -405,7 +405,7 @@ namespace RenderHeads.Media.AVProVideo.Editor { if (texture != EditorGUIUtility.whiteTexture) { - // TODO: In Linear mode, this displays the texture too bright, but GUI.DrawTexture displays it correctly + //GL.sRGBWrite = true; //GUI.DrawTexture(textureRect, rt, ScaleMode.ScaleToFit, false); @@ -751,7 +751,7 @@ namespace RenderHeads.Media.AVProVideo.Editor { if (!_showAlpha) { - // TODO: In Linear mode, this displays the texture too bright, but GUI.DrawTexture displays it correctly + EditorGUI.DrawTextureTransparent(textureRect, texture, ScaleMode.ScaleToFit); } else diff --git a/3d/Assets/AVProVideo/Editor/Scripts/MediaPathDrawer.cs b/3d/Assets/AVProVideo/Editor/Scripts/MediaPathDrawer.cs index ddbe42d..72ae694 100644 --- a/3d/Assets/AVProVideo/Editor/Scripts/MediaPathDrawer.cs +++ b/3d/Assets/AVProVideo/Editor/Scripts/MediaPathDrawer.cs @@ -25,7 +25,7 @@ namespace RenderHeads.Media.AVProVideo.Editor newUrl = newUrl.Trim(); if (EditorHelper.SafeSetPathProperty(newUrl, propPath)) { - // TODO: shouldn't we set all targets? + EditorUtility.SetDirty(property.serializedObject.targetObject); } MediaPlayerEditor.ShowFileWarningMessages(propPath.stringValue, (MediaPathType)propPathType.enumValueIndex, null, MediaSource.Path, false, Platform.Unknown); diff --git a/3d/Assets/AVProVideo/Editor/Scripts/RecentMenu.cs b/3d/Assets/AVProVideo/Editor/Scripts/RecentMenu.cs index d3186d1..6267fa4 100644 --- a/3d/Assets/AVProVideo/Editor/Scripts/RecentMenu.cs +++ b/3d/Assets/AVProVideo/Editor/Scripts/RecentMenu.cs @@ -162,7 +162,7 @@ namespace RenderHeads.Media.AVProVideo.Editor string path = items[i]; // Slashes in path must be replaced as they cause the menu to create submenuts string itemName = ReplaceSlashes(path); - // TODO: shorten if itemName too long + if (System.IO.File.Exists(path)) { menu.AddItem(new GUIContent(prefix + itemName), false, Callback_Select, new RecentMenuItemData(path, propPath, propMediaSource, autoLoadMedia)); diff --git a/3d/Assets/AVProVideo/Extensions/UnityUI/Runtime/DisplayUGUI.cs b/3d/Assets/AVProVideo/Extensions/UnityUI/Runtime/DisplayUGUI.cs index ba4c910..54dc5fa 100644 --- a/3d/Assets/AVProVideo/Extensions/UnityUI/Runtime/DisplayUGUI.cs +++ b/3d/Assets/AVProVideo/Extensions/UnityUI/Runtime/DisplayUGUI.cs @@ -141,7 +141,7 @@ namespace RenderHeads.Media.AVProVideo LateUpdate(); break; } - // TODO: remove this, we're just doing this so we can make sure texture is correct when running in EDIT mode + LateUpdate(); } @@ -419,7 +419,7 @@ namespace RenderHeads.Media.AVProVideo if (material != null && _mediaPlayer != null) { - // TODO: only run when dirty + VideoRender.SetupMaterialForMedia(materialForRendering, _mediaPlayer); } } diff --git a/3d/Assets/AVProVideo/Extensions/UnityUI/Runtime/SubtitlesUGUI.cs b/3d/Assets/AVProVideo/Extensions/UnityUI/Runtime/SubtitlesUGUI.cs index cd52529..0479039 100644 --- a/3d/Assets/AVProVideo/Extensions/UnityUI/Runtime/SubtitlesUGUI.cs +++ b/3d/Assets/AVProVideo/Extensions/UnityUI/Runtime/SubtitlesUGUI.cs @@ -45,7 +45,7 @@ namespace RenderHeads.Media.AVProVideo void Update() { - // TODO: Currently we need to call this each frame, as when it is called right after SetText() + // the ContentSizeFitter hasn't run yet, so effectively the box is a frame behind. UpdateBackgroundRect(); } diff --git a/3d/Assets/AVProVideo/Runtime/Scripts/Components/ApplyToMaterial.cs b/3d/Assets/AVProVideo/Runtime/Scripts/Components/ApplyToMaterial.cs index d9f7893..d1986fd 100644 --- a/3d/Assets/AVProVideo/Runtime/Scripts/Components/ApplyToMaterial.cs +++ b/3d/Assets/AVProVideo/Runtime/Scripts/Components/ApplyToMaterial.cs @@ -50,7 +50,7 @@ namespace RenderHeads.Media.AVProVideo if (_texturePropertyName != value) { _texturePropertyName = value; - // TODO: if the property changes, remove it from the perioud SetTexture() + _propTexture = new LazyShaderProperty(_texturePropertyName); _isDirty = true; } diff --git a/3d/Assets/AVProVideo/Runtime/Scripts/Components/ApplyToMesh.cs b/3d/Assets/AVProVideo/Runtime/Scripts/Components/ApplyToMesh.cs index b033f28..48fb9c0 100644 --- a/3d/Assets/AVProVideo/Runtime/Scripts/Components/ApplyToMesh.cs +++ b/3d/Assets/AVProVideo/Runtime/Scripts/Components/ApplyToMesh.cs @@ -14,7 +14,7 @@ namespace RenderHeads.Media.AVProVideo [HelpURL("https://www.renderheads.com/products/avpro-video/")] public sealed class ApplyToMesh : ApplyToBase { - // TODO: add specific material / material index to target in the mesh if there are multiple materials + [Space(8f)] [Header("Display")] @@ -81,7 +81,7 @@ namespace RenderHeads.Media.AVProVideo if (_texturePropertyName != value) { _texturePropertyName = value; - // TODO: if the property changes, remove it from the perioud SetTexture() + _propTexture = new LazyShaderProperty(_texturePropertyName); _isDirty = true; } diff --git a/3d/Assets/AVProVideo/Runtime/Scripts/Components/DisplayIMGUI.cs b/3d/Assets/AVProVideo/Runtime/Scripts/Components/DisplayIMGUI.cs index a347f6a..97fda7d 100644 --- a/3d/Assets/AVProVideo/Runtime/Scripts/Components/DisplayIMGUI.cs +++ b/3d/Assets/AVProVideo/Runtime/Scripts/Components/DisplayIMGUI.cs @@ -248,7 +248,7 @@ namespace RenderHeads.Media.AVProVideo if (_material != null) { - // TODO: Only setup material when needed + VideoRender.SetupMaterialForMedia(_material, _mediaPlayer); // NOTE: It seems that Graphics.DrawTexture() behaves differently than GUI.DrawTexture() when it comes to sRGB writing diff --git a/3d/Assets/AVProVideo/Runtime/Scripts/Components/MediaPlayer.cs b/3d/Assets/AVProVideo/Runtime/Scripts/Components/MediaPlayer.cs index e7673e4..403fee4 100644 --- a/3d/Assets/AVProVideo/Runtime/Scripts/Components/MediaPlayer.cs +++ b/3d/Assets/AVProVideo/Runtime/Scripts/Components/MediaPlayer.cs @@ -398,7 +398,7 @@ namespace RenderHeads.Media.AVProVideo { if (_persistent) { - // TODO: set "this.transform.root.gameObject" to also DontDestroyOnLoad? + DontDestroyOnLoad(this.gameObject); } } @@ -520,7 +520,7 @@ namespace RenderHeads.Media.AVProVideo _isMediaOpened = true; _autoPlayOnStartTriggered = !_autoPlayOnStart; _finishedFrameOpenCheck = true; - long fileOffset = GetPlatformFileOffset(); // TODO: replace this with MediaReference + long fileOffset = GetPlatformFileOffset(); MediaPath mediaPath = null; MediaHints mediaHints = _fallbackMediaHints; @@ -922,7 +922,7 @@ namespace RenderHeads.Media.AVProVideo _resampler = null; } - // TODO: possible bug if MediaPlayers are created and destroyed manually (instantiated), OnApplicationQuit won't be called! + } public void ForceDispose() @@ -1373,7 +1373,7 @@ namespace RenderHeads.Media.AVProVideo private void UpdateAudioFocus() { - // TODO: we could use gizmos to draw the focus area + _controlInterface.SetAudioFocusEnabled(_audioFocusEnabled); _controlInterface.SetAudioFocusProperties(_audioFocusOffLevelDB, _audioFocusWidthDegrees); _controlInterface.SetAudioFocusRotation(_audioFocusTransform == null ? Quaternion.identity : _audioFocusTransform.rotation); @@ -1402,7 +1402,7 @@ namespace RenderHeads.Media.AVProVideo if (ErrorCode.LoadFailed == errorCode) { #if !UNITY_EDITOR && UNITY_ANDROID - // TODO: Update this to handle case where media is MediaReference + if (_mediaPath.Path.ToLower().Contains("http://")) { Debug.LogError("Android 8 and above require HTTPS by default, change to HTTPS or enable ClearText in the AndroidManifest.xml"); diff --git a/3d/Assets/AVProVideo/Runtime/Scripts/Components/MediaPlayer_PlatformOptions.cs b/3d/Assets/AVProVideo/Runtime/Scripts/Components/MediaPlayer_PlatformOptions.cs index 5cdfe07..39434ed 100644 --- a/3d/Assets/AVProVideo/Runtime/Scripts/Components/MediaPlayer_PlatformOptions.cs +++ b/3d/Assets/AVProVideo/Runtime/Scripts/Components/MediaPlayer_PlatformOptions.cs @@ -614,7 +614,7 @@ namespace RenderHeads.Media.AVProVideo public override byte[] GetOverrideDecryptionKey() { return null; } } - // TODO: move these to a Setup object + [SerializeField] OptionsWindows _optionsWindows = new OptionsWindows(); [SerializeField] OptionsApple _optionsMacOSX = new OptionsApple(OptionsApple.TextureFormat.BGRA, OptionsApple.Flags.None); [SerializeField] OptionsApple _optionsIOS = new OptionsApple(OptionsApple.TextureFormat.BGRA, OptionsApple.Flags.None); diff --git a/3d/Assets/AVProVideo/Runtime/Scripts/Components/MediaPlayer_TimeScale.cs b/3d/Assets/AVProVideo/Runtime/Scripts/Components/MediaPlayer_TimeScale.cs index 490abc7..333081a 100644 --- a/3d/Assets/AVProVideo/Runtime/Scripts/Components/MediaPlayer_TimeScale.cs +++ b/3d/Assets/AVProVideo/Runtime/Scripts/Components/MediaPlayer_TimeScale.cs @@ -36,7 +36,7 @@ namespace RenderHeads.Media.AVProVideo // Handle looping if (_controlInterface.IsLooping() && _timeScaleVideoTime >= Info.GetDuration()) { - // TODO: really we should seek to (_timeScaleVideoTime % Info.GetDuration()) + _timeScaleVideoTime = 0.0; } diff --git a/3d/Assets/AVProVideo/Runtime/Scripts/Components/PlaylistMediaPlayer.cs b/3d/Assets/AVProVideo/Runtime/Scripts/Components/PlaylistMediaPlayer.cs index 69a3be7..3e8d2ab 100644 --- a/3d/Assets/AVProVideo/Runtime/Scripts/Components/PlaylistMediaPlayer.cs +++ b/3d/Assets/AVProVideo/Runtime/Scripts/Components/PlaylistMediaPlayer.cs @@ -614,8 +614,8 @@ namespace RenderHeads.Media.AVProVideo NextPlayer.AudioVolume = (1f - t) * this.AudioVolume; CurrentPlayer.AudioVolume = t * this.AudioVolume; - // TODO: support going from mono to stereo - // TODO: support videos of different aspect ratios by rendering with scaling to fit + + // This can be done by blitting twice, once for each eye // If the stereo mode is different for playera/b then both should be set to stereo during the transition // if (CurrentPlayer.m_StereoPacking == StereoPacking.TopBottom).... @@ -663,7 +663,7 @@ namespace RenderHeads.Media.AVProVideo #region Implementing ITextureProducer public Texture GetTexture(int index = 0) { - // TODO: support iOS YCbCr by supporting multiple textures + /*if (!IsTransitioning()) { if (_currentItem != null && _currentItem.sourceType == MediaPlaylist.MediaItem.SourceType.Texture2D && _currentItem.texture != null) diff --git a/3d/Assets/AVProVideo/Runtime/Scripts/Internal/BaseMediaPlayer.cs b/3d/Assets/AVProVideo/Runtime/Scripts/Internal/BaseMediaPlayer.cs index b35ceeb..e37a8a4 100644 --- a/3d/Assets/AVProVideo/Runtime/Scripts/Internal/BaseMediaPlayer.cs +++ b/3d/Assets/AVProVideo/Runtime/Scripts/Internal/BaseMediaPlayer.cs @@ -491,7 +491,7 @@ namespace RenderHeads.Media.AVProVideo { double time = GetCurrentTime(); - // TODO: implement a more efficient subtitle index searcher + int searchIndex = 0; if (_currentSubtitle != null) { diff --git a/3d/Assets/AVProVideo/Runtime/Scripts/Internal/Events.cs b/3d/Assets/AVProVideo/Runtime/Scripts/Internal/Events.cs index 82dd4fb..6ba820a 100644 --- a/3d/Assets/AVProVideo/Runtime/Scripts/Internal/Events.cs +++ b/3d/Assets/AVProVideo/Runtime/Scripts/Internal/Events.cs @@ -37,7 +37,7 @@ namespace RenderHeads.Media.AVProVideo TextTracksChanged, // Triggered when the text tracks are added or removed TextCueChanged = SubtitleChange, // Triggered when the text to display changes - // TODO: + //StartLoop, // Triggered when the video starts and is in loop mode //EndLoop, // Triggered when the video ends and is in loop mode //NewFrame // Trigger when a new video frame is available diff --git a/3d/Assets/AVProVideo/Runtime/Scripts/Internal/Helper.cs b/3d/Assets/AVProVideo/Runtime/Scripts/Internal/Helper.cs index 341a15b..5b2fa46 100644 --- a/3d/Assets/AVProVideo/Runtime/Scripts/Internal/Helper.cs +++ b/3d/Assets/AVProVideo/Runtime/Scripts/Internal/Helper.cs @@ -89,7 +89,7 @@ namespace RenderHeads.Media.AVProVideo for (int i = 0; i < areas.Length; i++) { int d = Mathf.Abs(areas[i] - area); - // TODO: add a maximum threshold to ignore differences that are too high + if (d < minDelta) { closestAreaIndex = i; @@ -368,7 +368,7 @@ namespace RenderHeads.Media.AVProVideo frameRate = Mathf.Max(0f, frameRate); keyFrameInterval = Mathf.Max(0, keyFrameInterval); int currentFrame = Helper.ConvertTimeSecondsToFrame(seconds, frameRate); - // TODO: allow specifying a minimum number of frames so that if currentFrame is too close to nextKeyFrame, it will calculate the next-next keyframe + int nextKeyFrame = keyFrameInterval * Mathf.CeilToInt((float)(currentFrame + 1) / (float)keyFrameInterval); return Helper.ConvertFrameToTimeSeconds(nextKeyFrame, frameRate); } diff --git a/3d/Assets/AVProVideo/Runtime/Scripts/Internal/Players/AndroidMediaPlayer.cs b/3d/Assets/AVProVideo/Runtime/Scripts/Internal/Players/AndroidMediaPlayer.cs index 0b6c788..e5ff7aa 100644 --- a/3d/Assets/AVProVideo/Runtime/Scripts/Internal/Players/AndroidMediaPlayer.cs +++ b/3d/Assets/AVProVideo/Runtime/Scripts/Internal/Players/AndroidMediaPlayer.cs @@ -15,10 +15,10 @@ using System.Runtime.InteropServices; namespace RenderHeads.Media.AVProVideo { + /// /// Android implementation of BaseMediaPlayer /// - // TODO: seal this class public class AndroidMediaPlayer : BaseMediaPlayer { protected static AndroidJavaObject s_ActivityContext = null; diff --git a/3d/Assets/AVProVideo/Runtime/Scripts/Internal/Players/WebGLMediaPlayer.cs b/3d/Assets/AVProVideo/Runtime/Scripts/Internal/Players/WebGLMediaPlayer.cs index acc80b1..5c10969 100644 --- a/3d/Assets/AVProVideo/Runtime/Scripts/Internal/Players/WebGLMediaPlayer.cs +++ b/3d/Assets/AVProVideo/Runtime/Scripts/Internal/Players/WebGLMediaPlayer.cs @@ -670,7 +670,7 @@ namespace RenderHeads.Media.AVProVideo int textureId = 80000 + _playerIndex; _cachedTextureNativePtr = new System.IntPtr(textureId); AVPPlayerCreateVideoTexture(textureId); - // TODO: add support for mip generation + _texture = Texture2D.CreateExternalTexture(_width, _height, TextureFormat.RGBA32, false, false, _cachedTextureNativePtr); if (_useTextureMips) { @@ -743,7 +743,7 @@ namespace RenderHeads.Media.AVProVideo // Update the texture if (_cachedTextureNativePtr != System.IntPtr.Zero) { - // TODO: only update the texture when the frame count changes + // (actually this will break the update for certain browsers such as edge and possibly safari - Sunrise) AVPPlayerFetchVideoTexture(_playerIndex, _cachedTextureNativePtr, false); @@ -767,7 +767,7 @@ namespace RenderHeads.Media.AVProVideo _isDirtyAudioTracks = false; _isDirtyTextTracks = false; - // TODO: replace this crude polling check with events, or only do it once metadataReady + // Need to add event support as tracks can be added via HTML (especially text) int videoTrackCount = AVPPlayerGetVideoTrackCount(_playerIndex); int audioTrackCount = AVPPlayerGetAudioTrackCount(_playerIndex); diff --git a/3d/Assets/AVProVideo/Runtime/Scripts/Internal/Players/WindowsMediaPlayer_BufferedFrames.cs b/3d/Assets/AVProVideo/Runtime/Scripts/Internal/Players/WindowsMediaPlayer_BufferedFrames.cs index 168e9bc..357436f 100644 --- a/3d/Assets/AVProVideo/Runtime/Scripts/Internal/Players/WindowsMediaPlayer_BufferedFrames.cs +++ b/3d/Assets/AVProVideo/Runtime/Scripts/Internal/Players/WindowsMediaPlayer_BufferedFrames.cs @@ -92,7 +92,7 @@ namespace RenderHeads.Media.AVProVideo } else { - // TODO: run without vsync, just show next frame (use media clock for present?) + // use our own clock... const double SecondsToHNS = 10000000.0; double videoFrameDuration = SecondsToHNS / (double)GetVideoFrameRate(); diff --git a/3d/Assets/AVProVideo/Runtime/Scripts/Internal/Players/WindowsRtMediaPlayer.cs b/3d/Assets/AVProVideo/Runtime/Scripts/Internal/Players/WindowsRtMediaPlayer.cs index d434e11..5fcb62e 100644 --- a/3d/Assets/AVProVideo/Runtime/Scripts/Internal/Players/WindowsRtMediaPlayer.cs +++ b/3d/Assets/AVProVideo/Runtime/Scripts/Internal/Players/WindowsRtMediaPlayer.cs @@ -287,7 +287,7 @@ namespace RenderHeads.Media.AVProVideo Native.SetAudioMuted(_playerInstance, bMuted); } - // TODO: replace all these options with a structure + public override bool OpenMedia(string path, long offset, string httpHeader, MediaHints mediaHints, int forceFileFormat = 0, bool startWithHighestBitrate = false) { bool result = false; @@ -371,13 +371,13 @@ namespace RenderHeads.Media.AVProVideo if (isNewFrameSpecs) { eyeTexture.Dispose(); - // TODO: blit from the old texture to the new texture before destroying? + } /// Switch to the latest texture pointer if (eyeTexture.texture != null) { - // TODO: check whether UpdateExternalTexture resets the sampling filter to POINT - it seems to in Unity 5.6.6 + if (eyeTexture.nativePointer != texturePointer) { eyeTexture.texture.UpdateExternalTexture(texturePointer); @@ -762,7 +762,7 @@ namespace RenderHeads.Media.AVProVideo { Fast = 0, Accurate = 1, - // TODO: Add Fast_Before and Fast_After + } [StructLayout(LayoutKind.Sequential, Pack = 1)] @@ -774,7 +774,7 @@ namespace RenderHeads.Media.AVProVideo public float frameRate; public uint averageBitRate; //public string trackName; - // TODO: add index, language, name, bitrate, codec etc + } [StructLayout(LayoutKind.Sequential, Pack = 1)] @@ -786,7 +786,7 @@ namespace RenderHeads.Media.AVProVideo public uint bitsPerSample; public uint averageBitRate; //public string trackName; - // TODO: add index, language, name, bitrate, codec etc + } [StructLayout(LayoutKind.Sequential, Pack = 1)] @@ -794,7 +794,7 @@ namespace RenderHeads.Media.AVProVideo { public double timeSeconds; public SeekMode mode; - // TODO: add min-max thresholds + } [DllImport("AVProVideoWinRT")] diff --git a/3d/Assets/AVProVideo/Runtime/Scripts/Internal/Utils/HttpHeader.cs b/3d/Assets/AVProVideo/Runtime/Scripts/Internal/Utils/HttpHeader.cs index 3de69e9..1163f2a 100644 --- a/3d/Assets/AVProVideo/Runtime/Scripts/Internal/Utils/HttpHeader.cs +++ b/3d/Assets/AVProVideo/Runtime/Scripts/Internal/Utils/HttpHeader.cs @@ -61,7 +61,7 @@ namespace RenderHeads.Media.AVProVideo { return false; } - // TODO: check via regular expression + return true; } } diff --git a/3d/Assets/AVProVideo/Runtime/Scripts/Internal/Utils/Resampler.cs b/3d/Assets/AVProVideo/Runtime/Scripts/Internal/Utils/Resampler.cs index 4f2a339..00764da 100644 --- a/3d/Assets/AVProVideo/Runtime/Scripts/Internal/Utils/Resampler.cs +++ b/3d/Assets/AVProVideo/Runtime/Scripts/Internal/Utils/Resampler.cs @@ -211,7 +211,7 @@ namespace RenderHeads.Media.AVProVideo _outputTexture[i].filterMode = tex.filterMode; _outputTexture[i].wrapMode = tex.wrapMode; _outputTexture[i].anisoLevel = tex.anisoLevel; - // TODO: set up the mips level too? + } } diff --git a/3d/Assets/AVProVideo/Runtime/Scripts/Internal/Utils/VideoRender.cs b/3d/Assets/AVProVideo/Runtime/Scripts/Internal/Utils/VideoRender.cs index 172bbe6..447b7d2 100644 --- a/3d/Assets/AVProVideo/Runtime/Scripts/Internal/Utils/VideoRender.cs +++ b/3d/Assets/AVProVideo/Runtime/Scripts/Internal/Utils/VideoRender.cs @@ -503,8 +503,8 @@ namespace RenderHeads.Media.AVProVideo } // Render resolve blit - // TODO: combine these two paths into a single material blit - { + + bool prevSRGB = GL.sRGBWrite; GL.sRGBWrite = targetTexture.sRGB; RenderTexture prev = RenderTexture.active; @@ -524,7 +524,7 @@ namespace RenderHeads.Media.AVProVideo } RenderTexture.active = prev; GL.sRGBWrite = prevSRGB; - } + return targetTexture; } @@ -565,7 +565,7 @@ namespace RenderHeads.Media.AVProVideo } } - // TODO: take into account rotation + } public static bool RequiresResolve(ITextureProducer texture) diff --git a/3d/Assets/Framework/ThirdParty/NaughtyAttributes/Scripts/Editor/Utility/NaughtyEditorGUI.cs b/3d/Assets/Framework/ThirdParty/NaughtyAttributes/Scripts/Editor/Utility/NaughtyEditorGUI.cs index ee17a7a..b9c30e5 100644 --- a/3d/Assets/Framework/ThirdParty/NaughtyAttributes/Scripts/Editor/Utility/NaughtyEditorGUI.cs +++ b/3d/Assets/Framework/ThirdParty/NaughtyAttributes/Scripts/Editor/Utility/NaughtyEditorGUI.cs @@ -126,7 +126,7 @@ namespace NaughtyAttributes.Editor { Undo.RecordObject(serializedObject.targetObject, "Dropdown"); - // TODO: Problem with structs, because they are value type. + // The solution is to make boxing/unboxing but unfortunately I don't know the compile time type of the target object dropdownField.SetValue(target, newValue); }