mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/inc/mcertpsink.h
branchRCL_3
changeset 33 bc78a40cd63c
parent 32 73a1feb507fb
child 35 6c57ef9392d2
equal deleted inserted replaced
32:73a1feb507fb 33:bc78a40cd63c
     1 /*
       
     2 * Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CMCERTPSINK_H
       
    20 #define CMCERTPSINK_H
       
    21 
       
    22 // INCLUDES  
       
    23 #include "mcemediasink.h"
       
    24 
       
    25 // CONSTANTS
       
    26 const TMceSinkType KMceRTPSink = 1;
       
    27 
       
    28 // CLASS DECLARATION
       
    29 
       
    30 /**
       
    31 * Class representing outgoing RTP stream in MCE.
       
    32 *
       
    33 * CMceRtpSink can be used to send media data to network.
       
    34 * It can be configured not to use RTCP during play in order
       
    35 * to save bandwith. 
       
    36 *
       
    37 * CMceRtpSink allows also explicitly sending of RTP RR and SR
       
    38 * messages.  
       
    39 *
       
    40 * Enable and Disable operations to it are considered
       
    41 * to be local, so they are not signalled to remote terminal.
       
    42 * 
       
    43 *  @lib mceclient.lib
       
    44 */
       
    45 class CMceRtpSink: public CMceMediaSink
       
    46 	{
       
    47 	public: // Constructors and destructor
       
    48 
       
    49 	    /**
       
    50 	    * Two-phased constructor.
       
    51 	    */
       
    52 		IMPORT_C static CMceRtpSink* NewL();
       
    53 
       
    54 	    /**
       
    55 	    * Two-phased constructor.
       
    56 	    */
       
    57 		IMPORT_C static CMceRtpSink* NewLC();
       
    58 
       
    59 	    /**
       
    60 	    * Two-phased constructor.
       
    61 	    * @param aSuppressRTCP, ETrue if RTCP not sent during play,
       
    62 		*		 EFalse otherwise
       
    63 		* @param aIdentity, identity of user placed in RTCP, 
       
    64 		*        ownership not transferred.
       
    65 	    */
       
    66 		IMPORT_C static CMceRtpSink* NewL( TBool aSuppressRTCP, 
       
    67 		                                   HBufC8* aIdentity = 0 );
       
    68 
       
    69 	    /**
       
    70 	    * Destructor.
       
    71 	    */
       
    72 		IMPORT_C ~CMceRtpSink();
       
    73 
       
    74 	public: // From base class
       
    75 
       
    76 	    /**
       
    77 	    * Locally resumes sending of RTP packets.
       
    78 		*/
       
    79 		IMPORT_C void EnableL(); 
       
    80 
       
    81 	    /**
       
    82 	    * Locally pauses sending of RTP packets.
       
    83 		*/
       
    84 		IMPORT_C void DisableL(); 
       
    85 
       
    86 	public: // Functions
       
    87 
       
    88 	    /**
       
    89 	    * Sends RTCP sender report to recipient.
       
    90 	    */
       
    91 		IMPORT_C void SendSRL();
       
    92 
       
    93 	    /**
       
    94 	    * Returns the sequence id of the last packet
       
    95 		* sent to network. The value is updated only
       
    96 		* when sink is disabled.
       
    97 		* @pre IsEnabled() == EFalse
       
    98 	    * @return sequence number of last sent packet.
       
    99 	    */
       
   100 		IMPORT_C TUint32 LastPacket() const;
       
   101 		
       
   102 		/**
       
   103 	    * Returns the RTP stream source identifier 
       
   104 	    * used in network (SSRC). 
       
   105 	    * @pre CMceSession::State() == CMceSession::EEstablished 
       
   106 	    * @return source identifier used in network (SSRC).
       
   107 	    */
       
   108 		IMPORT_C TUint32 Ssrc() const;
       
   109 
       
   110 	    /**
       
   111 	    * Updates settings of rtp sink.
       
   112 	    * @pre CMceSession::State() == CMceSession::EIncoming 
       
   113 	    * @param aSuppressRTCP, ETrue if RTCP not sent during play,
       
   114 		*		 EFalse otherwise
       
   115 		* @param aIdentity, identity of user placed in RTCP, 
       
   116 		*        ownership not transferred.
       
   117 	    */
       
   118 		IMPORT_C void UpdateL( TBool aSuppressRTCP, HBufC8* aIdentity = 0  );
       
   119 
       
   120 	private:
       
   121 
       
   122 	    /**
       
   123 	    * C++ default constructor.
       
   124 	    */
       
   125 		CMceRtpSink();
       
   126 	  				
       
   127 	    /**
       
   128 	    * second-phase constructor
       
   129 	    * @param aSuppressRTCP, ETrue if RTCP not sent during play,
       
   130 	    *		 EFalse otherwise
       
   131 	    */
       
   132 		void ConstructL( TBool aSuppressRTCP );
       
   133 
       
   134 	public: // stub data
       
   135 
       
   136     /**
       
   137      * suppress RTCP
       
   138      */
       
   139     TBool iSuppressRTCP;
       
   140 
       
   141     /**
       
   142      * SSRC
       
   143      */
       
   144     TUint32 iSSRC;
       
   145 
       
   146     /**
       
   147      * last packet
       
   148      */
       
   149     TUint32 iLastPacket;
       
   150 
       
   151 
       
   152 	};
       
   153 
       
   154 #endif