replace applicable calls to strlcpy with calls to strmemccpy
which null terminates on truncation
in theory the strmemccpy calls should be slightly faster since they
don't traverse the rest of the source string on truncation
but I seriously doubt there is too much of that going on in the code base
Change-Id: Ia0251514e36a6242bbf3f03c5e0df123aba60ed2
Not sure if this is worth the added bin size yet but I will
see where I can use it to try and make it worth it
Change-Id: Icc299d3986172ff224a14be48da3bf065d728a66
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
'File Browser' hotkeys can now be used while
browsing a playlist.
The manual has been updated to reflect this and
to say that the File Browser hotkey works in
the context of the database as well (existing
behavior)
Change-Id: I51b23e82e0fb00772efdb8784db966d454fb2560
(The playlist viewer has to be re-initialized
after returning from PictureFlow, since they
both use the plugin buffer)
Change-Id: Ib3ef0acec65c88363830c59c8c73e9cdf8b528f0
Frequency, file size, and the codec are not stored
in the database and thus can’t be displayed in the
Playlist Viewer's Track Info screen when metadata
is only retrieved from the database.
Change-Id: I9e1d11c13ad8bf7b90b654ed78e4e7f763c30f8a
Elements were not being drawn correctly or
title text appeared delayed in several places
when using themes with a custom viewport
for list titles.
E.g.:
- after deleting a shortcut
- when returning from a warning screen in
Playlist Viewer
- returning to some Settings screens
- in "Playing time" screen
Change-Id: I8ab07a31d4b6f290e089ecd7857f43ec195a06e0
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
Adds a command for showing track info to
the Playlist Viewer's context menu, which
brings up the same screen used by the WPS
for currently playing tracks.
Change-Id: I17d99671935934dad565d290a0d6fb3b0dfd8b01
This reverts commit 67716c6b46.
Reason for revert: Only partially working on bare-metal ports, so revert this for now.
Change-Id: I5cea7d2b6466a43aaff4c3eb90ab5d7aee736a5b
Will allow the QuickScreen to be accessed in the playlist catalogue
and when editing a playlist using the playlist viewer.
Change-Id: I4b7108db6384eb2077ffdccb2992f2e51a39f42f
LANG_SAVE_DYNAMIC_PLAYLIST refers to dynamic playlists.
A playlist being edited is only the "current playlist" in case of a
dynamic playlist. When other playlists are edited, the current
playlist is different from the edited/selected playlist.
(A possible motivation for differentiating between the two here
is because "Current Playlist" is already the title of a submenu in that
same context menu where the name refers to the dynamic playlist
and not to the selected playlist. "Save Current Playlist" is also used
in the Playlist Catalogue's context menu for example, referring to
the dynamic playlist.)
Change-Id: If320b3c804bb98fccb2e945ae1a30ffc92673c7e
rb core allows you to load custom keyboard layouts
this patch adds the ability to load a keyboard layout in a buffer
the custom layout is temporary and does not overwrite the current layout
use like so:
unsigned short kbd[64];
unsigned short *kbd_p = kbd;
if (!kbd_create_layout("ABCD1234\n", kbd, sizeof(kbd)))
kbd_p = NULL;
rb->kbd_input(buf,sizeof(buf), kbd_p);
Change-Id: I7be2bd4a1b4797a147fa70228a9749dc56ac052a
While playing a track the playlist viewer may not
have a big enough temporary buffer to load and display
'max_files_in_playlist' entries
This patch attempts to load as many entries as possible
If tracks were already playing (dynamic playlist or otherwise)
The original code only gave half the plugin buffer to a playlist
loaded from file
On some targets half the plugin buffer is not enough to load all entries…
Now we attempt to get as many entries possible while at least leaving a
small buffer (MAX_PATH) for the name buffer
Change-Id: Ic06eaabc4e2550f076d625957d6d073790852743
Modified from original ticket, Taken from Igor Poretsky's tree, and
further modified by myself to incorporate feedback.
Change-Id: Ibc2180e52af76890b1448d23f79386fd0f88f709
This complements offset-based resume and playback start funcionality.
The implementation is global on both HWCODEC and SWCODEC.
Basically, if either the specified elapsed or offset are non-zero,
it indicates a mid-track resume.
To resume by time only, set elapsed to nonzero and offset to zero.
To resume by offset only, set offset to nonzero and elapsed to zero.
Which one the codec uses and which has priority is up to the codec;
however, using an elapsed time covers more cases:
* Codecs not able to use an offset such as VGM or other atomic
formats
* Starting playback at a nonzero elapsed time from a source that
contains no offset, such as a cuesheet
The change re-versions pretty much everything from tagcache to nvram.
Change-Id: Ic7aebb24e99a03ae99585c5e236eba960d163f38
Reviewed-on: http://gerrit.rockbox.org/516
Reviewed-by: Michael Sevakis <jethead71@rockbox.org>
Tested: Michael Sevakis <jethead71@rockbox.org>
This fixes that the playlist viewer still shows the icons after changing
the playlist viewer specific show_icons value until re-opened.
Change-Id: I42f287bcf02b27f0255dc157560c2e6575307eb6
This was lost in 97a4c1ef (svn r30177) for unkown reason but the manual still
mentions this item, so I assume it was an accident. It doesn't hurt anyway.
Fixes FS#12930.
Change-Id: I2f5cd81913ec7bb911d1117e50c010a5c1b89b52
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
* 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
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
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
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
* 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
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
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
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
- 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
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