path: root/apps/plugins/mpegplayer/mpegplayer.c
AgeCommit message (Collapse)AuthorFilesLines
2020-10-26LCD core move buf ptr and address look up function viewport structWilliam Wilgus1-2/+10
I'm currently running up against the limitations of the lcd_draw functions I want these functions to be able to be used on any size buffer not just buffers with a stride matching the underlying device [DONE] allow the framebuffer to be decoupled from the device framebuffer [DONE need examples] allow for some simple blit like transformations [DONE] remove the device framebuffer from the plugin api [DONE}ditto remote framebuffer [DONE] remove _viewport_get_framebuffer you can call struct *vp = lcd_set_viewport(NULL) and vp->buffer->fb_ptr while remote lcds may compile (and work in the sim) its not been tested on targets [FIXED] backdrops need work to be screen agnostic [FIXED] screen statusbar is not being combined into the main viewport correctly yet [FIXED] screen elements are displayed incorrectly after switch to void* [FIXED] core didn't restore proper viewport on splash etc. [NEEDS TESTING] remote lcd garbled data [FIXED] osd lib garbled screen on bmp_part [FIXED] grey_set_vp needs to return old viewport like lcd_set_viewport [FIXED] Viewport update now handles viewports with differing buffers/strides by copying to the main buffer [FIXED] splash on top of WPS leaves old framebuffer data (doesn't redraw) [UPDATE] refined this a bit more to have clear_viewport set the clean bit and have skin_render do its own screen clear scrolling viewports no longer trigger wps refresh also fixed a bug where guisyncyesno was displaying and then disappearing [ADDED!] New LCD macros that allow you to create properly size frame buffers in you desired size without wasting bytes (LCD_ and LCD_REMOTE_) LCD_STRIDE(w, h) same as STRIDE_MAIN LCD_FBSTRIDE(w, h) returns target specific stride for a buffer W x H LCD_NBELEMS(w, h) returns the number of fb_data sized elemenst needed for a buffer W x H LCD_NATIVE_STRIDE(s) conversion between rockbox native vertical and lcd native stride (2bitH) test_viewports.c has an example of usage [FIXED!!] 2bit targets don't respect non-native strides [FIXED] Few define snags Change-Id: I0d04c3834e464eca84a5a715743a297a0cefd0af
2020-10-26make the plugin API frambuffer agnosticMoshe Piekarski1-2/+2
Change-Id: I5abdc231093054c517ff53b9a456997e440e3f6e
2020-10-11New port: AIGO EROS Q / EROS KSolomon Peachy1-32/+23
The Q and K have a slightly different case, but the hardware under the shell is completely identical. These models are rebadged versions: * Hifiwalker H2 (== Q) * AGPTek H3 (== K) * Surfans F20 (== K) Other notes: * Significant improvements in the shared Hiby-platform launcher/loader * SD card can theoretically be hot-swapped now * Support external USB mass storage! * Some consolidation of Hiby-platform targets * Some consolidation of plugin keymaps Todo/known issues: * Keymaps need to be gone over properly * Convert to HAVE_SCROLLWHEEL? Change-Id: I5a8a4f22c38a5b69392ca7c0a8ad8c4e07d9523c
2020-10-09New port: FiiO M3KSolomon Peachy1-0/+9
Most credit goes to: Roman Skylarov Additional integration and refactoring by myself. *** COMPLETELY UNTESTED *** Change-Id: Ia64c36d92e0214c6b15f7a868df286f8113ea27b
2020-07-24plugins: More HAVE_BACKLIGHT cleanupSolomon Peachy1-0/+4
Change-Id: I70cf700f5bc3d4375c025efa62ef40fd2bd70293
2020-04-06xDuoo X3II and X20 portMarcin Bukat1-0/+18
Provided by Roman Stolyarov Integration, Refactoring, and Upstreaming by Solomon Peachy X3II confirmed working by forum tester, X20 is nearly identical. This includes bootloader, main firmware, and the flash image patcher. Eventual Todo: * Further refactor AGPTek Rocker & xduoo hiby bootloaders * Further refactor AGPTek Rocker & xduoo hosted platform code Change-Id: I34a674051d368efcc75d1d18c725971fe46c3eee
2019-08-04Speech feedback in mpegplayer menusSolomon Peachy1-0/+67
Patch by Igor Poretsky Change-Id: Idc6920e17be6537557f2b1cf00f7e559e30b45e8
2019-01-02Add Xuelin iHIFI 770/770C/800 supportSolomon Peachy1-0/+18
Taken from the xvortex fork (Roman Stolyarov) Ported, rebased, and cleaned up by myself. Change-Id: I7b2bca2d29502f2e4544e42f3d122786dd4b7978
2018-07-28Add cleaned-up xDuoo X3 supportSolomon Peachy1-0/+9
Cleaned up, rebased, and forward-ported from the xvortex fork. (original credit to Change-Id: Ibcc023a0271ea81e901450a88317708c2683236d Signed-off-by: Solomon Peachy <>
2018-06-12Agptek Rocker: Build pluginsMarcin Bukat1-0/+9
Patch provided by Aapo Tahkola. Change-Id: I37a42a950d78d6b8aa3927ec7aeb30030f7be7a5
2018-04-03Zen XFi2: Enable PluginsSebastian Leonhardt1-0/+5
Keymaps aren't tested, there may be room for improvement. Change-Id: I6b8fe697899b241ea6e96f4fe446d88671ad7818
2016-01-25Replace SAMSUNG_YH920_PAD with YH92XSebastian Leonhardt1-1/+1
seems more logical to me, and is more consistent, since "SAMSUNG_YH92X_PAD" is already used in the tex files. Change-Id: Ie9a9d850ea86155a7dcf86c88a22a420a10a3837
2015-11-15YH8xx,YH9xx: Keymap improvementSebastian Leonhardt1-5/+6
The main "innovation" in this patch are two "virtual buttons" for the record switch on YH92x targets. When the switch state changes, a single BUTTON_REC_SW_ON or .._OFF button event will be generated. Thus keymap code can react on switching, but not on the actual state of the switch. Wherever sensible, the following user scheme is applied: - use PLAY as confirm button - use REW button or Long REW to exit - use REC (YH820) or FFWD (YH92X) as modifier key for button combos Change-Id: Ic8d1db9cc6869daed8dda98990dfdf7f6fd5d5a1
2015-01-12Get rid of stupid _backlight_* function namesMarcin Bukat1-5/+5
_remote_backlight_* and _buttonlight_* are cleaned as well Change-Id: I73653752831bbe170c26ba95d3bc04c2e3a5cf30
2014-09-18Introducing Targets iBasso DX50 & iBasso DX90Simon Rothen1-0/+9
The port to for this two targets has been entirely developped by Ilia Sergachev (alias Il or xzcc). His source can be found at . The few necesary modifications for the DX90 port was done by headwhacker form Unfortunately i could not try out the final state of the DX90 port. The port is hosted on android (without java) as standalone app. The official Firmware is required to run this port. Ilia did modify the source files for the "android" target in the rockbox source to make the DX port work. The work I did was to separate the code for DX50 (&DX90) from the android target. On this Target Ilia used source from tinyalsa from AOSP. I did not touch that part of the code because I do not understand it. What else I changed from Ilias sources besides the separation from the target "android": * removed a dirty hack to keep backlight off * changed value battery meter to voltage battery meter * made all plugins compile (named target as "standalone") and added keymaps * i added the graphics for the manual but did not do anything else for the manual yet * minor optimizations known bugs: * timers are slowed donw when playback is active (tinyalsa related?) * some minor bugs Things to do: * The main prolem will be how to install the app correctly. A guy called DOC2008 added a CWM (by to the official firmware and Ilia made a CWM installation script and a dualboot selector (rbutils/ibassoboot, build with ndk-build). We will have to find a way to install rockbox in a proper way without breaking any copyrights. Maybe ADB is an option but it is not enable with OF by default. Patching the OF is probably the way to go. * All the wiki and manual to build: needed: android ndk installed, android sdk installed with additional build-tools 19.1.0 installed ./tools/configure select iBasso DX50 or iBasso DX90 make -j apk the content of needs to be copied to /system/rockbox/app_rockbox/rockbox/ (rockbox app not needed) the content of libs/armeabi to /system/rockbox/lib/ (rockbox app needed) The boot selector is needed as /system/bin/MangoPlayer and the iBasso app as /system/bin/MangoPlayer_original. There is also the "vold" file. The one from OF does not work with DX50 rockbox (DX90 works!?), the one from Ilia is necessary. Until we have found a proper way to install it, it can only be installed following the instructions of Ilia on his bitbucket page, using the CWM-OF and his installation script package. Change-Id: Ic4faaf84824c162aabcc08e492cee6e0068719d0 Reviewed-on: Tested: Chiwen Chang <> Reviewed-by: Michael Giacomelli <>
2014-07-17zen/zenxfi/zenxfistyle/zenmozaic: implement plugin keymaps and enable pluginsAmaury Pouly1-0/+8
Plugins on the ZEN/ZEN X-Fi require to increase the plugin buffer size. Change-Id: If4651c87b402060faa24530985c6e871379c8ea1
2014-07-17keymaps: cleanupAmaury Pouly1-4/+5
- remove useles define in pegbox - improve keymap of nwz in mpegplayer - fix whitespace alignement Change-Id: I0d5e3c59f89ed8e0e02c386255286cfbb8693230
2014-06-30Introduce plugin keymaps for the Sony NWZ SeriesNils Stec1-0/+9
Change-Id: I46b8766bd44118bce4931b7ee71815ae5f51cb2e Reviewed-on: Reviewed-by: Amaury Pouly <>
2014-06-21lcd-24bit: Introduce a 24-bit mid-level LCD driverThomas Martitz1-5/+27
With LCD driver all calculation will be performed on RGB888 and the hardware/OS can display from our 24bit framebuffer. It is not yet as performance optimized as the existing drivers but should be good enough.The vast number of small changes is due to the fact that fb_data can be a struct type now, while most of the code expected a scalar type. lcd-as-memframe ASM code does not work with 24bit currently so the with 24bit it enforces the generic C code. All plugins are ported over. Except for rockpaint. It uses so much memory that it wouldnt fit into the 512k plugin buffer anymore (patches welcome). Change-Id: Ibb1964545028ce0d8ff9833ccc3ab66be3ee0754
2014-05-24Separate keymaps for YH-820 and YH-920/925Sebastian Leonhardt1-1/+2
Although both players basically have the same keys, the differences in the layout is rather big, so I think both deserve their own keymaps. (On the yh820 the FFWD/PLAY/REW buttons are located above the direction keys, on the yh920 at the side of the player. Furthermore the yh920/925 has a REC switch, whereas yh820 has a push button.) Change-Id: I0e62a1b101c387646c0bdb07ea142d9d2430ca15 Reviewed-on: Reviewed-by: Szymon Dziok <>
2014-04-06Complete Plugin Keymaps for Creative Zen X-Fi3David Jilke1-0/+9
This patch completes the plugin keymaps for the Zen X-Fi3 and enables those plugins for compilation. One key was changed in "button-target.h" for compatibility with Rockboy. This also caused the changes to "keymap-zenxfi3.c", to keep the stock functionality (no further changes in here). Change-Id: Ic222faf89e9a9a2332a49d6e532cedb6eb16d3d7 Reviewed-on: Reviewed-by: Amaury Pouly <>
2014-03-14events: Rework event subsystem (add_event, send_event) to be more versatile.Thomas Martitz1-2/+3
add_event_ex is added that takes an extra user_data pointer. This pointer is passed to the callback (add_event and add_event_ex have slightly different callbacks types). All callbacks also get the event id passed. Events added with add_event_ex must be removed with remove_event_ex because the user_data pointer must match in addition to the callback pointer. On the other add_event is simplified to omit the oneshort parameter which was almost always false (still there with add_event_ex). As a side effect the ata_idle_notify callbacks are changed as well, they do not take a data parameter anymore which was always NULL anyway. This commit also adds some documentation to events.h Change-Id: I13e29a0f88ef908f175b376d83550f9e0231f772
2012-05-07Don't reinvent ctype.h functionsNils Wallménius1-16/+16
Remove ctype.h functions in text_editor and rockboy, fix #define name clash in mpegplayer. Change-Id: Icb40cf45e27b793c62cb095197757a27f508f344
2012-04-19hm801: Add support for plugins.Andrew Ryabinin1-0/+9
Change-Id: I81654db87d38324d8680a56bcdb7e9922ee5b619
2012-04-19hm60x: Add support for plugins.Andrew Ryabinin1-0/+9
Change-Id: I4cad0881c8249f163680a280f70d1a0b36248da8
2011-12-24Initial commit of the Samsung YP-R0 port.Thomas Martitz1-0/+9
This port is a hybrid native/RaaA port. It runs on a embedded linux system, but is the only application. It therefore can implement lots of stuff that native targets also implement, while leveraging the underlying linux kernel. The port is quite advanced. User interface, audio playback, plugins work mostly fine. Missing is e.g. power mangement and USB (see SamsungYPR0 wiki page). Included in utils/ypr0tools are scripts and programs required to generate a patched firmware. The patched firmware has the rootfs modified to load Rockbox. It includes a early/safe USB mode. This port needs a new toolchain, one that includes glibc headers and libraries. can generate it, but e.g. codesourcey and distro packages may also work. Most of the initial effort is done by Lorenzo Miori and others (on ABI), including reverse engineering and patching of the original firmware, initial drivers, and more. Big thanks to you. Flyspray: FS#12348 Author: Lorenzo Miori, myself Merry christmas to ypr0 owners! :) git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2011-11-16Sandisk Sansa Connect port (FS #12363)Tomasz Moń1-0/+9
Included are drivers for buttons, backlight, lcd, audio and storage. git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2011-10-02fuze+°: add mpeg keymapAmaury Pouly1-0/+9
git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2011-08-30GSoC/Buflib: Enable compaction in buflib.Thomas Martitz1-1/+1
This enables the ability to allocate (and free) memory dynamically without fragmentation, through compaction. This means allocations can move and fragmentation be reduced. Most changes are preparing Rockbox for this, which many times means adding a move callback which can temporarily disable movement when the corresponding code is in a critical section. For now, the audio buffer allocation has a central role, because it's the one having allocated most. This buffer is able to shrink itself, for which it needs to stop playback for a very short moment. For this, audio_buffer_available() returns the size of the audio buffer which can possibly be used by other allocations because the audio buffer can shrink. lastfm scrobbling and timestretch can now be toggled at runtime without requiring a reboot. git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2011-08-03Cleanup tree.c cache handling a bit.Thomas Martitz1-1/+1
* Rename stuff to not re-use the term dircache * Move cache to own struct * Encapsulate retrieving entries a bit git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2011-07-08Have mpegplayer use the mixer (the playback channel, since it's mutually ↵Michael Sevakis1-5/+21
exclusive to audio playback) so the clicks and skip beep can be used according to user settings. Introduce some system sound functions to make easier playing event sounds from various places and convert files calling 'beep_play' to use 'system_sound_play' and 'keyclick_click'. Event sound could be become themeable. git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2011-05-13mpegplayer: Adapt to new pause_rewind setting and apply it for allMichael Hohmuth1-9/+9
kinds of pause, not just pause on headphone unplug. git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2011-05-08Fix a bunch of 'variable set but not used' warnings reported from GCC 4.6.0.Andree Buschmann1-6/+6
git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2011-03-05Anti-Aliased Fonts support.Thomas Martitz1-2/+172
This enables Rockbox to render anti-aliased fonts using an alpha blending method. The input font bitmaps are 4bit, i.e. 4x larger, but the metadata size stays the same. A tool, convttf, for converting ttf fonts directly to the Rockbox fnt format is provided. It has a useful help output, but the parameter that works best is -c1 or -c2 (2 for larger font sizes). Flyspray: FS#8961 Author: Initial work by Jonas Hurrelmann, further work by Fred Bauer, Andrew Mahone, Teruaki Kawashima and myself. git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2011-02-22mpegplayer: Move libmpeg2 files into their own subdirectory so things are ↵Michael Sevakis1-1/+0
less cluttered. git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2011-01-24* Rename backlight_force_on to backlight_ignore_timeout to make it clear ↵Teruaki Kawashima1-2/+1
what the function does. * Add backlight_force_on() which forces to turn on backlight even when the setting is set to Off. use this in lamp. No functional change except lamp. See aslo FS#9883. git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2011-01-03MPEGPlayer graphics mutation: Implement a more visible FPS display and ↵Michael Sevakis1-5/+125
remove the debugging info from it. Tweak thumbnailing and printing of unavailable frames. git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2010-12-22MPEGPlayer: Some UI tweaking and bugfixingMichael Sevakis1-152/+251
* Allow skip-to-beginning in single-play mode; there is no 3-second delay in that case. * Properly handle and keep track of pauses caused by headphone removal. * Improve skipping over bad files - search in skip direction and allow it to be ended with the stop key. * Add the system message processing done elsewhere to all button queue waits. git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2010-12-19MPEGPlayer: Skip to next file when there is a problem with a video file in ↵Michael Sevakis1-4/+10
all-play mode, otherwise exit as usual. Only consider failures such as engine init issues or no file to view to be a plugin error but not problems with the video files themselves; the user is adequately informed already. git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2010-12-18MPEGPlayer playlist should as well support all viewer-handled file ↵Michael Sevakis1-4/+18
extensions...indeed. git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2010-11-30HD300 - plugins keymapsMarcin Bukat1-0/+9
git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2010-11-26FS#8607: MPEG video playlistTeruaki Kawashima1-31/+159
Add mode to play multiple mpeg files in the same directory in the order the file browser shows. In this mode, Mpegplayer exits after finishing the last .mpg file. git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2010-11-03These should be the last of the plugin keymaps requiredRobert Menes1-0/+9
for the GoGear HDD6330. git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2010-11-02MPIO HD200: rename button defines to adhere how they are labeled on the device.Marcin Bukat1-3/+3
git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2010-08-30Plugins: modify IRAM copying codeRafaël Carré1-5/+0
Move to plugin_crt0.c, plugins don't need PLUGIN_IRAM_* macros anymore IRAM is no longered zeroed before copying (as it is at the same address than BSS) -> Fix FS#11581 Use cpucache_invalidate() (and not cpucache_flush), needed for self-modifying code on cached IRAM git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2010-08-24Second try: Introduce plugin_crt0.c that every plugin links.Thomas Martitz1-1/+1
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:// a1c6a512-1295-4272-9138-f99709370657
2010-08-23Revert "Introduce plugin_crt0.c that every plugin links."Thomas Martitz1-1/+1
Too much errors and no time to fix them now. git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2010-08-23Introduce plugin_crt0.c that every plugin links.Thomas Martitz1-1/+1
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:// a1c6a512-1295-4272-9138-f99709370657
2010-06-04Add a wrapper header, mylcd.h, in the lib subdirectory, which lets plugins' ↵Michael Sevakis1-46/+46
code automatically call the proper functions depending if compilation is for greylib or color display, also forms proper call to grey_ and xlcd_. mylcd_ub_ call greylib unbuffered routines, regular lcd routines otherwise. Form is mylcd_<fnname>, <fnname> is the symbol name stripped of prefixes lcd_, grey_, or xlcd_. Convert a couple plugins I know well (easy job). git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2010-05-07mpegplayer: One last dealie-O for now: Change all "WVS" usage in the code ↵Michael Sevakis1-320/+320
for identifiers to "OSD". git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657