% This graph description reads an MPEG file with MPEG audio on the remote host
% and plays it on the local host using the ALSAPlaybackNode and the XDisplayNode.
% RTP is used for streaming audio and video separately.
% Both hosts must be running Linux.

% You must edit the line containing setLocation(...) and enter the name of the remote host

% Note the explicit formats between the demux and decoders.
% This will bypass the data analysis which is currently broken with RTP.
% To make this graph description work, the MPEGDemuxNode must provide
% detailed output formats with wildcards.
% The formats must be specified correctly, otherwise the decoder nodes
% will crash!

% Command on remote host:
%   serverregistry

% Command on local host:
%   clic mpegplay_rtp.gd -i <remote MPEG file>


  GenericReadNode            # setLocation("foo")
! MPEGDemuxNode              # setLocation("foo")
{
  { ["mpeg_video0"]          @ setBufferStrategy("RTPStrategy")
                             @ Format(format_type="video/mpeg",
                                       version=2,
                                       x_resolution=786,
                                       y_resolution=576,
                                       ratio_x=4,
                                       ratio_y=3,
                                       framerate=25.0)
      ! MPEGVideoDecodeNode
      ! XDisplayNode
  }

  { ["mpeg_audio0"]          @ setBufferStrategy("RTPStrategy")
                             @ Format(format_type="audio/mpeg",
                                      layer=2,
                                      channels=2,
                                      bitpersample=16,
                                      sample_rate=48000,
                                      audio_codec=85)
      ! MPEGAudioDecodeNode
      ! PlaybackNode
  }
}
