os/mm/mmplugins/mmfwplugins/src/Plugin/subtitle/common/mmfsubtitlegraphicmessage.cpp
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/mm/mmplugins/mmfwplugins/src/Plugin/subtitle/common/mmfsubtitlegraphicmessage.cpp Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,124 @@
1.4 +// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// under the terms of "Eclipse Public License v1.0"
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +//
1.18 +
1.19 +/**
1.20 + @file
1.21 + @internalComponent
1.22 +*/
1.23 +
1.24 +#include "mmfsubtitlegraphicmessage.h"
1.25 +
1.26 +/**
1.27 +TSubtitleGraphicMessageBase
1.28 +
1.29 +@param aMsgType Message type identifier.
1.30 +*/
1.31 +TSubtitleGraphicMessageBase::TSubtitleGraphicMessageBase(TSubtitleGraphicMessage aMsgType) : iMsgType(aMsgType)
1.32 + {
1.33 +
1.34 + }
1.35 +
1.36 +/**
1.37 +Default constructor
1.38 +*/
1.39 +TSubtitleCrpMsgInit::TSubtitleCrpMsgInit() :
1.40 + TSubtitleGraphicMessageBase(ESubtitleCrpMessageInit)
1.41 + {
1.42 +
1.43 + }
1.44 +
1.45 +/**
1.46 +Message constructor for CRP ESubtitleCrpMessageInit
1.47 +@param aBitmapHandle1 Bitmap handle for frame 1 @see CFbsBitmap::Handle()
1.48 +@param aBitmapHandle2 Bitmap handle for frame 2 @see CFbsBitmap::Handle()
1.49 +*/
1.50 +TSubtitleCrpMsgInit::TSubtitleCrpMsgInit(TInt aBitmapHandle1, TInt aBitmapHandle2) :
1.51 + TSubtitleGraphicMessageBase(ESubtitleCrpMessageInit),
1.52 + iBitmapHandle1(aBitmapHandle1),
1.53 + iBitmapHandle2(aBitmapHandle2)
1.54 + {
1.55 +
1.56 + }
1.57 +
1.58 +/**
1.59 +Message constructor for CRP ESubtitleCrpMessageInitSimple
1.60 +*/
1.61 +TSubtitleCrpMsgInitSimple::TSubtitleCrpMsgInitSimple() :
1.62 + TSubtitleGraphicMessageBase(ESubtitleCrpMessageInitSimple)
1.63 + {
1.64 +
1.65 + }
1.66 +
1.67 +/**
1.68 +Message constructor for CRP ESubtitleCrpMessageClear
1.69 +*/
1.70 +TSubtitleCrpMsgClear::TSubtitleCrpMsgClear() : TSubtitleGraphicMessageBase(ESubtitleCrpMessageClear)
1.71 + {
1.72 +
1.73 + }
1.74 +
1.75 +/**
1.76 +Message constructor for CRP ESubtitleCrpMessageDrawFrame
1.77 +*/
1.78 +TSubtitleCrpMsgDrawFrame::TSubtitleCrpMsgDrawFrame( ):
1.79 + TSubtitleGraphicMessageBase(ESubtitleCrpMessageDrawFrame)
1.80 + {
1.81 +
1.82 + }
1.83 +
1.84 +/**
1.85 +Message constructor for CRP ESubtitleCrpMessageInit
1.86 +@param aBitmapHandle Bitmap handle for drawframe request @see CFbsBitmap::Handle()
1.87 +@param aDirtyRegion Dirty region in the source bitmap tha should be copied to the screen
1.88 +@param aDisplayDuration Number of microseconds this frame should be displayed for
1.89 +*/
1.90 +TSubtitleCrpMsgDrawFrame::TSubtitleCrpMsgDrawFrame(TInt aBitmapHandle,
1.91 + const TRect& aDirtyRegion,
1.92 + const TTimeIntervalMicroSeconds& aDisplayDuration) :
1.93 + TSubtitleGraphicMessageBase(ESubtitleCrpMessageDrawFrame),
1.94 + iBitmapHandle(aBitmapHandle),
1.95 + iDirtyRegion(aDirtyRegion),
1.96 + iDisplayDuration(aDisplayDuration)
1.97 + {
1.98 +
1.99 + }
1.100 +
1.101 +/**
1.102 +Message constructor for CRP ESubtitleCrpMessageSwapFrame
1.103 +*/
1.104 +TSubtitleCrpMsgRenderSwapFrame::TSubtitleCrpMsgRenderSwapFrame():
1.105 + TSubtitleGraphicMessageBase(ESubtitleCrpMessageSwapFrame)
1.106 + {
1.107 +
1.108 + }
1.109 +
1.110 +/**
1.111 +Message constructor for CRP ESubtitleCrpMessageInit
1.112 +@param aExpectedBuffer The index number of the internal frame the crp should draw.
1.113 +@param aDisplayDuration The time in microseconds that this frame should be displayed for.
1.114 + The CRP will clear this frame after aDisplayDuration microseconds
1.115 +@param aDirtyRegion The decoder returns the region of the subtitle frame that has been
1.116 + updated. i.e. the region that contains new subtitle content
1.117 +*/
1.118 +TSubtitleCrpMsgRenderSwapFrame::TSubtitleCrpMsgRenderSwapFrame(TInt aExpectedBuffer,
1.119 + const TRect& aDirtyRegion,
1.120 + const TTimeIntervalMicroSeconds& aDisplayDuration):
1.121 + TSubtitleGraphicMessageBase(ESubtitleCrpMessageSwapFrame),
1.122 + iExpectedFrame(aExpectedBuffer),
1.123 + iDisplayDuration(aDisplayDuration),
1.124 + iDirtyRegion(aDirtyRegion)
1.125 + {
1.126 +
1.127 + }