realtimenetprots/rtp/cfrtp/inc/rtp_proto_id.h
changeset 0 307788aac0a8
equal deleted inserted replaced
-1:000000000000 0:307788aac0a8
       
     1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // RTP Protocol IDs.
       
    15 // 
       
    16 //
       
    17 
       
    18 /**
       
    19  @file
       
    20  @internalAll
       
    21 */
       
    22 
       
    23 #ifndef _RTP_PROTO_ID_
       
    24 #define _RTP_PROTO_ID_
       
    25 
       
    26 #include <e32def.h>
       
    27 #include <rtpprepostprocessingcallback.h>
       
    28 
       
    29 //The IDs specified in this file are temporary and might change
       
    30 //when moved to an appropriate system header file.
       
    31 
       
    32 /*
       
    33  * @internalAll
       
    34  */
       
    35 const TInt KProtocolRtp  = 250;
       
    36 /*
       
    37  * @internalAll
       
    38  */
       
    39 const TInt KProtocolRtcp = 251;
       
    40 
       
    41 
       
    42 /* RTP and RTCP socket options levels */
       
    43 const TUint KSolRtp     = 0x406;
       
    44 const TUint KSolRtcp    = 0x407;
       
    45 
       
    46 /*
       
    47  * @internalAll
       
    48  */
       
    49 // Supplies information about the profile-specific RTP timestamps
       
    50 // See RRtpSession::SetRTPTimeConversion()
       
    51 struct TRtpTimeConversion
       
    52 	{
       
    53 	//The time now in RTP format 
       
    54 	TUint iRtpTimeNow;
       
    55 	//The number of nanoseconds per RTP timer tick
       
    56 	TUint iConversion;
       
    57 	};
       
    58 
       
    59 /*
       
    60  * @internalAll
       
    61  */
       
    62 // Sets the number of sequential packets that must be received before a stream is considered good.
       
    63 // Sets the maximum number of dropped packets to be considered a dropout, as opposed to an ended 
       
    64 // and restarted stream.
       
    65 // Sets the maximum number of packets by which a packet can be delayed before it is considered dropped.
       
    66 // See RRtpSession::SetRtpStreamParameters()
       
    67 struct TRtpStreamParams
       
    68 	{
       
    69 	//Minimum number of packets to be received
       
    70 	//before stream is considered valid.
       
    71 	TInt iMinSequential;
       
    72 	//Maximum tolerable misorder in packets received
       
    73 	TInt iMaxMisorder;
       
    74 	TInt iMaxDropout;
       
    75 	};
       
    76 	
       
    77 class TRtcpStatisticsParams: public TRtcpStatistics
       
    78 	{
       
    79 	public:
       
    80 	TUint32 iSsrc;
       
    81 	};
       
    82 
       
    83 /* A Place holder for sampling rates */
       
    84 class TSamplingRateInfo
       
    85 	{
       
    86 public:
       
    87 	TInt  iPayloadType;
       
    88 	TUint iSamplingRate;
       
    89 	};
       
    90 
       
    91 
       
    92 /**
       
    93  * RTP options
       
    94  *
       
    95  * Level: #KSolRtp
       
    96 */
       
    97 
       
    98 /* The bandwidth allocated for an RTP Session
       
    99  * The option value is an integer
       
   100  */
       
   101 const TUint KSoRtpBandwidth      = 0x700;
       
   102 
       
   103 /* Option value is TPckgBuf of TRtpStreamParams.*/
       
   104 /* set Stream specific params */
       
   105 const TUint KSoStreamParams     = 0x701;
       
   106 
       
   107 //NOTE: Mandatory Set"Opt"  
       
   108 //So this is no longer an "option" :(
       
   109 /* Option value TPckgBuf of TRtpTimeConversion
       
   110    Supplies information about the profile-specific RTP timestamps 
       
   111   */
       
   112 const TUint KSoRtpTimeConvertion = 0x702;
       
   113 
       
   114 //Fetches the LocalSSRC. This option cannot be Set.
       
   115 //Argument is TUint
       
   116 const TUint KSoLocalSSRC = 0x703;
       
   117 
       
   118 //Enable sending/receiving non rtp data option
       
   119 //Argument is TUint
       
   120 const TUint KSoSendNonRtpData = 0x704;
       
   121 
       
   122 //Disable sending/receiving non rtp data option
       
   123 //Argument is TUint
       
   124 const TUint KSoReceiveNonRtpData = 0x705;
       
   125 
       
   126 /* Option value is TPckgBuf of TSamplingRateInfo */
       
   127 /* Set Sampling rate info parameters */
       
   128 const TUint KSoSamplingRate = 0x706;
       
   129 
       
   130 
       
   131 /**
       
   132  * RTCP options
       
   133  *
       
   134  * Level: #KSolRtcp
       
   135 */
       
   136 
       
   137 /* Option value TDes8
       
   138  * CNAME for an RTP Session.
       
   139  * Unfortunately there is a rather strange requirement here to SetThisoptioFirst.
       
   140  * Even after opening the RTCP if this option is not set RTCP is not enabled. Another
       
   141  * example of an Option not beain an "optional" any more :(   
       
   142  * */
       
   143 const TUint KSoRtcpCNAME         = 0x800;
       
   144 
       
   145 /* The bandwidth allocated for an RTP Session
       
   146  * The option value is an integer. 1 will enable autosend
       
   147  * and 0 will disable autosend.
       
   148  */
       
   149 const TUint KSoRtcpAutoSend      = 0x801;
       
   150 
       
   151 /* Option value is TTimeIntervalMicroSeconds32.
       
   152  * 
       
   153  * Sets the RTCP Auto Send interval. This disables the RFC based calculation of RTCP intervals. 
       
   154  * To re-enable auto calculation, set the interval to zero.
       
   155  * Also see RRtpSession::SetRtcpInterval()
       
   156  * */
       
   157 const TUint KSoRtcpTimeInterval  = 0x802;
       
   158 
       
   159 /* Sets the default destination address for RTCP reports.
       
   160  * See RFC 3550 Sec 6.4.2.
       
   161  * If no transmission has occured then the stack still should be
       
   162  * able to send empty RR reports to destination. If this option is 
       
   163  * not set empty RRs will not be sent before any RTP transmission or
       
   164  * receiving has occured
       
   165  */
       
   166 const TUint KSoDefaultDestAddr   = 0x803;
       
   167 
       
   168 //Enable sending/receiving non rtcp data option
       
   169 //Argument is TUint
       
   170 const TUint KSoSendNonRtcpData = 0x804;
       
   171 
       
   172 //Disable sending/receiving non rtcp data option
       
   173 //Argument is TUint
       
   174 const TUint KSoReceiveNonRtcpData = 0x805;
       
   175 
       
   176 //sets the remote RTCP port
       
   177 //Argument is TUint
       
   178 const TUint KSoRemoteRtcpPort = 0x806;
       
   179 
       
   180 //sets the remote RTCP address
       
   181 //Argument is TUint
       
   182 const TUint KSoRemoteRtcpAddress = 0x807;
       
   183 
       
   184 //RTCP statistics structure
       
   185 //Argument is TUint
       
   186 const TUint KSoRtcpStatistics = 0x808;
       
   187 
       
   188 #endif // _RTP_PROTO_ID_
       
   189