multimediacommscontroller/mmccredpayloadformat/inc/mccredencoder.h
changeset 0 1bce908db942
equal deleted inserted replaced
-1:000000000000 0:1bce908db942
       
     1 /*
       
     2 * Copyright (c) 2005-2006 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:    Encoder capable to form redundant RTP payload.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #ifndef MCCREDENCODER_H
       
    22 #define MCCREDENCODER_H
       
    23 
       
    24 //  INCLUDES
       
    25 #include    "mccredencdecbase.h"
       
    26 
       
    27 /**
       
    28 *  Redundancy RTP payload format encoder.
       
    29 *
       
    30 *  @lib mmccredplformat.dll
       
    31 *  @since Series 60 3.0
       
    32 */
       
    33 class CMccRedEncoder : public CMccRedEncDecBase
       
    34     {
       
    35     public:  // Constructors and destructor
       
    36         
       
    37         /**
       
    38         * Two-phased constructor.
       
    39         */
       
    40         static CMccRedEncoder* NewL();
       
    41         
       
    42         /**
       
    43         * Destructor.
       
    44         */
       
    45         virtual ~CMccRedEncoder();
       
    46 
       
    47     public: // New functions
       
    48         
       
    49         /**
       
    50         * Encode all encodings set to the RTP payload.
       
    51         * @since    Series 60 3.0
       
    52         * @param    aCurTimeStamp       Time stamp of the current RTP packet
       
    53         * @return   void
       
    54         */
       
    55         void EncodePayloadL( TUint aCurTimeStamp );
       
    56  
       
    57     private:    // Functions from base classes
       
    58         
       
    59         /**
       
    60         * From CMccRedEncDecBase. Initializes encoder.
       
    61         */
       
    62         void DoInitializeL( TInt aRedBlockCount, TInt aMaxPayloadSize,
       
    63             TInt aNumOfEncodings );
       
    64 
       
    65     private:
       
    66 
       
    67         /**
       
    68         * C++ default constructor.
       
    69         */
       
    70         CMccRedEncoder();
       
    71 
       
    72         /**
       
    73         * By default Symbian 2nd phase constructor is private.
       
    74         */
       
    75         void ConstructL();
       
    76         
       
    77         /**
       
    78         * Construct redundancy headers.
       
    79         * @since    Series 60 3.0
       
    80         * @param    aCurTimeStamp       Current time stamp
       
    81         * @return   None
       
    82         */
       
    83         void ConstructRedHeaders( TUint aCurTimeStamp );
       
    84 
       
    85     private:    // Data
       
    86          
       
    87          // Contains latest payloads constructed
       
    88          CMMFDataBuffer* iRedPayload;
       
    89          
       
    90          // Indicates whether redundant packets to send exist
       
    91          TBool iRedPackets;
       
    92          
       
    93          // Contains redundancy headers being encoded
       
    94          HBufC8* iRedHeaders;
       
    95          
       
    96          // Contains time stamps of the latest payloads constructed
       
    97          RArray<TUint> iRedTimeStamps;
       
    98 
       
    99     };
       
   100 
       
   101 #endif      // MCCREDENCODER_H   
       
   102             
       
   103 // End of File