|
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". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 #ifndef SURFACEEVENTHANDLER_H |
|
17 #define SURFACEEVENTHANDLER_H |
|
18 |
|
19 #include <mmf/common/mmfvideo.h> |
|
20 |
|
21 class TSurfaceId; |
|
22 |
|
23 /** |
|
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. |
|
28 |
|
29 @see CVideoPlayerUtility2 |
|
30 |
|
31 @publishedPartner |
|
32 @prototype |
|
33 */ |
|
34 |
|
35 class MMMFSurfaceEventHandler |
|
36 { |
|
37 public: |
|
38 /** |
|
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 |
|
43 the Window Server. |
|
44 |
|
45 @see TVideoAspectRatio |
|
46 |
|
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. |
|
51 */ |
|
52 |
|
53 virtual void MmsehSurfaceCreated(TInt aDisplayId, const TSurfaceId& aId, const TRect& aCropRect, TVideoAspectRatio aAspectRatio) = 0; |
|
54 |
|
55 /** |
|
56 MmsehSurfaceParametersChanged is called when either crop rectangle or aspect ratio of the surface changes. |
|
57 |
|
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. |
|
61 */ |
|
62 virtual void MmsehSurfaceParametersChanged(const TSurfaceId& aId, const TRect& aCropRect, TVideoAspectRatio aAspectRatio) = 0; |
|
63 |
|
64 /** |
|
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 |
|
68 surface to use. |
|
69 |
|
70 @param aId Surface id of graphics surface to be removed. |
|
71 */ |
|
72 |
|
73 virtual void MmsehRemoveSurface(const TSurfaceId& aId) = 0; |
|
74 }; |
|
75 |
|
76 #endif // SURFACEEVENTHANDLER_H |
|
77 |