Commit Graph

125 Commits

Author SHA1 Message Date
Anna Schumaker ead1397b31 Remove Doxygen tags
I wasn't actually using Doxygen for anything, so it's probably best just
to remove it.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-09-02 14:24:42 -04:00
Anna Schumaker ec4d3b945e audio: Fix seeking on ARM
The on_seek() function needs to take an int64_t to avoid truncating on
ARM.

Signed-off-by: Anna Schumaker <anna@ocarinaproject.net>
2015-04-14 09:05:09 -04:00
Anna Schumaker 657ce8f0f4 audio: Ensure position and duration results are 64 bits
A long int is shorter on ARM than x86, which could cause position and
duration values to get truncated.  Additionally, quering gstreamer with
a long int causes a compile error on ARM.  Let's just do the right thing
and make this value an int64_t.

Signed-off-by: Anna Schumaker <anna@ocarinaproject.net>
2015-04-14 09:05:05 -04:00
Anna Schumaker eabb5ef856 queue: Remove Q_NOTIFY_REMOVE flag
It no longer has any meaning.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-04-09 09:27:46 -04:00
Anna Schumaker 9180545bc2 queue: Remove on_remove() notification
I no longer need it to pass queue-removed messages to the gui.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-04-09 09:26:36 -04:00
Anna Schumaker c80468a739 callback: Remove all references to callbacks
Callbacks have no remaining users and can safely be removed :)

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-04-04 10:21:31 -04:00
Anna Schumaker e8b68b84eb queue: Add an on_remove() notification to the QNotifier class
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-04-04 10:20:49 -04:00
Anna Schumaker c068cbb736 callbacks: Remove on_pq_track_changed()
It's been replaced with a function int he QNotifier class.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-04-03 21:03:05 -04:00
Anna Schumaker b95bbe6ad4 queue: Create an on_track_updated() callback
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-04-03 20:55:07 -04:00
Anna Schumaker 8cc48aa799 callbacks: Remove on_pq_track_deleted()
It's been replaced with a function in the QNotifier class.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-04-03 12:29:41 -04:00
Anna Schumaker 9eef2ad35d queue: Create an on_track_removed() notification
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-04-03 12:24:37 -04:00
Anna Schumaker 89a13ff6f7 callback: Remove on_queue_track_add() callback
It no longer has any users.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-04-03 12:20:07 -04:00
Anna Schumaker 91fc9436a5 queue: Give notifiers an "on_track_added()" function
So they can tell GUIs that something has been added.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-04-03 12:19:08 -04:00
Anna Schumaker c5598293d6 queue: Create a notifier class
This class will be used to push queue changes directly to the GUI.
Currently changes get mapped through the old callbacks system, which can
lead to several inefficiencies because the GUI has to look up each queue
structure in a list.

This patch implements a basic QNotifier class and provides a function
for setting a Queue's notifier.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-04-03 12:16:40 -04:00
Anna Schumaker 8453b58ae3 queue: Fix punction on _sort_order documentation comment
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-04-03 10:27:08 -04:00
Anna Schumaker 7e58a4fef8 filter: Simplify adding words to the filter
I can use the lowercase text from string :: lowercase() and take a
single pass over a single string (rather than iterating through a list
of strings).

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-01-30 10:54:38 -05:00
Anna Schumaker 7733e24c07 string: Add a lowercase() function
This function strips out special characters and returns the lowercase
version of the string.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-01-30 09:32:50 -05:00
Anna Schumaker cc6f4c9293 string: Add a function for creating a detailed time string
I use this to display the total running time of queues in the gui.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-01-29 08:27:25 -05:00
Anna Schumaker 12260a3de9 string: Add a function for converting seconds to string
This is used to get a string representation of the number of seconds
passed in.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-01-27 09:23:14 -05:00
Anna Schumaker 6c6437c2bd string: Create a utos() function
This function converts unsigned ints into strings.  This allows me to
replace several almost identical functions with one function call.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-01-27 08:37:27 -05:00
Anna Schumaker 92d264d4ac audio: Move Driver into audio.h
I also rename from Driver -> AudioDriver.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-12-20 15:48:07 -05:00
Anna Schumaker acac350879 audio: Remove on_pause_count_changed callback
The UI should handle this directly on end-of-stream messages.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-12-20 15:44:40 -05:00
Anna Schumaker 6a117c762e driver: play() and pause() shouldn't return a boolean
This value is never used in the audio layer so let's stop returning it
from the driver.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-12-20 14:32:31 -05:00
Anna Schumaker b633f3fa0c gst: Update the "now playing" fields through the GST driver
This lets me remove the on_track_loaded() callback function by handling
this event directly.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-12-20 12:05:22 -05:00
Anna Schumaker d7113cb124 driver: Pass Tracks to the load() function
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-12-20 12:01:38 -05:00
Anna Schumaker a4ad0aa79b driver: Fold eos() into the driver
With this patch I no longer need a Driver :: init() function to handle
picking the next track.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-12-20 11:04:14 -05:00
Anna Schumaker fd2a251c14 audio: Initialize GST from the gui layer
This means I no longer need to pass argc and argv parameters to core/,
so I can eventually work towards removing the Driver :: init() function.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-12-20 10:16:44 -05:00
Anna Schumaker e7a8ad54bd Audio: Remove the driver on_error() callback function
This was used to get around layering issues with the gstreamer driver.
Now that the gstreamer implementation is in the gui code we can have it
call audio::next() directly.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-12-19 17:26:39 -05:00
Anna Schumaker 5b32bb16b4 Audio: Make the TestDriver class completely internal to the audio test
It's not used anywhere else except during this one test, so move it out
of the global include files.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-12-19 17:21:32 -05:00
Anna Schumaker b9d4c6749d audio: Move the get_driver() function into the audio namespace
It's already in the audio.cpp file, so just reshuffle things a little
bit.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-12-19 14:54:12 -05:00
Anna Schumaker 1d2b52cc98 driver: Move the GST driver into the gui
This is a straight copy-and-paste of the header file and the code
implementing it.  I intent to clean this up with future patches.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-12-19 14:25:59 -05:00
Anna Schumaker c12dbae73a driver: Track current driver with a pointer
This will let me implement drivers outside of this file allowing for
easier customization.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-12-19 14:20:30 -05:00
Anna Schumaker 4a57b170cd audio: Update doxygen documentation
And remove the Audio section of the DESIGN file.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-12-19 13:45:55 -05:00
Anna Schumaker 326865f6be driver: Update doxygen documentation
This lets me remove the Audio Driver section of the DESIGN document.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-12-19 13:37:44 -05:00
Anna Schumaker 31a405d3c6 deck: Update doxygen documentation
Also remove the deck section of the DESIGN document.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-12-12 08:25:53 -05:00
Anna Schumaker 9cbff6e9a1 Playlist: Update doxygen documentation
I also remove the playlist section of the DESIGN document.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-12-11 08:23:08 -05:00
Anna Schumaker 7ec7026863 Library: Update doxygen documentation
Also, remove the library section from the DESIGN document.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-12-10 08:23:53 -05:00
Anna Schumaker 0758f08642 Queue: Remove _del_at
I merged it with _del(index) since they are for exactly the same thing.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-12-09 08:50:03 -05:00
Anna Schumaker 39eb22f05c Queue: Update doxygen documentation
I also remove the related section of the DESIGN document.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-12-09 08:40:14 -05:00
Anna Schumaker 6f58813b3c Queue: Clean up doxygen comments for sorting flags
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-12-07 10:08:21 -05:00
Anna Schumaker a1b6955a1d Queue: Clean up queue flags
Reformat the doxygen comments and remove the unused Q_FLAG_MASK
constant.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-12-07 09:58:47 -05:00
Anna Schumaker 30b2ba0fff Track: Doxygen documentation updates
This patch fixes up formatting a little bit and removes the Track
section of the DESIGN document.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-12-04 08:31:52 -05:00
Anna Schumaker e7e36caa3a tagdb: Remove tagdb
This shifts the taglib code into library.cpp.  I also remove the tagdb
section of the DESIGN document.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-12-04 08:31:52 -05:00
Anna Schumaker c7fe5b18d5 tagdb: Rip out most tagdb functions
Most of this are a straight replacement with the new versions in
tags/track.cpp.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-12-04 08:31:52 -05:00
Anna Schumaker 4224d89813 Track: Add a function for finding track_db size
This returns the actual size of the database, so be careful when using
it!  The intent of this function is to allow some kind of iteration when
loading databases.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-12-04 08:31:52 -05:00
Anna Schumaker 45c83ed2fd Track: Add a function for removing all tracks from a given library
This function will be called when doing library removals.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-12-04 08:31:52 -05:00
Anna Schumaker 9dfec9934c Track: Add a function for removing specific tracks from the track_db
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-12-04 08:31:52 -05:00
Anna Schumaker d5fc2a4de0 Track: Add a function for saving the track_db
The track_db doesn't have autosaving enabled for performance reasons.
This lets us add several tracks to the database between saves, but it
also means we need to provide a commit() function.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-12-04 08:31:52 -05:00
Anna Schumaker 83cc81c934 Track: Add a function to look up Track tags by index
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-12-04 08:31:52 -05:00
Anna Schumaker a30f5ef794 Track: Create an add_track() function
We return a new Track tag or NULL if we have already tagged this track.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-12-04 08:31:52 -05:00