multimediacommscontroller/mmccavcpayloadformat/inc/rfc3984encode.h
changeset 0 1bce908db942
equal deleted inserted replaced
-1:000000000000 0:1bce908db942
       
     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:    Class definition for rfc3984encode.h, the payloadization class
       
    15 **				 for the AVC codec
       
    16 **
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 #ifndef RFC3984ENCODE_H
       
    23 #define RFC3984ENCODE_H
       
    24 
       
    25 #include <e32cmn.h>
       
    26 #include <e32des8.h>
       
    27 #include "rfc3984base.h"
       
    28 
       
    29 
       
    30 class CRFC3984Encode : public CRFC3984Base
       
    31 {
       
    32 	public:
       
    33 	
       
    34 		// public functions
       
    35 	
       
    36 		~CRFC3984Encode();
       
    37 		static CRFC3984Encode* NewL();
       
    38 		void SetMTUSize(TUint32 aMtuSize);
       
    39 		void SetFrameRate(TInt aFrameRate);
       
    40 		void PayloadizeFrameL(TDes8 & aBuffer, TUint32 aTimeStamp, TUint32 & aMarkerBit, TInt &aNalCount);	
       
    41 		HBufC8 * GetNalUnitsInOrder(TInt & aIndex);
       
    42 		void ClearNalBuffers();
       
    43 	
       
    44 	protected:
       
    45 	
       
    46 		CRFC3984Encode();
       
    47 		void PayloadizeFrameSingleNALModeL(TDes8 & aBuffer, TUint32 aTimeStamp, TUint32 & aMarkerBit, TInt & aNalCount);
       
    48 		void PayloadizeFrameNonInterleavedModeL(TDes8 & aBuffer, TUint32 aTimeStamp, TUint32 & aMarkerBit, TInt & aNalCount);
       
    49 		void PayloadizeNaluL(TDes8 & aBuffer, TUint32 aTimeStamp, TUint32 & aMarkerBit, TInt & aNalCount);
       
    50 		void FragmentNaluL(TDes8 & aBuffer, TUint32 aTimeStamp, TUint32 & aMarkerBit, TInt & aNalCount, TInt aStartIndex, TInt aSize, TUint16 aDON);
       
    51 		void AddSnaluPacketL( TPtr8 aStart, TInt aSize );
       
    52 		
       
    53 	private:
       
    54 	
       
    55 		// private members
       
    56 		TInt iMaxPacketSize;				// MTU Size of the network, Used in Non-Interleaved and Interleaved mode for fragmentation
       
    57 	    TInt iFrameRate;					// Frame Rate at which video is being sent, used to calculate timestamping increments
       
    58 	    
       
    59 	    RPointerArray<HBufC8> iPayloadizedBuffers;  // Array to keep pointers to payloadized buffers
       
    60 	    TInt iNalCount;							   // count of packetized NAL units
       
    61 	   
       
    62 	   	// local processing members
       
    63 	   	TInt iBufferIndex;					// Index to browse the buffer data, for finding start codes   
       
    64 		
       
    65 		RArray<TInt> iToPayloadizeBuffer;
       
    66 		RArray<TInt> iToPayloadizeSizeBuffer;
       
    67 		TInt		 iToPayloadizeCount;
       
    68 	   	
       
    69 
       
    70 };
       
    71 
       
    72 #endif
       
    73 
       
    74 // EOF