[<<] [<] Page 1 of 1 [>] [>>] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
question about GrOpen()..
From: "LC. Chang" ####@####.#### Date: 28 Feb 2001 07:56:23 -0000 Message-Id: <3A9CB15C.18092579@sis.com.tw> When we port oms (a dvd player) to naon-X, we find ourselves in trouble with GrOpen function. It returns success when first called but failed in second. The problem is our UserInterface call it first time to connect nano-X graphics server, which is ok. But when UI calls play function, it in turn calls open_display which calls GrOpen to open display and return fail. If we don't use GrOpen here, we will not be able to get output. Does anybody know how to do this? or other method to check whether nano-X server is already running? thanks in advance, L.C. Chang | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
Re: question about GrOpen()..
From: Alex Holden ####@####.#### Date: 28 Feb 2001 12:26:15 -0000 Message-Id: <Pine.LNX.4.04.10102281218230.605-100000@hyperspace.linuxhacker.org> On Wed, 28 Feb 2001, LC. Chang wrote: > When we port oms (a dvd player) to naon-X, we find > ourselves in trouble with GrOpen function. It returns > success when first called but failed in second. The problem It is not possible (or necessary) for an application to open more than one connection to the server at a time. > to open display and return fail. If we don't use GrOpen > here, we will not be able to get output. Does anybody know Why not? -- ------- Alex Holden ------- http://www.linuxhacker.org/ http://www.robogeeks.org/ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
Re: question about GrOpen()..
From: "Greg Haerr" ####@####.#### Date: 28 Feb 2001 17:04:08 -0000 Message-Id: <060401c0a1a8$83377000$15320cd0@gregh> :it in turn calls open_display which calls GrOpen : to open display and return fail. If we don't use GrOpen : here, we will not be able to get output. Does anybody know : how to do this? or other method to check whether nano-X : server is already running? I've had this problem before when porting certain programs to Nano-X that support talking to multiple windowing systems, and want to know whether the Nano-X server is running or not. The solution I've used is to use GrOpen() check the return value, and if OK, then call GrClose(). Afterwards, you can then call GrOpen() again and it should work. We made need to add a different open call sometime if this doesn't work for you. Regards, Greg | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
Re: question about GrOpen()..
From: "LC. Chang" ####@####.#### Date: 1 Mar 2001 01:34:10 -0000 Message-Id: <3A9DA8F7.7F7583A1@sis.com.tw> Sorry I have not made myself clear. The application is a dvd player and the UI made by FLTK will call oms library to play dvd title. The oms library will start several threads to process the audio, video... data. And the video data is output by GrXXX function, which needs to open nano-X graphic. I had tried GrClose before GrOpen but still failed. The UI simply exit when GrClose being called. Regards, L.C. Chang > On Wed, 28 Feb 2001, LC. Chang wrote: > > When we port oms (a dvd player) to naon-X, we find > > ourselves in trouble with GrOpen function. It returns > > success when first called but failed in second. The problem > > It is not possible (or necessary) for an application to open more than > one connection to the server at a time. > > > to open display and return fail. If we don't use GrOpen > > here, we will not be able to get output. Does anybody know > > Why not? > > -- > ------- Alex Holden ------- > http://www.linuxhacker.org/ > http://www.robogeeks.org/ > > --------------------------------------------------------------------- > To unsubscribe, e-mail: ####@####.#### > For additional commands, e-mail: ####@####.#### | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
Re: question about GrOpen()..
From: niky ####@####.#### Date: 1 Mar 2001 12:25:45 -0000 Message-Id: <3A9E6B1B.885C60DB@jan.csie.ntu.edu.tw> > The solution I've used is to use GrOpen() check the > return value, and if OK, then call GrClose(). Afterwards, > you can then call GrOpen() again and it should work. > We made need to add a different open call sometime if > this doesn't work for you. I have tried to write a simple test. I use GrOpen () to connect to nano-X server, and then call GrClose () to disconnect. When I want to use GrOpen () to connect to server again, it will fail. My platform is microwin under X11. Regards, Niky | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
Re: question about GrOpen()..
From: Gary James ####@####.#### Date: 1 Mar 2001 13:38:59 -0000 Message-Id: <20010301085211.A1470@pc.twcny.rr.com> On Thu, 01 Mar 2001 10:30:35 niky wrote: > > The solution I've used is to use GrOpen() check the > > return value, and if OK, then call GrClose(). Afterwards, > > you can then call GrOpen() again and it should work. > > We made need to add a different open call sometime if > > this doesn't work for you. > > I have tried to write a simple test. I use GrOpen () to connect to > nano-X server, and then call GrClose () to disconnect. When I want to > use GrOpen () to connect to server again, it will fail. My platform is > microwin under X11. > The problem is in GrClose() in the client. Edit the file ".../microwin/src/nanox/client.c". Look for GrClose(), add the line "nxSocket = -1;" to the end of the function. Then all will work well. ie: CHANGE THIS: void GrClose(void) { #if GR_CLOSE_FIX /* allow 1 second to flush*/ void * oldSignalHandler = signal(SIGALRM, mySignalhandler); alarm(1); #endif AllocReq(Close); GrFlush(); #if GR_CLOSE_FIX alarm(0); signal(SIGALRM, oldSignalHandler); #endif close(nxSocket); } TO THIS: void GrClose(void) { #if GR_CLOSE_FIX /* allow 1 second to flush*/ void * oldSignalHandler = signal(SIGALRM, mySignalhandler); alarm(1); #endif AllocReq(Close); GrFlush(); #if GR_CLOSE_FIX alarm(0); signal(SIGALRM, oldSignalHandler); #endif close(nxSocket); nxSocket = -1; } Gary James | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
Re: question about GrOpen()..
From: "Greg Haerr" ####@####.#### Date: 1 Mar 2001 17:16:26 -0000 Message-Id: <077301c0a273$12261bc0$15320cd0@gregh> : I have tried to write a simple test. I use GrOpen () to connect to : nano-X server, and then call GrClose () to disconnect. When I want to : use GrOpen () to connect to server again, it will fail. My platform is : microwin under X11. This is a bug then. I thought I'd used this method under framebuffer, but maybe there's a difference. I'll look at this soon. Thanks for the response. Regards, Greg | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
Re: question about GrOpen()..
From: "Greg Haerr" ####@####.#### Date: 1 Mar 2001 17:17:36 -0000 Message-Id: <077e01c0a273$3c056860$15320cd0@gregh> : The problem is in GrClose() in the client. Edit the file : ".../microwin/src/nanox/client.c". Look for GrClose(), add the line : "nxSocket = -1;" to the end of the function. Then all will work well. ie: Gary: you're the man!! I'll add this to the tree, thanks. Regards, Greg | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[<<] [<] Page 1 of 1 [>] [>>] |