]> git.sesse.net Git - vlc/commitdiff
Remove useless stream parameter
authorRémi Denis-Courmont <rdenis@simphalempin.com>
Wed, 11 Jun 2008 18:52:01 +0000 (21:52 +0300)
committerRémi Denis-Courmont <rdenis@simphalempin.com>
Wed, 11 Jun 2008 18:52:01 +0000 (21:52 +0300)
modules/stream_out/rtp.c
modules/stream_out/rtp.h
modules/stream_out/rtpfmt.c

index 6a25c86068b4f172254a7d428ce3b1d87dfff3c7..fe9a8f10da9d9b6c405e4c2900f07e2734702300 100644 (file)
@@ -271,8 +271,7 @@ struct sout_stream_sys_t
     sout_stream_id_t **es;
 };
 
-typedef int (*pf_rtp_packetizer_t)( sout_stream_t *, sout_stream_id_t *,
-                                    block_t * );
+typedef int (*pf_rtp_packetizer_t)( sout_stream_id_t *, block_t * );
 
 typedef struct rtp_sink_t
 {
@@ -1274,7 +1273,7 @@ static int Send( sout_stream_t *p_stream, sout_stream_id_t *id,
     while( p_buffer != NULL )
     {
         p_next = p_buffer->p_next;
-        if( id->pf_packetize( p_stream, id, p_buffer ) )
+        if( id->pf_packetize( id, p_buffer ) )
             break;
 
         block_Release( p_buffer );
index e8b1264373b172f1fcf72a107118332cead5a465..8788dc8d07c0a7266f2fdc54d80cab23e7d1998d 100644 (file)
@@ -47,17 +47,17 @@ void rtp_packetize_common (sout_stream_id_t *id, block_t *out,
 void rtp_packetize_send (sout_stream_id_t *id, block_t *out);
 size_t rtp_mtu (const sout_stream_id_t *id);
 
-int rtp_packetize_mpa  (sout_stream_t *, sout_stream_id_t *, block_t *);
-int rtp_packetize_mpv  (sout_stream_t *, sout_stream_id_t *, block_t *);
-int rtp_packetize_ac3  (sout_stream_t *, sout_stream_id_t *, block_t *);
-int rtp_packetize_split(sout_stream_t *, sout_stream_id_t *, block_t *);
-int rtp_packetize_mp4a (sout_stream_t *, sout_stream_id_t *, block_t *);
-int rtp_packetize_mp4a_latm (sout_stream_t *, sout_stream_id_t *, block_t *);
-int rtp_packetize_h263 (sout_stream_t *, sout_stream_id_t *, block_t *);
-int rtp_packetize_h264 (sout_stream_t *, sout_stream_id_t *, block_t *);
-int rtp_packetize_amr  (sout_stream_t *, sout_stream_id_t *, block_t *);
-int rtp_packetize_spx  (sout_stream_t *, sout_stream_id_t *, block_t *);
-int rtp_packetize_t140 (sout_stream_t *, sout_stream_id_t *, block_t *);
+int rtp_packetize_mpa  (sout_stream_id_t *, block_t *);
+int rtp_packetize_mpv  (sout_stream_id_t *, block_t *);
+int rtp_packetize_ac3  (sout_stream_id_t *, block_t *);
+int rtp_packetize_split(sout_stream_id_t *, block_t *);
+int rtp_packetize_mp4a (sout_stream_id_t *, block_t *);
+int rtp_packetize_mp4a_latm (sout_stream_id_t *, block_t *);
+int rtp_packetize_h263 (sout_stream_id_t *, block_t *);
+int rtp_packetize_h264 (sout_stream_id_t *, block_t *);
+int rtp_packetize_amr  (sout_stream_id_t *, block_t *);
+int rtp_packetize_spx  (sout_stream_id_t *, block_t *);
+int rtp_packetize_t140 (sout_stream_id_t *, block_t *);
 
 /* RTCP */
 typedef struct rtcp_sender_t rtcp_sender_t;
index 5cb867a26e0fdd812e1c361f1eeec7f1705f62b6..a9d0aee6df0b1b9c78afc8a731fed57b9df2cc96 100644 (file)
 #include "rtp.h"
 
 int
-rtp_packetize_h264_nal( sout_stream_t *p_stream, sout_stream_id_t *id,
+rtp_packetize_h264_nal( sout_stream_id_t *id,
                         const uint8_t *p_data, int i_data, int64_t i_pts,
                         int64_t i_dts, bool b_last, int64_t i_length );
 
-int rtp_packetize_mpa( sout_stream_t *p_stream, sout_stream_id_t *id,
+int rtp_packetize_mpa( sout_stream_id_t *id,
                        block_t *in )
 {
     int     i_max   = rtp_mtu (id) - 4; /* payload max in one packet */
@@ -76,8 +76,7 @@ int rtp_packetize_mpa( sout_stream_t *p_stream, sout_stream_id_t *id,
 }
 
 /* rfc2250 */
-int rtp_packetize_mpv( sout_stream_t *p_stream, sout_stream_id_t *id,
-                       block_t *in )
+int rtp_packetize_mpv( sout_stream_id_t *id, block_t *in )
 {
     int     i_max   = rtp_mtu (id) - 4; /* payload max in one packet */
     int     i_count = ( in->i_buffer + i_max - 1 ) / i_max;
@@ -178,8 +177,7 @@ int rtp_packetize_mpv( sout_stream_t *p_stream, sout_stream_id_t *id,
     return VLC_SUCCESS;
 }
 
-int rtp_packetize_ac3( sout_stream_t *p_stream, sout_stream_id_t *id,
-                       block_t *in )
+int rtp_packetize_ac3( sout_stream_id_t *id, block_t *in )
 {
     int     i_max   = rtp_mtu (id) - 2; /* payload max in one packet */
     int     i_count = ( in->i_buffer + i_max - 1 ) / i_max;
@@ -215,8 +213,7 @@ int rtp_packetize_ac3( sout_stream_t *p_stream, sout_stream_id_t *id,
     return VLC_SUCCESS;
 }
 
-int rtp_packetize_split( sout_stream_t *p_stream, sout_stream_id_t *id,
-                         block_t *in )
+int rtp_packetize_split( sout_stream_id_t *id, block_t *in )
 {
     int     i_max   = rtp_mtu (id); /* payload max in one packet */
     int     i_count = ( in->i_buffer + i_max - 1 ) / i_max;
@@ -249,8 +246,7 @@ int rtp_packetize_split( sout_stream_t *p_stream, sout_stream_id_t *id,
 }
 
 /* rfc3016 */
-int rtp_packetize_mp4a_latm( sout_stream_t *p_stream, sout_stream_id_t *id,
-                             block_t *in )
+int rtp_packetize_mp4a_latm( sout_stream_id_t *id, block_t *in )
 {
     int     i_max   = rtp_mtu (id) - 2;              /* payload max in one packet */
     int     latmhdrsize = in->i_buffer / 0xff + 1;
@@ -302,8 +298,7 @@ int rtp_packetize_mp4a_latm( sout_stream_t *p_stream, sout_stream_id_t *id,
     return VLC_SUCCESS;
 }
 
-int rtp_packetize_mp4a( sout_stream_t *p_stream, sout_stream_id_t *id,
-                        block_t *in )
+int rtp_packetize_mp4a( sout_stream_id_t *id, block_t *in )
 {
     int     i_max   = rtp_mtu (id) - 4; /* payload max in one packet */
     int     i_count = ( in->i_buffer + i_max - 1 ) / i_max;
@@ -347,8 +342,7 @@ int rtp_packetize_mp4a( sout_stream_t *p_stream, sout_stream_id_t *id,
 /* rfc2429 */
 #define RTP_H263_HEADER_SIZE (2)  // plen = 0
 #define RTP_H263_PAYLOAD_START (14)  // plen = 0
-int rtp_packetize_h263( sout_stream_t *p_stream, sout_stream_id_t *id,
-                        block_t *in )
+int rtp_packetize_h263( sout_stream_id_t *id, block_t *in )
 {
     uint8_t *p_data = in->p_buffer;
     int     i_data  = in->i_buffer;
@@ -409,7 +403,7 @@ int rtp_packetize_h263( sout_stream_t *p_stream, sout_stream_id_t *id,
 
 /* rfc3984 */
 int
-rtp_packetize_h264_nal( sout_stream_t *p_stream, sout_stream_id_t *id,
+rtp_packetize_h264_nal( sout_stream_id_t *id,
                         const uint8_t *p_data, int i_data, int64_t i_pts,
                         int64_t i_dts, bool b_last, int64_t i_length )
 {
@@ -478,8 +472,7 @@ rtp_packetize_h264_nal( sout_stream_t *p_stream, sout_stream_id_t *id,
     return VLC_SUCCESS;
 }
 
-int rtp_packetize_h264( sout_stream_t *p_stream, sout_stream_id_t *id,
-                        block_t *in )
+int rtp_packetize_h264( sout_stream_id_t *id, block_t *in )
 {
     const uint8_t *p_buffer = in->p_buffer;
     int i_buffer = in->i_buffer;
@@ -509,7 +502,7 @@ int rtp_packetize_h264( sout_stream_t *p_stream, sout_stream_id_t *id,
             }
         }
         /* TODO add STAP-A to remove a lot of overhead with small slice/sei/... */
-        rtp_packetize_h264_nal( p_stream, id, p_buffer, i_size,
+        rtp_packetize_h264_nal( id, p_buffer, i_size,
                                 (in->i_pts > 0 ? in->i_pts : in->i_dts), in->i_dts,
                                 (i_size >= i_buffer), in->i_length * i_size / in->i_buffer );
 
@@ -519,8 +512,7 @@ int rtp_packetize_h264( sout_stream_t *p_stream, sout_stream_id_t *id,
     return VLC_SUCCESS;
 }
 
-int rtp_packetize_amr( sout_stream_t *p_stream, sout_stream_id_t *id,
-                       block_t *in )
+int rtp_packetize_amr( sout_stream_id_t *id, block_t *in )
 {
     int     i_max   = rtp_mtu (id) - 2; /* payload max in one packet */
     int     i_count = ( in->i_buffer + i_max - 1 ) / i_max;
@@ -558,8 +550,7 @@ int rtp_packetize_amr( sout_stream_t *p_stream, sout_stream_id_t *id,
     return VLC_SUCCESS;
 }
 
-int rtp_packetize_t140( sout_stream_t *p_stream, sout_stream_id_t *id,
-                        block_t *in )
+int rtp_packetize_t140( sout_stream_id_t *id, block_t *in )
 {
     const size_t   i_max  = rtp_mtu (id);
     const uint8_t *p_data = in->p_buffer;
@@ -605,8 +596,7 @@ int rtp_packetize_t140( sout_stream_t *p_stream, sout_stream_id_t *id,
 }
 
 
-int rtp_packetize_spx( sout_stream_t *p_stream, sout_stream_id_t *id,
-                       block_t *in )
+int rtp_packetize_spx( sout_stream_id_t *id, block_t *in )
 {
     uint8_t *p_buffer = in->p_buffer;
     int i_data_size, i_payload_size, i_payload_padding;
@@ -615,10 +605,7 @@ int rtp_packetize_spx( sout_stream_t *p_stream, sout_stream_id_t *id,
     block_t *p_out;
 
     if ( in->i_buffer > rtp_mtu (id) )
-    {
-        msg_Warn( p_stream, "Cannot send packet larger than output MTU" );
         return VLC_SUCCESS;
-    }
 
     /*
       RFC for Speex in RTP says that each packet must end on an octet