Symbian3/SDK/Source/GUID-0ACAFB87-0D45-5BAA-B40A-9A7DC1646B01.dita
changeset 7 51a74ef9ed63
parent 0 89d6a7a84779
equal deleted inserted replaced
6:43e37759235e 7:51a74ef9ed63
       
     1 <?xml version="1.0" encoding="utf-8"?>
       
     2 <!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
       
     3 <!-- This component and the accompanying materials are made available under the terms of the License 
       
     4 "Eclipse Public License v1.0" which accompanies this distribution, 
       
     5 and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
       
     6 <!-- Initial Contributors:
       
     7     Nokia Corporation - initial contribution.
       
     8 Contributors: 
       
     9 -->
       
    10 <!DOCTYPE concept
       
    11   PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
       
    12 <concept id="GUID-0ACAFB87-0D45-5BAA-B40A-9A7DC1646B01" xml:lang="en"><title>Managing
       
    13 the RTCP packets and reports</title><prolog><metadata><keywords/></metadata></prolog><conbody>
       
    14 <p>This section describes how to send various types of RTCP packets, set the
       
    15 stream parameters, get stream statistics and close the session. </p>
       
    16 <section id="GUID-663C6781-3137-5D48-A836-6ADDD4474805"><title>Sending various
       
    17 RTCP packets</title><p>To automatically send SR, RR, or SDES packets, call <xref href="GUID-97FC8566-E4AD-3881-8669-134798A88779.dita#GUID-97FC8566-E4AD-3881-8669-134798A88779/GUID-B32E14CD-DE13-3E89-96B4-5713CB7217A7"><apiname>RRtpSession::SetRTCPAutoSend()</apiname></xref> with
       
    18 its paramter set to ETrue. For more information about these packets, see Managing
       
    19 send and receive reports.</p><codeblock xml:space="preserve">session.SetRTCPAutoSend(ETrue);
       
    20 </codeblock><p>Set the RTCP auto-send time interval in microseconds by calling <xref href="GUID-97FC8566-E4AD-3881-8669-134798A88779.dita#GUID-97FC8566-E4AD-3881-8669-134798A88779/GUID-506A9D47-03DE-36D0-8466-D7BFB725FBB1"><apiname>RRtpSession::SetRtcpInterval()</apiname></xref>.</p><codeblock xml:space="preserve">session.SetRtcpInterval(1000);
       
    21 </codeblock><p>If auto-sending is set to EFalse, call <xref href="GUID-97FC8566-E4AD-3881-8669-134798A88779.dita#GUID-97FC8566-E4AD-3881-8669-134798A88779/GUID-7AF454C8-6943-3986-BC82-CF6BFB27AF7A"><apiname>RRtpSession::SendRTCPPacketL()</apiname></xref> to
       
    22 send a packet.</p><codeblock xml:space="preserve">//aPacket is a valid RTCP packet session.SendRTCPPacketL(aPacket);
       
    23 </codeblock><p>For more information, see the definition of TRtpSendPacketType.
       
    24  </p><codeblock xml:space="preserve">Call RRtpSession::SendAppL() to send an APP packet.</codeblock><p>For
       
    25 an SDES RTP packet, call <xref href="GUID-97FC8566-E4AD-3881-8669-134798A88779.dita#GUID-97FC8566-E4AD-3881-8669-134798A88779/GUID-1D4254AC-043A-3BA7-ABF7-B008DC9F4D01"><apiname>RRtpSession::SetSDESL()</apiname></xref> to set
       
    26 the SDES details such as CNAME, NAME, PHONE, EMAIL and so on. You must set
       
    27 these details before the packet is sent. The CNAME must be unique for an RTP
       
    28 session.   <xref href="GUID-97FC8566-E4AD-3881-8669-134798A88779.dita#GUID-97FC8566-E4AD-3881-8669-134798A88779/GUID-0B04130D-585C-31D9-A1F0-B4166BC26A92"><apiname>RRtpSession::GetSDES()</apiname></xref> enables you to fetch
       
    29 the data associated with the specified SDES item.  </p><p> You can set the
       
    30 data associated with a PRIV (Private Extensions) SDES item by calling <xref href="GUID-97FC8566-E4AD-3881-8669-134798A88779.dita#GUID-97FC8566-E4AD-3881-8669-134798A88779/GUID-D7E02919-E39A-3CA0-A8C7-BE77504C0948"><apiname>RRtpSession::SetPRIVL()</apiname></xref>.
       
    31  PRIV (Private Extensions) SDES is not supported.   Call <xref href="GUID-97FC8566-E4AD-3881-8669-134798A88779.dita#GUID-97FC8566-E4AD-3881-8669-134798A88779/GUID-00D4DBEA-3EDB-3F88-90B8-374D2CECB383"><apiname>RRtpSession::ByeL()</apiname></xref> to
       
    32 send an RTCP Bye packet.  </p> </section>
       
    33 <section><title>Setting the stream parameters </title> <p>The <xref href="GUID-8420B7F8-7BE3-30C0-BFC4-05F7A13361B6.dita"><apiname>SetRtpStreamParameters()</apiname></xref> method
       
    34 sets the following stream parameters: </p> <ul>
       
    35 <li id="GUID-60CD5E08-6829-5675-AC64-6CAA3C6D53D9"><p>maximum number of sequential
       
    36 packets that must be received for a good stream. </p> </li>
       
    37 <li id="GUID-8ED20A24-B6D0-5CE4-A115-459FED0E885C"><p>maximum number of dropped
       
    38 packets to be considered a dropout. </p> </li>
       
    39 <li id="GUID-688E9BB0-96E9-5090-B80F-1E75D27D2FCD"><p>maximum number of packets
       
    40 by which a packet can be delayed to be considered as dropped. </p> </li>
       
    41 </ul> <codeblock id="GUID-601FA412-12EA-571F-913C-7F4E383EE8BD" xml:space="preserve">SetRtpStreamParameters(1,100,3000);// set MinSequential, MaxMisorder &amp; MaxDropout </codeblock> </section>
       
    42 <section><title>Getting the stream statistics</title> <p>The <xref href="GUID-97FC8566-E4AD-3881-8669-134798A88779.dita#GUID-97FC8566-E4AD-3881-8669-134798A88779/GUID-63B8D608-D078-3F8E-9ABD-2CD29F1396F5"><apiname>RRtpSession::RtcpStatistics()</apiname></xref> method
       
    43 provides sending and receiving statistics about the current active RTP session.
       
    44 The statistics depend on the contents of the latest Sender Report (SR) packets
       
    45 and Receiver Report (RR) packets. The returned <xref href="GUID-53671562-A0BB-379D-AC1A-0006F70A4513.dita"><apiname>TRtcpStatistics</apiname></xref> structure
       
    46 contains the following statistics: </p> <table id="GUID-82B41FFA-00C1-5477-9727-2C3DBCA754D5">
       
    47 <tgroup cols="2"><colspec colname="col0"/><colspec colname="col1"/>
       
    48 <thead>
       
    49 <row>
       
    50 <entry>Direction </entry>
       
    51 <entry>Statistic </entry>
       
    52 </row>
       
    53 </thead>
       
    54 <tbody>
       
    55 <row>
       
    56 <entry><p>Sending </p> </entry>
       
    57 <entry><p>Total number of packets sent from the beginning of the RTP session
       
    58 to the latest SR. </p> </entry>
       
    59 </row>
       
    60 <row>
       
    61 <entry><p>Total number of payload octets sent from the beginning of the RTP
       
    62 session to the latest SR. </p> </entry>
       
    63 </row>
       
    64 <row>
       
    65 <entry><p>Receiving </p> </entry>
       
    66 <entry><p>Inter-arrival jitter. </p> </entry>
       
    67 </row>
       
    68 <row>
       
    69 <entry><p>Total number of packets lost since the beginning of the RTP session. </p> </entry>
       
    70 </row>
       
    71 <row>
       
    72 <entry><p>Fraction of packets lost since the previous SR or RR. </p> </entry>
       
    73 </row>
       
    74 </tbody>
       
    75 </tgroup>
       
    76 </table> <p>For more information about these statistics, see the RTP standard
       
    77 in <xref href="http://www.ietf.org/rfc/rfc3550.txt" scope="external">RFC 3550</xref>. </p> </section>
       
    78 <section><title>Closing a session</title> <p> <codeph>Close()</codeph> closes
       
    79 the RTP session. All the send and receive streams are disconnected after this
       
    80 call. </p> <codeblock id="GUID-6723F7F1-DDBE-5912-BF72-8B0902CDE681" xml:space="preserve">session.Close(); 
       
    81 delete session;</codeblock> </section>
       
    82 <section><title>See also</title> <p><xref href="GUID-FBA52F3B-0A7A-5FE3-82CD-72F88788D432.dita#GUID-FBA52F3B-0A7A-5FE3-82CD-72F88788D432/GUID-352B33B6-D02B-5ECB-B154-6CB06C21A377">Types
       
    83 of RTCP packets</xref>  </p> <p><xref href="GUID-5287A403-1094-5682-A443-A6C2A04A1F23.dita">Creating
       
    84 and Managing an RTP session</xref>  </p> </section>
       
    85 </conbody></concept>