[FFmpeg-devel] [PATCH] SAP muxer/demuxer

Luca Abeni lucabe72
Thu Oct 7 09:09:06 CEST 2010


Hi Martin,

On 10/06/2010 07:45 PM, Martin Storsj? wrote:
> Hi,
>
> As mentioned in another thread, I've been working on a SAP (RFC 2974)
> muxer and demuxer. SAP is a very simple protocol for announcing the SDP
> info for a RTP broadcast, and is most often sent over multicast (but there
> are usecases where one could want to send it over normal unicast, too).

Quick question: by looking at the patches (patch 0005, in particular),
it seems to me that you send SAP announcements to the RTP destination
(at least, I get this impression when reading how sap->ann_fd is initialised).
What am I missing? As far as I remember, SAP used a well known multicast
address for announcements, and the RTP destination address could be a
different multicast address (this is what I've always seen) or an unicast
address...

[...]
> The content of this patch series is:
> - Add a "connect" option to the udp protocol. In the SAP announcement, we
> need to send the local IP address we're sending the packets from, and
> that's not available on a normal UDP socket, only on a connected one. When
> connected, one has to use send() instead of sendto(), and if you receive
> "destination unreachable" ICMP packets, sends will return ECONNREFUSED.
> Is this OK for Luca A/Ronald?

So, you use connect() in order to obtain the source address of your RTP
packets? I am not sure if this is the best solution... Anyway, if other
people feel that this is ok I will not object.


> - Factorizing out a shared function from the RTSP muxer, that sets up a
> chained RTP muxer given an AVStream.

I might be misunderstanding something, here... But, as far as I understand
rtpenc_chain.o is needed by the RTSP muxer (and by the SAP muxer). And it
seems to me that your patch compiles it when the SDP demuxer is enabled?


> - One patch for adding the muxer, and one for adding the demuxer.

See my first comment: is it possiblke to specify different destination
addresses for announcement packets and RTP packets?


[...]
> Or to test with VLC:
>
> ffmpeg -re -i<input>  -vcodec mpeg4 -acodec libfaac -f sap
> sap://244.0.0.255?same_port=1
>
> (VLC/Live555 requires all RTP streams to be received on the same port in
> this scenario, for some reasons...)

I do not seem to remember a similar limitation... Can it be due to the
issue I mentioned above (about the destination addresses)?



			Thanks,
				Luca



More information about the ffmpeg-devel mailing list