~ubuntu-branches/ubuntu/vivid/linphone/vivid

« back to all changes in this revision

Viewing changes to oRTP/src/rtpsession.c

  • Committer: Bazaar Package Importer
  • Author(s): Mark Purcell
  • Date: 2009-10-14 08:26:02 UTC
  • mfrom: (1.3.1 upstream) (6.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20091014082602-751618nxdjooja3l
Tags: 3.2.1-1
New upstream release 

Show diffs side-by-side

added added

removed removed

Lines of Context:
685
685
 
686
686
/**
687
687
 *      Allocates a new rtp packet. In the header, ssrc and payload_type according to the session's
688
 
 *      context. Timestamp and seq number are not set, there will be set when the packet is going to be
689
 
 *      sent with rtp_session_sendm_with_ts().
 
688
 *      context. Timestamp is not set, it will be set when the packet is going to be
 
689
 *      sent with rtp_session_sendm_with_ts(). Sequence number is initalized to previous sequence number sent + 1
690
690
 *      If payload_size is zero, thus an empty packet (just a RTP header) is returned.
691
691
 *
692
692
 *@param session a rtp session.
805
805
         * not block */
806
806
        if (session->flags & RTP_SESSION_SCHEDULED)
807
807
        {
 
808
                wait_point_lock(&session->snd.wp);
808
809
                packet_time =
809
810
                        rtp_session_ts_to_time (session,
810
811
                                     send_ts -
811
812
                                     session->rtp.snd_ts_offset) +
812
813
                                        session->rtp.snd_time_offset;
813
814
                /*ortp_message("rtp_session_send_with_ts: packet_time=%i time=%i",packet_time,sched->time_);*/
814
 
                wait_point_lock(&session->snd.wp);
815
815
                if (TIME_IS_STRICTLY_NEWER_THAN (packet_time, sched->time_))
816
816
                {
817
817
                        wait_point_wakeup_at(&session->snd.wp,packet_time,(session->flags & RTP_SESSION_BLOCKING_MODE)!=0);     
1079
1079
                 * wanted expires */
1080
1080
                /* but we must not block the process if the timestamp wanted by the application is older
1081
1081
                 * than current time */
 
1082
                wait_point_lock(&session->rcv.wp);
1082
1083
                packet_time =
1083
1084
                        rtp_session_ts_to_time (session,
1084
1085
                                     user_ts -
1085
1086
                                     session->rtp.rcv_query_ts_offset) +
1086
1087
                        session->rtp.rcv_time_offset;
1087
1088
                ortp_debug ("rtp_session_recvm_with_ts: packet_time=%i, time=%i",packet_time, sched->time_);
1088
 
                wait_point_lock(&session->rcv.wp);
 
1089
                
1089
1090
                if (TIME_IS_STRICTLY_NEWER_THAN (packet_time, sched->time_))
1090
1091
                {
1091
1092
                        wait_point_wakeup_at(&session->rcv.wp,packet_time, (session->flags & RTP_SESSION_BLOCKING_MODE)!=0);