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 SURFACEEVENTHANDLER_H sl@0: #define SURFACEEVENTHANDLER_H sl@0: sl@0: #include sl@0: sl@0: class TSurfaceId; sl@0: sl@0: /** sl@0: Clients intending to use ‘window-less’ graphics surfaces need to handle graphics surface specific events sl@0: generated by the MultiMedia Framework (MMF). The MMMFSurfaceEventHandler interface allows client to receive sl@0: these graphics surface specific events. A client intending to use the CVideoPlayerUtility2::AddDisplayL API sl@0: must implement this interface. sl@0: sl@0: @see CVideoPlayerUtility2 sl@0: sl@0: @publishedPartner sl@0: @prototype sl@0: */ sl@0: sl@0: class MMMFSurfaceEventHandler sl@0: { sl@0: public: sl@0: /** sl@0: MmsehSurfaceCreated is called when a graphics surface has been created on an added display. sl@0: Clients will only be notified of surfaces created on displays that they have added. sl@0: MMF still owns the graphics surface and can request the surface to be released by the client. sl@0: Before this method is called by CVideoPlayerUtility2 the graphics surface is registered with sl@0: the Window Server. sl@0: sl@0: @see TVideoAspectRatio sl@0: sl@0: @param aDisplayId Display id the surface was created on. sl@0: @param aId surface Id of graphics surface created. sl@0: @param aCropRect Crop rectangle. The crop rectangle is the area of graphics surface containing viewable video. sl@0: @param aAspectRatio Aspect ratio of video. sl@0: */ sl@0: sl@0: virtual void MmsehSurfaceCreated(TInt aDisplayId, const TSurfaceId& aId, const TRect& aCropRect, TVideoAspectRatio aAspectRatio) = 0; sl@0: sl@0: /** sl@0: MmsehSurfaceParametersChanged is called when either crop rectangle or aspect ratio of the surface changes. sl@0: sl@0: @param aId Surface id of graphics surface with changed parameters. sl@0: @param aCropRect New crop rectangle, this may be identical to previous value. The crop rectangle is the area of graphics surface containing viewable video. sl@0: @param aAspectRatio New aspect ratio of video, this may be identical to previous value. sl@0: */ sl@0: virtual void MmsehSurfaceParametersChanged(const TSurfaceId& aId, const TRect& aCropRect, TVideoAspectRatio aAspectRatio) = 0; sl@0: sl@0: /** sl@0: MmsehSurfaceRemoved is called when the MultiMedia Framework indicates that the surface is to be removed. sl@0: Clients should stop using the graphics surface identified by aId before returning from the callback. sl@0: Further, clients should be prepared to receive a MmsehSurfaceCreated callback event with a new graphics sl@0: surface to use. sl@0: sl@0: @param aId Surface id of graphics surface to be removed. sl@0: */ sl@0: sl@0: virtual void MmsehRemoveSurface(const TSurfaceId& aId) = 0; sl@0: }; sl@0: sl@0: #endif // SURFACEEVENTHANDLER_H sl@0: