platform/upstream/lightmediascanner.git
16 years agoMove logic to get specific frame contents to separate functions.
Gustavo Sverzut Barbieri [Fri, 7 Mar 2008 18:14:36 +0000 (15:14 -0300)]
Move logic to get specific frame contents to separate functions.

This will help to minimize _parse_id3v2_frame() binary size, very
useful because it'll avoid loading all the code for all the functions
given that just one is really used at time.

16 years agoid3: avoid some strips if content is known to be correct.
Gustavo Sverzut Barbieri [Fri, 7 Mar 2008 17:57:19 +0000 (14:57 -0300)]
id3: avoid some strips if content is known to be correct.

16 years agoid3: just change cur_artist_priority if it's actually used.
Gustavo Sverzut Barbieri [Fri, 7 Mar 2008 17:17:17 +0000 (14:17 -0300)]
id3: just change cur_artist_priority if it's actually used.

We should just change cur_artist_priority if the new artist is not empty.

16 years agoCosmetic: fit in 80 cols
Gustavo Sverzut Barbieri [Fri, 7 Mar 2008 15:38:49 +0000 (12:38 -0300)]
Cosmetic: fit in 80 cols

16 years agoSpeed up id3v1 genre usage.
Gustavo Sverzut Barbieri [Thu, 6 Mar 2008 23:16:24 +0000 (20:16 -0300)]
Speed up id3v1 genre usage.

This uses just one memory block containing all the strings and an
array with the offsets to its base, this also enables one to know the
string size with a simple calc.

By using just one memory block for strings should help with
relocations, by using the offsets we can save strlen() and strdup(),
using malloc() + memcpy() directly.

16 years agoShare id3v1_genre getter.
Gustavo Sverzut Barbieri [Thu, 6 Mar 2008 22:07:25 +0000 (19:07 -0300)]
Share id3v1_genre getter.

16 years agoMake defines dependent on real data, avoid getting out of sync.
Gustavo Sverzut Barbieri [Thu, 6 Mar 2008 21:40:59 +0000 (18:40 -0300)]
Make defines dependent on real data, avoid getting out of sync.

16 years agoUse posix_fadvise.
Andre Moreira Magalhaes [Thu, 6 Mar 2008 20:10:55 +0000 (17:10 -0300)]
Use posix_fadvise.

16 years agoImproved artist/genre handling.
Andre Moreira Magalhaes [Thu, 6 Mar 2008 19:34:06 +0000 (16:34 -0300)]
Improved artist/genre handling.

Check if the new artist is a valid string before replacing the current one,
even if the new one has a higher priority.
Proper handle ID3v2.3 genre enclosed by parentheses.

16 years agoFixed mp4 detection to not modify LIBS.
Andre Moreira Magalhaes [Thu, 6 Mar 2008 19:21:09 +0000 (16:21 -0300)]
Fixed mp4 detection to not modify LIBS.

16 years agoSmall bug fix.
Andre Moreira Magalhaes [Mon, 25 Feb 2008 20:50:59 +0000 (17:50 -0300)]
Small bug fix.

16 years agoUse TPE/TP 1 to 4 for artists.
Andre Moreira Magalhaes [Mon, 25 Feb 2008 19:17:49 +0000 (16:17 -0300)]
Use TPE/TP 1 to 4 for artists.

Fallback to other artist fields when appropriate.
Fixed some buffer overflows.

16 years agoProper handle UTF16 encoding.
Andre Moreira Magalhaes [Fri, 22 Feb 2008 21:23:12 +0000 (18:23 -0300)]
Proper handle UTF16 encoding.

16 years agoFix support for ID3v2.2.
Gustavo Sverzut Barbieri [Fri, 22 Feb 2008 14:56:00 +0000 (14:56 +0000)]
Fix support for ID3v2.2.

git-svn-id: https://garage.maemo.org/svn/lms/lightmediascanner@87 fe9ffe84-2fc0-424c-a0c2-0ec162e4acf5

16 years agoMerge commit 'andrunko/master'
Gustavo Sverzut Barbieri [Wed, 20 Feb 2008 18:43:57 +0000 (18:43 +0000)]
Merge commit 'andrunko/master'

* commit 'andrunko/master':
  Added support for mov, qt, 3gp files to mp4 plugin.

git-svn-id: https://garage.maemo.org/svn/lms/lightmediascanner@83 fe9ffe84-2fc0-424c-a0c2-0ec162e4acf5

16 years agoAdded TODO.
Gustavo Sverzut Barbieri [Wed, 20 Feb 2008 18:15:02 +0000 (18:15 +0000)]
Added TODO.

git-svn-id: https://garage.maemo.org/svn/lms/lightmediascanner@82 fe9ffe84-2fc0-424c-a0c2-0ec162e4acf5

16 years agoAdded support for mov, qt, 3gp files to mp4 plugin.
Andre Moreira Magalhaes [Wed, 20 Feb 2008 16:38:39 +0000 (13:38 -0300)]
Added support for mov, qt, 3gp files to mp4 plugin.

16 years agoMerge commit 'andrunko/master'
Gustavo Sverzut Barbieri [Fri, 15 Feb 2008 20:52:30 +0000 (20:52 +0000)]
Merge commit 'andrunko/master'

* commit 'andrunko/master':
  Use ctxt->cs_conv to convert encoding for id3v1 tag.
  Fix handling of encoding UTF16-LE.
  Proper handle encoding.
  Fixed _to_uint method.

git-svn-id: https://garage.maemo.org/svn/lms/lightmediascanner@81 fe9ffe84-2fc0-424c-a0c2-0ec162e4acf5

16 years agoUse ctxt->cs_conv to convert encoding for id3v1 tag.
Andre Moreira Magalhaes [Fri, 15 Feb 2008 20:41:24 +0000 (17:41 -0300)]
Use ctxt->cs_conv to convert encoding for id3v1 tag.

16 years agoFixed _to_uint method.
Gustavo Sverzut Barbieri [Fri, 15 Feb 2008 20:37:48 +0000 (20:37 +0000)]
Fixed _to_uint method.

git-svn-id: https://garage.maemo.org/svn/lms/lightmediascanner@80 fe9ffe84-2fc0-424c-a0c2-0ec162e4acf5

16 years agoFix handling of encoding UTF16-LE.
Andre Moreira Magalhaes [Fri, 15 Feb 2008 20:29:39 +0000 (17:29 -0300)]
Fix handling of encoding UTF16-LE.

16 years agoProper handle encoding.
Andre Moreira Magalhaes [Fri, 15 Feb 2008 18:19:58 +0000 (15:19 -0300)]
Proper handle encoding.

16 years agoFixed _to_uint method.
Andre Moreira Magalhaes [Fri, 15 Feb 2008 18:19:14 +0000 (15:19 -0300)]
Fixed _to_uint method.

16 years agoFix debug messages, show scanned path.
Gustavo Sverzut Barbieri [Fri, 15 Feb 2008 18:37:56 +0000 (18:37 +0000)]
Fix debug messages, show scanned path.

git-svn-id: https://garage.maemo.org/svn/lms/lightmediascanner@79 fe9ffe84-2fc0-424c-a0c2-0ec162e4acf5

16 years agoMerge branch 'master' of git://staff.get-e.org/users/andrunko/lightmediascanner
Gustavo Sverzut Barbieri [Thu, 14 Feb 2008 21:58:32 +0000 (21:58 +0000)]
Merge branch 'master' of git://staff.get-e.org/users/andrunko/lightmediascanner

* 'master' of git://staff.get-e.org/users/andrunko/lightmediascanner:
  Some improvements.
  Improved _find_id3v2 method.
  Improved mp3 support.
  Removed supported extensions from audio dummy.
  Added flac plugin.
  Debug.
  Parse m4a files using mp4 plugin.
  Use lseek to discard frames.
  Added aac plugin.

git-svn-id: https://garage.maemo.org/svn/lms/lightmediascanner@78 fe9ffe84-2fc0-424c-a0c2-0ec162e4acf5

16 years agoAdd Andre and Renato to AUTHORS.
Gustavo Sverzut Barbieri [Thu, 14 Feb 2008 21:51:32 +0000 (21:51 +0000)]
Add Andre and Renato to AUTHORS.

git-svn-id: https://garage.maemo.org/svn/lms/lightmediascanner@77 fe9ffe84-2fc0-424c-a0c2-0ec162e4acf5

16 years agoSome improvements.
Andre Moreira Magalhaes [Thu, 14 Feb 2008 21:42:34 +0000 (18:42 -0300)]
Some improvements.

Changed #define ID3V2_GET_FRAME to static inline method.
Also static inline is_id3v2_second_sync_byte method.

16 years agoImproved _find_id3v2 method.
Gustavo Sverzut Barbieri [Thu, 14 Feb 2008 21:39:49 +0000 (21:39 +0000)]
Improved _find_id3v2 method.

Check if the tag is in the beggining of the file (avoid some checks).
Decreased buffer size.
Removed compiler warning.

git-svn-id: https://garage.maemo.org/svn/lms/lightmediascanner@76 fe9ffe84-2fc0-424c-a0c2-0ec162e4acf5

16 years agoImproved mp3 support.
Gustavo Sverzut Barbieri [Thu, 14 Feb 2008 21:39:11 +0000 (21:39 +0000)]
Improved mp3 support.

Removed old id3lib plugin.
Renamed aac plugin to id3.
Use id3 (old aac) plugin to parse mp3 and aac files.
Improved id3 (old aac) plugin.

git-svn-id: https://garage.maemo.org/svn/lms/lightmediascanner@75 fe9ffe84-2fc0-424c-a0c2-0ec162e4acf5

16 years agoRemoved supported extensions from audio dummy.
Gustavo Sverzut Barbieri [Thu, 14 Feb 2008 21:38:32 +0000 (21:38 +0000)]
Removed supported extensions from audio dummy.

git-svn-id: https://garage.maemo.org/svn/lms/lightmediascanner@74 fe9ffe84-2fc0-424c-a0c2-0ec162e4acf5

16 years agoAdded flac plugin.
Gustavo Sverzut Barbieri [Thu, 14 Feb 2008 21:38:09 +0000 (21:38 +0000)]
Added flac plugin.

git-svn-id: https://garage.maemo.org/svn/lms/lightmediascanner@73 fe9ffe84-2fc0-424c-a0c2-0ec162e4acf5

16 years agoDebug.
Gustavo Sverzut Barbieri [Thu, 14 Feb 2008 21:37:43 +0000 (21:37 +0000)]
Debug.

git-svn-id: https://garage.maemo.org/svn/lms/lightmediascanner@72 fe9ffe84-2fc0-424c-a0c2-0ec162e4acf5

16 years agoParse m4a files using mp4 plugin.
Gustavo Sverzut Barbieri [Thu, 14 Feb 2008 21:37:23 +0000 (21:37 +0000)]
Parse m4a files using mp4 plugin.

git-svn-id: https://garage.maemo.org/svn/lms/lightmediascanner@71 fe9ffe84-2fc0-424c-a0c2-0ec162e4acf5

16 years agoUse lseek to discard frames.
Gustavo Sverzut Barbieri [Thu, 14 Feb 2008 21:37:01 +0000 (21:37 +0000)]
Use lseek to discard frames.

git-svn-id: https://garage.maemo.org/svn/lms/lightmediascanner@70 fe9ffe84-2fc0-424c-a0c2-0ec162e4acf5

16 years agoAdded aac plugin.
Gustavo Sverzut Barbieri [Thu, 14 Feb 2008 21:36:32 +0000 (21:36 +0000)]
Added aac plugin.

git-svn-id: https://garage.maemo.org/svn/lms/lightmediascanner@69 fe9ffe84-2fc0-424c-a0c2-0ec162e4acf5

16 years agoImproved _find_id3v2 method.
Andre Moreira Magalhaes [Thu, 14 Feb 2008 18:59:32 +0000 (15:59 -0300)]
Improved _find_id3v2 method.

Check if the tag is in the beggining of the file (avoid some checks).
Decreased buffer size.
Removed compiler warning.

16 years agoImproved mp3 support.
Andre Moreira Magalhaes [Wed, 13 Feb 2008 20:42:38 +0000 (17:42 -0300)]
Improved mp3 support.

Removed old id3lib plugin.
Renamed aac plugin to id3.
Use id3 (old aac) plugin to parse mp3 and aac files.
Improved id3 (old aac) plugin.

16 years agoRemoved supported extensions from audio dummy.
Andre Moreira Magalhaes [Tue, 12 Feb 2008 19:38:30 +0000 (16:38 -0300)]
Removed supported extensions from audio dummy.

16 years agoAdded flac plugin.
Andre Moreira Magalhaes [Tue, 12 Feb 2008 19:37:50 +0000 (16:37 -0300)]
Added flac plugin.

16 years agoDebug.
Andre Moreira Magalhaes [Tue, 12 Feb 2008 19:37:35 +0000 (16:37 -0300)]
Debug.

16 years agoParse m4a files using mp4 plugin.
Andre Moreira Magalhaes [Mon, 11 Feb 2008 19:08:26 +0000 (16:08 -0300)]
Parse m4a files using mp4 plugin.

16 years agoUse lseek to discard frames.
Andre Moreira Magalhaes [Fri, 8 Feb 2008 20:37:31 +0000 (17:37 -0300)]
Use lseek to discard frames.

16 years agoFix typo
Gustavo Sverzut Barbieri [Fri, 8 Feb 2008 18:38:58 +0000 (18:38 +0000)]
Fix typo

git-svn-id: https://garage.maemo.org/svn/lms/lightmediascanner@68 fe9ffe84-2fc0-424c-a0c2-0ec162e4acf5

16 years agoAdded aac plugin.
Andre Moreira Magalhaes [Fri, 1 Feb 2008 21:53:51 +0000 (18:53 -0300)]
Added aac plugin.

16 years agoProvide means to avoid check and fallback creation and usage.
Gustavo Sverzut Barbieri [Fri, 8 Feb 2008 17:58:51 +0000 (17:58 +0000)]
Provide means to avoid check and fallback creation and usage.

git-svn-id: https://garage.maemo.org/svn/lms/lightmediascanner@67 fe9ffe84-2fc0-424c-a0c2-0ec162e4acf5

16 years agoogg.c: Minor coding style fixes
Gustavo Sverzut Barbieri [Fri, 8 Feb 2008 16:06:17 +0000 (16:06 +0000)]
ogg.c: Minor coding style fixes

git-svn-id: https://garage.maemo.org/svn/lms/lightmediascanner@66 fe9ffe84-2fc0-424c-a0c2-0ec162e4acf5

16 years agoImprove code reusage: string strip and free functions.
Gustavo Sverzut Barbieri [Fri, 8 Feb 2008 16:05:46 +0000 (16:05 +0000)]
Improve code reusage: string strip and free functions.

Provides two utilities around lms_strstrip():
 * lms_strstrip_and_free()
 * lms_string_size_strip_and_free()

git-svn-id: https://garage.maemo.org/svn/lms/lightmediascanner@65 fe9ffe84-2fc0-424c-a0c2-0ec162e4acf5

16 years agoBugfix in jpeg plugin to avoid missing header frame and image size
Gustavo Sverzut Barbieri [Fri, 8 Feb 2008 16:04:49 +0000 (16:04 +0000)]
Bugfix in jpeg plugin to avoid missing header frame and image size

git-svn-id: https://garage.maemo.org/svn/lms/lightmediascanner@64 fe9ffe84-2fc0-424c-a0c2-0ec162e4acf5

16 years agoAlso copy trailing \0
Gustavo Sverzut Barbieri [Fri, 8 Feb 2008 16:04:25 +0000 (16:04 +0000)]
Also copy trailing \0

git-svn-id: https://garage.maemo.org/svn/lms/lightmediascanner@63 fe9ffe84-2fc0-424c-a0c2-0ec162e4acf5

16 years agoRemove debug
Gustavo Sverzut Barbieri [Fri, 1 Feb 2008 19:45:21 +0000 (19:45 +0000)]
Remove debug

git-svn-id: https://garage.maemo.org/svn/lms/lightmediascanner@62 fe9ffe84-2fc0-424c-a0c2-0ec162e4acf5

16 years agoMerge git://staff.get-e.org/users/andrunko/lightmediascanner
Gustavo Sverzut Barbieri [Fri, 1 Feb 2008 19:44:51 +0000 (19:44 +0000)]
Merge git://staff.get-e.org/users/andrunko/lightmediascanner

* git://staff.get-e.org/users/andrunko/lightmediascanner:
  Make sure metadata is converted to the proper charset.
  Added mp4 plugin.

git-svn-id: https://garage.maemo.org/svn/lms/lightmediascanner@61 fe9ffe84-2fc0-424c-a0c2-0ec162e4acf5

16 years agoMake sure metadata is converted to the proper charset.
Andre Moreira Magalhaes [Fri, 1 Feb 2008 19:22:45 +0000 (16:22 -0300)]
Make sure metadata is converted to the proper charset.

16 years agoAdded mp4 plugin.
Andre Moreira Magalhaes [Fri, 1 Feb 2008 19:22:25 +0000 (16:22 -0300)]
Added mp4 plugin.

16 years agoAdd .flac to audio-dummy
Gustavo Sverzut Barbieri [Fri, 1 Feb 2008 18:55:27 +0000 (18:55 +0000)]
Add .flac to audio-dummy

git-svn-id: https://garage.maemo.org/svn/lms/lightmediascanner@58 fe9ffe84-2fc0-424c-a0c2-0ec162e4acf5

16 years agoRequest POSIX_FADV_DONTNEED
Gustavo Sverzut Barbieri [Fri, 1 Feb 2008 15:15:22 +0000 (15:15 +0000)]
Request POSIX_FADV_DONTNEED

git-svn-id: https://garage.maemo.org/svn/lms/lightmediascanner@57 fe9ffe84-2fc0-424c-a0c2-0ec162e4acf5

16 years agoRequest POSIX_FADV_DONTNEED, now correct
Gustavo Sverzut Barbieri [Fri, 1 Feb 2008 15:10:59 +0000 (15:10 +0000)]
Request POSIX_FADV_DONTNEED, now correct

git-svn-id: https://garage.maemo.org/svn/lms/lightmediascanner@56 fe9ffe84-2fc0-424c-a0c2-0ec162e4acf5

16 years agoRequest POSIX_FADV_DONTNEED
Gustavo Sverzut Barbieri [Fri, 1 Feb 2008 14:51:54 +0000 (14:51 +0000)]
Request POSIX_FADV_DONTNEED

git-svn-id: https://garage.maemo.org/svn/lms/lightmediascanner@54 fe9ffe84-2fc0-424c-a0c2-0ec162e4acf5

16 years agoMinor warning cleanups
Gustavo Sverzut Barbieri [Fri, 1 Feb 2008 14:29:44 +0000 (14:29 +0000)]
Minor warning cleanups

git-svn-id: https://garage.maemo.org/svn/lms/lightmediascanner@53 fe9ffe84-2fc0-424c-a0c2-0ec162e4acf5

16 years agoAdded real media plugin.
Gustavo Sverzut Barbieri [Fri, 1 Feb 2008 14:29:14 +0000 (14:29 +0000)]
Added real media plugin.

git-svn-id: https://garage.maemo.org/svn/lms/lightmediascanner@52 fe9ffe84-2fc0-424c-a0c2-0ec162e4acf5

16 years agoDo just one lseek where possible.
barbieri [Thu, 31 Jan 2008 19:13:04 +0000 (19:13 +0000)]
Do just one lseek where possible.

git-svn-id: https://garage.maemo.org/svn/lms/lightmediascanner@49 fe9ffe84-2fc0-424c-a0c2-0ec162e4acf5

16 years agoRemove ASF compiler warnings.
barbieri [Thu, 31 Jan 2008 19:12:45 +0000 (19:12 +0000)]
Remove ASF compiler warnings.

git-svn-id: https://garage.maemo.org/svn/lms/lightmediascanner@48 fe9ffe84-2fc0-424c-a0c2-0ec162e4acf5

16 years agoBug fixes.
barbieri [Thu, 31 Jan 2008 19:12:24 +0000 (19:12 +0000)]
Bug fixes.

Fixed infinite loop on _skip_header_extension.
Proper strip artist string.
Use memcmp to compare attribute names (do not convert to UTF-16LE).

git-svn-id: https://garage.maemo.org/svn/lms/lightmediascanner@47 fe9ffe84-2fc0-424c-a0c2-0ec162e4acf5

16 years agoRemoved wma from audio-dummy and wmv from video-dummy.
barbieri [Thu, 31 Jan 2008 19:12:02 +0000 (19:12 +0000)]
Removed wma from audio-dummy and wmv from video-dummy.

git-svn-id: https://garage.maemo.org/svn/lms/lightmediascanner@46 fe9ffe84-2fc0-424c-a0c2-0ec162e4acf5

16 years agoRemoved some memory leaks and some coding style fixes.
barbieri [Thu, 31 Jan 2008 19:11:37 +0000 (19:11 +0000)]
Removed some memory leaks and some coding style fixes.

git-svn-id: https://garage.maemo.org/svn/lms/lightmediascanner@45 fe9ffe84-2fc0-424c-a0c2-0ec162e4acf5

16 years agoAdded some documentation.
barbieri [Thu, 31 Jan 2008 19:11:14 +0000 (19:11 +0000)]
Added some documentation.

git-svn-id: https://garage.maemo.org/svn/lms/lightmediascanner@44 fe9ffe84-2fc0-424c-a0c2-0ec162e4acf5

16 years agoAdded asf/wma/wmv plugin.
barbieri [Thu, 31 Jan 2008 19:10:47 +0000 (19:10 +0000)]
Added asf/wma/wmv plugin.

git-svn-id: https://garage.maemo.org/svn/lms/lightmediascanner@43 fe9ffe84-2fc0-424c-a0c2-0ec162e4acf5

16 years agoAdd missing prototype
barbieri [Thu, 31 Jan 2008 14:58:56 +0000 (14:58 +0000)]
Add missing prototype

git-svn-id: https://garage.maemo.org/svn/lms/lightmediascanner@42 fe9ffe84-2fc0-424c-a0c2-0ec162e4acf5

16 years agoBetter handling of strings that failed encoding.
barbieri [Tue, 29 Jan 2008 22:08:12 +0000 (22:08 +0000)]
Better handling of strings that failed encoding.

Instead of just memset() the whole string to '?', just replace chars
that are not printable (according to ctypes.h isprint()).

git-svn-id: https://garage.maemo.org/svn/lms/lightmediascanner@41 fe9ffe84-2fc0-424c-a0c2-0ec162e4acf5

16 years agoFunction to forcefully convert to some charset.
barbieri [Tue, 29 Jan 2008 22:07:39 +0000 (22:07 +0000)]
Function to forcefully convert to some charset.

One can use this function to avoid check for UTF-8 before converting,
this will avoid problems when you know the encoding and it was
accepted as UTF-8 (ie: UTF-16).

git-svn-id: https://garage.maemo.org/svn/lms/lightmediascanner@40 fe9ffe84-2fc0-424c-a0c2-0ec162e4acf5

16 years agoSet len to 0 if string is empty.
barbieri [Tue, 22 Jan 2008 21:25:39 +0000 (21:25 +0000)]
Set len to 0 if string is empty.

git-svn-id: https://garage.maemo.org/svn/lms/lightmediascanner@35 fe9ffe84-2fc0-424c-a0c2-0ec162e4acf5

16 years agoFix problem with SubIFD in Exif.
barbieri [Tue, 22 Jan 2008 20:53:33 +0000 (20:53 +0000)]
Fix problem with SubIFD in Exif.

Patch-By: Leonardo Sobral Cunha <leonardo.cunha@openbossa.org>
git-svn-id: https://garage.maemo.org/svn/lms/lightmediascanner@34 fe9ffe84-2fc0-424c-a0c2-0ec162e4acf5

16 years agoCheck for zero-padded strings.
barbieri [Tue, 22 Jan 2008 20:53:13 +0000 (20:53 +0000)]
Check for zero-padded strings.

git-svn-id: https://garage.maemo.org/svn/lms/lightmediascanner@33 fe9ffe84-2fc0-424c-a0c2-0ec162e4acf5

16 years agoGet both lead artist and band, use in order: band, artist
barbieri [Tue, 22 Jan 2008 18:45:37 +0000 (18:45 +0000)]
Get both lead artist and band, use in order: band, artist

git-svn-id: https://garage.maemo.org/svn/lms/lightmediascanner@32 fe9ffe84-2fc0-424c-a0c2-0ec162e4acf5

16 years agoCosmetic simplification.
barbieri [Tue, 22 Jan 2008 18:45:11 +0000 (18:45 +0000)]
Cosmetic simplification.

git-svn-id: https://garage.maemo.org/svn/lms/lightmediascanner@31 fe9ffe84-2fc0-424c-a0c2-0ec162e4acf5

16 years agoJust get "lead artist" (TPE1), don't try others.
barbieri [Thu, 17 Jan 2008 21:46:14 +0000 (21:46 +0000)]
Just get "lead artist" (TPE1), don't try others.

id3lib helpers used to get all of those, using an *ordered* search for
the fields.

However these multiple searches were slow and I'm now doing one walk
and registering the found fields, in the order they're listed on the
file. This lead to "composer" showing before "lead artist" and thus
being used, producing undesired results for "cover albums" where you
want the artist to be the playing one, not the original.

We have 2 solutions, I used the first:
 * just get "lead artist", most of tag editors just edit them or at
   least enable users to change that. Most software just use this.
 * get all the fields, consider them as a group for "todo" analysis
   and at the end of the search use in the specific order. This is
   more complex and would require lots of allocation/copy/free to a
   case that is often uncommon.

git-svn-id: https://garage.maemo.org/svn/lms/lightmediascanner@30 fe9ffe84-2fc0-424c-a0c2-0ec162e4acf5

16 years agoAdd PNG image support (just size)
barbieri [Mon, 24 Dec 2007 15:28:58 +0000 (15:28 +0000)]
Add PNG image support (just size)

git-svn-id: https://garage.maemo.org/svn/lms/lightmediascanner@25 fe9ffe84-2fc0-424c-a0c2-0ec162e4acf5

16 years agoAdd audio-dummy to build.
barbieri [Mon, 24 Dec 2007 15:28:27 +0000 (15:28 +0000)]
Add audio-dummy to build.

git-svn-id: https://garage.maemo.org/svn/lms/lightmediascanner@24 fe9ffe84-2fc0-424c-a0c2-0ec162e4acf5

16 years agoAdd audio-dummy with missing audio formats.
barbieri [Fri, 21 Dec 2007 14:44:41 +0000 (14:44 +0000)]
Add audio-dummy with missing audio formats.

git-svn-id: https://garage.maemo.org/svn/lms/lightmediascanner@23 fe9ffe84-2fc0-424c-a0c2-0ec162e4acf5

16 years agoAdd .wmv to video-dummy.
barbieri [Fri, 21 Dec 2007 14:44:11 +0000 (14:44 +0000)]
Add .wmv to video-dummy.

git-svn-id: https://garage.maemo.org/svn/lms/lightmediascanner@22 fe9ffe84-2fc0-424c-a0c2-0ec162e4acf5

16 years agoAdd copyright to all source files.
barbieri [Mon, 17 Dec 2007 21:30:14 +0000 (21:30 +0000)]
Add copyright to all source files.

git-svn-id: https://garage.maemo.org/svn/lms/lightmediascanner@19 fe9ffe84-2fc0-424c-a0c2-0ec162e4acf5

16 years agoConsider DQT frame as JFIF (ignore and get just the size).
barbieri [Mon, 17 Dec 2007 21:16:38 +0000 (21:16 +0000)]
Consider DQT frame as JFIF (ignore and get just the size).

If DQT frame is found, then no extra information is available,
consider like JFIF and go straight to image dimension.

git-svn-id: https://garage.maemo.org/svn/lms/lightmediascanner@18 fe9ffe84-2fc0-424c-a0c2-0ec162e4acf5

16 years agoAlso get size from other SOF (progressive, extended sequential...)
barbieri [Mon, 17 Dec 2007 20:52:18 +0000 (20:52 +0000)]
Also get size from other SOF (progressive, extended sequential...)

git-svn-id: https://garage.maemo.org/svn/lms/lightmediascanner@17 fe9ffe84-2fc0-424c-a0c2-0ec162e4acf5

16 years agoProvide means to stop check/process.
barbieri [Thu, 13 Dec 2007 22:07:45 +0000 (22:07 +0000)]
Provide means to stop check/process.

git-svn-id: https://garage.maemo.org/svn/lms/lightmediascanner@16 fe9ffe84-2fc0-424c-a0c2-0ec162e4acf5

16 years agoAdd Doxyfiles to EXTRA_DIST
barbieri [Thu, 13 Dec 2007 15:15:17 +0000 (15:15 +0000)]
Add Doxyfiles to EXTRA_DIST

git-svn-id: https://garage.maemo.org/svn/lms/lightmediascanner@10 fe9ffe84-2fc0-424c-a0c2-0ec162e4acf5

16 years agoDoxyGen support.
barbieri [Thu, 13 Dec 2007 05:03:53 +0000 (05:03 +0000)]
DoxyGen support.

git-svn-id: https://garage.maemo.org/svn/lms/lightmediascanner@5 fe9ffe84-2fc0-424c-a0c2-0ec162e4acf5

16 years agoMerge branch 'master' of /home/gustavo/Development/git/lightmediascanner
barbieri [Mon, 10 Dec 2007 21:05:52 +0000 (21:05 +0000)]
Merge branch 'master' of /home/gustavo/Development/git/lightmediascanner

* 'master' of /home/gustavo/Development/git/lightmediascanner: (60 commits)
  Modules are optional, don't fail when they fail.
  Adding support to ogg
  Implement lms_check()
  Refactor lightmediascanner_process.c
  Add missing new lines to messages
  Avoid breaking strict-aliasing rules.
  Use correct pointer types for iconv, avoid warnings.
  Move process stuff into own file, will add lms_check() and use part of it.
  Charset conversion support.
  Change plugin API to take a "context" instead of "db".
  Remove unused API macros.
  Cache lms_db_* per DB instance instead of globally.
  Provide data caching based on DB instance.
  Fix copy&paste legacy: s/ldi/ldv/g in lightmediascanner_db_video.c
  id3lib now uses playcnt.
  Add playcnt to audios table.
  PLS Parser.
  Also index audios by trackno.
  M3U parser.
  Fix memory leak and possible buffer overrun.
  ...

git-svn-id: https://garage.maemo.org/svn/lms/lightmediascanner@2 fe9ffe84-2fc0-424c-a0c2-0ec162e4acf5

16 years agoInitial Repository Layout
barbieri [Mon, 10 Dec 2007 19:28:59 +0000 (19:28 +0000)]
Initial Repository Layout

git-svn-id: https://garage.maemo.org/svn/lms/lightmediascanner@1 fe9ffe84-2fc0-424c-a0c2-0ec162e4acf5

16 years agoModules are optional, don't fail when they fail.
Gustavo Sverzut Barbieri [Sun, 9 Dec 2007 19:57:09 +0000 (16:57 -0300)]
Modules are optional, don't fail when they fail.

16 years agoAdding support to ogg
Renato Chencarek [Fri, 7 Dec 2007 22:06:12 +0000 (19:06 -0300)]
Adding support to ogg

16 years agoImplement lms_check()
Gustavo Sverzut Barbieri [Sun, 9 Dec 2007 02:19:26 +0000 (23:19 -0300)]
Implement lms_check()

This function is used to check files previously processed by
lms_process(), it will walk the registered files and stat(2) to see
current status, if required it will reparse files that changed.

16 years agoRefactor lightmediascanner_process.c
Gustavo Sverzut Barbieri [Sun, 9 Dec 2007 02:16:54 +0000 (23:16 -0300)]
Refactor lightmediascanner_process.c

This refactor moves DB-related work to lightmediascanner_db_common.c,
so we can use them later in upcoming lightmediascanner_check.c and
possible others. These DB operations now get the compiled statement,
so each user can create its own "struct db".

16 years agoAdd missing new lines to messages
Gustavo Sverzut Barbieri [Sun, 9 Dec 2007 02:09:34 +0000 (23:09 -0300)]
Add missing new lines to messages

16 years agoAvoid breaking strict-aliasing rules.
Gustavo Sverzut Barbieri [Sat, 8 Dec 2007 04:06:10 +0000 (01:06 -0300)]
Avoid breaking strict-aliasing rules.

16 years agoUse correct pointer types for iconv, avoid warnings.
Gustavo Sverzut Barbieri [Sat, 8 Dec 2007 04:01:00 +0000 (01:01 -0300)]
Use correct pointer types for iconv, avoid warnings.

16 years agoMove process stuff into own file, will add lms_check() and use part of it.
Gustavo Sverzut Barbieri [Sat, 8 Dec 2007 01:19:19 +0000 (01:19 +0000)]
Move process stuff into own file, will add lms_check() and use part of it.

16 years agoCharset conversion support.
Gustavo Sverzut Barbieri [Fri, 7 Dec 2007 16:06:35 +0000 (16:06 +0000)]
Charset conversion support.

Now one can register various charsets to try to convert from and then
call lms_charset_conv() to get it converted to UTF-8.

All plugins were fixed to use this function. No non-UTF-8 data should
be stored on DB anymore.

16 years agoChange plugin API to take a "context" instead of "db".
Gustavo Sverzut Barbieri [Fri, 7 Dec 2007 16:21:06 +0000 (16:21 +0000)]
Change plugin API to take a "context" instead of "db".

This makes room to passing more data to plugins without changing the
API every time, will need for upcoming charset support.

16 years agoRemove unused API macros.
Gustavo Sverzut Barbieri [Fri, 7 Dec 2007 16:02:07 +0000 (16:02 +0000)]
Remove unused API macros.

16 years agoCache lms_db_* per DB instance instead of globally.
Gustavo Sverzut Barbieri [Fri, 7 Dec 2007 14:35:37 +0000 (14:35 +0000)]
Cache lms_db_* per DB instance instead of globally.

This change enable us to have various lms instances running on
multiple database connections at the same time.

16 years agoProvide data caching based on DB instance.
Gustavo Sverzut Barbieri [Fri, 7 Dec 2007 14:34:14 +0000 (14:34 +0000)]
Provide data caching based on DB instance.

Today we're caching lms_db_* instances as a global, this just enable
us to use one db instance. With this new infrastructure we'll be able
to cache those based on DB and thus have multiple sqlite3 connections.