Commit Graph

21 Commits

Author SHA1 Message Date
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
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 a5a46b8a53 Fix lseek() return value handling
lseek() returns an off_t and not an int, using an int to store and
test the return value means we'll error out when the position in the file
gets past INT_MAX.
2010-02-10 18:19:32 +01:00
Julien BLACHE 58faeaceca Integer types cleanup
Try to be a bit more strict about integer types, use off_t or int64_t for
file size and file offsets.

Replace safe_ato*() by safe_atoi32() and safe_atoi64(), fix integer types
at call sites to match.
2010-02-02 21:09:56 +01:00
Julien BLACHE dd1712abdc Use glibc endianness-related headers if available
BSD headers aren't working properly on kFreeBSD, so use the glibc ones.
2010-01-17 10:52:58 +01:00
Julien BLACHE 79cdb4f9aa Make forked-daapd build on GNU/kFreeBSD 2010-01-10 17:49:01 +01:00
Julien BLACHE 3724f943b9 Use sys/endian.h on FreeBSD 2010-01-09 13:42:59 +01:00
Julien BLACHE 974a74a833 Update copyright notices for 2010 2010-01-05 19:34:00 +01:00
Ace Jones 040e760789 Add support for Remote, the iPhone remote control for iTunes
Remote needs the same DAAP query quirk as iTunes and supports the
same codecs.
2009-12-30 18:49:52 +01:00
Julien BLACHE df2cbea9b2 Add supported codec list for Front Row and QuickTime
Patch from Ace Jones <ace.jones1@yahoo.com>.
2009-12-08 20:45:57 +01:00
Julien BLACHE 8f07db5c10 Add support for FLAC files with ID3v2 tags.
Patch from Wolfgang Holler <woelfs@googlemail.com>.
2009-11-18 20:14:03 +01:00
Julien BLACHE 11909725e2 Use ffmpeg's memory allocator for transcode buffer
ffmpeg's allocator ensures the allocated memory is properly aligned for
any kind of optimized operation used in ffmpeg.
2009-07-24 08:19:31 +02:00
Julien BLACHE 2323fd302c Fix memory leak (transcode buffer) 2009-07-24 08:18:53 +02:00
Julien BLACHE a200703393 Switch to the new database code 2009-06-10 19:04:18 +02:00
Julien BLACHE 11fd038d16 Use new logger facility 2009-05-09 17:14:06 +02:00
Julien BLACHE 10bb9dec57 Remove useless daapd.h 2009-05-05 16:22:11 +02:00
Julien BLACHE e4fe084619 Use embedded evhttp 2009-05-03 11:16:57 +02:00
Julien BLACHE 2c2498b6b4 Add transcoding infrastructure 2009-05-03 11:16:57 +02:00