Exemplo n.º 1
0
        public bool Save(out string path, int beginFrame = 0, int endFrame = -1)
        {
            T encoder = unit.Encoder;

            string fileName = GetFileName(encoder.Extension);
            string filePath = GetOutputPath(m_OutputDirectory, fileName);

            m_OutputDirectory.CreateDirectory();

            bool result;

            if (encoder.Seekable)
            {
                ISeekableMovieEncoder seekable = (ISeekableMovieEncoder)encoder;

                result = seekable.Flush(filePath, beginFrame, endFrame);

                Debug.LogFormat("{0}.Flush({2}, {3}): {1}", encoder.GetType().Name, filePath, beginFrame, endFrame);
            }
            else
            {
                result = encoder.Flush(filePath);

                Debug.LogFormat("{0}.Flush(): {1}", encoder.GetType().Name, filePath);
            }

            path = result ? filePath : null;

            return(result);
        }
Exemplo n.º 2
0
        public bool Save(string path, int beginFrame = 0, int endFrame = -1)
        {
            T encoder = unit.Encoder;

            if (encoder.Seekable)
            {
                ISeekableMovieEncoder seekable = (ISeekableMovieEncoder)encoder;

                return(seekable.Flush(path, beginFrame, endFrame));
            }
            else
            {
                return(encoder.Flush(path));
            }
        }