Starting with version 2.9.0, our video SDK supports named pipes.
What is named pipes?
A named pipe is one of the methods of inter-process communication (IPC). In Windows, named pipes cannot be created as files within a normal file system, unlike in Unix. Also, unlike their Unix counterparts, named pipes are volatile (removed after the last reference to them is closed). Every pipe is placed in the root directory of the named pipe file system (NPFS), mounted under the special path \\.\pipe\ (that is, a pipe named "foo" would have a full path name of \\.\pipe\foo).
Write to the pipe
In the Medialooks SDK you can write TS packets with video to the named pipe. The process is similar to the simple UDP streaming, but using named pipes is more reliable.
Here is an example (MPlatform) of recording to a named pipe called "my_pipe":
MWriterClass objMWriter = new MWriterClass();
string encoder_config = "format='mpegts' video::codec='mpeg2video' video::b='5M' audio::codec='aac'";
string url = @"\\.\pipe\my_pipe";
objMWriter.WriterNameSet(url, encoder_config);
objMWriter.ObjectStart(source);
Of course, you can use any name instead of "my_pipe". The corresponding pipe will be created automatically.
Read from the pipe
Here is an example (MPlatform) of reading from this pipe created above:
MFileClass objMFile = new MFileClass();
string url = @"\\.\pipe\my_pipe";
objMFile.FileNameSet(url, "format=mpegts");
objMFile.FilePlayStart();
Please note that you should set format ("format=mpegts" property) manually because it cannot be recognized automatically. Also, you can use network name instead of dot in the URL to read the pipe over the LAN.