Graphics.PixelstreamPlugin - lordmundi/wikidoctest GitHub Wiki
« MJPEG Video Streaming | EDGE User’s Guide | Writing a Custom Pick Functionality »
The dsp_pixelstream plugin is a server that scrapes an openGL viewport buffer and without any compression sends it to a file or a TCP socket connection. The lack of any processing means that the stream can be expensive in terms of network or memory usage, but it buys very low latency streaming which some applications require. It should be noted that while the network connection can be across different machines, this will perform best when running the server and client on the same machine. Often times this is required if a developer has an application and they wish to feed simulated video into it. This gives them a mechanism to get that video with a low amount of latency.
Other forms of video streaming exist, such as the MJPEG stream served to web browsers via the built in web commanding server. More details on that capability here
The example PixelStream client showing a live view
- Load the dsp_pixelstream plugin either with a tcl command or via your $USERDATA/user.cfg file. See examples below for required arguments.
- Launch a compatible client, such as the provided PixelStreamClient in the bin_* directory to connect and view the stream.
NOTE: At this time there is a number of limitations you should be aware of:
- The plugin will only serve one connected at a time.
- There is no way to specify which viewport to stream - the last viewport on the display is the one being served.
- The capability only exists for linux and mac platforms - windows is not currently supported.
- The plugin performs best when running the server and client on the same machine.
The dsp_pixelstream plugin is a streaming server. To load the plugin, you can either load it in via a config file such as the plugins block of your $USERDATA/user.cfg, or you can load it dynamically at runtime using the doug.load_plugin tcl command. Either way, it will require command line arguments or it will fail to load.
The plugin will serve raw images to either a FILE (specified via the first argument being a filename instead of "TCP") or a network socket on the port specified as the second argument. The usage is:
-plugin dsp_pixelstream <TCP|filename> <port|shared_mem_id>"
Via a config file it would look something like:
command_line
{
-plugin pixelstream 'TCP 2468'
}
plugins
{
pixelstream dsp_pixelstream
}
and if you were doing it in a tcl command, in a script or in the command console, it would look like:
doug.load_plugin dsp_pixelstream TCP 2468
Once the plugin is loaded you will need a client to connect and view the images. An example client with source code is included with EDGE v2.4 and above. You can find the executable at "bin_*/PixelStreamClient". You can launch the client without any arguments to see the usage, but the parameters are almost the same except that the hostname to connect to when using TCP is required. The usage for the client is:
> ./PixelStreamClient
usage:
./PixelStreamClient filename shared_memory_key
./PixelStreamClient TCP <host> port
For more details about the example client, you can inspect the source code at "src.dist/plugins/PixelStream/pixelstream_client/"
frankie December 23, 2015, at 05:38 PM: NOTE: On newer platforms, for the 32 bit version of libXi.so and libXmu.so, if you don't have symbolic links for the 32 bit versions of those (and you only have libXmu.so.6 for example), you will need to make symbolic links to point to the *.so.6 version, or update your makefile to specify the version such as "-l:libXi.so.6 -l:libXmu.so.6" instead of "-lXi -lXmu".
« MJPEG Video Streaming | EDGE User’s Guide | Writing a Custom Pick Functionality »