Precord 'revolutionary' version 6.0.0 about to be uploaded
But first here is the info you will need to use the added facility:
Well, Precord's automatic add/hide Pschedule button methodology has already been used successfully in the great wee pupRadio app (to hide the Precord button of all things!).
But that was nothing: Precord version 6.0.0 brings a really, revolutionary, much likely to be copied facility (I hate to sound like ttuuxxx, but this is a simple but powerful new approach for extending gtkdialog apps):
slave plugins (external applications) for every major Precord function (all plugins sent an automatic terminate process signal on re-use or quit). So you want a progress bar, or up/down progress timer, or some external VU meter: just add the external app to the appropriate function buttons via the plugin folder facility...
I haven't written any useful plugin as yet (too busy just getting the idea working) but I do supply a simple demo to show how to use it. Here is the blurb from the header file of that (the demo happens to be a simple bash script, but it doesn't have to be):
#**************************************************************************
# Program: PrecordDemoPluginSlave version 1.0.0
# Creation date (YMD): 2009/12/07 (original version 1.0.0)
# Revision date (YMD): 2009/12/30
# (C) Copyright 2009 William McEwan (
http://wiak.org)
#***************************************************************************
#
# Changes:
# Version 1.0.0: First version.
# Notes:
#
# To quickly try the supplied demo, rename it in Rox filemanager to
# stopplayslave, run precord, press play and then press stop...
# To stop the stupid popup app, just rename the file back to
# PrecordDemoPluginSlave.
#
# This slave is just a simple demo of how to create a function slave for
# precord. Actually any program can be used for a slave. Indeed, a symlink
# placed in /usr/share/precord to any existing application is a slave, though
# you may find it better to use small shell scripts which call up existing
# applications instead, since that way you can control the termination of the
# called-up applications.
#
# Precord slaves need to be stored in directory /usr/share/precord. The slave
# application, if it exists, is typically loaded on the press of the
# associated function button, or in response to that function being given
# from the commandline (e.g. precord rec outfile.mp3 would check to see if
# there is an executable, or link to an executable, called
# /usr/share/precord/recslave). If there is no such slave, no attempt is made
# by precord to execute it (so you can add and remove slaves as and when you
# like, even when precord is actually running...).
#
# The plugin slave application (or, for example,
# symlink) must be given one of the following names (which match the available
# precord functions):
#
# recslave (which is executed on push of record button, or via commandline call of form: precord rec outfile...)
# stoprecslave (executed on push of the record stop button and/or the quit button etc)
# stoprecnowslave (executed whenever a switch is made between precord small and config GUI's)
# pauserecslave0 (executed on record pause being first pressed, and
on every second press thereafter)
# pauserecslave1 (executed on record pause being pressed the second time, and on every second press thereafter)
# playslave (executed on play selected)
# stopplayslave (executed on stop play selected)
#
# pauseplayslave0 (as per record, but for play)
#
# pauseplayslave1 (as per record, but for play)
#
# quitslave (executed on quit selected)
#
# vuslave (executed on vu/mixer button pressed/selected)
#
# Note that pressing the associated precord button may or may not call up the slave program. The stopplay button, for example, only looks for an associated slave application if an audio file is already playing.
#
# Note that precord automatically, temporarily saves the called up slave application's Program ID, in /tmp/precord, in the form,
# for example: /tmp/precord/PIDrecslave
# However, many applications start up several processes, so it is up to the slave application plugin designer to make sure the slave applications processes are all terminated at the time desired. Precord only sends a simple TERM signal to the first slave process (the plugin designer may need to trap that signal and then ensure all plugin child processes are terminated).
#
# Sorry, this first slave is the ultra in simplicity. It has no useful
# precord-related function (it just pops up an rxvt terminal and displays the date... I'm too busy to write a useful plugin at the moment.
# Forum member Flash would like a simple progress counter; you could write that, for example, as a shell script and call it up, and control it, as per above or you could wait until someone who understands what I am talking about writes it for you.
# Note that, to use this demo, you need to put it in folder /usr/share/precord/, or make a symlink to it from there, and rename it according to which of the above functions you want to automatically call it up (being half a sleep for days now, it took me ages to get it right...).
Have fun, but do realise that the 'tricky' part in writing/using plugins is in keeping track of the process IDs; the supplied demonstration plugin gives strong hints on how to do that.