summaryrefslogtreecommitdiffstats
path: root/apps/plugin.h
AgeCommit message (Collapse)AuthorFilesLines
2023-10-31Playing Time plugin: Fix calculation for shuffled playlistsChristian Soffke1-0/+2
Playing Time produced incorrect results when the playlist's first index wasn't 0. Change-Id: I1c11b876e0e435c824c9ddc0863fd7ee76bda073
2023-10-05[FixRed] db_commitWilliam Wilgus1-0/+2
Non Tagcache targets Change-Id: I0e6c1e8551859863105f97f393b308bca947c6d4
2023-10-05[Feature] db_commit plugin allows a more verbose commitWilliam Wilgus1-1/+1
prints logf messages to the screen buffer and dumps the output to .rockbox/db_commit_log.txt logs warnings about tags that can't be displayed by the current font adds an option to the tagcache using the file .rockbox/database_commit.ignore to prevent auto commit Change-Id: Ib381b3b6d9dd19d76c95d0e87e605f7378e29674
2023-10-03tagcache/tagtree remove static buffer from tagcache_get_nextWilliam Wilgus1-14/+15
callers can supply their own buffer Change-Id: I8996ecfb88e30926296a0cb0563cf6c46977323e
2023-09-20RFC: Turn Playing Time function into pluginChristian Soffke1-0/+11
Since this function already requires hitting the disk, it may make sense to turn it into a plugin. A minor advantage (apart from cleaning up onplay.c and saving RAM) is that you can now access the menu not just from the WPS context menu, but also from the Shortcuts Menu or using the WPS plugin shortcut. On the other hand, TSR plugins would have to be terminated when Playing Time is launched, as is already the case for other plugins such as PictureFlow. Change-Id: Iea85229486887463ffc52f05e33e2340437f69a4
2023-07-02playlist: Remove playlist_add()Aidan MacDonald1-1/+0
It was only used in filetree.c. It's still implemented in Lua so scripts using rb.playlist_add() won't break, but has been removed from the Lua API "backend". Change-Id: I5625a47f0692456008c6b10dee14755151d22f29
2023-05-27PictureFlow: Make Shuffle options availableChristian Soffke1-2/+2
The "Playing Next..." menu couldn't display any options for shuffling tracks of an album before Change-Id: I54f4497394fb29877bf8bce0ef95a27c82eb2279
2023-04-13Track Info: Show number of tracks being inspectedChristian Soffke1-1/+1
Applies to the database and PictureFlow + fix red 6ca57ec Change-Id: If708851ebdfe075e9d6ea3f2e2dd790cc9deac94
2023-04-13Track Info: Display larger file size and length valuesChristian Soffke1-2/+2
When displaying Track Info for multiple tracks, the value for combined file sizes or length was capped at 2 GiB / ~596h. Limit has been raised by a factor of 1000. Change-Id: I942c64e81864cba3f719c83a24912883fafeb70e
2023-03-25[Feature] resume TSR plugins after interruption WIPWilliam Wilgus1-13/+17
save tsr plugin path for later resume tsr plugin when user stops the interrupting plugin expand return of tsr_exit function to allow continue, suspend, terminate tsr plugins check parameter at start to determine if the plugin is being resumed Change-Id: I6fc70de664c7771e7dbc9a1af7a831e7b50b1d15
2023-03-23playlist: Simplify playlist modified detectionAidan MacDonald1-0/+1
Any modifications to the playlist (insert, delete, shuffle, etc) will cause the modified flag to be set. The flag is cleared when the playlist is saved. Code that generates playlists can manually clear the modified flag if appropriate; there is now a proper API for this so the tagcache and pictureflow don't need to resort to hacks. Change-Id: I8d3c723265a41db07a13de3f1d2abb0444528d57
2023-03-21plugins: Simplify plugin/codec API versioningAidan MacDonald1-10/+11
Replace the minimum version bound with a check on the size of the API struct. The version only needs to be incremented for ABI breaking changes. Additions to the API won't need to touch the version number, resulting in fewer merge conflicts. Change-Id: I916a04a7bf5890dcf5d615ce30087643165f8e1f
2023-01-22Add perceptual volume adjustmentAidan MacDonald1-1/+2
The perceived loudness change of a change in volume depends on the listening volume: at high volumes a 1 dB increment is noticeable, but at low volumes a larger increment is needed to get a comparable change in loudness. Perceptual volume adjustment accounts for this fact, and divides the hardware volume range into a number of steps. Each step changes the dB volume by a variable amount, with most of the steps concentrated at higher volumes. This makes it possible to sweep over the entire hardware volume range quickly, without losing the ability to finely adjust the volume at normal listening levels. Use "Volume Adjustment Mode" in the system settings menu to select perceptual volume mode. The number of steps used is controlled by "Number of Volume Steps". (Number of steps has no effect in direct adjustment mode.) It's still possible to set a specific dB volume level from the sound settings menu when perceptual volume is enabled, and perceptual volume does not affect the volume displayed by themes. Change-Id: I6f91fd3f7c5e2d323a914e47b5653033e92b4b3b
2023-01-19database: make parent tables work with pluginChristian Soffke1-1/+5
Enables the use of PictureFlow and the Properties plugin with parent tables of ALLSUBENTRIES, such as an album or album artist, instead of individual tracks. Change-Id: I18c4779ed116a48c732ae32b9629e7e0d93ce7c8
2023-01-15buflib: Add CONFIG_BUFLIB_BACKEND for selecting a buflib backendAidan MacDonald1-1/+1
Defaults to the normal "mempool" backend, which is currently the only implementation. Change-Id: I56d034a6e0f5edc90c39526d1551945eec6ca336
2023-01-15buflib: Prep for multiple backend support, rename to buflib_mempoolAidan MacDonald1-1/+1
Rename the current buflib implementation to buflib_mempool. Change-Id: Iefdf74be1f7d8fcd19e6ce2289c3d1459b54d013
2023-01-14PictureFlow: Add ability to insert into playlistsChristian Soffke1-1/+3
Songs or albums can now be added to new or existing playlists directly from PictureFlow. Change-Id: I6ea27e393fee0d5688385f9e91cf835be1756a7a
2023-01-14Fix red in 7f265eeChristian Soffke1-1/+2
Change-Id: Ib2496af0ed6176ea537e1f61804c1ba514374fb6
2023-01-13Remove buflib allocation names, part twoAidan MacDonald1-3/+2
Remove allocation names from the buflib API and fix up all callers. Change-Id: I3df922e258d5f0d711d70e72b56b4ed634fb0f5a
2023-01-10PictureFlow: Add 'Track Info' for tracks or whole albumsChristian Soffke1-1/+4
Context menu gains new option to view metadata for individual tracks or albums. Will display an album's length and total file size. Other fields are displayed only if they are identical across all tracks (except for the album year, which is determined by the highest value encountered). Change-Id: Ibc14cfaf2cb3d91b8d1cfbee05c6261db4975355
2023-01-06plugins: Properties: Add 'Last Modified' for audio filesChristian Soffke1-3/+4
In commit f3358eb, the Properties plugin started using the Track Info screen for audio files, which didn't show when the file was last modified. This adds it back. Change-Id: I3ce519da234a4bcadab1d64b67de0298cada8f6e
2022-12-22rbcodec dsp: Replace enum dsp_ids arguments with unsigned intAidan MacDonald1-1/+1
Because casting to and from "enum dsp_id" just adds noise, change everything to unsigned int. Change-Id: I52a7ae55f406e673d5b811b29657fcdc4b62ab10
2022-12-19remove rockboxlogo after boot INIT_ATTRWilliam Wilgus1-3/+2
nets about 5k on clipzip (less on mono, more on others) to move rockboxlogo to .initdata section Remove show_logo completely and move to main.c remove plugin stub give credits plugin its own copy credit fallback is now show_info() Change-Id: Id9ed787e605ed29e7ab1e7a74d3821cd0f840ed4
2022-12-17Remove browse_context_init()Aidan MacDonald1-6/+2
Prefer to use designated initializers to avoid having to specify unneeded parameters. Non-initialized members are zero-initialized by the compiler. Change-Id: Ia6a03c45cb3ef0b30f458d7d0ae1604a350c737c
2022-12-17settings: Remove setting ID return from find_setting()Aidan MacDonald1-10/+8
Now that all users have replaced setting IDs with direct pointers, find_setting() and friends don't need to return an ID value. Change-Id: I8c5c31bb68d3bca5350d43538335265a55fd5517
2022-10-22PictureFlow: Minor fixes & changed defaultsChristian Soffke1-1/+6
- Fix FPS counter overlapping the artist string when "Show album title" was set to "Show album and artist at the top" - Fix disappearance of center album if certain Settings menus had been accessed while list of tracks was showing and you then returned to the list of albums - Fix disappearing album artwork after cache had been created until you started scrolling - Enable context menu even if WPS integration is disabled - Make splash screen appear only on first launch and for database updates, when it is actually on screen for long enough - Eliminate 'Loading' splash if tagcache is in RAM - Show both album and artist by default on displays whose height > 100px Change-Id: Ie70c0d9093789294d288a4f88338ee4a588bf4a5
2022-10-13Revert "Remove YUV blitting functions and LCD modes"Solomon Peachy1-0/+11
This reverts commit fe6aa21e9eb88f49005863efd2003d0982920048. Change-Id: I8bb1e5d6c52ed1478002d2140ef494ec5d62b8e3
2022-10-05gui: Remove list "limit_scroll" memberAidan MacDonald1-2/+2
Get rid of the "limit_scroll" member from lists and make it a local variable of gui_synclist_do_button(). Bump plugin API version since struct gui_synclist was changed. Change-Id: Ie3244a85e5a1022a2f6e238a506fdbba67724962
2022-10-05gui: Remove "enum list_wrap" from list action functionsAidan MacDonald1-4/+3
Removing the "list_wrap" argument is actually pretty easy. In practice, almost all lists are using LIST_WRAP_UNLESS_HELD behavior so we can make that the default. A couple of lists disable wraparound with LIST_WRAP_OFF; this is now achieved by setting the list "wraparound" flag to false when setting up the list. LIST_WRAP_ON was unused and is of questionable value, so it has been removed entirely. This makes list wraparound behavior a property of the list, controlled solely by the "wraparound" flag. The result is a simpler list API and implementation, without changing the behavior of any lists. Change-Id: Ib55d17519e6d92fc95ae17b84ab0aaf4233bcb5a
2022-10-05gui: Remove gui_synclist_limit_scroll()Aidan MacDonald1-3/+2
Since gui_synclist_do_button() overrides the setting at runtime there is no reason to have a public API call to set it. Really it should be a local variable, but it will be simpler to do that after refactoring how list wraparound behavior is handled. Change-Id: Id09d42197814102693752a9f64db8325118ca796
2022-10-03Remove YUV blitting functions and LCD modesAidan MacDonald1-11/+0
None of this is needed now that mpegplayer is gone. Change-Id: I360366db8513e4d988021e8d7b7d8eb09930efb8
2022-10-02gui: Remove show/hide selection option in listsAidan MacDonald1-15/+18
The implementation of the "show_selection_marker" option in lists isn't great. It's a cosmetic option used to hide the selection, but it causes the list to do funny things to the selected_item and doesn't play nice with voiced menus, since these rely on the selection to determine what item is spoken. There are only two user-facing lists that use the option, the "Rockbox Info" screen and a menu in the superdom plugin. The rest are debug screens, and cosmetics don't matter much there. Given how little used the option is, and its issues, removing it seems reasonable. Change-Id: I2c70b3e4c74ff3cc6dbac46366a371d271dd2d58
2022-10-02gui: Constify list title textAidan MacDonald1-1/+1
Use const char* pointers for list titles. Only one debug menu actually modifies the title, and in that case it's legal to cast away const because the title points to a known mutable buffer on the stack. Change-Id: Idb8ab307b9a6ec23a93d8420c5e19fafd9f59c30
2022-05-09Properties plugin: Eliminate redundant Track Info codeChristian Soffke1-2/+5
When opening an audio file from the file browser or database using the Properties plugin, it will now use existing code from the Show Track Info screen for displaying metadata. The menu option has been renamed accordingly. Change-Id: I5a824865b9f980151b91aff3c3c18ec45830a12c
2022-04-16Fix red in 3fcdadce24Aidan MacDonald1-0/+2
Change-Id: Idbee52505b3c109a0aad23e2edf7dd78519eb173
2022-04-16plugins: Add multiboot select pluginAidan MacDonald1-1/+4
This plugin provides a menu for easily editing the root redirect file on targets that support multiboot. You can select a new root from a list of Rockbox installations detected on the filesystem or remove all redirects to boot from the default location. To avoid searching the whole filesystem, only subdirectories of the volume roots are checked for valid installations. Only installations that are compatible with the current player will be displayed. Change-Id: I7dcbadfd97873b87817870e61d2ae37956d2da00
2022-03-25add way to lock portion of plugin buffer for TSR pluginsWilliam Wilgus1-0/+2
Some things in core that should probably be plugins steal the plugin buffer for their own use, TSR plugins have no way to detect or prevent this lock buffer reserves buffer_size bytes directly after the plugin itself returns the unreserved bytes still available from the plugin buffer Change-Id: I5a7849e209129b09400036a594569ef396b1b85f
2022-02-23Core Keyremap Allow setting keymap from pluginWilliam Wilgus1-0/+1
Allow setting and removing keyremap on the fly It was pretty annoying trying to work out a keyremap with a restart required to set the remap and was quite annoying when I was no longer able to navigate to the plugin or filebrowser due to setting the wrong remap now you can try out a keymap and if it doesn't work a restart will sort things out Change-Id: I848fb3bd759f9684ac2497324a371f92b7464f7b
2022-01-04PictureFlow: Switch between albums from track viewChristian Soffke1-1/+2
Prev/next buttons on iPods or Fiio M3k can now be used to select another album without having to return to the albums view first. Scroll wheel/strip handles scrolling up and down in the track list as before. Other targets probably have the necessary buttons for this, so the keymap can be extended in the future (same goes for alphabetic browsing) Also prevents queue overflow and handles failure case for track list tagcache retrieval. Change-Id: Ic8ff4471e1583d1ab1f7d16911b15705a7f60aca
2022-01-04PictureFlow: Utilize "Current Playlist" menu (+ GS fixes)Christian Soffke1-1/+3
When appending tracks, they were always inserted last. You can now choose from the usual options offered by the "Current Playlst" context menu to queue or to insert tracks at the requested position. The splash after appending that forced you to wait for 2s has been eliminated. Also fixes crashes on targets that use the grey_core lib if a splash showed up when playback was started, e.g. LANG_PLAYLIST_CONTROL_ACCESS_ERROR, or when PictureFlow quit. Change-Id: I661c59057b5315ba793ee1674f7a2ea1ffd7968d
2021-12-24Remove dead code/documentation/commentsChristian Soffke1-1/+0
Change-Id: I4928d5967ad8a1f15b8725853102b74420252cc6
2021-12-23battery_bench: Log battery current informationAidan MacDonald1-1/+2
Works on targets supporting CURRENT_MEASURE. Change-Id: I021b995c46fab923287ad54e72863695ef9ed58a
2021-12-05plugin.h & lua add playlist_insert_playlistWilliam Wilgus1-1/+2
having issues running lua and loading a playlist Change-Id: I72d32d77e6567ceed7e8e5fd492eebf0ee44561a
2021-12-02PictureFlow: Warn Before Erasing PlaylistChristian Soffke1-1/+2
Respect system-wide setting, in consistence with browser behavior Change-Id: I7df90554a466ed5ca1b99da179cc7d95360499b6
2021-11-11folder_select.c move to plugin as db_folder_selectWilliam Wilgus1-0/+1
handles the folder selection for autoresume paths and database paths folder_select uses the pluginbuf to build the directory tree hopefully having it as a plugin will make it stop corrupting TSR plugins like battery_bench and announce_status I left the original include and source in the gui directory for now there are currently no other users.. Change-Id: If40ccb5a2bec4286a0616c10dfa7e1479a592808
2021-11-10pitchscreen make it a pluginWilliam Wilgus1-10/+13
full commandline parsing -has pitch, speed, time_stretch /* pitch_screen * accepts args -q, -g, -p=, -s=, -k=; (= sign is optional) * -q silences output splash * -g runs the gui (Runs immediately) * -p100 would set pitch to 100% * -s=90 sets speed to 90% if timestrech is enabled * -k=true -k1 enables time stretch -k0 -kf-kn disables */ Change-Id: I900c4b5d184e12ddbe47509f66fdf3e55193a520
2021-10-22plugin.h change plugin_open() path and parameter to constWilliam Wilgus1-2/+2
it doesn't modify the args.. Change-Id: Ie8e1e36a060231c0137292c770e4f77da3b8203a
2021-08-26Plugin Api add core bitmapsWilliam Wilgus1-1/+2
share all the core icons with plugins these are all small mono icons like usb plug icon or play, fast forward, rewind icons --include the icon_helper function Change-Id: I385028815a4dd368515f491a9e19dee3d500252d
2021-08-19plugins trade talk_value for talk_value_decimalWilliam Wilgus1-1/+1
talk_value is just talk_value_decimal with 0 decimals lets add the extended function instead static inline int talk_val(long n, int unit, bool enqueue) { #define NODECIMALS 0 return rb->talk_value_decimal(n, unit, NODECIMALS, enqueue); } Change-Id: Iaba3d2f95785f2e1855e294ccf099a977bb6cb20
2021-06-21rockbox: add a crc32 reverse polynomial functionJames Buren1-0/+1
This uses the reverse of the polynomial used by the current crc_32 function. The code for this was derived from the implementation used by tinf. This version is space optimized and should be a good way to reduce code duplication in other parts of rockbox that use the same crc32 algorithm. This is mainly of use in areas where DEFLATE is in use. Change-Id: I918da5b4ea4dc441c0e7e6b5007abcc2da463bcb