<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.ice-online.com/index.php?action=history&amp;feed=atom&amp;title=SOURCEDG</id>
	<title>SOURCEDG - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.ice-online.com/index.php?action=history&amp;feed=atom&amp;title=SOURCEDG"/>
	<link rel="alternate" type="text/html" href="https://wiki.ice-online.com/index.php?title=SOURCEDG&amp;action=history"/>
	<updated>2026-04-12T15:58:46Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.34.1</generator>
	<entry>
		<id>https://wiki.ice-online.com/index.php?title=SOURCEDG&amp;diff=728&amp;oldid=prev</id>
		<title>ConvertBot: Datagram reader for streaming RTP/RAW/SDP (UDP) into pipes.</title>
		<link rel="alternate" type="text/html" href="https://wiki.ice-online.com/index.php?title=SOURCEDG&amp;diff=728&amp;oldid=prev"/>
		<updated>2020-04-27T22:04:39Z</updated>

		<summary type="html">&lt;p&gt;Datagram reader for streaming RTP/RAW/SDP (UDP) into pipes.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Datagram reader for streaming RTP/RAW/SDP (UDP) into pipes.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;OUT&amp;gt;     - Pipe for raw output&lt;br /&gt;
&amp;lt;CONVOUT&amp;gt; - Pipe for linear output&lt;br /&gt;
&lt;br /&gt;
Optional Keyword only parameters:&lt;br /&gt;
[HOSTPORT] - &amp;quot;host:port&amp;quot;, listen on this stream [DEF=&amp;quot;127.0.0.1:18800&amp;quot;]&lt;br /&gt;
             if /sap then [DEF=&amp;quot;224.2.127.254:9875&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
Datagram reader for streaming RTP/RAW/SDP into NeXtMidas pipes.&lt;br /&gt;
NOTE: Requires JDK1.40+&lt;br /&gt;
&lt;br /&gt;
Messages:&lt;br /&gt;
  Received:&lt;br /&gt;
    CLOSENET - Set state OFF&lt;br /&gt;
    EXITNET  - Set state OFF and EXIT (close) primitive&lt;br /&gt;
    OPENNET  - Set state OFF, open stream on &amp;quot;host:port&amp;quot; specified in data,&lt;br /&gt;
               and set state ON.&lt;br /&gt;
  Sent: NONE&lt;br /&gt;
&lt;br /&gt;
Real-Time Controls:&lt;br /&gt;
  See the JavaDocs API for various sets and gets for this primitive.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
  1. Get RTP packets, specify transfer length by result, get raw and linear&lt;br /&gt;
     output.&lt;br /&gt;
    nM&amp;gt; sourcedg/id=multl/intl=^audiotl_g _mul _mll&lt;br /&gt;
    nM&amp;gt; set reg.multl.host &amp;quot;^threads.^{curThread_sa}.multicase&amp;quot; ! set host&lt;br /&gt;
    nM&amp;gt; set reg.multl.port &amp;quot;^threads.^{curThread_sa}.mport&amp;quot;     ! set port&lt;br /&gt;
    nM&amp;gt; set reg.multl.dgstate &amp;quot;ON&amp;quot;   ! Turn on the flow of packets&lt;br /&gt;
    nM&amp;gt; set reg.multl.dgstate &amp;quot;OFF&amp;quot;  ! Turn OFF the flow of packets&lt;br /&gt;
&lt;br /&gt;
  2. Get SAP packets into a raw pipe, with info on each packet received with a&lt;br /&gt;
     2000 ms timeout.&lt;br /&gt;
    nM&amp;gt; sourcedg/verbose/packets/nortp/sap/timeout=2000/id=sapout _mul&lt;br /&gt;
&lt;br /&gt;
  3. Get raw UDP packets with info on each packet received with a 2000 ms&lt;br /&gt;
     timeout.&lt;br /&gt;
    nM&amp;gt; sourcedg/verbose/packets/nortp/timeout=2000 _mul _junk &amp;quot;^hostport_g&amp;quot;&lt;br /&gt;
&lt;br /&gt;
  4. Get multicast RTP stream with payload type 0 (PCMU) for u-law encoded audio&lt;br /&gt;
     on 224.1.1.1/18800 to NeXtMidas pipes (raw 8-bit u-law and decoded 16-bit&lt;br /&gt;
     linear PCM), plot decoded audio pipe as a line plot, and play it on sound&lt;br /&gt;
     card using sinkaudio (AUDIO option tree should be in path). This assumes&lt;br /&gt;
     that the audio data sample rate (sr) is 8000 Hz (so xdelta is 1/sr).&lt;br /&gt;
     ...&lt;br /&gt;
     set sr 8000&lt;br /&gt;
     set xd 1/sr&lt;br /&gt;
     pipe on&lt;br /&gt;
       sourcedg/ulaw/on/xdelta=xd _raw _linearpcm{size=1k} &amp;quot;224.1.1.2:18800&amp;quot;&lt;br /&gt;
       plot/all  _linearpcm type=line&lt;br /&gt;
       sinkaudio _linearpcm&lt;br /&gt;
       ...&lt;br /&gt;
     pipe off&lt;br /&gt;
     ...&lt;br /&gt;
&lt;br /&gt;
  5. Get multicast RTP stream with payload type 10 (L16) for 16-bit signed audio&lt;br /&gt;
     sampled at 44100 Hz on 224.1.1.1/18800 to NeXtMidas pipe, plot raw linear&lt;br /&gt;
     audio data (_rawout) as a line plot (showing 1K of data at a time), FFT the&lt;br /&gt;
     linear audio data, and plot a PSD of the transformed data (_fftaudio).&lt;br /&gt;
     ...&lt;br /&gt;
     set xd 1/44100&lt;br /&gt;
     pipe on&lt;br /&gt;
       sourcedg/on/xdelta=xd _rawout{form=&amp;quot;SI&amp;quot;} ,, &amp;quot;224.1.1.1:18800&amp;quot;&lt;br /&gt;
       plot/id=lineplot _rawout{FrameSize=1k} type=line&lt;br /&gt;
       fft/psd/log      _rawout _fftaudio nfft=1k navg=1 over=0&lt;br /&gt;
       plot/id=psdplot          _fftaudio&lt;br /&gt;
       ...&lt;br /&gt;
     pipe off&lt;br /&gt;
     ...&lt;br /&gt;
&lt;br /&gt;
Switches:&lt;br /&gt;
  /ALLHOSTS     - Turns multicast off and gets data on a port from all hosts,&lt;br /&gt;
                  the socketconstructor is &amp;quot;new DatagramSocket(port)&amp;quot;&lt;br /&gt;
  /FILL         - Fill in missing packets? [DEF=NO]&lt;br /&gt;
  /FRAMESIZE    - Data frame size, /FTYPE=2000 only&lt;br /&gt;
  /FTYPE        - Output file type [1000,2000,...] [DEF=1000]&lt;br /&gt;
  /ICEHDRINPIPE - Is there an ICE header in the pipe? [DEF=NO]&lt;br /&gt;
  /INITIALTIME  - Set output ystart, -1=based on input [DEF=-1]&lt;br /&gt;
  /INTL         - Set transfer length for pipes&lt;br /&gt;
  /LOG=&amp;lt;file&amp;gt;   - Logs start and stop only to &amp;lt;file&amp;gt;&lt;br /&gt;
  /MIDASSI      - Sets the output data type to SI&lt;br /&gt;
  /MSGID=       - Registry name of command to handle messages [DEF=null]&lt;br /&gt;
                  Requires /MSGONLY.&lt;br /&gt;
  /MSGNAME=     - The name for XML message (only with /MSGID switch)&lt;br /&gt;
                  [DEF=XMLMSGS]&lt;br /&gt;
  /MSGONLY=     - Send messages only, not pipes to value of /MSGID [DEF=null]&lt;br /&gt;
  /NORMAL3000   - Scott - TBD&lt;br /&gt;
  /NORTP        - No RTP protocol on packets [DEF=RTP]&lt;br /&gt;
  /NOXSXD       - Used with /TIMECODE to disable updates to XS and XD. (Since&lt;br /&gt;
                  NeXtMidas 2.1.1)&lt;br /&gt;
  /OFFSET=      - Data offset for each read [DEF=0]&lt;br /&gt;
  /ON           - Turns on listener at startup&lt;br /&gt;
  /PACKETS      - Debug - show all packets received if present&lt;br /&gt;
  /RTPFILTER=   - Used to get only specific RTP packets in a multiplexed stream&lt;br /&gt;
                  [DEF=-1 (disabled)]&lt;br /&gt;
  /SAP          - Use SAP protocol to decode packets [DEF=OFF]&lt;br /&gt;
  /STRUCT=table - Sets the structure of the type 3000 file&lt;br /&gt;
  /TIMEOUT=&amp;lt;ms&amp;gt; - Sets socket timeout value in milliseconds.&lt;br /&gt;
                  Wait time to receive packet [DEF=50]&lt;br /&gt;
  /TIMECODE     - Indicates that a the output pipe will receive TimeCode data&lt;br /&gt;
                  via a call-back from DatagramData. This will set the X units&lt;br /&gt;
                  to frequency and Y units to time if /NOXSXD is NOT set.&lt;br /&gt;
                  (Since NeXtMidas 1.9.3)&lt;br /&gt;
  /ULAW         - Treat the input data as U-Law, FALSE for LINEAR [DEF=FALSE]&lt;br /&gt;
                  If TRUE and CONVOUT= pipe is specified, then decode the 8-bit&lt;br /&gt;
                  U-law data stream to a PCM 16-bit signed integer (SI format)&lt;br /&gt;
                  onto the CONVOUT= pipe.&lt;br /&gt;
  /VERBOSE      - Turn on some information output&lt;br /&gt;
  /XSTART       - Set xstart on pipe&lt;br /&gt;
  /XDELTA       - Set xdelta on pipe&lt;br /&gt;
  /XUNITS       - Set xunit on pipe&lt;br /&gt;
&lt;br /&gt;
See Also: sinkdg, nxm.sys.net.DatagramData&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:NXM_Explain]]&lt;/div&gt;</summary>
		<author><name>ConvertBot</name></author>
		
	</entry>
</feed>