Commit Graph

497 Commits

Author SHA1 Message Date
Nedko Arnaudov 5c1bde8066 Fix build on less common architectures.
Fixes FTBFS on alpha,armel,ia64,kfreebsd-*,powerpc,sh4.
Origin: Ubuntu, https://launchpad.net/bugs/647091
Bug-Ubuntu: https://launchpad.net/bugs/647091
Bug-Debian: http://bugs.debian.org/620315

Submitted by Alessio Treglia <alessio@debian.org> as
http://git.debian.org/?p=pkg-multimedia/ladish.git;a=blob;f=debian/patches/0001-disable_stacktrace.patch;h=33b6b1b50760f
2011-04-22 04:14:51 +03:00
Nedko Arnaudov 91b87783d7 ladishd: workaround for bug in jack2/jackdbus
http://trac.jackaudio.org/ticket/209
2011-01-02 05:04:29 +02:00
Nedko Arnaudov 891805634d ladishd: better handling for L1 apps with a2j ports. Fix for #62 2011-01-02 04:27:21 +02:00
Nedko Arnaudov d65ebbbf5b daemon: fix typo in doxygen documentation 2010-12-31 19:55:13 +02:00
Nedko Arnaudov d39a94fe33 ladishd: fix hidden connection save. Fix for #151
Instead of checking whether connection ports ares link or system ones,
now they are being checked for being hidden.
2010-12-30 05:14:10 +02:00
Nedko Arnaudov f1d0a2e20b ladishd: when saving xml, don't write the URI_A2J_PORT dict keys
URI_A2J_PORT is set on jack port appear
2010-12-30 02:17:48 +02:00
Nedko Arnaudov 6cb1de6104 when appless ports are reused for appful puposes, set the app uuid. Fixes #160 2010-12-30 01:55:20 +02:00
Nedko Arnaudov 9575aefbb4 URI_CANVAS_A2J renamed to URI_A2J_PORT 2010-12-29 23:43:16 +02:00
Nedko Arnaudov b49d1ef23d ladishd: set a port property that indicating whether the port is a2j one. Partial fix for #154 2010-12-29 23:21:52 +02:00
Nedko Arnaudov 9d0be997ac ladishd: fix for #152 2010-12-28 14:01:56 +02:00
Nedko Arnaudov fb7138915e ladishd: dump params of loaded apps after xml load 2010-12-28 06:57:32 +02:00
Nedko Arnaudov 64a29c2304 ladishd: write vclient app_uuid when saving 2010-12-28 06:51:18 +02:00
Nedko Arnaudov 5288134676 ladishd: save&restore app associations of vclients. Fix for #149 2010-12-28 04:33:44 +02:00
Nedko Arnaudov 918cecca74 ladishd: improve log on save and on graph dump 2010-12-28 04:33:44 +02:00
Nedko Arnaudov da4a6eb2a1 ladishd: save hidden porst of stopped apps. 2010-12-27 15:34:35 +02:00
Nedko Arnaudov 4f7b78388f ladish_control: vgraph connection management. #125 2010-12-27 06:16:10 +02:00
Nedko Arnaudov 53dc55330d ladishd: fix unload of not loaded (just created) projects. Fix for #148 2010-12-27 03:19:10 +02:00
Nedko Arnaudov 9868de418b ladishd: don't save hidden ports of runnings apps 2010-12-27 01:37:14 +02:00
Nedko Arnaudov 25a55f5f3f ladishd: fix jack graph filtering on save 2010-12-27 01:19:19 +02:00
Nedko Arnaudov 1d029ffd76 Move graph iteration filtering to callbacks 2010-12-26 21:21:36 +02:00
Nedko Arnaudov 1f6822c5e9 ladishd: remove skip_hidden parameter of ladish_graph_copy()
ATM ladish_graph_copy() is always copied without skipping hidden elements.
skip_hidden mechanism must be replaced with filtering in callbacks,
because it is tricky and because app filtering does not belong to
generic graph object.
2010-12-26 21:09:42 +02:00
Nedko Arnaudov 846ef1a252 ladishd: dump vgraph of ports 2010-12-26 21:09:42 +02:00
Nedko Arnaudov 6b966841dd ladishd: when saving, properly skip hidden connections just like ports. Fix for #143
this is improvement of 93fe0427c1
2010-12-26 21:09:09 +02:00
Nedko Arnaudov 072bae001a ladishd: make vgraph filtering in interlink_client() actually work 2010-12-25 18:17:19 +02:00
Nedko Arnaudov 6a58ad88a4 ladishd: when interlinking on load, ignore clients of other vgraphs. Fix for #137 2010-12-25 04:36:00 +02:00
Nedko Arnaudov a3956df783 ladishd: send termination signals to firstborn pgrp. Fix for #123
if the pgrp of the first child is different from pgrp of the jack client,
send SIGTERM and SIGKILL to both process groups.

This changeset also switches termination signals send from pid to pgrp
2010-12-25 03:52:39 +02:00
Nedko Arnaudov 5559811205 ladishd: fix occasional crash on app stop (#141)
vgraph clients that are created by a2j port appear and are later
reused for native jack ports are now interlinked with the jack
client when the first jack port appears.
2010-12-25 01:44:55 +02:00
Nedko Arnaudov 93fe0427c1 ladishd: Don't skip hidden a2j ports. Fix for #140 and #130
if the app is stopped, its a2j ports will be hidden; a2j client is not
associated with any app, only a2j ports are.
2010-12-24 17:41:08 +02:00
Nedko Arnaudov df4def70b2 ladishd: data integrity checks 2010-12-23 04:20:52 +02:00
Nedko Arnaudov d4946efe30 gladish: Don't log dbus error when studio is not loaded on gladish start 2010-12-23 02:36:58 +02:00
Nedko Arnaudov 613f73b822 log as error a condition that causes project load failure 2010-12-18 20:34:22 +02:00
Nedko Arnaudov cf12c2e3e0 daemon: fix wrong return value when setting project description or notes 2010-12-07 05:29:20 +02:00
Nedko Arnaudov 68049ee6cb ladishd: don't create two vclients with same name
If the app first creates alsa (a2j) port, the created vclient is
not intrelinked because there is no jack client to interlink.
When the first jack port appears, because the jack client has
no interlinked client, a new vclient with same name was created.

This changeset implements a search by app uuid before new vclient
is created.
2010-12-02 05:40:28 +02:00
Nedko Arnaudov 0a6d73002b daemon: escape client and port names. Fixes #120 2010-12-02 03:06:00 +02:00
Nedko Arnaudov 5bb20eda52 daemon: improve escaping functions 2010-12-02 03:04:14 +02:00
Nedko Arnaudov 8ac048d601 ladishd: don't crash when room link port is not found
User can attempt to load a project into room with fewer ports than the
room where project was saved. This was causing ASSERT:

Wed Dec  1 04:36:45 2010: ERROR: callback_elstart: Cannot find room link port.
Wed Dec  1 04:36:45 2010: ERROR: callback_elend: ASSERT(context_ptr->port != NULL) failed. function callback_elend in ../daemon/room_load.c: 652

This changeset fixes the ASSERT by failing the project load.
2010-12-01 04:42:17 +02:00
Nedko Arnaudov e8f9b6b02e ladishd: Deassociate pids of disappearing clients. Fix for #119 2010-11-30 00:13:11 +02:00
Nedko Arnaudov 416c65254b ladishd: use app name for a2j ports
This fixes handling of apps that use random alsa client names.
jack-rack for example, by default, uses PID as part of its
alsa client name.

This breaks backward compatibility.
2010-11-22 15:25:59 +02:00
Nedko Arnaudov 4248abe1d7 ladishd: fix use of uninitialized var in ladish_app_supervisor_set_project_name() 2010-11-18 05:10:18 +02:00
Nedko Arnaudov dba04d196e ladishd: save/load project description and notes 2010-11-18 05:07:34 +02:00
Nedko Arnaudov 18e317ff4b ladishd: expose project description and notes over D-Bus 2010-11-18 04:34:47 +02:00
Nedko Arnaudov 86ec7c7fbd ladishd: fix memory leak on room destroy 2010-11-18 03:57:31 +02:00
Nedko Arnaudov 99b1ab0da4 ladishd: set env vars for use in commandlines 2010-11-18 02:59:06 +02:00
Nedko Arnaudov c7d0a6a479 ladishd: the reset of the previous commit 2010-11-18 02:26:56 +02:00
Nedko Arnaudov d027731b18 ladishd: start terminal apps through shell
This will allow expansion of env vars used in commandline to happen
when apps are started in terminal. It already happens when apps are
started without terminal.

This breaks the default title, at least for xterm. For it, it is now
set explicitly.

Starting through shell is not used when there is no '$' in the
commandline. This should minimize the title problems when xterm is not
used.
2010-11-18 02:25:20 +02:00
Nedko Arnaudov a88ec8d69f ladishd: project_name -> vgraph_name (in loader module) 2010-11-18 01:48:36 +02:00
Nedko Arnaudov fb15df6218 ladishd: recent list for studios 2010-11-18 00:48:32 +02:00
Nedko Arnaudov 46528c8874 ladishd: dont log error when the recent store does not exist 2010-11-18 00:48:27 +02:00
Nedko Arnaudov 391cc007cd ladishd: Fix include path
it works with waf-1.5.x for unknown reasons. it does not work
with waf-1.6.1
2010-11-14 16:20:16 +02:00
Nedko Arnaudov d9183f0417 ladishd: fix load of project dict 2010-11-14 16:06:51 +02:00
Nedko Arnaudov 1524a3b43f ladishd: Fix some logs (studio->room) 2010-11-14 16:05:17 +02:00
Nedko Arnaudov 9180fa9047 ladishd: clear project even if room project state is 'unloaded'. Fix for #117
This is a workaround (that was implemented before too). The proper way of handling this is to
create 'unnamed project' when a connection or app is added to the room.
2010-11-14 13:08:25 +02:00
Nedko Arnaudov 36370e2942 ladishd: initialize the vclient_name var even when a2j mapping fails 2010-11-14 00:53:53 +02:00
Nedko Arnaudov 3d40386a14 ladishd: on project load, restore connections between room ports. Fix for #117 2010-11-13 18:32:35 +02:00
Nedko Arnaudov 4b9da6ffae ladishd: do a better cleanup on project unload and on load failure. Partial fix for #117
The project state now is can now have more than one state. The project
unload sequence now first removes all connections, then stopps all
apps, and as last step - clears the graph. When project load fails,
ladish_room_unload_project() is not called anymore, because unloading
of room even without apps is now a multistep process. Instead, a new
function, ladish_room_clear_project(), is introduced. It is called
when project load fails and as last step in project unload.
2010-11-13 18:13:10 +02:00
Nedko Arnaudov a99c3e6408 ladishd: remove unneeded asignment
unescape() receives length that includes the terminating nul char
2010-11-13 15:49:38 +02:00
Nedko Arnaudov 0ff72305db ladishd: nul-terminate strings escaped through escape_simple() 2010-11-13 15:00:08 +02:00
Nedko Arnaudov 3752081d1d ladishd: escape project name when composing project dir from it 2010-11-13 14:46:33 +02:00
Nedko Arnaudov 04b2b17e96 ladishd: project name unescaping 2010-11-13 14:02:20 +02:00
Nedko Arnaudov c0240447c1 ladishd: project name escaping 2010-11-12 07:34:31 +02:00
Nedko Arnaudov 5b8fe165d3 ladishd: max_escaped_length() 2010-11-12 07:15:57 +02:00
Nedko Arnaudov a608c373e6 ladishd: properly handle a2j ports for apps with same names
For real jack ports it works because different apps have different jack client.
For a2j ports, it did not work because the jack client is same and the
a2j_fake_jack_port_name is same too, because the instead of alsa client name,
the app name is used now
2010-11-08 02:39:53 +02:00
Nedko Arnaudov ee830a52ee ladishd: actually remove app ports, simply logging does not make it happen 2010-11-08 02:17:39 +02:00
Nedko Arnaudov bea7c694e0 ladishd: when loading project, search (a2j) the jack client before creating one 2010-11-08 02:08:52 +02:00
Nedko Arnaudov 6c2201b933 ladishd: save [only] relevant a2j ports for the vgraph being saved
For studio saves, save only studio vgraph a2j ports.
For room project saves, save only room vgraph a2j ports.
If there is not a2j ports for the vgraph being saved, an empty a2j client will not be saved anymore
2010-11-08 01:19:02 +02:00
Nedko Arnaudov 8aebce6821 ladishd: remove special a2j handling in remove/is_hidden[_app] virtualizer functions
a2j client has not app associated and thus should never be returned by ladish_graph_find_client_by_app()
This was somewhat possible in past, when the client was searched by name and not by uuid.

Also is_empty var is removed for ladish_graph_find_client_by_app(). For ladish_virtualizer_remove_app(),
the is_empty var is kept, because ladish_graph_client_is_empty() cannot be called after the client is removed
from the jack graph.
2010-11-07 23:43:45 +02:00
Nedko Arnaudov eb866bf6e8 ladishd: save additional attributes for graph objects
For clients, save the naming scheme used. sometimes it is useful to maintain the original jack or alsa client name.

For ports, save port type and direction, alsa ports can be bidirectional, this renders as two a2j ports.
2010-11-07 20:59:20 +02:00
Nedko Arnaudov 79c75fd07b ladishd: properly handle stopping and removal of apps with a2j ports 2010-11-07 19:52:08 +02:00
Nedko Arnaudov 7d3acd7331 ladishd: set vgraph for new ports and use it when port disappears or gets renamed 2010-11-07 19:52:08 +02:00
Nedko Arnaudov f3a59a3561 ladishd: detect alsa client of app and use the app name for corresponding vgraph client 2010-11-07 19:51:51 +02:00
Nedko Arnaudov 222dec63f3 ladishd: improved log when searching for graph port by jack id 2010-11-07 16:40:17 +02:00
Nedko Arnaudov 7b1baf033d ladishd: Use app_uuid for identifying appless clients
* normal jack clients have both app_uuid set and non-zero pid
 * jmcore clients have only non-zero pid, their app_uuid is null
 * clients of unmanaged apps (externally started aps, inprocess clients
   and the a2j client) have zero pid and zero app_uuid
2010-11-06 15:34:54 +02:00
Nedko Arnaudov 2eac623818 ladishd: properly handle ports with same uuids but in different room vgraphs. Fixes #115
Same or derivate project can be loaded in more than one room. This will cause more than one port
with given uuid to be added to the jack graph. This changeset uses vgraph-port_uuid pair when searching
for port that was added at earlier project load stage. For this to work, when ports are created and added
to the jack graph, the vgraph handle is stored in the port object.
2010-11-03 00:29:08 +02:00
Nedko Arnaudov 1b66932459 ladishd: properly detect connect failures
This fixes a bug when port is appearing, connect attempt is made,
connect fails because port has just disappeared, port reappears then
but new connect attempt was not made. Happens quite easily with
wineasio apps that "probe" (nuendo2 for example).
2010-11-01 21:28:28 +02:00
Nedko Arnaudov 7d2ebaa433 daemon: run apps with LD_PRELOAD=libalsapid.so 2010-10-31 01:14:14 +03:00
Nedko Arnaudov 698bf81a3b daemon: better handling for non-direct childs. Fixes #62
If the first JACK client that appears has pid different from the one
of the child process, send SIGUSR1 on L1 save to this first
grandchild.

This changeset fixes the "run L1 app in terminal" issue and the
similar issue with dash (the default shell on Debian and Ubuntu, that
for simple commandlines does fork() and exec() instead of just exec(),
like bash does. This changeset also fixes the situation with complex
commandlines that result in only one JACK client.

The complex commandlines that result in multiple processes creating
JACK clients are handled by sending the SIGUSR1 to the first process
that creates JACK client. In future this could be improved by sending
SIGUSR1 to all of them but it is probably better to avoid such
situations by creating one app per JACK-creating process.
2010-10-24 03:03:25 +03:00
Nikita Zlobin 6e2e650bb5 daemon: app_supervisor.c: Include config.h to have _GNU_SOURCE always defined first. Necessary to get working some GNU extensions 2010-10-20 17:48:41 +06:00
Nedko Arnaudov 45c73b34ac Fix path of ladish log file that is announced when error occures 2010-10-19 23:48:21 +03:00
Nedko Arnaudov 3ac3105fdb ladishd: return project name in recent project list 2010-10-09 17:37:57 +03:00
Nedko Arnaudov 78e99c4d64 ladishd: Basic recent projects functionality 2010-10-09 16:53:03 +03:00
Nikita Zlobin 8a19420e9f Fix for bug, where boxes for applications, started by ladish, doesn't present in graph(cherry picked from commit 3da9457b70158ccff58f2f20c8d4565546a6f8c3) 2010-10-02 10:40:32 +03:00
Nedko Arnaudov fcc998e974 ladishd: autorun room apps on studio start. Fixes #101 2010-09-28 02:10:34 +03:00
Nedko Arnaudov 1ee3607bd8 Merge branch 'confd' 2010-09-28 00:21:13 +03:00
Nedko Arnaudov 6c3ef670b6 gladish dialog for ladishd settings 2010-09-28 00:18:44 +03:00
Nedko Arnaudov 4a91f81d4c ladishd settings
* whether to autostart studio on load
 * whether to use notification daemon
 * shell to use
 * terminal to use
2010-09-26 20:08:36 +03:00
Nedko Arnaudov 905ccfbb10 ladishd: remove unused function parameter 2010-09-22 00:29:39 +03:00
Nedko Arnaudov a913255273 ladishd: fix memory corruption bug and some bugs in procfs_get_process_file() 2010-09-21 23:53:23 +03:00
Nedko Arnaudov 3657b68d64 ladishd: fix introspection data for AppSupervisor.IsAppRunning 2010-09-21 23:49:10 +03:00
Nedko Arnaudov ef3a3891db move catdup to common/ 2010-09-19 17:15:11 +03:00
Nedko Arnaudov 979f2190d0 move dirhelpers to common/ 2010-09-19 17:04:14 +03:00
Nedko Arnaudov a9a55b0ddc daemon: refuse to create room with duplicate name. Fix for #106 2010-09-19 03:06:31 +03:00
Nedko Arnaudov 7217c4f3d3 daemon: proper notification on automatic studio creation. Fix for #88 2010-09-18 23:25:20 +03:00
Nedko Arnaudov 4bad0a8038 Properly handle saveas of automatic studios. Fix for #108 2010-09-18 19:30:36 +03:00
Nedko Arnaudov 5b12bd5585 daemon: fix removal of app that was loaded in stopped state
ERROR: ladish_virtualizer_is_hidden_app: Code execution taboo point. function ladish_virtualizer_is_hidden_app in ../daemon/virtualizer.c:1112
2010-09-06 15:16:40 +03:00
Nedko Arnaudov efce106a23 daemon: when unloading remove all app clients
The clear persist approach does not work for stopped apps
because their clients and ports dont disappear during project unload.
2010-09-05 23:08:03 +03:00
Nedko Arnaudov f802bd0402 daemon: Router templates 2010-09-05 03:06:15 +03:00
Nedko Arnaudov 86b174b97a daemon: disable the empty template for now
it is useless until there is a functionality to add new room ports
2010-09-05 03:05:36 +03:00
Nedko Arnaudov ef9e54e3fd daemon: implement deduction of project dir from project name and vice versa 2010-09-05 01:31:22 +03:00
Nedko Arnaudov c5acbafc8f daemon: fix unload of empty projects 2010-09-05 01:27:18 +03:00
Nedko Arnaudov b812ccca67 Display project name string as part of the room view title 2010-09-04 03:19:58 +03:00