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