Commit Graph

5102 Commits

Author SHA1 Message Date
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
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 9715218d40 Makefile.am: distribute AudioCompress/config.h
This fixes "make distcheck".
2009-12-15 07:38:30 +01:00
Max Kellermann c0b8c2c73b Makefile.am: install glib_compat.h 2009-12-14 23:26:23 +01:00
Max Kellermann 51d0687377 fixed several gcc warnings on unused debug variables 2009-12-14 23:22:51 +01:00