Commit Graph

536 Commits

Author SHA1 Message Date
Nedko Arnaudov f42b4fbef7 operational jack session implementation 2011-10-02 00:47:50 +03:00
Nedko Arnaudov 5483a52daf ladishd: async app supervisor save. async studio and project save. 2011-09-26 05:03:57 +03:00
Nedko Arnaudov 3b69e81c76 ladishd: fix bug in currently unused code 2011-09-10 15:18:59 +03:00
Nedko Arnaudov 6aa44e9ab9 dbus_ -> cdbus_ renames 2011-09-10 03:35:48 +03:00
Nedko Arnaudov 8bc41a21a0 fix more gcc-4.6 warnings
../conf.c:153:7: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
../jmcore.c:214:7: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
../daemon/cmd_save_project.c:45:8: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
../daemon/main.c:288:7: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
2011-09-10 02:04:28 +03:00
Nedko Arnaudov 68716ee66c ladishd: fix invalid cast and log
levels are strings now and must be logged as such
2011-09-10 02:01:38 +03:00
Nedko Arnaudov 42cdd70e33 Make the app supervisor interface versioned
unreleased apps using latest api MAY check for interface version

released apps using latest api SHOULD check for interface version
2011-09-10 01:06:08 +03:00
Nedko Arnaudov 8100ea334e ladishd: make the D-Bus app supervisor API backward compatible
In 997630bfb7 the API changed because of LASH and
jack-session support. The level app property was switched from uint8 to string.
However, some externally maintained frontends (claudia, klaudia and festige) use
the 0.3 API.

This changeset restores the 0.3 API and extends it with new functions and signals,
ones that use string instead of uint8 level.
2011-09-06 19:02:55 +03:00
Nedko Arnaudov 2b66a82e9a ladishd: new function - ladish_js_save_app() 2011-09-03 03:17:49 +03:00
Nedko Arnaudov 1113f0e9d3 ladish_app_send_signal() expectes app be in started state 2011-08-04 04:21:01 +03:00
Nedko Arnaudov 026659406a LASH support in ladishd 2011-08-04 02:59:01 +03:00
Nedko Arnaudov 53845918fe prefix cdbus global vars with unique prefix 2011-07-31 20:04:01 +03:00
Nedko Arnaudov 934fa96a15 ladishd: rename ladish_app_supervisor_save_L1() to ladish_app_supervisor_initiate_save()
This function will initiate save for LASH and JACK session apps as well.
2011-07-30 22:00:29 +03:00
Nedko Arnaudov a07766fb0a use empty xml element tag syntax for ports with empty dicts
a2j port dict entry is not actually saved,
so the empty element tag syntax has to be used.
2011-07-30 03:59:19 +03:00
Nedko Arnaudov 997630bfb7 use strings for app levels
With jack-session on the manege, strict L0-L3 classification
does not reflect the actual situation. LASH and jack-session
are still L2 though.
2011-07-28 15:15:47 +03:00
Nedko Arnaudov 78f07f7ad1 remove empty client functionality 2011-06-07 04:11:59 +03:00
Nedko Arnaudov 60aaa492db Make alsapid work when libasound is loaded with dlopen(). Fix for #180
when alsapid is preloaded libasound is not loaded yet
for some unknown reason, late call to dlvsym() fails as well,
at least for mididings (python loads _mididings.so that
implicitly loads libasound.so)

this changeset implements the late symbol lookup,
because it makes the code smaller

the actual fix is to LD_PRELOAD libasound.so as well
2011-06-03 00:44:00 +03:00
Nedko Arnaudov f33b58ac85 new vclient and move port functionality 2011-06-01 06:12:54 +03:00
Nedko Arnaudov beef6e7d44 join vclients functionality 2011-06-01 05:37:02 +03:00
Nedko Arnaudov 0bb1d523d7 vclient rename 2011-06-01 04:48:53 +03:00
Nedko Arnaudov 19d7d762f8 Add ClientRenamed and PortRenamed signals to D-Bus introspection data 2011-06-01 04:25:31 +03:00
Nedko Arnaudov 60280f1b89 vport rename 2011-06-01 04:18:16 +03:00
Nedko Arnaudov e0ec247159 split vclient functionality
vgraph manipulation is going to be able to do more than split
2011-06-01 03:04:18 +03:00
Nedko Arnaudov 90b5b6d881 ladishd: fix use of uninitialized memory (app_guid again)
For app-less clients, app_uuid is not initialized
2011-06-01 00:14:52 +03:00
Nedko Arnaudov 0ba807b478 ladishd: don't override existing LD_PRELOAD
valgrind for example uses LD_PRELOAD as well.
2011-05-20 01:02:37 +03:00
Nedko Arnaudov 03d8d0c52e ladishd: fix the previous commit
The previous commit accidentally removed a log dump call.
2011-05-19 23:17:46 +03:00
Nedko Arnaudov 62a15d55e2 ladishd: fix use of uninitialized memory
For app-less clients, app_uuid is not initialized
2011-05-16 06:57:01 +03:00
Nedko Arnaudov facd3090fd ladishd: fix log line 2011-05-16 06:54:22 +03:00
Nedko Arnaudov 7f512b33fc ladishd: fix use of uninitialized memory
sizeof(bool) != sizeof(dbus_bool_t)
on x86, 1 != 4
2011-05-16 06:52:13 +03:00
Nedko Arnaudov deab81c2ef ladishd: Fix use of uninitialized memory
room template objects don't use project related members
2011-05-16 05:56:01 +03:00
Nedko Arnaudov 18c88a94c3 Fix memory leak in recent_studio_callback() 2011-05-16 05:48:53 +03:00
Nedko Arnaudov f0e233055b Fix use of uninitalized member
The use of uninitalized member was caused by the recent revert.

The ladish_room::object_path member is not actually used only for room
template objects.
2011-05-16 03:42:34 +03:00
Nedko Arnaudov dc11cfe515 daemon: move ladish_room::graph member to the common section
It is used for room template objects as well
2011-05-16 03:40:35 +03:00
Nedko Arnaudov 64923f3a86 Revert "Fixed uninitialized vars in rooms created from templates"
This reverts commit 9bf795905f.

ladish_room_create_interal() is suposed to allocate the struct and
initialize the name and uuid members. The template member is supposed to
be initialized by the caller functions, either ladish_room_create() or
ladish_room_create_template(). The siblings member is initialized
later, when the room is actually added to the appropriate list.

The graph member is used by both room templates and room objects. This
will be fixed in the following commit.

All other ladish_room members are not valid for room template objects.
2011-05-16 03:35:00 +03:00
Nedko Arnaudov 1612b562af fix a memory leak after strdup() failure 2011-05-16 01:40:57 +03:00
Nedko Arnaudov b9f820573e coding style fix 2011-05-16 01:35:52 +03:00
Dan A. Muresan 449b309cb6 Fixed a memory leak (room.object_path) 2011-05-14 16:24:52 +03:00
Dan A. Muresan 9bf795905f Fixed uninitialized vars in rooms created from templates 2011-05-14 16:24:46 +03:00
Dan A. Muresan 0b568aeb99 Fixed a memory leak (ladish_recent_store.items [i]) 2011-05-14 15:40:10 +03:00
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