Max Kellermann
216dff98d2
playlist_queue: try open by URI first
...
If that fails, try opening the file as a stream.
2009-12-26 03:01:52 +01:00
Max Kellermann
032354e65c
playlist_list: use uri_get_suffix()
2009-12-26 03:01:50 +01:00
Max Kellermann
115d26608b
uri: check presence of slash in suffix
...
If there's a slash in the uri_get_suffix() return value, then it's
malformed. Return NULL in this case.
2009-12-26 03:01:48 +01:00
Max Kellermann
bad350bc18
decoder_api: added function decoder_timestamp()
...
Remove the data_time parameter from decoder_data(). This patch
eliminates the timestamp counting in most decoder plugins, because the
MPD core will do it automatically by default.
2009-12-26 03:01:43 +01:00
Max Kellermann
870436a592
output_init: use the normalize filter plugin
...
Use the plugin instead of the glue code in normalize.c. This is used
wrapped inside a "autoconv" filter, to enable normalization for all
input file formats.
2009-12-25 17:51:08 +01:00
Max Kellermann
6a17233f78
filter: added the "autoconvert" filter plugin
2009-12-25 17:51:05 +01:00
Max Kellermann
b54bde6f2b
filter_plugin: allow open() to force an input format
...
Make the audio_format argument non-const. Allow the open() method to
modify it, to indicate that it wants a different input audio format
than the one specified. Check that condition in chain_filter_open(),
and fail.
2009-12-25 17:29:41 +01:00
Max Kellermann
d2051c7f50
filter/volume: support 32 bit samples
...
The pcm_volume library supports 32 bit samples, there's no reason to
disallow it in the filter plugin.
2009-12-25 17:29:27 +01:00
Max Kellermann
bd29f7e3c8
filter/route: check configured channel count in method init()
...
Detect misconfiguration during MPD startup, not when playback begins.
2009-12-25 16:39:47 +01:00
Max Kellermann
c3bb81abec
filter/route: route_filter_parse() returns bool
...
Indicate success and error.
2009-12-25 16:39:45 +01:00
Max Kellermann
d469c8137f
filter_registry: removed the "chain" plugin from filter_plugins
...
This plugin cannot be configured.
2009-12-25 16:39:41 +01:00
Max Kellermann
c374a7d3f4
filter/chain: return NULL if a filter() method has failed
...
Don't close child filters in the filter() method.
2009-12-25 16:28:17 +01:00
Max Kellermann
3679d5bd7a
playlist: added CUE playlist plugin
...
This plugin is the groundwork for MPD's future generic CUE sheet
support. That's not complete yet, e.g. there is no way for a playlist
plugin to address an arbitrary position within a music file.
2009-12-16 22:19:01 +01:00
Max Kellermann
c128f2dd7e
playlist_list: support URI suffix match
...
When no plugin matches the URI scheme, try the file name suffix.
2009-12-16 22:17:16 +01:00
Max Kellermann
843717d25c
playlist_list: check if open method is present
...
Use open_uri() / open_stream() only after checking that they are
implemented.
2009-12-16 22:16:47 +01:00
Max Kellermann
50ea6a4b5c
cue_tag: added song duration support
...
Get duration from track_get_length().
2009-12-16 22:15:27 +01:00
Max Kellermann
5649f22322
cue_tag: check cd_get_track()!=NULL
2009-12-16 20:55:19 +01:00
Max Kellermann
b89281411f
cue_tag: added function cue_tag()
...
Merge code from cue_tag_file() and cue_tag_string().
2009-12-16 20:49:03 +01:00
Max Kellermann
67c41033c1
cue_tag: merged code into cue_tag_merge()
2009-12-16 17:27:52 +01:00
Max Kellermann
59534b92d2
cue_tag: pass "const" string to cue_tag_string()
2009-12-16 17:26:20 +01:00
Max Kellermann
41a48b14e3
cue_tag: changed runtime checks to assertions
...
It's illegal to pass NULL here. This should not be ignored silently.
2009-12-16 17:26:20 +01:00
Max Kellermann
5821bd1a21
cue_tag: fixed indent and code style
2009-12-16 17:18:56 +01:00
Max Kellermann
c5cdac9609
cue_tag: tag_new() cannot fail
...
Removed the NULL check.
2009-12-16 17:18:23 +01:00
Max Kellermann
b7f55ad392
cue_tag: include cleanup
2009-12-16 17:13:26 +01:00
Max Kellermann
71fee09744
archive_plugin: use GError in the open() method
2009-12-16 17:10:19 +01:00
Max Kellermann
f9af1a445e
input/archive: check for archive_file_open() errors
...
This fixes a NULL pointer dereference in case of archive plugin
failure.
2009-12-16 17:10:15 +01:00
Max Kellermann
0bc8c0c1da
archive_plugin: wrap method calls
...
Make archive_file a "real" struct, extended by all plugins. Add the
plugin pointer to it. Wrap all method calls in functions.
2009-12-16 17:09:58 +01:00
Max Kellermann
74156d5bed
archive_plugin: pass const string to method open()
2009-12-16 17:09:29 +01:00
Max Kellermann
b04adde7ab
archive: added a C header for each plugin
...
Moved the archive plugin "extern" declarations into each plugin
header.
2009-12-16 15:57:16 +01:00
Max Kellermann
3f64ac04b8
archive/bz2: removed the bz2_context typedef
...
Use the raw struct name instead.
2009-12-16 15:56:42 +01:00
Max Kellermann
b009970af7
archive/bz2: renamed archive sources and plugin variables
2009-12-16 15:55:48 +01:00
Max Kellermann
bd97586cc4
archive/iso: renamed plugin to "iso9660"
...
Based on libiso9660.
2009-12-16 15:55:37 +01:00
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
971c9671f6
Makefile.am: link test/run_decoder with timer.c
...
For the fluidsynth plugin.
2009-12-15 23:11:57 +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
81aa58efa8
test/run_input: deinitialize everything after open() error
...
This enables valgrind debugging after an error occurred.
2009-12-15 19:40:47 +01:00
Max Kellermann
83aac2a057
test/run_input: initialize archive plugins
...
Enable archive plugin debugging.
2009-12-15 19:40:14 +01:00