named-pipes

Can I write a cv::Mat as JPEG data to a named pipe?

我的梦境 提交于 2020-01-04 07:51:22
问题 I need to write my image data in JPEG form to a named pipe (created with mkfifo ) in Linux. But I couldn't find a way to get this working. I can write with imwrite to a plain file, but not to this FIFO. Code: img = cv::Mat(cv::Size(videoWidth, videoHeight), CV_8UC3, videoBuffer); cv::namedWindow("Display window", cv::WINDOW_NORMAL); cv::imshow("Display window", img); // Show our image inside it. cv::imwrite("image.jpg", img); How can I use a named pipe instead of a file? 回答1: I found the

Redirect FFMPEG's output to multiple named pipes on Windows

大兔子大兔子 提交于 2020-01-04 02:16:15
问题 I am trying to stream video and audio data into two separate named pipes on Windows. ffmpeg.exe -f dshow -i video="My camera name":audio="My microphone name" -map 0:1 -ac 1 -f f32le \\.\pipe\audioStream -map 0:0 -f mjpeg \\.\pipe\videoStream The problem is that FFMPEG does not seem to understand that the outputs \\.\pipe\audioStream and \\.\pipe\videoStream are pipes and treats them like files. If the pipes are already created when the FFMPEG starts, it wants to overwrite them and fails.

SQL Server “Network Path Not Found” Randomly and Infrequently Occurring across Environments

ぃ、小莉子 提交于 2020-01-04 01:38:32
问题 Similar (if not same question as) Network path not found exception encountered randomly, but I have code to reproduce the issue so I want to ask again as it appears to be a real issue independent of hardware and can be reproduced. Here's the error: provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) ---> System.ComponentModel.Win32Exception (0x80004005): The network path was not found at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection

WCF local only NamedPipe

戏子无情 提交于 2020-01-03 15:26:14
问题 Here's a simple example of my problem. I'm writing an application that self hosts a WCF service for communication only within the user's session. When multiple users run this application concurrently on a terminal services machine, all the users are happy as long as they don't have local admin rights. The problem begins if two or more users are admins, the 1st user creates the service, a 2nd user because the service has been created Globally... Simple Win32 implementation, without WCF, would

Inferior Shell or UIOP: Interacting with background process

这一生的挚爱 提交于 2020-01-03 13:36:59
问题 So, I got past actually getting a program to run from SBCL Lisp using inferior-shell (presumably UIOP would be just fine). Anyway, now that I can do that, I still have no clue how to interact with the program if it is running in the background. All of this functionality like pipes and streams connected to the stdin and stdout of the running program are advertised, just not documented. It would seem like this is the most basic thing to do. Does anybody have an example of doing such a thing?

Prevent Named Pipes Conflict

别来无恙 提交于 2020-01-03 09:01:50
问题 We have a .NET program that uses WCF to listen for communication from another process. We used named pipes. ServiceHost host = new ServiceHost( typeof(Something), new Uri[] { new Uri("net.pipe://localhost") }); host.AddServiceEndpoint(typeof(ISomething), new NetNamedPipeBinding(), "Something"); host.Open(); The code worked great until a third party .NET program was installed. Now the open fails with a message of "Cannot listen on pipe name 'net.pipe://localhost/' because another pipe endpoint

Named pipes usage. Multiple clients, one server, multiple parallel requests

戏子无情 提交于 2020-01-03 06:49:09
问题 I'm trying to implement a named pipes server in .NET. The client will be C++. The nature of the data sent is not relevant to the question. My first naive implementation looks something like: using (NamedPipeServerStream stream = new NamedPipeServerStream(PipeName, PipeDirection.InOut, numberOfListeners, PipeTransmissionMode.Message)) { while (true) { try { stream.WaitForConnection(); var request = ReadRequest(stream); var reply = Process(request); WriteReply(stream, reply); stream

How can 2 processes talk to each other without pipe()?

半城伤御伤魂 提交于 2020-01-03 05:52:05
问题 Given this code : #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/wait.h> #include <unistd.h> #define BUF_SIZE 256 int main() { int fd1[2]; int fd2[2]; ssize_t numRead = -1; // remark : working under the assumption that the messages are of equal length const char* messageOne = "Hello world , I'm child number 1\n"; const char* messageTwo = "Hello world , I'm child number 2\n"; const unsigned int commLen = strlen(messageOne) + 1; char buf[BUF_SIZE]; if (pipe(fd1) == -1)

Reading/writing from named pipes under mono/Linux

爷,独闯天下 提交于 2020-01-02 07:17:32
问题 I would like to read/write from a named pipe/FIFo queue under Linux. I have tried the standard classes StreamWriter and other classes from System.IO, but it fails because it is using seek. Has anyone ever written/read from a named pipe using Mono?. I am managing to read and write - but not the same time... 回答1: You'll need to open separate readers and writers; for some reason, Mono treats FIFOs as if they are seekable (it's a bug), even though they aren't. 来源: https://stackoverflow.com

C++ Using windows named pipes

蓝咒 提交于 2020-01-01 09:39:23
问题 For some reason both the mast and slave fail, however I could find any good examples on how their meant to work, so im not sure where I went wrong. The master never exits the WaitForSingleObject after ConnectNamedPipe, and the slave throws an exception in the first boost::asio::read call, "Waiting for a process to open the other end of the pipe", which I though the WaitNamedPipe was meant to wait for along with the ConnectNamedPipe in the master? master.cpp asio::io_service ioservice; asio: