Ejemplo n.º 1
0
        /// <summary>
        /// Construct the class
        /// </summary>
        /// <remarks>
        /// The input files do not need to have the same height/width/fps.  DES will
        /// automatically convert them all to the values specified by the constructor.
        /// </remarks>
        /// <param name="FPS">Frames per second (commonly 15 or 30)</param>
        /// <param name="BitCount">Color depth: 16, 24 or 32</param>
        /// <param name="Width">Frame width (commonly 320, 640, etc)</param>
        /// <param name="Height">Frame height (commonly 240, 480, etc)</param>
        /// <param name="audio">support only audio files</param>
        /// <param name="video">support only video files</param>
        public DESCombine(double FPS, short BitCount, int Width, int Height, bool audio, bool video)
        {
            threadCompleted = true;

            // Initialize the data members
            m_State = ClassState.Constructed;

            // Create the timeline
            m_pTimeline = (IAMTimeline) new AMTimeline();

            // Set the frames per second
            int hr = m_pTimeline.SetDefaultFPS(FPS);

            DESError.ThrowExceptionForHR(hr);

            supportAudio = audio;
            supportVideo = video;

            if (supportVideo)
            {
                // Init the video group
                m_Video = new MediaGroup(GetVideoMediaType(BitCount, Width, Height), m_pTimeline, FPS);
            }

            if (supportAudio)
            {
                // Init the audio group
                m_Audio = new MediaGroup(GetAudioMediaType(), m_pTimeline, FPS);
            }

            this.ThreadFinished += new EventHandler(DESCombine_ThreadFinished);
        }
Ejemplo n.º 2
0
        public DefaultTimeline(double fps)
        {
            _fps = fps;

            // Create the timeline
            _timeline = (IAMTimeline) new AMTimeline();

            // Set the frames per second
            int hr = _timeline.SetDefaultFPS(fps);

            DESError.ThrowExceptionForHR(hr);
        }
Ejemplo n.º 3
0
        private void TestDefaultFPS()
        {
            int          hr;
            double       f;
            const double DFPS = 29.997;

            hr = m_pTimeline.SetDefaultFPS(DFPS);
            DsError.ThrowExceptionForHR(hr);

            hr = m_pTimeline.GetDefaultFPS(out f);
            DsError.ThrowExceptionForHR(hr);

            Debug.Assert(DFPS == f, "GetDefaultFPS");
        }
Ejemplo n.º 4
0
        public DefaultTimeline(double fps, string temporaryStoragePath)
        {
            if (string.IsNullOrEmpty(temporaryStoragePath)) throw new ArgumentNullException("temporaryStoragePath");

            if (fps <= 0) throw new SplicerException(Resources.ErrorFramesPerSecondMustBeGreaterThenZero);

            TemporaryStoragePath = temporaryStoragePath;

            _fps = fps;

            // Create the timeline
            _timeline = (IAMTimeline) new AMTimeline();

            // Set the frames per second
            int hr = _timeline.SetDefaultFPS(fps);
            DESError.ThrowExceptionForHR(hr);
        }
Ejemplo n.º 5
0
        public DefaultTimeline(double fps, string temporaryStoragePath)
        {
            if (string.IsNullOrEmpty(temporaryStoragePath))
            {
                throw new ArgumentNullException("temporaryStoragePath");
            }

            if (fps <= 0)
            {
                throw new SplicerException(Resources.ErrorFramesPerSecondMustBeGreaterThenZero);
            }

            TemporaryStoragePath = temporaryStoragePath;

            _fps = fps;

            // Create the timeline
            _timeline = (IAMTimeline) new AMTimeline();

            // Set the frames per second
            int hr = _timeline.SetDefaultFPS(fps);

            DESError.ThrowExceptionForHR(hr);
        }
Ejemplo n.º 6
0
        /// <summary>
        /// Construct the class
        /// </summary>
        /// <remarks>
        /// The input files do not need to have the same height/width/fps.  DES will
        /// automatically convert them all to the values specified by the constructor.
        /// </remarks>
        /// <param name="FPS">Frames per second (commonly 15 or 30)</param>
        /// <param name="BitCount">Color depth: 16, 24 or 32</param>
        /// <param name="Width">Frame width (commonly 320, 640, etc)</param>
        /// <param name="Height">Frame height (commonly 240, 480, etc)</param>
        public DESCombine(double FPS, short BitCount, int Width, int Height)
        {
            // Initialize the data members
            m_State = ClassState.Constructed;

            // Create the timeline
            m_pTimeline = (IAMTimeline)new AMTimeline();

            // Set the frames per second
            int hr = m_pTimeline.SetDefaultFPS(FPS);
            DESError.ThrowExceptionForHR(hr);

            // Init the video group
            m_Video = new Group(GetVideoMediaType(BitCount, Width, Height), m_pTimeline, FPS);

            // Init the audio group
            m_Audio = new Group(GetAudioMediaType(), m_pTimeline, FPS);
        }
Ejemplo n.º 7
0
    /// <summary>
    /// Construct the class
    /// </summary>
    /// <remarks>
    /// The input files do not need to have the same height/width/fps.  DES will
    /// automatically convert them all to the values specified by the constructor.
    /// </remarks>
    /// <param name="FPS">Frames per second (commonly 15 or 30)</param>
    /// <param name="BitCount">Color depth: 16, 24 or 32</param>
    /// <param name="Width">Frame width (commonly 320, 640, etc)</param>
    /// <param name="Height">Frame height (commonly 240, 480, etc)</param>
    /// <param name="audio">support only audio files</param>
    /// <param name="video">support only video files</param>
    public DESCombine(double FPS, short BitCount, int Width, int Height, bool audio, bool video)
    {
      threadCompleted = true;

      // Initialize the data members
      m_State = ClassState.Constructed;

      // Create the timeline
      m_pTimeline = (IAMTimeline)new AMTimeline();

      // Set the frames per second
      int hr = m_pTimeline.SetDefaultFPS(FPS);
      DESError.ThrowExceptionForHR(hr);

      supportAudio = audio;
      supportVideo = video;

      if (supportVideo)
      {
        // Init the video group
        m_Video = new MediaGroup(GetVideoMediaType(BitCount, Width, Height), m_pTimeline, FPS);
      }

      if (supportAudio)
      {
        // Init the audio group
        m_Audio = new MediaGroup(GetAudioMediaType(), m_pTimeline, FPS);
      }

      this.ThreadFinished += new EventHandler(DESCombine_ThreadFinished);
    }