Re: [Musicpd-dev-team] [pull request] fix buffer and segfault in encoder/shine

2014-01-13 Thread Max Kellermann
On 2014/01/13 21:52, Andrée Ekroth andree.ekr...@gmail.com wrote: Hello, - I have removed the unnecessary buffer we talked about in the IRC. Merged. - I also found a bug in the shine library which I added a workaround for. Basically the encoder can't initialize until MPD

Re: [Musicpd-dev-team] AlsaInputPlugin

2014-01-08 Thread Max Kellermann
On 2014/01/08 14:10, Steven OBrien steven_obri...@yahoo.co.uk wrote: The high CPU load in the Alsa input plugin was caused by a mistake in the alsa software parameters configuration. Clearly I misunderstood what this particular setting was for. The attached patch simply removes the setting of

Re: [Musicpd-dev-team] user documentation for alsa input plugin

2014-01-08 Thread Max Kellermann
On 2014/01/08 22:48, Steven OBrien steven_obri...@yahoo.co.uk wrote: The attached patch adds a simple section to doc/user.xml for the Alsa input plugin Steven Merged. btw. you don't need to write text in your email. Just the patch is enough. If you want to continue contributing to MPD,

Re: [Musicpd-dev-team] AlsaInputPlugin

2014-01-07 Thread Max Kellermann
On 2014/01/07 13:59, Steven OBrien steven_obri...@yahoo.co.uk wrote: Since my last update, I've been thinking that the alsa poll is really just a timer, it fires every time a fixed number of frames have been written to its internal buffer, and as a real-time stream this equates to a fixed

Re: [Musicpd-dev-team] GIT: Account request - DarkFox

2014-01-04 Thread Max Kellermann
On 2014/01/04 14:20, James McGlashan d...@darkfox.id.au wrote: Realname: James McGlashan Email: m...@darkfox.id.au Username: darkfox Projects: MPD, maybe ncmpc SSH-Key FP: ee:fa:8c:17:0a:16:03:ed:17:ad:53:77:df:a7:73:54 http://git.musicpd.org/cgit/darkfox/mpd.git/

Re: [Musicpd-dev-team] New event loop implementation

2014-01-04 Thread Max Kellermann
On 2013/12/02 11:12, Denis Krjuchkov de...@crazydev.net wrote: I've added poll based PollGroup implementation: http://git.musicpd.org/cgit/dk/mpd.git/commit/?id=1df426aa5c571d3d88ecb7bed6b8ed9b32c15e32 After quick testing connecting with client and playing http streams work, however I

Re: [Musicpd-dev-team] S24_3BE

2013-12-19 Thread Max Kellermann
On 2013/12/19 19:21, hiro 23h...@gmail.com wrote: mpd (MPD: Music Player Daemon) 0.16.7 We can stop here. This version is so old, I don't support it. Even for the 0.16 branch, this is not the newest bugfix release. --

Re: [Musicpd-dev-team] UPnP db plugin

2013-12-18 Thread Max Kellermann
On 2013/12/18 10:02, j...@dockes.org wrote: +static const string rootid(0); Using std::string here is useless bloat, isn't it? There's much more of this useless bloat in your code. I do not think that this is useless bloat, except if you consider that std::string is useless bloat

Re: [Musicpd-dev-team] UPnP db plugin

2013-12-18 Thread Max Kellermann
On 2013/12/18 14:43, j...@dockes.org wrote: Please delete my repository from the musicpd site, Done. I've also deleted your Mantis account, and I'll disable your mailing list subscription. Please do not bother me again after calling me a liar.

Re: [Musicpd-dev-team] S24_3BE

2013-12-18 Thread Max Kellermann
On 2013/12/18 22:21, hiro 23h...@gmail.com wrote: I had been using mpd with a S24_3LE soundcard in the past, now I setup another system and I would need to use S24_3BE, not LE. But whatever settings I make I only get static unless I make alsa do the conversion job (plughw) Is this

Re: [Musicpd-dev-team] UPnP db plugin

2013-12-17 Thread Max Kellermann
On 2013/12/17 18:08, j...@dockes.org wrote: Max Kellermann writes: I see many bug fix commit, which fix bugs introduced earlier by yourself. This is confusing to read, and makes the repository hard to bisect. Please fold those into the commit that introduced the bug. Ok, then, I've

[Musicpd-dev-team] --disable-glib

2013-12-15 Thread Max Kellermann
There is now a configure option called --disable-glib. No, unfortunately it doesn't work yet, but I'll use it to track TODOs on our way to eliminate GLib. The following 23 files still reference GLib (only listing those that cannot be disabled by other compile-time options): src/Page.cxx

Re: [Musicpd-dev-team] FS improvements + refinements in PollGroupWinSelect

2013-12-05 Thread Max Kellermann
On 2013/12/05 17:10, Ben Boeckel maths...@gmail.com wrote: On Thu, Dec 05, 2013 at 19:17:56 +0600, Denis Krjuchkov wrote: g_get_home_dir() works differently depending on GLib version. Newer GLib versions check $HOME first and if it's empty use getpwnam_r() to obtain home directory for

Re: [Musicpd-dev-team] FS improvements + refinements in PollGroupWinSelect

2013-12-04 Thread Max Kellermann
On 2013/12/04 09:51, Denis Krjuchkov de...@crazydev.net wrote: I'm going to replace remaing GLib path management functions. However I have some thoughts at first: I think PathTraits type could be split into two types. One for native paths and one for UTF-8 paths. They could have similar

Re: [Musicpd-dev-team] FS improvements + refinements in PollGroupWinSelect

2013-12-03 Thread Max Kellermann
On 2013/12/03 09:58, Denis Krjuchkov de...@crazydev.net wrote: I think you're right. Pushed a fix for that. Merged. -- Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a

Re: [Musicpd-dev-team] New event loop implementation

2013-12-02 Thread Max Kellermann
On 2013/12/02 11:12, Denis Krjuchkov de...@crazydev.net wrote: I've added poll based PollGroup implementation: http://git.musicpd.org/cgit/dk/mpd.git/commit/?id=1df426aa5c571d3d88ecb7bed6b8ed9b32c15e32 After quick testing connecting with client and playing http streams work, however I

Re: [Musicpd-dev-team] New event loop implementation

2013-11-29 Thread Max Kellermann
On 2013/11/29 10:40, Denis Krjuchkov de...@crazydev.net wrote: I've added Windows select backend for event loop as well as few fixes. Merged. I like how well the incremental way of doing this works. When you've added the portable poll() implementation, we'll test it, and then we will

Re: [Musicpd-dev-team] New event loop implementation

2013-11-29 Thread Max Kellermann
On 2013/11/29 19:18, Denis Krjuchkov de...@crazydev.net wrote: I'm wondering is there any plan for GLib removal in particular and tasks for new version in general? No, there is no grand plan. Things just happen whenever somebody chooses to spend time on the code ;-) There are quite a few

Re: [Musicpd-dev-team] New event loop implementation

2013-11-28 Thread Max Kellermann
On 2013/11/28 16:30, Denis Krjuchkov de...@crazydev.net wrote: I've added one more patch. This introduces generic poll API as well as implementation for epoll. Merged. -- Rapidly troubleshoot problems before they

Re: [Musicpd-dev-team] New event loop implementation

2013-11-27 Thread Max Kellermann
On 2013/11/27 14:18, Denis Krjuchkov de...@crazydev.net wrote: OK. Do you have any comments on the patch itself? Just read it merged. Looks excellent! -- Rapidly troubleshoot problems before they affect your business.

Re: [Musicpd-dev-team] [PATCH 1/1] fix typo in man page

2013-11-26 Thread Max Kellermann
On 2013/11/26 10:22, Christian Hesse m...@eworm.de wrote: --- doc/mpc.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Merged -- Shape the Mobile Experience: Free Subscription Software experts and developers:

Re: [Musicpd-dev-team] Few more fixes

2013-11-26 Thread Max Kellermann
On 2013/11/26 13:18, Denis Krjuchkov de...@crazydev.net wrote: HttpdOutputPlugin.cxx: fix null pointer dereference Main.cxx: initialize winsock before creating IO thread configure.ac: set VERSION_MINOR to 19 Merged --

Re: [Musicpd-dev-team] New command line parser

2013-11-24 Thread Max Kellermann
On 2013/11/24 12:34, Denis Krjuchkov de...@crazydev.net wrote: this time I'm reworking command line parsing to avoid using g_option stuff. I was wondering whether we should use boost for that. Now you implemented a new parser. Why that?

Re: [Musicpd-dev-team] New command line parser

2013-11-24 Thread Max Kellermann
On 2013/11/24 14:08, Denis Krjuchkov de...@crazydev.net wrote: 24.11.2013 18:38, Max Kellermann ??: I was wondering whether we should use boost for that. Now you implemented a new parser. Why that? Why not? Probably for the complex cases it's better to use a library* but MPD

Re: [Musicpd-dev-team] New event loop implementation

2013-11-24 Thread Max Kellermann
On 2013/11/19 13:12, Denis Krjuchkov de...@crazydev.net wrote: I'm trying to implement new event loop for MPD without GLib (or any other library). It's borrowed from existing epoll-based event loop. I only abstracted API differences behind general inteface (PollGroup class). Currently there

Re: [Musicpd-dev-team] Using MPD to play music from an UPnP Media Server

2013-11-04 Thread Max Kellermann
On 2013/11/02 16:11, j...@dockes.org wrote: Hi, I have uploaded the code for a UPnP Database plugin to git://git.musicpd.org/medoc/mpd.git One more thing, I had a very quick look at the first commit that adds code: you added a copy of libexpat. Why that? Why not link this library, like

Re: [Musicpd-dev-team] Using MPD to play music from an UPnP Media Server

2013-11-04 Thread Max Kellermann
On 2013/11/04 19:02, j...@dockes.org wrote: I wanted to separate the commit that modified existing mpd files from the commits that added new code. I don't follow this argument. Adding a new source code file and registering it in Makefile.am belongs together, that's an operation that cannot be

Re: [Musicpd-dev-team] Using MPD to play music from an UPnP Media Server

2013-11-04 Thread Max Kellermann
On 2013/11/04 19:33, j...@dockes.org wrote: - If nobody is interested in actually trying out the function (as seems to be the case), the merge won't be a concern :) I can't - I have no UPnP hardware. Therefore, I have exactly zero personal interest in the feature ;-)

Re: [Musicpd-dev-team] Custom music tags can now be entered into wavpack (ape) files but how to i get my db to update?

2013-11-02 Thread Max Kellermann
On 2013/11/02 00:02, Bearcat M. ??ándor bear...@feline-soul.com wrote: Folks, Recently bug 3843 ( http://bugs.musicpd.org/view.php?id=3843 ) was resolved as fixed. If i want to take advantage of this, what do i need to do? You need to read the protocol documentation. Since this is the

Re: [Musicpd-dev-team] Request for git account

2013-10-31 Thread Max Kellermann
On 2013/10/31 09:54, Rafi B. justr...@gmail.com wrote: Name: Rafael Bodill Email: justr...@gmail.com Username: rafi Projects: gmpc, libmpd Public key attached, thanks! :) http://git.musicpd.org/cgit/rafi/gmpc.git/ http://git.musicpd.org/cgit/rafi/libmpd.git/

Re: [Musicpd-dev-team] ProxyDatabase plugin

2013-10-20 Thread Max Kellermann
On 2013/10/20 20:11, Jean-Francois Dockes j...@dockes.org wrote: The thing that made me believe this is the recursive field of the selection parameter to Visit, and the fact that the existing implementation in ProxyDatabasePlugin.cxx was recursive. Actually, recursive does not mean the

Re: [Musicpd-dev-team] Tags in OGG httpd stream

2013-10-19 Thread Max Kellermann
On 2013/10/11 05:12, Ben Boeckel maths...@gmail.com wrote: the tag chunk is dropped because chunk-length is 0 for it. A patch which fixes the issue is attached. Merged, thanks. Sorry for letting you wait for so long.

Re: [Musicpd-dev-team] ProxyDatabase plugin

2013-10-19 Thread Max Kellermann
On 2013/10/11 16:26, j...@dockes.org wrote: Hi, I have fleshed out the code inside ProxyDatabasePlugin.cpp so that it now works. Your patch is hard to read because it's all in one big undocumented chunk. Please split the patch into smaller pieces and document the API changes.

Re: [Musicpd-dev-team] YouTube support plugin

2013-10-19 Thread Max Kellermann
On 2013/10/12 16:38, Oleg Omelyusik oleg.omelyu...@gmail.com wrote: Hello everyone, I've started implementing YouTube (and maybe some other same services in future) support plugin. (I saw feature request on MPD's bugtracker which were submitted a year ago

Re: [Musicpd-dev-team] [PATCH 1/2] ConfigData: Add support for signed integers

2013-10-19 Thread Max Kellermann
On 2013/10/19 15:38, Sebastian Thorarensen se...@naju.se wrote: +unsigned +block_param::GetUnsignedValue() const +{ + long value2 = GetIntValue(); This explicitly limits the range of unsigned integers to 2^31. Why that? I admit that the existing code is bad as well, by using strtol()

Re: [Musicpd-dev-team] [PATCH] decoder/mikmod: Add loop configuration parameter

2013-10-18 Thread Max Kellermann
On 2013/10/18 04:12, Sebastian Thorarensen se...@naju.se wrote: Hi, This patch allows the user to configure the mikmod decoder plugin to loop modules. It adds a configuration parameter to the mikmod decoder called loop which can be no (the old behaviour, default) or yes to allow modules to

Re: [Musicpd-dev-team] Segmentation fault in master/HEAD when launching mpd --no-config

2013-09-26 Thread Max Kellermann
On 2013/09/26 17:19, Jean-Baptiste Denis j...@jbdenis.net wrote: Hello, I was playing with the last git version of mpd when I encountered a segfault simply by lauching : mpd --no-config The problem seems to be the dereference of the param variable in the DatabaseGlobalInit function call

Re: [Musicpd-dev-team] 24 bit output from mp4ff and mpg123 plugins

2013-09-12 Thread Max Kellermann
On 2013/09/12 07:37, Ian Scott i...@polpo.org wrote: I've (trivially) patched the mp4ff plugin to provide 24 bit output. Also, libmpg123 is also capable of 24 bit output so that plugin could also be patched as well. Is this something that would suitable for general use? I have noticed that

Re: [Musicpd-dev-team] tilde paths in config file

2013-09-12 Thread Max Kellermann
On 2013/09/05 21:01, Maarten de Vries maar...@de-vri.es wrote: While patching this in, I also noticed that tilde paths weren't properly parsed in the latest git version. For example: `~/.mpd/database' became `/home/maarten/~/.mpd/database'. I also fixed that by mostly replacing the old

Re: [Musicpd-dev-team] Remove duplicate optimisation for volume

2013-08-16 Thread Max Kellermann
On 2013/08/16 12:27, Matthias Larisch m...@matthias-larisch.de wrote: While I agree on the second case we save one memcpy on the first case. You got it, and that's the reason we have a similar optimisation in two code locations. The two optimisations are not equivalent and neither can be

Re: [Musicpd-dev-team] [PATCH] Fix build with FFmpeg 2.0.

2013-08-07 Thread Max Kellermann
On 2013/08/07 13:48, Alexis Ballier aball...@gentoo.org wrote: not much more than the current code that does it for each packet (there's usually only one frame per packet) The difference is: it's allocated on the stack currently. The computational cost of a stack allocation is negligible, and

Re: [Musicpd-dev-team] MPD website unreachable?

2013-07-04 Thread Max Kellermann
On 2013/07/04 14:59, zw g pekingmas...@gmail.com wrote: Dear List, From here China, i can access the official website of MPD at: http://www.musicpd.org/ There has been a massive amount of spam from China and Taiwan in the past few days, and our admin took a very desperate measure and

Re: [Musicpd-dev-team] aMPD: MPD on android

2013-07-03 Thread Max Kellermann
On 2013/07/03 17:47, Thomas Guillem thomas.guil...@gmail.com wrote: I dropped my finish() patches by error (a wrong git stash clear) when I decided to use the easy way. If you want, I can have a closer look but maybe I should wait for your port to C++, no ? MPD is already ported to C++, most

Re: [Musicpd-dev-team] development: master or v0.17.x

2013-06-25 Thread Max Kellermann
On 2013/06/25 16:27, jsai...@cs.brown.edu wrote: I've been poking around with adding some features to mpd. (In particular, allocating the queue dynamically, instead of statically allocating O(max_playlist_length) memory.) Are you sure this is really better? I mean, seriously? Dynamic

Re: [Musicpd-dev-team] NULL pointer vs bool false confusion

2013-06-24 Thread Max Kellermann
On 2013/05/27 19:37, Matthias Drochner m.droch...@fz-juelich.de wrote: there are some places in the mpd-0.17.4 sources where a false is used instead of a NULL pointer. See the attached patches. Good catch, merged. --

Re: [Musicpd-dev-team] [patch] allow custom cookie path for pulse outputs

2013-06-24 Thread Max Kellermann
On 2013/06/19 23:54, Alexander Sulfrian alexan...@sulfrian.net wrote: I created a patch to specify a custom cookie path for a pulse output. If you have multiple pulse outputs it could be difficult to synchronize all the pulse cookies. The whole point of your patch is to have multiple pulse

Re: [Musicpd-dev-team] [PATCH] fix overwriting bitrate with signal type

2013-06-24 Thread Max Kellermann
On 2013/06/19 10:53, Matthias Larisch m...@matthias-larisch.de wrote: I recently opened a bug: http://bugs.musicpd.org/view.php?id=3787 The main problem is that opus encoder config for signal overwrote bitrate setting. Appended patch fixes that. Merged.

Re: [Musicpd-dev-team] [PATH] Prevent mpd from hanging while playing DSDIFF files

2013-06-24 Thread Max Kellermann
On 2013/04/29 13:53, Jurgen Kramer gtmkra...@xs4all.nl wrote: This patch prevents MPD from hanging when playing a DSDIFF file which has a DSD data chunk size not dividable by 4. http://git.musicpd.org/cgit/gtmkramer/mpd.git/commit/?id=e396f7f649cfd10ac2b0939f4eb98c4d5048d9c7 This issue

Re: [Musicpd-dev-team] Various improvements for master branch

2013-06-24 Thread Max Kellermann
On 2013/05/12 19:15, Denis Krjuchkov de...@crazydev.net wrote: Also added two changes with C++ conversion: All merged, thanks. -- This SF.net email is sponsored by Windows: Build for Windows Store.

Re: [Musicpd-dev-team] [patch] allow custom cookie path for pulse outputs

2013-06-24 Thread Max Kellermann
On 2013/06/24 18:35, Alexander Sulfrian alexan...@sulfrian.net wrote: oh thats true. Maybe we want simply lock this region. I reworked the patch and add a static Mutex to the PulseOutput struct. So that the lock should affect all pulse outputs but nothing else. That's even worse: if one Pulse

Re: [Musicpd-dev-team] Pull request: Pipe Output Plugin: Pass environment variables to the pcm stream

2013-04-13 Thread Max Kellermann
On 2013/04/13 03:49, Mark m...@iinet.net.au wrote: Also, your code sets environment variables in the MPD process, but this should better be limited to the new child process only. work in progress Ok, tell me when you're done. Keep in mind that refactoring should be a separate commit.

Re: [Musicpd-dev-team] Pull request: Pipe Output Plugin: Pass environment variables to the pcm stream

2013-04-12 Thread Max Kellermann
On 2013/04/12 10:00, Mark m...@iinet.net.au wrote: Passes 3 environment variables (channels, bits, rate) to stdout for use by the next process in the pipe (eg SoX). Please pull: git://git.musicpd.org/quad/mpd.git master Identation uses spaces instead of tabs, please fix. Why these

Re: [Musicpd-dev-team] AArch64 support

2013-04-09 Thread Max Kellermann
On 2013/03/23 08:14, Jamie Nguyen j...@jamielinux.com wrote: Hi, Some of us at Fedora are working hard on 64 bit ARM support. I noticed that you currently use autoconf 2.68. Support for AArch64 was introduced in autoconf 2.69, so would it be possible for you to migrate from to 2.69? That

Re: [Musicpd-dev-team] [PATCH] fix broken --disable-documentation in configure.ac

2013-04-06 Thread Max Kellermann
On 2013/03/31 22:28, Zoltan Gyarmati mr.zoltan.gyarm...@gmail.com wrote: Hi Max, when building libmpdclient with --disable-documentation, the configure script fails: Merged, thanks. -- Minimize network downtime and

Re: [Musicpd-dev-team] Request for git account

2013-04-05 Thread Max Kellermann
On 2013/03/28 23:36, Mark m...@iinet.net.au wrote: 1. real name: Mark Bayley 2. email: m...@iinet.net.au 3. user name: quad 4. Project: MPD 5. SSH key attached http://git.musicpd.org/cgit/quad/mpd.git/ Sorry for the delay - I was on vacation.

Re: [Musicpd-dev-team] [PATCH 1/3] ffmpeg decoder plugin: refactor the decoding functions

2013-04-05 Thread Max Kellermann
On 2013/03/27 17:38, Anton Khirnov an...@khirnov.net wrote: Move some variables shared between multiple functions to a struct so the functions don't need too many parameters. Move initializing the decoder into a separate function to improve readability and reduce cleanup code duplication.

Re: [Musicpd-dev-team] [PATCH] ffmpeg decoder plugin: do not allocate an AVFrame on stack.

2013-04-05 Thread Max Kellermann
On 2013/03/22 07:05, Anton Khirnov an...@khirnov.net wrote: AVFrame must be allocated with avcodec_alloc_frame(). Merged, and backported to v0.17.x. -- Minimize network downtime and maximize team effectiveness. Reduce

Re: [Musicpd-dev-team] Compilation for embedded devices

2013-02-27 Thread Max Kellermann
On 2013/02/24 18:33, H. Fritsch fritsc...@in.tum.de wrote: Hi, I tried to compile mpd for some embedded devices (Fritz-Box/Freetz and Android) and ran into some problems which I had to fix. Have a look at https://github.com/rumpeltux/mpd/commits/android if you???re interested or feel free

Re: [Musicpd-dev-team] Compilation for embedded devices

2013-02-27 Thread Max Kellermann
On 2013/02/27 21:32, H. Fritsch fritsc...@in.tum.de wrote: The signalhandlers: apparently there are some non-windows systems that don't know about struct sigaction, that?s why I modified the detection there (from sigaction(2) manpage): Which ones? Are they relevant for MPD? These are

Re: [Musicpd-dev-team] MPD crash in memory constrained embedded system

2013-02-08 Thread Max Kellermann
On 2013/02/08 17:12, Timur Aydin t...@taydin.org wrote: So my question is, how does MPD do the indexing of the database? Does it build the entire index in memory and saves the index after finishing? Yes. -- Free

Re: [Musicpd-dev-team] Build failure again

2013-01-28 Thread Max Kellermann
On 2013/01/28 15:31, Alexander Sack pisym...@gmail.com wrote: In file included from src/decoder/mp4ff_decoder_plugin.c:29:0: /opt/local/include/faad.h:32:9: note: #pragma message: please update faad2 include filename and function names! src/decoder/mp4ff_decoder_plugin.c: In function

Re: [Musicpd-dev-team] Connection issues with master

2013-01-27 Thread Max Kellermann
On 2013/01/27 08:56, Denis Krjuchkov de...@crazydev.net wrote: I've made improvements to the code and documentation. Also there is one more patch. Please take a look. I've merged the first two. I stopped at the MPD_PATH_MAX_UTF8 definition because I could not see an explanation for the value.

Re: [Musicpd-dev-team] Connection issues with master

2013-01-27 Thread Max Kellermann
On 2013/01/27 17:38, Denis Krjuchkov de...@crazydev.net wrote: 27.01.2013 22:18, Max Kellermann ??: I've merged the first two. I stopped at the MPD_PATH_MAX_UTF8 definition because I could not see an explanation for the value. What is this worst case that requires 4*MPD_PATH_MAX

Re: [Musicpd-dev-team] Connection issues with master

2013-01-25 Thread Max Kellermann
On 2013/01/24 21:38, Denis Krjuchkov de...@crazydev.net wrote: I've prepared few more patches with Path class migration. Path: ToUTF() returns std::string removes the ability for the caller to check for errors. Maybe checking for an empty string might work, as paths may be expected to be

Re: [Musicpd-dev-team] FileSystem: new library for Path-friendly file system routines

2013-01-21 Thread Max Kellermann
On 2013/01/21 19:51, Denis Krjuchkov de...@crazydev.net wrote: 22.01.2013 0:45, Max Kellermann ??: This gives me a warning on WIN32: No problem, I'll redo the patch. Anything else? No, patch looks good, I didn't check the second one yet

Re: [Musicpd-dev-team] FileSystem: new library for Path-friendly file system routines

2013-01-21 Thread Max Kellermann
On 2013/01/21 20:00, Denis Krjuchkov de...@crazydev.net wrote: Some headers are defined via mpd_headers, some via src_mpd_SOURCES. At the moment I'm trying not move them between these variable. What should I do? mpd_headers is old cruft, don't use it. I could merge mpd_headers into

Re: [Musicpd-dev-team] FileSystem: new library for Path-friendly file system routines

2013-01-21 Thread Max Kellermann
On 2013/01/21 20:13, Denis Krjuchkov de...@crazydev.net wrote: I've pushed the fixed version. First patch merged. Second patch is broken because test_DumpDatabase_SOURCES still contains the old src/Path.cxx. I guess we could move those src/fs/ sources to another static library, let's say

Re: [Musicpd-dev-team] UTF-8 file names support for Windows

2013-01-20 Thread Max Kellermann
On 2013/01/19 07:33, Denis Krjuchkov de...@crazydev.net wrote: Important thing for wrappers is error management: errno might be messed in between because constructing Path might change it. What are options here? Path::Null() does not modify errno. And Path::Null() shall be returned on error.

Re: [Musicpd-dev-team] UTF-8 file names support for Windows

2013-01-20 Thread Max Kellermann
On 2013/01/19 13:09, Denis Krjuchkov de...@crazydev.net wrote: I've played a bit with the code. It seems convenient to change Path::ToUTF8() to return std::string. I'd like to not introduce something like PathUTF8 class and use standard types where applicable. Agree. * We could predict

Re: [Musicpd-dev-team] FileSystem: new library for Path-friendly file system routines

2013-01-20 Thread Max Kellermann
On 2013/01/20 14:10, Denis Krjuchkov de...@crazydev.net wrote: Pushed slightly improved version: http://git.musicpd.org/cgit/dk/mpd.git/commit/?id=e6ed592b8aeb5025be0893ee99ff44e46a9ffd1c Thanks, that looks like a good start, I have merged it. What I don't like: - FileSystem.hxx includes

Re: [Musicpd-dev-team] FileSystem: new library for Path-friendly file system routines

2013-01-20 Thread Max Kellermann
On 2013/01/20 17:24, Ben Boeckel maths...@gmail.com wrote: On Sun, Jan 20, 2013 at 17:14:12 +0100, Max Kellermann wrote: - slightly disagree with Ben (but thanks for pointing out that potential problem): there should be some way to specify whether symbolic links shall be followed. Some

Re: [Musicpd-dev-team] UTF-8 file names support for Windows

2013-01-18 Thread Max Kellermann
On 2013/01/18 12:30, Denis Krjuchkov de...@crazydev.net wrote: OK. Just let me know if you're willing to adopt this approach. If not I'll think about other possible solutions for improving Unicode support on Windows port. I'm ok with it. Please review my patch, and if you think it's correct,

Re: [Musicpd-dev-team] UTF-8 file names support for Windows

2013-01-18 Thread Max Kellermann
On 2013/01/18 12:30, Denis Krjuchkov de...@crazydev.net wrote: 17.01.2013 19:08, Max Kellermann ??: I'm not sure. This missed chance for optimization is annoying, but the advantages may outweigh that. OK. Just let me know if you're willing to adopt this approach. If not I'll think

Re: [Musicpd-dev-team] UTF-8 file names support for Windows

2013-01-17 Thread Max Kellermann
On 2013/01/17 13:34, Denis Krjuchkov de...@crazydev.net wrote: 17.01.2013 16:40, Max Kellermann ??: Unfortunately, this means that a Path instance can never be passed in a register, it must always go the round-trip to memory and back. This adds overhead. Admittedly not much

Re: [Musicpd-dev-team] UTF-8 file names support for Windows

2013-01-16 Thread Max Kellermann
On 2013/01/16 11:42, Denis Krjuchkov de...@crazydev.net wrote: Some bonus thoughts: What if we start from different side and implement a wrapper (i.e. class FileName) that encapsulates actual file name string (no matter how it is stored internally)? What kind of path name would this class

Re: [Musicpd-dev-team] UTF-8 file names support for Windows

2013-01-16 Thread Max Kellermann
On 2013/01/16 12:19, Denis Krjuchkov de...@crazydev.net wrote: 16.01.2013 17:00, Max Kellermann ??: What kind of path name would this class represent - MPD's internal path names (always narrow), or the external OS path names (sometimes wide)? This would contain OS path names. Which

Re: [Musicpd-dev-team] UTF-8 file names support for Windows

2013-01-16 Thread Max Kellermann
On 2013/01/16 12:59, Denis Krjuchkov de...@crazydev.net wrote: Well, I think this would not be significantly different from current situation. If I'm understanding right mapper layer anyway allocates memory for transitions between internal UTF-8 and file system encoding. Even if file system

Re: [Musicpd-dev-team] UTF-8 file names support for Windows

2013-01-16 Thread Max Kellermann
On 2013/01/16 13:42, Denis Krjuchkov de...@crazydev.net wrote: 16.01.2013 18:25, Max Kellermann ??: It doubles the overhead. Could you provide an example? I can't really imagine how this doubles overhead. First you map UTF-8 to filesystem path (e.g. via map_uri_fs()), which

Re: [Musicpd-dev-team] UTF-8 file names support for Windows

2013-01-16 Thread Max Kellermann
On 2013/01/16 14:42, Denis Krjuchkov de...@crazydev.net wrote: What would map_uri_fs() look like? We are gived UTF-8 URI and need to return std::string-based type. First we call character conversion routine. This allocates some memory. Then we copy the result to our std::string-wrapper (aka

Re: [Musicpd-dev-team] Pull request for ticket #3650

2013-01-16 Thread Max Kellermann
On 2013/01/16 19:15, Brice Jaglin bjag...@gmail.com wrote: Hi, I filed an issue earlier today, but after digging-in into the code, I figured out an easy fix myself and just pushed it to a github clone. https://github.com/bjaglin/mpd/commit/a84774fd46e4f3b6147bfd3d19ff4841bde8c98d Merged,

Re: [Musicpd-dev-team] UTF-8 file names support for Windows

2013-01-15 Thread Max Kellermann
On 2013/01/15 18:21, Denis Krjuchkov de...@crazydev.net wrote: I've proposed this feature some years ago. Finally got some passion to implement it. Here is the short story: Windows supports Unicode via UTF-16 (wchar_t), MPD handles file names as char* strings. What is really the problem

Re: [Musicpd-dev-team] UTF-8 file names support for Windows

2013-01-15 Thread Max Kellermann
On 2013/01/15 21:13, Denis Krjuchkov de...@crazydev.net wrote: 16.01.2013 2:05, Max Kellermann ??: Is the problem that the native 8 bit charset is not capable of representing all possible wchar_t file names? If that's the case, then I guess we should be using TCHAR. Yes

Re: [Musicpd-dev-team] UTF-8 file names support for Windows

2013-01-15 Thread Max Kellermann
On 2013/01/15 21:55, Denis Krjuchkov de...@crazydev.net wrote: 16.01.2013 2:38, Max Kellermann ??: Hm, ok, I think wrapping everything in our own functions is not exactly the most beautiful solution, but will do. (It creates a third character set: UTF-8 for data/protocol strings

Re: [Musicpd-dev-team] Some more fixes for master branch

2013-01-13 Thread Max Kellermann
On 2013/01/13 10:39, Denis Krjuchkov de...@crazydev.net wrote: Hi all, Win32Main.cxx: more clean shutdown WakeFD.cxx: use two sockets instead of pipe on Win32 ClientList.cxx: copy client list before iterating The last is merely a quick fix to allow further development. Probably some

Re: [Musicpd-dev-team] Provide fall-back strndup() implementation

2013-01-11 Thread Max Kellermann
On 2013/01/11 09:04, Denis Krjuchkov de...@crazydev.net wrote: DatabaseLock.cxx defines global db_mutex which could not be used before GLib threading routines are initialized in main(). I don't understand. It's not a GLib mutex! What's wrong with it?

Re: [Musicpd-dev-team] Provide fall-back strndup() implementation

2013-01-11 Thread Max Kellermann
On 2013/01/11 09:31, Denis Krjuchkov de...@crazydev.net wrote: 11.01.2013 14:25, Max Kellermann ??: I don't understand. It's not a GLib mutex! What's wrong with it? I'm trying Windows port which uses GLib mutex/condvar. Those don't work until g_thread_init() is called. Oops. Yes

Re: [Musicpd-dev-team] Improve configuration status results

2013-01-10 Thread Max Kellermann
On 2013/01/10 09:54, Denis Krjuchkov de...@crazydev.net wrote: One more minor fix. This time it's against master branch. I've added some missing libraries. Also Opus codec had different names in encoder and decoder sections. Now it's consistently named Opus. Merged, thanks.

Re: [Musicpd-dev-team] Using GLib for threading primitives on Windows?

2013-01-10 Thread Max Kellermann
On 2013/01/10 11:06, Denis Krjuchkov de...@crazydev.net wrote: As I've saw in git MPD is still going to use GLib's mutex/condvar implementations for Windows. Actually, I'd love to use std::mutex et al, but that's not available on the mingw-w64 version shipped in Debian. I could try a newer

Re: [Musicpd-dev-team] Using GLib for threading primitives on Windows?

2013-01-10 Thread Max Kellermann
On 2013/01/10 11:43, Denis Krjuchkov de...@crazydev.net wrote: This might be a good idea since Vista provides other useful APIs. I don't care much about Windows. For many years, I was careful about requiring Vista+, because I thought many users were still happy with XP, and I did not want to

Re: [Musicpd-dev-team] Using GLib for threading primitives on Windows?

2013-01-10 Thread Max Kellermann
On 2013/01/10 11:52, Max Kellermann m...@duempel.org wrote: Which mingw32-runtime version is that? I have 3.13-1, and it does not provide CONDITION_VARIABLE. Oh, I was looking at the wrong directory. Should be mingw-w64-i686-dev, and indeed CONDITION_VARIABLE can be found

Re: [Musicpd-dev-team] Using GLib for threading primitives on Windows?

2013-01-10 Thread Max Kellermann
On 2013/01/10 12:13, Denis Krjuchkov de...@crazydev.net wrote: Probably separate socket pair could be used instead of pipe. This would at least eliminate extra-thread. Why not. Good luck I factored out that code into the class WakeFD (for adding Linux's eventfd()). We can now easily exchange

Re: [Musicpd-dev-team] Using GLib for threading primitives on Windows?

2013-01-10 Thread Max Kellermann
On 2013/01/10 12:24, Denis Krjuchkov de...@crazydev.net wrote: Last time I saw it MPD used int type for sockets. Windows API actually defines a SOCKET type which a typedef for UINT_PTR. WTF? From my observations socket handles grow sequentially from small numbers to higher. This makes error

Re: [Musicpd-dev-team] Using GLib for threading primitives on Windows?

2013-01-10 Thread Max Kellermann
On 2013/01/10 12:32, Denis Krjuchkov de...@crazydev.net wrote: Was it meant to be g_strndup()? mingw lacks strndup() at the moment. Actually, I wanted to avoid using GLib in new code. Since strndup() is a standard API, not a GNU extension, I presumed it was safe to use..

Re: [Musicpd-dev-team] Using GLib for threading primitives on Windows?

2013-01-10 Thread Max Kellermann
On 2013/01/10 13:06, Denis Krjuchkov de...@crazydev.net wrote: So practically this requires adding one more function for each function that deal with sockets? Yes. That's three: mpd_async_new(), mpd_async_get_fd() and mpd_connection_get_fd(). If new functions would be implemented as

Re: [Musicpd-dev-team] Using GLib for threading primitives on Windows?

2013-01-10 Thread Max Kellermann
On 2013/01/10 13:24, Denis Krjuchkov de...@crazydev.net wrote: Could the suffix be something like _win32_socket instead of _SOCKET which is ugly and anyway does not clarify what it's for? Yes. That was just a quick example. This is truly crap, and I'm not even sure this is worth fixing. If

Re: [Musicpd-dev-team] Using GLib for threading primitives on Windows?

2013-01-10 Thread Max Kellermann
On 2013/01/10 13:32, Denis Krjuchkov de...@crazydev.net wrote: GLib uses different approach as you know. They provide separate APIs for dealing with sockets for Unix and Windows. This requires user to write several #ifdef's but makes things clear. Couldn't we consider similar approach?

Re: [Musicpd-dev-team] Minor fixes: improve libgme detection + add missing file in dist

2013-01-09 Thread Max Kellermann
On 2013/01/09 09:38, Denis Krjuchkov de...@crazydev.net wrote: That's it. Patches are submitted via git: Merged, thanks. -- Master Java SE, Java EE, Eclipse, Spring, Hibernate, JavaScript, jQuery and much more. Keep

Re: [Musicpd-dev-team] audio format information timing with idle

2013-01-07 Thread Max Kellermann
On 2013/01/07 14:11, Timur Aydin t...@taydin.org wrote: Hi, I have an application that listens to mpd status changes using idle and writes the current mpd status onto a hardware display. After issuing a play command, mpd immediately notifies the player status change. At that point, I read the

Re: [Musicpd-dev-team] audio format information timing with idle

2013-01-07 Thread Max Kellermann
On 2013/01/07 21:00, Timur Aydin t...@taydin.org wrote: Actually, both of these statuses are valid and valuable. The first can be interpreted and displayed as a buffering... and the second can be displayed as playing. So it seems it would be better if we add a new player state called

Re: [Musicpd-dev-team] Glib warnings

2013-01-02 Thread Max Kellermann
On 2013/01/02 16:31, Alexander Sack pisym...@gmail.com wrote: I started to remove the warnings with a lot of #if conditionals but I was curious if the project plans to move the base version of Glib to 2.32 instead of 2.16? That would at least make the changes to mpd a lot less ugly. But I am

  1   2   3   4   5   >