design: Add in gstreamer thoughts

Because a music player should be able to play music :)

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
This commit is contained in:
Bryan Schumaker 2013-06-30 23:15:13 -04:00 committed by Anna Schumaker
parent 310c9ad395
commit b786b44a49
1 changed files with 51 additions and 0 deletions

View File

@ -17,6 +17,7 @@ Files:
design.txt
ocarina/gui/
ocarina/include/
audio.h
database.h
database.hpp
file.h
@ -26,6 +27,7 @@ Files:
playlist.h
prefs.h
ocarina/lib/
audio.cpp
database.cpp
file.cpp
group.cpp
@ -45,6 +47,47 @@ Files:
Audio: (lib/audio.cpp)
This file will introduce an "audio" namespace containing all of the
functions interacting with gstreamer. This will create a wrapper
namespace that will be easier to work with than using raw gstreamer
functions.
The audio layer will also control the "pause after N tracks" feature
so songs can be loaded without neeting to pass in a "begin playback"
flag every time.
- Internal:
Set up a message bus to look for end-of-stream and error messages so
the next song can be played. This function should call the play
function after loading a track and after checking the "pause after N"
count.
- API:
audio :: init(argc, argv)
Initialize the gstreamer layer and reload the track that was
last loaded before shutdown. Please only pass --gst-* options
for argv.
audio :: load_file(filepath)
Loads a file path but does not begin playback.
audio :: play()
Begin playback
audio :: pause()
Pause playback
audio :: seek_to(X)
Seek to a position X seconds into the track
audio :: stop()
pause()
seek_to(0)
audio :: pause_after(N)
Pause after N tracks, pass a negative number to disable.
audio :: position()
Return the number of seconds that the song has played
audio :: duration()
Return the duration of the current song in seconds
On-disk files: (lib/file.cpp)
I use the disk to store data between sessions, this could include
library state and user preferences. In theory, file formats do not
@ -449,3 +492,11 @@ Future work:
To help with fixing groups, a mapping of (old values) ->
(new values) should be kept.
- Fix track durations: (6.1)
Some tracks in my library are tagged with the wrong duration,
so fix them as they are played.
- Track tag editor: (6.2)
Make a pop-up window for editing the tags of a track. Be sure
to update the library information and the on-disk file.