| Commit message (Collapse) | Author | Files | Lines |
|
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.
|
|
Add a "mode" argument to open_cloexec() instead.
|
|
Added the "fd_util" library, which attempts to use the new thread-safe
Linux system calls pipe2(), accept4() and the options O_CLOEXEC,
SOCK_CLOEXEC. Without these, it falls back to FD_CLOEXEC, which is
not thread safe.
This is particularly important for the "pipe" output plugin (and
others, such as JACK/PulseAudio), because we were heavily leaking file
descriptors to child processes.
|
|
|
|
The mixer core library is now responsible for creating and managing
the mixer object. This removes duplicated code from the output
plugins.
|
|
This patch allows the output plugins to import only mixer_list.h,
instead of the full mixer_api.h (which would expose internal
structures).
|
|
mixer_control.h should provide the functions needed to manipulate a
mixer, without exposing the internal mixer API (which is provided by
mixer_api.h).
|
|
This updates the copyright header to all be the same, which is
pretty much an update of where to mail request for a copy of the GPL
and the years of the MPD project. This also puts all committers under
'The Music Player Project' umbrella. These entries should go
individually in the AUTHORS file, for consistancy.
|
|
The MPD core logs the audio format of all audio outputs. Remove the
duplicate message from the plugins.
|
|
Use GLib's GError library for reporting output device failures.
Note that some init() methods don't clean up properly after a failure,
but that's ok for now, because the MPD core will abort anyway.
|
|
Eliminate one label and a bunch of gotos.
|
|
Use C instead of CPP.
|
|
Return type of oss_find_supported_param(), oss_can_convert() and
oss_find_unsupported_param() should be bool instead of int.
|
|
Convert the num_supported and num_unsupported variables from signed to
unsigned.
|
|
Renamed types, functions and variables.
|
|
audio_output_get_name() has been removed, which was the only function
left in output_api.h. The output plugin doesn't need the audio_output
object at all, remove the parameter from the init() method.
|
|
The meaning of the chunk depends on the audio format; don't suggest a
specific format by declaring the pointer as "char*", pass "void*"
instead.
|
|
The old API required an output plugin to not return until all data
passed to the play() method is consumed. Some output plugins have to
loop to fulfill that requirement, and may block during that. Simplify
these, by letting them consume only part of the buffer: make play()
return the length of the consumed data.
|
|
The output plugin shouldn't know any specifics of the mixer API. Make
it return the mixer object, and let the caller deal with it.
|
|
On some platforms, g_free() must be used for memory allocated by
GLib. This patch intends to correct a lot of occurrences, but is
probably not complete.
|
|
Allocate the mixer object when it is configured.
Merged mixer_configure() into mixer_new(). mixer_new() was quite
useless anyway.
|
|
Don't use statically allocated mixer objects.
|
|
Return the default value in the conf_get_block_*() functions when
param==NULL was passed.
This simplifies a lot of code, because all initialization can be done
in one code path, regardless whether configuration is present.
|
|
All config_get_block_*() functions should accept constant config_param
pointers.
|
|
This replaces lots of getBlockParam() invocations.
|
|
Renamed functions, types, variables.
|
|
It returns bool, not int.
|
|
This patch tryes to introduce pluggable mixer (struct mixer_plugin) along with some basic infrastructure (mixer_* functions). Instance of mixer (struct mixer) is used in
alsa and oss output plugin
|
|
"#ifdef G_BYTE_ORDER == G_BIG_ENDIAN" cannot work, of course.
|
|
|
|
|
|
Use GLib's G_GNUC_UNUSED instead of gcc.h's mpd_unused.
|
|
|
|
|
|
When an output plugin fails to play a chunk, close it. This replaces
various manual close() calls in nearly all plugins.
|
|
Don't return 0/-1 on success/error, but true/false. Instead of int,
use bool for storing flags.
|
|
Don't accept 24 bit audio. Force MPD to use 16 bit if anything other
than 8 or 16 bit is selected.
|
|
Don't compile the sources of disabled output plugins at all.
|
|
Again, no CamelCase in the directory name.
|
|
The OSS constants overflow a signed integer, use unsigned instead.
|
|
C enums are nicer than CPP macros.
|
|
Leftover from the output API changes: oss_open_default() was changed
to return a void*, but it still returned "0" to report success.
Report the OssData pointer instead.
|
|
This replaces the separate properties channels, sampleRate, bits.
|
|
The last bit of CamelCase in audio_format.h. Additionally, rename a
bunch of local variables.
|
|
When there are standardized headers, use these instead of the bloated
os_compat.h.
|
|
The old struct initializers are error prone and don't allow moving
elements around. Since we are going to overhaul some of the APIs
soon, it's easier to have all implementations use C99 initializers.
|
|
Seeing the "mpd_" prefix _everywhere_ is mind-numbing as the
mind needs to retrain itself to skip over the first 4 tokens of
a type to get to its meaning. So avoid having extra characters
on my terminal to make it easier to follow code at 2:30 am in
the morning.
Please report any new issues you may come across on Free
toolchains. I realize how difficult it can be to build/maintain
cross-compiling toolchains and I have no intention of forcing
people to upgrade their toolchains to build mpd.
Tested with gcc 2.95.4 and and gcc 4.3.1 on x86-32.
|
|
We have eliminated direct accesses to the audio_output struct from
the all output plugins. Make it opaque for them, and move its real
declaration to output_internal.h, similar to decoder_internal.h.
Pass the opaque structure to plugin.init() only, which will return the
plugin's data pointer on success, and NULL on failure. This data
pointer will be passed to all other methods instead of the
audio_output struct.
|
|
Since the output plugin returns a value indicating success or error,
we can have the output core code assign the "open" flag.
|
|
Pass the globally configured audio_format as a const pointer to
plugin.init(). plugin.open() gets a writable pointer which contains
the audio_format requested by the plugin. Its initial value is either
the configured audio_format or the input file's audio_format.
|