|
1 /* |
|
2 * Copyright (c) 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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef MCCH263NEWPAYLOADENCODER_H |
|
21 #define MCCH263NEWPAYLOADENCODER_H |
|
22 |
|
23 // ============================ INCLUDES ======================================= |
|
24 |
|
25 #include <e32base.h> |
|
26 #include <e32std.h> |
|
27 #include <mmf/server/mmfformat.h> |
|
28 #include "rtpheader.h" |
|
29 #include "mccrtpdatasink.h" |
|
30 #include "mcch263payloadencoder.h" |
|
31 |
|
32 // ============================ CLASS DECLARATIONS ============================= |
|
33 |
|
34 class CMccH263NewPayloadEncoder : public CMccH263PayloadEncoder |
|
35 { |
|
36 public: |
|
37 |
|
38 /** |
|
39 * First stage consturctor |
|
40 */ |
|
41 static CMccH263NewPayloadEncoder* NewL(); |
|
42 |
|
43 /** |
|
44 * Write a buffer to sink |
|
45 * @since SWIS Lite |
|
46 * @param CCMRMediaBuffer* aBuffer The buffer to write |
|
47 * @param aDesBuffers, buffers array contains encoded data |
|
48 * @return void |
|
49 */ |
|
50 void EncodeL( CMMFBuffer* aBuffer, |
|
51 RPointerArray<CBufferContainer>& aDesBuffers ); |
|
52 |
|
53 /** |
|
54 */ |
|
55 void SetPayloadType( TUint8 aPayloadType ); |
|
56 |
|
57 /** |
|
58 */ |
|
59 virtual ~CMccH263NewPayloadEncoder(); |
|
60 |
|
61 private: |
|
62 |
|
63 /** |
|
64 * Write header byte to RTP packet as in RFC 2190 |
|
65 * @since SWIS Lite |
|
66 * @param TInt byte |
|
67 * @return TUint8 header byte |
|
68 */ |
|
69 TUint8 WriteHeaderData( TInt Byte ); |
|
70 |
|
71 void CreateNewBufferL( |
|
72 CMMFBuffer* aMMFBuffer, |
|
73 RPointerArray<CBufferContainer>& aDesBuffers, |
|
74 const TDesC8& aPacketData, |
|
75 TInt aLength, |
|
76 TInt aMarker, |
|
77 TInt aHeaderDataByteOne, |
|
78 TInt aHeaderDataByteTwo ); |
|
79 |
|
80 private: |
|
81 |
|
82 TRtpSendHeader iSendHeader;//RTP send header |
|
83 TTimeIntervalMicroSeconds iTimeStamp; |
|
84 TUint16 iSequenceNumIncrementer; |
|
85 |
|
86 private: |
|
87 |
|
88 #ifdef EUNIT_TEST |
|
89 friend class UT_CMccH263NewPayloadEncoder; |
|
90 #endif |
|
91 |
|
92 }; |
|
93 |
|
94 |
|
95 #endif |