os/mm/mmlibs/mmfw/tsrc/mmvalidationsuite/mmvalidationsuiteapp/inc/mvsvideocontrol.h
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/mm/mmlibs/mmfw/tsrc/mmvalidationsuite/mmvalidationsuiteapp/inc/mvsvideocontrol.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,95 @@
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 +#ifndef MVSVIDEOCONTROL_H
1.20 +#define MVSVIDEOCONTROL_H
1.21 +
1.22 +#include <coecntrl.h>
1.23 +#include <surfaceeventhandler.h>
1.24 +
1.25 +class CMVSPipControl :
1.26 + public CCoeControl,
1.27 + public MMMFSurfaceEventHandler
1.28 + {
1.29 +public:
1.30 + enum TRenderType
1.31 + {
1.32 + EUseMmf,
1.33 + EUseCrp
1.34 + };
1.35 +
1.36 +public:
1.37 + static CMVSPipControl* NewL(RWindowTreeNode& aParent);
1.38 + ~CMVSPipControl();
1.39 +
1.40 + // MMMFSurfaceEventHandler
1.41 + void MmsehSurfaceCreated(TInt aDisplayId, const TSurfaceId& aId, const TRect& aCropRect, TVideoAspectRatio aAspectRatio);
1.42 + void MmsehSurfaceParametersChanged(const TSurfaceId& aId, const TRect& aCropRect, TVideoAspectRatio aAspectRatio);
1.43 + void MmsehRemoveSurface(const TSurfaceId& aId);
1.44 +
1.45 + void SetRenderType(TRenderType aRenderType);
1.46 + void Clear();
1.47 + RWindow& ControlWindow() const;
1.48 +
1.49 +private:
1.50 + CMVSPipControl();
1.51 + void ConstructL(RWindowTreeNode& aParent);
1.52 +
1.53 + void Draw(const TRect& aRect) const;
1.54 +
1.55 +private:
1.56 + TRenderType iRenderType;
1.57 + TInt iDisplayId;
1.58 + TRect iCropRect;
1.59 + };
1.60 +
1.61 +
1.62 +class CMVSVideoControl : public CCoeControl
1.63 + {
1.64 +public:
1.65 + static CMVSVideoControl* NewLC(CMVSVideoPlayAgent& aVideoPlayAgent, TInt aDisplay, RWindowTreeNode& aParent);
1.66 + static CMVSVideoControl* NewL(CMVSVideoPlayAgent& aVideoPlayAgent, TInt aDisplay, RWindowTreeNode& aParent);
1.67 +
1.68 + ~CMVSVideoControl();
1.69 +
1.70 + RWindow& ControlWindow() const;
1.71 + TInt ScreenNumber() const;
1.72 +
1.73 + CMVSPipControl& Pip() const;
1.74 + void EnablePip(CMVSPipControl::TRenderType aRenderType);
1.75 + void DisablePip();
1.76 +
1.77 + void SetOverlayTextL(const TDesC& aOverlayText);
1.78 + void ClearOverlayText();
1.79 +
1.80 +private:
1.81 + CMVSVideoControl(CMVSVideoPlayAgent& aVideoPlayAgent, TInt aDisplay);
1.82 +
1.83 + void ConstructL(RWindowTreeNode& aParent);
1.84 + void Draw(const TRect& aRect) const;
1.85 +
1.86 + TInt CountComponentControls() const;
1.87 + CCoeControl* ComponentControl(TInt aIndex) const;
1.88 +
1.89 +private:
1.90 + CMVSVideoPlayAgent& iVideoPlayAgent;
1.91 + TInt iDisplay;
1.92 + CMVSPipControl* iPip;
1.93 +
1.94 + RBuf iOverlayText; // Text to be drawn on top of video
1.95 + };
1.96 +
1.97 +#endif // MVSVIDEOCONTROL_H
1.98 +