Ejemplo n.º 1
0
        private LiveFeedAnimator GetLiveFeedAnimator(string movementFileName)
        {
            VideoAnimationBinding binding = AllVideoBindings.Get(movementFileName);
            string fullPathToMovementFile = VideoAnimationManager.GetFullPathToMovementFile(movementFileName);

            VideoFeed[] videoFeeds = AllVideoFeeds.GetAll(binding);
            return(VideoAnimationManager.LoadLiveAnimation(fullPathToMovementFile, binding, videoFeeds));
        }
Ejemplo n.º 2
0
        public static VideoFeed[] GetAll(VideoAnimationBinding videoAnimationBinding)
        {
            VideoFeed[] result = new VideoFeed[4];
            result[0] = Get(videoAnimationBinding.Camera1);
            result[1] = Get(videoAnimationBinding.Camera2);
            result[2] = Get(videoAnimationBinding.Camera3);
            result[3] = Get(videoAnimationBinding.Camera4);

            return(result);
        }
Ejemplo n.º 3
0
        public static LiveFeedAnimator LoadLiveAnimation(string movementFile, VideoAnimationBinding binding, VideoFeed[] videoFeeds)
        {
            if (!File.Exists(movementFile))
            {
                return(null);
            }
            string movementInstructions          = File.ReadAllText(movementFile);
            List <ObsTransform> liveFeedFrames   = JsonConvert.DeserializeObject <List <ObsTransform> >(movementInstructions);
            LiveFeedAnimator    liveFeedAnimator = new LiveFeedAnimator(videoFeeds, liveFeedFrames);

            liveFeedAnimator.FrameAnimator.StartTimeOffset   = binding.StartTimeOffset;
            liveFeedAnimator.FrameAnimator.TimeStretchFactor = binding.TimeStretchFactor;

            return(liveFeedAnimator);
        }