summaryrefslogtreecommitdiff
path: root/apps/playlist_viewer.c
AgeCommit message (Collapse)Author
2011-08-14GSoC/Buflib: Replace all direct accesses to audiobuf with buffer API functions.Thomas Martitz
Namely, introduce buffer_get_buffer() and buffer_release_buffer(). buffer_get_buffer() aquires all available and grabs a lock, attempting to call buffer_alloc() or buffer_get_buffer() while this lock is locked will cause a panicf() (doesn't actually happen, but is for debugging purpose). buffer_release_buffer() unlocks that lock and can additionally increment the audiobuf buffer to make an allocation. Pass 0 to only unlock if buffer was used temporarily only. buffer_available() is a replacement function to query audiobuflen, i.e. what's left in the buffer. Buffer init is moved up in the init chain and handles ipodvideo64mb internally. Further changes happened to mp3data.c and talk.c as to not call the above API functions, but get the buffer from callers. The caller is the audio system which has the buffer lock while mp3data.c and talk mess with the buffer. mpeg.c now implements some buffer related functions of playback.h, especially audio_get_buffer(), allowing to reduce #ifdef hell a tiny bit. audiobuf and audiobufend are local to buffer.c now. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30308 a1c6a512-1295-4272-9138-f99709370657
2011-08-07%cs (current screen) changes:Jonathan Gordon
* Every top level menu item now has a different screen number * Playlist viewer and Playlist Catalogue browsers no longer share the same number git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30261 a1c6a512-1295-4272-9138-f99709370657
2011-08-01revert r30226, which is apparently broken.Frank Gevaerts
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30232 a1c6a512-1295-4272-9138-f99709370657
2011-07-31Reload the current playlist after reboot even if it has ended. (FS#11644)Frank Gevaerts
This is done to make reboot more transparent. If a playlist has ended, there should be no difference between the player doing nothing for ten minutes and the player shutting down after the idle timeout and being restarted. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30226 a1c6a512-1295-4272-9138-f99709370657
2011-07-21Fix FS#8656 - Error saving non-current playlist fileJonathan Gordon
Use the plugin buffer to save the playlist copy if there isnt enough buffer already allocated to the inram copy of the playlist git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30184 a1c6a512-1295-4272-9138-f99709370657
2011-07-20s/Playlist/Current Playlist/ in the playlist viewer context menu.Jonathan Gordon
This menu needs to be changed to a proper menu so the icons dont suck git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30180 a1c6a512-1295-4272-9138-f99709370657
2011-07-20FS#11808 - Major playlist handling changes (on disk playlists)Jonathan Gordon
* Playlists are treated similar to directories in the browser, they now open in the viewer when selected instead of automatically starting the playlist. * Make the "Playlists" main menu item useful, it now displays the playlist catalog (and has been renamed accordingly) * Default to storing playlists in the catalog * Add a UI to move the catalog directory (other minor stuff too) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30177 a1c6a512-1295-4272-9138-f99709370657
2011-04-08Whitespace and cosmetics consistency cleanup in playlist_viewer.c, no ↵Nils Wallménius
functional changes. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29694 a1c6a512-1295-4272-9138-f99709370657
2011-04-08Voice filenames in the playlist viewer, closes FS#11951Nils Wallménius
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29693 a1c6a512-1295-4272-9138-f99709370657
2010-11-23Playlist viewer: Fix regression introduced by r28138 which made some buttons ↵Thomas Martitz
not work in the playlist viewer. Fixes FS#11772. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28648 a1c6a512-1295-4272-9138-f99709370657
2010-10-02Playlist viewer: Fix off-by-one when moving tracks caused by r28131.Thomas Martitz
The callbacks for the list code need the current item for rendering the moving track, which is not known until after the first draw. Hence the first draw is off. A second one is needed. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28199 a1c6a512-1295-4272-9138-f99709370657
2010-09-21Bad copy&paste.Thomas Martitz
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28140 a1c6a512-1295-4272-9138-f99709370657
2010-09-21Use convenience function.Thomas Martitz
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28139 a1c6a512-1295-4272-9138-f99709370657
2010-09-20Fix a bug in playlist viewer's list handling, causing superfluous redraws andThomas Martitz
potentially leading to the wrong track being selected. The playlist viewer should perform a bit better now. I always felt it was slower than the otehr lists. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28131 a1c6a512-1295-4272-9138-f99709370657
2010-05-06Move c/h files implementing/defining standard library stuff into a new libc ↵Thomas Martitz
directory, also standard'ify some parts of the code base (almost entirely #include fixes). This is to a) to cleanup firmware/common and firmware/include a bit, but also b) for Rockbox as an application which should use the host system's c library and headers, separating makes it easy to exclude our files from the build. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25850 a1c6a512-1295-4272-9138-f99709370657
2010-02-20Playlist Viewer Changes to bring consistency:Thomas Martitz
- combine its two context menus to one and - make the ACTION_STD_MENU go to the main menu as it does in all other screens - call playlist_viewer() via root_menu to reduce call depth and to be consistent with other screens (and for the above changes to be more flexible w.r.t to the following screen) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24791 a1c6a512-1295-4272-9138-f99709370657
2009-12-24Accept FS#8321 by Lee Kang HyukJonathan Gordon
something about the wrong track being selected with a long playlist and playing the last song.. i dunno... its important to set the title of the lists before setting the selection anyway git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24108 a1c6a512-1295-4272-9138-f99709370657
2009-11-25Take out that code from the dynamic playlist viewer that aborts track ↵Dave Hooper
move-in-progress on playlist change .. based on assumption it doesn't do anything other than cause FS#10395 git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23751 a1c6a512-1295-4272-9138-f99709370657
2009-08-20Make the formatter functions used by the settings return a pointer to avoid ↵Nils Wallménius
usless copying of lang strings, this brought with it a long chain of const correctness and a few random cleanups git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22440 a1c6a512-1295-4272-9138-f99709370657
2009-08-12Make kbd_input() show a cancel splash to indicate user abort better and for ↵Thomas Martitz
better consistency all over the place. Change checking for its return value (style-wise) at some places too. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22269 a1c6a512-1295-4272-9138-f99709370657
2009-07-11Fix type mismatch warnings and errors exposed when building with EABI toolchain.Andrew Mahone
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21769 a1c6a512-1295-4272-9138-f99709370657
2009-07-07Fix bug introduced in r21616 (my bad)- playlist moving array could show in ↵Dave Hooper
playlist viewer even when track not being moved git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21704 a1c6a512-1295-4272-9138-f99709370657
2009-07-02Commit patch in FS#7967 by Vuong Minh Hiep (with some small changes to ↵Dave Hooper
variable names for consistency) - separately keep track of viewer-index and playlist-index of moving tracks, so that viewer correctly shows which track is moving when playlist is shuffled, and correctly moves the track you tell it to git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21616 a1c6a512-1295-4272-9138-f99709370657
2009-07-02Fix playlist viewer behaviour when deleting tracks (one ret had missed being ↵Dave Hooper
changed to ret_val). FIx playlist viewer behaviour when deleting the only remaining track in playlist (i.e. when audio stops, prevent resume playback also) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21615 a1c6a512-1295-4272-9138-f99709370657
2009-05-17Fix duplicate #includesBertrik Sikken
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20977 a1c6a512-1295-4272-9138-f99709370657
2009-05-09Remove unneeded #include "backdrop.h"Bertrik Sikken
Remove unneeded #include "statusbar.h" git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20891 a1c6a512-1295-4272-9138-f99709370657
2009-03-08Clean up some #includesBertrik Sikken
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20238 a1c6a512-1295-4272-9138-f99709370657
2008-12-31Decouple the statusbar drawing from the rest of the screen drawing. it is ↵Jonathan Gordon
not drawn roughly 4x per second automatically. viewport_Set_defaults() will setup the given viewport with the correct "full screen" dimensions (so start at 0,0 if statusbars are disabled or 0,8 if they are enabled.) All screens should keep the statusbar enabled, but if you really want to ignore the user setting you can disbaled it with viewportmanager_set_statusbar(false). This commit also includes some menu/list viewport cleanups from kugel in FS#9603 git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19622 a1c6a512-1295-4272-9138-f99709370657
2008-10-10Search In PlaylistNils Wallménius
* Add a title to the list of search results. * Fix drawing of the statusbar. * Avoid splashing in every iteration of the search loop if no new hits, gives about 10x speedup on h300 when searching for a string that gives 30 hits in a playlist of 3000 tracks. * Boost cpu when searching, ~doubles the search speed. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18764 a1c6a512-1295-4272-9138-f99709370657
2008-09-29Fix FS#9418 'Player unresponsive while searching playlist with directory ↵Nils Wallménius
cache enabled' git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18665 a1c6a512-1295-4272-9138-f99709370657
2008-09-07Change screens memebers char_width, char_height and nb_lines to functions ↵Peter D'Hoye
returning a calculated value. Fixes FS #9361 because the values were calculated based on sysfont, not the user selected font. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18441 a1c6a512-1295-4272-9138-f99709370657
2008-08-15FS#9281 Rename of splash functions.Nils Wallménius
* Remove gui_splash() * Rename gui_syncsplash() to splashf() and remove its voice capabilities. * Rename the internal splash() to splash_internal() and introduce an externally visible splash() that handles simple splashing without printf functionality e.g. splash(HZ, ID2P(LANG_FOO)); or splash(HZ, "foo"); if a LANG_* id is passed it will be voiced. * Adjust all places that called gui_syncsplash() to use the correct variant from above. * Export both new functions to plugins and adjust places calling rb->splash() to use the correct variant so that we now have naming consistency between the core and plugins. * Fix one latent bug that would cause my sim to crash with the above changes and correct P2STR and P2ID macros, thanks to pondlife. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18282 a1c6a512-1295-4272-9138-f99709370657
2008-06-28Updated our source code header to explicitly mention that we are GPL v2 orDaniel Stenberg
later. We still need to hunt down snippets used that are not. 1324 modified files... http://www.rockbox.org/mail/archive/rockbox-dev-archive-2008-06/0060.shtml git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17847 a1c6a512-1295-4272-9138-f99709370657
2008-05-12Const police raid.Steve Bavin
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17474 a1c6a512-1295-4272-9138-f99709370657
2008-05-04use the playlist catalog code to generate the playlists under Playlist > ↵Jonathan Gordon
Create playlist git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17352 a1c6a512-1295-4272-9138-f99709370657
2008-04-09Slight readability improvementsNils Wallménius
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17056 a1c6a512-1295-4272-9138-f99709370657
2008-04-09Pass the buffer length to the list_get_name callback functions instead of ↵Nils Wallménius
using hardcoded MAX_PATH git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17049 a1c6a512-1295-4272-9138-f99709370657
2008-03-26the menu and list now accepts a parent viewport to draw in (and the menu can ↵Jonathan Gordon
be told to not show status/button bars). This lays the groundwork to fix colour problems with plugin menus (see star.c for an example.) This hopefully fixes some button bar issues as well as theme problems. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16812 a1c6a512-1295-4272-9138-f99709370657
2007-12-15Patch "Remain in PLViewer when move_track is canceled", by Lee Kang Hyuk. ↵Antoine Cellerier
Closes FS#8322. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15937 a1c6a512-1295-4272-9138-f99709370657
2007-11-18Use the strrsplt function in one more placeNils Wallménius
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15662 a1c6a512-1295-4272-9138-f99709370657
2007-10-15Playlist viewer move live preview. Closes FS #7968.Antoine Cellerier
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15124 a1c6a512-1295-4272-9138-f99709370657
2007-09-17minor update to gui_synclist_do_button() which will hopefully simplify ↵Jonathan Gordon
things later. Now returns true if the action was handled in that function instead of returning the handled action. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14733 a1c6a512-1295-4272-9138-f99709370657
2007-08-25Accept FS #7627: allow viewing of dynamic playlist when it has endedPeter D'Hoye
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14456 a1c6a512-1295-4272-9138-f99709370657
2007-08-21Accept FS #7626: allow viewing playlist files if no playlist is loadedPeter D'Hoye
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14420 a1c6a512-1295-4272-9138-f99709370657
2007-08-05*** Lang v2 cleanup (FS#6574) ***Nils Wallménius
1) Introduces apps/features.txt that controls which strings are included for each target based on defines. 2) .lng and .voice files are now target specific and the format versions of both these file types have been bumped, which means that new voice files are needed. 3) Use the 'features' mechanism to exclude strings for targets that didn't use them. 4) Delete unused and deprecated and duplicated strings, sort strings in english.lang Some string IDs were changed so translations will be slightly worse than before. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14198 a1c6a512-1295-4272-9138-f99709370657
2007-08-04sync and commit FS#4954 - return any results found when aborting a playlist ↵Jonathan Gordon
search git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14179 a1c6a512-1295-4272-9138-f99709370657
2007-07-22remove the need for action_signalscreenchange().Jonathan Gordon
Fixes problems with targets where the ACTION_STD_CANCEL event is a combo git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13956 a1c6a512-1295-4272-9138-f99709370657
2007-04-26Fix some naughty variable name reuse (hopefully correctly)Jonathan Gordon
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13269 a1c6a512-1295-4272-9138-f99709370657
2007-04-26Accept FS7078, try to show the last playlist if no audio is being playedJonathan Gordon
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13268 a1c6a512-1295-4272-9138-f99709370657
2007-04-25oops, wrong return valueJonathan Gordon
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13260 a1c6a512-1295-4272-9138-f99709370657