Commit graph

297 commits

Author SHA1 Message Date
Solomon Peachy
658026e626 [4/4] Remove HAVE_LCD_BITMAP, as it's now the only choice.
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 21:20:13 +00:00
Solomon Peachy
8cb555460f [3/4] Completely remove HWCODEC support
'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
2020-07-24 21:20:13 +00:00
William Wilgus
776ceae119 Playlist Viewer Fix FS#13197
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
2020-05-20 18:41:58 +02:00
Solomon Peachy
7bef453e03 FS#12887: Fix playlist order after moving a track before current
Original patch by Juan Gonzalez
Updated by Igor Poretsky

Change-Id: I913d96df906e56fb4063485a6725cd13e395f165
2019-07-24 14:20:03 -04:00
William Wilgus
929ea73cd6 playlist.c suppress playlist access error on usb plug
Change-Id: I6bf446ecb17f5526c2f37158e672f06a5435f5a9
2019-01-04 05:28:26 +01:00
William Wilgus
3f110daf30 Fix tree.c->tree_get_entry_at() buffer overflow
I observed a crash on buflib>move_block
after dumping ram I noticed that the buffer for filetypes was being corrupted

tree_get_entry_at returns a entry from the buflib 'tree entry' buffer
filetree.c->ft_load writes data to this buffer before checking if it has
reached the last entry resulting in buffer overflow that overwrites the
next entry in the buffer ['filetypes']

Patch checks that the index passed to tree_get_entry_at() is in range
otherwise it returns NULL

Added checks + panic in other functions using tree_get_entry_at()
Fixed tree_lock_cache() calls in playlist and filetree

Change-Id: Ibf9e65652b4e00445e8e509629aebbcddffcfd4d
2018-12-14 01:28:17 -06:00
William Wilgus
2fb6b2b458 Fix truncation warning playlist.c, tree.c
Change-Id: I0c62f06fea3ccb55efa21b719a44a263dedc32e2
2018-07-25 18:34:53 +02:00
Michael Sevakis
ff62528d05 Make playlist CRC the correct path when saving resume info
Playlist was CRC-ing the path from the id3, which may have been
modified to remove "bogus dirs". This would cause a CRC mismatch
in the resume information.

Now, just use the current playlist's current index and call
playlist_get_filename_crc32() to get the original path when
updating resume info.

While technically correct, if this causes any issue(s) it's just
a one-line change and painless to revert.

Change-Id: Ie595ef6c40349c342bd7acac8c542829f9cd5d76
2017-10-07 14:38:46 -04:00
Michael Sevakis
7373cf518f Restore dircache hookup in the database ramcache.
Do a few other changes to dircache and file code flags to
accomodate its demands.

Change-Id: I4742a54e8cfbe4d8b9cffb75faaf920dd907cf8a
2017-02-10 05:05:23 -05:00
Michael Sevakis
16a9f84571 Reenable database ramcache and playlist dircache
Playlist dircache references should be back in working order.

Reenabling dircache references in the database ramcache is not
yet done as it requires quite a bit of rework. Otherwise, the
database in RAM is functional again.

Some buffer compatibility changes have been made for database
commit because the dircache buffer can no longer be stolen, only
freed by an API call.

Change-Id: Ib57c3e98cb23e798d4439e9da7ebd73826e733a4
2017-01-17 15:27:47 -05:00
Michael Sevakis
5c6ccb43b5 Fix track formatting problems in playlist.c
Some changes in behavior were made with filesystem code commit
for the sake of compatibility that changed expected behavior.

* Restore substitution of drive spec in fully-qualified DOS paths
with the playlists's volume spec (or root on univolume targets).
Drive-relative paths of the form "c:foo" (no separator after
':') will be treated as purely relative.

* Restore old behavior of preserving leading whitespace in the
source path and trimming only trailing tabs and spaces.

* Multivolume: Volume substition on fully-qualified UNIX/RB paths
has NOT been reintroduced (and perhaps wasn't intended in the
first place). They will not be modified because there is no
ambiguity to resolve. Doing so would prevent a playlist on
external storage from referencing a file on main storage without
qualifying it with "/<0>...".

* Plain relative paths are and always have been interpreted as
relative to the location of the playlist.

Change-Id: Ic0800cea79c59563b7bac20f8b08abb5051906c7
2017-01-07 19:10:02 -05:00
Thomas Jarosch
f8d9e9cb6c m3u playlist parser: Check size limit before using buffer
This should only be a problem if the last line
is not terminated by \r or \n though.

cppcheck reported:
[rockbox/apps/playlist.c:234]: (style) Array index 'i' is used before limits check.

Change-Id: I8182b66272ba9c024984c81588bd2a6dbb8255b8
2014-12-20 13:14:19 +01:00
Szymon Dziok
4c6939fc3d Correct some file permissions.
Change-Id: I4a092a19d6a9c66dfeb2777c9655aa4b19d11e16
2014-09-08 16:04:39 +02:00
Michael Sevakis
7d1a47cf13 Rewrite filesystem code (WIP)
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>
2014-08-30 03:48:23 +02:00
Thomas Martitz
35b4ba8513 root_menu: Remove previous_music_is_wps() and change previous_music via event callback.
Change-Id: I0f3b85a8fe8010a2480ef44a72a90dc7904bc777
2014-04-15 23:54:28 +02:00
Thomas Martitz
bebf71a08b playlist: Get rid of plugin buffer use in playlist_save().
The plugin buffer was used only to avoid reparsing the playlist, so non-essential.
But when it was used it conflicted with the playlist viewer which already uses
the plugin buffer for playlist purposes simultaneously. It only works by
accident.

Since the reparse avoidance is non-essential don't do it for now. A temp buffer
can be passed to playlist_save() to enable it but the only caller (as of now)
does not do that.

Change-Id: I3f75f89d8551e1ec38800268b273105faba0efbf
2014-04-15 23:54:28 +02:00
Thomas Martitz
470989bd70 events: Rework event subsystem (add_event, send_event) to be more versatile.
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
2014-03-14 23:36:30 +01:00
Michael Sevakis
31b7122867 Implement time-based resume and playback start.
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>
2014-03-10 04:12:30 +01:00
Thomas Martitz
706e6b7a75 Move VOL_NAMES definition to mv.h
Fits better and including dir.h is more messy for some places.

Change-Id: I3ec30dcc1ac2734ad3844c903238b6cc2f4e134c
2014-02-23 20:23:51 +01:00
Thomas Martitz
22e802e800 playback,talk: Share audiobuffer via core_alloc_maximum().
This fixes the radioart crash that was the result of buffering.c working
on a freed buffer at the same time as buflib (radioart uses buffering.c for the
images). With this change the buffer is owned by buflib exclusively so this
cannot happen.

As a result, audio_get_buffer() doesn't exist anymore. Callers should call
core_alloc_maximum() directly. This buffer needs to be protected as usual
against movement if necessary (previously it was not protected at all which
cased the radioart crash), To get most of it they can adjust the willingness of
the talk engine to give its buffer away (at the expense of disabling voice
interface) with the new talk_buffer_set_policy() function.

Change-Id: I52123012208d04967876a304451d634e2bef3a33
2013-12-23 12:17:38 +01:00
Richard Quirk
212e7808d5 Use crc32 of filename to resume tracks
As well as using an index, which breaks when a file is added or
removed, use the crc32 of the filename. When the crc32 check passes the
index is used directly. When it fails, the slow path is taken checking
each file name in the playlist until the right crc is found. If that fails
the playlist is started from the beginning.

See http://www.rockbox.org/tracker/6411

Bump plugin API and nvram version numbers

Change-Id: I156f61a9f1ac428b4a682bc680379cb6b60b1b10
Reviewed-on: http://gerrit.rockbox.org/372
Tested-by: Jonathan Gordon <rockbox@jdgordon.info>
Reviewed-by: Jonathan Gordon <rockbox@jdgordon.info>
2013-01-02 08:29:38 +01:00
Michael Giacomelli
d245997667 Fix warning on previous commit.
Change-Id: Idd760f4e83fc5ade972fe88db3cab9e03c24966c
2012-06-22 11:38:35 -04:00
Michael Giacomelli
b30edcd62f Make playlist.c aware of external storage when determining paths
format_track_path currenyly corrects for things like windows volumes  and
relative paths in playlists, but does not handle external media like SD
cards correctly, resulting in some seemingly valid playlists not working
because of rockbox's mount point for external media.  Correct this by checking
to see if a playlist is on external media and then formulate the path correctly
if it is.

Unfortunately, this breaks the playlist_save logic if the CWD is on an external
device.  Its not clear to me why we should be checking the CWD when saving a
playlist, as the only apparent use of this is to let people save relative
paths on the virtual keyboard.  As far as I can tell, this is actually more
difficult to do then using an absolute path given that we insert the CWD
onto the virtualkeyboard by default.  Therefore, I'm removing the option
to use '..' in playlist save paths since its seems useless.

Change-Id: I47946cc45d776c7a72ecbd0ecc720dbf85550f6f
Reviewed-on: http://gerrit.rockbox.org/270
Reviewed-by: Michael Giacomelli <mgiacomelli@gmail.com>
Tested-by: Michael Giacomelli <mgiacomelli@gmail.com>
2012-06-22 17:05:03 +02:00
Bertrik Sikken
beb61a93c5 Not quite a fix for FS#12693 yet, but at least invalidate the playlist file descriptors after closing and removing
Change-Id: Ia43eb517d154d24a6bd581fa3aa69c99a28228ae
2012-06-18 00:45:50 +02:00
Nick Peskett
be10817e1c Option to constrain get_next_dir() to directories below global_settings.start_directory.
When enabled, if the user has set "Start File Browser Here" (config.cfg:
start directory) to anything other than root and "Auto-Change Directory"
is set to "Yes" or "Random", the directory returned when an auto change
is required will be constrained to the value of "start directory" or below.

Change-Id: Iaab773868c4cab5a54f6ae67bdb22e84642a9e4b
Reviewed-on: http://gerrit.rockbox.org/182
Reviewed-by: Nick Peskett <rockbox@peskett.co.uk>
Tested-by: Nick Peskett <rockbox@peskett.co.uk>
2012-03-19 11:49:55 +01:00
Boris Gjenero
9c720393b2 Fix FS#12499 - Directory playback fails after saving playlist
This makes playlist_save() properly restore playlist buffer values,
so the buffer can be used afterwards.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31481 a1c6a512-1295-4272-9138-f99709370657
2011-12-31 16:47:58 +00:00
Boris Gjenero
bda8a963ad Add conditionals for functions only needed on SWCODEC targets.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31296 a1c6a512-1295-4272-9138-f99709370657
2011-12-15 20:58:14 +00:00
Thomas Martitz
1645c148e3 Simulate usb plugging on the sim better using sim_tasks.
Now all threads need to ack the connection like on real target, dircache is unloaded and playback stops accordingly.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31009 a1c6a512-1295-4272-9138-f99709370657
2011-11-17 18:40:00 +00:00
Björn Stenberg
0942e2a0f7 Changed the FOR_NB_SCREENS macro to always be a for loop that declares its 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-10-15 19:35:02 +00:00
Thomas Martitz
baa070cca6 GSoC/Buflib: Enable compaction in buflib.
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://svn.rockbox.org/rockbox/trunk@30381 a1c6a512-1295-4272-9138-f99709370657
2011-08-30 14:01:45 +00:00
Thomas Martitz
d0b72e2590 GSoC/Buflib: Add buflib memory alocator to the core.
The buflib memory allocator is handle based and can free and
compact, move or resize memory on demand. This allows to effeciently
allocate memory dynamically without an MMU, by avoiding fragmentation
through memory compaction.

This patch adds the buflib library to the core, along with
convinience wrappers to omit the context parameter. Compaction is
not yet enabled, but will be in a later patch. Therefore, this acts as a
replacement for buffer_alloc/buffer_get_buffer() with the benifit of a debug
menu.

See buflib.h for some API documentation.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30380 a1c6a512-1295-4272-9138-f99709370657
2011-08-30 14:01:33 +00:00
Thomas Jarosch
12ac381408 Fix file descriptor leak on error
Credit goes to "cppcheck".

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30349 a1c6a512-1295-4272-9138-f99709370657
2011-08-25 19:39:01 +00:00
Thomas Martitz
d1322b7159 GSoC/Buflib: Replace all direct accesses to audiobuf with buffer API functions.
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-14 15:13:00 +00:00
Thomas Martitz
98096970e0 Cleanup tree.c cache handling a bit.
* Rename stuff to not re-use the term dircache
 * Move cache to own struct
 * Encapsulate retrieving entries a bit

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30242 a1c6a512-1295-4272-9138-f99709370657
2011-08-03 09:49:25 +00:00
Jonathan Gordon
d1fd4f08f5 Fix FS#8656 - Error saving non-current playlist file
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-21 06:40:21 +00:00
Thomas Martitz
5eb2f60afb Revert r30030 "Remove unused code path from playlist_create_ex()."
It breaks playlist viewing when playback is stopped (the code path wasn't so unused).

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30150 a1c6a512-1295-4272-9138-f99709370657
2011-07-17 13:30:48 +00:00
Thomas Martitz
00dfcb8159 Fix FS#12181 - Playlist re-shuffle does not work (r30122)
Dircache IDs can be 0, so to invalidate -1 must be used.
Update the memset calls to reflect this.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30125 a1c6a512-1295-4272-9138-f99709370657
2011-07-06 19:41:39 +00:00
Miika Pekkarinen
2bc133dce9 Try to handle dircache rebuild event properly. Playlist should now
cache new pointers to dircache items when dircache goes
offline and comes back onlineagain (during tagcache commit). This
should prevent wrong filenames to appear in playlist.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30047 a1c6a512-1295-4272-9138-f99709370657
2011-06-21 17:42:31 +00:00
Thomas Martitz
af7aaae478 Dircache: Don't expose struct dircache_entry and pointers into the cache, use IDs instead.
Only integer IDs are exposed from dircache with this. This way the cache is isolated from other modules.
This is needed for my buflib gsoc project.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30038 a1c6a512-1295-4272-9138-f99709370657
2011-06-20 20:12:42 +00:00
Thomas Martitz
e063725534 Dircache: Return the size of the result string in dircache_copy_path() so that callers don't need to call strlen on it.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30034 a1c6a512-1295-4272-9138-f99709370657
2011-06-20 20:12:15 +00:00
Thomas Martitz
1a86aab1a2 Remove unused code path from playlist_create_ex().
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30030 a1c6a512-1295-4272-9138-f99709370657
2011-06-20 19:33:03 +00:00
Michael Sevakis
c537d5958e Commit FS#12069 - Playback rework - first stages. Gives as thorough as possible a treatment of codec management, track change and metadata logic as possible while maintaining fairly narrow focus and not rewriting everything all at once. Please see the rockbox-dev mail archive on 2011-04-25 (Playback engine rework) for a more thorough manifest of what was addressed. Plugins and codecs become incompatible.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29785 a1c6a512-1295-4272-9138-f99709370657
2011-04-27 03:08:23 +00:00
Michael Sevakis
d5849e0d30 Playlists forget to set playlist.started when creating new playlist on SWCODEC and which leads to flush-and-rebuffer messages never being sent again until playback is restarted.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29697 a1c6a512-1295-4272-9138-f99709370657
2011-04-09 13:07:08 +00:00
Andree Buschmann
39d9d8bab1 Fix red and yellow. Move resume_index from mp3entry to playlist_info struct. Bump codec api.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29691 a1c6a512-1295-4272-9138-f99709370657
2011-04-07 21:38:51 +00:00
Andree Buschmann
4df825be43 Fix regressions of r29682. Update playlist index resume position when playlist changes (e.g. shuffling, inserting, removing, ...).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29690 a1c6a512-1295-4272-9138-f99709370657
2011-04-07 20:33:00 +00:00
Andree Buschmann
3184cbe10a Fix FS#12043. Next track was resumed when pausing and shutting down the player in the last seconds of a track.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29682 a1c6a512-1295-4272-9138-f99709370657
2011-04-06 19:11:40 +00:00
Thomas Jarosch
3926c30705 Make sure we don't read past the end of a C-string in format_track_path. Second part of FS #11947
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29326 a1c6a512-1295-4272-9138-f99709370657
2011-02-18 21:56:48 +00:00
Thomas Jarosch
15a5f9ca95 Don't underflow the buffer in format_track_path() if it consists of whitespaces
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29325 a1c6a512-1295-4272-9138-f99709370657
2011-02-18 21:39:59 +00:00
Thomas Jarosch
84fccff170 Fix off-by-one buffer read access in format_track_path(). Part of #11947
We need to check for "i < max" first.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29324 a1c6a512-1295-4272-9138-f99709370657
2011-02-18 21:21:50 +00:00
Michael Sevakis
b15aa47c56 All kernel objects in code shared amongs targets (core, plugins, codecs) should be declared SHAREDBSS_ATTR as any core could potentially touch them even though they seem only to involve threads on one core. The exception is target code for particular CPUs where proper allocation is fixed. playlist.c was a little odd too-- use one mutex for the current playlist and a separate one for created playlists (still pondering the necessity of more than one).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29305 a1c6a512-1295-4272-9138-f99709370657
2011-02-14 11:27:45 +00:00