[MEncoder-users] how to mencoder grab ctrl+c interrupt ?

Chang Min Jeon jcm1981 at gmail.com
Thu Jul 28 18:54:55 CEST 2005


I downloaded mplayer source from CVS(2005.6.30) 
 I changed mencoder.c following line.

// before 
int main(int argc, char* argv[]) 

// after 
int startEncoding(int argc, char* argv[]) 
 and then I made mencoder source to dynamic library.
 I created app to encode video and audio data from TV CARD by calling 
startEncoding function.
 example . following line
 //global variable
SDL_Thread* thread;
int main(int argc, char* argv[])
{
 startenc(argc, argv);
 sleep(5);
 SDL_KillThread(thread);
 //problem occur. certainly thread was killed. But startEncoding still 
conduct to encode audio and video data.
 sleep(10);
   return 0;
}
  void startenc(int argc, char* argv[])
{
 thread = SDL_CreateThread((int (*)(void *))startEncoding, NULL);
}



More information about the MEncoder-users mailing list