sl@0: // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // sl@0: sl@0: #ifndef MVSVIDEOCONTROL_H sl@0: #define MVSVIDEOCONTROL_H sl@0: sl@0: #include sl@0: #include sl@0: sl@0: class CMVSPipControl : sl@0: public CCoeControl, sl@0: public MMMFSurfaceEventHandler sl@0: { sl@0: public: sl@0: enum TRenderType sl@0: { sl@0: EUseMmf, sl@0: EUseCrp sl@0: }; sl@0: sl@0: public: sl@0: static CMVSPipControl* NewL(RWindowTreeNode& aParent); sl@0: ~CMVSPipControl(); sl@0: sl@0: // MMMFSurfaceEventHandler sl@0: void MmsehSurfaceCreated(TInt aDisplayId, const TSurfaceId& aId, const TRect& aCropRect, TVideoAspectRatio aAspectRatio); sl@0: void MmsehSurfaceParametersChanged(const TSurfaceId& aId, const TRect& aCropRect, TVideoAspectRatio aAspectRatio); sl@0: void MmsehRemoveSurface(const TSurfaceId& aId); sl@0: sl@0: void SetRenderType(TRenderType aRenderType); sl@0: void Clear(); sl@0: RWindow& ControlWindow() const; sl@0: sl@0: private: sl@0: CMVSPipControl(); sl@0: void ConstructL(RWindowTreeNode& aParent); sl@0: sl@0: void Draw(const TRect& aRect) const; sl@0: sl@0: private: sl@0: TRenderType iRenderType; sl@0: TInt iDisplayId; sl@0: TRect iCropRect; sl@0: }; sl@0: sl@0: sl@0: class CMVSVideoControl : public CCoeControl sl@0: { sl@0: public: sl@0: static CMVSVideoControl* NewLC(CMVSVideoPlayAgent& aVideoPlayAgent, TInt aDisplay, RWindowTreeNode& aParent); sl@0: static CMVSVideoControl* NewL(CMVSVideoPlayAgent& aVideoPlayAgent, TInt aDisplay, RWindowTreeNode& aParent); sl@0: sl@0: ~CMVSVideoControl(); sl@0: sl@0: RWindow& ControlWindow() const; sl@0: TInt ScreenNumber() const; sl@0: sl@0: CMVSPipControl& Pip() const; sl@0: void EnablePip(CMVSPipControl::TRenderType aRenderType); sl@0: void DisablePip(); sl@0: sl@0: void SetOverlayTextL(const TDesC& aOverlayText); sl@0: void ClearOverlayText(); sl@0: sl@0: private: sl@0: CMVSVideoControl(CMVSVideoPlayAgent& aVideoPlayAgent, TInt aDisplay); sl@0: sl@0: void ConstructL(RWindowTreeNode& aParent); sl@0: void Draw(const TRect& aRect) const; sl@0: sl@0: TInt CountComponentControls() const; sl@0: CCoeControl* ComponentControl(TInt aIndex) const; sl@0: sl@0: private: sl@0: CMVSVideoPlayAgent& iVideoPlayAgent; sl@0: TInt iDisplay; sl@0: CMVSPipControl* iPip; sl@0: sl@0: RBuf iOverlayText; // Text to be drawn on top of video sl@0: }; sl@0: sl@0: #endif // MVSVIDEOCONTROL_H sl@0: