Commit Graph

2042 Commits

Author SHA1 Message Date
Julien BLACHE
27a095b606 Split ID3 tags out of the generic md_map 2010-03-25 21:38:19 +01:00
Julien BLACHE
52e38dd76a Allow a secondary metadata map for metadata extraction 2010-03-25 21:38:19 +01:00
Julien BLACHE
4da80edc3f Pick up metadata from the selected stream(s) in addition to the file itself
OGG has per-stream metadata; recent versions of ffmpeg report metadata
per-stream in this case.
2010-03-25 21:38:19 +01:00
Julien BLACHE
c2f64e4280 Split metadata extraction out of scan_metadata_ffmpeg() 2010-03-25 21:38:19 +01:00
Julien BLACHE
d71fa2b72e Replace av_read_packet() (obsolete) by av_read_frame()
Fixes MP3 playback, probably others too.
2010-03-25 20:28:23 +01:00
Dustin King
e6d75534d7 Make database location a configuration item 2010-03-21 11:33:05 +01:00
Julien BLACHE
6c6a3a7935 Make a note to remove ID3v2 tag names ASAP 2010-03-21 11:27:55 +01:00
Dustin King
6424a1fe95 Add ID3v2.2 tag names 2010-03-21 11:21:43 +01:00
Dustin King
39dfa4dae1 Mark ID3v2.3 metadata tag names as such 2010-03-21 11:18:10 +01:00
Julien BLACHE
602c30c37a Fix typo 2010-03-19 19:58:45 +01:00
Julien BLACHE
4996965b34 Handle database upgrade v8 -> v9 2010-03-19 19:14:34 +01:00
Julien BLACHE
19b6780a3c Remove provisions for multi-library support
It is now clear that multi-library support will not happen, so remove whatever
provisions were in the code for that.

It comes with a small change to the configuration file, too.

With this, DB schema version went to 9.
2010-03-19 19:09:18 +01:00
Julien BLACHE
d6285eef40 Add audio resampling to the audio decoding code
Transcoded (decoded) files will now always come out in signed, little endian,
16bit, 44100 Hz, stereo format regardless of the format of the input file.

This in effect fixes transcoding (and playback on some devices) for files that
do not match this format.

There's probably a discussion to be had regarding handling of 48 kHz and 96 kHz
content, though, as downsampling to 44.1 kHz to have the client or final output
device upsample again is clearly not an optimal solution.
2010-03-15 18:38:33 +01:00
Julien BLACHE
8375ac75ca Rework error handling in transcode_setup()
Add the setup_fail_codec label and jump to it if an error occurs once the
codec has been opened. In the raw input codepath, don't use this label until
the file is properly opened, as it also closes the fd and frees the raw
buffer.

This also fixes a file descriptor leak in the case where an error happened
after the file was opened in the raw input codepath.
2010-03-15 18:35:29 +01:00
Julien BLACHE
db0690afa1 Use int16_t for decoded audio data buffers 2010-03-15 18:34:14 +01:00
Julien BLACHE
9e8403061c Add TPE2 -> albumartist ID3v2 mapping
Reported by Ace Jones.
2010-03-10 17:11:08 +01:00
Julien BLACHE
5da807f829 Add ID3v2 tags to the metadata table
ffmpeg doesn't convert ID3v2 tag names to generic metadata names, so
add the ID3v2 tag names to the table to pick them up.

This fixes scanning of MP3 files in various cases.

More in this post and its attachment:
<http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2009-September/076213.html>

Thanks to Raivo Hool for bringing up the issue and fix.
2010-03-07 19:18:06 +01:00
Julien BLACHE
4e74119d2a Document artwork support 2010-03-07 16:10:04 +01:00
Julien BLACHE
ece7c0d071 Handle DAAP extra_data requests for groups/items artwork 2010-03-07 15:45:52 +01:00
Julien BLACHE
0eca9b4313 Add artwork handling routines
External artwork only, until ffmpeg supports embedded artwork.
2010-03-07 15:45:47 +01:00
Julien BLACHE
2a16bfdc6c Add libswscale to the required ffmpeg libraries 2010-03-07 15:23:41 +01:00
Julien BLACHE
666ce98055 Add a logdomain for artwork handling 2010-03-07 15:23:40 +01:00
Julien BLACHE
ca1c72651f Bump log prefix size to 8 2010-03-07 15:23:40 +01:00
Julien BLACHE
b0e10fb97d Add groups queries 2010-03-07 15:23:40 +01:00
Julien BLACHE
641e5462cc Rename pl_id member of struct query_params 2010-03-07 15:23:40 +01:00
Julien BLACHE
6a144cd670 Add db_file_path_byid() 2010-03-07 11:13:38 +01:00
Julien BLACHE
1f5efe038b Register ffmpeg evbuffer URL handler 2010-03-07 11:13:38 +01:00
Julien BLACHE
a1ef2ab243 FFmpeg "evbuffer:0x..." URLProtocol implementation
Implement a URL handler to output data to an evbuffer from ffmpeg.
2010-03-07 11:13:38 +01:00
Julien BLACHE
119525e612 Add a logger callback for FFmpeg log messages 2010-03-07 11:13:38 +01:00
Julien BLACHE
092eb59fe0 Add libavutil to the required ffmpeg libraries 2010-03-07 11:13:38 +01:00
Julien BLACHE
4c48dbad28 Add a logdomain for ffmpeg 2010-03-07 11:13:38 +01:00
Julien BLACHE
107ec85578 Constify the format string of logging functions 2010-03-07 11:13:38 +01:00
Julien BLACHE
07146e3261 Handle database upgrade v7 -> v8 2010-03-06 19:10:49 +01:00
Julien BLACHE
224ef48137 Make album groups persistent
Store groups (only album groups supported at the moment) in the DB,
so their ids are persistent for the duration of the forked-daapd session.

Those ids are used to, among other things, retrieve artwork, so we must
provide ourselves some persistence here.

This brings us to schema version 8.
2010-03-06 19:02:49 +01:00
Julien BLACHE
88dde32fc7 Recompute all songalbumids at startup
Due to the two Murmur64 implementations for 64 and 32bit machines, the
hash is not compatible when moving the SQLite DB between 32/64 bit hosts.

So we'll recompute all the songalbumids at startup, just in case.
2010-03-06 18:59:58 +01:00
Julien BLACHE
0e9a8674d9 Handle database upgrade v6 -> v7 2010-03-06 17:29:48 +01:00
Julien BLACHE
facb9957d8 Move daap_songalbumid() to its now-unique callsite 2010-03-06 17:29:48 +01:00
Julien BLACHE
748cca63be Maintain songalbumid inside the files table
songalbumid is used a lot in queries from Remote; computing the hash for
each row is a major waste of time on big libraries and slow machines, so
let's store the hash in the table.

This brings us to schema version 7.
2010-03-06 17:29:37 +01:00
Julien BLACHE
20c57d5289 Implement DAAP auto-logout
And advertise it.
2010-03-06 10:30:59 +01:00
Julien BLACHE
8c2def5ef5 Move daap_session_kill() higher up
No functional changes.
2010-03-06 10:29:53 +01:00
Julien BLACHE
affbae1c47 Make evbase_httpd non-static
Make the httpd event base available to httpd protocol handlers.
2010-03-06 10:27:39 +01:00
Julien BLACHE
c9e91532b3 Get rid of the intermediate buffer in itunes_pairing_hash()
No need to build the string to be hashed in advance, it can just
be written piece by piece to the md.
2010-02-22 17:49:24 +01:00
Julien BLACHE
2dde2f180d Revert "Add a fail_cb to evhttp_request for connection failures"
The fail_cb extension was actually never needed; we've migrated away from
it, so let's clean that up now.

This reverts commit 1ffcbdae27.
2010-02-14 09:36:55 +01:00
Julien BLACHE
18abda3a97 Use evhttp_connection's closecb instead of our fail_cb extension
The closecb callback of evhttp_connection does what we need, so no need
to use that extension anymore.
2010-02-14 09:34:29 +01:00
Ace Jones
b474166e8d Add ffmpeg patch for TV metadata 2010-02-13 11:27:45 +01:00
Julien BLACHE
16b5277f75 Rewrite MPEG4 streaming hints 2010-02-13 11:15:09 +01:00
Julien BLACHE
c7053bb0d3 Add a note about metadata/tag editors
Thanks to Ace Jones for bringing that up.
2010-02-12 19:10:37 +01:00
Julien BLACHE
8c569d59dd Add a note about optimizing MPEG4 files 2010-02-10 19:40:38 +01:00
Ace Jones
a92dc076e8 Add a test facility for DMAP
Add a /dmap-test handler that sends back a list containing test values
for all standard DMAP types (string + all integer types).
2010-02-10 18:29:26 +01:00
Julien BLACHE
056f4b6997 Reindent dmap_add_field()
Fix indentation in dmap_add_field(), no functional changes.
2010-02-10 18:29:26 +01:00