Commit Graph

447 Commits

Author SHA1 Message Date
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
Nedko Arnaudov 7a5ba755e9 Add app list version number to the AppStateChanged signal and check it 2010-09-03 01:49:11 +03:00
Nedko Arnaudov 5374af8866 daemon: update app list version when adding and removing apps
gladish now takes it into account and skipped the changes because the version
was not incremented
2010-09-02 21:56:10 +03:00
Nedko Arnaudov 70f2357308 daemon: emit app remove signals before emiting studio disappeared signal 2010-09-01 02:05:48 +03:00
Nedko Arnaudov 1336d624e5 daemon: fix bug in log dump that caused all ports to be marked as "room link" ports 2010-09-01 01:21:34 +03:00
Nedko Arnaudov b251c7afed When saving project, create project directory if it doesn't exist 2010-08-31 04:00:48 +03:00
Nedko Arnaudov 8f20db7de0 on project load adjust canvas positions of capture/playback clients 2010-08-30 04:52:35 +03:00
Nedko Arnaudov fc0a6b14be daemon: move reusable signal emit code for graph objects to dedicated functions 2010-08-30 04:51:31 +03:00
Nedko Arnaudov e06f5b73dd daemon: save connections of stopped apps. #100 2010-08-30 04:14:25 +03:00
Nedko Arnaudov dd822c7476 daemon: fix load of studios with more than one room
The room link ports were searched by uuid gloablly.
When two rooms had same ports uuid, always the first one was found.
Then when setting the graph override uuid for port, the port
override uuid of the second room was set over the port of the first
room. Thus the first room port was getting wrong override uuid and the
second room port override uuid was never set.

The solution implemented is to search for the port within the already
found room client. Then set the override uuid for the found port.

Room client in the studio graph has uuid of the room and is created
when room is loaded. This ensures that later when room-link ports are
added, the port of the right room client will be found. Then the
override uuid will be set to the proper port.
2010-08-30 02:10:26 +03:00
Nedko Arnaudov 252fe2042c daemon: easier enable of find port by uuid debug logs 2010-08-30 01:58:02 +03:00
Nedko Arnaudov ac1de1cc6a daemon: handle rename of apps that have non-unique names 2010-08-30 00:40:17 +03:00
Nedko Arnaudov bbfd70e66d daemon: fix parameter names in function prototypes 2010-08-30 00:08:43 +03:00
Nedko Arnaudov 76a8b6161b daemon: handle apps with same name in different vgraphs 2010-08-30 00:05:57 +03:00
Nedko Arnaudov 1f4af5f439 daemon: better log messages when write() fails 2010-08-30 00:04:21 +03:00
Nedko Arnaudov 09cb302c01 daemon: fix save of studios with rooms 2010-08-29 23:38:46 +03:00
Nedko Arnaudov 6a2a94b996 daemon: notify user on studio save failure 2010-08-29 23:38:04 +03:00
Nedko Arnaudov 2d39e5eab0 daemon: notify user on studio xml parse failure 2010-08-29 23:00:14 +03:00
Nedko Arnaudov ae212a37f2 reopen log file when it is deleted or replaced 2010-08-28 04:35:57 +03:00
Nedko Arnaudov c62d7760b3 Fill the save project as dialog with current project properties 2010-08-23 00:17:57 +03:00
Nedko Arnaudov 1a954de817 daemon: save internal state of L1 apps when project is saved 2010-08-22 23:36:03 +03:00
Nedko Arnaudov 853dbca460 Fix typos in room dbus method descriptions 2010-08-22 21:22:09 +03:00
Nedko Arnaudov b396329c5d daemon: implementation of project load 2010-08-08 23:51:31 +03:00
Nedko Arnaudov 1d908a66d6 daemon: saveable projects 2010-08-06 05:00:04 +03:00
Nedko Arnaudov 17603f246d daemon: make some save functionality reusable
* Helper functions in daemon/save.c will be used in project save functionality as well
 * Graph iteration callbacks now receive the handle of the graph being iterated
 * Indention is now more flexible because now it is not string but an integer
2010-08-06 03:19:23 +03:00
Nedko Arnaudov 60fec2bffa daemon: send notification on studio load failure 2010-08-06 02:14:55 +03:00
Nedko Arnaudov 0017f19ffa SaveProject method of the dbus room object. 2010-08-05 15:47:08 +03:00
Nedko Arnaudov 28f54ff578 Emit signal when command queue execution is halted because of error
This allows a client that waits for studio load/start to stop the wait.
Using a timeout is still good idea because of potential bugs in ladishd.
2010-07-28 17:58:49 +03:00
Nedko Arnaudov 399aaeaaf1 daemon: Fix for #97
Try to supply alternative fake strings if mapping fails
2010-07-23 03:59:12 +03:00
Nedko Arnaudov 9a1015f50f daemon: register studio on dbus before rooms 2010-07-21 06:55:03 +03:00
Nedko Arnaudov 6842854e8c daemon: fix room lifecycle that got slightly broken in previous commit 2010-07-21 06:22:50 +03:00
Nedko Arnaudov 00cc1087dc daemon: load studios with rooms 2010-07-21 05:53:48 +03:00
Nedko Arnaudov 5bb96d51e7 damon: Proper room lifecycle
* Room creation/destruction is now separeted from starting/stopping
   (creating/destroying jmcore links)
 * Rooms can now be created and destryed when studio is stopped
 * Rooms are started/stopped when studio is started/stopped

Apart from better interraction of studio start/stop and room
lifecycles, it is now possible to implement load of studio with rooms
because during studio load rooms have to be created in stopped state
and eventually started only at later stage, during studio start.
2010-07-20 01:31:37 +03:00
Nedko Arnaudov a08831a0ca daemon: early check level validity when new app is being added 2010-06-13 21:34:28 +03:00
Nedko Arnaudov d4f26eea8a daemon: save studio rooms, if any 2010-06-10 03:15:52 +03:00
Nedko Arnaudov 535a28b56b daemon: smarter parsing of studio xml files
* Attribute order is no longer fixed.
 * Unknown attributes should not cause parse failure anymore.
2010-06-08 01:25:20 +03:00
Nedko Arnaudov 366ac2a22b daemon: refuse to save studios with rooms
They are not loadable currently
2010-05-31 00:48:33 +03:00
Nedko Arnaudov c291a60da6 daemon: When saving studio, don't save non-studio jack clients 2010-05-31 00:47:10 +03:00
Nedko Arnaudov 229c4f2c0d daemon: more fixes for #94
* properly handle removal of apps with portless JACK clients
 * properly handle removal of a2j
2010-05-29 23:13:30 +03:00
Nedko Arnaudov 892c22d7ea Properly handle stop of apps with jack clients without ports. Fix for #94 2010-05-29 15:36:53 +03:00
Nedko Arnaudov de47286bbd daemon: Don't display error when graph dict has no value for the requested key
This error is annoying because currently it is logged twice for each new app (x and y keys).
2010-05-29 13:12:19 +03:00
Nedko Arnaudov d5c7bf6a6c Don't send SIGUSR1 to not started L1 apps. Fix for #96
* ensure that kill() is called only from one place and that pid is valid
 * cleanup and extend app_supervisor functions related to sending signals
2010-05-27 02:10:30 +03:00
Nedko Arnaudov 46bcf78914 daemon: fix removing of apps without jack client
see previous commit as well
2010-05-26 00:53:36 +03:00
Nedko Arnaudov 45fc0336c2 daemon: Properly handle apps without JACK clients
Fixes #94
2010-05-26 00:34:20 +03:00
Nedko Arnaudov 2b6505d009 daemon: change the default permissions of studios from 0700 to 0666 2010-05-19 01:43:13 +03:00
Nedko Arnaudov e82916b5d9 daemon: queued remove app command
On app removal, wait app to stop and delete graph objects related to it.
Fixes #86
2010-05-16 11:22:13 +03:00
Nedko Arnaudov 8925772da6 daemon: ladish_studio_get_jack_graph()
For use instead of ladish_studio_get_virtualizer()
because the later will return NULL when JACK server is stopped
2010-05-16 11:17:09 +03:00
Nedko Arnaudov 18ba50dafb daemon: on app stop, wait its client to disappear 2010-05-13 03:18:23 +03:00
Nedko Arnaudov 76aba4487b daemon: Interlink clients when loading studio from disk 2010-05-13 03:14:43 +03:00
Nedko Arnaudov 3dd990a749 daemon: dump graph client interlinks 2010-05-13 02:36:44 +03:00
Nedko Arnaudov 525be9f5a8 daemon: fix incorrect identifiers
In past 'change app state' command was called 'start app'.
This changeset updates identifiers to match the new purpose
2010-05-12 04:55:40 +03:00