Update contrib.
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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
16 #ifndef SURFACEEVENTHANDLER_H
17 #define SURFACEEVENTHANDLER_H
19 #include <mmf/common/mmfvideo.h>
24 Clients intending to use ‘window-less’ graphics surfaces need to handle graphics surface specific events
25 generated by the MultiMedia Framework (MMF). The MMMFSurfaceEventHandler interface allows client to receive
26 these graphics surface specific events. A client intending to use the CVideoPlayerUtility2::AddDisplayL API
27 must implement this interface.
29 @see CVideoPlayerUtility2
35 class MMMFSurfaceEventHandler
39 MmsehSurfaceCreated is called when a graphics surface has been created on an added display.
40 Clients will only be notified of surfaces created on displays that they have added.
41 MMF still owns the graphics surface and can request the surface to be released by the client.
42 Before this method is called by CVideoPlayerUtility2 the graphics surface is registered with
45 @see TVideoAspectRatio
47 @param aDisplayId Display id the surface was created on.
48 @param aId surface Id of graphics surface created.
49 @param aCropRect Crop rectangle. The crop rectangle is the area of graphics surface containing viewable video.
50 @param aAspectRatio Aspect ratio of video.
53 virtual void MmsehSurfaceCreated(TInt aDisplayId, const TSurfaceId& aId, const TRect& aCropRect, TVideoAspectRatio aAspectRatio) = 0;
56 MmsehSurfaceParametersChanged is called when either crop rectangle or aspect ratio of the surface changes.
58 @param aId Surface id of graphics surface with changed parameters.
59 @param aCropRect New crop rectangle, this may be identical to previous value. The crop rectangle is the area of graphics surface containing viewable video.
60 @param aAspectRatio New aspect ratio of video, this may be identical to previous value.
62 virtual void MmsehSurfaceParametersChanged(const TSurfaceId& aId, const TRect& aCropRect, TVideoAspectRatio aAspectRatio) = 0;
65 MmsehSurfaceRemoved is called when the MultiMedia Framework indicates that the surface is to be removed.
66 Clients should stop using the graphics surface identified by aId before returning from the callback.
67 Further, clients should be prepared to receive a MmsehSurfaceCreated callback event with a new graphics
70 @param aId Surface id of graphics surface to be removed.
73 virtual void MmsehRemoveSurface(const TSurfaceId& aId) = 0;
76 #endif // SURFACEEVENTHANDLER_H