Update contrib.
1 // Copyright (c) 2007-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 DEVVIDEOVIDEOSURFACECUSTOMINTERFACE_H
17 #define DEVVIDEOVIDEOSURFACECUSTOMINTERFACE_H
19 #include <graphics/surface.h>
20 #include <mmf/common/mmfvideo.h>
23 DevVideo Surface Support Custom Interface UID.
28 const TUid KUidMMFVideoSurfaceSupport = { 0x1028340E };
31 Video graphics surface change observer that is used with the MMMFVideoSurfaceSupport
32 custom interface. Controllers or other DevVideo clients using that custom interface
33 must implement this observer interface.
38 class MMMFVideoSurfaceObserver
42 Video surface created. The media device calls this method when a surface has been created
43 after (1) a surface has been created after a play command and the first frame for the stream
44 has been passed to the surface, and (2) when an existing surface that has already been created
45 by the media device is to be replaced with a new surface also created by the mdeai device. MMF
46 controllers typically send a KMMFEventCategoryVideoSurfaceCreated event to the client utility
47 when they receive this callback.
49 virtual void MmvsoSurfaceCreated() = 0;
52 Video surface parameters changed. The client must get the updated surface parameters with
53 MmvssGetSurfaceParametersL() and recalculate its display layout. MMF controllers typically
54 send a KMMFEventCategoryVideoSurfaceParametersChanged event to the client utility when
55 they receive this callback.
57 virtual void MmvsoSurfaceParametersChanged() = 0;
60 The client must remove the video surface. The media device calls this callback when the surface
61 needs to be replaced. This typically happens if the video picture size changes too much to fit in
62 existing surface buffers.
64 The client must remove all surfaces from its current windows and when it has done so must call
65 MmvssSurfaceRemovedL().
67 MMF controllers typically send a KMMFEventCategoryVideoRemoveSurface event to the client
68 utility when they receive this callback and let the client utility remove the surface.
70 virtual void MmvsoRemoveSurface() = 0;
74 DevVideo custom interface. Video decoders and post-processor media devices
75 that support rendering to video surfaces implements this custom interface to
76 provide surface management support to the controller. Most of the methods in
77 this custom interface map directly to MMF custom commands, and controllers
78 typically implement the MMF custom commands using these methods.
83 class MMMFVideoSurfaceSupport
87 Requests the media device to use graphics surfaces for video rendering.
88 The client must call this method before Initialize() to ensure the media
89 device allocates the right types of resources for rendering.
91 virtual void MmvssUseSurfaces() = 0;
94 Sets a new video surface support observer to receive surface management events
95 from the media device.
97 @param aObserver New observer object to use.
99 virtual void MmvssSetObserver(MMMFVideoSurfaceObserver& aObserver) = 0;
102 Retrieves parameters for the current surface. The client typically calls this in response
103 to a MmvsoSurfaceCreated() or MmvsoSurfaceParametersChanged() observer callback.
106 Surface ID for the display.
108 Cropping rectangle within the surface. The crop rectangle identifies the area of
109 the surface that should be shown on the screen.
110 @param aPixelAspectRatio
111 Video picture pixel aspect ratio.
113 @leave KErrNotReady if no surface is available for the display.
116 virtual void MmvssGetSurfaceParametersL(TSurfaceId& aSurfaceId, TRect& aCropRect,
117 TVideoAspectRatio& aPixelAspectRatio) = 0;
120 Indicates that the surface is no longer in use and can be destroyed. The client typically calls
121 this in response to MmvsoSurfaceCreated() (where the newly created surface is replacing an
122 existing one) or MmvsoRemoveSurface() observer callback.
124 @param aSurfaceId Surface ID that is no longer in use
126 @leave KErrNotFound if the surface does not exist
128 virtual void MmvssSurfaceRemovedL(const TSurfaceId& aSurfaceId) = 0;
131 #endif // DEVVIDEOVIDEOSURFACECUSTOMINTERFACE_H