[MPlayer-dev-eng] Structure of Mencoder, want to record to new file based on serial-trigg

Martin Osmundsvåg mosmunds at broadpark.no
Tue Jun 17 20:13:36 CEST 2003


Hi!

The problem is the initialization time of mencoder. When I get a trigg, 
I must start recording in 0.1 sec. Each recording must be saved in a 
file named after the time of the trigg.
The SIGSTOP/SIGCONT was interesting, but I'm not sure I can use it. I'll 
try to close the steam/demuxer. Thanks!

- Martin O.

D Richard Felker III wrote:

>On Tue, Jun 17, 2003 at 07:27:24PM +0200, Martin Osmundsvåg wrote:
>  
>
>>Hi!
>>I'm not sure if I should adress this question to this forum, but I hope 
>>it's allright :)
>>
>>I'm would like to make a serial trigger for mencoder so it will record 
>>as long the DCD is low. The problem with mencoder is the time used for 
>>initialization. Therefore I looked at the code and found the main loop. 
>>I did the initializaion part and polled the serial port. When the port 
>>was trigged I jumped into the main loop -- mencoder started recording 
>>immediately.
>>
>>The problem is that I want to start over again without quiting the 
>>program. The problem is that I can't start at the main() again. Then 
>>I'll get messages that it's unable to open /dev/video0: Device or 
>>resource busy. I have the following mencoder.c structure taken from it's 
>>rev 1.2.15:
>>    
>>
>
>Why can't you just restart the program? Also, have you considered just
>using an external program that listens on the serial port and sends
>SIGSTOP/SIGCONT to mencoder?? The output would all go in one file that
>way, but maybe that's what you want...??
>
>BTW, the "Device or resource busy" problem comes from the fact that
>mencoder isn't properly closing the stream/demuxer like it should
>(which is ok since it's only meant for doing one file)... So if you
>want to take your approach, you need to figure out how to make it
>close stuff down properly between files.
>
>Rich
>
>_______________________________________________
>MPlayer-dev-eng mailing list
>MPlayer-dev-eng at mplayerhq.hu
>http://mplayerhq.hu/mailman/listinfo/mplayer-dev-eng
>  
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20030617/cac5bb43/attachment.htm>


More information about the MPlayer-dev-eng mailing list