os/mm/mmlibs/mmfw/inc/surfaceeventhandler.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
sl@0
     1
// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     2
// All rights reserved.
sl@0
     3
// This component and the accompanying materials are made available
sl@0
     4
// under the terms of "Eclipse Public License v1.0"
sl@0
     5
// which accompanies this distribution, and is available
sl@0
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     7
//
sl@0
     8
// Initial Contributors:
sl@0
     9
// Nokia Corporation - initial contribution.
sl@0
    10
//
sl@0
    11
// Contributors:
sl@0
    12
//
sl@0
    13
// Description:
sl@0
    14
//
sl@0
    15
sl@0
    16
#ifndef SURFACEEVENTHANDLER_H
sl@0
    17
#define SURFACEEVENTHANDLER_H
sl@0
    18
sl@0
    19
#include <mmf/common/mmfvideo.h>
sl@0
    20
sl@0
    21
class TSurfaceId;
sl@0
    22
sl@0
    23
/**
sl@0
    24
Clients intending to use ‘window-less’ graphics surfaces need to handle graphics surface specific events
sl@0
    25
generated by the MultiMedia Framework (MMF). The MMMFSurfaceEventHandler interface allows client to receive
sl@0
    26
these graphics surface specific events. A client intending to use the CVideoPlayerUtility2::AddDisplayL API
sl@0
    27
must implement this interface.
sl@0
    28
sl@0
    29
@see CVideoPlayerUtility2
sl@0
    30
sl@0
    31
@publishedPartner
sl@0
    32
@prototype
sl@0
    33
*/
sl@0
    34
sl@0
    35
class MMMFSurfaceEventHandler
sl@0
    36
	{
sl@0
    37
public:
sl@0
    38
	/**
sl@0
    39
	MmsehSurfaceCreated is called when a graphics surface has been created on an added display. 
sl@0
    40
	Clients will only be notified of surfaces created on displays that they have added. 
sl@0
    41
	MMF still owns the graphics surface and can request the surface to be released by the client. 
sl@0
    42
	Before this method is called by CVideoPlayerUtility2 the graphics surface is registered with
sl@0
    43
	the Window Server.
sl@0
    44
sl@0
    45
	@see TVideoAspectRatio
sl@0
    46
sl@0
    47
	@param aDisplayId Display id the surface was created on.
sl@0
    48
	@param aId surface Id of graphics surface created.
sl@0
    49
	@param aCropRect Crop rectangle. The crop rectangle is the area of graphics surface containing viewable video. 
sl@0
    50
	@param aAspectRatio Aspect ratio of video.
sl@0
    51
	*/
sl@0
    52
sl@0
    53
	virtual void MmsehSurfaceCreated(TInt aDisplayId, const TSurfaceId& aId, const TRect& aCropRect, TVideoAspectRatio aAspectRatio) = 0;
sl@0
    54
sl@0
    55
	/**
sl@0
    56
	MmsehSurfaceParametersChanged is called when either crop rectangle or aspect ratio of the surface changes.
sl@0
    57
sl@0
    58
	@param aId Surface id of graphics surface with changed parameters.
sl@0
    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.
sl@0
    60
	@param aAspectRatio New aspect ratio of video, this may be identical to previous value.
sl@0
    61
	*/
sl@0
    62
	virtual void MmsehSurfaceParametersChanged(const TSurfaceId& aId, const TRect& aCropRect, TVideoAspectRatio aAspectRatio) = 0;
sl@0
    63
sl@0
    64
	/**
sl@0
    65
	MmsehSurfaceRemoved is called when the MultiMedia Framework indicates that the surface is to be removed.
sl@0
    66
	Clients should stop using the graphics surface identified by aId before returning from the callback. 
sl@0
    67
	Further, clients should be prepared to receive a MmsehSurfaceCreated callback event with a new graphics
sl@0
    68
	surface to use.
sl@0
    69
sl@0
    70
	@param aId Surface id of graphics surface to be removed.
sl@0
    71
	*/
sl@0
    72
sl@0
    73
	virtual void MmsehRemoveSurface(const TSurfaceId& aId) = 0;
sl@0
    74
	};
sl@0
    75
sl@0
    76
#endif // SURFACEEVENTHANDLER_H
sl@0
    77