On Thu, Nov 26, 2009 at 11:42:55AM +1100, Kyle Zhou wrote: > Hi, I am trying to modify benchmark_rx.py such that it feeds to mplayer. > > I can successfully use gr.file_descriptor_sink and pipe the stdout of > python to stdin of mplayer. > > However, when I try to embed the pipe in python code by calling mplayer > programmably, it always produces errors. > The code changes are: > > global n_rcvd, n_right, mplayer > def main(): > global n_rcvd, n_right, mplayer > n_rcvd = 0 > n_right = 0 > mplayer = subprocess.Popen(['mplayer','-'],stdin=subprocess.PIPE) > def rx_callback(ok, payload): > global n_rcvd, n_right, mplayer > ...... > mplayer.stdin.write(payload[2:]) > > > Upon the line subprocess.Popen(...), it produces the following error: > > 3 [main] python 5020 C:\cygwin\bin\python.exe: *** fatal error - > unable to > remap > C:\cygwin\lib\python2.5\site-packages\gnuradio\vocoder\_cvsd_vocoder.dll > to same address as parent(0x1B260000) != 0x1B780000 > 5 [main] python 4344 fork: child 5020 - died waiting for dll > loading, errn > o 11 > Traceback (most recent call last): > File "./benchmark_rx_mplayer.py", line 122, in <module> > main() > File "./benchmark_rx_mplayer.py", line 62, in main > mplayer = > subprocess.Popen(['mplayer','-'],stdin=subprocess.PIPE,stderr=ferr > ) > File "/usr/lib/python2.5/subprocess.py", line 594, in __init__ > errread, errwrite) > File "/usr/lib/python2.5/subprocess.py", line 1011, in _execute_child > self.pid = os.fork() > OSError: [Errno 11] Resource temporarily unavailable > > > I don't think this code is related to vocoder in anyway. So the error > line 3 is really confusing. > I guess there is some conflict when fork a process within main(). But how? > > Thanks > Kyle
Kyle, No clue. Have you tried running this stuff on a native *nix box instead of under cywin/windows? Eric _______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org http://lists.gnu.org/mailman/listinfo/discuss-gnuradio