Commit Graph

4209 Commits

Author SHA1 Message Date
Max Kellermann c3e0fbd9e4 archive/bz2: use g_path_get_basename()
Use g_path_get_basename() instead of manually filtering the path
name.  Big advantage: g_path_get_basename() cannot fail.
2009-12-16 15:53:57 +01:00
Alam Arias b05ba0286e updated mp4ff decoder about input_stream_seek 2009-12-16 06:47:15 +01:00
Max Kellermann 228b03edf8 input_stream: return errors with GError 2009-12-15 23:12:11 +01:00
Max Kellermann d000d31355 encoder/flac: fix write callback prototype for libFLAC 1.1.2 2009-12-15 23:12:06 +01:00
Max Kellermann 3d95226f2b decoder_internal: decoder_input_buffer() returns bool
This fixes a regression: a boolean value was returned from
decoder_input_buffer(), but the caller chose to do a "<= 0"
comparison.
2009-12-15 22:24:00 +01:00
Max Kellermann b12072e6d9 input/archive: use g_path_is_absolute()
.. instead of manually checking pathname[0]=='/'.
g_path_is_absolute() is portable.
2009-12-15 21:26:16 +01:00
Max Kellermann 03427d4eff archive/bz2: simplified error handling, short read
Don't attempt to fill the whole buffer in the read() method, return
whatever libbz2 provides with the first successful BZ2_bzDecompress().
2009-12-15 21:09:13 +01:00
Max Kellermann a627a703ca archive/bz2: no CamelCase 2009-12-15 20:53:29 +01:00
Max Kellermann 440cfc8052 archive/zzip: removed the "zip_context" typedef
Use the raw struct name.
2009-12-15 20:49:38 +01:00
Max Kellermann c959148ed1 archive/zip: renamed plugin to "zzip"
This plugin is based on libzzip.
2009-12-15 20:29:44 +01:00
Max Kellermann 530e480748 Merge branch 'v0.15.x'
Conflicts:
	src/archive/bz2_plugin.c
	src/archive_api.h
	src/input/file_input_plugin.c
	test/run_input.c
2009-12-15 20:26:38 +01:00
Max Kellermann 9179f108a5 iso, zip: fixed memory leak in destructor
Free the "context" pointer in the method archive_plugin.close().
2009-12-15 19:57:00 +01:00
Max Kellermann 3411f6cffd archive: close archive when stream is closed
Fixes a memory leak: the "archive" input plugin opens the archive, but
never closes it.  This patch moves the responsibility for doing that
to archive_plugin.open_stream().  This is an slight internal API
change, but it is the simplest and least intrusive fix for the memory
leak.
2009-12-15 19:45:50 +01:00
Max Kellermann 6c0f50efb5 archive/bz2: removed NULL check before g_free()
g_free(NULL) is allowed.
2009-12-15 19:42:54 +01:00
Max Kellermann 2234d491b7 input/archive: close the archive file on error
Fixed memory leak in error handler.
2009-12-15 19:41:00 +01:00
Max Kellermann f01d7d230b input/file: don't fall back to parent directory
This code has never made any sense, and has broken some of the archive
plugin.
2009-12-15 19:16:28 +01:00
Max Kellermann 95c3f283ea input/file: don't fall back to parent directory
This code has never made any sense, and has broken some of the archive
plugin.
2009-12-15 19:03:11 +01:00
Max Kellermann aef6609f4f archive_api.h: moved struct archive_plugin to archive_plugin.h 2009-12-15 19:02:24 +01:00
Max Kellermann 6b728e4756 archive_list: don't include archive_api.h
Use struct forward declarations.
2009-12-15 19:02:17 +01:00
Max Kellermann f1ecd9eac8 archive_list: iterate with NULL check
Don't use num_archive_plugins.
2009-12-15 15:31:00 +01:00
Max Kellermann 243c96304b archive/bz2: bz2_fillbuffer() returns bool 2009-12-15 09:08:30 +01:00
Max Kellermann e3597e648c archive/bz2: fixed indentation 2009-12-15 09:00:34 +01:00
Max Kellermann 357037f7ab archive/bz2: g_malloc() cannot fail 2009-12-15 09:00:18 +01:00
Max Kellermann 51d0687377 fixed several gcc warnings on unused debug variables 2009-12-14 23:22:51 +01:00
Max Kellermann 849d7895dc decoder/mikmod: fixed gcc uninitialized warning
Removed local variable "sample_rate".
2009-12-14 23:20:14 +01:00
Max Kellermann 786c1f035f input_plugin: method init() returns errors with GError
Not used by any plugin currently, but this eliminates the g_error()
call in input_plugin_config(), so it's worth it.
2009-12-14 23:16:18 +01:00
Max Kellermann f70d2f58a1 input_stream: moved input_stream_global_init() to input_init.c 2009-12-14 22:53:13 +01:00
Max Kellermann 67b0ab717e input_stream: moved plugin list to input_registry.c 2009-12-14 22:49:46 +01:00
Max Kellermann f7420dbfe1 input_stream: make input_plugins NULL terminated
This is easier to traverse.
2009-12-14 22:43:00 +01:00
Max Kellermann 400600ffff filter: added normalize filter plugin
Wrap the AudioCompress library in a filter plugin.
2009-12-14 22:24:00 +01:00
Albin Eldstål-Damlin 940e66bb89 Fix and use filter_configured_new() 2009-12-14 22:23:05 +01:00
Albin Eldstål-Damlin 69391dadda Proper error reporting from filter_config 2009-12-14 22:18:28 +01:00
Albin Eldstål-Damlin ff3393ebf1 Fixed memory leak on incorrect route configuration 2009-12-14 22:18:28 +01:00
Albin Eldstål-Damlin 0ac0bd26e7 Split filter_config into its own module 2009-12-14 22:12:58 +01:00
Albin Eldstål-Damlin 8587fcbb93 Error reporting, pcm_buffer, performance tweaks 2009-12-14 20:41:09 +01:00
Albin Eldstål-Damlin a4fbf772c1 Initial filter chain and filter configuration for outputs. 2009-12-14 17:56:31 +01:00
Albin Eldstål-Damlin e28c5a0beb Initial (statically configured) route filter plugin 2009-12-14 17:41:28 +01:00
Albin Eldstål-Damlin c38b9490a8 Minor documentation fix 2009-12-14 17:41:10 +01:00
Max Kellermann c3085d7b61 Merge branch 'v0.15.x'
Conflicts:
	src/decoder/ffmpeg_plugin.c
2009-12-14 17:40:50 +01:00
Max Kellermann 8f7bc70bf5 decoder/wavpack: don't use the nonstandard "uchar" type
Use the signed C99 type int8_t instead.
2009-12-11 12:45:57 +01:00
Max Kellermann 5a354a1ed4 mixer: explicitly close all mixers on shutdown
Mixers with the "global" flag set aren't closed automatically when the
output device is closed.  Thus, they might still be open when MPD
shuts down.
2009-12-08 08:47:47 +01:00
Max Kellermann f4b707b4ca mapper: apply filesystem_charset to playlists
This fixes an inconsistency in the stored playlist subsystem: when
obtaining the list of playlists (listplaylist, listplaylistinfo), the
file names in the playlist directory are converted to UTF-8 (according
to filesystem_charset), but when saving or loading playlists, the
filesystem_charset setting was ignored.
2009-12-08 08:33:14 +01:00
Max Kellermann cd69fee0a4 command: verify playlist name in the "rm" command
Call spl_valid_name() in spl_delete().
2009-12-08 08:32:26 +01:00
Max Kellermann 23e46b38ca mapper: fix memory leak when playlist_directory is not set
Don't allocate the file name before the playlist_dir==NULL check.
2009-12-08 08:06:10 +01:00
Thomas Jansen 179502fe93 decoder_api: prefer stream_tag over decoder_tag
If both tags (stream and decoder) are present, we prefer the stream tag.
Fixes #2698, where ICY tag contained useful information, but was
overwritten with bogus decoder tag data.
2009-12-07 14:52:48 +01:00
Viliam Mateicka b6b377edd1 pcm_volume: change old code to use format instead of bits 2009-12-03 20:56:57 +01:00
Viliam Mateicka a76097210f encoders: remove unnessesary pointers to const strings 2009-12-03 20:43:13 +01:00
Viliam Mateicka ac0bf1a445 httpd: use get_mime_type to determine encoder content 2009-12-03 20:27:08 +01:00
Viliam Mateicka 7b80e73810 encoders: implement new get_mime_types method 2009-12-03 20:11:32 +01:00
Viliam Mateicka 6d11711a01 encoder: add get_mime_type() method to determine content type by httpd output plugin 2009-12-03 19:39:34 +01:00
Viliam Mateicka bae03e173e pcm_mix: change old code to use format instead of bits 2009-12-03 17:03:21 +01:00
Viliam Mateicka 07b388f8d4 null_encoder: use pcm_buffer 2009-12-03 17:03:20 +01:00
Viliam Mateicka 4809213676 flac_encoder: add support for libFLAC < 1.1.3 2009-12-03 14:53:30 +01:00
Jeffrey Middleton c77fa296bc compress: add config.h
This includes some default values of #defined constants used in the
code; it won't compile without it.
2009-12-02 21:14:35 -06:00
Max Kellermann c412d6251e audio_format: changed "bits" to "enum sample_format"
This patch prepares support for floating point samples (and probably
other formats).  It changes the meaning of the "bits" attribute from a
bit count to a symbolic value.
2009-12-02 22:29:50 +01:00
J. Shagam 4076523198 compress: upgraded to AudioCompress 2.0
Copied sources from
http://beesbuzz.biz/code/audiocompress/AudioCompress-2.0.tar.gz

[mk: created this patch under fluffy's name and fixed some gcc
signed/unsigned comparison warnings]
2009-12-02 18:11:53 +01:00
svitoos 7162fe85ce tag_id3: fix ID3v1 charset conversion
If we define id3v1_encoding, then the tags are not added to the
database.
2009-11-30 17:42:46 +01:00
Max Kellermann 16123f1b8e ffmpeg: don't try to force stereo
The plugin code tried to force libavcodec to supply stereo samples.
That however has never actually worked.  By removing this code, we are
able to play surround files for the first time.
2009-11-30 09:59:05 +01:00
Max Kellermann 3857bb9990 decoder/mpcdec: set 24 bit sample format
This fixes a regression due to a typo caused by "decoder: use
audio_format_init_checked()".
2009-11-25 08:59:13 +01:00
Max Kellermann 300f936228 pcm_mix: implemented 32 bit support 2009-11-19 21:00:54 +01:00
Max Kellermann 1358428031 pcm_volume: implemented 32 bit support
Support 32 bit samples with software mixer.
2009-11-19 21:00:50 +01:00
Max Kellermann c33bbd947b Merged release 0.15.6 from branch 'v0.15.x'
Conflicts:

	NEWS
	configure.ac
2009-11-19 19:59:34 +01:00
Max Kellermann 21fdf47b56 decoder/flac: fixed compiler warning
Removed the "vtrack" local variable (which triggered a gcc warning
because it was after the newly introduced NULL check), and run
strtol() on the original parameter.
2009-11-19 19:49:44 +01:00
Max Kellermann 97f8e017c4 decoder/flac: fixed NULL pointer dereference in CUE code
The function flac_vtrack_tnum() was missing a strrchr()==NULL check.
2009-11-18 19:55:38 +01:00
Viliam Mateicka d37b4bb199 cmdline: print out list of encoders in --version info 2009-11-17 20:39:26 +01:00
Viliam Mateicka ea92dee1ae encoder: let wave encoder to use pcm_buffer, pcm conversion code cleanup 2009-11-17 20:39:21 +01:00
Viliam Mateicka 5420f9ae76 encoder: introducing flac encoder plugin 2009-11-17 19:41:35 +01:00
Max Kellermann f51ba6464a id3: allow 4 MB RIFF/AIFF tags
Allow RIFF/AIFF ID3 tags up to 4 MB (old limit was 256 kB).  This
might still be too small for some users, and when somebody complains,
we might do something more clever (like streaming the data into
libid3tag?).
2009-11-15 18:44:53 +01:00
Max Kellermann 77b95d08a5 decoder/ffmpeg: align the output buffer
On some platforms, libavcodec wants the output buffer aligned to 16
bytes (because it uses SSE/Altivec internally).  It will segfault when
you don't obey this rule.
2009-11-15 17:39:09 +01:00
Max Kellermann 39404725f0 output/openal: use audio_format_to_string() 2009-11-15 16:20:20 +01:00
Max Kellermann 5d1e5f4ea0 crossfade: use audio_format_valid() in assertion 2009-11-15 15:39:29 +01:00
Max Kellermann 141cbc60b9 decoder/audio: eliminate the "bits" variable
Pass the audiofile_setup_sample_format() result to
audio_format_init_checked().
2009-11-14 23:35:37 +01:00
Max Kellermann 2c1fb48318 decoder/audiofile: moved code to audiofile_setup_sample_format() 2009-11-14 23:22:14 +01:00
Max Kellermann 1dfadf4815 decoder/modplug: count frame position
Don't maintain the current time stamp in a floating point variable,
because this is subject to rounding errors.
2009-11-14 22:30:57 +01:00
Max Kellermann f5b9e3c064 decoder/modplug: floating point division for song duration
More exact total time.
2009-11-14 22:27:27 +01:00
Max Kellermann ff70dbd316 decoder/modplug: check ModPlug_Read() < 0
Negative return values are not documented here, but since the function
prototype is signed, let's be sure.
2009-11-14 22:27:04 +01:00
Max Kellermann dd4625ce13 decoder/mikmod: count frame position
Don't maintain the current time stamp in a floating point variable,
because this is subject to rounding errors.
2009-11-14 02:24:42 +01:00
Max Kellermann 1648c7aa5b decoder/mikmod: sample rate is configurable
The new option "sample_rate" sets the sample rate for libmikmod.
2009-11-14 02:24:42 +01:00
Max Kellermann edaf017908 decoder/mikmod: set drv_name and drv_version from PACKAGE/VERSION 2009-11-14 02:24:42 +01:00
Max Kellermann 2c7bf61e68 decoder/mikmod: no CamelCase 2009-11-14 02:07:41 +01:00
Max Kellermann 7efb548921 decoder/mikmod: removed the struct mod_Data 2009-11-14 02:07:41 +01:00
Max Kellermann 0c5329aedc decoder/mikmod: merged open()/close() into decode()
These functions are trivial, we don't need them separate.
2009-11-14 02:07:41 +01:00
Max Kellermann 2d236e281f decoder/mikmod: static mod_Data object
Don't allocate this object, put it on the stack.
2009-11-14 02:07:41 +01:00
Max Kellermann cef5dcc0a1 audio_format: added function audio_format_to_string()
Unified function for converting an audio_format object to a string,
for log messages and for the "status" command.
2009-11-14 01:15:26 +01:00
Max Kellermann 719990b1c5 decoder: use audio_format_init_checked()
Let the audio_check library verify the audio format in all (relevant,
i.e. non-hardcoded) plugins.
2009-11-14 00:47:22 +01:00
Max Kellermann f47bb8c1db audio_check: checker functions for audio_format attributes
These functions are a wrapper for audio_valid_X().  On error, they
return a GError object.
2009-11-14 00:47:19 +01:00
Max Kellermann 873025a495 decoder/sidplay: correctly calculate floating point time
Internally, use only the integer time.  When needed, convert it to a
floating point seconds value.
2009-11-14 00:46:30 +01:00
Max Kellermann 409a3ed808 player_thread: corrected two assertions on "queued"
At this point, the function may be called from the SEEK handler.
2009-11-14 00:45:52 +01:00
Max Kellermann 76283c25a5 player_thread: initialize chunk->times in silence generator
When waiting for the decoder to provide more data, the player thread
generates silence chunks if needed.  However, it forgot to initialize
the chunk.times attribute, which had now an undefined value.  This
patch sets it to -1.0, meaning "value is undefined".  Add a ">= 0.0"
check to audio_output_all_check().  This fixes spurious relative
seeking errors, because sometimes, the "elapsed" value falls back to
0.0.
2009-11-12 18:41:25 +01:00
Max Kellermann b9866e43d3 player_control: hold lock while reading status 2009-11-12 18:40:36 +01:00
Max Kellermann 9947b82cad added .#* to .gitignore
Temporary editor files.
2009-11-12 18:39:40 +01:00
Max Kellermann 5b82ffc291 include config.h in all sources
After we've been hit by Large File Support problems several times in
the past week (which only occur on 32 bit platforms, which I don't
have), this is yet another attempt to fix the issue.
2009-11-12 09:17:03 +01:00
Max Kellermann 8068fd5228 decoder/vorbis: fixed gcc "signed" warning 2009-11-12 09:16:34 +01:00
Max Kellermann b9c610ac87 directory: include config.h
*sigh* another Large File breakage.  ino_t/dev_t this time.  We need
to include config.h in directory.h to get this straight.
2009-11-11 23:36:36 +01:00
Max Kellermann 59189160e3 decoder/wavpack: allow more than 2 channels
Remove the OPEN_2CH_MAX option.  MPD's support for surround sound is
still clunky, but we're working on it.
2009-11-11 23:03:20 +01:00
Max Kellermann ee5d3337a7 decoder/wavpack: activate 32 bit support
MPD has been supporting 32 bit samples since version 0.15.  This patch
changes one check, and removes the 32->24 conversion code.

Note that WavPack floating point samples have 32 bits, and MPD doesn't
have a special check for floating point - therefore, this WavPack
plugin still returns 24 bit integer samples as before (until we have
float support in the MPD core).
2009-11-11 21:49:00 +01:00
Max Kellermann 4c6a8e3ca5 decoder/vorbis: initialize before entering the loop
Call decoder_initialize() before entering the loop.  We don't need to
call ov_read() before ov_info().  When the stream number changes,
check if the audio format is still the same.
2009-11-11 21:34:55 +01:00
Max Kellermann 4f38cc9cae decoder/vorbis: moved error strings to vorbis_strerror() 2009-11-11 21:12:10 +01:00
Max Kellermann dfc09a37c9 decoder/vorbis: removed the OggCallbackData typedef
Use the struct name instead.
2009-11-11 21:09:08 +01:00
Max Kellermann 8588c21689 decoder/vorbis: fix typo in comment 2009-11-11 21:09:08 +01:00