|
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 MCCH263PAYLOADENCODER_H |
|
21 #define MCCH263PAYLOADENCODER_H |
|
22 |
|
23 // ============================ INCLUDES ======================================= |
|
24 |
|
25 #include <e32base.h> |
|
26 #include <mmf/server/mmfformat.h> |
|
27 #include "rtpheader.h" |
|
28 #include "mccrtpdatasink.h" |
|
29 |
|
30 const TInt KConst2 = 2; |
|
31 const TInt KThree = 3; |
|
32 const TInt KConst3 = 3; |
|
33 const TInt KFour = 4; |
|
34 const TInt KConst4 = 4; |
|
35 const TInt KFive = 5; |
|
36 const TInt KConst5 = 5; |
|
37 const TInt KSix = 6; |
|
38 const TInt KConst6 = 6; |
|
39 const TInt KSeven = 7; |
|
40 const TInt KConst7 = 7; |
|
41 const TInt KEight = 8; |
|
42 const TInt KConst9 = 9; |
|
43 const TInt KTen = 10; |
|
44 const TInt KConst10 = 10; |
|
45 const TInt KConst13 = 13; |
|
46 const TInt KConst32 = 32; |
|
47 const TInt KConst100 = 100; |
|
48 const TInt KThousand = 1000; |
|
49 |
|
50 const TUint KMaxPacketSize = 2048; //maximum data size of RTP packet in bytes |
|
51 const TUint KAudioPacketSize = 150; //target size for audio packet in bytes. |
|
52 const TUint KVideoPacketSize = 920; //target size for video packet in bytes. |
|
53 const TInt KPacketTimeOut = 10; //RTCP time out check interval |
|
54 const TInt KBufferSize = 50; //maximum number of RTP packets that are |
|
55 //buffered |
|
56 |
|
57 // ============================ CLASS DECLARATIONS ============================= |
|
58 /** |
|
59 * Implements RFC 2190 |
|
60 */ |
|
61 |
|
62 class CBufferContainer : public CBase |
|
63 { |
|
64 public: |
|
65 TRtpSendHeader iSendHeader; |
|
66 CMMFBuffer* iBuffer; |
|
67 |
|
68 CBufferContainer(){ }; |
|
69 inline ~CBufferContainer() |
|
70 { |
|
71 delete iBuffer; |
|
72 } |
|
73 }; |
|
74 |
|
75 /** |
|
76 * Structure used to store H263 Header A Information in CIPMediaVideoSink |
|
77 * @since SWIS Lite |
|
78 */ |
|
79 class CH263headerA : public CBase |
|
80 { |
|
81 public: |
|
82 TUint8 F; |
|
83 TUint8 P; |
|
84 TUint8 SBIT; |
|
85 TUint8 EBIT; |
|
86 TUint8 SRC; |
|
87 TUint8 I; |
|
88 TUint8 U; |
|
89 TUint8 S; |
|
90 TUint8 A; |
|
91 TUint8 R; |
|
92 TUint8 DBQ; |
|
93 TUint8 TRB; |
|
94 TUint8 TR; |
|
95 }; |
|
96 |
|
97 class CMccH263PayloadEncoder: public CBase |
|
98 { |
|
99 public: |
|
100 |
|
101 /** |
|
102 */ |
|
103 virtual void EncodeL( CMMFBuffer* aBuffer, |
|
104 RPointerArray<CBufferContainer>& aDesBuffers ) = 0; |
|
105 |
|
106 virtual void SetPayloadType( TUint8 aPayloadType ) = 0; |
|
107 |
|
108 CMccH263PayloadEncoder() {}; |
|
109 |
|
110 }; |
|
111 |
|
112 |
|
113 #endif |