The next feature that TRPlayer needs is the ability to bookmark places in
audio streams. Now I'd like to discuss the details of this feature on
this list. These details fall into two categories that I can think
of: user interface, and file format and location.
User interface:
I proposed earlier that the m command be used to add a new bookmark, and
there didn't seem to be any problem with that. We could also have a -g
command-line option to go to a specified bookmark, and/or a g command for
the same purpose when the player is running. I was thinking that
bookmarks could be identified by letter, and letters would be assigned in
sequential order.
Probably the more difficult decision is how to list the current bookmarks
to the user. Should this be done while the player is running? Should
there be a command-line option to list the bookmarks and exit? Maybe both
methods would be a good idea.
If we want to list the bookmarks while the player is running, the obvious
key for this is l, but it is currently taken (l displays the clip
length). This command is probably more important for speech users than
for Braille users and sighted people, who can simply turn on the status
line and read the clip length whenever they want it. I think that the
output of the curent b, l, s, and t commands could be combined into one
command (probably s for status). This has already been done for compact
output mode, where the single status line is displayed. When compact
output mode is turned off, the output of the single status command could
look like this:
Playing
Elapsed time is 3 minutes and 15 seconds (5%)
Length is 1 hour
Bit rate is 16K
Some may recall that I went over this in a previous message, but there was
no comment. I want to know what everyone thinks, so I know which
direction to go. I could just decide for myself, but I want to make sure
that users are pleased with the decision.
The obvious command for deleting a bookmark is d, and fortunately this one
has not been taken, so we can use it. About the removal of bookmarks, I
was wondering if the letters assigned to the bookmarks after the removed
bookmark should change when the bookmark is removed. For example, if we
have bookmarks A, B, and C, and bookmark B is removed, should the last one
be C or should it become B? Keeping the letter of the last bookmark the
same would be especially convenient if it is a familiar and often-used
bookmark. If we decide to go this way, then there can be gaps in the
bookmark list, and the command to add a new bookmark would first search
for an empty entry to fill before appending a bookmark to the end of the
list.
File format and location:
The average user might not care so much about this subject, but I thought
I'd open it up to discussion anyway. I'm thinking that TRPlayer should
create a directory called .trplayer in the user's home directory which
would contain the bookmarks file and any other files TRPlayer might create
in the future. This way, if TRPlayer ends up using, for example, a
bookmarks file and a config file, the home directory is less cluttered if
these files are stored in their own directory.
In my opinion, the bookmarks file should be a plain text file, so that it
is human-readable and editable with a normal text editor. This seems to
be a common pattern in Unix and open-source software, in sharp contrast
with Windows and some other proprietary software. I propose a simple file
format with one bookmark per line. Each line would contain the URL of the
bookmark, the clip number (starting at 0), and the position in the clip
(in either seconds or milliseconds; I'm not sure). If there can be gaps
in the bookmark list as suggested above, then a line for an entry with no
bookmark should simply contain the word "none". This format seems easy to
process, and I can't think of any reason why it wouldn't be a good
solution. But if anyone has any comments or suggestions, please post them
here on the list.
That's all for now. I think this is the longest message I've posted to
this list.
--
Matt Campbell
Web site: http://www.pobox.com/~mattcampbell/
ICQ #: 33005941