named-pipes

PhantomJS: pipe input

99封情书 提交于 2019-11-29 03:27:56
I am trying to use PhantomJS to render an html page to pdf. I do not want to write the files to disk, I have the html in memory, and I want the pdf in memory. Using the excellent answer from Pooria Azimi at this question , i am able to get the pdf from a named pipe. When trying the same on the other end (replacing the input file with a named pipe), I end up with a blank pdf. This is what I am doing now (simplified): mkfifo in_pipe.html out_pipe.pdf ./phantomjs rasterize.js in_pipe.html out_pipe.pdf Then in another terminal: echo '<center>hey!</center>' > in_pipe.html cat out_pipe.pdf > out.pdf

Stream video from ffmpeg and capture with OpenCV

倖福魔咒の 提交于 2019-11-29 02:16:26
I have a video stream coming in on rtp to ffmpeg and I want to pipe this to my OpenCV tools for live streaming processing. The rtp linkage is working because I am able to send the incoming data to a file and play it (or play if via ffplay). My OpenCV implementation is functional as well because I am able to capture video from a file and also a webcam. The problem is the streaming to OpenCV. I have heard that this may be done using a named pipe. First I could stream the ffmpeg output to the pipe and then have OpenCV open this pipe and begin processing. What I've tried: I make a named-pipe in my

C++: Implementing Named Pipes using the Win32 API

送分小仙女□ 提交于 2019-11-29 00:25:26
问题 I'm trying to implement named pipes in C++, but either my reader isn't reading anything, or my writer isn't writing anything (or both). Here's my reader: int main() { HANDLE pipe = CreateFile(GetPipeName(), GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, NULL); char data[1024]; DWORD numRead = 1; while (numRead >= 0) { ReadFile(pipe, data, 1024, &numRead, NULL); if (numRead > 0) cout << data; } return 0; } LPCWSTR GetPipeName() { return L"\\\\.\\pipe\\LogPipe"; } And here's my

Named Pipes between C# and Python

浪子不回头ぞ 提交于 2019-11-29 00:13:06
I'm trying to create a two-way communication channel between two programs (one in Python and another in C#) When I create a named pipe between two C# programs or two Python programs, everything is OK, but when I try to (for example) connect to the C# server from Python code, it does not work: C# code: NamedPipeServerStream server = new NamedPipeServerStream( "Demo", PipeDirection.InOut, 100, PipeTransmissionMode.Byte, PipeOptions.None, 4096, 4096) If I use win32pipe in Python, code blocks on ConnectNamedPipe (it never returns) p = win32pipe.CreateNamedPipe( r'\\.\pipe\Demo', win32pipe.PIPE

WCF - Fastest interprocess communication

你离开我真会死。 提交于 2019-11-28 23:54:21
A have a web-accessible (via basicHttpBinding) WCF service which I also want to access from other .NET services on the same machine with as higher performance as possible. I understand that the netNamedPipeBinding is ideal for this, but wonder what the best configuration would be given that I'm only even going to be communicating with other .NET processes. For example, I needn't necessarily use an encoding such as SOAP as this is perhaps too bulky and I don't need the compatibility with any other clients other than a .NET client. I also don't think I need any security. What would be the best

Using named pipes with bash - Problem with data loss

久未见 提交于 2019-11-28 20:44:09
Did some search online, found simple 'tutorials' to use named pipes. However when I do anything with background jobs I seem to lose a lot of data. [[Edit: found a much simpler solution, see reply to post. So the question I put forward is now academic - in case one might want a job server]] Using Ubuntu 10.04 with Linux 2.6.32-25-generic #45-Ubuntu SMP Sat Oct 16 19:52:42 UTC 2010 x86_64 GNU/Linux GNU bash, version 4.1.5(1)-release (x86_64-pc-linux-gnu). My bash function is: function jqs { pipe=/tmp/__job_control_manager__ trap "rm -f $pipe; exit" EXIT SIGKILL if [[ ! -p "$pipe" ]]; then mkfifo

c# Full Duplex Asynchronous Named Pipes .NET

淺唱寂寞╮ 提交于 2019-11-28 19:41:21
I am trying to achieve a full-duplex client-server communication scheme, on 2 different machines (only), where each end-point (client or server) can send stuff at any time, asynchronously (non-blocking pipe), and the other end will pick it up and read it. I don't want answers referring me to any other technology besides named pipes, I know about the other technologies, but I want an answer to this particular question. (I've seen this question posted so many times on different forums, and I keep seeing responses advising to use some other technology. I think this borders on rude?) I've read

How to create named pipe (mkfifo) in Android?

本小妞迷上赌 提交于 2019-11-28 18:02:13
I am having trouble in creating named pipe in Android and the example below illustrates my dilemma: res = mkfifo("/sdcard/fifo9000", S_IRWXO); if (res != 0) { LOG("Error while creating a pipe (return:%d, errno:%d)", res, errno); } The code always prints: Error while creating a pipe (return:-1, errno:1) I can't figure out exactly why this fails. The application has android.permission.WRITE_EXTERNAL_STORAGE permissions. I can create normal files with exactly the same name in the same location, but pipe creation fails. The pipe in question should be accessible from multiple applications. I

Using FFMPEG to stream continuously videos files to a RTMP server

泄露秘密 提交于 2019-11-28 15:51:27
问题 ffmpeg handles RTMP streaming as input or output, and it's working well. I want to stream some videos (a dynamic playlist managed by a python script) to a RTMP server, and i'm currently doing something quite simple: streaming my videos one by one with FFMPEG to the RTMP server, however this causes a connection break every time a video end, and the stream is ready to go when the next video begins. I would like to stream those videos without any connection breaks continuously, then the stream

Not able to read from named pipe in Java

两盒软妹~` 提交于 2019-11-28 13:57:10
I am creating a named pipe using JNI by calling the mkfifo() command. I am using mode = 0666. I am then trying to write into the pipe using Java, but I get stuck while writing into the pipe. I get stuck at the following line and not able to go past it. I am not getting any error either. PrintWriter out = new PrintWriter((new BufferedWriter(new FileWriter(pipePath)))); Please help. Regards, -H PipePeer.java import java.io.*;* public class PipePeer { private native int createPipe(String pipeName, int mode);* // --------> native method to call mkfifo(pipeName, mode); static { System.load("/home