[MPlayer-dev-eng] A RTP streaming patch for "mplayer"

Arpi arpi at thot.banki.hu
Wed Apr 10 16:53:42 CEST 2002


Hi,

> FYI, I have released a patch for the Open Source "mplayer" media player 
> (for Linux or FreeBSD), that allows it to receive and play RTP audio/video 
> streams.  For more information, please see
>          <http://www.live.com/mplayer/>
> 
> With this patch, "mplayer" can now receive and play (unicast or multicast) 
> MPEG-1 or MPEG-2 RTP streams, using a SDP (".sdp") file as input.  (This 
> patch replaces the RTP implementation that was in the code before - that 
> implementation was very limited, and supported only MPEG System Streams - 
> not Elementary Streams.)

the current RTP implementation is done at the stream layer - so it should
support ANY file types, as it's just a raw data source, and file format is
handled at the demuxer layer later.

i've checked your patch. it's interesting, but...
if you want it to be in the CVS, and so in soon-coming next release, then
- update the patch for CVS version, 0.60 was long time ago...
- do NOT remove the old RTP code (maybe put into #ifdfe and make it optional)
  i doubt your .sdp thing work with current opensource steraming stuff like
  mpeg4ip or dvbstream.
- make your code optional, and add option to the ./configure script, so user
  should give where the live.com libraries and headers are placed
- fix that dp->flags hack, it's really a hack, as dp->flags has internal
  use, it contains stuff like keyframe flags and so on. dp->flags=~0 is more
  than ugly...
- note that demuxer->priv and stream->priv are for use by stream and demuxer
  'plugins', so using them is not a hack :)
- instead of detecting by extensin (*.sdp) add a new switch -sdp to set
  stream type, and maybe also sdp:// uri type to cmdline parser.

+  unsigned const bufferSize = STREAM_BUFFER_SIZE; // is this enough? #####

STREAM_BUFFER_SIZE is the sector buffer size in the stream layer, it has
NOTHING with the demuxer packet sizes. demuxer packets can be 0 to few
megabyets big... too big packets just eats memory, too small ones just eat
cpu. packet size can be variable here, and for non-mpeg1/2 streams, one
video packet should contain one whole compressed video frame.

> ps. Future versions of this patch will allow "mplayer" to play RTP streams 
> from a "rtsp://" URL, and will also support some additional RTP media types 
> (e.g., MPEG-4) that "mplayer" has codecs for.
ok


A'rpi / Astral & ESP-team

--
Developer of MPlayer, the Movie Player for Linux - http://www.MPlayerHQ.hu



More information about the MPlayer-dev-eng mailing list