Click here to Skip to main content
15,891,033 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear Techie,

I have develop one application Were capturing video from Camera using DirectShow. Now I wish to add new feature like Pause and Resume Live Recording.

Looking forward for knowledge sharing......
Posted
Comments
TheyCallMeMrJames 10-Sep-10 9:16am    
First off, we're geeks not techs. Secondly, if you figured out how to capture, what have you tried that isn't working for pause? Live recording what? Are you streaming? Please clarify your question and share what you've tried.
Bhushan Badhe 28-Sep-10 5:38am    
Hi,

Thanks for reply....

Actually I had developed one application in that I am recording video from camera (CCD camera).
But in that i am recording total time slab means for example i started recording at 05:30 and stop recording it on 06:30 but in that one hour I just want to record some important sections means from 05:30 to 05:45 and 5:50 to 6:00 and 06:08 to 06:30 in single video for this i want to add Pause and Resume facility in recording.

I had tried (IMediaControl) mediaCtrl.Pause for Pause Recording..... It Pause the recording but cann't resume a recording again......

Can you tell me how to do this?

Thanks........

1 solution

Cheap and Simple.

C#
bool Paused = false;
protected void Pause()
{
     while(paused)
     {
         System.Threading.Thread.Sleep(20);
     }
     ContinueRecording(timestamp);
}


protected void PauseButton_Click()
{
    Paused = !(Paused);
    Pause();
}

private void ContinueRecording(DataType timestamp)
{
   while(!paused)
   {
      ContinueRecording(timestamp);
   }
}

Like I said... Cheap... very cheap but simple.
Just make sure that you set up the Record method as a recursive function.
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900