After I read and responded to Paul's last message, it dawned on me that
preset management could also be separated for the most part from the core
of TRPlayer. It could be done in a separate program, which I would call
TRPreset (short for Text-Mode RealMedia Preset Manager). TRPreset be
responsible for adding, removing, and listing presets, and also for
starting TRPlayer with the necessary command-line options to go to a given
preset. This last task would require some modification of TRPlayer so
that it could jump to a certain clip and time offset within the
presentation. TRPlayer could also call TRPreset to instantly bookmark a
place in a clip as it is being played or when playback is stopped.
I can see several advantages to this approach:
1. TRPlayer would stay small; the changes just discussed wouldn't
increase the size of TRPlayer much.
2. TRPreset could be called through alternative interfaces such as
Emacspeak.
3. TRPlayer's command keys and command-line options would be less
cluttered. For example, instead of using a TRPlayer command or
command-line option to list the presets, you'd do it like this:
trpreset -l
And you'd go to a preset in a particular category like this:
trpreset -c "Family Radio" "East Coast"
4. TRPlayer itself would not be dependent on an XML-parsing
library. This contributes to advantage #1.
5. TRPreset would be truly open source -- probably public domain -- since
it is not under any licensing restrictions from a RealNetworks
SDK. People could also modify it and test their modifications without the
SDK.
6. TRPreset needn't be written in C; it could be written in a scripting
language like Python. I'm learning the Python language, and it includes
an XML-parsing library, so it might be a good choice. The downside is
that a program written in an interpreted language is less efficient than
its compiled counterpart, and you would have to install the interpreter if
it's not installed already. So I might write the first version in Python,
but for the benefit of the users, I feel obligated to eventually write it
in C.
What do you all think of this idea? Do you see any good reasons to
integrate preset management into TRPlayer, as I was originally planning to
do? At this point I don't, but others may think of things that I haven't
considered.
--
Matt Campbell
Web site: http://www.pobox.com/~mattcampbell/
ICQ #: 33005941