khronosfws/openmax_al/src/mediaplayer/xaplayitf.h
changeset 25 6f7ceef7b1d1
parent 19 4a629bc82c5e
child 53 eabc8c503852
equal deleted inserted replaced
21:2ed61feeead6 25:6f7ceef7b1d1
     1 /*
     1 /*
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
     2  * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3  * All rights reserved.
     4 * This component and the accompanying materials are made available
     4  * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5  * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6  * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7  * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     8 *
     8  *
     9 * Initial Contributors:
     9  * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    10  * Nokia Corporation - initial contribution.
    11 *
    11  *
    12 * Contributors:
    12  * Contributors:
    13 *
    13  *
    14 * Description: 
    14  * Description: Play Itf Header
    15 *
    15  *
    16 */
    16  */
    17 
    17 
    18 #ifndef XAPLAYITF_H
    18 #ifndef XAPLAYITF_H
    19 #define XAPLAYITF_H
    19 #define XAPLAYITF_H
    20 
    20 
    21 #include "xaadptbasectx.h"
    21 #include "xaadptbasectx.h"
    22 #include "xamediaplayer.h"
    22 #include "xamediaplayer.h"
    23 
       
    24 
    23 
    25 /** MACROS **/
    24 /** MACROS **/
    26 #define NO_POSITION XA_TIME_UNKNOWN
    25 #define NO_POSITION XA_TIME_UNKNOWN
    27 #define PLAYITF_DEFAULT_UPDATE_PERIOD 1000
    26 #define PLAYITF_DEFAULT_UPDATE_PERIOD 1000
    28 #define START_POSITION 0
    27 #define START_POSITION 0
    32 /** ENUMERATIONS **/
    31 /** ENUMERATIONS **/
    33 
    32 
    34 /** STRUCTURES **/
    33 /** STRUCTURES **/
    35 /* Definition of XAPlayItf implementation */
    34 /* Definition of XAPlayItf implementation */
    36 typedef struct XAPlayItfImpl_
    35 typedef struct XAPlayItfImpl_
    37 {
    36     {
    38     /* parent interface */
    37     /* parent interface */
    39     struct XAPlayItf_ itf;
    38     struct XAPlayItf_ itf;
    40     /* pointer to self */
    39     /* pointer to self */
    41     struct XAPlayItfImpl_* self;
    40     struct XAPlayItfImpl_* self;
    42 
    41 
    49     xaPlayCallback callback;
    48     xaPlayCallback callback;
    50     void *cbcontext;
    49     void *cbcontext;
    51     XAuint32 eventFlags;
    50     XAuint32 eventFlags;
    52     XAmillisecond markerPosition;
    51     XAmillisecond markerPosition;
    53     XAmillisecond positionUpdatePeriod;
    52     XAmillisecond positionUpdatePeriod;
    54     XAboolean     positionupdateOn;
    53     XAboolean positionupdateOn;
    55     XAmillisecond lastPosition;
    54     XAmillisecond lastPosition;
    56     XAboolean isMarkerPosCbSend;
    55     XAboolean isMarkerPosCbSend;
    57 
    56 
    58     /*Adaptation variables*/
    57     /*Adaptation variables*/
    59     /* TODO : This is no longer needed since we have access to XAMediaPlayerImpl
    58     /* TODO : This is no longer needed since we have access to XAMediaPlayerImpl
    60      * Delete this.*/
    59      * Delete this.*/
    61     XAAdaptationBaseCtx *adapCtx;
    60     XAAdaptationBaseCtx *adapCtx;
    62     
    61 
    63     XAMediaPlayerImpl* pObjImpl;
    62     XAMediaPlayerImpl* pObjImpl;
    64 
    63 
    65 } XAPlayItfImpl;
    64     } XAPlayItfImpl;
    66 
    65 
    67 /** METHODS **/
    66 /** METHODS **/
    68 
    67 
    69 /* Base interface XAPlayItf implementation */
    68 /* Base interface XAPlayItf implementation */
    70 XAresult XAPlayItfImpl_SetPlayState(XAPlayItf self, XAuint32 state);
    69 XAresult XAPlayItfImpl_SetPlayState(XAPlayItf self, XAuint32 state);
    73 
    72 
    74 XAresult XAPlayItfImpl_GetDuration(XAPlayItf self, XAmillisecond *pMsec);
    73 XAresult XAPlayItfImpl_GetDuration(XAPlayItf self, XAmillisecond *pMsec);
    75 
    74 
    76 XAresult XAPlayItfImpl_GetPosition(XAPlayItf self, XAmillisecond *pMsec);
    75 XAresult XAPlayItfImpl_GetPosition(XAPlayItf self, XAmillisecond *pMsec);
    77 
    76 
    78 XAresult XAPlayItfImpl_RegisterCallback(XAPlayItf self, xaPlayCallback callback,
    77 XAresult XAPlayItfImpl_RegisterCallback(XAPlayItf self,
    79                                         void *pContext);
    78         xaPlayCallback callback, void *pContext);
    80 
    79 
    81 XAresult XAPlayItfImpl_SetCallbackEventsMask(XAPlayItf self, XAuint32 eventFlags);
    80 XAresult XAPlayItfImpl_SetCallbackEventsMask(XAPlayItf self,
       
    81         XAuint32 eventFlags);
    82 
    82 
    83 XAresult XAPlayItfImpl_GetCallbackEventsMask(XAPlayItf self, XAuint32 *pEventFlags);
    83 XAresult XAPlayItfImpl_GetCallbackEventsMask(XAPlayItf self,
       
    84         XAuint32 *pEventFlags);
    84 
    85 
    85 XAresult XAPlayItfImpl_SetMarkerPosition(XAPlayItf self, XAmillisecond mSec);
    86 XAresult XAPlayItfImpl_SetMarkerPosition(XAPlayItf self, XAmillisecond mSec);
    86 
    87 
    87 XAresult XAPlayItfImpl_ClearMarkerPosition(XAPlayItf self);
    88 XAresult XAPlayItfImpl_ClearMarkerPosition(XAPlayItf self);
    88 
    89 
    89 XAresult XAPlayItfImpl_GetMarkerPosition(XAPlayItf self, XAmillisecond *pMsec);
    90 XAresult
       
    91         XAPlayItfImpl_GetMarkerPosition(XAPlayItf self, XAmillisecond *pMsec);
    90 
    92 
    91 XAresult XAPlayItfImpl_SetPositionUpdatePeriod(XAPlayItf self, XAmillisecond mSec);
    93 XAresult XAPlayItfImpl_SetPositionUpdatePeriod(XAPlayItf self,
       
    94         XAmillisecond mSec);
    92 
    95 
    93 XAresult XAPlayItfImpl_GetPositionUpdatePeriod(XAPlayItf self, XAmillisecond *pMsec);
    96 XAresult XAPlayItfImpl_GetPositionUpdatePeriod(XAPlayItf self,
    94 
    97         XAmillisecond *pMsec);
    95 
    98 
    96 /*
    99 /*
    97  * implementation-specific methods
   100  * implementation-specific methods
    98  */
   101  */
    99 XAPlayItfImpl* XAPlayItfImpl_Create( XAMediaPlayerImpl *impl );
   102 XAPlayItfImpl* XAPlayItfImpl_Create(XAMediaPlayerImpl *impl);
   100 void XAPlayItfImpl_AdaptCb( void *pHandlerCtx, XAAdaptEvent *event );
   103 void XAPlayItfImpl_AdaptCb(void *pHandlerCtx, XAAdaptEvent *event);
   101 void XAPlayItfImpl_Free(XAPlayItfImpl* self);
   104 void XAPlayItfImpl_Free(XAPlayItfImpl* self);
   102 
   105 
   103 
       
   104 #endif /* XAPLAYITF_H */
   106 #endif /* XAPLAYITF_H */