[Gambas-user] Application goes wierd when running large EXEC command (with pic)

lozza1978 piresl at ...626...
Wed Jan 2 19:47:12 CET 2008


Thank You for your example, 
I can now get the exec command running in the background with a tweak, 
I tried the exec command with AS MenCoder, but this failed to even launch
the app, so I added "FOR READ AS "Mencoder" and it is now working. (Should I
be using FOR READ AS)?

However, now the the command is running in the background, there is no way
for the end user to know wheather the EXEC command is running or finished, 
Whats the best/easyest way for me to inform the user than the command is
still working and inform the user when its finished?
Here what I got so far working.

EXEC ["mencoder", "-oac", "lavc", "-ovc", "lavc", "-of", "mpeg",
"-mpegopts", "format=dvd", "-vf", "scale=720:576,harddup", 
"-srate", "48000", "-af", "lavcresample=48000", "-lavcopts", 
"vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=5000:keyint=15:aspect=16/9:acodec=ac3:abitrate=192", 
"-ofps", "25", "-o", dvdmovie, Textbox1.Text] FOR READ AS "Contents"

'test code
PUBLIC SUB Contents_Read()

  DIM sLine AS String

  READ #LAST, sLine, -256

  sOutput &= sLine
PRINT sOutput
END

PUBLIC SUB Contents_Kill()

  PRINT sOutput

END

Thanks To You All



Fabien Bodard-4 wrote:
> 
> Le Tuesday 01 January 2008 20:41:27 lozza1978, vous avez écrit :
>> Hi All,
>>
>> in my application i have to run a large Exec command
>> The command is
>> EXEC  ["mencoder", "-oac", "lavc", "-ovc", "lavc", "-of", "mpeg",
>> "-mpegopts", "format=dvd", "-vf", "scale=720:576,harddup",
>> "-srate", "48000", "-af", "lavcresample=48000", "-lavcopts",
>> "vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=5000:keyint=
>>15:aspect=16/9:acodec=ac3:abitrate=192", "-ofps", "25", "-o", dvdmovie,
>> Textbox1.Text] WAIT
>>
>> the command above converts sound &  movie to DVD format
>> When running the command, my application seems to lockup, picture below
>> http://www.nabble.com/file/p14569382/snapshot9.png
>>
>> I have found during debug that the application is still processing the
>> EXEC
>> command, but is there a way to stop the application to look as though it
>> has locked up?
>>
> 
> yes remove the WAIT command... it block the program since the exec process
> is 
> not ended
> 
> then use process stream management to watch and drive the process
> Like this :
> 
> EXEC  ["mencoder", "-oac", "lavc", "-ovc", "lavc", "-of", "mpeg",
>  "-mpegopts", "format=dvd", "-vf", "scale=720:576,harddup",
>  "-srate", "48000", "-af", "lavcresample=48000", "-lavcopts",
> 
> "vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=5000:keyint=
> 15:aspect=16/9:acodec=ac3:abitrate=192", "-ofps", "25", "-o", dvdmovie,
>  Textbox1.Text] AS "Mencoder"
> 
> PUBLIC SUB MenCoder_Error()
> 	Dim sLine as String
> 	Print "there is an error on processing"
> 	READ #LAST, sLine, -256
> 	Print sLine
> END
> 
> 
> PUBLIC SUB MemCoder_Read()
> 
>   DIM sLine AS String
> 
>   READ #LAST, sLine, -256
> 
>   Print sLine
> 
> END
> 
> PUBLIC SUB Contents_Kill()
> 
>   PRINT "Fin du processus"
> 
> END
> 
>  http://gambasdoc.org/help/comp/gb/process
>> It could have something to do with me using the WAIT on the EXEC line,
>> but
>> if I do not use the wait the there is no way for the end user to know
>> when
>> the process has finished.
>>
>> Can anyone help shed some light on this for a newbie?
>> thanks for reading.
> 
> 
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
> 

-- 
View this message in context: http://www.nabble.com/Application-goes-wierd-when-running-large-EXEC-command-%28with-pic%29-tp14569382p14583658.html
Sent from the gambas-user mailing list archive at Nabble.com.





More information about the User mailing list