summaryrefslogtreecommitdiff
path: root/apps/plugins/properties.c
AgeCommit message (Collapse)Author
2021-09-16File properties plugin: Add bitrate.James D. Smith
Change-Id: I6160c50685ce1615ef295a472f25cb608b2e6feb
2021-09-16File properties plugin: Add frequency.James D. Smith
Change-Id: I27453b39b5e4a6b4f97eff27a36c8ef2772ec092
2021-09-16File properties plugin: Add disc number.James D. Smith
Change-Id: I98c9ccdffdaae8c5c9117212365ae82b9bf2147c
2021-09-15File properties plugin: Add track.James D. Smith
Change-Id: Id8707dc28bf3a9c029066bb55ff584662b2cee6b
2021-09-15File properties plugin: Add year.James D. Smith
Change-Id: I160507a67354c775ca9695c7e71303fe16beb6db
2021-09-15File properties plugin: Add composer.James D. Smith
Change-Id: I7123ad21af15483594b9d247b89f7712c3a1a6f0
2021-09-15File properties plugin: Add comment.James D. Smith
Change-Id: If6b7650f858134098c3628f6e144e8c8d2a242ef
2021-09-15File properties plugin: Add genre.James D. Smith
Change-Id: Ib28e542c51f6e037a31e6d14763ce2abaca248b9
2021-09-15File properties plugin: Add album artist.James D. Smith
Change-Id: I150e11ba309953959d374898a63d4250a90651bb
2021-08-19plugins trade talk_value for talk_value_decimalWilliam Wilgus
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-07-22plugins pong, properties remove dead codeWilliam Wilgus
Change-Id: I6645ff850a637343dde129600f0b5eaa2e4f6d31
2020-07-24[4/4] Remove HAVE_LCD_BITMAP, as it's now the only choice.Solomon Peachy
Note: I left behind lcd_bitmap in features.txt, because removing it would require considerable work in the manual and the translations. Change-Id: Ia8ca7761f610d9332a0d22a7d189775fb15ec88a
2020-07-24[3/4] Completely remove HWCODEC supportSolomon Peachy
'swcodec' is now always set (and recording_swcodec for recording-capable units) in feature.txt so the manual and language strings don't need to all be fixed up. Change-Id: Ib2c9d5d157af8d33653e2d4b4a12881b9aa6ddb0
2019-08-05Voice enable properties pluginSolomon Peachy
Patch by Igor Poretsky Updated by Solomon Peachy Change-Id: Ia2adf4a65723b08d6c438f836e3e811cba3dced0
2019-08-05Fix stack overflow issues in properties pluginSolomon Peachy
Patch by Igor Poretsky Updated by Solomon Peachy Change-Id: I6b90845712ff92ce7b08b41e5ec92eb33faeff50
2014-08-30Rewrite filesystem code (WIP)Michael Sevakis
This patch redoes the filesystem code from the FAT driver up to the clipboard code in onplay.c. Not every aspect of this is finished therefore it is still "WIP". I don't wish to do too much at once (haha!). What is left to do is get dircache back in the sim and find an implementation for the dircache indicies in the tagcache and playlist code or do something else that has the same benefit. Leaving these out for now does not make anything unusable. All the basics are done. Phone app code should probably get vetted (and app path handling just plain rewritten as environment expansions); the SDL app and Android run well. Main things addressed: 1) Thread safety: There is none right now in the trunk code. Most of what currently works is luck when multiple threads are involved or multiple descriptors to the same file are open. 2) POSIX compliance: Many of the functions behave nothing like their counterparts on a host system. This leads to inconsistent code or very different behavior from native to hosted. One huge offender was rename(). Going point by point would fill a book. 3) Actual running RAM usage: Many targets will use less RAM and less stack space (some more RAM because I upped the number of cache buffers for large memory). There's very little memory lying fallow in rarely-used areas (see 'Key core changes' below). Also, all targets may open the same number of directory streams whereas before those with less than 8MB RAM were limited to 8, not 12 implying those targets will save slightly less. 4) Performance: The test_disk plugin shows markedly improved performance, particularly in the area of (uncached) directory scanning, due partly to more optimal directory reading and to a better sector cache algorithm. Uncached times tend to be better while there is a bit of a slowdown in dircache due to it being a bit heavier of an implementation. It's not noticeable by a human as far as I can say. Key core changes: 1) Files and directories share core code and data structures. 2) The filesystem code knows which descriptors refer to same file. This ensures that changes from one stream are appropriately reflected in every open descriptor for that file (fileobj_mgr.c). 3) File and directory cache buffers are borrowed from the main sector cache. This means that when they are not in use by a file, they are not wasted, but used for the cache. Most of the time, only a few of them are needed. It also means that adding more file and directory handles is less expensive. All one must do in ensure a large enough cache to borrow from. 4) Relative path components are supported and the namespace is unified. It does not support full relative paths to an implied current directory; what is does support is use of "." and "..". Adding the former would not be very difficult. The namespace is unified in the sense that volumes may be specified several times along with relative parts, e.g.: "/<0>/foo/../../<1>/bar" :<=> "/<1>/bar". 5) Stack usage is down due to sharing of data, static allocation and less duplication of strings on the stack. This requires more serialization than I would like but since the number of threads is limited to a low number, the tradoff in favor of the stack seems reasonable. 6) Separates and heirarchicalizes (sic) the SIM and APP filesystem code. SIM path and volume handling is just like the target. Some aspects of the APP file code get more straightforward (e.g. no path hashing is needed). Dircache: Deserves its own section. Dircache is new but pays homage to the old. The old one was not compatible and so it, since it got redone, does all the stuff it always should have done such as: 1) It may be update and used at any time during the build process. No longer has one to wait for it to finish building to do basic file management (create, remove, rename, etc.). 2) It does not need to be either fully scanned or completely disabled; it can be incomplete (i.e. overfilled, missing paths), still be of benefit and be correct. 3) Handles mounting and dismounting of individual volumes which means a full rebuild is not needed just because you pop a new SD card in the slot. Now, because it reuses its freed entry data, may rebuild only that volume. 4) Much more fundamental to the file code. When it is built, it is the keeper of the master file list whether enabled or not ("disabled" is just a state of the cache). Its must always to ready to be started and bind all streams opened prior to being enabled. 5) Maintains any short filenames in OEM format which means that it does not need to be rebuilt when changing the default codepage. Miscellaneous Compatibility: 1) Update any other code that would otherwise not work such as the hotswap mounting code in various card drivers. 2) File management: Clipboard needed updating because of the behavioral changes. Still needs a little more work on some finer points. 3) Remove now-obsolete functionality such as the mutex's "no preempt" flag (which was only for the prior FAT driver). 4) struct dirinfo uses time_t rather than raw FAT directory entry time fields. I plan to follow up on genericizing everything there (i.e. no FAT attributes). 5) unicode.c needed some redoing so that the file code does not try try to load codepages during a scan, which is actually a problem with the current code. The default codepage, if any is required, is now kept in RAM separarately (bufalloced) from codepages specified to iso_decode() (which must not be bufalloced because the conversion may be done by playback threads). Brings with it some additional reusable core code: 1) Revised file functions: Reusable code that does things such as safe path concatenation and parsing without buffer limitations or data duplication. Variants that copy or alter the input path may be based off these. To do: 1) Put dircache functionality back in the sim. Treating it internally as a different kind of file system seems the best approach at this time. 2) Restore use of dircache indexes in the playlist and database or something effectively the same. Since the cache doesn't have to be complete in order to be used, not getting a hit on the cache doesn't unambiguously say if the path exists or not. Change-Id: Ia30f3082a136253e3a0eae0784e3091d138915c8 Reviewed-on: http://gerrit.rockbox.org/566 Reviewed-by: Michael Sevakis <jethead71@rockbox.org> Tested: Michael Sevakis <jethead71@rockbox.org>
2012-04-09Use two lined display in properties.Dominik Riebeling
Depending on the length of the values to display having both entry title and value in the same line can be hard to read if the display isn't wide enough. Similar to the metadata view use two lines for each entry. Change-Id: I9a2dfe78e02b0460add1681115b0c4781d74af17
2011-12-26file properties: display correctly file/folder sizes > 2GBRafaël Carré
Use unsigned type for file sizes (some directory/file structures should be changed too) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31449 a1c6a512-1295-4272-9138-f99709370657
2011-10-15Changed the FOR_NB_SCREENS macro to always be a for loop that declares its ↵Björn Stenberg
own loop variable. This removes the need to declare this variable in the outer scope. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30756 a1c6a512-1295-4272-9138-f99709370657
2011-02-27Blindly forcing stylus mode on plugin entry for an arbitrary subset of touch ↵Jonathan Gordon
targets is a *REALLY BAD IDEA* so do it properly so we dont have to revert any commits. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29417 a1c6a512-1295-4272-9138-f99709370657
2010-12-16Commit FS#11810 by Alexander Meshcheryakov. Boosts the CPU and limits LCD ↵Michael Giacomelli
update rate while recursively scanning files in the properties plugin, improving its scan speed. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28841 a1c6a512-1295-4272-9138-f99709370657
2010-09-01Ged rid of uisimulator/common/io.c for android builds.Thomas Martitz
Use host's functions for file i/o directly (open(), close() ,etc.), not the sim_* variants. Some dir functions need to be wrapped still because we need to cache the parents dir's path (host's dirent doesn't let us know). For the same reason (incompatibility) with host's dirent) detach some members from Rockbox' dirent struct and put it into an extra one, the values can be retrieved via the new dir_get_info(). Get rid of the sim_ prefix for sleep as well and change the signature to unix sleep(). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27968 a1c6a512-1295-4272-9138-f99709370657
2010-08-28Fix r27923: folder size displayed "lld" in propertiesRafaël Carré
Our printf format doesn't support "ll", restore the cast to long git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27931 a1c6a512-1295-4272-9138-f99709370657
2010-08-28properties: remove some text buffersRafaël Carré
use lcd_putsf() remove filesize2string, instead get the "logarithm" (rounded towards zero) and use the this value to compute the size displayed and the unit prefix (nothing/k/m/g) also use struct initializer in dir_properties() git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27923 a1c6a512-1295-4272-9138-f99709370657
2010-08-24Second try: Introduce plugin_crt0.c that every plugin links.Thomas Martitz
It handles exit() properly, calling the handler also when the plugin returns normally (also make exit() more standard compliant while at it). It also holds PLUGIN_HEADER, so that it doesn't need to be in each plugin anymore. To work better together with callbacks passed to rb->default_event_handler_ex() introduce exit_on_usb() which will call the exit handler before showing the usb screen and exit() after it. In most cases rb->default_event_handler_ex() was passed a callback which was manually called at all other return points. This can now be done via atexit(). In future plugin_crt0.c could also handle clearing bss, initializing iram and more. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27873 a1c6a512-1295-4272-9138-f99709370657
2010-08-23Revert "Introduce plugin_crt0.c that every plugin links."Thomas Martitz
Too much errors and no time to fix them now. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27863 a1c6a512-1295-4272-9138-f99709370657
2010-08-23Introduce plugin_crt0.c that every plugin links.Thomas Martitz
It handles exit() properly, calling the handler also when the plugin returns normally (also it makes exit() more standard compliant while at it). It also holds PLUGIN_HEADER, so that it doesn't need to be in each plugin anymore. To work better together with callbacks passed to rb->default_event_handler_ex introduce exit_on_usb() which will call the exit handler before showing the usb screen and exit() after it. In most cases it was passed a callback which was manually called at all other return points. This can now be done via atexit(). In future plugin_crt0.c could also handle clearing bss, initializing iram and more. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27862 a1c6a512-1295-4272-9138-f99709370657
2009-12-21properties,shortcuts_view: enable the theme while showing list.Teruaki Kawashima
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24092 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-07-29Check if parameter is NULL in plugins which only works as viewer.Teruaki Kawashima
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22083 a1c6a512-1295-4272-9138-f99709370657
2009-07-14FS#10080Nils Wallménius
* Move strncpy() from core to the pluginlib * Introduce strlcpy() and use that instead in most places (use memcpy in a few) in core and some plugins * Drop strncpy() from the codec api as no codec used it * Bump codec and plugin api versions git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21863 a1c6a512-1295-4272-9138-f99709370657
2009-06-24Do not unnecessarily change and restore the status bar setting (part of ↵Alexander Levin
FS#10138 by Teruaki Kawashima) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21493 a1c6a512-1295-4272-9138-f99709370657
2009-02-21Display duration for audio files, by special demand and because it was easy ↵Jens Arnold
to add. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20080 a1c6a512-1295-4272-9138-f99709370657
2009-01-24remove MEM_FUNCTION_WRAPPERS, and private mem* implementations from plugins, ↵Andrew Mahone
and replace with pluginlib implementations in plugins/lib/gcc-support.c git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19847 a1c6a512-1295-4272-9138-f99709370657
2009-01-16loader-initialized global plugin API:Andrew Mahone
struct plugin_api *rb is declared in PLUGIN_HEADER, and pointed to by __header.api the loader uses this pointer to initialize rb before calling entry_point entry_point is no longer passed a pointer to the plugin API all plugins, and pluginlib functions, are modified to refer to the global rb pluginlib functions which only served to copy the API pointer are removed git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19776 a1c6a512-1295-4272-9138-f99709370657
2008-08-15Ok, ok, strncpy is better here :PNils Wallménius
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18285 a1c6a512-1295-4272-9138-f99709370657
2008-08-15Kill one more of the printf related warnings in gcc 4.3.1Nils Wallménius
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18284 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-13Plugin parameters should be const.Steve Bavin
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17492 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-09-19Remove the ID3 tag version priority setting on the grounds of it being ↵Thom Johansen
pretty pointless. ID3v2 tags are superior to ID3v1 tags, and needs less seeking around to find. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14750 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-14properties plugin: Make the ID3 info available on HWCODEC targets too.Nicolas Pennequin
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14334 a1c6a512-1295-4272-9138-f99709370657
2007-08-14Hopefully green this time (move the variable declarations inside the #if block).Nicolas Pennequin
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14331 a1c6a512-1295-4272-9138-f99709370657
2007-08-14properties plugin: the HWCODEC targets don't have get_metadata so no ID3 ↵Nicolas Pennequin
info for them. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14330 a1c6a512-1295-4272-9138-f99709370657
2007-08-14Add a bit of metadata info in the properties plugin output.Nicolas Pennequin
When displaying the properties of a file, attempt to get metadata from it and on success, display the artist, title and album strings. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14328 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-07-20Makes apps and plugins interract with directories using a posix-like api ↵Kevin Ferrare
instead of calling dircache / simulator functions (no additionnal layer added, only a cosmetic change) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13943 a1c6a512-1295-4272-9138-f99709370657