ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 [IEvolution] Cannot play video after record
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

artem.vysotsky

Belarus
1 Posts

Posted - Mar 06 2015 :  00:48:14  Show Profile  Reply
I want to use the IEViewer control first for video record and after this for video play. But after i called this "Viewer.DirectShow.SetVideoInput(1, 0);" i'm not able to play video on this IEViewer (it behaives like in record mode from camera). Could you help me please? This is my code.

        public void StartVideoRecord()
        {
            if(Viewer.DirectShow.Connected)
                Viewer.DirectShow.Disconnect();

            Viewer.VideoCaptureShowVideo = false;
            Viewer.DirectShow.FileInput = String.Empty;
            Viewer.DirectShow.FileOutput = videoFileName;
            Viewer.DirectShow.SetVideoInput(1, 0);
            
            if (!Viewer.DirectShow.Connected)
            {
                Viewer.DirectShow.Connect();
            }

            Viewer.DirectShow.Run();
        }

        public void StopVideoRecord()
        {
            if (Viewer.DirectShow.Connected)
            {
                Viewer.DirectShow.Stop();
                Viewer.DirectShow.Disconnect();
            }

            OpenVideo();
        }

        public void OpenVideo()
        {
            if (Viewer.DirectShow.Connected)
            {
                Viewer.DirectShow.Stop();
                Viewer.DirectShow.Disconnect();
            }

            Viewer.DirectShow.FileOutput = String.Empty;
            Viewer.DirectShow.FileInput = videoFileName;
            Viewer.VideoCaptureShowVideo = true;

            if (!Viewer.DirectShow.Connected)
            {
                Viewer.DirectShow.Connect();
            }
        }

xequte

38608 Posts

Posted - Mar 06 2015 :  23:43:35  Show Profile  Reply
Hi

Are you outputting the DirectShow frame in the NewFrame event?

        private void ieViewer1_DShowNewFrame(object sender, EventArgs e)
        {
            ieViewer1.DirectShow.GetSample();
            ieViewer1.UpdateImage();
        }


Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: