[FFmpeg-devel] Realmedia patch
Ronald S. Bultje
rsbultje
Fri Sep 12 04:39:57 CEST 2008
Hello,
I don't really know what to reply to so I just chose a random one.
Maybe we need a new thread at some point here...
On Tue, Sep 9, 2008 at 2:42 AM, Luca Abeni <lucabe72 at email.it> wrote:
> The right thing is the following one:
> 1) the "OPTION" command is used to detect the server type
> 2) according to the server type, you can select a different protocol
> (RTP, RDT, etc...) in the "SETUP" command. This is done through the
> "Transport:" tag.
> The usage of RTP or RDT parsing functions depend on the answer you
> receive to "SETUP"
> 3) the payload type is determined by the "rtpmap" attributes in the
> SDP lines describing the various media.
> So, transpor-protocol (rtp, rdt, etc...) parsing is not payload
> dependent, and does not depend on the SDP. Payload parsing is
> SDP-dependent.
So I've tried an approach as in $attached. It's a hacky patch but sort
of gets the point accross.
- it implements a RTSPPacketType, which is currently just RTP or RDT.
This is used alongside the RTSPProtocol (UDP, TCP, multicast) to set
up a SETUP request. The response Transport: is used for packet
parsing.
- I had to split (temporarily) ff_rdt_subscribe_to_rule() (so I added
rule2()) to fit a new API where I try to get rdt_data out of
non-RTPDynamicPayloadHandler vfuncs. After multirules.patch, this
function disappears, so please disregard that for now, it's a hack and
intended that way because it'll disappear
- rdt_data is still in ff_rdt_parse_packet() but will disappear from
there too. My idea here is that apparently RDT packets can contain
non-RM media (and thus the IsRealDataType may well refer to the RM
content *after* the RDT or RTP packet header), but what I'd like to do
is use the RTPDynamicPayloadHandler.parse_packet() vfunc (which has
access to rdt_data) the way I did in my very first submission many
months ago, and use ff_rdt_parse_packet() as a publicly accessible
function which calls dynpayhdnl.parse_packet() after parsing the RDT
packet handler. This way, things like Sorensen data after a RDT header
would work also. In the current code, they don't work (but that's OK
because we request RTP, not RDT, for that).
- I renamed RTSP_SERVER_RDT to _REAL because it's not RDT-specific
- All functions with no rdt_data in rdt.c except ff_rdt_parse_packet()
can / will move to rtsp_real.c
- All functions with rdt_data in rdt.c can / will move to rdt_rm.c
- rdt.c then contains purely RDT parsing and can be extended to handle
status messages etc., similar to rtpdec.c for RTP
Sorry, lots of notes, and I know the patch contains whitespace
cleanups and reindents etc, I won't commit like this, I'd just like
some comments on the general approach before I get it in a committable
shape.
Thanks,
Ronald
More information about the ffmpeg-devel
mailing list