[vlc-devel] Re: Modify IP ToS for B pictures

Xavier Grandmougin xavier.grandmougin at loria.fr
Wed Jul 7 16:03:33 CEST 2004


Thank you  for all your answers : none.
I made it by myself.

Xavier Grandmougin wrote:

> Hi all,
>
> I'm working on integrating (m,k)-firm real-time garantees into the 
> Internet QoS model. A part of this project consist of modifying the IP 
> ToS byte of the packets which transport the B pictures (to notify the 
> router that it can drop these non-critical packets in case of it is 
> overloaded).
>
> Practically, I send a MPEG-1 / RTP flow and I'm trying to understand 
> how, just before sending the packets, to know which type of image is 
> about to be sent (I, P or B) ; if it is a B one, I want to put a 
> special value in the ToS byte.
>
> I looked at vlc-trunk/modules/stream_out/rtp.c, and tried to modify 
> vlc-trunk/modules/access_output/udp.c : in the static void ThreadWrite 
> function, just before
>
> send( p_thread->i_handle, p_pk->p_buffer, p_pk->i_buffer, 0 );
>
> I wrote something like :
>
> if ( ((p_pk->p_buffer[14]) & 0x07) == 3)
> {
>            // B pictures
>            int optval=1;
>            setsockopt(p_thread->i_handle, IPPROTO_IP, IP_TOS,
>                       (void *)&optval, sizeof(optval));
> }
>
> But it doesn't seem to work... where is my mistake ? Do you think I'm 
> on the (a) right way ? Thanx in advance for your help,
>
> Xavier Grandmougin
>

-- 
This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html
If you are in trouble, please contact <postmaster at videolan.org>



More information about the vlc-devel mailing list