|
1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 /** |
|
17 @file |
|
18 @internalComponent |
|
19 */ |
|
20 |
|
21 #include "mmfsubtitlegraphicmessage.h" |
|
22 |
|
23 /** |
|
24 TSubtitleGraphicMessageBase |
|
25 |
|
26 @param aMsgType Message type identifier. |
|
27 */ |
|
28 TSubtitleGraphicMessageBase::TSubtitleGraphicMessageBase(TSubtitleGraphicMessage aMsgType) : iMsgType(aMsgType) |
|
29 { |
|
30 |
|
31 } |
|
32 |
|
33 /** |
|
34 Default constructor |
|
35 */ |
|
36 TSubtitleCrpMsgInit::TSubtitleCrpMsgInit() : |
|
37 TSubtitleGraphicMessageBase(ESubtitleCrpMessageInit) |
|
38 { |
|
39 |
|
40 } |
|
41 |
|
42 /** |
|
43 Message constructor for CRP ESubtitleCrpMessageInit |
|
44 @param aBitmapHandle1 Bitmap handle for frame 1 @see CFbsBitmap::Handle() |
|
45 @param aBitmapHandle2 Bitmap handle for frame 2 @see CFbsBitmap::Handle() |
|
46 */ |
|
47 TSubtitleCrpMsgInit::TSubtitleCrpMsgInit(TInt aBitmapHandle1, TInt aBitmapHandle2) : |
|
48 TSubtitleGraphicMessageBase(ESubtitleCrpMessageInit), |
|
49 iBitmapHandle1(aBitmapHandle1), |
|
50 iBitmapHandle2(aBitmapHandle2) |
|
51 { |
|
52 |
|
53 } |
|
54 |
|
55 /** |
|
56 Message constructor for CRP ESubtitleCrpMessageInitSimple |
|
57 */ |
|
58 TSubtitleCrpMsgInitSimple::TSubtitleCrpMsgInitSimple() : |
|
59 TSubtitleGraphicMessageBase(ESubtitleCrpMessageInitSimple) |
|
60 { |
|
61 |
|
62 } |
|
63 |
|
64 /** |
|
65 Message constructor for CRP ESubtitleCrpMessageClear |
|
66 */ |
|
67 TSubtitleCrpMsgClear::TSubtitleCrpMsgClear() : TSubtitleGraphicMessageBase(ESubtitleCrpMessageClear) |
|
68 { |
|
69 |
|
70 } |
|
71 |
|
72 /** |
|
73 Message constructor for CRP ESubtitleCrpMessageDrawFrame |
|
74 */ |
|
75 TSubtitleCrpMsgDrawFrame::TSubtitleCrpMsgDrawFrame( ): |
|
76 TSubtitleGraphicMessageBase(ESubtitleCrpMessageDrawFrame) |
|
77 { |
|
78 |
|
79 } |
|
80 |
|
81 /** |
|
82 Message constructor for CRP ESubtitleCrpMessageInit |
|
83 @param aBitmapHandle Bitmap handle for drawframe request @see CFbsBitmap::Handle() |
|
84 @param aDirtyRegion Dirty region in the source bitmap tha should be copied to the screen |
|
85 @param aDisplayDuration Number of microseconds this frame should be displayed for |
|
86 */ |
|
87 TSubtitleCrpMsgDrawFrame::TSubtitleCrpMsgDrawFrame(TInt aBitmapHandle, |
|
88 const TRect& aDirtyRegion, |
|
89 const TTimeIntervalMicroSeconds& aDisplayDuration) : |
|
90 TSubtitleGraphicMessageBase(ESubtitleCrpMessageDrawFrame), |
|
91 iBitmapHandle(aBitmapHandle), |
|
92 iDirtyRegion(aDirtyRegion), |
|
93 iDisplayDuration(aDisplayDuration) |
|
94 { |
|
95 |
|
96 } |
|
97 |
|
98 /** |
|
99 Message constructor for CRP ESubtitleCrpMessageSwapFrame |
|
100 */ |
|
101 TSubtitleCrpMsgRenderSwapFrame::TSubtitleCrpMsgRenderSwapFrame(): |
|
102 TSubtitleGraphicMessageBase(ESubtitleCrpMessageSwapFrame) |
|
103 { |
|
104 |
|
105 } |
|
106 |
|
107 /** |
|
108 Message constructor for CRP ESubtitleCrpMessageInit |
|
109 @param aExpectedBuffer The index number of the internal frame the crp should draw. |
|
110 @param aDisplayDuration The time in microseconds that this frame should be displayed for. |
|
111 The CRP will clear this frame after aDisplayDuration microseconds |
|
112 @param aDirtyRegion The decoder returns the region of the subtitle frame that has been |
|
113 updated. i.e. the region that contains new subtitle content |
|
114 */ |
|
115 TSubtitleCrpMsgRenderSwapFrame::TSubtitleCrpMsgRenderSwapFrame(TInt aExpectedBuffer, |
|
116 const TRect& aDirtyRegion, |
|
117 const TTimeIntervalMicroSeconds& aDisplayDuration): |
|
118 TSubtitleGraphicMessageBase(ESubtitleCrpMessageSwapFrame), |
|
119 iExpectedFrame(aExpectedBuffer), |
|
120 iDisplayDuration(aDisplayDuration), |
|
121 iDirtyRegion(aDirtyRegion) |
|
122 { |
|
123 |
|
124 } |