コード例 #1
0
        private void StopConversion()
        {
            // stop graph
            m_pMediaControl.Stop();

            // destroy all objects
            m_pEvent = null;
            m_pSeeking = null;
            m_pMediaControl = null;

            m_pRenderEngine.ScrapIt();

            m_pRenderEngine = null;
            m_pTimeline = null;
            m_pVideoGroupObj = null;
            m_pAudioGroupObj = null;
            m_pIMPEGEncoderProfile = null;
            m_pIMPEGEncoder = null;
            m_pMPEGWriter = null;
            m_pGraph = null;
            m_pBuilder = null;
        }
コード例 #2
0
        private int LoadMPEGCodec()
        {
            Guid guid = new Guid("CFD87339-C61F-46ca-B6A1-F87D6B96243E");
            Type comtype = Type.GetTypeFromCLSID(guid);
            m_pMPEGWriter = (IBaseFilter)Activator.CreateInstance(comtype);

            m_pIMPEGEncoder = (IStandardMpegEncoder)m_pMPEGWriter;

            // make the mpeg encoder select one of the pre-defined
            // profile objects that it stores internally. For audio
            // you will need to create your own profile.

            m_pIMPEGEncoder.SelectFormat(m_systemsFormat, m_constraint);
            m_pIMPEGEncoder.GetSelectedProfile(out m_pIMPEGEncoderProfile);

            return 0;
        }