summaryrefslogtreecommitdiff
path: root/recordmydesktop
diff options
context:
space:
mode:
authoriovar <iovar@f606c939-3180-4ac9-a4b8-4b8779d57d0a>2007-06-08 14:47:58 +0000
committeriovar <iovar@f606c939-3180-4ac9-a4b8-4b8779d57d0a>2007-06-08 14:47:58 +0000
commit745982ace710b0cba746cc8e229c945727c0cf6f (patch)
tree5d12a25e90e275c113bfadf7874ea538d32a0705 /recordmydesktop
parent497c5d77d698ddd32f26e22e9af73e6a1ca7bf0a (diff)
rmd_jack.c: postfixed jack client name with application pid, so multiple
instances of recordMyDesktop can connect to a Jack Server. git-svn-id: https://recordmydesktop.svn.sourceforge.net/svnroot/recordmydesktop/trunk@344 f606c939-3180-4ac9-a4b8-4b8779d57d0a
Diffstat (limited to 'recordmydesktop')
-rw-r--r--recordmydesktop/src/rmd_jack.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/recordmydesktop/src/rmd_jack.c b/recordmydesktop/src/rmd_jack.c
index 9047e8f..62b25f0 100644
--- a/recordmydesktop/src/rmd_jack.c
+++ b/recordmydesktop/src/rmd_jack.c
@@ -137,12 +137,25 @@ void JackShutdown(void *jdata_t){
int StartJackClient(JackData *jdata){
float ring_buffer_size=0.0;
+ int pid;
+ char pidbuf[8];
+ char rmd_client_name[22];
+
+ //construct the jack client name
+ //which is recordMyDesktop-pid
+ //in order to allow multiple
+ //instances of recordMyDesktop
+ //to connetc to a Jack Server
+ strcpy(rmd_client_name,"recordMyDesktop-");
+ pid=getpid();
+ I16TOA(pid,pidbuf)
+ strcat(rmd_client_name,pidbuf);
if(LoadJackLib(jdata->jack_lib_handle)){
fprintf (stderr,"Couldn't load the Jack library (libjack.so)!\n");
return 14;
}
- if ((jdata->client=(*jack_client_new_p)("recordMyDesktop"))==0){
+ if ((jdata->client=(*jack_client_new_p)(rmd_client_name))==0){
fprintf(stderr,"Could not create new client!\n"
"Make sure that Jack server is running!\n");
return 15;
© All Rights Reserved