[FFmpeg-devel] Realmedia patch

Luca Abeni lucabe72
Sat Sep 13 17:17:36 CEST 2008


Hi Ronald,

Ronald S. Bultje wrote:
[...]
> Index: ffmpeg-svn/libavformat/rtsp.c
> ===================================================================
> --- ffmpeg-svn.orig/libavformat/rtsp.c	2008-09-11 22:31:29.000000000 -0400
> +++ ffmpeg-svn/libavformat/rtsp.c	2008-09-11 22:31:32.000000000 -0400
> @@ -44,11 +44,17 @@
>  };
>  
>  enum RTSPServerType {
> -    RTSP_SERVER_RTP, /*< Standard-compliant RTP-server */
> -    RTSP_SERVER_RDT, /*< Realmedia-style server */
> +    RTSP_SERVER_RTP,  /*< Standard-compliant RTP-server */
> +    RTSP_SERVER_REAL, /*< Realmedia-style server */

As I said, I think the "RDT ---> REAL" change should go in first, to simplify
the rest of the patch...


> +enum RTSPPacketType {
> +    RTSP_PACKET_RTP, /*< Standard-compliant RTP packet */
> +    RTSP_PACKET_RDT, /*< Real Data Packet */
> +    RTSP_PACKET_LAST
> +};

This looks like the thing called "transport" in RFC2326 (Section 12.39).
So, I think this is a bad naming.
(Of course, a change like this needs some changes in RTSPProtocol too)


> @@ -63,6 +69,7 @@
>      char session_id[512];
>      enum RTSPProtocol protocol;
>      enum RTSPServerType server_type;
> +    enum RTSPPacketType packet_type;

Same comment as above.


> @@ -940,9 +953,12 @@
>          rtp_opened:
>              port = rtp_get_local_port(rtsp_st->rtp_handle);
>              snprintf(transport, sizeof(transport) - 1,
> -                     "%s/UDP;unicast;client_port=%d",
> -                     trans_pref, port);
> -            if (rt->server_type == RTSP_SERVER_RTP)
> +                     "%s/UDP", trans_pref);
> +            if (rt->server_type != RTSP_SERVER_REAL)
> +                av_strlcat(transport, ";unicast", sizeof(transport));
> +            av_strlcatf(transport, sizeof(transport),
> +                        ";client_port=%d", port);
> +            if (rt->packet_type == RTSP_PACKET_RTP)

This looks like an unrelated change, and has to go in a different patch.



				Luca




More information about the ffmpeg-devel mailing list