[Live-devel] Unicast and Multicast from a single source server?
Ross Finlayson
finlayson at live555.com
Thu Jul 19 22:53:58 PDT 2007
>I want to make a server that will stream from a single source to
>multiple unicast clients and at least one multicast address. To
>further complicate matters I believe it will need to support ASM (I
>haven't been able to convince Quicktime to supports SSM).
>
>Before I go too far down the wrong path I thought I'd pose the
>problem to the mailing list for any suggestions.
>
>I see three options:
>
>1. Use two different server sessions one for unicast (OnDemand based
>subsession) and a separate session for multicast (Passive based
>subsession)
This is by far the best solution, because it doesn't require messing
around with the existing RTSP/RTP implementation - which works well
as is. The RTSP protocol works differently for unicast and multicast
streams, and I definitely don't recommend trying to hack the unicast
implementation to support multicast, or vice versa.
> then feed them from a single FramedSource.
No, each would need to read from a different "FramedSource" (because
the implementation of "FramedSource" does not allow more than one
object to read from a single "FramedSource").
However, is your input source accessible as a file (e.g., in /dev/)?
If so, then you could probably just create two separate
"ByteStreamFileSource" objects, each reading from this file.
If, however, your input source is not accessible as a file, then you
would need to
1/ Write a class (which would *not* be a "FramedSource"
subclass to encapsulate it), and
2/ Write a FramedSource subclass that encapsulates a single
copy of data from the source.
This is nontrivial, but you could use the existing "MPEG1or2Demux"
and "MPEG1or2DemuxedElementaryStream" code as a model, because this
does something similar.
> This has complications in the design of the FramedSource
Yes, but that's much simpler than hacking with the RTSP/RTP code.
> and it duplicates the RTP framing and buffering.
That really doesn't matter at all. You just create two "RTPSink"
(subclass) objects instead of one.
--
Ross Finlayson
Live Networks, Inc.
http://www.live555.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.live555.com/pipermail/live-devel/attachments/20070719/5aa0007a/attachment.html
More information about the live-devel
mailing list