omxil_generic/omxilcomplib/src/omxilcallbackmanagerif.h
changeset 0 0e4a32b9112d
child 5 fb6faddbb212
equal deleted inserted replaced
-1:000000000000 0:0e4a32b9112d
       
     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 
       
    17 /**
       
    18 @file
       
    19 @internalComponent
       
    20 */
       
    21 
       
    22 #ifndef OMXILCALLBACKMANAGERIF_H
       
    23 #define OMXILCALLBACKMANAGERIF_H
       
    24 
       
    25 #include <openmax/il/khronos/v1_x/OMX_Component.h>
       
    26 
       
    27 #include <openmax/il/common/omxilcallbacknotificationif.h>
       
    28 
       
    29 // Forward declarations
       
    30 class MOmxILPortManagerIf;
       
    31 class COmxILFsm;
       
    32 
       
    33 /**
       
    34    CallBack Manager Interface used by Callback Manager implementations.
       
    35  */
       
    36 class MOmxILCallbackManagerIf : public MOmxILCallbackNotificationIf
       
    37 	{
       
    38 
       
    39 public:
       
    40 
       
    41 	virtual ~MOmxILCallbackManagerIf();
       
    42 
       
    43 	/**
       
    44 	   Method to update the Port Manager reference
       
    45 
       
    46 	   @param [in] aPortManager The Port Manager
       
    47 
       
    48 	   @return OMX_ERRORTYPE
       
    49 	*/
       
    50 	virtual void SetPortManager(MOmxILPortManagerIf& aPortManager) = 0;
       
    51 
       
    52 	/**
       
    53 	   Method to update the FSM reference
       
    54 
       
    55 	   @param [in] aFsm The FSM
       
    56 
       
    57 	   @return OMX_ERRORTYPE
       
    58 	*/
       
    59 	virtual void SetFsm(COmxILFsm& aFsm) = 0;
       
    60 
       
    61 
       
    62 	//
       
    63 	// Methods for Callback Registration/Un-registration
       
    64 	//
       
    65 
       
    66 	/**
       
    67 	   Method to register the component handle
       
    68 
       
    69 	   @param [in] aComponentHandle The component handle
       
    70 
       
    71 	   @return OMX_ERRORTYPE
       
    72 	*/
       
    73 	virtual OMX_ERRORTYPE RegisterComponentHandle(
       
    74 		OMX_HANDLETYPE aComponentHandle) = 0;
       
    75 
       
    76 	/**
       
    77 	   Method to register the IL Client callbacks
       
    78 
       
    79 	   @param [in] apCallbacks The IL Client callback pointers
       
    80 
       
    81 	   @param [in] apAppData The IL Client data used to provide
       
    82 	   component-specific context
       
    83 
       
    84 	   @return OMX_ERRORTYPE
       
    85 	*/
       
    86 	virtual OMX_ERRORTYPE RegisterILClientCallbacks(
       
    87 		const OMX_CALLBACKTYPE* apCallbacks,
       
    88 		const OMX_PTR apAppData) = 0;
       
    89 
       
    90 	/**
       
    91 	   Method to register a tunnel callback
       
    92 
       
    93 	   @param [in] aLocalPortIndex The tunnel's local port index
       
    94 
       
    95 	   @param [in] aLocalPortDirection The direction of the tunnel's local port
       
    96 
       
    97 	   @param [in] aTunnelledComponentHandle Tunnelled component handle
       
    98 
       
    99 	   @param [in] aTunnelledPortIndex Index of the tunnelled port
       
   100 
       
   101 	   @return OMX_ERRORTYPE
       
   102 	*/
       
   103 	virtual OMX_ERRORTYPE RegisterTunnelCallback(
       
   104 		OMX_U32 aLocalPortIndex,
       
   105 		OMX_DIRTYPE aLocalPortDirection,
       
   106 		OMX_HANDLETYPE aTunnelledComponentHandle,
       
   107 		OMX_U32 aTunnelledPortIndex) = 0;
       
   108 
       
   109 	/**
       
   110 	   Method to un-register a tunnel callback
       
   111 
       
   112 	   @param [in] aLocalPortIndex The tunnel's local port index
       
   113 
       
   114 	   @return OMX_ERRORTYPE
       
   115 	*/
       
   116 	virtual OMX_ERRORTYPE DeregisterTunnelCallback(
       
   117 		OMX_U32 aLocalPortIndex) = 0;
       
   118 
       
   119 	/**
       
   120 	   Method to register buffer mark propagation ports
       
   121 
       
   122 	   @param [in] aPortIndex The index of the input port that receives buffer
       
   123 	   marks
       
   124 
       
   125 	   @param [in] aPropagationPortIndex An index of the ouput port where buffer marks
       
   126 	   will be propagated
       
   127 
       
   128 	   @return OMX_ERRORTYPE
       
   129 	*/
       
   130 	virtual OMX_ERRORTYPE RegisterBufferMarkPropagationPort(
       
   131 		OMX_U32 aPortIndex,
       
   132 		OMX_U32 aPropagationPortIndex) = 0;
       
   133 
       
   134 	/**
       
   135 	   Method to remove a buffer done commands from the Callback Manager
       
   136 	   internal queues, if queueing is in use
       
   137 
       
   138 	   @param [in] apBufferHeader The buffer header contained in the buffer indication
       
   139 
       
   140 	   @param [in] aDirection The direction of the port that handles the buffer
       
   141 
       
   142 	   @return TBool
       
   143 	*/
       
   144 	virtual TBool BufferRemovalIndication(
       
   145 		OMX_BUFFERHEADERTYPE* apBufferHeader,
       
   146 		OMX_DIRTYPE aDirection) = 0;
       
   147 
       
   148 	//
       
   149 	// Methods for Callback Notification
       
   150 	//
       
   151 
       
   152 	/**
       
   153 	   Method to notify the IL Client of the completion of an OpenMAX IL state
       
   154 	   transition
       
   155 
       
   156 	   @param [in] aOmxState The new state
       
   157 
       
   158 	   @return OMX_ERRORTYPE
       
   159 	*/
       
   160 	virtual OMX_ERRORTYPE TransitionCompleteNotification(
       
   161 		OMX_STATETYPE aOmxState) = 0;
       
   162 
       
   163 	/**
       
   164 	   Method to notify the IL Client of the completion of a OpenMAX IL command
       
   165 
       
   166 	   @param [in] aOmxCommand The command that has been completed
       
   167 
       
   168 	   @param [in] aOmxPortIndex The index of the port where the command
       
   169 	   applies, if any
       
   170 
       
   171 	   @return OMX_ERRORTYPE
       
   172 	*/
       
   173 	virtual OMX_ERRORTYPE CommandCompleteNotification(
       
   174 		OMX_COMMANDTYPE aOmxCommand,
       
   175 		OMX_U32 aOmxPortIndex) = 0;
       
   176 
       
   177 #ifdef _OMXIL_COMMON_IL516C_ON
       
   178 	/**
       
   179 	   Method to request from the tunnelled component the ejection of the
       
   180 	   buffers present in one of its ports
       
   181 
       
   182 	   @param [in] aLocalOmxPortIndex The index of the local port that is
       
   183 	   tunnelled to the component that the ejection request applies to
       
   184 
       
   185 	   @return OMX_ERRORTYPE
       
   186 	*/
       
   187 	virtual OMX_ERRORTYPE EjectBuffersRequest(
       
   188 		OMX_U32 aLocalOmxPortIndex) = 0;
       
   189 #endif
       
   190 
       
   191 	};
       
   192 
       
   193 #include "omxilcallbackmanagerif.inl"
       
   194 
       
   195 #endif // OMXILCALLBACKMANAGERIF_H