Commit Graph

1651 Commits

Author SHA1 Message Date
Julien BLACHE 588b328b45 IPv4 binding failure is fatal in all cases
IPv4 and IPv6 are bound separately; IPv6 may fail if unsupported, IPv4
must always succeed.
2010-05-14 17:36:58 +02:00
Julien BLACHE ed38ce7dd1 Add IPv6 support to evrtsp 2010-05-14 17:36:41 +02:00
Julien BLACHE 74c4dd1ea3 Add IPv6 support to evhttp
Just the bits we need.
2010-05-14 17:36:36 +02:00
Julien BLACHE 4bd09cba62 Browse and resolve mDNS services on both IPv4 and IPv6 2010-05-14 17:36:29 +02:00
Julien BLACHE c2ae855a28 Always re-add timing event instead of returning on error 2010-05-13 17:16:44 +02:00
Julien BLACHE 143b612c97 Fix REPEAT_OFF behaviour on single-item playlists 2010-05-09 09:52:09 +02:00
Julien BLACHE 576e1cc9ef Check for player status after playback_write()
playback_write() can actually stop the player, so check that this did
not happen.
2010-05-09 09:24:05 +02:00
Julien BLACHE 4ebbe3696f Fix integer parameter check for 32bit platforms
Replace strtol() with strtoll() as we need to handle 64bit values for
daap.songalbumid at least.
2010-05-09 09:00:44 +02:00
Julien BLACHE 84279b817d Kill two open-coded instances of safe_atou32() 2010-05-09 08:55:50 +02:00
Julien BLACHE 1a829d69a0 Do not free evrtsp_request after make_request() call
At that point, the request has been added to the connection and will be
freed when the connection is freed.
2010-05-08 12:16:54 +02:00
Julien BLACHE 6de5c64670 Do not free evhttp_request after make_request() call
At that point, the request has been added to the connection and will be
freed when the connection is freed.
2010-05-08 12:05:52 +02:00
Julien BLACHE c2977fd61d Protect playback_start() againt empty playlist 2010-05-05 19:19:16 +02:00
Julien BLACHE 682e495ed0 Protect shuffle against empty player playlist 2010-05-05 19:17:36 +02:00
Julien BLACHE 36f0d0a76e Implement DACP setproperty for dacp.userrating 2010-05-05 19:13:22 +02:00
Julien BLACHE eb66a56e1d Pass query parameters to DACP property setters 2010-05-05 19:13:15 +02:00
Julien BLACHE f38ff924d7 Add safe_hextou32() 2010-05-05 19:13:15 +02:00
Julien BLACHE 548cd2a150 Use httpd_send_reply() instead of evhttp_send_reply() where pertinent
gzip replies where useful; artwork should not be compressed, as PNGs are
already compressed and that would be a waste of time.
2010-05-03 19:11:55 +02:00
Julien BLACHE 13c9de3ed1 Introduce httpd_send_reply() with gzip capability 2010-05-03 19:11:55 +02:00
Julien BLACHE 33936bacfa Check for zlib and use it 2010-05-03 18:19:41 +02:00
Julien BLACHE 0982b9fbbb Make vlogger() static; unneeded outside of logger.c 2010-05-03 18:19:40 +02:00
Julien BLACHE b615946989 Default sound card for FreeBSD 2010-05-02 11:45:16 +02:00
Julien BLACHE 882b42f83c Port player to FreeBSD
The kqueue/kevent timers are no replacement for timerfd, so unfortunately this
doesn't work well at all. Need a higher resolution timer.
2010-05-02 11:45:16 +02:00
Julien BLACHE e49421b04b Integrate OSS4 local audio output 2010-05-02 11:45:16 +02:00
Julien BLACHE 8c0649e066 Add OSS4 local audio output implementation 2010-05-02 11:45:15 +02:00
Julien BLACHE d38db5868c Implement jumping in DACP cue play command 2010-05-02 11:45:15 +02:00
Julien BLACHE c11752e9a6 Honor dacp.shufflestate parameter in cue play command 2010-05-02 11:45:15 +02:00
Julien BLACHE 9f84fd9794 Wire up DACP setproperty for dacp.shufflestate 2010-05-02 11:45:15 +02:00
Julien BLACHE a74caeed82 Wire up DACP setproperty for dacp.repeatstate 2010-05-02 11:45:15 +02:00
Julien BLACHE 7751c23f18 Implement DACP setproperty for dacp.playingtime 2010-05-02 11:45:15 +02:00
Julien BLACHE 6eca3a98d8 Implement DACP setproperty 2010-05-02 11:45:15 +02:00
Julien BLACHE 297c86c453 Implement DACP getproperty and DACP properties core code 2010-05-02 11:45:15 +02:00
Julien BLACHE b73631bb5c Introduce helpers for DACP nowplaying & playingtime 2010-05-02 11:45:15 +02:00
Julien BLACHE 505b7a2ade Wire up nextitem and previtem 2010-05-02 11:45:15 +02:00
Julien BLACHE b4a5ba6f3c Wire up pause and playpause 2010-05-02 11:45:15 +02:00
Julien BLACHE f5e84d6950 Implement DACP nowplayingartwork 2010-05-02 11:45:15 +02:00
Julien BLACHE 9c569f10a9 Implement playstatus updates 2010-05-02 11:45:15 +02:00
Julien BLACHE b72948e027 Rework playstatusupdate reply
Introduce make_playstatusupdate() and use player_get_status() to get the
player status. Implement the full playstatusupdate reply.
2010-05-02 11:45:15 +02:00
Julien BLACHE ca2ee21d84 Implement DACP cue requests 2010-05-02 11:45:15 +02:00
Julien BLACHE bb5703d878 Implement DACP setspeakers 2010-05-02 11:45:14 +02:00
Julien BLACHE aa20a2e485 Implement DACP getspeakers 2010-05-02 11:45:14 +02:00
Julien BLACHE d036fa306e Wire up player 2010-05-02 11:45:14 +02:00
Julien BLACHE 87861b54ea Build audio player 2010-05-02 11:45:14 +02:00
Julien BLACHE f7886c87cb Add Airport Express device section 2010-05-02 11:45:14 +02:00
Julien BLACHE f93090a713 Add audio section to the config file 2010-05-02 11:45:14 +02:00
Julien BLACHE ffcf100c00 Replace rng_rand_range() with GLib's g_rand_int_range() that works better 2010-05-02 11:45:14 +02:00
Julien BLACHE 5e9c245e39 Add random number generator and related functions 2010-05-02 11:45:14 +02:00
Julien BLACHE 47589ff34a Add audio player 2010-05-02 11:45:14 +02:00
Julien BLACHE 53c20c2f1c Add ALSA-based local audio output support 2010-05-02 11:44:43 +02:00
Julien BLACHE d335b2d331 Add RAOP implementation, with AirTunes v2 streaming 2010-05-02 11:44:43 +02:00
Julien BLACHE 992eb9009a Add evrtsp - RTSP implementation on top of libevent, derived from evhttp 2010-05-02 11:44:43 +02:00
Julien BLACHE 8427707afc Create evbase_httpd before protocol handlers init
DACP needs the httpd event base at init time.
2010-05-02 11:44:43 +02:00
Julien BLACHE dc95a04562 Add optional sorting clause to Q_ITEMS 2010-05-02 11:44:43 +02:00
Julien BLACHE 4dc8f11887 Handle database upgrade v9 -> v10 2010-05-02 11:44:43 +02:00
Julien BLACHE 74cc5a7a13 Add config variables save/fetch for integer variables 2010-05-02 11:44:43 +02:00
Julien BLACHE 49b7a96eec Add safe_hextou64() 2010-05-02 11:44:43 +02:00
Julien BLACHE 7a02215d0d Add Base64 encoding routines 2010-05-02 11:44:43 +02:00
Julien BLACHE 1849601d56 Add a log handler for libasound 2010-05-02 11:44:43 +02:00
Julien BLACHE ff7e6aa533 Add logdomains for player, RAOP and local audio 2010-05-02 11:21:08 +02:00
Julien BLACHE 17daace67f Add seek support to transcode 2010-05-02 11:21:08 +02:00
Julien BLACHE 9fb7ec8e5c Make the WAV header optional 2010-05-02 11:21:08 +02:00
Julien BLACHE e3fb8f00cf Maintain libhash in the conffile module 2010-05-02 11:21:07 +02:00
Julien BLACHE 27acda871a Constify dmap_add_string() parameter 2010-05-02 11:21:07 +02:00
Julien BLACHE bccc6da87f Set closecb to NULL on update requests' connections at deinit
Otherwise the closecb is called when the connection is closed/freed during
deinit, and this happens in the HTTP cleanup after the DAAP and DACP cleanups
have run, leading to spurious "struct update_request not found" messages.
2010-05-02 11:21:07 +02:00
Julien BLACHE 17b1e1a7bf Fix size_t in snprintf() 2010-05-02 10:17:22 +02:00
Julien BLACHE f696aa321e Fix error message in db_file_add() 2010-05-02 08:23:21 +02:00
Julien BLACHE 465c10ded3 Rework database version check to error out on newer databases 2010-05-02 08:23:21 +02:00
Julien BLACHE 00d6381f15 Introduce and use db_blocking_{prepare_v2,step}
Make use of the SQLite3 unlock notify API to wait for the database to
become available. From the SQLite3 sample code for the unlock notify API.

This requires SQLite3 to be built with SQLITE_ENABLE_UNLOCK_NOTIFY.
2010-05-02 08:23:21 +02:00
Julien BLACHE f9454aa4a3 Introduce db_exec(), replacing sqlite3_exec() 2010-05-02 08:23:21 +02:00
Julien BLACHE dc18860dc5 Enable SQLite3 shared-cache mode
This requires SQLite 3.5.0+ for per-process (as opposed to per-thread)
shared-cache support.

It also enables the use of the unlock notify API.
2010-05-02 08:22:41 +02:00
Julien BLACHE d2932896a3 Switch SQLite3 to SQLITE_CONFIG_MULTITHREAD mode 2010-05-02 08:22:41 +02:00
Julien BLACHE 0411720a58 Perform explicit sqlite3 init/deinit 2010-04-26 18:24:09 +02:00
Dustin King 4551d530f9 Lower logging level for files with no metadata 2010-04-10 11:23:11 +02:00
Dustin King ce8fe19627 Add handlers for ID3v2 track and disc fields 2010-04-10 11:21:04 +02:00
Dustin King 61f5b6d833 Run two passes for gathering metadata
The extra md_map needs to be used before the generic md_map because
the extra md_map needs to be used before av_metadata_conv while the
generic md_map needs to be used after av_metadata_conv. This allows
handling of things like ID3v2 track fields which get mapped to the
generic track field by av_metadata_conv but actually contain both
track number and the total number of tracks on the disc.

Note: modified from Dustin's original patch.
2010-04-10 11:15:16 +02:00
Dustin King b8b205e7f2 Add function pointer for metadata handler to struct metadata_map 2010-04-10 10:59:29 +02:00
Dustin King b219b912f2 Split out VORBIS field names into a dedicated extra md_map 2010-04-10 10:55:52 +02:00
Julien BLACHE f36261be65 Add album_artist to the generic md_map
The generic metadata field name is album_artist and not albumartist; that, or we
previously missed that field.
2010-04-10 10:55:52 +02:00
Dustin King a5bdb9d59a Identify TDRC as coming from ID3v2.4 2010-04-10 10:55:46 +02:00
Julien BLACHE 1df0258055 Demote "could not find requested meta field" message to E_WARN 2010-04-10 09:46:48 +02:00
Julien BLACHE 5475c18308 Remove FLAC-specific raw mode
Older versions of ffmpeg did not support raw FLAC streams properly and needed
to be fed the raw stream manually; looks like it's been fixed in ffmpeg 0.5.
2010-03-28 16:19:30 +02:00
Julien BLACHE 887d1bf5ca Small clarification in transcode_cleanup() 2010-03-28 16:14:36 +02:00
Julien BLACHE 21e564e493 Add the DISCTOTAL tag for formats using VORBIS comments 2010-03-27 12:08:49 +01:00
Julien BLACHE e87f46e95c Add the TRACKTOTAL tag for format using VORBIS comments 2010-03-25 21:40:17 +01:00
Julien BLACHE b7ec65963d Constify data tables where possible 2010-03-25 21:40:17 +01:00
Julien BLACHE c545e52374 Simplify streams handling
Keep pointers to the streams instead of the stream number.
2010-03-25 21:40:17 +01:00
Julien BLACHE 6677b3435d Call av_metadata_conv() to convert metadata to ffmpeg's generic format
This is actually needed for everything to work properly, but it only really
started breaking with newer versions of ffmpeg where more demuxers have been
completely ported over to the metadata API.
2010-03-25 21:40:17 +01:00
Julien BLACHE 04e8f5cfd6 Split TV show tags out of the generic md_map 2010-03-25 21:39:41 +01:00
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 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