Solved

Points for havman56

Posted on 2002-06-06
7
288 Views
Last Modified: 2010-04-02
http://www.experts-exchange.com/jsp/qManageQuestion.jsp?ta=cplusprog&qid=20284244

Hi havman56,

Thank for helping . I have a other 500 points-question for you . I need source code calculate the latency of array of rtp packets .

Note :

1. The array of packets can  have some lost packets .
2. Maybe, that function needs more information . You can add information as parameters


Thank for reading.



0
Comment
Question by:thienpnguyen
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
7 Comments
 
LVL 4

Accepted Solution

by:
havman56 earned 200 total points
ID: 7059600
Thienpnguyen

nice to get a question pointed on me.

sure i will do for u with pleasure. i dont have any code as of now.i ned to write it!

but i have coded for RTP before 1 year. i will recollect it and i will do the needful for me.

apart from this serah the web

there is a library available for RTP from lucent website.
u can use it !it works fine...

 


0
 
LVL 6

Author Comment

by:thienpnguyen
ID: 7059877
Thank for reply as soon as posible .

When you have the source code, please post it at here . I will make some "dummy" questions to give points to you .

Sincerely,
0
 
LVL 4

Expert Comment

by:havman56
ID: 7061105
sure

i will post it! when is finished writing RTP code
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 4

Expert Comment

by:havman56
ID: 7066086
thienpnguyen

i am working on it!

may be after 2 days i will post here!
This is to inform u that i have not forgoted ur queery...
0
 
LVL 4

Expert Comment

by:havman56
ID: 7066890
/*****************************************************************
      Author          : Mangal Dass P
     Date          : 23rd may 2000
     Description : This gives the inter arrival jitter of RTP packets

     Description     :  An estimate of the statistical variance of the RTP data packet
        interarrival time, measured in timestamp units and expressed as
        an unsigned integer. The interarrival jitter J is defined to be
        the mean deviation (smoothed absolute value) of the difference D
        in packet spacing at the receiver compared to the sender for a
        pair of packets. As shown in the equation below, this is
        equivalent to the difference in the "relative transit time" for
        the two packets; the relative transit time is the difference
        between a packet's RTP timestamp and the receiver's clock at the
        time of arrival, measured in the same units.
     Environment : MS VCcompiler

     Recommenadtion :
                    not tested needs more improvement. initial version without timing behaviour

     Email          : micro_mangal@yahoo.com

                     
****************************************************************************************/




#include "rtp.h"


RTP_PACKET  s[2],r[2];



int arrival=150;
main()
{

     int transit;
     int d;
     int i;

/*
 * Initialsiing the values of timestamp but the
 * real time operation is not considered here purely
 * aribitarly values in ms. the values may be wrong too.
 */    
       

     s[0].ts=100;
     s[1].ts=150;
     r[0].ts=125;
     r[1].ts=175;
     s[0].transit=0;
     s[0].jitter=0;



/*
 * assume there are 3 packets both in sender and reciver
 */
     for(i=0;i<=2;i++)
     {

/* arrival is  defined as the time at which packet
 * reaches the destination.
 * reciver Time stamp is defined as the time at which
 * clock of reciver places the value at the packet
 */
 
          transit = arrival - r[i].ts;


/*
 * d is teh delay between transit delay and the initial time stamp of the sender
 */
          d= transit- s[i].transit;

/*
 *  for the next iteration ie fro next packet
 */
          s[i+1].transit=transit;

/*
 * jitter is calculated by using the formula here.
 */

          s[i+1].jitter += (1./16.) * ((double)d - s[i].jitter);

          arrival= arrival + d;

     }
   
}

               
               




     




0
 
LVL 4

Expert Comment

by:havman56
ID: 7066893
still not completed.. yet to be solved ...


   typedef struct _RTP_PACKET
   {
       
       unsigned short int ts;               /* timestamp */
       unsigned short int transit;
        float jitter;
   } RTP_PACKET;
0
 
LVL 4

Expert Comment

by:havman56
ID: 7078134
post ur comments!!
i need ur input before proceeding...

0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question